Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
munmap - unmap memory pages
&pagelevel(4)&pagelevel
Syntax | #include <sys/mman.h> int munmap(void *addr, size_t len); |
Description | The munmap() function removes mappings from pages in the area [addr, addr + len). The value specified in len is rounded to a multiple of the page size defined by sysconf() . Further references to these pages result in a SIGSEGV signal to the process, provided that a new mapping of these pages was not established in the meantime. Areas within the specified interval which are not mmap mappings are ignored. |
Return val. | 0 | if successful. |
| -1 | if an error occurs. errno is set to indicate the error. |
Errors | munmap() will fail if:
|
| EINVAL
| addr is not a multiple of the page size defined by sysconf() , or addresses in the area [addr, addr + len) are not valid for the address area of the process, or the len argument contains a value less than or equal to 0. |
See also | mmap() , sysconf() , signal.h , sys/mman.h .
|