.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (C) Markus Kuhn, 1996 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" 1995-11-26 Markus Kuhn .\" First version written .\" Modified, 27 May 2004, Michael Kerrisk .\" Added notes on capability requirements .\" .TH MUNLOCKALL 2 2004-05-27 "Linux 2.6.6" "Linux Programmer's Manual" .SH NAME munlockall \- reenable paging for calling process .SH SYNOPSIS .nf .B #include .sp \fBint munlockall(void); .fi .SH DESCRIPTION .B munlockall reenables paging for all pages mapped into the address space of the calling process. Memory locks do not stack, i.e., pages which have been locked several times by calls to .B mlock or .B mlockall will be unlocked by a single call to .BR munlockall . Pages which are mapped to several locations or by several processes stay locked into RAM as long as they are locked at least at one location or by at least one process. On POSIX systems on which .B mlockall and .B munlockall are available, .B _POSIX_MEMLOCK is defined in .I . .SH "RETURN VALUE" On success, .B munlockall returns zero. On error, \-1 is returned and .I errno is set appropriately. .SH ERRORS .TP .B EPERM The calling process has insufficient privilege to call .BR munlockall . Under Linux the .B CAP_IPC_LOCK capability is required. .\" Weirdness this way comes: CAP_IPC_LOCK is required for munlockall() .\" and shmctl(SHM_UNLOCK), but is *not* required for munlock .\" (as at kernel 2.6.6) .SH "CONFORMING TO" POSIX.1b, SVr4 .SH "SEE ALSO" .BR mlock (2), .BR mlockall (2), .BR munlock (2), .BR capabilities (7)