1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) Markus Kuhn, 1996
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .\" 1995-11-26 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
26 .\" First version written
28 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
29 .\" all rights reserved.
30 .\" Translated Sun Feb 23 19:47:50 JST 1997
31 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
32 .\" Updated Sat Oct 18 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
33 .\" Updated Sun May 23 JST 2004 by Kentaro Shirakata <argrath@ub32.org>
43 .TH MUNLOCK 2 2003-08-21 "Linux 2.4" "Linux Programmer's Manual"
46 .\"O munlock \- reenable paging for some parts of memory
47 munlock \- メモリの一部のページングを再開する
51 .B #include <sys/mman.h>
53 \fBint munlock(const void *\fIaddr\fB, size_t \fIlen\fB);
58 .\"O reenables paging for the memory in the range starting at
62 .\"O bytes. All pages which contain a part of the specified memory range
63 .\"O can after calling
65 .\"O be moved to external swap space again by the kernel.
71 バイトの範囲のメモリのページング(paging)を再開(reenable)する。
72 指定された範囲のメモリを含んでいる全てのページは
75 再びカーネルによって外部スワップ(swap)に移動できるようになる。
77 .\"O Memory locks do not stack, i.e., pages which have been locked several times
82 .\"O will be unlocked by a single call to
84 .\"O for the corresponding range or by
86 .\"O Pages which are mapped to several locations or by several processes stay
87 .\"O locked into RAM as long as they are locked at least at one location or by
88 .\"O at least one process.
100 複数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、
101 一つのプロセスでロックされている限りは RAM に残り続ける。
103 .\"O On POSIX systems on which
108 .\"O .B _POSIX_MEMLOCK_RANGE
109 .\"O is defined in <unistd.h> and the value
111 .\"O from <limits.h> indicates the number of bytes per page.
115 が使用可能である POSIX システムでは
116 .B _POSIX_MEMLOCK_RANGE
117 が <unistd.h> に定義されており、<limits.h> にある
119 の値はページあたりのバイト数を示している。
120 .\"O .SH "RETURN VALUE"
124 .\"O returns zero. On error, \-1 is returned,
126 .\"O is set appropriately, and no changes are made to any locks in the
127 .\"O address space of the process.
130 はゼロを返す、エラーの場合が \-1 を返され、
132 が適切に設定され、プロセスのアドレス空間におけるロックは変更されない。
137 .\"O Some of the specified address range does not correspond to mapped
138 .\"O pages in the address space of the process.
139 指定されたアドレスの範囲はプロセスにマップされたアドレス空間と一致しない。
144 .\"O was not a multiple of the page size.
157 .\"O .SH "CONFORMING TO"