Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #17
Difficulty: Easy
Microsoft first developed the Java programming language.
True or False?
Linux & Unix Commands - Search Man Pages

munlockall(2) [redhat man page]

MUNLOCKALL(2)						     Linux Programmer's Manual						     MUNLOCKALL(2)

munlockall - reenable paging for calling process SYNOPSIS
#include <sys/mman.h> int munlockall(void); DESCRIPTION
munlockall reenables paging for all pages mapped into the address space of the calling process. Memory locks do not stack, i.e., pages which have been locked several times by calls to mlock or mlockall will be unlocked by a single call to munlockall. Pages which are mapped to several locations or by several processes stay locked into RAM as long as they are locked at least at one location or by at least one process. On POSIX systems on which mlockall and munlockall are available, _POSIX_MEMLOCK is defined in <unistd.h> . RETURN VALUE
On success, munlockall returns zero. On error, -1 is returned and errno is set appropriately. CONFORMING TO
mlockall(2), mlock(2), munlock(2) Linux 1.3.43 1995-11-26 MUNLOCKALL(2)

Check Out this Related Man Page

mlockall(3C)						   Standard C Library Functions 					      mlockall(3C)

mlockall, munlockall - lock or unlock address space SYNOPSIS
#include <sys/mman.h> int mlockall(int flags); int munlockall(void); DESCRIPTION
The 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), pro- vided 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
Upon successful completion, the mlockall() and munlockall() functions return 0. Otherwise, they return -1 and set errno to indicate the error. ERRORS
The mlockall() and munlockall() functions will fail if: EAGAIN Some or all of the memory in the address space could not be locked due to sufficient resources. This error condition applies to mlockall() only. EINVAL The flags argument contains values other than MCL_CURRENT and MCL_FUTURE. EPERM The {PRIV_PROC_LOCK_MEMORY} privilege is not asserted in the effective set of the calling process. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
exec(2), fork(2), memcntl(2), mmap(2), plock(3C), mlock(3C), sysconf(3C), attributes(5), standards(5) SunOS 5.11 22 Mar 2004 mlockall(3C)

Featured Tech Videos