QNX Developer Support
|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Unlock the range of process address space already allocated
#include <sys/mman.h> int munlock(const void * addr, size_t len);
- The starting address for the range of process address space.
- The length of the memory buffer, in bytes.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The munlock() function unlocks the pages already locked by mlock() or mlockall(). It ignores how many times mlock() has been called before.
The full POSIX implementation for this function was added in the QNX Neutrino Core OS 6.3.2.
The munlock() function doesn't affect those pages that have been mapped and locked into the address spaces of other processes.
|Memory-resident is a term used to indicate that the addresses always reside in physical memory.|
- An error has occurred (errno is set).
- Some or all of the address range specified by the addr and len arguments doesn't correspond to valid mapped pages in the address space of the process.