Function alloc

Source
pub unsafe fn alloc(size: u64) -> *mut u8
Expand description

Allocate memory block of the specified size.

  • The size is rounded up to the next multiple of page size.
  • The returned address is aligned at a page boundary.

Returns the pointer to the allocated memory region or null_mut() if the allocation was unsuccessful.