@wasmMemorySize

@wasmMemorySize

@wasmMemorySize(index: u32) u32

This function returns the size of the Wasm memory identified by index as an unsigned value in units of Wasm pages. Note that each Wasm page is 64KB in size.

This function is a low level intrinsic with no safety mechanisms usually useful for allocator designers targeting Wasm. So unless you are writing a new allocator from scratch, you should use something like @import("std").heap.WasmPageAllocator.

See also:

  • @wasmMemoryGrow