pub unsafe extern "C" fn sys_heap_alloc(
heap: *mut sys_heap,
bytes: usize,
) -> *mut c_void
Expand description
@brief Allocate memory from a sys_heap
Returns a pointer to a block of unused memory in the heap. This memory will not otherwise be used until it is freed with sys_heap_free(). If no memory can be allocated, NULL will be returned. The allocated memory is guaranteed to have a starting address which is a multiple of sizeof(void *). If a bigger alignment is necessary then sys_heap_aligned_alloc() should be used instead.
@note The sys_heap implementation is not internally synchronized. No two sys_heap functions should operate on the same heap at the same time. All locking must be provided by the user.
@param heap Heap from which to allocate @param bytes Number of bytes requested @return Pointer to memory the caller can now use