-
Enhancement
-
Resolution: Unresolved
-
P3
-
repo-panama
Downcalls might need to perform some allocation. Currently this is done by using a fixed-size native arena.
But, the call to allocate this arena is relatively expensive compared to the overhead of a call, and it requires tricky arena size computations due to the need to align allocations, which also restricts the order in which allocations can occur.
We could instead implement a thread-local 'stack' allocator, which works like a dynamic 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.
But, the call to allocate this arena is relatively expensive compared to the overhead of a call, and it requires tricky arena size computations due to the need to align allocations, which also restricts the order in which allocations can occur.
We could instead implement a thread-local 'stack' allocator, which works like a dynamic 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.
- clones
-
JDK-8287788 Implement a better allocator for downcalls
-
- Closed
-