RFR: JDK-8294266: Add a way to pre-touch java thread stacks
Andrew Haley
aph at openjdk.org
Mon Nov 28 11:51:35 UTC 2022
On Sun, 13 Nov 2022 20:52:17 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> > Drive-by comment: there is `os::pretouch_memory(void* start, void* end, size_t page_size)` ;)
>
> Good point. Had to cast the volatile away though.
Be careful with that. On some OSes, touching more than N pages below the currently lowest-mapped stack page will segfault. Therefore you must touch from the top down.
-------------
PR: https://git.openjdk.org/jdk/pull/10403
More information about the hotspot-dev
mailing list