munmap(2)

DESCRIPTION

Remove a mapped virtual range.

Removes mappings overlapping a positive-length virtual range. The
address space may split a mapping when only part is removed.

SYNOPSIS

long munmap(void *addr, long length);

RETURN VALUE

  • Returns zero on success or a negative errno.

ERRORS

  • -EINVAL
    • The length is not positive or the range is invalid.
  • -ESRCH
    • There is no current process.