UnmapperProxy object. This object provides detailed information about the
memory mapped segment, such as the file descriptor associated with the mapping. This information is crucial
in order to correctly reconstruct a byte buffer object from the segment (see makeByteBuffer()).
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final ScopedMemoryAccess | |
| private final UnmapperProxy |
| Access | Constructor and Description |
|---|---|
| public | MappedMemorySegmentImpl(long min, UnmapperProxy unmapper, long length, boolean readOnly, MemorySessionImpl scope)
|
| Modifier and Type | Method and Description |
|---|---|
| public MappedMemorySegmentImpl | asSlice(long offset, long newSize)
Overrides jdk. Implements java. Returns a slice of this memory segment, at the given offset. |
| pack-priv MappedMemorySegmentImpl | dup(long offset, long size, boolean readOnly, MemorySessionImpl scope)
Overrides jdk.
|
| public void | force()
Overrides jdk. Implements java. Forces any changes made to the contents of this mapped segment to be written to the storage device described by the mapped segment's file descriptor. |
| public boolean | isLoaded()
Overrides jdk. Implements java. Determines whether all the contents of this mapped segment are resident in physical memory. |
| public boolean | isMapped()
Overrides jdk. Implements java. Returns |
| public void | load()
Overrides jdk. Implements java. Loads the contents of this mapped segment into physical memory. |
| pack-priv ByteBuffer | |
| public void | unload()
Overrides jdk. Implements java. Unloads the contents of this mapped segment from physical memory. |
| SCOPED_MEMORY_ACCESS | back to summary |
|---|---|
| pack-priv static final ScopedMemoryAccess SCOPED_MEMORY_ACCESS | |
| unmapper | back to summary |
|---|---|
| private final UnmapperProxy unmapper | |
| MappedMemorySegmentImpl | back to summary |
|---|---|
| public MappedMemorySegmentImpl(long min, UnmapperProxy unmapper, long length, boolean readOnly, MemorySessionImpl scope) | |
| asSlice | back to summary |
|---|---|
| public MappedMemorySegmentImpl asSlice(long offset, long newSize) Overrides jdk. Implements java. Doc from java. Returns a slice of this memory segment, at the given offset. The returned segment's address is the address of this segment plus the given offset; its size is specified by the given argument. Equivalent to the following code: asSlice(offset, newSize, 1); If this segment is read-only, the returned segment is also read-only. The returned memory segment shares a region of backing memory with this segment. Hence, no memory will be allocated or freed by this method.
| |
| dup | back to summary |
|---|---|
| pack-priv MappedMemorySegmentImpl dup(long offset, long size, boolean readOnly, MemorySessionImpl scope) Overrides jdk.
| |
| force | back to summary |
|---|---|
| public void force() Overrides jdk. Implements java. Doc from java. Forces any changes made to the contents of this mapped segment to be written to the storage device described by the mapped segment's file descriptor. If the file descriptor associated with this mapped segment resides on a local storage device then when this method returns it is guaranteed that all changes made to this segment since it was created, or since this method was last invoked, will have been written to that device. If the file descriptor associated with this mapped segment does not reside on a local device then no such guarantee is made.
If this segment was not mapped in read/write mode
( | |
| isLoaded | back to summary |
|---|---|
| public boolean isLoaded() Overrides jdk. Implements java. Doc from java. Determines whether all the contents of this mapped segment are resident in physical memory. A return value of The returned value is a hint, rather than a guarantee, because the underlying operating system may have paged out some of this segment's data by the time that an invocation of this method returns. | |
| isMapped | back to summary |
|---|---|
| public boolean isMapped() Overrides jdk. Implements java. Doc from java. Returns
| |
| load | back to summary |
|---|---|
| public void load() Overrides jdk. Implements java. Doc from java. Loads the contents of this mapped segment into physical memory. This method makes a best effort to ensure that, when it returns, the contents of this segment are resident in physical memory. Invoking this method may cause some number of page faults and I/O operations to occur. | |
| makeByteBuffer | back to summary |
|---|---|
| pack-priv ByteBuffer makeByteBuffer() Overrides jdk.
| |
| unload | back to summary |
|---|---|
| public void unload() Overrides jdk. Implements java. Doc from java. Unloads the contents of this mapped segment from physical memory. This method makes a best effort to ensure that the contents of this segment are no longer resident in physical memory. Accessing this segment's contents after invoking this method may cause some number of page faults and I/O operations to occur (as this segment's contents might need to be paged back in). | |