RFR: 8370527: Memory leak after 8316694: Implement relocation of nmethod within CodeCache
    Chad Rakoczy 
    duke at openjdk.org
       
    Tue Oct 28 16:40:14 UTC 2025
    
    
  
On Tue, 28 Oct 2025 16:21:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> You seem to be saying that "since the initial value is 1 even for unreferenced data, then the final value should also be 1, and that is when we free".
The final value should be 0 when it is freed but I didn't think it was necessary to actually write that 0 memory that was about to be freed anyways
I fixed the code to decrement the reference counter regardless and then check if it zero before freeing. I was trying to get fancy but it is more trouble than it is worth
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28008#issuecomment-3457425416
    
    
More information about the hotspot-compiler-dev
mailing list