Unlock the range of process address space already allocated
#include <sys/mman.h> int munlock(const void * addr, size_t len);
libc
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.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |