arch::1.33.0[−][src] wasm32:: memory_grow
pub fn memory_grow(mem: u32, delta: usize) -> usize
Corresponding intrinsic to wasm's
This function, when called, will attempt to grow the default linear memory
by the specified
delta of pages. The current WebAssembly page size is
65536 bytes (64 KB). If memory is successfully grown then the previous size
of memory, in pages, is returned. If memory cannot be grown then
usize::MAX is returned.
mem is the numerical index of which memory to return the
size of. Note that currently the WebAssembly specification only supports one
memory, so it is required that zero is passed in. The argument is present to
be forward-compatible with future WebAssembly revisions. If a nonzero
argument is passed to this function it will currently unconditionally abort.