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

Thomas Stuefe stuefe at openjdk.org
Tue Apr 30 06:03:18 UTC 2024


On Tue, 23 Apr 2024 08:54:24 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> src/hotspot/share/memory/metaspace/virtualSpaceNode.cpp line 112:
>> 
>>> 110: 
>>> 111:   // Commit...
>>> 112:   if (os::commit_memory((char*)p, word_size * BytesPerWord, !ExecMem, mtMetaspace) == false) {
>> 
>> Not sure if I suggested something different in my first review, but thinking this over, this is wrong. Please don't hardwire mtMetaspace; take the flag from the ReservedSpace member of VirtualSpaceNode.
>> 
>> The reason is that metaspace can be used for at least two different flags, and may later be expanded for more.
>
> Done.

Where? I still see mtMetaspace.

>> src/hotspot/share/memory/metaspace/virtualSpaceNode.cpp line 191:
>> 
>>> 189: 
>>> 190:   // Uncommit...
>>> 191:   if (os::uncommit_memory((char*)p, word_size * BytesPerWord, !ExecMem, mtMetaspace) == false) {
>> 
>> Same here.
>
> Done.

I still see mtMetaspace.

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

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


More information about the shenandoah-dev mailing list