Integrated: 8311648: Refactor the Arena/Chunk/ChunkPool interface

Johan Sjölen jsjolen at openjdk.org
Fri Aug 11 09:49:30 UTC 2023


On Fri, 7 Jul 2023 12:05:54 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: 62adeb08
Author:    Johan Sjölen <jsjolen at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/62adeb08c34ea199d19cf98c7f03e937d8cfa9ad
Stats:     141 lines in 5 files changed: 43 ins; 41 del; 57 mod

8311648: Refactor the Arena/Chunk/ChunkPool interface

Reviewed-by: stuefe, coleenp

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

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


More information about the hotspot-runtime-dev mailing list