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

Brian Burkhalter brian.burkhalter at oracle.com
Thu Mar 26 15:49:27 UTC 2020


Resuscitating the thread [1] concerning [2]. An updated version of the proposed patch is [3]. This differs from the previous version in that it permits the source and destination buffers to share the same backing storage. Hopefully I have implemented this correctly (it is assumed that System.arraycopy() [4] and Unsafe copying handle overlapping copies as documented for the new methods $Type$Buffer put​(int, $Type$Buffer, int, int) {}).

It is intentional that the relative bulk methods are not implemented using their absolute counterparts. If we want to make that change I submit that it would be cleaner to do so under a separate, subsequent issue.

Also, I am aware that there are still some debugging print statements in the code and a CSR will be required to proceed.

Thanks,

Brian

> On Feb 27, 2020, at 4:58 AM, Florian Weimer <fweimer at redhat.com> wrote:
> 
>> I’ll let Brian decide on that from the perspective of Buffers, given
>> IIRC it does not mention anything about overlapping regions.

[1] http://mail.openjdk.java.net/pipermail/nio-dev/2020-February/007093.html
[2] https://bugs.openjdk.java.net/browse/JDK-8219014
[3] http://cr.openjdk.java.net/~bpb/8219014/webrev.01/
[4] https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/lang/System.html#arraycopy(java.lang.Object,int,java.lang.Object,int,int)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200326/9cfb6869/attachment.htm>


More information about the nio-dev mailing list