slice

expect fun slice(offset: Int, length: Int): Memory
expect fun 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 slice(offset: Int, length: Int): Memory
actual fun 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 slice(offset: Int, length: Int): Memory
actual fun slice(offset: Long, length: Long): Memory
actual fun slice(offset: Int, length: Int): Memory
actual fun slice(offset: Long, length: Long): Memory