RFR: 8344882: (bf) Temporary direct buffers should not count against the upper limit on direct buffer memory
Alan Bateman
alanb at openjdk.org
Sat Nov 23 18:34:14 UTC 2024
On Fri, 22 Nov 2024 23:44:11 GMT, Brian Burkhalter <bpb at 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
More information about the core-libs-dev
mailing list