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

Method clear

cranelift/entity/src/list.rs:171–174  ·  view source on GitHub ↗

Clear the pool, forgetting about all lists that use it. This invalidates any existing entity lists that used this pool to allocate memory. The pool's memory is not released to the operating system, but kept around for faster allocation in the future.

(&mut self)

Source from the content-addressed store, hash-verified

169 /// The pool's memory is not released to the operating system, but kept around for faster
170 /// allocation in the future.
171 pub fn clear(&mut self) {
172 self.data.clear();
173 self.free.clear();
174 }
175
176 /// Read the length of a list field, if it exists.
177 fn len_of(&self, list: &EntityList<T>) -> Option<usize> {

Callers 3

remove_lastMethod · 0.45
truncateMethod · 0.45
empty_listFunction · 0.45

Calls 3

sclass_for_lengthFunction · 0.85
len_ofMethod · 0.80
freeMethod · 0.45

Tested by 1

empty_listFunction · 0.36