On Wed, 18 Mar 2026 11:27:04 GMT, Harald Eilertsen <[email protected]> wrote:
>> Thanks @bsdkurt for clarifying. That makes sense. Interesting. OpenBSD is >> the first OS I know that includes mmap into RLIMIT_DATA. >> >> Do you know, by chance, if this also includes "uncommitted" mmapped memory >> (as in, allocated with MAP_NORESERVE)? Since we over-allocate quite >> drastically with uncommitted memory. >> >> Wait, I see that neither BSD nor MacOS manpages even mention MAP_NORESERVE. >> But we use it. Now I am confused :-) > >> 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) ------------- PR Review Comment: https://git.openjdk.org/bsd-port/pull/4#discussion_r2952916143
