Skip to main content

mi_realloc_aligned

Function mi_realloc_aligned 

Source
pub unsafe extern "C" fn mi_realloc_aligned(
    p: *mut c_void,
    new_size: usize,
    align: usize,
) -> *mut c_void
Expand description

Re-allocate memory to a size of new_size bytes, with an alignment of align.

Returns a pointer to the allocated memory or null if out of memory.

If null is returned, the pointer p is not freed. Otherwise, the original pointer is either freed or returned as the result if the reallocation fits in-place with the new size.

If p is null, this is equivalent to mi_malloc_aligned. If new_size is larger than the original size allocated for p, the bytes after size are uninitialized.