RFR: 8263476: Use reserved memory for stack guard pages [v2]

Thomas Stuefe stuefe at openjdk.org
Fri Aug 8 15:20:14 UTC 2025


On Mon, 4 Aug 2025 14:29:46 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> src/hotspot/os/bsd/os_bsd.inline.hpp line 44:
>> 
>>> 42:   assert(uses_stack_guard_pages(), "sanity check");
>>> 43:   return false;
>>> 44: }
>> 
>> I'm missing why it's OK to remove this.
>
> Previously, we require stack-guard-pages to be committed, and mmap MAP_STACK does "lazy" commit, so we have to perform commit explicitly. Now, we switch to reserve-only stack-guard-pages, so no explicit commit is needed.

Have you tested that on FreeBSD?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26571#discussion_r2263259099


More information about the hotspot-runtime-dev mailing list