JvmMappedMemoryChunk

JVM implementation of MappedMemoryChunk using FileChannel.map.

The mapped region is read-only and backed by the OS virtual memory subsystem. Pages are loaded on demand and evicted under memory pressure, so arbitrarily large regions can be mapped without consuming heap.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val fileOffset: Long

The byte offset within the file where the mapping starts.

Link copied to clipboard
open override val path: String

The file path this chunk is mapped from.

Link copied to clipboard
open override val size: Long

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun readByte(offset: Long): Byte
Link copied to clipboard
open override fun readBytes(offset: Long, length: Int): ByteArray
Link copied to clipboard
open override fun slice(offset: Long, length: Long): MemoryChunk