munlockall()

Updated: April 19, 2023

Unlock a process's address space

Synopsis:

#include <sys/mman.h>

int munlockall( void );

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The munlockall() function unlocks all the currently mapped pages of the address space of the calling process. You can lock memory by calling mlock() or mlockall().

Any pages that become mapped into the address space of the process after it calls munlockall() aren't locked, unless there's an intervening call to mlockall() specifying MCL_FUTURE or a subsequent call to mlockall() specifying MCL_CURRENT.

If pages mapped into the address space of the process are also mapped into the address spaces of other processes and are locked by those processes, the locks established by the other processes are unaffected by a call by this process to munlockall().

Returns:

0

Classification:

POSIX 1003.1 ML

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes