On Fri, 22 Nov 2024 23:44:11 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

> Make the memory used by internal temporary direct buffers not count towards 
> the upper limit on direct buffer memory.

While you are there, can you also look into not creating a Cleaner for the 
temporary direct buffers? They are explicitly deallocated when they can't be 
returned to the TL cache or when the thread terminates (there is a hook in 
thread exit for this).

Also, on the surface it might look we could use a thread confined Arena and 
allocate MemorySegments and get a BB view but these temporary buffers are 
actually carrier local when there are virtual threads mounted.

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

PR Comment: https://git.openjdk.org/jdk/pull/22339#issuecomment-2495590190

Reply via email to