RFR: 8354115: NMT: VMATree should not accept `uncommit` a `released` region [v4]

Johan Sjölen jsjolen at openjdk.org
Mon Apr 14 12:50:44 UTC 2025


On Fri, 11 Apr 2025 12:45:03 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> At `uncommit` we change the state of the regions to `Reserved`. This is not acceptable to uncommit a  `Released` region and change its state to `Reserved`.
>> This case is detected and an invalid `SummaryDiff` (all its contents are -1) is returned. 
>> 
>> Two test-cases added and run.
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comments applied

Hi,

I don't think that we should introduce an 'error' version of `SummaryDiff` which fills in `-1`s. This is a valid state for `SummaryDiff` to be in.

I  think that the correct strategy when uncommitting over released regions is to do nothing to those regions.

If I do:


tree.commit_mapping(0, 10);
tree.commit_mapping(20, 10);
tree.uncommit_mapping(0, 100);


Then I expect my two committed regions to now be reserved, and everything which was previously released to not have been changed.

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

PR Review: https://git.openjdk.org/jdk/pull/24572#pullrequestreview-2763338233


More information about the hotspot-runtime-dev mailing list