From f4cf2141f68adca84d7feb50a32502027ca1a61a Mon Sep 17 00:00:00 2001 From: Wes Peters 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 27a032ff36263..d783ea02c8428 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.3