RFR: 8268406: Deallocate jmethodID native memory [v7]

Coleen Phillimore coleenp at openjdk.org
Fri Jun 20 18:42:56 UTC 2025


On Thu, 19 Jun 2025 00:07:49 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add a basic gtest.
>
> src/hotspot/share/oops/instanceKlass.cpp line 2395:
> 
>> 2393: 
>> 2394: // Allocate the jmethodID cache.
>> 2395: static jmethodID* create_jmethod_id_cache(size_t size) {
> 
> Why isn't this used at line 2439 to create the (initial?) cache?

No reason. I should have done that.

> src/hotspot/share/oops/jmethodIDTable.cpp line 40:
> 
>> 38: static uint64_t _jmethodID_counter = 0;
>> 39: // Tracks the number of jmethodID entries in the _jmethod_id_table.
>> 40: // Incremented on insert, decremented on remove. Use to track if we need to resize the table.
> 
> Suggestion:
> 
> // Incremented on insert, decremented on remove. Used to track if we need to resize the table.

fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25267#discussion_r2159503221
PR Review Comment: https://git.openjdk.org/jdk/pull/25267#discussion_r2159502540


More information about the hotspot-dev mailing list