RFR: 8338929: Make Metaspace::deallocate space-aware [v2]

Coleen Phillimore coleenp at openjdk.org
Mon Aug 26 14:56:07 UTC 2024


On Mon, 26 Aug 2024 13:00:02 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> By terminology, it is not in class space. 
>> 
>> Class space I (we? don't we all?) call the section that is governed by the metaspace allocator. The CDS region containing Klass is not in class space. It is, however, in the *narrow Klass decoding range*:
>> 
>> - Klass decoding range: [CompressedKlassPointers::base() ... CompressedKlassPointers::base() + CompressedKlassPointers::range() )
>> - that range contains the CDS klass range, followed (after a possible gap) by the traditional class space. If CDS is off, its just the class space.
>
> There had been a nice ASCII art somewhere, but I cannot find it anymore; maybe someone removed it.

This comment should then be "or the CDS archive", since the function is contains() and includes the non-class metaspace.  That is, is_in_shared_metaspace() includes all of the CDS archive.  I don't think the CompressedKlassPointers:::range limit is in the middle of the CDS archive memory area, unless CDS was changed without me noticing to separate class and non-class metadata (I hope not).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20701#discussion_r1731362491


More information about the hotspot-runtime-dev mailing list