MUNMAP(2) — SYSTEM CALLS
NAME
munmap − unmap pages of memory.
SYNOPSIS
#include <sys/mman.h>
munmap(addr, len)
caddr_t addr;
int len;
DESCRIPTION
munmap() removes the mappings for pages in the range [addr, addr + len). Further references to these pages will result in the delivery of a SIGSEGV signal to the process, unless these pages are considered part of the “data” or “stack” segments.
brk() and mmap() often perform implicit munmap’s.
RETURN VALUE
munmap() returns 0 on success, −1 on failure.
ERRORS
munmap() will fail if:
EINVAL addr is not a multiple of the page size as returned by getpagesize(2).
EINVAL Addresses in the range [addr, addr + len) are outside the valid range for the address space of a process.
SEE ALSO
brk(2), getpagesize(2), mmap(2)
Sun Release 4.0 — Last change: 22 March 1989