summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwes <wes@FreeBSD.org>2003-03-31 21:09:57 +0000
committerwes <wes@FreeBSD.org>2003-03-31 21:09:57 +0000
commitca1839cb9191762cd4c49990a18f78fd9798c4d1 (patch)
treef83c7306439c7baa61bbd7bf0a72fa416688f426 /lib
parent35e71f4a050af9100a931d737080b2818efa8c63 (diff)
downloadFreeBSD-src-ca1839cb9191762cd4c49990a18f78fd9798c4d1.zip
FreeBSD-src-ca1839cb9191762cd4c49990a18f78fd9798c4d1.tar.gz
Add a facility allowing processes to inform the VM subsystem they are
critical and should not be killed when pageout is looking for more memory pages in all the wrong places. Reviewed by: arch@ Sponsored by: St. Bernard Software
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/madvise.29
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
index 27a032f..d783ea0 100644
--- a/lib/libc/sys/madvise.2
+++ b/lib/libc/sys/madvise.2
@@ -117,6 +117,12 @@ system calls.
Region is not included in a core file.
.It Dv MADV_CORE
Include region in a core file.
+.It Dv MADV_PROTECT
+Informs the VM system this process should not be killed when the
+swap space is exhausted.
+The process must have superuser privileges.
+This should be used judiciously in processes that must remain running
+for the system to properly function.
.El
.Sh RETURN VALUES
.Rv -std madvise
@@ -131,6 +137,9 @@ The virtual address range specified by the
and
.Fa len
arguments is not valid.
+.It Bq Er EPERM
+.Dv MADV_PROTECT
+was specified and the process does not have superuser privileges.
.El
.Sh SEE ALSO
.Xr mincore 2 ,
OpenPOWER on IntegriCloud