posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
_POSIX_MEMLOCK

POSIX Process Memory Locking option. More...

Macros

#define MCL_CURRENT   0
 Lock all currently mapped pages into memory.
 
#define MCL_FUTURE   1
 Lock all future mappings into memory.
 

Functions

int mlockall (int flags)
 Lock all current and/or future memory mappings of the calling process.
 
int munlockall (void)
 Unlock all memory locked by the calling process.
 

Detailed Description

POSIX Process Memory Locking option.

Macro Definition Documentation

◆ MCL_CURRENT

#define MCL_CURRENT   0

Lock all currently mapped pages into memory.

Definition at line 54 of file mman.h.

◆ MCL_FUTURE

#define MCL_FUTURE   1

Lock all future mappings into memory.

Definition at line 56 of file mman.h.

Function Documentation

◆ mlockall()

int mlockall ( int  flags)

Lock all current and/or future memory mappings of the calling process.

Parameters
flagsMCL_CURRENT, MCL_FUTURE, or both.
Returns
0 on success, or -1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/mlockall.html

◆ munlockall()

int munlockall ( void  )

Unlock all memory locked by the calling process.

Returns
0 on success, or -1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/munlockall.html