Function ralloc::realloc
[−]
[src]
pub unsafe fn realloc(ptr: *mut u8,
old_size: usize,
size: usize,
align: usize)
-> *mut u8
Reallocate memory.
Reallocate the buffer starting at ptr with size old_size, to a buffer starting at the
returned pointer with size size.
Important!
You should only reallocate buffers allocated through ralloc. Anything else is considered
invalid.
Errors
The OOM handler handles out-of-memory conditions.
Safety
Due to being able to potentially memcpy an arbitrary buffer, as well as shrinking a buffer, this is marked unsafe.