RFR: 8330076: [NMT] add/make a mandatory MEMFLAGS argument to family of os::reserve/commit/uncommit memory API [v2]

Afshin Zafari azafari at openjdk.org
Thu Apr 11 20:34:44 UTC 2024


On Thu, 11 Apr 2024 16:27:41 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixed missing change.
>
> src/hotspot/share/memory/metaspace.cpp line 592:
> 
>> 590:     // Fallback: reserve anywhere
>> 591:     log_debug(metaspace, map)("Trying anywhere...");
>> 592:     result = os::reserve_memory_aligned(size, Metaspace::reserve_alignment(), false, mtMetaspace);
> 
> It's unclear to me if some of these `mtMetaspace` should be `mtClass`. This comment applies to other places where we're setting up memory for the compressed class space.

Anywhere compressed class is used, the flag is set to `mtClass`.

> src/hotspot/share/memory/virtualspace.cpp line 366:
> 
>> 364:   ReservedSpace space;
>> 365:   space.initialize_members(base, size, alignment, page_size, special, executable);
>> 366:   space.set_nmt_flag(flag);
> 
> Why is this calling a set_nmt_flag instead of making initialize_member take a flag?

Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18745#discussion_r1561644315
PR Review Comment: https://git.openjdk.org/jdk/pull/18745#discussion_r1561645352


More information about the shenandoah-dev mailing list