RFR: JDK-8272112: Arena code simplifications
Thomas Stuefe
stuefe at openjdk.java.net
Mon Aug 9 06:43:36 UTC 2021
On Mon, 9 Aug 2021 06:32:19 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> I renamed ChunkPool::allocate() because it does not allocate anymore, it just stores existing chunks.
>>
>> Is it just the naming, or do you also prefer that the old ChunkPool::allocate() actually allocated the Chunks (it called os::malloc)? I found that unnecessary for a pure cache and it duplicated the allocation code in Chunk::operator new().
>
> It's the names that I'm not a fan of. The new implementation is good. And it _is_ allocating, from a free-list. I think it's pretty common for a free-list allocator design to have "failure" leave it to the client to decide what to do, rather than having the fallback built into the free-list allocator.
Okay, I rename it back. Thanks for confirming!
-------------
PR: https://git.openjdk.java.net/jdk/pull/5040
More information about the hotspot-dev
mailing list