RFR: 8354922: ZGC: Use MAP_FIXED_NOREPLACE when reserving memory

Erik Österlund eosterlund at openjdk.org
Tue Apr 22 06:40:40 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.

Looks good.

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

Marked as reviewed by eosterlund (Reviewer).

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


More information about the hotspot-gc-dev mailing list