MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / Memory

Class Memory

crates/environ/src/types.rs:2174–2187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2172/// WebAssembly linear memory.
2173#[derive(Debug, Clone, Copy, Hash, Eq, PartialEq, Serialize, Deserialize)]
2174pub struct Memory {
2175 /// The type of the index used to access the memory.
2176 pub idx_type: IndexType,
2177 /// The limits constrain the minimum and optionally the maximum size of a memory.
2178 /// The limits are given in units of page size.
2179 pub limits: Limits,
2180 /// Whether the memory may be shared between multiple threads.
2181 pub shared: bool,
2182 /// The log2 of this memory's page size, in bytes.
2183 ///
2184 /// By default the page size is 64KiB (0x10000; 2**16; 1<<16; 65536) but the
2185 /// custom-page-sizes proposal allows opting into a page size of `1`.
2186 pub page_size_log2: u8,
2187}
2188
2189/// Maximum size, in bytes, of 32-bit memories (4G)
2190pub const WASM32_MAX_SIZE: u64 = 1 << 32;

Callers 3

type_ofMethod · 0.70
fromMethod · 0.70
import_memoryMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected