8242477: (bf) MappedByteBuffer should clarify copying between overlapping mappings

Alan Bateman Alan.Bateman at oracle.com
Mon Apr 13 15:49:25 UTC 2020



On 13/04/2020 16:42, Brian Burkhalter wrote:
>
>> On Apr 11, 2020, at 4:23 AM, Florian Weimer <fw at deneb.enyo.de 
>> <mailto:fw at deneb.enyo.de>> wrote:
>>
>> In principle, this also applies to direct buffer created via JNI's
>> NewDirectByteBuffer.  Such direct buffers could alias with each other
>> or even MappedByteBuffer instances.
>
> Indeed. And in an even simpler case, two different views of the same 
> direct buffer could produce unexpected results with a relative bulk 
> put from one into the other.
>
Yes, it's a good point. Can you check out whether the statement could be 
added to the BB "Direct vs. non-direct buffer" sections.

-Alan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200413/74900140/attachment.htm>


More information about the nio-dev mailing list