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

Thomas Stuefe stuefe at openjdk.org
Fri May 24 10:17:05 UTC 2024


On Fri, 24 May 2024 09:20:13 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> src/hotspot/share/cds/metaspaceShared.cpp line 1341:
>> 
>>> 1339:   } else {
>>> 1340:     if (use_archive_base_addr && base_address != nullptr) {
>>> 1341:       total_space_rs = ReservedSpace(total_range_size, archive_space_alignment,
>> 
>> Can you explain why you changed this?
>> 
>> It's also interesting that after this change we only use `base_address_alignment` in asserts. I think this indicates that something should be cleaned up / fixed here.
>
> That comes after merge with mainline.
> I trusted the tests in tiers 1-5 for the correctness of this change.

No, I think this is wrong. I changed it with https://github.com/openjdk/jdk/pull/19152.

Please be careful, this part is rather tricky, and a lot of thought went into this. And I am pretty sure we don't cover all possible code paths in tests.

Please also note that I am working on adding no-access zones for the Klass Encoding range (see https://github.com/openjdk/jdk/pull/19290), which may impact these regions too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19343#discussion_r1613191595


More information about the shenandoah-dev mailing list