OSDN Git Service

(split) Convert contrib and obsolete pages to UTF-8.
[linuxjm/LDP_man-pages.git] / obsolete / man2 / munlock.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) Markus Kuhn, 1996
4 .\"
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.
9 .\"
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.
14 .\"
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.
19 .\"
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,
23 .\" USA.
24 .\"
25 .\" 1995-11-26  Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
26 .\"      First version written
27 .\"
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>
34 .\"
35 .\"WORD:        paging                  ページング
36 .\"WORD:        memory                  メモリ
37 .\"WORD:        kernel                  カーネル
38 .\"WORD:        swap                    スワップ
39 .\"WORD:        lock                    ロック
40 .\"WORD:        unlock                  アンロック
41 .\"WORD:        process                 プロセス
42 .\"
43 .TH MUNLOCK 2 2003-08-21 "Linux 2.4" "Linux Programmer's Manual"
44 .\"O .SH NAME
45 .SH 名前
46 .\"O munlock \- reenable paging for some parts of memory
47 munlock \- メモリの一部のページングを再開する
48 .\"O .SH SYNOPSIS
49 .SH 書式
50 .nf
51 .B #include <sys/mman.h>
52 .sp
53 \fBint munlock(const void *\fIaddr\fB, size_t \fIlen\fB);
54 .fi
55 .\"O .SH DESCRIPTION
56 .SH 説明
57 .\"O .B munlock
58 .\"O reenables paging for the memory in the range starting at
59 .\"O .I addr
60 .\"O with length
61 .\"O .I len
62 .\"O bytes. All pages which contain a part of the specified memory range
63 .\"O can after calling
64 .\"O .B munlock
65 .\"O be moved to external swap space again by the kernel.
66 .B munlock
67
68 .I addr
69 から始まる長さ
70 .I len
71 バイトの範囲のメモリのページング(paging)を再開(reenable)する。
72 指定された範囲のメモリを含んでいる全てのページは
73 .B munlock
74 を呼び出し後、
75 再びカーネルによって外部スワップ(swap)に移動できるようになる。
76
77 .\"O Memory locks do not stack, i.e., pages which have been locked several times
78 .\"O by calls to
79 .\"O .B mlock
80 .\"O or
81 .\"O .B mlockall
82 .\"O will be unlocked by a single call to
83 .\"O .B munlock
84 .\"O for the corresponding range or by
85 .\"O .BR munlockall .
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.
89 メモリのロック(lock)は累積しない。
90 すなわち複数回
91 .B mlock
92
93 .B mlockall
94 を呼び出してロックされたページでも、
95 対応する範囲に対して
96 .B munlock
97 を 1 回呼び出したり
98 .B munlockall
99 を呼び出したりするだけでロック解除される。
100 複数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、
101 一つのプロセスでロックされている限りは RAM に残り続ける。
102
103 .\"O On POSIX systems on which
104 .\"O .B mlock
105 .\"O and
106 .\"O .B munlock
107 .\"O are available,
108 .\"O .B _POSIX_MEMLOCK_RANGE
109 .\"O is defined in <unistd.h> and the value
110 .\"O .B PAGESIZE
111 .\"O from <limits.h> indicates the number of bytes per page.
112 .B mlock
113
114 .B munlock
115 が使用可能である POSIX システムでは
116 .B _POSIX_MEMLOCK_RANGE
117 が <unistd.h> に定義されており、<limits.h> にある
118 .B PAGESIZE
119 の値はページあたりのバイト数を示している。
120 .\"O .SH "RETURN VALUE"
121 .SH 返り値
122 .\"O On success,
123 .\"O .B munlock
124 .\"O returns zero.  On error, \-1 is returned,
125 .\"O .I errno
126 .\"O is set appropriately, and no changes are made to any locks in the
127 .\"O address space of the process.
128 成功した場合、
129 .B munlock
130 はゼロを返す、エラーの場合が \-1 を返され、
131 .I errno
132 が適切に設定され、プロセスのアドレス空間におけるロックは変更されない。
133 .\"O .SH ERRORS
134 .SH エラー
135 .TP
136 .B ENOMEM
137 .\"O Some of the specified address range does not correspond to mapped
138 .\"O pages in the address space of the process.
139 指定されたアドレスの範囲はプロセスにマップされたアドレス空間と一致しない。
140 .TP
141 .B EINVAL
142 .\"O (Not on Linux)
143 .\"O .I addr
144 .\"O was not a multiple of the page size.
145 .I addr
146 がページサイズの倍数でない。
147 .LP
148 .\"O Linux adds
149 Linux では、以下が追加される。
150 .TP
151 .\"O .B EINVAL
152 .\"O .I len
153 .\"O was negative.
154 .B EINVAL
155 .I len
156 が負の数である。
157 .\"O .SH "CONFORMING TO"
158 .SH 準拠
159 POSIX.1b, SVr4
160 .\"O .SH "SEE ALSO"
161 .SH 関連項目
162 .BR mlock (2),
163 .BR mlockall (2),
164 .BR munlockall (2)