8254162: Implementation of Foreign-Memory Access API (Third Incubator)

Reviewed-by: erikj, psandoz, alanb
This commit is contained in:
Maurizio Cimadamore 2020-11-12 16:37:23 +00:00
parent c6ab0fdb15
commit 3e70aac5cc
82 changed files with 6038 additions and 2837 deletions

View file

@ -1045,11 +1045,9 @@ public abstract class $Type$Buffer
if (this.order() == src.order()) {
#end[!byte]
try {
UNSAFE.copyMemory(srcBase,
srcAddr,
base,
addr,
len);
SCOPED_MEMORY_ACCESS.copyMemory(
scope(), src.scope(), srcBase,
srcAddr, base, addr, len);
} finally {
Reference.reachabilityFence(src);
Reference.reachabilityFence(this);
@ -1057,12 +1055,9 @@ public abstract class $Type$Buffer
#if[!byte]
} else {
try {
UNSAFE.copySwapMemory(srcBase,
srcAddr,
base,
addr,
len,
(long)1 << $LG_BYTES_PER_VALUE$);
SCOPED_MEMORY_ACCESS.copySwapMemory(
scope(), src.scope(), srcBase,
srcAddr, base, addr, len, (long)1 << $LG_BYTES_PER_VALUE$);
} finally {
Reference.reachabilityFence(src);
Reference.reachabilityFence(this);