# HG changeset patch # User manc # Date 1573692554 28800 # Node ID 148921c01038cd74b07cdb54d166b8c169c16b92 # Parent e6baa47fbacfc750b69c0f950accaadabacd06e7 8234127: BasicHashtable does not support small table_size Reviewed-by: coleenp, jiangli diff -r e6baa47fbacf -r 148921c01038 src/hotspot/share/utilities/hashtable.cpp --- a/src/hotspot/share/utilities/hashtable.cpp Thu Nov 14 12:42:44 2019 -0800 +++ b/src/hotspot/share/utilities/hashtable.cpp Wed Nov 13 16:49:14 2019 -0800 @@ -61,7 +61,7 @@ if (entry == NULL) { if (_first_free_entry + _entry_size >= _end_block) { - int block_size = MIN2(512, MAX2((int)_table_size / 2, (int)_number_of_entries)); + int block_size = MIN2(512, MAX3(2, (int)_table_size / 2, (int)_number_of_entries)); int len = _entry_size * block_size; len = 1 << log2_int(len); // round down to power of 2 assert(len >= _entry_size, "");