Differences between current version and predecessor to the previous major change of munlock(2).
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Saturday, March 15, 2003 1:40:40 am | by PerryLorier | |
Older page: | version 1 | Last edited on Tuesday, June 4, 2002 12:23:43 am | by perry | Revert |
@@ -1,76 +1,27 @@
-MUNLOCK
-!!!MUNLOCK
-NAME
-SYNOPSIS
-DESCRIPTION
-RETURN VALUE
-ERRORS
-CONFORMING TO
-SEE ALSO
-----
!!NAME
+munlock - reenable paging for some parts of memory
-
-munlock - reenable paging for some parts of memory
!!SYNOPSIS
+ __#include <sys/mman.h>__
+ __int munlock(const void *__''addr''__, size_t__ ''len''__);__
-
-__#include
-__''addr''__, size_t__ ''len''__);
-__
!!DESCRIPTION
+__munlock__ reenables paging for the memory in the range starting at ''addr'' with length ''len'' bytes. All pages which contain a part of the specified memory range can
+after calling __munlock__ be moved to external swap space again by the kernel.
+Memory locks do not stack, i.e., pages which have been locked several times by calls to __mlock__ or __mlockall__ will be unlocked by a single call to __munlock__ for the corresponding range or by __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.
-__munlock__ reenables paging for the memory
in the range
-starting at ''addr'' with length ''len'' bytes. All
-pages which contain a part of the specified memory range can
-after calling
__munlock
__ be moved to external swap space
-again by
the kernel
.
+On POSIX systems on which __mlock__ and
__munlock__ are available, ___POSIX_MEMLOCK_RANGE__ is defined
in __PAGESIZE
__ from <limits.h> indicates
the number of bytes per page
.
-
-Memory locks do not stack, i.e., pages which have been
-locked several times by calls to __mlock__ or
-__mlockall__ will be unlocked by a single call to
-__munlock__ for the corresponding range or by
-__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 __mlock__ and __munlock__
-are available, ___POSIX_MEMLOCK_RANGE__ is defined in
-__PAGESIZE__ from
-__
!!RETURN VALUE
+On success, __munlock__ returns zero. On error, -1 is returned, ''errno'' is set appropriately, and no changes are made to any locks in the address space of the process.
-
-On success, __munlock__ returns zero. On error, -1 is
-returned, ''errno'' is set appropriately, and no changes
-are made to any locks in the address space of the
-process.
!!ERRORS
+;[ENOMEM]: Some of the specified address range does not correspond to mapped pages in the address space of the process.
+;[EINVAL]: ''len'' was not a positive number.
-
-__ENOMEM__
-
-
-Some of the specified address range does not correspond to
-mapped pages in the address space of the
-process.
-
-
-__EINVAL__
-
-
-''len'' was not a positive number.
!!CONFORMING TO
+POSIX.1b, SVr4
-
-POSIX.1b, SVr4
!!SEE ALSO
-
-
-
mlock(2), mlockall(2),
-
munlockall(2)
-----
+mlock(2), mlockall(2), munlockall(2)