v133 · webassembly
WebAssembly Memory64
The memory64 proposal adds support for linear WebAssembly memories with size larger than 2^32 bits. It provides no new instructions, but instead extends the existing instructions to allow 64-bit indexes for memories and tables.
concepts
-
Wasm Memory64
WebAssembly 64-bit memories. Required for large-data ports (databases, video pipelines) that bumped against the 4GB ceiling.
-
Large buffer allocation
Allocate a 5 GiB
WebAssembly.Memorywithindex: "i64"— the use case (ML, image, in-browser DB) that motivated the proposal. -
i64 pointer toolbox
Decode
BigIntpointers, check Number safety, compute MiB/GiB offsets — the glue-code patterns memory64 forces on every JS ↔ Wasm boundary. -
Address space explorer
Visualise the gap between the 32-bit (4 GB) ceiling and 64-bit Memory64 space, allocate real
WebAssembly.Memoryinstances withindex: "i64", and do BigInt pointer arithmetic that overflowsNumber.MAX_SAFE_INTEGER.
why it shipped
This feature allows WebAssembly applications to address and use more than 4GB of memory if the system allows for it (64-bit architecture and sufficient available memory).