RFR: 8371718: (sc) Channels.new{Input, Output}Stream can allocate unbounded memory for a socket channel [v3]
Brian Burkhalter
bpb at openjdk.org
Tue Dec 9 16:33:34 UTC 2025
On Tue, 9 Dec 2025 08:01:47 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> Setting the limit twice per iteration is a bit confusing
I actually made this change locally but decided against it. I'll take a second look.
> I think better to use Streams.MAX_BUFFER_SIZE in the two methods rather than static import.
I agree and had also thought to make this change.
> It would be okay for NioSocketImpl to use this.
Will change.
> I don't think this test is useful as there are a lot of tests here that do this.
It was intended to verify loops in an alternative implementation I wrote last week so can be reverted I think.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28705#discussion_r2603411172
PR Review Comment: https://git.openjdk.org/jdk/pull/28705#discussion_r2603408573
PR Review Comment: https://git.openjdk.org/jdk/pull/28705#discussion_r2603416204
PR Review Comment: https://git.openjdk.org/jdk/pull/28705#discussion_r2603414659
More information about the nio-dev
mailing list