mlockall()
QNX SDP8.0C Library ReferenceAPIDeveloper
Lock all of a process's address space
Synopsis:
#include <sys/mman.h>
int mlockall(int flags);
Arguments:
- flags
- Flags that indicate which pages to lock; one or more of the following bits:
- MCL_CURRENT
- Lock the pages currently mapped into the address space of the process.
- MCL_FUTURE
- Lock the pages that become mapped into the address space of the process in the future, when the mappings are established.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
Note:
In this QNX OS release, all memory is locked
for the entire duration of the process, so this function does nothing.
The mlockall() function causes all of the pages mapped by the calling process's address space to be locked and made memory-resident until they're unlocked or until the process exits or is replaced by an exec*() call.
Memory-resident is a term used to indicate that the addresses always reside in physical memory.
For more information, see
Memory management
in the Process Manager chapter of the System Architecture guide.
Returns:
In this release, this function always returns 0 (success).
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: