MCPcopy Create free account
hub / github.com/abgros/stalloc / acquire_locked

Method acquire_locked

src/syncstalloc.rs:180–188  ·  view source on GitHub ↗

Acquires an exclusive lock for the allocator. This can be used to chain multiple operations on the allocator without having to repeatedly acquire locks for each one. # Example ``` use stalloc::SyncStalloc; let alloc = SyncStalloc::<100, 4>::new(); let lock = alloc.acquire_locked(); for _ in 0..20 { // make multiple allocations in a row unsafe { lock.allocate_blocks(5, 1) }.unwrap(); } drop(lock

(&self)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 15

is_oomMethod · 0.80
is_emptyMethod · 0.80
clearMethod · 0.80
allocate_blocksMethod · 0.80
deallocate_blocksMethod · 0.80
shrink_in_placeMethod · 0.80
grow_in_placeMethod · 0.80
grow_up_toMethod · 0.80
allocMethod · 0.80
alloc_zeroedMethod · 0.80
deallocMethod · 0.80
reallocMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected