Function sys_heap_aligned_realloc

Source
pub unsafe extern "C" fn sys_heap_aligned_realloc(
    heap: *mut sys_heap,
    ptr: *mut c_void,
    align: usize,
    bytes: usize,
) -> *mut c_void
Expand description

@brief Expand the size of an existing allocation

Behaves in all ways like sys_heap_realloc(), except that the returned memory (if available) will have a starting address in memory which is a multiple of the specified power-of-two alignment value in bytes. In-place expansion will be attempted only if the provided memory pointer conforms to the specified alignment value otherwise the data will be moved to a new memory block.

@param heap Heap from which to allocate @param ptr Original pointer returned from a previous allocation @param align Alignment in bytes, must be a power of two @param bytes Number of bytes requested for the new block @return Pointer to memory the caller can now use, or NULL