expression
Compute ordinary Wasm memory capacity
Ordinary Wasm linear memory grows in units of 64 KiB. It is an indexed byte region, not a direct view of the host address space. The Rust calculation illustrates standard page sizing; it does not allocate memory or cover custom-page-size proposals. Expected host stdout (not executed): bytes: 196608 Common mistake: Confusing a Wasm page with a typical 4 KiB operating-system page.
Formal Syntax & Structure
rust syntaxrust
pages.checked_mul(65_536)Working Example
Example Snippetrust
fn main() { let pages = 3u32; let bytes = pages.checked_mul(65_536).unwrap(); println!("bytes: {bytes}");}