RFR: 8337217: Port VirtualMemoryTracker to use VMATree

Afshin Zafari azafari at openjdk.org
Fri Nov 8 10:52:08 UTC 2024


On Fri, 9 Aug 2024 10:03:52 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> The main purpose of the `if (...)` cases is to find if the request to apply the delta is valid or not. There are related assertions in VirtualMemory but not so informative. Also, using `log_debug` lets the build proceed and just show the messages.
>> These messages help a lot when something goes wrong in terms of commit/uncommit/release failure.
>
> How does my example code not account for this? You can still get rid of the sign checking.

Case of 'commit' error is missing from your suggestion. At commit time, ` c > reserved` is invalid too.
`(size_t)-r` for positive `r` is a large number and is greater than `reserved`. 
We have to find out the intent of the call first (by checking the sign of `r` or `c`) and then check if it is valid or not.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1713513436


More information about the core-libs-dev mailing list