summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbjk <bjk@FreeBSD.org>2014-05-17 03:05:52 +0000
committerbjk <bjk@FreeBSD.org>2014-05-17 03:05:52 +0000
commit77baea613b30871ef17f139c5ebb092cc7a08242 (patch)
treea4031efebb6ae5d280ea2930b1d14538ec5c3301 /lib
parent8c872c3b5e3801fd208422b8ba94f20d8651cd2c (diff)
downloadFreeBSD-src-77baea613b30871ef17f139c5ebb092cc7a08242.zip
FreeBSD-src-77baea613b30871ef17f139c5ebb092cc7a08242.tar.gz
Correct documentation of the limit on how much memory can be mlock()ed
vm.max_wired is a system-wide limit, not per-process. Reword the section to make this more clear. PR: docs/189214 Submitted by: Lawrence Chen (original text) Approved by: hrs (mentor)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/mlock.221
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2
index 42acc97..5c914f4 100644
--- a/lib/libc/sys/mlock.2
+++ b/lib/libc/sys/mlock.2
@@ -28,7 +28,7 @@
.\" @(#)mlock.2 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd March 18, 2013
+.Dd May 17, 2014
.Dt MLOCK 2
.Os
.Sh NAME
@@ -91,14 +91,21 @@ Locked mappings are not inherited by the child process after a
.Pp
Since physical memory is a potentially scarce resource, processes are
limited in how much they can lock down.
-A single process can
+The amount of memory that a single process can
.Fn mlock
-the minimum of
-a system-wide ``wired pages'' limit
-.Va vm.max_wired
-and the per-process
+is limited by both the per-process
.Li RLIMIT_MEMLOCK
-resource limit.
+resource limit and the
+system-wide
+.Dq wired pages
+limit
+.Va vm.max_wired .
+.Va vm.max_wired
+applies to the system as a whole, so the amount available to a single
+process at any given time is the difference between
+.Va vm.max_wired
+and
+.Va vm.stats.vm.v_wire_count .
.Pp
If
.Va security.bsd.unprivileged_mlock
OpenPOWER on IntegriCloud