[][src]Function jemalloc_sys::mallocx

pub unsafe extern "C" fn mallocx(size: size_t, flags: c_int) -> *mut c_void

Allocates at least size bytes of memory according to flags.

It returns a pointer to the start (lowest byte address) of the allocated space. This pointer is suitably aligned so that it may be assigned to a pointer to any type of object and then used to access such an object in the space allocated until the space is explicitly deallocated. Each yielded pointer points to an object disjoint from any other object.

Errors

On success it returns a non-null pointer. A null pointer return value indicates that insufficient contiguous memory was available to service the allocation request.

Safety

The behavior is undefined if size == 0.