Memory

Memory region covering a whole given struct.

Properties

Link copied to clipboard
abstract val address: Pointer

Address of the memory region.

Functions

Link copied to clipboard
abstract override fun close()

Frees the memory allocated to the struct. This function is not called if the struct is not owned.

Link copied to clipboard
abstract fun get(offset: Int): Byte

Reads a Byte at the given offset.

Link copied to clipboard
abstract fun getDouble(offset: Int): Double

Reads a Double at the given offset.

Link copied to clipboard
abstract fun getInt(offset: Int): Int

Reads an Int at the given offset.

Link copied to clipboard
abstract fun getLong(offset: Int): Long

Reads a Long at the given offset.

Link copied to clipboard
abstract fun getPointer(offset: Int): Pointer

Reads a Pointer at the given offset.

Link copied to clipboard
abstract fun put(offset: Int, value: Byte)

Writes the value at the given offset.

Link copied to clipboard
abstract fun putDouble(offset: Int, value: Double)

Writes the value at the given offset.

Link copied to clipboard
abstract fun putInt(offset: Int, value: Int)

Writes the value at the given offset.

Link copied to clipboard
abstract fun putLong(offset: Int, value: Long)

Writes the value at the given offset.

Link copied to clipboard
abstract fun putPointer(offset: Int, value: Pointer)

Writes the value at the given offset.