slice

expect fun Memory.slice(offset: Int, length: Int): Memory
expect fun Memory.slice(offset: Long, length: Long): Memory

Returns memory's subrange. On some platforms it could do range checks but it is not guaranteed to be safe. It also could lead to memory allocations on some platforms.

actual fun Memory.slice(offset: Int, length: Int): Memory
actual fun Memory.slice(offset: Long, length: Long): Memory

Returns memory's subrange. On some platforms it could do range checks but it is not guaranteed to be safe. It also could lead to memory allocations on some platforms.

actual fun Memory.slice(offset: Int, length: Int): Memory
actual fun Memory.slice(offset: Long, length: Long): Memory
actual fun Memory.slice(offset: Int, length: Int): Memory
actual fun Memory.slice(offset: Long, length: Long): Memory

Returns memory's subrange. On some platforms it could do range checks but it is not guaranteed to be safe. It also could lead to memory allocations on some platforms.