8219014: (bf) Add absolute bulk put methods which accept a source Buffer
Paul Sandoz
paul.sandoz at oracle.com
Tue Feb 11 17:15:23 UTC 2020
Thanks for the clarification. I see what you are getting at now.
Yes, under those aliased circumstances there is not much we can do. All we can talk about is overlapping regions in virtual memory.
Paul.
> On Feb 11, 2020, at 9:10 AM, Florian Weimer <fweimer at redhat.com> wrote:
>
> * 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