RFR: 8311648: Refactor the Arena/Chunk/ChunkPool interface [v7]

Johan Sjölen jsjolen at openjdk.org
Mon Aug 7 19:27:49 UTC 2023


> Hi,
> 
> This PR refactors the Arena code without introducing any changes in behavior. I believe that this leads to a much clearer API and that this will in turn simplify the maintenance of this code. `Chunk` is now much more "dumb", mainly acting as a way of interrogating the chunk of data that it is holding. The `ChunkPool` gains a more prominent role, being entirely responsible for the memory allocation strategy used. `Arena` is basically unchanged, as it orchestrates the usage of these two APIs. The `chop` and `next_chop` methods are re-defined to be static inside of `Chunk`, having an object `delete` itself  is very surprising, so I'm happy to get rid of that.
> 
> I hope that you agree with me on these changes!
> 
> Cheers,
> Johan

Johan Sjölen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits:

 - Merge remote-tracking branch 'origin/master' into rework-arena
 - Merge remote-tracking branch 'origin/master' into rework-arena
 - Found the bug!
 - Is it just a missing include?
 - Separate assignment
 - Accidentally deleted a constructor
 - Make Chunk NONCOPYABLE
 - Fix style issues
 - Dleete chunks
 - Merge remote-tracking branch 'origin/master' into rework-arena
 - ... and 11 more: https://git.openjdk.org/jdk/compare/c1f4595e...c688bb55

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

Changes: https://git.openjdk.org/jdk/pull/14803/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14803&range=06
  Stats: 140 lines in 5 files changed: 43 ins; 43 del; 54 mod
  Patch: https://git.openjdk.org/jdk/pull/14803.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14803/head:pull/14803

PR: https://git.openjdk.org/jdk/pull/14803


More information about the hotspot-runtime-dev mailing list