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

Method alloc

crates/core/src/slab.rs:366–369  ·  view source on GitHub ↗
(&mut self, value: T)

Source from the content-addressed store, hash-verified

364 /// storage, and the new capacity exceeds `Slab::MAX_CAPACITY`.
365 #[inline]
366 pub fn alloc(&mut self, value: T) -> Result<Id, OutOfMemory> {
367 self.try_alloc(value)
368 .or_else(|value| self.alloc_slow(value))
369 }
370
371 /// Get the `Id` that will be returned for the next allocation in this slab.
372 #[inline]

Callers 4

newMethod · 0.45
insertMethod · 0.45
or_insert_with_keyMethod · 0.45
insert_entryMethod · 0.45

Calls 2

try_allocMethod · 0.80
alloc_slowMethod · 0.45

Tested by

no test coverage detected