RFR(S): JDK-8019845 NPG: Memory leak during class redefinition

Coleen Phillmore coleen.phillimore at oracle.com
Fri Jul 26 11:50:07 UTC 2013

On 7/26/2013 6:12 AM, frederic parain wrote:
>>     If the allocate/deallocate subsystem doesn't support partial
>> deallocates
>>      then why does deallocate() have a size parameter? If you always
>> have to
>>      deallocate() exactly what you allocate()'ed, then deallocate() only
>> needs
>>      the pointer originally returned by allocate() and doesn't need the
>> size
>>      parameter.
> I'm not familiar enough with Metaspace to answer this questions. I'll
> let the NPG experts respond to this one.

We pass the size because the block that is allocated does  not have the 
size stored in it (to save 1 word of space per allocation).   So you 
can't just free the pointer.


> Thanks,
> Fred 

More information about the hotspot-gc-dev mailing list