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

Function unregister_code

crates/wasmtime/src/runtime/module/registry.rs:412–419  ·  view source on GitHub ↗

Unregisters a code mmap from the global map. Must have been previously registered with `register`.

(address: Range<usize>)

Source from the content-addressed store, hash-verified

410///
411/// Must have been previously registered with `register`.
412pub fn unregister_code(address: Range<usize>) {
413 if address.is_empty() {
414 return;
415 }
416 let end = address.end - 1;
417 let code = global_code().write().remove(end);
418 assert!(code.is_some());
419}
420
421#[test]
422#[cfg_attr(miri, ignore)]

Callers 1

dropMethod · 0.85

Calls 4

global_codeFunction · 0.85
is_emptyMethod · 0.45
removeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected