From ca1839cb9191762cd4c49990a18f78fd9798c4d1 Mon Sep 17 00:00:00 2001 From: wes Date: Mon, 31 Mar 2003 21:09:57 +0000 Subject: 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 --- lib/libc/sys/madvise.2 | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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 , -- cgit v1.1