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 amount of memory to unlock, 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 specified range of address space, which was locked by a call to mlock() or mlockall() . Memory locks don't stack; the memory is unlocked, no matter how many times the same process locked it.
The munlock() function doesn't affect those pages that have been mapped and locked into the address spaces of other processes.
- An error 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.
Last modified: 2013-12-23