RFR: 8316156: (ch) Channels.newOutputStream(ch).write(bigByteArray) allocates a lot of direct memory [v3]
Brian Burkhalter
bpb at openjdk.org
Thu Sep 14 19:38:42 UTC 2023
On Thu, 14 Sep 2023 19:32:17 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8316156: Convert test to JUnit 5 and separate read/write testing
>
> src/java.base/share/classes/sun/nio/ch/ChannelInputStream.java line 84:
>
>> 82: rem -=n;
>> 83: }
>> 84: return nread;
>
> This still looks like a "read fully", I don't think we should have a loop here.
So only `Streams.DEFAULT_BUFFER_SIZE` bytes are read per call?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15733#discussion_r1326433116
More information about the nio-dev
mailing list