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

Johan Sjölen jsjolen at openjdk.org
Tue Apr 23 13:11:43 UTC 2024


On Tue, 23 Apr 2024 12:20:29 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> We discussed that having flag here, we can use it for checking if the requested flag matches the actual memory flag or not. This check is missed now. 
>> What to do? reverting all the calls up to `os::uncommit_memory()`? and reverting the `ExecMem` param as optional?
>> 
>> Or adding check of flags?
>
> New info:
> I added the check and it always failed, meaning that no uncommit flag matches with commit flag.
> I will remove the mandatory flag from uncommit, but it hides the issue of non-matching commit-uncommit flags.

Keeping the flag argument for `os::uncommit_memory` is important as it is equivalent to `reserve`:ing the memory. This makes future work easier, as we don't have to look at the region to figure out what flag it needs to be reserved as.

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

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


More information about the shenandoah-dev mailing list