[][src]Function drone_core::ffi::libc::realloc

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

Changes the size of the memory block pointed to by ptr to size bytes. The contents will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized. If ptr is NULL, then the call is equivalent to malloc(size), for all values of size; if size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr). Unless ptr is NULL, it must have been returned by an earlier call to malloc, calloc, or realloc. If the area pointed to was moved, a free(ptr) is done.

Safety

This function works with raw pointers.