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

Johan Sjölen jsjolen at openjdk.org
Wed Aug 9 12:20:08 UTC 2023


On Wed, 9 Aug 2023 07:14:56 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>Ah, I think I get it. I believe the real error is that when adding a chunk to the end of the Arena linked list, old code did not NULL-terminate the list since it relied on the Chunk being freshly initialized. IMHO, a slightly more robust and standard solution would be to explicitly NULL-terminate the list on add.

I think mentioning that `allocate_chunk` returns an initialized and null-terminated Chunk of requested size is sufficient. Explicitly null-terminating each time a `Chunk` is 'allocated' would require remembering that `Chunk`s may not be fresh.

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

PR Comment: https://git.openjdk.org/jdk/pull/14803#issuecomment-1671195619


More information about the hotspot-runtime-dev mailing list