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

Method free_memory

cranelift/jit/src/memory/system.rs:140–143  ·  view source on GitHub ↗

Frees all allocated memory regions that would be leaked otherwise. Likely to invalidate existing function pointers, causing unsafety.

(&mut self)

Source from the content-addressed store, hash-verified

138 /// Frees all allocated memory regions that would be leaked otherwise.
139 /// Likely to invalidate existing function pointers, causing unsafety.
140 pub(crate) unsafe fn free_memory(&mut self) {
141 self.allocations.clear();
142 self.already_protected = 0;
143 }
144}
145
146impl Drop for Memory {

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected