|
NAMEmlockall , munlockall —
lock (unlock) the address space of a process
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <sys/mman.h>
int
int
DESCRIPTIONThemlockall () system call locks into memory the
physical pages associated with the address space of a process until the
address space is unlocked, the process exits, or execs another program image.
The following flags affect the behavior of
Since physical memory is a potentially scarce resource, processes
are limited in how much they can lock down. A single process can lock the
minimum of a system-wide “wired pages” limit
vm.max_user_wired and the per-process
If security.bsd.unprivileged_mlock is set to
0 these calls are only available to the super-user. If
vm.old_mlock is set to 1 the per-process
The RETURN VALUESA return value of 0 indicates that the call succeeded and all pages in the range have either been locked or unlocked. A return value of -1 indicates an error occurred and the locked status of all pages in the range remains unchanged. In this case, the global location errno is set to indicate the error.ERRORSmlockall () will fail if:
SEE ALSOmincore(2), mlock(2), mmap(2), munmap(2), setrlimit(2)STANDARDSThemlockall () and munlockall ()
functions are believed to conform to IEEE Std 1003.1-2001
(“POSIX.1”).
HISTORYThemlockall () and munlockall ()
functions first appeared in FreeBSD 5.1.
BUGSThe per-process and system-wide resource limits of locked memory apply to the amount of virtual memory locked, not the amount of locked physical pages. Hence two distinct locked mappings of the same physical page counts as 2 pages aginst the system limit, and also against the per-process limit if both mappings belong to the same physical map.
Visit the GSP FreeBSD Man Page Interface. |