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

David Holmes dholmes at openjdk.org
Tue Apr 23 06:34:37 UTC 2024


On Wed, 17 Apr 2024 12:38:23 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   alignment in coding style changed.
>
> src/hotspot/share/nmt/virtualMemoryTracker.cpp line 460:
> 
>> 458:   assert(_reserved_regions != nullptr, "Sanity check");
>> 459: 
>> 460:   ReservedMemoryRegion  rgn(addr, size, flag);
> 
> I'm not sure about this. `rgn` is just used to find the memory region we want to uncommit. The flag isn't used in the search, and passing it forces the callers to also pass in the flag.
> 
> I understand that this happens after the request to remove the mtNone default value. Is there a way that allows us to skip using mtNone, but still don't have to unnecessarily provide a flag?
> 
> Maybe we could create a helper function `ReservedMemoryRegion rgn = ReservedMemoryRegion::create_find_key(addr, size)`, which sets up a ReserveMemoryRegion with mtNone?

Was this comment from Stefan addressed?

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

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


More information about the shenandoah-dev mailing list