RFR: 8357847: (ch) WindowsAsynchronousFileChannelImpl should support FFM Buffers

Brian Burkhalter bpb at openjdk.org
Fri May 30 15:52:51 UTC 2025


On Fri, 30 May 2025 05:41:05 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> his will need tests to exercise the read/write methods with buffers that a views on memory segments allocated from automatic and shared arenas.

There is already testing on automatic arenas, I believe, and passing in a shared arena resulted in a UOE.

> I think we also need to check that we have tests to ensure that UOE is thrown for thread confined arenas.

I observed this UOE already so that should be simple.

> src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java line 452:
> 
>> 450:                 buf = dst;
>> 451:                 address = ((DirectBuffer)dst).address() + pos;
>> 452:                 IOUtil.acquireScope(dst, true);
> 
> I assume we'll have to change this to use IOUtil.bufferAddress(dst), and after the acquire.

Noted.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25531#issuecomment-2922755683
PR Review Comment: https://git.openjdk.org/jdk/pull/25531#discussion_r2116171482


More information about the nio-dev mailing list