RFR: 8287788: Implement a better allocator for downcalls [v8]

Matthias Ernst duke at openjdk.org
Thu Jan 23 15:23:50 UTC 2025


On Thu, 23 Jan 2025 15:14:30 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> A simpler (maybe interim) solution: if the requesting thread is not virtual, use the cache (and use a confined arena). Otherwise use a brand new confined arena.
>
> Yet another option would be to use a confined or shared arena depending on the requesting thread. Which means the terminating thread local would _sometimes_ close the arena, sometimes it will leave it to the GC.

I'm losing track of what the issue is. I think ofAuto should work just fine, you're unlikely to cycle so hard through Carrier threads that GC pressure through 256byte allocs will become an issue. If we absolutely want to stay out of `auto` territory then a pair of Unsafe.alloc/free to allocate the stack seems the easier choice than distinguishing by thread-type.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23142#discussion_r1927162259


More information about the core-libs-dev mailing list