Skip to main content

realloc

Function realloc 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn realloc( ptr: *mut c_void, size: usize, ) -> *mut c_void
Expand description

Changes the size of the memory block pointed to by ptr to size bytes. If the returned ptr is non-null, any usage of the old memory block is immediately undefined behavior.

ยงSafety

ptr must be a pointer to a memory block previously allocated by memory::malloc, memory::calloc, or memory::realloc.