Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (3318 KB)
mlockall(3C)NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO NAME
SYNOPSIS
#include <sys/mman.h>int mlockall(int flags); int munlockall(void); DESCRIPTIONThe mlockall() function locks in memory all pages mapped by an address space. The value of flags determines whether the pages to be locked are those currently mapped by the address space, those that will be mapped in the future, or both:
MCL_CURRENT Lock current mappings
MCL_FUTURE Lock future mappings
If MCL_FUTURE is specified for mlockall(), mappings are locked as they are added to the address space (or replace existing mappings), provided sufficient memory is available. Locking in this manner is not persistent across the exec family of functions (see exec(2)). Mappings locked using mlockall() with any option may be explicitly unlocked with a munlock() call (see mlock(3C)). The munlockall() function removes address space locks and locks on mappings in the address space. All conditions and constraints on the use of locked memory that apply to mlock(3C) also apply to mlockall(). Locks established with mlockall() are not inherited by a child process after a fork(2) call, and are not nested. RETURN VALUES
mlockall() and munlockall() return: ERRORS
The mlockall() and munlockall() functions will fail if: USAGEThe mlockall() and munlockall() functions
require ATTRIBUTESSee attributes(5) for descriptions of the following attributes:
SUMMARY OF TRUSTED SOLARIS CHANGESTo succeed, the mlockall() and munlockall() functions require SEE ALSOTrusted Solaris 8 4/01 Reference Manualexec(2), fork(2), plock(3C), mlock(3C) SunOS 5.8 Reference ManualNAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO |
||||