WebAssembly.Memory
The WebAssembly.Memory
object is a resizable ArrayBuffer
or SharedArrayBuffer
that holds the raw bytes of memory accessed by a WebAssembly Instance.
A memory created by JavaScript or in WebAssembly code will be accessible and mutable from both JavaScript and WebAssembly.
class Memory {
}
constructor(
descriptor: MemoryDescriptor);
readonly
buffer
: ArrayBuffer | SharedArrayBuffer;
grow(
delta: number)
: number;
Constructors
new Memory(
descriptor: MemoryDescriptor)
Creates a new Memory
object.
Properties
buffer
: ArrayBuffer | SharedArrayBuffer
An accessor property that returns the buffer contained in the memory.
Methods
grow(
delta: number)
: number
Increases the size of the memory instance by a specified number of WebAssembly pages (each one is 64KB in size).
© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/WebAssembly.Memory