comparison src/hotspot/share/utilities/hashtable.cpp @ 53643:7d3cde494494

8214206: Fix for JDK-8213419 is broken on 32-bit Reviewed-by: mdoerr, shade
author roland
date Thu, 22 Nov 2018 17:25:47 +0100
parents 61b3b58a1d1d
children 3db8758f0f79
comparison
equal deleted inserted replaced
11:8e975e334035 12:8ae0cedca4ee
61 61
62 if (entry == NULL) { 62 if (entry == NULL) {
63 if (_first_free_entry + _entry_size >= _end_block) { 63 if (_first_free_entry + _entry_size >= _end_block) {
64 int block_size = MIN2(512, MAX2((int)_table_size / 2, (int)_number_of_entries)); 64 int block_size = MIN2(512, MAX2((int)_table_size / 2, (int)_number_of_entries));
65 int len = _entry_size * block_size; 65 int len = _entry_size * block_size;
66 len = 1 << log2_intptr(len); // round down to power of 2 66 len = 1 << log2_int(len); // round down to power of 2
67 assert(len >= _entry_size, ""); 67 assert(len >= _entry_size, "");
68 _first_free_entry = NEW_C_HEAP_ARRAY2(char, len, F, CURRENT_PC); 68 _first_free_entry = NEW_C_HEAP_ARRAY2(char, len, F, CURRENT_PC);
69 _entry_blocks->append(_first_free_entry); 69 _entry_blocks->append(_first_free_entry);
70 _end_block = _first_free_entry + len; 70 _end_block = _first_free_entry + len;
71 } 71 }