Memory

interface Memory

Represents a display of certain memory structure.

Types

Companion
Link copied to clipboard
common
object Companion

Functions

copy
Link copied to clipboard
common
abstract fun copy(): Memory
Creates an independent copy of this memory.
reader
Link copied to clipboard
common
abstract fun reader(): MemoryReader
Gets or creates a reader of this memory.
view
Link copied to clipboard
common
abstract fun view(offset: Int, length: Int): Memory
Get a projection of this memory (it reflects the changes in the parent memory block).
writer
Link copied to clipboard
common
abstract fun writer(): MemoryWriter
Gets or creates a writer of this memory.

Properties

size
Link copied to clipboard
common
abstract val size: Int
The length of this memory in bytes.

Extensions

read
Link copied to clipboard
common
inline fun <R> Memory.read(block: MemoryReader.() -> R): R
Uses the memory for read then releases the reader.
write
Link copied to clipboard
common
inline fun Memory.write(block: MemoryWriter.() -> Unit)
Uses the memory for write then releases the writer.