[][src]Function snmalloc_sys::rust_alloc

pub unsafe extern "C" fn rust_alloc(
    alignment: size_t,
    size: size_t
) -> *mut c_void

Allocate the memory with the given alignment and size. On success, it returns a pointer pointing to the required memory address. On failure, it returns a null pointer. The client must assure the following things:

  • alignment is greater than zero
  • alignment is a power of 2 The program may be forced to abort if the constrains are not full-filled.