RFR: 8330076: [NMT] add/make a mandatory MEMFLAGS argument to family of os::reserve/commit/uncommit memory API [v7]
Afshin Zafari
azafari at openjdk.org
Tue Apr 30 09:04:19 UTC 2024
On Tue, 30 Apr 2024 05:38:53 GMT, Thomas Stuefe <stuefe 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/memory/virtualspace.cpp line 623:
>
>> 621: }
>> 622: // _nmt_flag is used internally by initialize_compressed_heap
>> 623: _nmt_flag = mtJavaHeap;
>
> Nit, we use a mixture of directly accessing _nmt_flag and accessing it via getter. Hotspot seems to prefer getters/setters. Can we use setters here?
The flag is not set/changed in other classes, so there is no need to have a `public set_nmt_flag()` member for it.
All the changes to the flag can be done internally using the member directly.
P.S.: There was already a setter but removed after a review comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18745#discussion_r1584399496
More information about the shenandoah-dev
mailing list