RFR: 8337217: Port VirtualMemoryTracker to use VMATree
Johan Sjölen
jsjolen at openjdk.org
Fri Nov 8 10:52:05 UTC 2024
On Mon, 5 Aug 2024 16:50:00 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> The bool argument is just passed along.
>>
>> ```c++
>> RegionsTree(bool with_storage) : VMATree(), _ncs_storage(with_storage) {
>> }
>
> Done.
> For my curiosity, what is the advantage?
1. No malloc
2. No indirection, so no cache misses
3. A clear lifetime and clear ownership, both are bound to the `RegionsTree` object
>> Then just invert it: Have the outer class be static and the inner class be an instance. We can change the `MemoryFileTracker` to be that, as it's not as large of a change.
>
> It is still a big change. Why not another RFE?
Because we want to switch to a new way of exposing the public interface, as opposed to an under-the-hood optimization. This PR is still in draft and we're far away from next RDP1, we're not in a hurry and can afford to get this right. I do not want to repeat the same mistakes of the old codebase.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1711099968
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1711190300
More information about the core-libs-dev
mailing list