8243491: Implementation of Foreign-Memory Access API (Second Incubator)

Upstream latest changes of the Foreign-Memory Access API

Co-authored-by: Jorn Vernee <jorn.vernee@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Reviewed-by: chegar, psandoz
This commit is contained in:
Chris Hegarty 2020-05-25 10:54:39 +01:00 committed by Maurizio Cimadamore
parent 9b94b9d1a1
commit f3eb44a94d
94 changed files with 7496 additions and 1388 deletions

View file

@ -892,6 +892,11 @@ public class FileChannelImpl
return address;
}
@Override
public FileDescriptor fileDescriptor() {
return fd;
}
@Override
public void run() {
unmap();
@ -945,6 +950,10 @@ public class FileChannelImpl
totalCapacity -= cap;
}
}
public boolean isSync() {
return false;
}
}
private static class SyncUnmapper extends Unmapper {
@ -974,6 +983,10 @@ public class FileChannelImpl
totalCapacity -= cap;
}
}
public boolean isSync() {
return true;
}
}
private static void unmap(MappedByteBuffer bb) {