< prev index next >

src/java.base/share/classes/java/nio/MappedByteBuffer.java

Print this page
rev 57242 : imported patch 8234049.patch

@@ -26,10 +26,12 @@
 package java.nio;
 
 import java.io.FileDescriptor;
 import java.lang.ref.Reference;
 import java.util.Objects;
+
+import jdk.internal.access.foreign.MemorySegmentProxy;
 import jdk.internal.misc.Unsafe;
 
 
 /**
  * A direct byte buffer whose content is a memory-mapped region of a file.

@@ -86,25 +88,25 @@
     private final boolean isSync;
 
     // This should only be invoked by the DirectByteBuffer constructors
     //
     MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private
-                     FileDescriptor fd, boolean isSync) {
-        super(mark, pos, lim, cap);
+                     FileDescriptor fd, boolean isSync, MemorySegmentProxy segment) {
+        super(mark, pos, lim, cap, segment);
         this.fd = fd;
         this.isSync = isSync;
     }
 
     MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private
-                     boolean isSync) {
-        super(mark, pos, lim, cap);
+                     boolean isSync, MemorySegmentProxy segment) {
+        super(mark, pos, lim, cap, segment);
         this.fd = null;
         this.isSync = isSync;
     }
 
-    MappedByteBuffer(int mark, int pos, int lim, int cap) { // package-private
-        super(mark, pos, lim, cap);
+    MappedByteBuffer(int mark, int pos, int lim, int cap, MemorySegmentProxy segment) { // package-private
+        super(mark, pos, lim, cap, segment);
         this.fd = null;
         this.isSync = false;
     }
 
     // Returns the distance (in bytes) of the buffer start from the
< prev index next >