RFR: 8344882: (bf) Temporary direct buffers should not count against the upper limit on direct buffer memory [v2]
Alan Bateman
alanb at openjdk.org
Mon Nov 25 19:09:16 UTC 2024
On Mon, 25 Nov 2024 18:51:48 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.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8344882: Do not create Cleaner for temporary buffers
src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 77:
> 75: static final boolean UNALIGNED = Bits.unaligned();
> 76:
> 77: private @Stable boolean temporary; // defaults to false
Is this used now?
src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java line 73:
> 71: * Used by {@code sun.nio.ch.Util}.
> 72: */
> 73: ByteBuffer allocateDirectTemporary(int cap);
In Util, the phrase used is "temporary buffer and the methods are named like getTemporaryDirectBuffer. The SharedSecrets transposes the words, don't know if that was intended or not.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22339#discussion_r1857208729
PR Review Comment: https://git.openjdk.org/jdk/pull/22339#discussion_r1857210986
More information about the core-libs-dev
mailing list