Function: alloc

Allocates size bytes of memory with protection flags Prot in the calling process.

This function is safe

Parameters

  • size: int - the size of memory to be allocated. If the size is 0, the function will allocate a full page of memory. If a specific size is provided, that amount of memory will be allocated, aligned to the next page size.
  • prot: Prot - the protection flags.

Exceptions

If allocation failed.

Return Value

Returns an Alloc.