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

Method grow_up_to

src/syncstalloc.rs:157–160  ·  view source on GitHub ↗

Tries to grow the current allocation in-place. If that isn't possible, the allocator grows by as much as it is able to, and the new length of the allocation is returned. The new length is guaranteed to be in the range `old_size..=new_size`. # Safety `ptr` must point to a valid allocation of `old_size` blocks. Also, `new_size > old_size`.

(&self, ptr: NonNull<u8>, old_size: usize, new_size: usize)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

acquire_lockedMethod · 0.80

Tested by

no test coverage detected