RFR: 8335091: NMT: VMATree reserve_mapping and commit_mapping APIs need MEMFLAGS while un/-committing API has no MEMFLAGS arg [v3]

Thomas Stuefe stuefe at openjdk.org
Mon Jul 29 05:55:36 UTC 2024


On Sun, 28 Jul 2024 08:19:50 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Here in this test, I used a different flag to verify that the new flag is not used for the new nodes of the tree. This is testing even if a flag is given but the arg is true, it will be ignored.
>
>> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20330#discussion_r1694604850


More information about the hotspot-runtime-dev mailing list