RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS
Henry Jen
henryjen at openjdk.java.net
Thu Jun 3 21:32:58 UTC 2021
On Mon, 31 May 2021 20:23:53 GMT, Vladimir Kempik <vkempik at openjdk.org> wrote:
>> src/java.base/macosx/native/libjli/java_md_macosx.m line 727:
>>
>>> 725:
>>> 726: static size_t alignUp(size_t stack_size) {
>>> 727: long page_size = sysconf(_SC_PAGESIZE);
>>
>> In hotspot we use `getpagesize()`. There is also a guard for a very large stack (within a page of SIZE_MAX) so that rounding up does not produce zero.
>
> sounds like that (getpagesize) should work with m1 mac as well, as they have 16k pages. will it ?
sysconf is the portable way based on POSIX, we can use getpagesize give this is macOS specific code, which is BSD based.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4256
More information about the core-libs-dev
mailing list