On Wed, 18 Mar 2026 11:56:01 GMT, Antonio Vieiro <[email protected]> wrote:
>>> Wait, I see that neither BSD nor MacOS manpages even mention MAP_NORESERVE. >>> But we use it. Now I am confused :-) >> >> We define it to 0 if undefined: >> https://github.com/battleblow/jdk/blob/bsd-port/src/hotspot/os/bsd/os_bsd.cpp#L160 >> >> MAP_NORESERVE does not seem to be defined by Posix. We could perhaps use >> MAP_NOSYNC on FreeBSD, if I get this right. I don't see anything similar for >> OpenBSD, however. > > Looks like `MAP_NORESERVE` was removed from FreeBSD ages ago... > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193961 (commit > https://svnweb.freebsd.org/ports?view=revision&revision=374392) Just as a note, we probably might want to revise os::commit_memory and os::uncommit_memory then, since they use MAP_NORESERVE. Are they just noops now, and memory is committed on touch like on AIX? This does not affect the current PR in any way. Just idle chatter that probably should happen somewhere else. ------------- PR Review Comment: https://git.openjdk.org/bsd-port/pull/4#discussion_r2953834518
