![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Unmap previously mapped addresses, exercising more control than possible with munmap()
#include <sys/mman.h> int munmap_flags( void * addr, size_t len, unsigned flags );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The munmap_flags() function removes any mappings for pages in the address range starting at addr and continuing for len bytes, rounded up to the next multiple of the page size. Subsequent references to these pages cause a SIGSEGV signal to be set on the process.
If there are no mappings in the specified address range, then munmap_flags() has no effect.
![]() |
This function was added in the QNX Neutrino Core OS 6.3.2. |
There are some interactions of the flags argument with the MAP_NOINIT flag of the mmap() function as well as procnto, as detailed below:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
mmap(), mprotect(), munmap(), shm_open(), shm_unlink()
procnto in the Utilities Reference
"Initializing allocated memory" in the Interprocess Communication (IPC) chapter of the System Architecture guide
![]() |
![]() |
![]() |
![]() |