[foreign-abi] Integrated: 8248499: Add methods to allocate off heap arrays from Java arrays
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Jul 1 14:37:56 UTC 2020
On Mon, 29 Jun 2020 19:29:08 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This patch adds methods to NativeScope which allow clients to allocate off-heap arrays from Java on-heap arrays.
>
> While in most cases the code for copying is straightforward, we have to take into account endianness mismatches (in
> case the user wants to store the array elements off-heap in an endianness that doesn't match that of the platform).
> To allow for that, I've added a new implementation method in AbstractMemorySegmentImpl, which is the same as
> `copyFrom`, but adds the byte swap (a wrapper around `Unsafe::copySwapMemory`).
This pull request has now been integrated.
Changeset: 56aecf94
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.java.net/panama-foreign/commit/56aecf94
Stats: 382 lines in 3 files changed: 12 ins; 324 del; 46 mod
8248499: Add methods to allocate off heap arrays from Java arrays
Reviewed-by: sundar, jvernee, psandoz, henryjen
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/222
More information about the panama-dev
mailing list