RFR: 8263476: Use reserved memory for stack guard pages [v3]
Zhengyu Gu
zgu at openjdk.org
Fri Aug 8 16:57:12 UTC 2025
On Wed, 6 Aug 2025 20:28:49 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> > Current create_stack_guard_pages() implementation calls os::commit_memory(addr, size, !ExecMem) to setup the protection.
>
> Which `create_stack_guard_pages` are you referring to, in `StackOverflow` or `os`?
>
> `StackOverflow::create_stack_guard_pages` invokes `os::create_stack_guard_pages` for some preparation work (optional for some platforms) and `os::guard_memory` for protection setup.
>
> `os::commit_memory` is not directly related to memory protection.
Ah, okay. I believe I wanted to get rid of this `commit_memory` call which has the undesirable side-effort to NMT.
BTW, do you need the `reserve_memory()`, are the guard pages already reserved as part of stack?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26571#discussion_r2263555660
More information about the hotspot-runtime-dev
mailing list