[−][src]Function avr_libc::realloc
pub unsafe extern "C" fn realloc(
__ptr: *mut c_void,
__size: size_t
) -> *mut c_void
The realloc() function tries to change the size of the region allocated at \c ptr to the new \c size value. It returns a pointer to the new region. The returned pointer might be the same as the old pointer, or a pointer to a completely different region.
The contents of the returned region up to either the old or the new size value (whatever is less) will be identical to the contents of the old region, even in case a new region had to be allocated.
It is acceptable to pass \c ptr as NULL, in which case realloc() will behave identical to malloc().
If the new memory cannot be allocated, realloc() returns NULL, and the region at \c ptr will not be changed.