Standards
Standards / Extensions |
C or C++ |
Dependencies |
z/OS® UNIX |
both |
|
Format
#define _OPEN_SOURCE_EXTENDED 2
#include <sys/mman.h>
int __mlockall(int flags);
General description
The function__mlockall() causes all of the pages mapped by the
address space of a process to be memory resident until unlocked or
until the process exits or execs another process image. The
flags argument
determines whether the pages are to be locked or unlocked.
- Flags
- Meaning
- _BPX_NONSWAP
- Lock the current pages mapped for this address space.
- _BPX_SWAP
- Unlock the current pages previously locked.
Returned value
If successful, __mlockall() returns 0.
If unsuccessful, __mlockall() returns -1 and no change is made
to the memory state of the address space.
Note: This function will return a EINVAL with an errno2()
of 09300be if the kernel is not available.