RFR: 8357847: (ch) WindowsAsynchronousFileChannelImpl should support FFM Buffers
Brian Burkhalter
bpb at openjdk.org
Fri May 30 16:22:51 UTC 2025
On Fri, 30 May 2025 15:54:34 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> We should be able to use a buffer that is a view of memory segment allocated from shared arena, only the confined case should throw UOE.
I ran into this in testing:
public long address() {
MemorySessionImpl session = session();
if (session != null) {
if (session.ownerThread() == null && session.isCloseable()) {
throw new UnsupportedOperationException("ByteBuffer derived from closeable shared sessions not supported");
}
```
in `Direct-X-Buffer.java.template` when using the result of `Arena.ofShared`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25531#issuecomment-2922822498
More information about the nio-dev
mailing list