Unmaps a mapped region.
#include <mman.h> int munmap (void *addr, size_t len);
The addr and len arguments specify the address and length in bytes, respectively, of the region to be unmapped.
The len argument must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE); otherwise, the length of the region is rounded up to the next multiple of the page size.
The result of using an address that lies in an unmapped region and not in any subsequently mapped region is undefined.
See also sysconf in this section.
0 | Indicates success. |
-1 | Indicates an error; errno is set to one
of the following values:
|