RFR: 8354922: ZGC: Use MAP_FIXED_NOREPLACE when reserving memory

Stefan Karlsson stefank at openjdk.org
Tue Apr 22 11:25: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.

Thanks for the reviews. ZGC testing in Tier1-7 on Linux looks good.

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

PR Comment: https://git.openjdk.org/jdk/pull/24716#issuecomment-2821012631


More information about the hotspot-gc-dev mailing list