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

Function that allocates memory suitable for storing an object of size size, with at least the alignment given by align.

This function permits allocations of size 0, returning a pointer that is aligned to at least the given alignment

Errors

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

Safety

align must be a power of two. size, rounded to the next multiple of align, must not be greater than isize::MAX