Skip to main content

ly_realloc

Function ly_realloc 

Source
pub unsafe extern "C" fn ly_realloc(
    ptr: *mut c_void,
    size: usize,
) -> *mut c_void
Expand description

@brief Wrapper for realloc() call. The only difference is that if it fails to allocate the requested memory, the original memory is freed as well.

@param[in] ptr Memory to reallocate. @param[in] size New size of the memory block.

@return Pointer to the new memory, NULL on error.