Memory

fun Memory(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.


fun Memory(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.


fun Memory(view: DataView): Memory

Create memory form buffer.

inline fun Memory(pointer: CPointer<*>, size: size_t): Memory
inline fun Memory(pointer: CPointer<*>, size: Int): Memory
inline fun Memory(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.


fun Memory(pointer: CPointer<ByteVar>, size: Long): Memory

Create memory instance from the pointer with specified size.