pub unsafe fn expand(p: *mut u8, new_size: usize) -> *mut u8Expand description
Try to grow an allocation in place, without moving it.
Returns a null pointer if the block cannot be extended where it is — in which case
p remains valid and unchanged, unlike rezalloc. Useful when moving would be
more expensive than falling back to a different strategy.
§Safety
pmust be a pointer from this allocator that has not been freed.- Unlike
rezalloc,pis not consumed: on failure it is still live and must still be freed.