summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/getrlimit.29
-rw-r--r--lib/libutil/login_class.c1
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2
index d3550d2..48feea0 100644
--- a/lib/libc/sys/getrlimit.2
+++ b/lib/libc/sys/getrlimit.2
@@ -97,6 +97,15 @@ mbufs, that this user may hold at any time.
The maximum size (in bytes) of the stack segment for a process;
this defines how far a program's stack segment may be extended.
Stack extension is performed automatically by the system.
+.It Dv RLIMIT_SWAP
+The maximum size (in bytes) of the swap space that may be reserved or
+used by all of this user id's processes.
+This limit is enforced only if bit 1 of the
+.Va vm.overcommit
+sysctl is set.
+Please see
+.Xr tuning 7
+for a complete description of this sysctl.
.It Dv RLIMIT_NPTS
The maximum number of pseudo-terminals created by this user id.
.El
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c
index 5074519..d54b301 100644
--- a/lib/libutil/login_class.c
+++ b/lib/libutil/login_class.c
@@ -64,6 +64,7 @@ static struct login_res {
{ "sbsize", login_getcapsize, RLIMIT_SBSIZE },
{ "vmemoryuse", login_getcapsize, RLIMIT_VMEM },
{ "pseudoterminals", login_getcapnum, RLIMIT_NPTS },
+ { "swapuse", login_getcapsize, RLIMIT_SWAP },
{ NULL, 0, 0 }
};
OpenPOWER on IntegriCloud