線形メモリのページ単位・4 GiB 境界および Memory64 / Table64 の 64-bit インデックス仕様
- WebAssembly の線形メモリは 1 ページ = 65,536 バイト($2^{16}$ バイト) 単位で管理される。
- 従来の 32-bit アドレス型(
i32)では最大 $2^{16}$ ページ(合計 $2^{32}$ バイト = 4 GiB)が上限である。 - Memory64(WebAssembly 3.0 に 2025-07-23 統合)は新規命令を追加せず、
memtype ::= addrtype limitsおよびtabletype ::= addrtype limits reftype(addrtype ::= i32 | i64)として既存のメモリ・テーブル命令を 64-bit インデックスへ拡張する(テーブルの 64-bit 化は Table64 と呼ばれる)。 limitsの min/max およびmemargの offset はu64に拡張され、i64アドレス型のメモリページ上限は $2^{48}$ ページとなる。
関連概念
- implementsWebAssembly 線形メモリモデルと 32-bit / 64-bit アドレッシングのトレードオフ — 線形メモリの 32-bit / 64-bit アドレッシングの仕様的裏付け。
Primary Sources
- Tier 1 WebAssembly Stack Switching Proposal Specification
proposals/memory64/Overview.md (commit f0b43efd4952)↗ - Tier 1 WebAssembly Proposals Progress Registry
finished-proposals.md (commit df6a2aca1cd9)↗
Relations
Outgoing
- implements WebAssembly 線形メモリモデルと 32-bit / 64-bit アドレッシングのトレードオフ
- required_by wasm-tools v1.264.0 における Component Model 64-bit メモリ(cm64)初期サポート
- supports WebAssembly 線形メモリモデルと 32-bit / 64-bit アドレッシングのトレードオフ
Backlinks
- wasm-tools v1.264.0 における Component Model 64-bit メモリ(cm64)初期サポート depends_on
- WebAssembly 線形メモリモデルと 32-bit / 64-bit アドレッシングのトレードオフ evidenced_by