inline fun <R> withMemory(size: Int, block: (Memory) -> R): R
inline fun <R> withMemory(size: Long, block: (Memory) -> R): R

Invoke block function with a temporary Memory instance of the specified size in bytes. The provided instance shouldn't be captured and used outside of the block otherwise an undefined behaviour may occur including crash and/or data corruption.