pub unsafe extern "C" fn xlang_allocate(size: size_t) -> *mut c_void
Expand description

Function that allocates memory suitable for storing an object of size size, with at least the maximum fundamental alignment for that size.

The function permits allocations of size 0, returning a pointer that is aligned to at least the maximum fundamental alignment for the platform.

Errors

On allocation failure, or other (unspecified) errors, returns a null pointer. Allocations of size 0 always succeed

Safety

size, rounded to the next multiple of the alignment used by this function, must not be greater than isize::MAX