memory.size
Return current memory size in pages.
core0x3F
Syntax
memory.size
Stack Effect
[] -> [i32]Opcode
- Hex
0x3F- Decimal
63- Bytes
[0x3f]- Encoding
0x3F <memidx:byte>- Immediates
memidx:byte— must be 0 in MVP; reserved for multi-memory
- Category
- memory
Browser Support
Core WebAssembly instruction.
Validation Rules
- Operands and result types must match the instruction signature.
- The instruction must appear in a valid structured control context.
Common Mistakes
- Using the instruction with the wrong operand type.
- Forgetting that WAT validation is stack-typed.
(func $example
;; memory.size example
)