Function tikv_jemalloc_sys::aligned_alloc
source · pub unsafe extern "C" fn aligned_alloc(
alignment: size_t,
size: size_t,
) -> *mut c_void
Expand description
Allocates size
bytes of memory at an address which is a multiple of
alignment
.
If the size
of the space requested is zero, either a null pointer is
returned, or the behavior is as if the size
were some nonzero value,
except that the returned pointer shall not be used to access an object.
§Errors
Returns null if the request fails.
§Safety
The behavior is undefined if:
alignment
is not a power-of-twosize
is not an integral multiple ofalignment