RFR: 8354922: ZGC: Use MAP_FIXED_NOREPLACE when reserving memory

Axel Boldt-Christmas aboldtch at openjdk.org
Tue Apr 22 06:22:59 UTC 2025


On Thu, 17 Apr 2025 08:30:27 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> We have seen that some versions of the Linux kernel does not honor the address hint when mmapping memory without MAP_FIXED, if there is an adjacent memory area above the requested memory area. If we use MAP_FIXED_NOREPLACE, the reservation succeeds. I propose that we start using MAP_FIXED_NOREPLACE.
> 
> Tested via GHA, which runs the gtest that performs a discontiguous, but adjacent reservation. I will run this through a bunch of tiers before integrating.

lgtm.

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

Marked as reviewed by aboldtch (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24716#pullrequestreview-2782878664


More information about the hotspot-gc-dev mailing list