RFR: 8335091: NMT: VMATree reserve_mapping and commit_mapping APIs need MEMFLAGS while un/-committing API has no MEMFLAGS arg [v3]
Afshin Zafari
azafari at openjdk.org
Sun Jul 28 19:45:30 UTC 2024
On Sun, 28 Jul 2024 08:23:14 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
> One thing that worries me a bit is the fact that we take the `leq` value without checking if it's equal to the `A` address. This means that if we only have a range 0-100 with mtTest and I reserve with `copy_flag` at 1000-1100, then that range will receive `mtTest`. That's a bit spooky. Perhaps the `copy_flag` should only be used if there's a range starting at exactly that address? That seems less surprising to me.
You are right with this point, but it happens now at call to `uncommit_mapping` where the `copy_flag` is true. `reserve_mapping` always uses `false` for the `copy_flag`. Is this correct if we `assert` that the `leq` is `Committed` or `Reserved`? Is this also correct for commit and `copy_flag`?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20330#issuecomment-2254624098
More information about the hotspot-runtime-dev
mailing list