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

Method reserve

crates/wasmtime/src/runtime/instance.rs:675–683  ·  view source on GitHub ↗
(&mut self, module: &Module)

Source from the content-addressed store, hash-verified

673 }
674
675 pub(crate) fn reserve(&mut self, module: &Module) -> Result<(), OutOfMemory> {
676 let raw = module.compiled_module().module();
677 self.functions.reserve(raw.num_imported_funcs)?;
678 self.tables.reserve(raw.num_imported_tables)?;
679 self.memories.reserve(raw.num_imported_memories)?;
680 self.globals.reserve(raw.num_imported_globals)?;
681 self.tags.reserve(raw.num_imported_tags)?;
682 Ok(())
683 }
684
685 #[cfg(feature = "component-model")]
686 pub(crate) fn clear(&mut self) {

Callers 6

load_untyped_paramsMethod · 0.45
newMethod · 0.45
allocate_instanceMethod · 0.45
readyMethod · 0.45

Calls 3

OkFunction · 0.85
compiled_moduleMethod · 0.80
moduleMethod · 0.45

Tested by

no test coverage detected