RFR: 8269004 Implement ResizableResourceHashtable [v3]

Coleen Phillimore coleenp at openjdk.java.net
Tue Jun 29 21:37:05 UTC 2021


On Tue, 29 Jun 2021 21:08:34 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/utilities/resizeableResourceHash.hpp line 127:
>> 
>>> 125:     }
>>> 126: 
>>> 127:     FREE_C_HEAP_ARRAY(Node*, old_table);
>> 
>> If you resource allocated old_table, this doesn't seem right.
>> It seems like the ResizeableHashtable should be a CHeapHashtable and it's always resizeable.
>> And the code either has a fixed size ResourceHashtable or a variable/resizeable CHeapHashtable.
>
> Fixed. The `FREE_C_HEAP_ARRAY` should be called only if the table is c-heap allocated.
> 
> Per our off-line conversation,  let's leave the 4 combination of {res, c-heap} x {fixed, resizeable}, and live with the bad naming for now (even `ResourceHashtable` is misleading since it can be resource allocated). We should try to start getting rid of the old `Hashtable` classes. Eventually, we can clean up the naming with something like:
> 
> - ResizeableResourceHashtable -> Hashtable
> - ResourceHashtable -> FixedHashtable

Ok, thank you for fixing this.  Yes, these are better names.  We can fix all the uses when we agree on some convention and when we replace the utilities/hashtable hashtable and KVHashtable.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4536


More information about the hotspot-dev mailing list