VMS Help
CRTL, munmap
*Conan The Librarian
|
Unmaps a mapped region. This function is reentrant.
Format
#include <mman.h>
int munmap (void *addr, size_t len);
addr
The address of the region that you want to unmap.
len
The length, in bytes, of that region the you want to unmap.
The munmap function unmaps a mapped file or shared memory region.
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.
0 Indicates success.
-1 Indicates an error; errno is set to one of the
following values:
o ENIVAL - The addr argument is not a
multiple of the page size as returned by
sysconf(_SC_PAGE_SIZE).
o EFAULT - The range [addr, addr + len]
includes an invalid address.