Function memalloc::reallocate [] [src]

pub unsafe fn reallocate(
    ptr: *mut u8,
    old_size: usize,
    new_size: usize
) -> *mut u8

Resizes the allocation referenced by ptr to new_size bytes.

On failure, aborts the process.

If the allocation was relocated, the memory at the passed-in pointer is undefined after the call.

Behavior is undefined if the requested new_size is 0.

The old_size parameter is the size used to create the allocation referenced by ptr, or the new_size passed to previous reallocations.