[jdk11u-dev] RFR: 8234930: Use MAP_JIT when allocating pages for code cache on macOS [v4]
Vladimir Kempik
vkempik at openjdk.java.net
Thu Dec 9 10:47:06 UTC 2021
On Wed, 8 Dec 2021 17:27:06 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Vladimir Kempik has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Make virtualspace usage under macroses
>
> src/hotspot/os/bsd/os_bsd.cpp line 2010:
>
>> 2008: bool os::pd_commit_memory(char* addr, size_t size, bool exec) {
>> 2009: int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
>> 2010: #if defined(__OpenBSD__)
>
> Unnecessary change, lets keep the patch minimal
this is needed to have #elif defined(__APPLE__) later
> src/hotspot/os/bsd/os_bsd.cpp line 2016:
>
>> 2014: return true;
>> 2015: }
>> 2016: #elif defined(__APPLE__)
>
> I'm confused here. We reserve with MAP_NORESERVE, then, on commit, just mprotect? Will that remove the MAP_NORESERVE flag?
>
> Why not do mprotect only if exec=true (which we treat here synonymous for "is code cache area")?
that's leftovers, I will make this section to be same as in upstream, like https://github.com/openjdk/jdk11u-dev/pull/580/files#diff-1f93205c2e57bee432f8fb7a0725ba1dfdbe5b901ac63010ea0b43922e34ac12
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/710
More information about the jdk-updates-dev
mailing list