diff options
author | kib <kib@FreeBSD.org> | 2009-06-23 20:57:27 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-06-23 20:57:27 +0000 |
commit | e91d5cfe697741148ddb95a70d94e528df25f652 (patch) | |
tree | df8535674eb8cd6e5891dc1421be5690320af396 /lib | |
parent | fa686c638eece83a18de058d1934f4722487818b (diff) | |
download | FreeBSD-src-e91d5cfe697741148ddb95a70d94e528df25f652.zip FreeBSD-src-e91d5cfe697741148ddb95a70d94e528df25f652.tar.gz |
Usermode portion of the support for swap allocation accounting:
- update for getrlimit(2) manpage;
- support for setting RLIMIT_SWAP in login class;
- addition to the limits(1) and sh and csh limit-setting builtins;
- tuning(7) documentation on the sysctls controlling overcommit.
In collaboration with: pho
Reviewed by: alc
Approved by: re (kensmith)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/getrlimit.2 | 9 | ||||
-rw-r--r-- | lib/libutil/login_class.c | 1 |
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 } }; |