RFR: 8344882: (bf) Temporary direct buffers should not count against the upper limit on direct buffer memory
Brian Burkhalter
bpb at openjdk.org
Mon Nov 25 17:24:19 UTC 2024
On Sat, 23 Nov 2024 18:31:11 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> 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).
At present the explicit deallocation uses the cleaner:
private static void free(ByteBuffer buf) {
((DirectBuffer)buf).cleaner().clean();
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22339#issuecomment-2498608413
More information about the core-libs-dev
mailing list