RFR: 8271506: Add ResourceHashtable support for deleting selected entries [v2]

Coleen Phillimore coleenp at openjdk.java.net
Tue Aug 3 17:23:37 UTC 2021


On Mon, 2 Aug 2021 18:43:50 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make unlink non-const because it's not.
>
> src/hotspot/share/utilities/resourceHash.hpp line 230:
> 
>> 228:         Node* node = *ptr;
>> 229:         // do_entry must clean up the key and value in Node.
>> 230:         bool clean = iter->do_entry(node->_key, node->_value);
> 
> Unless I miss it, you don't enforce the constness here, no? So, nothing prevents the called hook from modifying key or value. You may do what Ioi did in https://github.com/openjdk/jdk/pull/4942 and const-cast the parameters for the call.

I thought I answered this in email but I don't see it.  I want the do_entry function to modify the arguments, like calling their destructor or free operators.

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

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


More information about the hotspot-dev mailing list