memory.grow
Grow memory by a page count.
core0x40
Syntax
memory.grow
Stack Effect
[i32] -> [i32]Opcode
- Hex
0x40- Decimal
64- Bytes
[0x40]- Encoding
0x40 <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.grow example
)