RFR: 8268406: Deallocate jmethodID native memory [v2]

David Holmes dholmes at openjdk.org
Tue Jun 17 03:22:31 UTC 2025


On Mon, 16 Jun 2025 23:19:32 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Okay, I added one when we increment the jmethod_id_counter.
>> 
>>   // Update jmethodID global counter.
>>   _jmethodID_counter++;
>>   guarantee(_jmethodID_counter != 0, "must never go back to zero");
>> 
>> I think this will detect wraparound.
>
> Thanks!

Given it will take 584 years to wrap-around at a generation rate of 1 per nanosecond, I think we can just use an assertion here, as the only way this could fire is if we initialize the counter incorrectly.

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

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


More information about the hotspot-dev mailing list