RFR: 8312132: Add tracking of multiple address spaces in NMT [v54]

Johan Sjölen jsjolen at openjdk.org
Tue Apr 30 10:27:14 UTC 2024


On Mon, 29 Apr 2024 20:34:24 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>I'm probably missing something here

Yes :P.

Consider this pseudo-code:


Tree := MakeTree([0 Reserved mtTest 1024), [1024 Committed mtNMT 2048))

Diff := Tree.Reserve(0, 2048, mtCompiler);

Tree is now [0 Reserved mtCompiler 2048)
What is the Diff?

Answer:

Diff is {mtCompiler : {Reserved: +2048, Committed: 0},
            mtNMT   : {Reserved: -1024, Committed: -1024},
            mtTest  : {Reserved: -1024, Committed: 0 } } 


So, the diff indicates every flag that has changed and by how much.

Now, in this case we know we only need to care about the reserved diff (we only `reserve` when allocating memory in `MemoryFileTracker`).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1584536356


More information about the hotspot-dev mailing list