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

Coleen Phillimore coleenp at openjdk.org
Tue Aug 27 13:17:09 UTC 2024


On Mon, 26 Aug 2024 14:15:28 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> For ucoming Lilliput changes, as well as to simplify [JDK-8338526](https://bugs.openjdk.org/browse/JDK-8338526), we should make Metaspace::deallocate space-aware (as in, instead of having to tell it where the pointed-to block resides, it should know it on its own). 
>> 
>> As of now, callers need to tell the function of the deallocated block is in class space or in non-class metaspace. That is unnecessary and won't work for TinyCP. The deallocation function can do this better on itself by doing a range check on the class space range.
>
> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - improve comments
>  - Merge branch 'master' into make-deallocate-space-aware
>  - copyrights
>  - fast is-in-class-space check

src/hotspot/share/memory/metaspace.hpp line 121:

> 119: 
> 120:   // Returns true if the pointer points into class space, non-class metaspace, or the
> 121:   // Klass portion of the CDS archive.

This was the tiny comment nit.  This doesn't return the "Klass portion of the" CDS archive so can you remove those words?  Then it's good to go and I'll merge with it.  Thanks!

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

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


More information about the hotspot-runtime-dev mailing list