On Mon, 31 May 2021 20:23:53 GMT, Vladimir Kempik <vkem...@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

Reply via email to