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:18:13 UTC 2024
On Tue, 30 Apr 2024 05:46:45 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/cds/metaspaceShared.cpp line 1322:
>
>> 1320: os::vm_page_size(), mtClassShared, (char*)base_address);
>> 1321: class_space_rs = ReservedSpace(class_space_size, class_space_alignment,
>> 1322: os::vm_page_size(), mtClass, (char*)ccs_base);
>
> Note that here, we place two spaces atop of a region that has been previously mapped with mtClass (see e.g. src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp). I assume this is not a problem?
It should not be a problem. This PR does not change the functionalities at all. Only the MEMFLAGS is passed down to be given to `MemTracker` API.
If the above code worked before this PR, it should still work now.
For NMT point of view, reserving `mtClassShared` and `mtJavaHeap` regions are accepted to overlap with previously reserved regions. Ans, if a whole region is re-reserved but with a different flag, it is also acceptable and just the accountings are moved from former flag to the new one.
I trust in that all the NMT tests passed where checked these cases.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18745#discussion_r1584424486
More information about the shenandoah-dev
mailing list