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

Method required_code_alignment

crates/wasmtime/src/engine.rs:872–876  ·  view source on GitHub ↗

Returns the required alignment for a code image, if we allocate in a way that is not a system `mmap()` that naturally aligns it.

(&self)

Source from the content-addressed store, hash-verified

870 /// allocate in a way that is not a system `mmap()` that naturally
871 /// aligns it.
872 fn required_code_alignment(&self) -> usize {
873 self.custom_code_memory()
874 .map(|c| c.required_alignment())
875 .unwrap_or(1)
876 }
877
878 /// Loads a `CodeMemory` from the specified in-memory slice, copying it to a
879 /// uniquely owned mmap.

Callers 1

load_code_bytesMethod · 0.80

Calls 3

custom_code_memoryMethod · 0.80
required_alignmentMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected