Companion

expect object Companion
actual object Companion
actual object Companion
actual object Companion

Properties

Link copied to clipboard
expect val Empty: Memory

Represents an empty memory region

actual val Empty: Memory

Represents an empty memory region

actual val Empty: Memory
actual val Empty: Memory

Extensions

Link copied to clipboard
fun Memory.Companion.of(array: ByteArray, offset: Int = 0, length: Int = array.size - offset): Memory

Create Memory view for the specified array range starting at offset and the specified bytes length.

fun Memory.Companion.of(buffer: ArrayBuffer, offset: Int = 0, length: Int = buffer.byteLength - offset): Memory

Create Memory view for the specified buffer range starting at offset and the specified bytes length.

Create Memory view for the specified view.

fun Memory.Companion.of(view: ArrayBufferView, offset: Int = 0, length: Int = view.byteLength): Memory

Create Memory view for the specified view range starting at offset and the specified bytes length.

inline fun Memory.Companion.of(array: ByteArray, offset: Int = 0, length: Int = array.size - offset): Memory

Create Memory view for the specified array range starting at offset and the specified bytes length.

inline fun Memory.Companion.of(buffer: ByteBuffer): Memory

Create Memory view for the specified buffer range starting at ByteBuffer.position and ending at ByteBuffer.limit. Changing the original buffer's position/limit will not affect previously created Memory instances.

inline fun Memory.Companion.of(pointer: CPointer<*>, size: size_t): Memory
inline fun Memory.Companion.of(pointer: CPointer<*>, size: Int): Memory
inline fun Memory.Companion.of(pointer: CPointer<*>, size: Long): Memory

Create an instance of Memory view for memory region starting at the specified pointer and having the specified size in bytes.