RFR: 8335091: NMT: VMATree reserve_mapping and commit_mapping APIs need MEMFLAGS while un/-committing API has no MEMFLAGS arg [v3]
Gerard Ziemski
gziemski at openjdk.org
Tue Sep 3 16:50:25 UTC 2024
On Mon, 29 Jul 2024 05:52:48 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>>> When does this happen, that we reserve an overlapping region with a different NMT flag?
>>
>> Uncommitting is essentially the same as reserving. We don't do this in the codebase right now, because that'd make NMT crash, but there's nothing weird about the pattern itself.
>
> Reserving over already reserved memory would replace the old mapping and thus destroy the old content (as does committing, btw). So, this is rather rare. When its not an error, it is done to e.g. change mapping properties before starting to use the mapping.
OK thank you, just wanted to make sure that this usage is what we want and allow. I initially thought we would not want that and have some assert checking for it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20330#discussion_r1742351274
More information about the hotspot-runtime-dev
mailing list