RFR: 8349146: [REDO] Implement a better allocator for downcalls [v8]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri May 2 11:39:53 UTC 2025
On Fri, 2 May 2025 11:13:27 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> This PR is based on the work of @mernst-github and aims to implement an _internal_ thread-local 'stack' allocator, which works like a dynamically sized arena, but with reset functionality to reset the allocated size back to a certain level. The underlying memory could stay around between calls, which could improve performance.
>>
>> Re-allocated segments are not zeroed between allocations.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Cleanup and only create CleanupAction once per thread
src/java.base/share/classes/jdk/internal/foreign/BufferStack.java line 127:
> 125: arena,
> 126: new SlicingAllocator(arena.allocate(byteSize, byteAlignment)),
> 127: new CleanupAction(arena));
any reason why you didn't use a lambda here?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24829#discussion_r2071487667
More information about the core-libs-dev
mailing list