8219014: (bf) Add absolute bulk put methods which accept a source Buffer

Florian Weimer fweimer at redhat.com
Tue Feb 11 17:10:41 UTC 2020


* Paul Sandoz:

> Are referring to some property of virtual memory or how buffers are implemented?
>
> Unsafe.copyMemory detect overlaps, given two addresses
> (double-register base + offset) and length.
>
> Buffers were enhanced to ensure, over all kinds of buffer, consistent
> access using double-register addressing. We could collapse all bulk
> copy operations to leverage Unsafe.copyMemory.

How does this work if you map the same file twice, or if JNI code
creates direct buffers using NewDirectByteBuffer for memory that is
aliased at multiple addresses?

Thanks,
Florian



More information about the nio-dev mailing list