OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.40.
[linuxjm/LDP_man-pages.git] / po4a / memory / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2012-05-01 04:21+0900\n"
10 "PO-Revision-Date: 2012-05-01 04:49+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:24
32 #: build/C/man2/fallocate.2:8 build/C/man2/madvise.2:35
33 #: build/C/man3/mallopt.3:24 build/C/man2/mlock.2:27 build/C/man2/mmap.2:40
34 #: build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:32 build/C/man2/mremap.2:31
35 #: build/C/man2/msync.2:25 build/C/man2/posix_fadvise.2:27
36 #: build/C/man2/readahead.2:28 build/C/man2/remap_file_pages.2:26
37 #: build/C/man3/shm_open.3:26 build/C/man7/shm_overview.7:27
38 #: build/C/man2/shmctl.2:43 build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
39 #: build/C/man2/subpage_prot.2:28 build/C/man2/sync_file_range.2:30
40 #: build/C/man3/malloc_trim.3:24
41 #, no-wrap
42 msgid "Linux"
43 msgstr "Linux"
44
45 #. type: TH
46 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:41
47 #: build/C/man2/cacheflush.2:24 build/C/man2/fallocate.2:8
48 #: build/C/man2/madvise.2:35 build/C/man3/malloc_hook.3:6
49 #: build/C/man3/mallopt.3:24 build/C/man2/mlock.2:27 build/C/man2/mmap.2:40
50 #: build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:32 build/C/man2/mremap.2:31
51 #: build/C/man2/msync.2:25 build/C/man3/mtrace.3:23
52 #: build/C/man2/posix_fadvise.2:27 build/C/man3/posix_fallocate.3:23
53 #: build/C/man3/posix_memalign.3:28 build/C/man2/readahead.2:28
54 #: build/C/man2/remap_file_pages.2:26 build/C/man3/shm_open.3:26
55 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:43
56 #: build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
57 #: build/C/man2/subpage_prot.2:28 build/C/man2/sync_file_range.2:30
58 #: build/C/man3/malloc_get_state.3:23 build/C/man3/malloc_trim.3:24
59 #: build/C/man3/malloc_usable_size.3:23 build/C/man3/mcheck.3:23
60 #, no-wrap
61 msgid "Linux Programmer's Manual"
62 msgstr "Linux Programmer's Manual"
63
64 #. type: SH
65 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:42
66 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:9
67 #: build/C/man2/madvise.2:36 build/C/man3/malloc_hook.3:7
68 #: build/C/man3/mallopt.3:25 build/C/man2/mlock.2:28 build/C/man2/mmap.2:41
69 #: build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:33 build/C/man2/mremap.2:32
70 #: build/C/man2/msync.2:26 build/C/man3/mtrace.3:24
71 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:24
72 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:29
73 #: build/C/man2/remap_file_pages.2:27 build/C/man3/shm_open.3:27
74 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:44
75 #: build/C/man2/shmget.2:37 build/C/man2/shmop.2:40
76 #: build/C/man2/subpage_prot.2:29 build/C/man2/sync_file_range.2:31
77 #: build/C/man3/malloc_get_state.3:24 build/C/man3/malloc_trim.3:25
78 #: build/C/man3/malloc_usable_size.3:24 build/C/man3/mcheck.3:24
79 #, no-wrap
80 msgid "NAME"
81 msgstr "名前"
82
83 #. type: Plain text
84 #: build/C/man2/alloc_hugepages.2:28
85 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
86 msgstr ""
87 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
88
89 #. type: SH
90 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:44
91 #: build/C/man2/cacheflush.2:27 build/C/man2/fallocate.2:11
92 #: build/C/man2/madvise.2:38 build/C/man3/malloc_hook.3:11
93 #: build/C/man3/mallopt.3:27 build/C/man2/mlock.2:30 build/C/man2/mmap.2:43
94 #: build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:35 build/C/man2/mremap.2:34
95 #: build/C/man2/msync.2:28 build/C/man3/mtrace.3:26
96 #: build/C/man2/posix_fadvise.2:30 build/C/man3/posix_fallocate.3:26
97 #: build/C/man3/posix_memalign.3:31 build/C/man2/readahead.2:31
98 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:29
99 #: build/C/man2/shmctl.2:46 build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
100 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:33
101 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_trim.3:27
102 #: build/C/man3/malloc_usable_size.3:26 build/C/man3/mcheck.3:26
103 #, no-wrap
104 msgid "SYNOPSIS"
105 msgstr "書式"
106
107 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
108 #.  unsigned long len, int prot, int flag);
109 #. type: Plain text
110 #: build/C/man2/alloc_hugepages.2:34
111 #, no-wrap
112 msgid ""
113 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
114 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
115 msgstr ""
116 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
117 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
118
119 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
120 #. type: Plain text
121 #: build/C/man2/alloc_hugepages.2:37
122 #, no-wrap
123 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
124 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
125
126 #. type: SH
127 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:48
128 #: build/C/man2/cacheflush.2:33 build/C/man2/fallocate.2:19
129 #: build/C/man2/madvise.2:50 build/C/man3/malloc_hook.3:29
130 #: build/C/man3/mallopt.3:31 build/C/man2/mlock.2:40 build/C/man2/mmap.2:52
131 #: build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:41 build/C/man2/mremap.2:43
132 #: build/C/man2/msync.2:32 build/C/man3/mtrace.3:32
133 #: build/C/man2/posix_fadvise.2:49 build/C/man3/posix_fallocate.3:44
134 #: build/C/man3/posix_memalign.3:83 build/C/man2/readahead.2:38
135 #: build/C/man2/remap_file_pages.2:37 build/C/man3/shm_open.3:41
136 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:54
137 #: build/C/man2/shmget.2:47 build/C/man2/shmop.2:51
138 #: build/C/man2/subpage_prot.2:36 build/C/man2/sync_file_range.2:41
139 #: build/C/man3/malloc_get_state.3:34 build/C/man3/malloc_trim.3:31
140 #: build/C/man3/malloc_usable_size.3:30 build/C/man3/mcheck.3:39
141 #, no-wrap
142 msgid "DESCRIPTION"
143 msgstr "説明"
144
145 #. type: Plain text
146 #: build/C/man2/alloc_hugepages.2:49
147 msgid ""
148 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
149 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
150 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20 "
151 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
152 msgstr ""
153 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
154 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
155 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
156 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
157 "敗する。"
158
159 #. type: Plain text
160 #: build/C/man2/alloc_hugepages.2:57
161 msgid ""
162 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
163 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
164 "several sizes.  These system calls serve to map huge pages into the "
165 "process's memory or to free them again.  Huge pages are locked into memory, "
166 "and are not swapped."
167 msgstr ""
168 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
169 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
170 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
171 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
172 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
173
174 #. type: Plain text
175 #: build/C/man2/alloc_hugepages.2:66
176 msgid ""
177 "The I<key> argument is an identifier.  When zero the pages are private, and "
178 "not inherited by children.  When positive the pages are shared with other "
179 "applications using the same I<key>, and inherited by child processes."
180 msgstr ""
181 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
182 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
183 "れ、子プロセスに継承される。"
184
185 #. type: Plain text
186 #: build/C/man2/alloc_hugepages.2:81
187 msgid ""
188 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
189 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
190 "memory is first actually freed when all users have released it.)  The "
191 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
192 "may not follow.  Addresses must be properly aligned."
193 msgstr ""
194 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
195 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
196 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
197 "()  の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
198 "わないかもしれない。 アドレスは正しく配置されなければならない。"
199
200 #. type: Plain text
201 #: build/C/man2/alloc_hugepages.2:86
202 msgid ""
203 "The I<len> argument is the length of the required segment.  It must be a "
204 "multiple of the huge page size."
205 msgstr ""
206 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
207 "ズの倍数にしなければならない。"
208
209 #. type: Plain text
210 #: build/C/man2/alloc_hugepages.2:94
211 msgid ""
212 "The I<prot> argument specifies the memory protection of the segment.  It is "
213 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
214 msgstr ""
215 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
216 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
217
218 #. type: Plain text
219 #: build/C/man2/alloc_hugepages.2:109
220 msgid ""
221 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
222 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
223 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
224 "returned when no segment with the given key exists."
225 msgstr ""
226 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
227 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
228 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
229 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
230 "が返される。"
231
232 #. type: SH
233 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:58
234 #: build/C/man2/cacheflush.2:52 build/C/man2/fallocate.2:109
235 #: build/C/man2/madvise.2:250 build/C/man3/mallopt.3:377
236 #: build/C/man2/mlock.2:117 build/C/man2/mmap.2:373 build/C/man2/mmap2.2:54
237 #: build/C/man2/mprotect.2:72 build/C/man2/mremap.2:128
238 #: build/C/man2/msync.2:68 build/C/man2/posix_fadvise.2:86
239 #: build/C/man3/posix_fallocate.3:64 build/C/man3/posix_memalign.3:141
240 #: build/C/man2/readahead.2:65 build/C/man2/remap_file_pages.2:122
241 #: build/C/man3/shm_open.3:169 build/C/man2/shmctl.2:272
242 #: build/C/man2/shmget.2:178 build/C/man2/shmop.2:169
243 #: build/C/man2/subpage_prot.2:61 build/C/man2/sync_file_range.2:141
244 #: build/C/man3/malloc_get_state.3:59 build/C/man3/malloc_trim.3:49
245 #: build/C/man3/malloc_usable_size.3:38 build/C/man3/mcheck.3:128
246 #, no-wrap
247 msgid "RETURN VALUE"
248 msgstr "返り値"
249
250 #. type: Plain text
251 #: build/C/man2/alloc_hugepages.2:118
252 msgid ""
253 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
254 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
255 "is set appropriately."
256 msgstr ""
257 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
258 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
259 "に設定される。"
260
261 #. type: SH
262 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:58
263 #: build/C/man2/fallocate.2:112 build/C/man2/madvise.2:257
264 #: build/C/man3/mallopt.3:382 build/C/man2/mlock.2:123 build/C/man2/mmap.2:390
265 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:79
266 #: build/C/man2/mremap.2:136 build/C/man2/msync.2:73
267 #: build/C/man2/posix_fadvise.2:89 build/C/man3/posix_fallocate.3:70
268 #: build/C/man3/posix_memalign.3:155 build/C/man2/readahead.2:71
269 #: build/C/man2/remap_file_pages.2:129 build/C/man3/shm_open.3:178
270 #: build/C/man2/shmctl.2:294 build/C/man2/shmget.2:182
271 #: build/C/man2/shmop.2:183 build/C/man2/subpage_prot.2:66
272 #: build/C/man2/sync_file_range.2:147 build/C/man3/malloc_trim.3:54
273 #, no-wrap
274 msgid "ERRORS"
275 msgstr "エラー"
276
277 #. type: TP
278 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:151
279 #, no-wrap
280 msgid "B<ENOSYS>"
281 msgstr "B<ENOSYS>"
282
283 #. type: Plain text
284 #: build/C/man2/alloc_hugepages.2:122
285 msgid "The system call is not supported on this kernel."
286 msgstr "このシステムコールはカーネルでサポートされていない。"
287
288 #. type: SH
289 #: build/C/man2/alloc_hugepages.2:122
290 #, no-wrap
291 msgid "FILES"
292 msgstr "ファイル"
293
294 #. type: Plain text
295 #: build/C/man2/alloc_hugepages.2:126
296 msgid ""
297 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
298 "be read and written."
299 msgstr ""
300 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
301 "み書きできる。"
302
303 #. type: Plain text
304 #: build/C/man2/alloc_hugepages.2:130
305 msgid ""
306 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
307 "their size in the three variables HugePages_Total, HugePages_Free, "
308 "Hugepagesize."
309 msgstr ""
310 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
311 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
312 "る。"
313
314 #. type: SH
315 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:63
316 #: build/C/man2/cacheflush.2:74 build/C/man2/fallocate.2:188
317 #: build/C/man2/madvise.2:307 build/C/man3/malloc_hook.3:76
318 #: build/C/man3/mallopt.3:390 build/C/man2/mlock.2:187 build/C/man2/mmap.2:483
319 #: build/C/man2/mmap2.2:77 build/C/man2/mprotect.2:107
320 #: build/C/man2/mremap.2:186 build/C/man2/msync.2:96 build/C/man3/mtrace.3:76
321 #: build/C/man2/posix_fadvise.2:111 build/C/man3/posix_fallocate.3:101
322 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
323 #: build/C/man2/remap_file_pages.2:151 build/C/man3/shm_open.3:249
324 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:366
325 #: build/C/man2/shmget.2:229 build/C/man2/shmop.2:226
326 #: build/C/man2/subpage_prot.2:91 build/C/man2/sync_file_range.2:180
327 #: build/C/man3/malloc_get_state.3:84 build/C/man3/malloc_trim.3:58
328 #: build/C/man3/malloc_usable_size.3:46 build/C/man3/mcheck.3:144
329 #, no-wrap
330 msgid "CONFORMING TO"
331 msgstr "準拠"
332
333 #. type: Plain text
334 #: build/C/man2/alloc_hugepages.2:133
335 msgid ""
336 "These calls are specific to Linux on Intel processors, and should not be "
337 "used in programs intended to be portable."
338 msgstr ""
339 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
340 "必要なプログラムで使うべきでない。"
341
342 #. type: SH
343 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:71
344 #: build/C/man2/madvise.2:328 build/C/man3/malloc_hook.3:78
345 #: build/C/man2/mlock.2:214 build/C/man2/mmap.2:501 build/C/man2/mmap2.2:79
346 #: build/C/man2/mprotect.2:116 build/C/man2/mremap.2:192
347 #: build/C/man3/mtrace.3:78 build/C/man2/posix_fadvise.2:120
348 #: build/C/man3/posix_memalign.3:219 build/C/man3/shm_open.3:255
349 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:371
350 #: build/C/man2/shmget.2:235 build/C/man2/shmop.2:245
351 #: build/C/man2/subpage_prot.2:93 build/C/man2/sync_file_range.2:183
352 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_trim.3:60
353 #: build/C/man3/malloc_trim.3:72 build/C/man3/malloc_usable_size.3:48
354 #: build/C/man3/mcheck.3:146
355 #, no-wrap
356 msgid "NOTES"
357 msgstr "注意"
358
359 #. type: Plain text
360 #: build/C/man2/alloc_hugepages.2:141
361 msgid ""
362 "These system calls are gone; they existed only in Linux 2.5.36 through to "
363 "2.5.54.  Now the hugetlbfs file system can be used instead.  Memory backed "
364 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
365 "map files in this virtual file system."
366 msgstr ""
367 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
368 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
369 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
370 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
371
372 #. type: Plain text
373 #: build/C/man2/alloc_hugepages.2:145
374 msgid ""
375 "The maximal number of huge pages can be specified using the B<hugepages=> "
376 "boot parameter."
377 msgstr ""
378 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
379
380 #. type: SH
381 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:153
382 #: build/C/man2/cacheflush.2:88 build/C/man2/fallocate.2:195
383 #: build/C/man2/madvise.2:360 build/C/man3/malloc_hook.3:138
384 #: build/C/man3/mallopt.3:580 build/C/man2/mlock.2:337 build/C/man2/mmap.2:671
385 #: build/C/man2/mmap2.2:98 build/C/man2/mprotect.2:223
386 #: build/C/man2/mremap.2:214 build/C/man2/msync.2:122
387 #: build/C/man3/mtrace.3:170 build/C/man2/posix_fadvise.2:188
388 #: build/C/man3/posix_fallocate.3:130 build/C/man3/posix_memalign.3:275
389 #: build/C/man2/readahead.2:98 build/C/man2/remap_file_pages.2:162
390 #: build/C/man3/shm_open.3:280 build/C/man7/shm_overview.7:127
391 #: build/C/man2/shmctl.2:410 build/C/man2/shmget.2:298
392 #: build/C/man2/shmop.2:290 build/C/man2/subpage_prot.2:126
393 #: build/C/man2/sync_file_range.2:222 build/C/man3/malloc_get_state.3:112
394 #: build/C/man3/malloc_trim.3:80 build/C/man3/malloc_usable_size.3:62
395 #: build/C/man3/mcheck.3:211
396 #, no-wrap
397 msgid "COLOPHON"
398 msgstr "この文書について"
399
400 #. type: Plain text
401 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:160
402 #: build/C/man2/cacheflush.2:95 build/C/man2/fallocate.2:202
403 #: build/C/man2/madvise.2:367 build/C/man3/malloc_hook.3:145
404 #: build/C/man3/mallopt.3:587 build/C/man2/mlock.2:344 build/C/man2/mmap.2:678
405 #: build/C/man2/mmap2.2:105 build/C/man2/mprotect.2:230
406 #: build/C/man2/mremap.2:221 build/C/man2/msync.2:129
407 #: build/C/man3/mtrace.3:177 build/C/man2/posix_fadvise.2:195
408 #: build/C/man3/posix_fallocate.3:137 build/C/man3/posix_memalign.3:282
409 #: build/C/man2/readahead.2:105 build/C/man2/remap_file_pages.2:169
410 #: build/C/man3/shm_open.3:287 build/C/man7/shm_overview.7:134
411 #: build/C/man2/shmctl.2:417 build/C/man2/shmget.2:305
412 #: build/C/man2/shmop.2:297 build/C/man2/subpage_prot.2:133
413 #: build/C/man2/sync_file_range.2:229 build/C/man3/malloc_get_state.3:119
414 #: build/C/man3/malloc_trim.3:87 build/C/man3/malloc_usable_size.3:69
415 #: build/C/man3/mcheck.3:218
416 msgid ""
417 "This page is part of release 3.40 of the Linux I<man-pages> project.  A "
418 "description of the project, and information about reporting bugs, can be "
419 "found at http://www.kernel.org/doc/man-pages/."
420 msgstr ""
421 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.40 の一部\n"
422 "である。プロジェクトの説明とバグ報告に関する情報は\n"
423 "http://www.kernel.org/doc/man-pages/ に書かれている。"
424
425 #. type: TH
426 #: build/C/man3/alloca.3:41
427 #, no-wrap
428 msgid "ALLOCA"
429 msgstr "ALLOCA"
430
431 #. type: TH
432 #: build/C/man3/alloca.3:41
433 #, no-wrap
434 msgid "2008-01-24"
435 msgstr "2008-01-24"
436
437 #. type: TH
438 #: build/C/man3/alloca.3:41 build/C/man3/malloc_hook.3:6
439 #: build/C/man3/mtrace.3:23 build/C/man3/posix_fallocate.3:23
440 #: build/C/man3/posix_memalign.3:28 build/C/man3/malloc_get_state.3:23
441 #: build/C/man3/malloc_usable_size.3:23 build/C/man3/mcheck.3:23
442 #, no-wrap
443 msgid "GNU"
444 msgstr "GNU"
445
446 #. type: Plain text
447 #: build/C/man3/alloca.3:44
448 msgid "alloca - allocate memory that is automatically freed"
449 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
450
451 #. type: Plain text
452 #: build/C/man3/alloca.3:46
453 msgid "B<#include E<lt>alloca.hE<gt>>"
454 msgstr "B<#include E<lt>alloca.hE<gt>>"
455
456 #. type: Plain text
457 #: build/C/man3/alloca.3:48
458 msgid "B<void *alloca(size_t >I<size>B<);>"
459 msgstr "B<void *alloca(size_t >I<size>B<);>"
460
461 #. type: Plain text
462 #: build/C/man3/alloca.3:58
463 msgid ""
464 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
465 "frame of the caller.  This temporary space is automatically freed when the "
466 "function that called B<alloca>()  returns to its caller."
467 msgstr ""
468 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
469 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
470 "に自動的に解放される。"
471
472 #. type: Plain text
473 #: build/C/man3/alloca.3:63
474 msgid ""
475 "The B<alloca>()  function returns a pointer to the beginning of the "
476 "allocated space.  If the allocation causes stack overflow, program behavior "
477 "is undefined."
478 msgstr ""
479 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
480 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
481 "い。"
482
483 #. type: Plain text
484 #: build/C/man3/alloca.3:65
485 msgid "This function is not in POSIX.1-2001."
486 msgstr "この関数は POSIX.1-2001 にはない。"
487
488 #. type: Plain text
489 #: build/C/man3/alloca.3:71
490 msgid ""
491 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
492 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
493 "the GNU version."
494 msgstr ""
495 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
496 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
497 "は POSIX.1-2001 にはない。"
498
499 #. type: Plain text
500 #: build/C/man3/alloca.3:86
501 msgid ""
502 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
503 "applications, its use can improve efficiency compared to the use of B<malloc>"
504 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
505 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
506 "Otherwise, its use is discouraged."
507 msgstr ""
508 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
509 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
510 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
511 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
512 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
513
514 #. type: Plain text
515 #: build/C/man3/alloca.3:95
516 msgid ""
517 "Because the space allocated by B<alloca>()  is allocated within the stack "
518 "frame, that space is automatically freed if the function return is jumped "
519 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
520 msgstr ""
521 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
522 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
523 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
524
525 #. type: Plain text
526 #: build/C/man3/alloca.3:100
527 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
528 msgstr ""
529 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
530 "に!"
531
532 #. type: SS
533 #: build/C/man3/alloca.3:100
534 #, no-wrap
535 msgid "Notes on the GNU Version"
536 msgstr "GNU 版についての注意"
537
538 #. type: Plain text
539 #: build/C/man3/alloca.3:122
540 msgid ""
541 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
542 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
543 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
544 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
545 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
546 msgstr ""
547 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
548 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
549 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
550 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
551 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
552 "ので注意すること。"
553
554 #. type: Plain text
555 #: build/C/man3/alloca.3:125
556 #, no-wrap
557 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
558 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
559
560 #. type: Plain text
561 #: build/C/man3/alloca.3:128
562 msgid "with messy consequences if one has a private version of this function."
563 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
564
565 #. type: Plain text
566 #: build/C/man3/alloca.3:132
567 msgid ""
568 "The fact that the code is inlined means that it is impossible to take the "
569 "address of this function, or to change its behavior by linking with a "
570 "different library."
571 msgstr ""
572 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
573 "のライブラリをリンクして動作を変更することはできない。"
574
575 #. type: Plain text
576 #: build/C/man3/alloca.3:136
577 msgid ""
578 "The inlined code often consists of a single instruction adjusting the stack "
579 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
580 "error return."
581 msgstr ""
582 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
583 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
584 "よって NULL エラーが返されることはない。"
585
586 #. type: SH
587 #: build/C/man3/alloca.3:136 build/C/man2/cacheflush.2:81
588 #: build/C/man3/mallopt.3:404 build/C/man2/mlock.2:305 build/C/man2/mmap.2:544
589 #: build/C/man3/mtrace.3:100 build/C/man2/posix_fadvise.2:177
590 #: build/C/man2/shmget.2:284
591 #, no-wrap
592 msgid "BUGS"
593 msgstr "バグ"
594
595 #. type: Plain text
596 #: build/C/man3/alloca.3:141
597 msgid ""
598 "There is no error indication if the stack frame cannot be extended.  "
599 "(However, after a failed allocation, the program is likely to receive a "
600 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
601 msgstr ""
602 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
603 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
604 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
605
606 #. type: Plain text
607 #: build/C/man3/alloca.3:149
608 msgid ""
609 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
610 "a function call, because the stack space reserved by B<alloca>()  would "
611 "appear on the stack in the middle of the space for the function arguments."
612 msgstr ""
613 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
614 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
615 "使われるスタック領域の中に現れてしまうためである。"
616
617 #. type: SH
618 #: build/C/man3/alloca.3:149 build/C/man2/fallocate.2:191
619 #: build/C/man2/madvise.2:353 build/C/man3/malloc_hook.3:133
620 #: build/C/man3/mallopt.3:568 build/C/man2/mlock.2:330 build/C/man2/mmap.2:653
621 #: build/C/man2/mmap2.2:92 build/C/man2/mprotect.2:220
622 #: build/C/man2/mremap.2:200 build/C/man2/msync.2:118
623 #: build/C/man3/mtrace.3:165 build/C/man2/posix_fadvise.2:182
624 #: build/C/man3/posix_fallocate.3:126 build/C/man3/posix_memalign.3:270
625 #: build/C/man2/readahead.2:92 build/C/man2/remap_file_pages.2:155
626 #: build/C/man3/shm_open.3:269 build/C/man7/shm_overview.7:114
627 #: build/C/man2/shmctl.2:403 build/C/man2/shmget.2:290
628 #: build/C/man2/shmop.2:282 build/C/man2/subpage_prot.2:120
629 #: build/C/man2/sync_file_range.2:217 build/C/man3/malloc_get_state.3:109
630 #: build/C/man3/malloc_trim.3:76 build/C/man3/malloc_usable_size.3:60
631 #: build/C/man3/mcheck.3:204
632 #, no-wrap
633 msgid "SEE ALSO"
634 msgstr "関連項目"
635
636 #. type: Plain text
637 #: build/C/man3/alloca.3:153
638 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
639 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
640
641 #. type: TH
642 #: build/C/man2/cacheflush.2:24
643 #, no-wrap
644 msgid "CACHEFLUSH"
645 msgstr "CACHEFLUSH"
646
647 #. type: TH
648 #: build/C/man2/cacheflush.2:24
649 #, no-wrap
650 msgid "2007-05-26"
651 msgstr "2007-05-26"
652
653 #. type: Plain text
654 #: build/C/man2/cacheflush.2:27
655 msgid "cacheflush - flush contents of instruction and/or data cache"
656 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
657
658 #. type: Plain text
659 #: build/C/man2/cacheflush.2:30
660 #, no-wrap
661 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
662 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
663
664 #. type: Plain text
665 #: build/C/man2/cacheflush.2:32
666 #, no-wrap
667 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
668 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
669
670 #. type: Plain text
671 #: build/C/man2/cacheflush.2:42
672 msgid ""
673 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
674 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
675 "of:"
676 msgstr ""
677 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
678 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
679 "指定する:"
680
681 #. type: TP
682 #: build/C/man2/cacheflush.2:42
683 #, no-wrap
684 msgid "B<ICACHE>"
685 msgstr "B<ICACHE>"
686
687 #. type: Plain text
688 #: build/C/man2/cacheflush.2:45
689 msgid "Flush the instruction cache."
690 msgstr "命令 (instruction) キャッシュをフラッシュする。"
691
692 #. type: TP
693 #: build/C/man2/cacheflush.2:45
694 #, no-wrap
695 msgid "B<DCACHE>"
696 msgstr "B<DCACHE>"
697
698 #. type: Plain text
699 #: build/C/man2/cacheflush.2:48
700 msgid "Write back to memory and invalidate the affected valid cache lines."
701 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
702
703 #. type: TP
704 #: build/C/man2/cacheflush.2:48
705 #, no-wrap
706 msgid "B<BCACHE>"
707 msgstr "B<BCACHE>"
708
709 #. type: Plain text
710 #: build/C/man2/cacheflush.2:52
711 msgid "Same as B<(ICACHE|DCACHE)>."
712 msgstr "B<(ICACHE|DCACHE)> と同じ。"
713
714 #. type: Plain text
715 #: build/C/man2/cacheflush.2:58
716 msgid ""
717 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
718 "detected, I<errno> will indicate the error."
719 msgstr ""
720 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
721 "出された場合は I<errno> にエラーが指示される。"
722
723 #. type: TP
724 #: build/C/man2/cacheflush.2:59 build/C/man2/mmap2.2:62
725 #: build/C/man2/mremap.2:143 build/C/man2/shmctl.2:303
726 #: build/C/man2/subpage_prot.2:67
727 #, no-wrap
728 msgid "B<EFAULT>"
729 msgstr "B<EFAULT>"
730
731 #. type: Plain text
732 #: build/C/man2/cacheflush.2:66
733 msgid ""
734 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
735 "accessible."
736 msgstr ""
737 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
738 "能ではない。"
739
740 #. type: TP
741 #: build/C/man2/cacheflush.2:66 build/C/man2/fallocate.2:124
742 #: build/C/man2/madvise.2:264 build/C/man2/mlock.2:158
743 #: build/C/man2/mlock.2:165 build/C/man2/mlock.2:177 build/C/man2/mmap.2:421
744 #: build/C/man2/mmap.2:429 build/C/man2/mmap.2:434 build/C/man2/mmap2.2:65
745 #: build/C/man2/mprotect.2:89 build/C/man2/mremap.2:152
746 #: build/C/man2/msync.2:80 build/C/man2/posix_fadvise.2:93
747 #: build/C/man3/posix_fallocate.3:79 build/C/man3/posix_memalign.3:156
748 #: build/C/man2/readahead.2:76 build/C/man2/remap_file_pages.2:130
749 #: build/C/man2/remap_file_pages.2:137 build/C/man3/shm_open.3:211
750 #: build/C/man2/shmctl.2:317 build/C/man2/shmget.2:196
751 #: build/C/man2/shmop.2:195 build/C/man2/shmop.2:218
752 #: build/C/man2/subpage_prot.2:72 build/C/man2/sync_file_range.2:152
753 #, no-wrap
754 msgid "B<EINVAL>"
755 msgstr "B<EINVAL>"
756
757 #. type: Plain text
758 #: build/C/man2/cacheflush.2:74
759 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
760 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
761
762 #.  FIXME This system call was only on MIPS back in 1.2 days, but
763 #.  by now it is on a number of other architectures (but not i386).
764 #.  Investigate the details and update this page.
765 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
766 #. type: Plain text
767 #: build/C/man2/cacheflush.2:81
768 msgid ""
769 "This Linux-specific system call is only available on MIPS-based systems.  It "
770 "should not be used in programs intended to be portable."
771 msgstr ""
772 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
773 "植を意図したプログラムで使用すべきではない。"
774
775 #. type: Plain text
776 #: build/C/man2/cacheflush.2:88
777 msgid ""
778 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
779 "Therefore, the whole cache is always flushed."
780 msgstr ""
781 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
782 "のキャッシュがフラッシュされる。"
783
784 #. type: TH
785 #: build/C/man2/fallocate.2:8
786 #, no-wrap
787 msgid "FALLOCATE"
788 msgstr "FALLOCATE"
789
790 #. type: TH
791 #: build/C/man2/fallocate.2:8
792 #, fuzzy, no-wrap
793 #| msgid "2012-03-23"
794 msgid "2012-04-23"
795 msgstr "2012-03-23"
796
797 #. type: Plain text
798 #: build/C/man2/fallocate.2:11
799 msgid "fallocate - manipulate file space"
800 msgstr "fallocate - ファイル空間の操作"
801
802 #. type: Plain text
803 #: build/C/man2/fallocate.2:15 build/C/man2/readahead.2:35
804 #, no-wrap
805 msgid ""
806 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
807 "B<#include E<lt>fcntl.hE<gt>>\n"
808 msgstr ""
809 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
810 "B<#include E<lt>fcntl.hE<gt>>\n"
811
812 #. type: Plain text
813 #: build/C/man2/fallocate.2:18
814 #, no-wrap
815 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
816 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
817
818 #. type: Plain text
819 #: build/C/man2/fallocate.2:24
820 msgid ""
821 "This is a nonportable, Linux-specific system call.  For the portable, "
822 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
823 "B<posix_fallocate>(3)."
824 msgstr ""
825 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
826 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
827 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
828
829 #. type: Plain text
830 #: build/C/man2/fallocate.2:34
831 msgid ""
832 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
833 "space for the file referred to by I<fd> for the byte range starting at "
834 "I<offset> and continuing for I<len> bytes."
835 msgstr ""
836 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
837 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
838 "域である。"
839
840 #. type: Plain text
841 #: build/C/man2/fallocate.2:39
842 msgid ""
843 "The I<mode> argument determines the operation to be performed on the given "
844 "range.  Details of the supported operations are given in the subsections "
845 "below."
846 msgstr ""
847 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
848 "サポートされている操作の詳細は以下のサブセクションで説明する。"
849
850 #. type: SS
851 #: build/C/man2/fallocate.2:39
852 #, no-wrap
853 msgid "Allocating disk space"
854 msgstr "ディスク領域の割り当て"
855
856 #. type: Plain text
857 #: build/C/man2/fallocate.2:58
858 msgid ""
859 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
860 "and initializes to zero the disk space within the range specified by "
861 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
862 "changed if I<offset>+I<len> is greater than the file size.  This default "
863 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
864 "library function, and is intended as a method of optimally implementing that "
865 "function."
866 msgstr ""
867 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
868 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
869 "う。\n"
870 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
871 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
872 "は、\n"
873 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
874 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
875 "ことを目的としているからである。"
876
877 #. type: Plain text
878 #: build/C/man2/fallocate.2:64
879 msgid ""
880 "After a successful call, subsequent writes into the range specified by "
881 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
882 "space."
883 msgstr ""
884
885 #. type: Plain text
886 #: build/C/man2/fallocate.2:75
887 msgid ""
888 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
889 "the call is similar, but the file size will not be changed even if I<offset>"
890 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
891 "the end of the file in this manner is useful for optimizing append workloads."
892 msgstr ""
893 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
894 "ル\n"
895 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
896 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
897 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
898 "追記を最適化したい場合に役に立つ。"
899
900 #. type: Plain text
901 #: build/C/man2/fallocate.2:79
902 msgid ""
903 "Because allocation is done in block size chunks, B<fallocate>()  may "
904 "allocate a larger range of disk space than was specified."
905 msgstr ""
906 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
907 "り\n"
908 "も大きなディスク領域を割り当てることがある。"
909
910 #. type: SS
911 #: build/C/man2/fallocate.2:79
912 #, no-wrap
913 msgid "Deallocating file space"
914 msgstr "ファイル空間の割り当て解除"
915
916 #. type: Plain text
917 #: build/C/man2/fallocate.2:94
918 msgid ""
919 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
920 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
921 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
922 "range, partial file system blocks are zeroed, and whole file system blocks "
923 "are removed from the file.  After a successful call, subsequent reads from "
924 "this range will return zeroes."
925 msgstr ""
926
927 #. type: Plain text
928 #: build/C/man2/fallocate.2:105
929 msgid ""
930 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
931 "I<mode>; in other words, even when punching off the end of the file, the "
932 "file size (as reported by B<stat>(2))  does not change."
933 msgstr ""
934
935 #. type: Plain text
936 #: build/C/man2/fallocate.2:109
937 msgid ""
938 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
939 "doesn't support the operation, an error is returned."
940 msgstr ""
941
942 #. type: Plain text
943 #: build/C/man2/fallocate.2:112
944 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
945 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
946
947 #. type: TP
948 #: build/C/man2/fallocate.2:113 build/C/man2/madvise.2:261
949 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:90
950 #: build/C/man3/posix_fallocate.3:71 build/C/man2/readahead.2:72
951 #: build/C/man2/sync_file_range.2:148
952 #, no-wrap
953 msgid "B<EBADF>"
954 msgstr "B<EBADF>"
955
956 #. type: Plain text
957 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
958 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
959 msgstr ""
960 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
961 "いない。"
962
963 #. type: TP
964 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
965 #, no-wrap
966 msgid "B<EFBIG>"
967 msgstr "B<EFBIG>"
968
969 #. type: Plain text
970 #: build/C/man2/fallocate.2:121
971 msgid "I<offset>+I<len> exceeds the maximum file size."
972 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
973
974 #. type: TP
975 #: build/C/man2/fallocate.2:121
976 #, no-wrap
977 msgid "B<EINTR>"
978 msgstr "B<EINTR>"
979
980 #. type: Plain text
981 #: build/C/man2/fallocate.2:124
982 msgid "A signal was caught during execution."
983 msgstr "実行中にシグナルが捕捉された。"
984
985 #. type: Plain text
986 #: build/C/man2/fallocate.2:136 build/C/man3/posix_fallocate.3:85
987 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
988 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
989
990 #. type: TP
991 #: build/C/man2/fallocate.2:136 build/C/man2/madvise.2:292
992 #: build/C/man2/sync_file_range.2:160
993 #, no-wrap
994 msgid "B<EIO>"
995 msgstr "B<EIO>"
996
997 #. type: Plain text
998 #: build/C/man2/fallocate.2:139
999 msgid "An I/O error occurred while reading from or writing to a file system."
1000 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1001
1002 #. type: TP
1003 #: build/C/man2/fallocate.2:139 build/C/man2/mmap.2:450
1004 #: build/C/man3/posix_fallocate.3:85
1005 #, no-wrap
1006 msgid "B<ENODEV>"
1007 msgstr "B<ENODEV>"
1008
1009 #. type: Plain text
1010 #: build/C/man2/fallocate.2:146
1011 msgid ""
1012 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1013 "or FIFO, a different error results.)"
1014 msgstr ""
1015 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1016 "を参照している場合、別のエラーが発生する)。"
1017
1018 #. type: TP
1019 #: build/C/man2/fallocate.2:146 build/C/man3/posix_fallocate.3:89
1020 #: build/C/man2/shmget.2:214 build/C/man2/sync_file_range.2:166
1021 #, no-wrap
1022 msgid "B<ENOSPC>"
1023 msgstr "B<ENOSPC>"
1024
1025 #. type: Plain text
1026 #: build/C/man2/fallocate.2:151 build/C/man3/posix_fallocate.3:94
1027 msgid ""
1028 "There is not enough space left on the device containing the file referred to "
1029 "by I<fd>."
1030 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1031
1032 #. type: Plain text
1033 #: build/C/man2/fallocate.2:155
1034 msgid "This kernel does not implement B<fallocate>()."
1035 msgstr ""
1036
1037 #. type: TP
1038 #: build/C/man2/fallocate.2:155
1039 #, no-wrap
1040 msgid "B<EOPNOTSUPP>"
1041 msgstr "B<EOPNOTSUPP>"
1042
1043 #. type: Plain text
1044 #: build/C/man2/fallocate.2:164
1045 #, fuzzy
1046 #| msgid ""
1047 #| "The file system containing the file referred to by I<fd> does not support "
1048 #| "this operation."
1049 msgid ""
1050 "The file system containing the file referred to by I<fd> does not support "
1051 "this operation; or the I<mode> is not supported by the file system "
1052 "containing the file referred to by I<fd>."
1053 msgstr ""
1054 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作をサポートして"
1055 "いない。"
1056
1057 #. type: TP
1058 #: build/C/man2/fallocate.2:164 build/C/man2/mlock.2:144
1059 #: build/C/man2/mlock.2:183 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:342
1060 #: build/C/man2/shmget.2:222
1061 #, no-wrap
1062 msgid "B<EPERM>"
1063 msgstr "B<EPERM>"
1064
1065 #. type: Plain text
1066 #: build/C/man2/fallocate.2:180
1067 msgid ""
1068 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1069 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1070 "is marked append-only (see B<chattr>(1))."
1071 msgstr ""
1072
1073 #. type: TP
1074 #: build/C/man2/fallocate.2:180 build/C/man2/posix_fadvise.2:96
1075 #: build/C/man3/posix_fallocate.3:94 build/C/man2/sync_file_range.2:169
1076 #, no-wrap
1077 msgid "B<ESPIPE>"
1078 msgstr "B<ESPIPE>"
1079
1080 #. type: Plain text
1081 #: build/C/man2/fallocate.2:184
1082 msgid "I<fd> refers to a pipe or FIFO."
1083 msgstr "I<fd> がパイプか FIFO を参照している。"
1084
1085 #. type: SH
1086 #: build/C/man2/fallocate.2:184 build/C/man2/mmap2.2:74
1087 #: build/C/man2/posix_fadvise.2:103 build/C/man3/posix_fallocate.3:98
1088 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1089 #: build/C/man2/remap_file_pages.2:146 build/C/man3/shm_open.3:247
1090 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:177
1091 #: build/C/man3/mcheck.3:133
1092 #, no-wrap
1093 msgid "VERSIONS"
1094 msgstr "バージョン"
1095
1096 #. type: Plain text
1097 #: build/C/man2/fallocate.2:188
1098 msgid ""
1099 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1100 "provided by glibc since version 2.10."
1101 msgstr ""
1102 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1103 "対応はバージョン 3.10 以降で行われている。"
1104
1105 #. type: Plain text
1106 #: build/C/man2/fallocate.2:191
1107 msgid "B<fallocate>()  is Linux-specific."
1108 msgstr "B<fallocate>()  は Linux 固有である。"
1109
1110 #. type: Plain text
1111 #: build/C/man2/fallocate.2:195
1112 msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1113 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1114
1115 #. type: TH
1116 #: build/C/man2/madvise.2:35
1117 #, no-wrap
1118 msgid "MADVISE"
1119 msgstr "MADVISE"
1120
1121 #. type: TH
1122 #: build/C/man2/madvise.2:35
1123 #, no-wrap
1124 msgid "2011-09-18"
1125 msgstr "2011-09-18"
1126
1127 #. type: Plain text
1128 #: build/C/man2/madvise.2:38
1129 msgid "madvise - give advice about use of memory"
1130 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1131
1132 #. type: Plain text
1133 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1134 #: build/C/man3/shm_open.3:31
1135 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1136 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1137
1138 #. type: Plain text
1139 #: build/C/man2/madvise.2:42
1140 msgid ""
1141 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1142 msgstr ""
1143 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1144
1145 #. type: Plain text
1146 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:42
1147 #: build/C/man3/posix_fallocate.3:37 build/C/man3/posix_memalign.3:48
1148 msgid ""
1149 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1150 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1151
1152 #. type: Plain text
1153 #: build/C/man2/madvise.2:50
1154 msgid "B<madvise>(): _BSD_SOURCE"
1155 msgstr "B<madvise>(): _BSD_SOURCE"
1156
1157 #. type: Plain text
1158 #: build/C/man2/madvise.2:68
1159 msgid ""
1160 "The B<madvise>()  system call advises the kernel about how to handle paging "
1161 "input/output in the address range beginning at address I<addr> and with size "
1162 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1163 "to use some mapped or shared memory areas, so that the kernel can choose "
1164 "appropriate read-ahead and caching techniques.  This call does not influence "
1165 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1166 "but may influence its performance.  The kernel is free to ignore the advice."
1167 msgstr ""
1168 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1169 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1170 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1171 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1172 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1173 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1174 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1175
1176 #. type: Plain text
1177 #: build/C/man2/madvise.2:72
1178 msgid "The advice is indicated in the I<advice> argument which can be"
1179 msgstr ""
1180 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1181
1182 #. type: TP
1183 #: build/C/man2/madvise.2:72
1184 #, no-wrap
1185 msgid "B<MADV_NORMAL>"
1186 msgstr "B<MADV_NORMAL>"
1187
1188 #. type: Plain text
1189 #: build/C/man2/madvise.2:76
1190 msgid "No special treatment.  This is the default."
1191 msgstr "特別な扱いは行わない。これがデフォルトである。"
1192
1193 #. type: TP
1194 #: build/C/man2/madvise.2:76
1195 #, no-wrap
1196 msgid "B<MADV_RANDOM>"
1197 msgstr "B<MADV_RANDOM>"
1198
1199 #. type: Plain text
1200 #: build/C/man2/madvise.2:80
1201 msgid ""
1202 "Expect page references in random order.  (Hence, read ahead may be less "
1203 "useful than normally.)"
1204 msgstr ""
1205 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1206 "なさそうだ。)"
1207
1208 #. type: TP
1209 #: build/C/man2/madvise.2:80
1210 #, no-wrap
1211 msgid "B<MADV_SEQUENTIAL>"
1212 msgstr "B<MADV_SEQUENTIAL>"
1213
1214 #. type: Plain text
1215 #: build/C/man2/madvise.2:85
1216 msgid ""
1217 "Expect page references in sequential order.  (Hence, pages in the given "
1218 "range can be aggressively read ahead, and may be freed soon after they are "
1219 "accessed.)"
1220 msgstr ""
1221 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1222 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1223 "して良い。)"
1224
1225 #. type: TP
1226 #: build/C/man2/madvise.2:85
1227 #, no-wrap
1228 msgid "B<MADV_WILLNEED>"
1229 msgstr "B<MADV_WILLNEED>"
1230
1231 #. type: Plain text
1232 #: build/C/man2/madvise.2:89
1233 msgid ""
1234 "Expect access in the near future.  (Hence, it might be a good idea to read "
1235 "some pages ahead.)"
1236 msgstr ""
1237 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1238 "ておくといいだろう。)"
1239
1240 #. type: TP
1241 #: build/C/man2/madvise.2:89
1242 #, no-wrap
1243 msgid "B<MADV_DONTNEED>"
1244 msgstr "B<MADV_DONTNEED>"
1245
1246 #. type: Plain text
1247 #: build/C/man2/madvise.2:100
1248 msgid ""
1249 "Do not expect access in the near future.  (For the time being, the "
1250 "application is finished with the given range, so the kernel can free "
1251 "resources associated with it.)  Subsequent accesses of pages in this range "
1252 "will succeed, but will result either in reloading of the memory contents "
1253 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1254 "pages for mappings without an underlying file."
1255 msgstr ""
1256 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1257 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1258 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1259 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1260 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1261 "なる。"
1262
1263 #. type: TP
1264 #: build/C/man2/madvise.2:100
1265 #, no-wrap
1266 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1267 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1268
1269 #.  2.6.18-rc5
1270 #.  Databases want to use this feature to drop a section of their
1271 #.  bufferpool (shared memory segments) - without writing back to
1272 #.  disk/swap space.  This feature is also useful for supporting
1273 #.  hot-plug memory on UML.
1274 #. type: Plain text
1275 #: build/C/man2/madvise.2:113
1276 msgid ""
1277 "Free up a given range of pages and its associated backing store.  Currently, "
1278 "only shmfs/tmpfs supports this; other file systems return with the error "
1279 "B<ENOSYS>."
1280 msgstr ""
1281 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1282 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1283 "返される。"
1284
1285 #. type: TP
1286 #: build/C/man2/madvise.2:113
1287 #, no-wrap
1288 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1289 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1290
1291 #.  See http://lwn.net/Articles/171941/
1292 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1293 #.  Currently, copy-on-write may change the physical address of
1294 #.  a page even if the user requested that the page is pinned in
1295 #.  memory (either by mlock or by get_user_pages).  This happens
1296 #.  if the process forks meanwhile, and the parent writes to that
1297 #.  page.  As a result, the page is orphaned: in case of
1298 #.  get_user_pages, the application will never see any data hardware
1299 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1300 #.  the parent is not getting the realtime/security benefits of mlock.
1301 #.  In particular, this affects the Infiniband modules which do DMA from
1302 #.  and into user pages all the time.
1303 #.  This patch adds madvise options to control whether memory range is
1304 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1305 #.  from/into these pages.  Could also be useful to an application
1306 #.  wanting to speed up its forks by cutting large areas out of
1307 #.  consideration.
1308 #.  SEE ALSO: http://lwn.net/Articles/171941/
1309 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1310 #. type: Plain text
1311 #: build/C/man2/madvise.2:144
1312 msgid ""
1313 "Do not make the pages in this range available to the child after a B<fork>"
1314 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1315 "physical location of a page(s) if the parent writes to it after a B<fork>"
1316 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1317 "page(s).)"
1318 msgstr ""
1319 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1320 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1321 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1322 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1323 "を行うような場合に 問題を起こすことがある)。"
1324
1325 #. type: TP
1326 #: build/C/man2/madvise.2:144
1327 #, no-wrap
1328 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1329 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1330
1331 #. type: Plain text
1332 #: build/C/man2/madvise.2:150
1333 msgid ""
1334 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1335 "a mapping is inherited across B<fork>(2)."
1336 msgstr ""
1337 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1338 "(2)  の前後でマッピングは継承されるようになる。"
1339
1340 #. type: TP
1341 #: build/C/man2/madvise.2:150
1342 #, no-wrap
1343 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1344 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1345
1346 #. type: Plain text
1347 #: build/C/man2/madvise.2:162
1348 msgid ""
1349 "Poison a page and handle it like a hardware memory corruption.  This "
1350 "operation is only available for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1351 "This operation may result in the calling process receiving a B<SIGBUS> and "
1352 "the page being unmapped.  This feature is intended for testing of memory "
1353 "error-handling code; it is only available if the kernel was configured with "
1354 "B<CONFIG_MEMORY_FAILURE>."
1355 msgstr ""
1356
1357 #. type: TP
1358 #: build/C/man2/madvise.2:162
1359 #, no-wrap
1360 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1361 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1362
1363 #. type: Plain text
1364 #: build/C/man2/madvise.2:180
1365 msgid ""
1366 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1367 "memory of each page in the specified range is preserved (i.e., when next "
1368 "accessed, the same content will be visible, but in a new physical page "
1369 "frame), and the original page is offlined (i.e., no longer used, and taken "
1370 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1371 "operation is invisible to (i.e., does not change the semantics of)  the "
1372 "calling process.  This feature is intended for testing of memory error-"
1373 "handling code; it is only available if the kernel was configured with "
1374 "B<CONFIG_MEMORY_FAILURE>."
1375 msgstr ""
1376
1377 #. type: TP
1378 #: build/C/man2/madvise.2:180
1379 #, no-wrap
1380 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1381 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1382
1383 #. type: Plain text
1384 #: build/C/man2/madvise.2:205
1385 msgid ""
1386 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1387 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1388 "memory that have been marked as mergeable, looking for pages with identical "
1389 "content.  These are replaced by a single write-protected page (which is "
1390 "automatically copied if a process later wants to update the content of the "
1391 "page).  KSM only merges private anonymous pages (see B<mmap>(2)).  The KSM "
1392 "feature is intended for applications that generate many instances of the "
1393 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1394 "of processing power; use with care.  See the kernel source file "
1395 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1396 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1397 "configured with B<CONFIG_KSM>."
1398 msgstr ""
1399
1400 #. type: TP
1401 #: build/C/man2/madvise.2:205
1402 #, no-wrap
1403 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1404 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1405
1406 #. type: Plain text
1407 #: build/C/man2/madvise.2:214
1408 msgid ""
1409 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1410 "address range; KSM unmerges whatever pages it had merged in the address "
1411 "range specified by I<addr> and I<length>."
1412 msgstr ""
1413
1414 #. type: TP
1415 #: build/C/man2/madvise.2:214
1416 #, no-wrap
1417 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1418 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1419
1420 #.  http://lwn.net/Articles/358904/
1421 #.  https://lwn.net/Articles/423584/
1422 #. type: Plain text
1423 #: build/C/man2/madvise.2:243
1424 msgid ""
1425 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1426 "I<addr> and I<length>.  Currently, Transparent Huge Pages only work with "
1427 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1428 "the areas marked as huge page candidates to replace them with huge pages.  "
1429 "The kernel will also allocate huge pages directly when the region is "
1430 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1431 "feature is primarily aimed at applications that use large mappings of data "
1432 "and access large regions of that memory at a time (e.g. virtualization "
1433 "systems such as QEMU).  It can very easily waste memory (e.g. a 2MB mapping "
1434 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1435 "one 4KB page).  See the kernel source file I<Documentation/vm/transhuge.txt> "
1436 "for more details.  The B<MADV_HUGEPAGE> and B<MADV_NOHUGEPAGE> operations "
1437 "are only available if the kernel was configured with "
1438 "B<CONFIG_TRANSPARENT_HUGEPAGE>."
1439 msgstr ""
1440
1441 #. type: TP
1442 #: build/C/man2/madvise.2:243
1443 #, no-wrap
1444 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1445 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1446
1447 #. type: Plain text
1448 #: build/C/man2/madvise.2:250
1449 msgid ""
1450 "Ensures that memory in the address range specified by I<addr> and I<length> "
1451 "will not be collapsed into huge pages."
1452 msgstr ""
1453
1454 #. type: Plain text
1455 #: build/C/man2/madvise.2:257
1456 msgid ""
1457 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1458 "is set appropriately."
1459 msgstr ""
1460 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1461 "を適切な値に設定する。"
1462
1463 #. type: TP
1464 #: build/C/man2/madvise.2:258 build/C/man2/mlock.2:155 build/C/man2/mmap.2:411
1465 #: build/C/man2/mremap.2:137
1466 #, no-wrap
1467 msgid "B<EAGAIN>"
1468 msgstr "B<EAGAIN>"
1469
1470 #. type: Plain text
1471 #: build/C/man2/madvise.2:261
1472 msgid "A kernel resource was temporarily unavailable."
1473 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1474
1475 #. type: Plain text
1476 #: build/C/man2/madvise.2:264
1477 msgid "The map exists, but the area maps something that isn't a file."
1478 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1479
1480 #. type: Plain text
1481 #: build/C/man2/madvise.2:267
1482 msgid "This error can occur for the following reasons:"
1483 msgstr ""
1484
1485 #. type: IP
1486 #: build/C/man2/madvise.2:268 build/C/man2/madvise.2:274
1487 #: build/C/man2/madvise.2:277 build/C/man2/madvise.2:280
1488 #: build/C/man2/madvise.2:283 build/C/man3/mallopt.3:233
1489 #: build/C/man3/mallopt.3:239
1490 #, no-wrap
1491 msgid "*"
1492 msgstr ""
1493
1494 #.  .I len
1495 #.  is zero,
1496 #. type: Plain text
1497 #: build/C/man2/madvise.2:274
1498 msgid "The value I<len> is negative."
1499 msgstr "I<len> が負の値である。"
1500
1501 #. type: Plain text
1502 #: build/C/man2/madvise.2:277
1503 msgid "I<addr> is not page-aligned."
1504 msgstr ""
1505
1506 #. type: Plain text
1507 #: build/C/man2/madvise.2:280
1508 msgid "I<advice> is not a valid value"
1509 msgstr "I<advice> が有効な値でない。"
1510
1511 #. type: Plain text
1512 #: build/C/man2/madvise.2:283
1513 msgid ""
1514 "The application is attempting to release locked or shared pages (with "
1515 "B<MADV_DONTNEED>)."
1516 msgstr ""
1517 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1518 "放\n"
1519 "しようとしている。"
1520
1521 #. type: Plain text
1522 #: build/C/man2/madvise.2:291
1523 msgid ""
1524 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1525 "kernel was not configured with B<CONFIG_KSM>."
1526 msgstr ""
1527
1528 #. type: Plain text
1529 #: build/C/man2/madvise.2:298
1530 msgid ""
1531 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1532 "maximum resident set size."
1533 msgstr ""
1534 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1535 "(resident set size) の最大値を越えてしまう。"
1536
1537 #. type: TP
1538 #: build/C/man2/madvise.2:298 build/C/man2/madvise.2:303
1539 #: build/C/man2/mlock.2:124 build/C/man2/mlock.2:132 build/C/man2/mlock.2:170
1540 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:94
1541 #: build/C/man2/mprotect.2:97 build/C/man2/mremap.2:180
1542 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1543 #: build/C/man2/shmctl.2:326 build/C/man2/shmget.2:211
1544 #: build/C/man2/shmop.2:209 build/C/man2/subpage_prot.2:82
1545 #: build/C/man2/sync_file_range.2:163
1546 #, no-wrap
1547 msgid "B<ENOMEM>"
1548 msgstr "B<ENOMEM>"
1549
1550 #. type: Plain text
1551 #: build/C/man2/madvise.2:303
1552 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1553 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1554
1555 #. type: Plain text
1556 #: build/C/man2/madvise.2:307
1557 msgid ""
1558 "Addresses in the specified range are not currently mapped, or are outside "
1559 "the address space of the process."
1560 msgstr ""
1561 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1562 "空間の内部にない。"
1563
1564 #.  FIXME . Write a posix_fadvise(3) page.
1565 #. type: Plain text
1566 #: build/C/man2/madvise.2:319
1567 msgid ""
1568 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1569 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1570 "There is a similar B<posix_fadvise>(2)  for file access."
1571 msgstr ""
1572 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1573 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1574 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1575 "する。"
1576
1577 #. type: Plain text
1578 #: build/C/man2/madvise.2:328
1579 msgid ""
1580 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1581 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1582 msgstr ""
1583 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1584 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1585
1586 #. type: SS
1587 #: build/C/man2/madvise.2:329 build/C/man2/mlock.2:268
1588 #: build/C/man2/shmget.2:278
1589 #, no-wrap
1590 msgid "Linux Notes"
1591 msgstr "Linux での注意"
1592
1593 #. type: Plain text
1594 #: build/C/man2/madvise.2:337
1595 msgid ""
1596 "The current Linux implementation (2.4.0) views this system call more as a "
1597 "command than as advice and hence may return an error when it cannot do what "
1598 "it usually would do in response to this advice.  (See the ERRORS description "
1599 "above.)  This is nonstandard behavior."
1600 msgstr ""
1601 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1602 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1603 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1604 "とは異なる。"
1605
1606 #.  .SH HISTORY
1607 #.  The
1608 #.  .BR madvise ()
1609 #.  function first appeared in 4.4BSD.
1610 #. type: Plain text
1611 #: build/C/man2/madvise.2:353
1612 msgid ""
1613 "The Linux implementation requires that the address I<addr> be page-aligned, "
1614 "and allows I<length> to be zero.  If there are some parts of the specified "
1615 "address range that are not mapped, the Linux version of B<madvise>()  "
1616 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1617 "the system call, as it should)."
1618 msgstr ""
1619 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1620 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1621 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1622 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1623 "返す)。"
1624
1625 #. type: Plain text
1626 #: build/C/man2/madvise.2:360
1627 msgid ""
1628 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1629 "B<munmap>(2)"
1630 msgstr ""
1631 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1632 "B<munmap>(2)"
1633
1634 #. type: TH
1635 #: build/C/man3/malloc_hook.3:6
1636 #, no-wrap
1637 msgid "MALLOC_HOOK"
1638 msgstr "MALLOC_HOOK"
1639
1640 #. type: TH
1641 #: build/C/man3/malloc_hook.3:6
1642 #, no-wrap
1643 msgid "2010-10-13"
1644 msgstr "2010-10-13"
1645
1646 #. type: Plain text
1647 #: build/C/man3/malloc_hook.3:11
1648 msgid ""
1649 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1650 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
1651 msgstr ""
1652 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1653 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
1654
1655 #. type: Plain text
1656 #: build/C/man3/malloc_hook.3:14 build/C/man3/posix_memalign.3:40
1657 #, no-wrap
1658 msgid "B<#include E<lt>malloc.hE<gt>>\n"
1659 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
1660
1661 #. type: Plain text
1662 #: build/C/man3/malloc_hook.3:16
1663 #, no-wrap
1664 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1665 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1666
1667 #. type: Plain text
1668 #: build/C/man3/malloc_hook.3:19
1669 #, no-wrap
1670 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1671 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1672
1673 #. type: Plain text
1674 #: build/C/man3/malloc_hook.3:22
1675 #, no-wrap
1676 msgid ""
1677 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1678 "B<                         const void *>I<caller>B<);>\n"
1679 msgstr ""
1680 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1681 "B<                         const void *>I<caller>B<);>\n"
1682
1683 #. type: Plain text
1684 #: build/C/man3/malloc_hook.3:24
1685 #, no-wrap
1686 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1687 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1688
1689 #. type: Plain text
1690 #: build/C/man3/malloc_hook.3:26
1691 #, no-wrap
1692 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
1693 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
1694
1695 #. type: Plain text
1696 #: build/C/man3/malloc_hook.3:28
1697 #, no-wrap
1698 msgid "B<void (*__after_morecore_hook)(void);>\n"
1699 msgstr "B<void (*__after_morecore_hook)(void);>\n"
1700
1701 #. type: Plain text
1702 #: build/C/man3/malloc_hook.3:39
1703 msgid ""
1704 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
1705 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
1706 "these hooks to help you debug programs that use dynamic memory allocation, "
1707 "for example."
1708 msgstr ""
1709 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
1710 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
1711 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
1712 "ができる。"
1713
1714 #. type: Plain text
1715 #: build/C/man3/malloc_hook.3:46
1716 msgid ""
1717 "The variable B<__malloc_initialize_hook> points at a function that is called "
1718 "once when the malloc implementation is initialized.  This is a weak "
1719 "variable, so it can be overridden in the application with a definition like "
1720 "the following:"
1721 msgstr ""
1722 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
1723 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
1724 "ケーション内で 以下のような定義で上書きできる:"
1725
1726 #. type: Plain text
1727 #: build/C/man3/malloc_hook.3:49
1728 #, no-wrap
1729 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1730 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1731
1732 #. type: Plain text
1733 #: build/C/man3/malloc_hook.3:54
1734 msgid ""
1735 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
1736 msgstr ""
1737 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
1738
1739 #. type: Plain text
1740 #: build/C/man3/malloc_hook.3:70
1741 msgid ""
1742 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
1743 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
1744 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
1745 "except that they have a final argument I<caller> that gives the address of "
1746 "the caller of B<malloc>(3), etc."
1747 msgstr ""
1748 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
1749 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
1750 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
1751 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
1752 "出し元 (caller) のアドレスが格納される。"
1753
1754 #. type: Plain text
1755 #: build/C/man3/malloc_hook.3:76
1756 msgid ""
1757 "The variable B<__after_morecore_hook> points at a function that is called "
1758 "each time after B<sbrk>(2)  was asked for more memory."
1759 msgstr ""
1760 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
1761 "後で毎回呼び出される関数へのポインタである。"
1762
1763 #. type: Plain text
1764 #: build/C/man3/malloc_hook.3:78 build/C/man3/mtrace.3:78
1765 #: build/C/man3/malloc_get_state.3:86 build/C/man3/mcheck.3:146
1766 msgid "These functions are GNU extensions."
1767 msgstr "これらの関数は GNU による拡張である。"
1768
1769 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
1770 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
1771 #. type: Plain text
1772 #: build/C/man3/malloc_hook.3:85
1773 msgid ""
1774 "The use of these hook functions is not safe in multithreaded programs, and "
1775 "they are now deprecated.  Programmers should instead preempt calls to the "
1776 "relevant functions by defining and exporting functions such as \"malloc\" "
1777 "and \"free\"."
1778 msgstr ""
1779
1780 #. type: SH
1781 #: build/C/man3/malloc_hook.3:85 build/C/man3/mallopt.3:464
1782 #: build/C/man2/mmap.2:571 build/C/man2/mprotect.2:142
1783 #: build/C/man3/mtrace.3:106 build/C/man3/mcheck.3:159
1784 #, no-wrap
1785 msgid "EXAMPLE"
1786 msgstr "例"
1787
1788 #. type: Plain text
1789 #: build/C/man3/malloc_hook.3:87
1790 msgid "Here is a short example of how to use these variables."
1791 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
1792
1793 #. type: Plain text
1794 #: build/C/man3/malloc_hook.3:91
1795 #, no-wrap
1796 msgid ""
1797 "#include E<lt>stdio.hE<gt>\n"
1798 "#include E<lt>malloc.hE<gt>\n"
1799 msgstr ""
1800 "#include E<lt>stdio.hE<gt>\n"
1801 "#include E<lt>malloc.hE<gt>\n"
1802
1803 #. type: Plain text
1804 #: build/C/man3/malloc_hook.3:95
1805 #, no-wrap
1806 msgid ""
1807 "/* Prototypes for our hooks.  */\n"
1808 "static void my_init_hook(void);\n"
1809 "static void *my_malloc_hook(size_t, const void *);\n"
1810 msgstr ""
1811 "/* 使おうとするフックのプロトタイプ宣言 */\n"
1812 "static void my_init_hook(void);\n"
1813 "static void *my_malloc_hook(size_t, const void *);\n"
1814
1815 #. type: Plain text
1816 #: build/C/man3/malloc_hook.3:98
1817 #, no-wrap
1818 msgid ""
1819 "/* Variables to save original hooks. */\n"
1820 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1821 msgstr ""
1822 "/* 元々のフックを保存するための変数 */\n"
1823 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1824
1825 #. type: Plain text
1826 #: build/C/man3/malloc_hook.3:101
1827 #, no-wrap
1828 msgid ""
1829 "/* Override initializing hook from the C library. */\n"
1830 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1831 msgstr ""
1832 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
1833 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1834
1835 #. type: Plain text
1836 #: build/C/man3/malloc_hook.3:108
1837 #, no-wrap
1838 msgid ""
1839 "static void\n"
1840 "my_init_hook(void)\n"
1841 "{\n"
1842 "    old_malloc_hook = __malloc_hook;\n"
1843 "    __malloc_hook = my_malloc_hook;\n"
1844 "}\n"
1845 msgstr ""
1846 "static void\n"
1847 "my_init_hook(void)\n"
1848 "{\n"
1849 "    old_malloc_hook = __malloc_hook;\n"
1850 "    __malloc_hook = my_malloc_hook;\n"
1851 "}\n"
1852
1853 #. type: Plain text
1854 #: build/C/man3/malloc_hook.3:113
1855 #, no-wrap
1856 msgid ""
1857 "static void *\n"
1858 "my_malloc_hook(size_t size, const void *caller)\n"
1859 "{\n"
1860 "    void *result;\n"
1861 msgstr ""
1862 "static void *\n"
1863 "my_malloc_hook(size_t size, const void *caller)\n"
1864 "{\n"
1865 "    void *result;\n"
1866
1867 #. type: Plain text
1868 #: build/C/man3/malloc_hook.3:116
1869 #, no-wrap
1870 msgid ""
1871 "    /* Restore all old hooks */\n"
1872 "    __malloc_hook = old_malloc_hook;\n"
1873 msgstr ""
1874 "    /* 元々のフックを全て戻す */\n"
1875 "    __malloc_hook = old_malloc_hook;\n"
1876
1877 #. type: Plain text
1878 #: build/C/man3/malloc_hook.3:119
1879 #, no-wrap
1880 msgid ""
1881 "    /* Call recursively */\n"
1882 "    result = malloc(size);\n"
1883 msgstr ""
1884 "    /* malloc の再帰的呼び出し */\n"
1885 "    result = malloc(size);\n"
1886
1887 #. type: Plain text
1888 #: build/C/man3/malloc_hook.3:122
1889 #, no-wrap
1890 msgid ""
1891 "    /* Save underlying hooks */\n"
1892 "    old_malloc_hook = __malloc_hook;\n"
1893 msgstr ""
1894 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
1895 "    old_malloc_hook = __malloc_hook;\n"
1896
1897 #. type: Plain text
1898 #: build/C/man3/malloc_hook.3:126
1899 #, no-wrap
1900 msgid ""
1901 "    /* printf() might call malloc(), so protect it too. */\n"
1902 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1903 "            (unsigned int) size, caller, result);\n"
1904 msgstr ""
1905 "    /* printf() は malloc() を呼び出す可能性があるので\n"
1906 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
1907 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1908 "            (unsigned int) size, caller, result);\n"
1909
1910 #. type: Plain text
1911 #: build/C/man3/malloc_hook.3:129
1912 #, no-wrap
1913 msgid ""
1914 "    /* Restore our own hooks */\n"
1915 "    __malloc_hook = my_malloc_hook;\n"
1916 msgstr ""
1917 "    /* ユーザが使おうとするフックを再設定する */\n"
1918 "    __malloc_hook = my_malloc_hook;\n"
1919
1920 #. type: Plain text
1921 #: build/C/man3/malloc_hook.3:132
1922 #, no-wrap
1923 msgid ""
1924 "    return result;\n"
1925 "}\n"
1926 msgstr ""
1927 "    return result;\n"
1928 "}\n"
1929
1930 #. type: Plain text
1931 #: build/C/man3/malloc_hook.3:138
1932 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1933 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1934
1935 #. type: TH
1936 #: build/C/man3/mallopt.3:24
1937 #, no-wrap
1938 msgid "MALLOPT"
1939 msgstr "MALLOPT"
1940
1941 #. type: TH
1942 #: build/C/man3/mallopt.3:24 build/C/man3/mtrace.3:23 build/C/man3/mcheck.3:23
1943 #, fuzzy, no-wrap
1944 #| msgid "2012-04-17"
1945 msgid "2012-04-18"
1946 msgstr "2012-04-17"
1947
1948 #. type: Plain text
1949 #: build/C/man3/mallopt.3:27
1950 msgid "mallopt - set memory allocation parameters"
1951 msgstr ""
1952
1953 #. type: Plain text
1954 #: build/C/man3/mallopt.3:29 build/C/man3/malloc_trim.3:29
1955 #: build/C/man3/malloc_usable_size.3:28
1956 msgid "B<#include E<lt>malloc.hE<gt>>"
1957 msgstr "B<#include E<lt>malloc.hE<gt>>"
1958
1959 #. type: Plain text
1960 #: build/C/man3/mallopt.3:31
1961 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1962 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1963
1964 #. type: Plain text
1965 #: build/C/man3/mallopt.3:42
1966 msgid ""
1967 "The B<mallopt>()  function adjusts parameters that control the behavior of "
1968 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
1969 "specifies the parameter to be modified, and I<value> specifies the new value "
1970 "for that parameter."
1971 msgstr ""
1972
1973 #. type: Plain text
1974 #: build/C/man3/mallopt.3:45
1975 msgid "The following values can be specified for I<param>:"
1976 msgstr "I<param> には以下の値を指定することができる。"
1977
1978 #. type: TP
1979 #: build/C/man3/mallopt.3:45
1980 #, no-wrap
1981 msgid "B<M_CHECK_ACTION>"
1982 msgstr "B<M_CHECK_ACTION>"
1983
1984 #. type: Plain text
1985 #: build/C/man3/mallopt.3:51
1986 msgid ""
1987 "Setting this parameter controls how glibc responds when various kinds of "
1988 "programming errors are detected (e.g., freeing the same pointer twice).  The "
1989 "3 least significant bits (2, 1, and 0) of the value assigned to this "
1990 "parameter determine the glibc behavior, as follows:"
1991 msgstr ""
1992
1993 #. type: TP
1994 #: build/C/man3/mallopt.3:52
1995 #, no-wrap
1996 msgid "Bit 0"
1997 msgstr "Bit 0"
1998
1999 #. type: Plain text
2000 #: build/C/man3/mallopt.3:62
2001 msgid ""
2002 "If this bit is set, then print a one-line message on I<stderr> that provides "
2003 "details about the error.  The message starts with the string \"***\\ glibc "
2004 "detected\\ ***\", followed by the program name, the name of the memory-"
2005 "allocation function in which the error was detected, a brief description of "
2006 "the error, and the memory address where the error was detected."
2007 msgstr ""
2008
2009 #. type: TP
2010 #: build/C/man3/mallopt.3:62
2011 #, no-wrap
2012 msgid "Bit 1"
2013 msgstr "Bit 1"
2014
2015 #. type: Plain text
2016 #: build/C/man3/mallopt.3:77
2017 msgid ""
2018 "If this bit is set, then, after printing any error message specified by bit "
2019 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
2020 "since 2.4, if bit 0 is also set, then, between printing the error message "
2021 "and aborting, the program also prints a stack trace in the manner of "
2022 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
2023 "proc/[pid]/maps> (see B<proc>(5))."
2024 msgstr ""
2025
2026 #. type: TP
2027 #: build/C/man3/mallopt.3:77
2028 #, no-wrap
2029 msgid "Bit 2 (since glibc 2.4)"
2030 msgstr "Bit 2 (glibc 2.4 以降)"
2031
2032 #. type: Plain text
2033 #: build/C/man3/mallopt.3:84
2034 msgid ""
2035 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
2036 "the one-line message describing the error is simplified to contain just the "
2037 "name of the function where the error was detected and the brief description "
2038 "of the error."
2039 msgstr ""
2040
2041 #. type: Plain text
2042 #: build/C/man3/mallopt.3:89
2043 msgid "The remaining bits in I<value> are ignored."
2044 msgstr ""
2045
2046 #. type: Plain text
2047 #: build/C/man3/mallopt.3:93
2048 msgid ""
2049 "Combining the above details, the following numeric values are meaningful for "
2050 "B<M_CHECK_ACTION>:"
2051 msgstr ""
2052
2053 #. type: IP
2054 #: build/C/man3/mallopt.3:94
2055 #, no-wrap
2056 msgid "0"
2057 msgstr ""
2058
2059 #. type: Plain text
2060 #: build/C/man3/mallopt.3:96
2061 msgid "Ignore error conditions; continue execution (with undefined results)."
2062 msgstr ""
2063
2064 #. type: IP
2065 #: build/C/man3/mallopt.3:96
2066 #, no-wrap
2067 msgid "1"
2068 msgstr "1"
2069
2070 #. type: Plain text
2071 #: build/C/man3/mallopt.3:98
2072 msgid "Print a detailed error message and continue execution."
2073 msgstr ""
2074
2075 #. type: IP
2076 #: build/C/man3/mallopt.3:98
2077 #, no-wrap
2078 msgid "2"
2079 msgstr "2"
2080
2081 #. type: Plain text
2082 #: build/C/man3/mallopt.3:100
2083 msgid "Abort the program."
2084 msgstr ""
2085
2086 #. type: IP
2087 #: build/C/man3/mallopt.3:100
2088 #, no-wrap
2089 msgid "3"
2090 msgstr ""
2091
2092 #. type: Plain text
2093 #: build/C/man3/mallopt.3:103
2094 msgid ""
2095 "Print detailed error message, stack trace, and memory mappings, and abort "
2096 "the program."
2097 msgstr ""
2098
2099 #. type: IP
2100 #: build/C/man3/mallopt.3:103
2101 #, no-wrap
2102 msgid "5"
2103 msgstr ""
2104
2105 #. type: Plain text
2106 #: build/C/man3/mallopt.3:105
2107 msgid "Print a simple error message and continue execution."
2108 msgstr ""
2109
2110 #. type: IP
2111 #: build/C/man3/mallopt.3:105
2112 #, no-wrap
2113 msgid "7"
2114 msgstr ""
2115
2116 #. type: Plain text
2117 #: build/C/man3/mallopt.3:108
2118 msgid ""
2119 "Print simple error message, stack trace, and memory mappings, and abort the "
2120 "program."
2121 msgstr ""
2122
2123 #. type: Plain text
2124 #: build/C/man3/mallopt.3:114
2125 msgid ""
2126 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
2127 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
2128 msgstr ""
2129
2130 #. type: Plain text
2131 #: build/C/man3/mallopt.3:119
2132 msgid ""
2133 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
2134 "crash may happen much later, and the true cause of the problem is then very "
2135 "hard to track down."
2136 msgstr ""
2137
2138 #. type: TP
2139 #: build/C/man3/mallopt.3:119
2140 #, no-wrap
2141 msgid "B<M_MMAP_MAX>"
2142 msgstr "B<M_MMAP_MAX>"
2143
2144 #.  The following text adapted from comments in the glibc source:
2145 #. type: Plain text
2146 #: build/C/man3/mallopt.3:129
2147 msgid ""
2148 "This parameter specifies the maximum number of allocation requests that may "
2149 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
2150 "some systems have a limited number of internal tables for use by B<mmap>(2), "
2151 "and using more than a few of them may degrade performance."
2152 msgstr ""
2153
2154 #. type: Plain text
2155 #: build/C/man3/mallopt.3:136
2156 msgid ""
2157 "The default value is 65,536, a value which has no special significance and "
2158 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
2159 "use of B<mmap>(2)  for servicing large allocation requests."
2160 msgstr ""
2161
2162 #. type: TP
2163 #: build/C/man3/mallopt.3:136
2164 #, no-wrap
2165 msgid "B<M_MMAP_THRESHOLD>"
2166 msgstr "B<M_MMAP_THRESHOLD>"
2167
2168 #. type: Plain text
2169 #: build/C/man3/mallopt.3:145
2170 msgid ""
2171 "For allocations greater than or equal to the limit specified (in bytes) by "
2172 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
2173 "allocation functions employ B<mmap>(2)  instead of increasing the program "
2174 "break using B<sbrk>(2)."
2175 msgstr ""
2176
2177 #. type: Plain text
2178 #: build/C/man3/mallopt.3:165
2179 msgid ""
2180 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
2181 "allocated memory blocks can always be independently released back to the "
2182 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
2183 "the top end.)  On the other hand, there are some disadvantages to the use of "
2184 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
2185 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
2186 "be page-aligned; and the kernel must perform the expensive task of zeroing "
2187 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
2188 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
2189 msgstr ""
2190
2191 #. type: Plain text
2192 #: build/C/man3/mallopt.3:172
2193 msgid ""
2194 "The lower limit for this parameter is 0.  The upper limit is "
2195 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
2196 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
2197 msgstr ""
2198
2199 #. type: Plain text
2200 #: build/C/man3/mallopt.3:190
2201 msgid ""
2202 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
2203 "initial value of the threshold is 128*1024, but when blocks larger than the "
2204 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
2205 "are freed, the threshold is adjusted upwards to the size of the freed "
2206 "block.  When dynamic mmap thresholding is in effect, the threshold for "
2207 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
2208 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
2209 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
2210 "parameters is set."
2211 msgstr ""
2212
2213 #. type: TP
2214 #: build/C/man3/mallopt.3:190
2215 #, no-wrap
2216 msgid "B<M_MXFAST> (since glibc 2.3)"
2217 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
2218
2219 #.  The following text adapted from comments in the glibc sources:
2220 #. type: Plain text
2221 #: build/C/man3/mallopt.3:210
2222 msgid ""
2223 "Set the upper limit for memory allocation requests that are satisfied using "
2224 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
2225 "are storage areas that hold deallocated blocks of memory of the same size "
2226 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
2227 "the same size can be handled very quickly by allocating from the fastbin, "
2228 "although memory fragmentation and the overall memory footprint of the "
2229 "program can increase.  The default value for this parameter is I<64*sizeof"
2230 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
2231 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
2232 "the use of fastbins."
2233 msgstr ""
2234
2235 #. type: TP
2236 #: build/C/man3/mallopt.3:210
2237 #, no-wrap
2238 msgid "B<M_PERTURB> (since glibc 2.4)"
2239 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
2240
2241 #. type: Plain text
2242 #: build/C/man3/mallopt.3:225
2243 msgid ""
2244 "If this parameter is set to a nonzero value, then bytes of allocated memory "
2245 "(other than allocations via B<calloc>(3))  are initialized to the complement "
2246 "of the value in the least significant byte of I<value>, and when allocated "
2247 "memory is released using B<free>(3), the freed bytes are set to the least "
2248 "significant byte of I<value>.  This can be useful for detecting errors where "
2249 "programs incorrectly rely on allocated memory being initialized to zero, or "
2250 "reuse values in memory that has already been freed."
2251 msgstr ""
2252
2253 #. type: TP
2254 #: build/C/man3/mallopt.3:225
2255 #, no-wrap
2256 msgid "B<M_TOP_PAD>"
2257 msgstr ""
2258
2259 #. type: Plain text
2260 #: build/C/man3/mallopt.3:232
2261 msgid ""
2262 "This parameter defines the amount of padding to employ when calling B<sbrk>"
2263 "(2)  to modify the program break.  (The measurement unit for this parameter "
2264 "is bytes.)  This parameter has an effect in the following circumstances:"
2265 msgstr ""
2266
2267 #. type: Plain text
2268 #: build/C/man3/mallopt.3:239
2269 msgid ""
2270 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
2271 "the B<sbrk>(2)  request."
2272 msgstr ""
2273
2274 #. type: Plain text
2275 #: build/C/man3/mallopt.3:245
2276 msgid ""
2277 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
2278 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
2279 "top of the heap."
2280 msgstr ""
2281
2282 #. type: Plain text
2283 #: build/C/man3/mallopt.3:249
2284 msgid ""
2285 "In either case, the amount of padding is always rounded to a system page "
2286 "boundary."
2287 msgstr ""
2288
2289 #. type: Plain text
2290 #: build/C/man3/mallopt.3:256
2291 msgid ""
2292 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
2293 "system calls (when the parameter is set low)  and wasting unused memory at "
2294 "the top of the heap (when the parameter is set high)."
2295 msgstr ""
2296
2297 #.  DEFAULT_TOP_PAD in glibc source
2298 #. type: Plain text
2299 #: build/C/man3/mallopt.3:259
2300 msgid "The default value for this parameter is 128*1024."
2301 msgstr ""
2302
2303 #. type: TP
2304 #: build/C/man3/mallopt.3:259
2305 #, no-wrap
2306 msgid "B<M_TRIM_THRESHOLD>"
2307 msgstr ""
2308
2309 #. type: Plain text
2310 #: build/C/man3/mallopt.3:275
2311 msgid ""
2312 "When the amount of contiguous free memory at the top of the heap grows "
2313 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
2314 "back to the system.  (This can be useful in programs that continue to "
2315 "execute for a long period after freeing a significant amount of memory.)  "
2316 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
2317 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
2318 msgstr ""
2319
2320 #. type: Plain text
2321 #: build/C/man3/mallopt.3:280
2322 msgid ""
2323 "The default value for this parameter is 128*1024.  Setting "
2324 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
2325 msgstr ""
2326
2327 #
2328 #
2329 #
2330 #.  FIXME Do the arena parameters need to be documented?
2331 #.  .TP
2332 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
2333 #.  .TP
2334 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
2335 #.  Environment variables
2336 #.      MALLOC_ARENA_MAX_
2337 #.      MALLOC_ARENA_TEST_
2338 #.  http://udrepper.livejournal.com/20948.html describes some details
2339 #.      of the MALLOC_ARENA_* environment variables.
2340 #.  These macros aren't enabled in production releases until 2.15?
2341 #.  (see glibc malloc/Makefile)
2342 #. type: Plain text
2343 #: build/C/man3/mallopt.3:303
2344 msgid ""
2345 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
2346 "of system calls (when the parameter is set low)  and wasting unused memory "
2347 "at the top of the heap (when the parameter is set high)."
2348 msgstr ""
2349
2350 #. type: SS
2351 #: build/C/man3/mallopt.3:303
2352 #, no-wrap
2353 msgid "Environment Variables"
2354 msgstr ""
2355
2356 #. type: Plain text
2357 #: build/C/man3/mallopt.3:318
2358 msgid ""
2359 "A number of environment variables can be defined to modify some of the same "
2360 "parameters as are controlled by B<mallopt>().  Using these variables has the "
2361 "advantage that the source code of the program need not be changed.  To be "
2362 "effective, these variables must be defined before the first call to a memory-"
2363 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
2364 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
2365 "these variables are ignored in set-user-ID and set-group-ID programs."
2366 msgstr ""
2367
2368 #. type: Plain text
2369 #: build/C/man3/mallopt.3:321
2370 msgid ""
2371 "The environment variables are as follows (note the trailing underscore at "
2372 "the end of the name of each variable):"
2373 msgstr ""
2374
2375 #. type: TP
2376 #: build/C/man3/mallopt.3:321
2377 #, no-wrap
2378 msgid "B<MALLOC_CHECK_>"
2379 msgstr "B<MALLOC_CHECK_>"
2380
2381 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
2382 #.  when MALLOC_CHECK_ was set.
2383 #. type: Plain text
2384 #: build/C/man3/mallopt.3:338
2385 msgid ""
2386 "This environment variable controls the same parameter as B<mallopt>()  "
2387 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
2388 "special implementation of the memory-allocation functions is used.  (This is "
2389 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
2390 "performs additional error checking, but is slower than the standard set of "
2391 "memory-allocation functions.  (This implementation does not detect all "
2392 "possible errors; memory leaks can still occur.)"
2393 msgstr ""
2394
2395 #. type: Plain text
2396 #: build/C/man3/mallopt.3:343
2397 msgid ""
2398 "The value assigned to this environment variable should be a single digit, "
2399 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
2400 "the initial digit are ignored."
2401 msgstr ""
2402
2403 #. type: Plain text
2404 #: build/C/man3/mallopt.3:352
2405 msgid ""
2406 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
2407 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
2408 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
2409 "also has an effect for set-user-ID and set-group-ID programs."
2410 msgstr ""
2411
2412 #. type: TP
2413 #: build/C/man3/mallopt.3:352
2414 #, no-wrap
2415 msgid "B<MALLOC_MMAP_MAX_>"
2416 msgstr ""
2417
2418 #. type: Plain text
2419 #: build/C/man3/mallopt.3:357
2420 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
2421 msgstr ""
2422
2423 #. type: TP
2424 #: build/C/man3/mallopt.3:357
2425 #, no-wrap
2426 msgid "B<MALLOC_MMAP_THRESHOLD_>"
2427 msgstr ""
2428
2429 #. type: Plain text
2430 #: build/C/man3/mallopt.3:362
2431 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
2432 msgstr ""
2433
2434 #. type: TP
2435 #: build/C/man3/mallopt.3:362
2436 #, no-wrap
2437 msgid "B<MALLOC_PERTURB_>"
2438 msgstr ""
2439
2440 #. type: Plain text
2441 #: build/C/man3/mallopt.3:367
2442 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
2443 msgstr ""
2444
2445 #. type: TP
2446 #: build/C/man3/mallopt.3:367
2447 #, no-wrap
2448 msgid "B<MALLOC_TRIM_THRESHOLD_>"
2449 msgstr ""
2450
2451 #. type: Plain text
2452 #: build/C/man3/mallopt.3:372
2453 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
2454 msgstr ""
2455
2456 #. type: TP
2457 #: build/C/man3/mallopt.3:372
2458 #, no-wrap
2459 msgid "B<MALLOC_TOP_PAD_>"
2460 msgstr "B<MALLOC_TOP_PAD_>"
2461
2462 #. type: Plain text
2463 #: build/C/man3/mallopt.3:377
2464 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
2465 msgstr ""
2466
2467 #. type: Plain text
2468 #: build/C/man3/mallopt.3:382
2469 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
2470 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
2471
2472 #.  .SH VERSIONS
2473 #.  Available already in glibc 2.0, possibly earlier
2474 #. type: Plain text
2475 #: build/C/man3/mallopt.3:390
2476 msgid "On error, I<errno> is I<not> set."
2477 msgstr "エラーの場合、I<errno> は設定I<されない>。"
2478
2479 #.  .SH NOTES
2480 #. type: Plain text
2481 #: build/C/man3/mallopt.3:404
2482 msgid ""
2483 "This function is not specified by POSIX or the C standards.  A similar "
2484 "function exists on many System V derivatives, but the range of values for "
2485 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
2486 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
2487 "implemented in glibc."
2488 msgstr ""
2489
2490 #. type: Plain text
2491 #: build/C/man3/mallopt.3:408
2492 msgid "Specifying an invalid value for I<param> does not generate an error."
2493 msgstr ""
2494
2495 #.  FIXME This looks buggy:
2496 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
2497 #.  malloc requests are rounded up:
2498 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
2499 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
2500 #. type: Plain text
2501 #: build/C/man3/mallopt.3:416
2502 msgid ""
2503 "A calculation error within the glibc implementation means that a call of the "
2504 "form:"
2505 msgstr ""
2506
2507 #. type: Plain text
2508 #: build/C/man3/mallopt.3:419
2509 #, no-wrap
2510 msgid "    mallopt(M_MXFAST, n)\n"
2511 msgstr ""
2512
2513 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
2514 #. type: Plain text
2515 #: build/C/man3/mallopt.3:431
2516 msgid ""
2517 "does not result in fastbins being employed for all allocations of size up to "
2518 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
2519 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
2520 "integer."
2521 msgstr ""
2522
2523 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
2524 #.  do have an effect for set-user-ID programs (but not
2525 #.  set-group-ID programs).
2526 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
2527 #. type: Plain text
2528 #: build/C/man3/mallopt.3:443
2529 msgid ""
2530 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
2531 "ignored in set-group-ID programs."
2532 msgstr ""
2533
2534 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
2535 #. type: Plain text
2536 #: build/C/man3/mallopt.3:464
2537 msgid ""
2538 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
2539 "of allocated memory are initialized to the complement of the byte in "
2540 "I<value>, and when that memory is freed, the bytes of the region are "
2541 "initialized to the byte specified in I<value>.  However, there is an off-by-"
2542 "I<sizeof(size_t)> error in the implementation: instead of initializing "
2543 "precisely the block of memory being freed by the call I<free(p)>, the block "
2544 "starting at I<p+sizeof(size_t)> is initialized."
2545 msgstr ""
2546
2547 #. type: Plain text
2548 #: build/C/man3/mallopt.3:473
2549 msgid ""
2550 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
2551 "is supplied with an (integer) command-line argument, then that argument is "
2552 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
2553 "block of memory, and frees it twice (an error)."
2554 msgstr ""
2555
2556 #. type: Plain text
2557 #: build/C/man3/mallopt.3:477
2558 msgid ""
2559 "The following shell session shows what happens when we run this program "
2560 "under glibc, with the default value for B<M_CHECK_ACTION>:"
2561 msgstr ""
2562
2563 #. type: Plain text
2564 #: build/C/man3/mallopt.3:496
2565 #, no-wrap
2566 msgid ""
2567 "$ B<./a.out>\n"
2568 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
2569 "======= Backtrace: =========\n"
2570 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
2571 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
2572 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
2573 "\\&./a.out[0x80485db]\n"
2574 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
2575 "\\&./a.out[0x8048471]\n"
2576 "======= Memory map: ========\n"
2577 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
2578 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
2579 "[some lines omitted]\n"
2580 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
2581 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
2582 "Aborted (core dumped)\n"
2583 msgstr ""
2584
2585 #. type: Plain text
2586 #: build/C/man3/mallopt.3:501
2587 msgid ""
2588 "The following runs show the results when employing other values for "
2589 "B<M_CHECK_ACTION>:"
2590 msgstr ""
2591
2592 #. type: Plain text
2593 #: build/C/man3/mallopt.3:514
2594 #, no-wrap
2595 msgid ""
2596 "$ B<./a.out 1>             # Diagnose error and continue\n"
2597 "main(): returned from first free() call\n"
2598 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
2599 "main(): returned from second free() call\n"
2600 "$ B<./a.out 2>             # Abort without error message\n"
2601 "main(): returned from first free() call\n"
2602 "Aborted (core dumped)\n"
2603 "$ B<./a.out 0>             # Ignore error and continue\n"
2604 "main(): returned from first free() call\n"
2605 "main(): returned from second free() call\n"
2606 msgstr ""
2607
2608 #. type: Plain text
2609 #: build/C/man3/mallopt.3:520
2610 msgid ""
2611 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
2612 "environment variable:"
2613 msgstr ""
2614
2615 #. type: Plain text
2616 #: build/C/man3/mallopt.3:527
2617 #, no-wrap
2618 msgid ""
2619 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
2620 "main(): returned from first free() call\n"
2621 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
2622 "main(): returned from second free() call\n"
2623 msgstr ""
2624
2625 #. type: SS
2626 #: build/C/man3/mallopt.3:529 build/C/man2/mprotect.2:159
2627 #: build/C/man3/mcheck.3:176
2628 #, no-wrap
2629 msgid "Program source"
2630 msgstr "プログラムのソース"
2631
2632 #. type: Plain text
2633 #: build/C/man3/mallopt.3:535
2634 #, no-wrap
2635 msgid ""
2636 "#include E<lt>malloc.hE<gt>\n"
2637 "#include E<lt>stdio.hE<gt>\n"
2638 "#include E<lt>stdlib.hE<gt>\n"
2639 msgstr ""
2640 "#include E<lt>malloc.hE<gt>\n"
2641 "#include E<lt>stdio.hE<gt>\n"
2642 "#include E<lt>stdlib.hE<gt>\n"
2643
2644 #. type: Plain text
2645 #: build/C/man3/mallopt.3:540 build/C/man3/mcheck.3:187
2646 #, no-wrap
2647 msgid ""
2648 "int\n"
2649 "main(int argc, char *argv[])\n"
2650 "{\n"
2651 "    char *p;\n"
2652 msgstr ""
2653 "int\n"
2654 "main(int argc, char *argv[])\n"
2655 "{\n"
2656 "    char *p;\n"
2657
2658 #. type: Plain text
2659 #: build/C/man3/mallopt.3:547
2660 #, no-wrap
2661 msgid ""
2662 "    if (argc E<gt> 1) {\n"
2663 "        if (argc != 2) {\n"
2664 "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2665 "            exit(EXIT_FAILURE);\n"
2666 "        }\n"
2667 "    }\n"
2668 msgstr ""
2669 "    if (argc E<gt> 1) {\n"
2670 "        if (argc != 2) {\n"
2671 "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2672 "            exit(EXIT_FAILURE);\n"
2673 "        }\n"
2674 "    }\n"
2675
2676 #. type: Plain text
2677 #: build/C/man3/mallopt.3:552
2678 #, no-wrap
2679 msgid ""
2680 "    if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2681 "        fprintf(stderr, \"mallopt() failed\");\n"
2682 "        exit(EXIT_FAILURE);\n"
2683 "    }\n"
2684 msgstr ""
2685 "    if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2686 "        fprintf(stderr, \"mallopt() failed\");\n"
2687 "        exit(EXIT_FAILURE);\n"
2688 "    }\n"
2689
2690 #. type: Plain text
2691 #: build/C/man3/mallopt.3:558
2692 #, no-wrap
2693 msgid ""
2694 "    p = malloc(1000);\n"
2695 "    if (p == NULL) {\n"
2696 "        fprintf(stderr, \"malloc() failed\");\n"
2697 "        exit(EXIT_FAILURE);\n"
2698 "    }\n"
2699 msgstr ""
2700 "    p = malloc(1000);\n"
2701 "    if (p == NULL) {\n"
2702 "        fprintf(stderr, \"malloc() failed\");\n"
2703 "        exit(EXIT_FAILURE);\n"
2704 "    }\n"
2705
2706 #. type: Plain text
2707 #: build/C/man3/mallopt.3:561
2708 #, no-wrap
2709 msgid ""
2710 "    free(p);\n"
2711 "    printf(\"main(): returned from first free() call\\en\");\n"
2712 msgstr ""
2713
2714 #. type: Plain text
2715 #: build/C/man3/mallopt.3:564
2716 #, no-wrap
2717 msgid ""
2718 "    free(p);\n"
2719 "    printf(\"main(): returned from second free() call\\en\");\n"
2720 msgstr ""
2721
2722 #. type: Plain text
2723 #: build/C/man3/mallopt.3:567 build/C/man2/mmap.2:652
2724 #: build/C/man3/mcheck.3:203
2725 #, no-wrap
2726 msgid ""
2727 "    exit(EXIT_SUCCESS);\n"
2728 "}\n"
2729 msgstr ""
2730 "    exit(EXIT_SUCCESS);\n"
2731 "}\n"
2732
2733 #. type: Plain text
2734 #: build/C/man3/mallopt.3:580
2735 #, fuzzy
2736 #| msgid ""
2737 #| "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
2738 #| "B<malloc_trim>(3), B<mtrace>(3), B<posix_memalign>(3)"
2739 msgid ""
2740 "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
2741 "B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
2742 msgstr ""
2743 "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3),\n"
2744 "B<malloc_trim>(3), B<mtrace>(3), B<posix_memalign>(3)"
2745
2746 #. type: TH
2747 #: build/C/man2/mlock.2:27
2748 #, no-wrap
2749 msgid "MLOCK"
2750 msgstr "MLOCK"
2751
2752 #. type: TH
2753 #: build/C/man2/mlock.2:27
2754 #, no-wrap
2755 msgid "2011-09-14"
2756 msgstr "2011-09-14"
2757
2758 #. type: Plain text
2759 #: build/C/man2/mlock.2:30
2760 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
2761 msgstr "mlock - メモリのロックとロック解除を行う"
2762
2763 #. type: Plain text
2764 #: build/C/man2/mlock.2:33 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
2765 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:39
2766 #, no-wrap
2767 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
2768 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
2769
2770 #. type: Plain text
2771 #: build/C/man2/mlock.2:36
2772 #, no-wrap
2773 msgid ""
2774 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2775 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2776 msgstr ""
2777 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2778 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2779
2780 #. type: Plain text
2781 #: build/C/man2/mlock.2:39
2782 #, no-wrap
2783 msgid ""
2784 "B<int mlockall(int >I<flags>B<);>\n"
2785 "B<int munlockall(void);>\n"
2786 msgstr ""
2787 "B<int mlockall(int >I<flags>B<);>\n"
2788 "B<int munlockall(void);>\n"
2789
2790 #. type: Plain text
2791 #: build/C/man2/mlock.2:55
2792 msgid ""
2793 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
2794 "process's virtual address space into RAM, preventing that memory from being "
2795 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
2796 "converse operation, respectively unlocking part or all of the calling "
2797 "process's virtual address space, so that pages in the specified virtual "
2798 "address range may once more to be swapped out if required by the kernel "
2799 "memory manager.  Memory locking and unlocking are performed in units of "
2800 "whole pages."
2801 msgstr ""
2802 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
2803 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
2804 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
2805 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
2806 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
2807 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
2808 "る。"
2809
2810 #. type: SS
2811 #: build/C/man2/mlock.2:55
2812 #, no-wrap
2813 msgid "mlock() and munlock()"
2814 msgstr "mlock() と munlock()"
2815
2816 #. type: Plain text
2817 #: build/C/man2/mlock.2:65
2818 msgid ""
2819 "B<mlock>()  locks pages in the address range starting at I<addr> and "
2820 "continuing for I<len> bytes.  All pages that contain a part of the specified "
2821 "address range are guaranteed to be resident in RAM when the call returns "
2822 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
2823 msgstr ""
2824 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
2825 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
2826 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
2827 "れるまで RAM に残り続けることが保証される。"
2828
2829 #. type: Plain text
2830 #: build/C/man2/mlock.2:74
2831 msgid ""
2832 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
2833 "continuing for I<len> bytes.  After this call, all pages that contain a part "
2834 "of the specified memory range can be moved to external swap space again by "
2835 "the kernel."
2836 msgstr ""
2837 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
2838 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
2839 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
2840
2841 #. type: SS
2842 #: build/C/man2/mlock.2:74
2843 #, no-wrap
2844 msgid "mlockall() and munlockall()"
2845 msgstr "mlockall() と munlockall()"
2846
2847 #. type: Plain text
2848 #: build/C/man2/mlock.2:84
2849 msgid ""
2850 "B<mlockall>()  locks all pages mapped into the address space of the calling "
2851 "process.  This includes the pages of the code, data and stack segment, as "
2852 "well as shared libraries, user space kernel data, shared memory, and memory-"
2853 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
2854 "the call returns successfully; the pages are guaranteed to stay in RAM until "
2855 "later unlocked."
2856 msgstr ""
2857 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
2858 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
2859 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
2860 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
2861 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
2862 "残り続けることが保証される。"
2863
2864 #. type: Plain text
2865 #: build/C/man2/mlock.2:89
2866 msgid ""
2867 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
2868 "following constants:"
2869 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
2870
2871 #. type: TP
2872 #: build/C/man2/mlock.2:89
2873 #, no-wrap
2874 msgid "B<MCL_CURRENT>"
2875 msgstr "B<MCL_CURRENT>"
2876
2877 #. type: Plain text
2878 #: build/C/man2/mlock.2:93
2879 msgid ""
2880 "Lock all pages which are currently mapped into the address space of the "
2881 "process."
2882 msgstr ""
2883 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
2884
2885 #. type: TP
2886 #: build/C/man2/mlock.2:93
2887 #, no-wrap
2888 msgid "B<MCL_FUTURE>"
2889 msgstr "B<MCL_FUTURE>"
2890
2891 #. type: Plain text
2892 #: build/C/man2/mlock.2:100
2893 msgid ""
2894 "Lock all pages which will become mapped into the address space of the "
2895 "process in the future.  These could be for instance new pages required by a "
2896 "growing heap and stack as well as new memory mapped files or shared memory "
2897 "regions."
2898 msgstr ""
2899 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
2900 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
2901 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
2902
2903 #. type: Plain text
2904 #: build/C/man2/mlock.2:113
2905 msgid ""
2906 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
2907 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
2908 "locked bytes to exceed the permitted maximum (see below).  In the same "
2909 "circumstances, stack growth may likewise fail: the kernel will deny stack "
2910 "expansion and deliver a B<SIGSEGV> signal to the process."
2911 msgstr ""
2912 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
2913 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
2914 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
2915 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
2916 "スに送る。"
2917
2918 #. type: Plain text
2919 #: build/C/man2/mlock.2:117
2920 msgid ""
2921 "B<munlockall>()  unlocks all pages mapped into the address space of the "
2922 "calling process."
2923 msgstr ""
2924 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
2925 "全てのページをロック解除する。"
2926
2927 #. type: Plain text
2928 #: build/C/man2/mlock.2:123
2929 msgid ""
2930 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
2931 "is set appropriately, and no changes are made to any locks in the address "
2932 "space of the process."
2933 msgstr ""
2934 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
2935 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
2936 "れない。"
2937
2938 #. type: Plain text
2939 #: build/C/man2/mlock.2:132
2940 msgid ""
2941 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
2942 "resource limit, but tried to lock more memory than the limit permitted.  "
2943 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
2944 msgstr ""
2945 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
2946 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
2947 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
2948
2949 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
2950 #.  take into account whether the to-be-locked range overlaps with
2951 #.  already locked pages.  Thus, suppose we allocate
2952 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
2953 #.  mlock(), and then lock the *same* page range a second time.
2954 #.  In the case, the second mlock() call will fail, since the check
2955 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
2956 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
2957 #. type: Plain text
2958 #: build/C/man2/mlock.2:144
2959 msgid ""
2960 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
2961 "RAM."
2962 msgstr ""
2963 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
2964
2965 #. SVr4 documents an additional EAGAIN error code.
2966 #. type: Plain text
2967 #: build/C/man2/mlock.2:150
2968 msgid ""
2969 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
2970 "perform the requested operation."
2971 msgstr ""
2972 "呼び出し側が特権を持っていないが、\n"
2973 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
2974
2975 #. type: Plain text
2976 #: build/C/man2/mlock.2:155
2977 msgid "For B<mlock>()  and B<munlock>():"
2978 msgstr "B<mlock>()  と B<munlock>()  用として:"
2979
2980 #. type: Plain text
2981 #: build/C/man2/mlock.2:158
2982 msgid "Some or all of the specified address range could not be locked."
2983 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
2984
2985 #. type: Plain text
2986 #: build/C/man2/mlock.2:165
2987 msgid ""
2988 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
2989 "addition may have resulted in an overflow)."
2990 msgstr ""
2991 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
2992 "(例えば、加算でオーバーフローが発生したなど)。"
2993
2994 #. type: Plain text
2995 #: build/C/man2/mlock.2:170
2996 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
2997 msgstr ""
2998 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
2999
3000 #. type: Plain text
3001 #: build/C/man2/mlock.2:174
3002 msgid ""
3003 "Some of the specified address range does not correspond to mapped pages in "
3004 "the address space of the process."
3005 msgstr ""
3006 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
3007 "い。"
3008
3009 #. type: Plain text
3010 #: build/C/man2/mlock.2:177
3011 msgid "For B<mlockall>():"
3012 msgstr "B<mlockall>()  用として:"
3013
3014 #. type: Plain text
3015 #: build/C/man2/mlock.2:180
3016 msgid "Unknown I<flags> were specified."
3017 msgstr "未知の I<flags> が指定された。"
3018
3019 #. type: Plain text
3020 #: build/C/man2/mlock.2:183
3021 msgid "For B<munlockall>():"
3022 msgstr "B<munlockall>()  用として:"
3023
3024 #. type: Plain text
3025 #: build/C/man2/mlock.2:187
3026 msgid ""
3027 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
3028 msgstr ""
3029 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
3030
3031 #. type: Plain text
3032 #: build/C/man2/mlock.2:189
3033 msgid "POSIX.1-2001, SVr4."
3034 msgstr "POSIX.1-2001, SVr4."
3035
3036 #. type: SH
3037 #: build/C/man2/mlock.2:189 build/C/man2/mmap.2:487 build/C/man2/msync.2:105
3038 #, no-wrap
3039 msgid "AVAILABILITY"
3040 msgstr "可用性"
3041
3042 #. type: Plain text
3043 #: build/C/man2/mlock.2:201
3044 msgid ""
3045 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
3046 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
3047 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
3048 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
3049 msgstr ""
3050 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
3051 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
3052 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
3053 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
3054 "び出すことで決定できる。"
3055
3056 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
3057 #.  -1: unavailable, 0: ask using sysconf().
3058 #.  glibc defines it to 1.
3059 #. type: Plain text
3060 #: build/C/man2/mlock.2:214
3061 msgid ""
3062 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
3063 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
3064 "than 0.  (See also B<sysconf>(3).)"
3065 msgstr ""
3066 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
3067 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
3068 "(B<sysconf>(3)  も参照のこと)。"
3069
3070 #. type: Plain text
3071 #: build/C/man2/mlock.2:232
3072 msgid ""
3073 "Memory locking has two main applications: real-time algorithms and high-"
3074 "security data processing.  Real-time applications require deterministic "
3075 "timing, and, like scheduling, paging is one major cause of unexpected "
3076 "program execution delays.  Real-time applications will usually also switch "
3077 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
3078 "security software often handles critical bytes like passwords or secret keys "
3079 "as data structures.  As a result of paging, these secrets could be "
3080 "transferred onto a persistent swap store medium, where they might be "
3081 "accessible to the enemy long after the security software has erased the "
3082 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
3083 "laptops and some desktop computers will save a copy of the system's RAM to "
3084 "disk, regardless of memory locks.)"
3085 msgstr ""
3086 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
3087 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
3088 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
3089 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
3090 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
3091 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
3092 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
3093 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
3094 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
3095 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
3096 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
3097 "存することに注意)。"
3098
3099 #. type: Plain text
3100 #: build/C/man2/mlock.2:245
3101 msgid ""
3102 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
3103 "faults should reserve enough locked stack pages before entering the time-"
3104 "critical section, so that no page fault can be caused by function calls.  "
3105 "This can be achieved by calling a function that allocates a sufficiently "
3106 "large automatic variable (an array) and writes to the memory occupied by "
3107 "this array in order to touch these stack pages.  This way, enough pages will "
3108 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
3109 "that not even copy-on-write page faults can occur in the critical section."
3110 msgstr ""
3111 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
3112 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
3113 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
3114 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
3115 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
3116 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
3117 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
3118 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
3119 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
3120
3121 #. type: Plain text
3122 #: build/C/man2/mlock.2:251
3123 msgid ""
3124 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
3125 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
3126 "terminates."
3127 msgstr ""
3128 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
3129 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
3130 "れる)。"
3131
3132 #. type: Plain text
3133 #: build/C/man2/mlock.2:255
3134 msgid ""
3135 "The memory lock on an address range is automatically removed if the address "
3136 "range is unmapped via B<munmap>(2)."
3137 msgstr ""
3138 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
3139 "よってアンマップされた場合は削除される。"
3140
3141 #. type: Plain text
3142 #: build/C/man2/mlock.2:268
3143 msgid ""
3144 "Memory locks do not stack, that is, pages which have been locked several "
3145 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
3146 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
3147 "Pages which are mapped to several locations or by several processes stay "
3148 "locked into RAM as long as they are locked at least at one location or by at "
3149 "least one process."
3150 msgstr ""
3151 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
3152 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
3153 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
3154 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
3155 "のプロセスでロックされている限りは RAM に残り続ける。"
3156
3157 #. type: Plain text
3158 #: build/C/man2/mlock.2:279
3159 msgid ""
3160 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
3161 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
3162 "implementation to require that I<addr> is page aligned, so portable "
3163 "applications should ensure this."
3164 msgstr ""
3165 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
3166 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
3167 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
3168 "ケーションではきちんと境界に合わせた方が良い。"
3169
3170 #. type: Plain text
3171 #: build/C/man2/mlock.2:292
3172 msgid ""
3173 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
3174 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
3175 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
3176 msgstr ""
3177 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
3178 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
3179 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
3180 "表示される。"
3181
3182 #. type: SS
3183 #: build/C/man2/mlock.2:292
3184 #, no-wrap
3185 msgid "Limits and permissions"
3186 msgstr "制限と権限"
3187
3188 #. type: Plain text
3189 #: build/C/man2/mlock.2:299
3190 msgid ""
3191 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
3192 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
3193 "defines a limit on how much memory the process may lock."
3194 msgstr ""
3195 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
3196 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
3197 "できるかの制限を定義する。"
3198
3199 #. type: Plain text
3200 #: build/C/man2/mlock.2:305
3201 msgid ""
3202 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
3203 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
3204 "instead defines a limit on how much memory an unprivileged process may lock."
3205 msgstr ""
3206 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
3207 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
3208 "クできるメモリ量の制限を定義する。"
3209
3210 #. type: Plain text
3211 #: build/C/man2/mlock.2:313
3212 msgid ""
3213 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
3214 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
3215 "was rectified in kernel 2.4.18."
3216 msgstr ""
3217 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
3218 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
3219 "ネル 2.4.18 で修正された。"
3220
3221 #.  See the following LKML thread:
3222 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
3223 #.  "Rationale for RLIMIT_MEMLOCK"
3224 #.  23 Jan 2006
3225 #. type: Plain text
3226 #: build/C/man2/mlock.2:330
3227 msgid ""
3228 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
3229 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
3230 "example, setting its effective UID to a nonzero value), then subsequent "
3231 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
3232 "B<RLIMIT_MEMLOCK> resource limit is encountered."
3233 msgstr ""
3234 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
3235 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
3236 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
3237 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
3238 "B<brk>(2))  は失敗する。"
3239
3240 #. type: Plain text
3241 #: build/C/man2/mlock.2:337
3242 msgid ""
3243 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
3244 "B<capabilities>(7)"
3245 msgstr ""
3246 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
3247 "B<capabilities>(7)"
3248
3249 #. type: TH
3250 #: build/C/man2/mmap.2:40
3251 #, no-wrap
3252 msgid "MMAP"
3253 msgstr "MMAP"
3254
3255 #. type: TH
3256 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
3257 #, no-wrap
3258 msgid "2012-04-16"
3259 msgstr "2012-04-16"
3260
3261 #. type: Plain text
3262 #: build/C/man2/mmap.2:43
3263 msgid "mmap, munmap - map or unmap files or devices into memory"
3264 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
3265
3266 #. type: Plain text
3267 #: build/C/man2/mmap.2:51
3268 #, no-wrap
3269 msgid ""
3270 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3271 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
3272 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3273 msgstr ""
3274 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3275 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
3276 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3277
3278 #. type: Plain text
3279 #: build/C/man2/mmap.2:61
3280 msgid ""
3281 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
3282 "process.  The starting address for the new mapping is specified in I<addr>.  "
3283 "The I<length> argument specifies the length of the mapping."
3284 msgstr ""
3285 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
3286 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
3287 "は I<length> 引き数で指定される。"
3288
3289 #.  Before Linux 2.6.24, the address was rounded up to the next page
3290 #.  boundary; since 2.6.24, it is rounded down!
3291 #. type: Plain text
3292 #: build/C/man2/mmap.2:75
3293 msgid ""
3294 "If I<addr> is NULL, then the kernel chooses the address at which to create "
3295 "the mapping; this is the most portable method of creating a new mapping.  If "
3296 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
3297 "the mapping; on Linux, the mapping will be created at a nearby page "
3298 "boundary.  The address of the new mapping is returned as the result of the "
3299 "call."
3300 msgstr ""
3301 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
3302 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
3303 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
3304 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
3305 "ングのアドレスは、呼び出しの返り値として返される。"
3306
3307 #. type: Plain text
3308 #: build/C/man2/mmap.2:87
3309 msgid ""
3310 "The contents of a file mapping (as opposed to an anonymous mapping; see "
3311 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
3312 "offset I<offset> in the file (or other object) referred to by the file "
3313 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
3314 "by I<sysconf(_SC_PAGE_SIZE)>."
3315 msgstr ""
3316 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
3317 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
3318 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
3319 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
3320 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
3321
3322 #. type: Plain text
3323 #: build/C/man2/mmap.2:95
3324 msgid ""
3325 "The I<prot> argument describes the desired memory protection of the mapping "
3326 "(and must not conflict with the open mode of the file).  It is either "
3327 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
3328 msgstr ""
3329 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
3330 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
3331 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
3332
3333 #. type: TP
3334 #: build/C/man2/mmap.2:95 build/C/man2/mprotect.2:67
3335 #, no-wrap
3336 msgid "B<PROT_EXEC>"
3337 msgstr "B<PROT_EXEC>"
3338
3339 #. type: Plain text
3340 #: build/C/man2/mmap.2:98
3341 msgid "Pages may be executed."
3342 msgstr "ページは実行可能である。"
3343
3344 #. type: TP
3345 #: build/C/man2/mmap.2:98 build/C/man2/mprotect.2:61
3346 #, no-wrap
3347 msgid "B<PROT_READ>"
3348 msgstr "B<PROT_READ>"
3349
3350 #. type: Plain text
3351 #: build/C/man2/mmap.2:101
3352 msgid "Pages may be read."
3353 msgstr "ページは読み込み可能である。"
3354
3355 #. type: TP
3356 #: build/C/man2/mmap.2:101 build/C/man2/mprotect.2:64
3357 #, no-wrap
3358 msgid "B<PROT_WRITE>"
3359 msgstr "B<PROT_WRITE>"
3360
3361 #. type: Plain text
3362 #: build/C/man2/mmap.2:104
3363 msgid "Pages may be written."
3364 msgstr "ページに書き込み可能である。"
3365
3366 #. type: TP
3367 #: build/C/man2/mmap.2:104 build/C/man2/mprotect.2:58
3368 #, no-wrap
3369 msgid "B<PROT_NONE>"
3370 msgstr "B<PROT_NONE>"
3371
3372 #. type: Plain text
3373 #: build/C/man2/mmap.2:107
3374 msgid "Pages may not be accessed."
3375 msgstr "ページにはアクセスできない。"
3376
3377 #. type: Plain text
3378 #: build/C/man2/mmap.2:116
3379 msgid ""
3380 "The I<flags> argument determines whether updates to the mapping are visible "
3381 "to other processes mapping the same region, and whether updates are carried "
3382 "through to the underlying file.  This behavior is determined by including "
3383 "exactly one of the following values in I<flags>:"
3384 msgstr ""
3385 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
3386 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
3387 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
3388 "I<flags> に含めることで指定する。"
3389
3390 #. type: TP
3391 #: build/C/man2/mmap.2:116
3392 #, no-wrap
3393 msgid "B<MAP_SHARED>"
3394 msgstr "B<MAP_SHARED>"
3395
3396 #. type: Plain text
3397 #: build/C/man2/mmap.2:126
3398 msgid ""
3399 "Share this mapping.  Updates to the mapping are visible to other processes "
3400 "that map this file, and are carried through to the underlying file.  The "
3401 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
3402 "called."
3403 msgstr ""
3404 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
3405 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
3406 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
3407 "るまで行われないこともある。"
3408
3409 #. type: TP
3410 #: build/C/man2/mmap.2:126
3411 #, no-wrap
3412 msgid "B<MAP_PRIVATE>"
3413 msgstr "B<MAP_PRIVATE>"
3414
3415 #. type: Plain text
3416 #: build/C/man2/mmap.2:135
3417 msgid ""
3418 "Create a private copy-on-write mapping.  Updates to the mapping are not "
3419 "visible to other processes mapping the same file, and are not carried "
3420 "through to the underlying file.  It is unspecified whether changes made to "
3421 "the file after the B<mmap>()  call are visible in the mapped region."
3422 msgstr ""
3423 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
3424 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
3425 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
3426 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
3427 "かは規定されていない。"
3428
3429 #. type: Plain text
3430 #: build/C/man2/mmap.2:137
3431 msgid "Both of these flags are described in POSIX.1-2001."
3432 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
3433
3434 #. type: Plain text
3435 #: build/C/man2/mmap.2:140
3436 msgid ""
3437 "In addition, zero or more of the following values can be ORed in I<flags>:"
3438 msgstr ""
3439 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
3440 "ことができる。"
3441
3442 #. type: TP
3443 #: build/C/man2/mmap.2:140
3444 #, no-wrap
3445 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
3446 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
3447
3448 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3449 #. type: Plain text
3450 #: build/C/man2/mmap.2:156
3451 msgid ""
3452 "Put the mapping into the first 2 Gigabytes of the process address space.  "
3453 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
3454 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
3455 "as to improve context-switch performance on some early 64-bit processors.  "
3456 "Modern x86-64 processors no longer have this performance problem, so use of "
3457 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
3458 "ignored when B<MAP_FIXED> is set."
3459 msgstr ""
3460 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
3461 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
3462 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
3463 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
3464 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
3465 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
3466 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
3467 "グは無視される。"
3468
3469 #. type: TP
3470 #: build/C/man2/mmap.2:156
3471 #, no-wrap
3472 msgid "B<MAP_ANON>"
3473 msgstr "B<MAP_ANON>"
3474
3475 #. type: Plain text
3476 #: build/C/man2/mmap.2:161
3477 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
3478 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
3479
3480 #. type: TP
3481 #: build/C/man2/mmap.2:161
3482 #, no-wrap
3483 msgid "B<MAP_ANONYMOUS>"
3484 msgstr "B<MAP_ANONYMOUS>"
3485
3486 #. type: Plain text
3487 #: build/C/man2/mmap.2:183
3488 msgid ""
3489 "The mapping is not backed by any file; its contents are initialized to "
3490 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
3491 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
3492 "is specified, and portable applications should ensure this.  The use of "
3493 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
3494 "Linux since kernel 2.4."
3495 msgstr ""
3496 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
3497 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
3498 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
3499 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
3500 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
3501 "以降の Linux でのみサポートされている。"
3502
3503 #. type: TP
3504 #: build/C/man2/mmap.2:183
3505 #, no-wrap
3506 msgid "B<MAP_DENYWRITE>"
3507 msgstr "B<MAP_DENYWRITE>"
3508
3509 #.  Introduced in 1.1.36, removed in 1.3.24.
3510 #. type: Plain text
3511 #: build/C/man2/mmap.2:191
3512 msgid ""
3513 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
3514 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
3515 "denial-of-service attacks.)"
3516 msgstr ""
3517 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
3518 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
3519 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
3520
3521 #. type: TP
3522 #: build/C/man2/mmap.2:191
3523 #, no-wrap
3524 msgid "B<MAP_EXECUTABLE>"
3525 msgstr "B<MAP_EXECUTABLE>"
3526
3527 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
3528 #.  (Long ago, it signaled that the underlying file is an executable.
3529 #.  However, that information was not really used anywhere.)
3530 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
3531 #.  MAP_DENYWRITE?
3532 #. type: Plain text
3533 #: build/C/man2/mmap.2:199
3534 msgid "This flag is ignored."
3535 msgstr "このフラグは無視される。"
3536
3537 #. type: TP
3538 #: build/C/man2/mmap.2:199
3539 #, no-wrap
3540 msgid "B<MAP_FILE>"
3541 msgstr "B<MAP_FILE>"
3542
3543 #.  On some systems, this was required as the opposite of
3544 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
3545 #. type: Plain text
3546 #: build/C/man2/mmap.2:205
3547 msgid "Compatibility flag.  Ignored."
3548 msgstr "互換性のためのフラグ。無視される。"
3549
3550 #. type: TP
3551 #: build/C/man2/mmap.2:205
3552 #, no-wrap
3553 msgid "B<MAP_FIXED>"
3554 msgstr "B<MAP_FIXED>"
3555
3556 #. type: Plain text
3557 #: build/C/man2/mmap.2:223
3558 msgid ""
3559 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
3560 "address.  I<addr> must be a multiple of the page size.  If the memory region "
3561 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
3562 "then the overlapped part of the existing mapping(s) will be discarded.  If "
3563 "the specified address cannot be used, B<mmap>()  will fail.  Because "
3564 "requiring a fixed address for a mapping is less portable, the use of this "
3565 "option is discouraged."
3566 msgstr ""
3567 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
3568 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
3569 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
3570 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
3571 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
3572 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
3573 "を推奨する。"
3574
3575 #. type: TP
3576 #: build/C/man2/mmap.2:223
3577 #, no-wrap
3578 msgid "B<MAP_GROWSDOWN>"
3579 msgstr "B<MAP_GROWSDOWN>"
3580
3581 #. type: Plain text
3582 #: build/C/man2/mmap.2:228
3583 msgid ""
3584 "Used for stacks.  Indicates to the kernel virtual memory system that the "
3585 "mapping should extend downward in memory."
3586 msgstr ""
3587 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
3588 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
3589 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
3590
3591 #. type: TP
3592 #: build/C/man2/mmap.2:228
3593 #, no-wrap
3594 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
3595 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
3596
3597 #. type: Plain text
3598 #: build/C/man2/mmap.2:234
3599 msgid ""
3600 "Allocate the mapping using \"huge pages.\" See the kernel source file "
3601 "I<Documentation/vm/hugetlbpage.txt> for further information."
3602 msgstr ""
3603 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
3604 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
3605
3606 #. type: TP
3607 #: build/C/man2/mmap.2:234
3608 #, no-wrap
3609 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
3610 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
3611
3612 #.  If set, the mapped pages will not be swapped out.
3613 #. type: Plain text
3614 #: build/C/man2/mmap.2:240
3615 msgid ""
3616 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
3617 "(2).  This flag is ignored in older kernels."
3618 msgstr ""
3619 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
3620 "前のカーネルでは、このフラグは無視される。"
3621
3622 #. type: TP
3623 #: build/C/man2/mmap.2:240
3624 #, no-wrap
3625 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
3626 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
3627
3628 #. type: Plain text
3629 #: build/C/man2/mmap.2:255
3630 msgid ""
3631 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
3632 "ahead: only create page tables entries for pages that are already present in "
3633 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
3634 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
3635 "reimplemented."
3636 msgstr ""
3637 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
3638 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
3639 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
3640 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
3641 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
3642
3643 #. type: TP
3644 #: build/C/man2/mmap.2:255
3645 #, no-wrap
3646 msgid "B<MAP_NORESERVE>"
3647 msgstr "B<MAP_NORESERVE>"
3648
3649 #. type: Plain text
3650 #: build/C/man2/mmap.2:270
3651 msgid ""
3652 "Do not reserve swap space for this mapping.  When swap space is reserved, "
3653 "one has the guarantee that it is possible to modify the mapping.  When swap "
3654 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
3655 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
3656 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
3657 "effect for private writable mappings."
3658 msgstr ""
3659 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
3660 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
3661 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
3662 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
3663 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
3664 "イベート・マッピングについてのみ効果があった。"
3665
3666 #. type: TP
3667 #: build/C/man2/mmap.2:270
3668 #, no-wrap
3669 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
3670 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
3671
3672 #. type: Plain text
3673 #: build/C/man2/mmap.2:277
3674 msgid ""
3675 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
3676 "causes read-ahead on the file.  Later accesses to the mapping will not be "
3677 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
3678 "mappings since Linux 2.6.23."
3679 msgstr ""
3680 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
3681 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
3682 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
3683 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
3684 "ポートされている。"
3685
3686 #. type: TP
3687 #: build/C/man2/mmap.2:277
3688 #, no-wrap
3689 msgid "B<MAP_STACK> (since Linux 2.6.27)"
3690 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
3691
3692 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3693 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
3694 #.  http://thread.gmane.org/gmane.linux.kernel/720412
3695 #.  "pthread_create() slow for many threads; also time to revisit 64b
3696 #.   context switch optimization?"
3697 #. type: Plain text
3698 #: build/C/man2/mmap.2:290
3699 msgid ""
3700 "Allocate the mapping at an address suitable for a process or thread stack.  "
3701 "This flag is currently a no-op, but is used in the glibc threading "
3702 "implementation so that if some architectures require special treatment for "
3703 "stack allocations, support can later be transparently implemented for glibc."
3704 msgstr ""
3705 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
3706 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
3707 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
3708 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
3709 "る。"
3710
3711 #. type: TP
3712 #: build/C/man2/mmap.2:290
3713 #, no-wrap
3714 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
3715 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
3716
3717 #. type: Plain text
3718 #: build/C/man2/mmap.2:300
3719 msgid ""
3720 "Don't clear anonymous pages.  This flag is intended to improve performance "
3721 "on embedded devices.  This flag is only honored if the kernel was configured "
3722 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
3723 "implications, that option is normally enabled only on embedded devices (i."
3724 "e., devices where one has complete control of the contents of user memory)."
3725 msgstr ""
3726 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
3727 "ス\n"
3728 "での性能向上を目的に作られてものである。カーネルの設定で\n"
3729 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
3730 "このフラグは効果を持つ。\n"
3731 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
3732 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
3733
3734 #. type: Plain text
3735 #: build/C/man2/mmap.2:308
3736 msgid ""
3737 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
3738 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
3739 "B<MAP_ANON>)."
3740 msgstr ""
3741 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
3742 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
3743 "B<MAP_ANON>)  もサポートされている。"
3744
3745 #. type: Plain text
3746 #: build/C/man2/mmap.2:315
3747 msgid ""
3748 "Some systems document the additional flags B<MAP_AUTOGROW>, "
3749 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
3750 msgstr ""
3751 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
3752 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
3753
3754 #. type: Plain text
3755 #: build/C/man2/mmap.2:321
3756 msgid ""
3757 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
3758 "attributes."
3759 msgstr ""
3760 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
3761
3762 #. type: Plain text
3763 #: build/C/man2/mmap.2:329
3764 msgid ""
3765 "A file is mapped in multiples of the page size.  For a file that is not a "
3766 "multiple of the page size, the remaining memory is zeroed when mapped, and "
3767 "writes to that region are not written out to the file.  The effect of "
3768 "changing the size of the underlying file of a mapping on the pages that "
3769 "correspond to added or removed regions of the file is unspecified."
3770 msgstr ""
3771 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
3772 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
3773 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
3774 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
3775 "マップされたページに対してどのような影響があるかは規定されていない。"
3776
3777 #. type: SS
3778 #: build/C/man2/mmap.2:329
3779 #, no-wrap
3780 msgid "munmap()"
3781 msgstr "munmap()"
3782
3783 #. type: Plain text
3784 #: build/C/man2/mmap.2:339
3785 msgid ""
3786 "The B<munmap>()  system call deletes the mappings for the specified address "
3787 "range, and causes further references to addresses within the range to "
3788 "generate invalid memory references.  The region is also automatically "
3789 "unmapped when the process is terminated.  On the other hand, closing the "
3790 "file descriptor does not unmap the region."
3791 msgstr ""
3792 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
3793 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
3794 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
3795 "はアンマップされない。"
3796
3797 #. type: Plain text
3798 #: build/C/man2/mmap.2:349
3799 msgid ""
3800 "The address I<addr> must be a multiple of the page size.  All pages "
3801 "containing a part of the indicated range are unmapped, and subsequent "
3802 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
3803 "the indicated range does not contain any mapped pages."
3804 msgstr ""
3805 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
3806 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
3807 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
3808 "ていない場合でも エラーにならない。"
3809
3810 #. type: SS
3811 #: build/C/man2/mmap.2:349
3812 #, no-wrap
3813 msgid "Timestamps changes for file-backed mappings"
3814 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
3815
3816 #. type: Plain text
3817 #: build/C/man2/mmap.2:356
3818 msgid ""
3819 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
3820 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
3821 "the first reference to a mapped page will update the field if it has not "
3822 "been already."
3823 msgstr ""
3824 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
3825 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
3826 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
3827 "ページへの最初の参照があった 際に更新される。"
3828
3829 #. type: Plain text
3830 #: build/C/man2/mmap.2:373
3831 msgid ""
3832 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
3833 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
3834 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
3835 "one occurs."
3836 msgstr ""
3837 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
3838 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
3839 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
3840 "B<msync>(2)  が呼ばれる前までに更新される。"
3841
3842 #. type: Plain text
3843 #: build/C/man2/mmap.2:390
3844 msgid ""
3845 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
3846 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
3847 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
3848 "and I<errno> is set (probably to B<EINVAL>)."
3849 msgstr ""
3850 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
3851 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
3852 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
3853 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
3854
3855 #. type: TP
3856 #: build/C/man2/mmap.2:391 build/C/man2/mprotect.2:80
3857 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
3858 #: build/C/man2/shmctl.2:295 build/C/man2/shmget.2:186
3859 #: build/C/man2/shmop.2:189
3860 #, no-wrap
3861 msgid "B<EACCES>"
3862 msgstr "B<EACCES>"
3863
3864 #. type: Plain text
3865 #: build/C/man2/mmap.2:411
3866 msgid ""
3867 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
3868 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
3869 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
3870 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
3871 msgstr ""
3872 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
3873 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
3874 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
3875 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
3876 "が、ファイルは追加 (append) 専用である。"
3877
3878 #. type: Plain text
3879 #: build/C/man2/mmap.2:415
3880 msgid ""
3881 "The file has been locked, or too much memory has been locked (see "
3882 "B<setrlimit>(2))."
3883 msgstr ""
3884 "ファイルがロックされている。またはロックされているメモリが多すぎる "
3885 "(B<setrlimit>(2)  を参照)。"
3886
3887 #. type: Plain text
3888 #: build/C/man2/mmap.2:421
3889 msgid ""
3890 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
3891 msgstr ""
3892 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
3893 "B<MAP_ANONYMOUS> がセットされていない)。"
3894
3895 #. type: Plain text
3896 #: build/C/man2/mmap.2:429
3897 msgid ""
3898 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
3899 "not aligned on a page boundary)."
3900 msgstr ""
3901 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
3902 "ジ境界にアラインメントされていない)。"
3903
3904 #. type: Plain text
3905 #: build/C/man2/mmap.2:434
3906 msgid "(since Linux 2.6.12)  I<length> was 0."
3907 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
3908
3909 #. type: Plain text
3910 #: build/C/man2/mmap.2:442
3911 msgid ""
3912 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
3913 "both of these values."
3914 msgstr ""
3915 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
3916 "しくは その両方が含まれていた。"
3917
3918 #. type: TP
3919 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:227
3920 #: build/C/man2/shmget.2:202
3921 #, no-wrap
3922 msgid "B<ENFILE>"
3923 msgstr "B<ENFILE>"
3924
3925 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
3926 #. type: Plain text
3927 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:206
3928 msgid "The system limit on the total number of open files has been reached."
3929 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
3930
3931 #. type: Plain text
3932 #: build/C/man2/mmap.2:454
3933 msgid ""
3934 "The underlying file system of the specified file does not support memory "
3935 "mapping."
3936 msgstr ""
3937 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
3938 "していない。"
3939
3940 #. type: Plain text
3941 #: build/C/man2/mmap.2:458
3942 msgid ""
3943 "No memory is available, or the process's maximum number of mappings would "
3944 "have been exceeded."
3945 msgstr ""
3946 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
3947
3948 #.  (Since 2.4.25 / 2.6.0.)
3949 #. type: Plain text
3950 #: build/C/man2/mmap.2:467
3951 msgid ""
3952 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
3953 "file on a file system that was mounted no-exec."
3954 msgstr ""
3955 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
3956 "トされたファイルシステム上のファイルに マップ領域が対応している。"
3957
3958 #. type: TP
3959 #: build/C/man2/mmap.2:467
3960 #, no-wrap
3961 msgid "B<ETXTBSY>"
3962 msgstr "B<ETXTBSY>"
3963
3964 #. type: Plain text
3965 #: build/C/man2/mmap.2:473
3966 msgid ""
3967 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
3968 "writing."
3969 msgstr ""
3970 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
3971 "き込み用に開かれている。"
3972
3973 #. type: Plain text
3974 #: build/C/man2/mmap.2:475
3975 msgid "Use of a mapped region can result in these signals:"
3976 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
3977
3978 #. type: TP
3979 #: build/C/man2/mmap.2:475
3980 #, no-wrap
3981 msgid "B<SIGSEGV>"
3982 msgstr "B<SIGSEGV>"
3983
3984 #. type: Plain text
3985 #: build/C/man2/mmap.2:478
3986 msgid "Attempted write into a region mapped as read-only."
3987 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
3988
3989 #. type: TP
3990 #: build/C/man2/mmap.2:478
3991 #, no-wrap
3992 msgid "B<SIGBUS>"
3993 msgstr "B<SIGBUS>"
3994
3995 #. type: Plain text
3996 #: build/C/man2/mmap.2:483
3997 msgid ""
3998 "Attempted access to a portion of the buffer that does not correspond to the "
3999 "file (for example, beyond the end of the file, including the case where "
4000 "another process has truncated the file)."
4001 msgstr ""
4002 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
4003 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
4004 "にアクセスしようとした。"
4005
4006 #.  SVr4 documents additional error codes ENXIO and ENODEV.
4007 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
4008 #. type: Plain text
4009 #: build/C/man2/mmap.2:487
4010 msgid "SVr4, 4.4BSD, POSIX.1-2001."
4011 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
4012
4013 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4014 #.  -1: unavailable, 0: ask using sysconf().
4015 #.  glibc defines it to 1.
4016 #. type: Plain text
4017 #: build/C/man2/mmap.2:501
4018 msgid ""
4019 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
4020 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
4021 "value greater than 0.  (See also B<sysconf>(3).)"
4022 msgstr ""
4023 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
4024 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
4025 "(B<sysconf>(3)  も参照のこと)。"
4026
4027 #.  Since around glibc 2.1/2.2, depending on the platform.
4028 #. type: Plain text
4029 #: build/C/man2/mmap.2:516
4030 msgid ""
4031 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
4032 "function.  Originally, this function invoked a system call of the same "
4033 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
4034 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
4035 "with a suitably adjusted value for I<offset>."
4036 msgstr ""
4037 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
4038 "に\n"
4039 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
4040 "た。\n"
4041 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
4042 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
4043 "B<mmap2>(2) を起動する。"
4044
4045 #. type: Plain text
4046 #: build/C/man2/mmap.2:529
4047 msgid ""
4048 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
4049 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
4050 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
4051 "they intend to execute code in the new mapping."
4052 msgstr ""
4053 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
4054 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
4055 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
4056 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
4057 "常に B<PROT_EXEC> をセットすべきである。"
4058
4059 #. type: Plain text
4060 #: build/C/man2/mmap.2:544
4061 msgid ""
4062 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
4063 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
4064 "address for the mapping; the address is chosen so as not to conflict with "
4065 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
4066 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
4067 msgstr ""
4068 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
4069 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
4070 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
4071 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
4072 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
4073
4074 #. type: Plain text
4075 #: build/C/man2/mmap.2:549
4076 msgid ""
4077 "On Linux there are no guarantees like those suggested above under "
4078 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
4079 "the system runs out of memory."
4080 msgstr ""
4081 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
4082 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
4083 "終了されるか分からないからである。"
4084
4085 #. type: Plain text
4086 #: build/C/man2/mmap.2:556
4087 msgid ""
4088 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
4089 "is specified as B<PROT_NONE>."
4090 msgstr ""
4091 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
4092 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
4093
4094 #. type: Plain text
4095 #: build/C/man2/mmap.2:571
4096 msgid ""
4097 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
4098 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
4099 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
4100 "fails with the error B<EINVAL> for this case."
4101 msgstr ""
4102 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
4103 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
4104 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
4105 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
4106
4107 #. type: Plain text
4108 #: build/C/man2/mmap.2:583
4109 msgid ""
4110 "The following program prints part of the file specified in its first command-"
4111 "line argument to standard output.  The range of bytes to be printed is "
4112 "specified via offset and length values in the second and third command-line "
4113 "arguments.  The program creates a memory mapping of the required pages of "
4114 "the file and then uses B<write>(2)  to output the desired bytes."
4115 msgstr ""
4116 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
4117 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
4118 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
4119 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
4120 "を出力する。"
4121
4122 #. type: Plain text
4123 #: build/C/man2/mmap.2:591
4124 #, no-wrap
4125 msgid ""
4126 "#include E<lt>sys/mman.hE<gt>\n"
4127 "#include E<lt>sys/stat.hE<gt>\n"
4128 "#include E<lt>fcntl.hE<gt>\n"
4129 "#include E<lt>stdio.hE<gt>\n"
4130 "#include E<lt>stdlib.hE<gt>\n"
4131 "#include E<lt>unistd.hE<gt>\n"
4132 msgstr ""
4133 "#include E<lt>sys/mman.hE<gt>\n"
4134 "#include E<lt>sys/stat.hE<gt>\n"
4135 "#include E<lt>fcntl.hE<gt>\n"
4136 "#include E<lt>stdio.hE<gt>\n"
4137 "#include E<lt>stdlib.hE<gt>\n"
4138 "#include E<lt>unistd.hE<gt>\n"
4139
4140 #. type: Plain text
4141 #: build/C/man2/mmap.2:594 build/C/man2/mprotect.2:172
4142 #, no-wrap
4143 msgid ""
4144 "#define handle_error(msg) \\e\n"
4145 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4146 msgstr ""
4147 "#define handle_error(msg) \\e\n"
4148 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4149
4150 #. type: Plain text
4151 #: build/C/man2/mmap.2:604
4152 #, no-wrap
4153 msgid ""
4154 "int\n"
4155 "main(int argc, char *argv[])\n"
4156 "{\n"
4157 "    char *addr;\n"
4158 "    int fd;\n"
4159 "    struct stat sb;\n"
4160 "    off_t offset, pa_offset;\n"
4161 "    size_t length;\n"
4162 "    ssize_t s;\n"
4163 msgstr ""
4164 "int\n"
4165 "main(int argc, char *argv[])\n"
4166 "{\n"
4167 "    char *addr;\n"
4168 "    int fd;\n"
4169 "    struct stat sb;\n"
4170 "    off_t offset, pa_offset;\n"
4171 "    size_t length;\n"
4172 "    ssize_t s;\n"
4173
4174 #. type: Plain text
4175 #: build/C/man2/mmap.2:609
4176 #, no-wrap
4177 msgid ""
4178 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
4179 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4180 "        exit(EXIT_FAILURE);\n"
4181 "    }\n"
4182 msgstr ""
4183 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
4184 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4185 "        exit(EXIT_FAILURE);\n"
4186 "    }\n"
4187
4188 #. type: Plain text
4189 #: build/C/man2/mmap.2:613
4190 #, no-wrap
4191 msgid ""
4192 "    fd = open(argv[1], O_RDONLY);\n"
4193 "    if (fd == -1)\n"
4194 "        handle_error(\"open\");\n"
4195 msgstr ""
4196 "    fd = open(argv[1], O_RDONLY);\n"
4197 "    if (fd == -1)\n"
4198 "        handle_error(\"open\");\n"
4199
4200 #. type: Plain text
4201 #: build/C/man2/mmap.2:616
4202 #, no-wrap
4203 msgid ""
4204 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
4205 "        handle_error(\"fstat\");\n"
4206 msgstr ""
4207 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
4208 "        handle_error(\"fstat\");\n"
4209
4210 #. type: Plain text
4211 #: build/C/man2/mmap.2:620
4212 #, no-wrap
4213 msgid ""
4214 "    offset = atoi(argv[2]);\n"
4215 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4216 "        /* offset for mmap() must be page aligned */\n"
4217 msgstr ""
4218 "    offset = atoi(argv[2]);\n"
4219 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4220 "        /* offset for mmap() must be page aligned */\n"
4221
4222 #. type: Plain text
4223 #: build/C/man2/mmap.2:625
4224 #, no-wrap
4225 msgid ""
4226 "    if (offset E<gt>= sb.st_size) {\n"
4227 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
4228 "        exit(EXIT_FAILURE);\n"
4229 "    }\n"
4230 msgstr ""
4231 "    if (offset E<gt>= sb.st_size) {\n"
4232 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
4233 "        exit(EXIT_FAILURE);\n"
4234 "    }\n"
4235
4236 #. type: Plain text
4237 #: build/C/man2/mmap.2:631
4238 #, no-wrap
4239 msgid ""
4240 "    if (argc == 4) {\n"
4241 "        length = atoi(argv[3]);\n"
4242 "        if (offset + length E<gt> sb.st_size)\n"
4243 "            length = sb.st_size - offset;\n"
4244 "                /* Can\\(aqt display bytes past end of file */\n"
4245 msgstr ""
4246 "    if (argc == 4) {\n"
4247 "        length = atoi(argv[3]);\n"
4248 "        if (offset + length E<gt> sb.st_size)\n"
4249 "            length = sb.st_size - offset;\n"
4250 "                /* Can\\(aqt display bytes past end of file */\n"
4251
4252 #. type: Plain text
4253 #: build/C/man2/mmap.2:635
4254 #, no-wrap
4255 msgid ""
4256 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
4257 "        length = sb.st_size - offset;\n"
4258 "    }\n"
4259 msgstr ""
4260 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
4261 "        length = sb.st_size - offset;\n"
4262 "    }\n"
4263
4264 #. type: Plain text
4265 #: build/C/man2/mmap.2:640
4266 #, no-wrap
4267 msgid ""
4268 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4269 "                MAP_PRIVATE, fd, pa_offset);\n"
4270 "    if (addr == MAP_FAILED)\n"
4271 "        handle_error(\"mmap\");\n"
4272 msgstr ""
4273 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4274 "                MAP_PRIVATE, fd, pa_offset);\n"
4275 "    if (addr == MAP_FAILED)\n"
4276 "        handle_error(\"mmap\");\n"
4277
4278 #. type: Plain text
4279 #: build/C/man2/mmap.2:645
4280 #, no-wrap
4281 msgid ""
4282 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4283 "    if (s != length) {\n"
4284 "        if (s == -1)\n"
4285 "            handle_error(\"write\");\n"
4286 msgstr ""
4287 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4288 "    if (s != length) {\n"
4289 "        if (s == -1)\n"
4290 "            handle_error(\"write\");\n"
4291
4292 #. type: Plain text
4293 #: build/C/man2/mmap.2:649
4294 #, no-wrap
4295 msgid ""
4296 "        fprintf(stderr, \"partial write\");\n"
4297 "        exit(EXIT_FAILURE);\n"
4298 "    }\n"
4299 msgstr ""
4300 "        fprintf(stderr, \"partial write\");\n"
4301 "        exit(EXIT_FAILURE);\n"
4302 "    }\n"
4303
4304 #. type: Plain text
4305 #: build/C/man2/mmap.2:666
4306 msgid ""
4307 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4308 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4309 "(2), B<shm_open>(3), B<shm_overview>(7)"
4310 msgstr ""
4311 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4312 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4313 "(2), B<shm_open>(3), B<shm_overview>(7)"
4314
4315 #. type: Plain text
4316 #: build/C/man2/mmap.2:671 build/C/man2/msync.2:122
4317 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4318 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4319
4320 #. type: TH
4321 #: build/C/man2/mmap2.2:29
4322 #, no-wrap
4323 msgid "MMAP2"
4324 msgstr "MMAP2"
4325
4326 #. type: Plain text
4327 #: build/C/man2/mmap2.2:32
4328 msgid "mmap2 - map files or devices into memory"
4329 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
4330
4331 #. type: Plain text
4332 #: build/C/man2/mmap2.2:38
4333 #, no-wrap
4334 msgid ""
4335 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4336 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4337 msgstr ""
4338 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4339 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4340
4341 #. type: Plain text
4342 #: build/C/man2/mmap2.2:43
4343 msgid ""
4344 "This is probably not the system call you are interested; instead, see B<mmap>"
4345 "(2), which describes the glibc wrapper function that invokes this system "
4346 "call."
4347 msgstr ""
4348 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
4349 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
4350 "の\n"
4351 "ラッパー関数についての説明がある。"
4352
4353 #. type: Plain text
4354 #: build/C/man2/mmap2.2:54
4355 msgid ""
4356 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
4357 "except that the final argument specifies the offset into the file in 4096-"
4358 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
4359 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
4360 "bytes)."
4361 msgstr ""
4362 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
4363 "だ\n"
4364 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
4365 "ト\n"
4366 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
4367 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
4368 "プ\n"
4369 "できるようになる。"
4370
4371 #. type: Plain text
4372 #: build/C/man2/mmap2.2:61
4373 msgid ""
4374 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
4375 "is returned and I<errno> is set appropriately."
4376 msgstr ""
4377 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
4378 "合は -1 が返されて、 I<errno> が適切に設定される。"
4379
4380 #. type: Plain text
4381 #: build/C/man2/mmap2.2:65
4382 msgid "Problem with getting the data from userspace."
4383 msgstr "ユーザ空間からデータを取得するときに問題があった。"
4384
4385 #. type: Plain text
4386 #: build/C/man2/mmap2.2:70
4387 msgid ""
4388 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
4389 "is not a multiple of the system page size."
4390 msgstr ""
4391 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
4392 "がシステムのページサイズの倍数ではない。"
4393
4394 #. type: Plain text
4395 #: build/C/man2/mmap2.2:74
4396 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
4397 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
4398
4399 #. type: Plain text
4400 #: build/C/man2/mmap2.2:77
4401 msgid "B<mmap2>()  is available since Linux 2.3.31."
4402 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
4403
4404 #. type: Plain text
4405 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:93
4406 msgid "This system call is Linux-specific."
4407 msgstr "このシステムコールは Linux 独自である。"
4408
4409 #. type: Plain text
4410 #: build/C/man2/mmap2.2:85
4411 msgid ""
4412 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
4413 "rather than the B<mmap>(2)  system call."
4414 msgstr ""
4415 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
4416 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
4417
4418 #.  ia64 can have page sizes ranging from 4kB to 64kB.
4419 #.  On cris, it looks like the unit might also be the page size,
4420 #.  which is 8192 bytes. -- mtk, June 2007
4421 #. type: Plain text
4422 #: build/C/man2/mmap2.2:92
4423 msgid ""
4424 "On ia64, the unit for I<offset> is actually the system page size, rather "
4425 "than 4096 bytes."
4426 msgstr ""
4427 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
4428 "バイトではない。"
4429
4430 #. type: Plain text
4431 #: build/C/man2/mmap2.2:98
4432 msgid ""
4433 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4434 msgstr ""
4435 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4436
4437 #. type: TH
4438 #: build/C/man2/mprotect.2:32
4439 #, no-wrap
4440 msgid "MPROTECT"
4441 msgstr "MPROTECT"
4442
4443 #. type: TH
4444 #: build/C/man2/mprotect.2:32
4445 #, no-wrap
4446 msgid "2011-09-08"
4447 msgstr "2011-09-08"
4448
4449 #. type: Plain text
4450 #: build/C/man2/mprotect.2:35
4451 msgid "mprotect - set protection on a region of memory"
4452 msgstr "mprotect - メモリ領域の保護を設定する"
4453
4454 #. type: Plain text
4455 #: build/C/man2/mprotect.2:40
4456 #, no-wrap
4457 msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4458 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4459
4460 #. type: Plain text
4461 #: build/C/man2/mprotect.2:48
4462 msgid ""
4463 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
4464 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
4465 "+I<len>-1].  I<addr> must be aligned to a page boundary."
4466 msgstr ""
4467 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
4468 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
4469 "界に一致していなければならない。"
4470
4471 #. type: Plain text
4472 #: build/C/man2/mprotect.2:53
4473 msgid ""
4474 "If the calling process tries to access memory in a manner that violates the "
4475 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
4476 msgstr ""
4477 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
4478 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
4479
4480 #. type: Plain text
4481 #: build/C/man2/mprotect.2:58
4482 msgid ""
4483 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
4484 "following list:"
4485 msgstr ""
4486 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
4487 "毎の論理和 (bitwize-or) で指定する:"
4488
4489 #. type: Plain text
4490 #: build/C/man2/mprotect.2:61
4491 msgid "The memory cannot be accessed at all."
4492 msgstr "そのメモリには全くアクセスできない。"
4493
4494 #. type: Plain text
4495 #: build/C/man2/mprotect.2:64
4496 msgid "The memory can be read."
4497 msgstr "そのメモリを読み取ることができる。"
4498
4499 #. type: Plain text
4500 #: build/C/man2/mprotect.2:67
4501 msgid "The memory can be modified."
4502 msgstr "そのメモリを変更できる。"
4503
4504 #.  FIXME
4505 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
4506 #. type: Plain text
4507 #: build/C/man2/mprotect.2:72
4508 msgid "The memory can be executed."
4509 msgstr "そのメモリは実行可能である。"
4510
4511 #. type: Plain text
4512 #: build/C/man2/mprotect.2:79
4513 msgid ""
4514 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
4515 "I<errno> is set appropriately."
4516 msgstr ""
4517 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
4518 "I<errno> が適切に設定される。"
4519
4520 #. type: Plain text
4521 #: build/C/man2/mprotect.2:89
4522 msgid ""
4523 "The memory cannot be given the specified access.  This can happen, for "
4524 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
4525 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
4526 msgstr ""
4527 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
4528 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
4529 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
4530
4531 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
4532 #. type: Plain text
4533 #: build/C/man2/mprotect.2:94
4534 msgid ""
4535 "I<addr> is not a valid pointer, or not a multiple of the system page size."
4536 msgstr ""
4537 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
4538
4539 #. type: Plain text
4540 #: build/C/man2/mprotect.2:97
4541 msgid "Internal kernel structures could not be allocated."
4542 msgstr "カーネル内部の構造体を割り当てることができなかった。"
4543
4544 #. type: Plain text
4545 #: build/C/man2/mprotect.2:107
4546 msgid ""
4547 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
4548 "address space of the process, or specify one or more pages that are not "
4549 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
4550 "for these cases.)"
4551 msgstr ""
4552 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
4553 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
4554 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
4555 "成されていた)。"
4556
4557 #.  SVr4 defines an additional error
4558 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
4559 #. type: Plain text
4560 #: build/C/man2/mprotect.2:116
4561 msgid ""
4562 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
4563 "unspecified if it is applied to a region of memory that was not obtained via "
4564 "B<mmap>(2)."
4565 msgstr ""
4566 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
4567 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
4568 "されている。"
4569
4570 #. type: Plain text
4571 #: build/C/man2/mprotect.2:123
4572 msgid ""
4573 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
4574 "process's address space (except for the kernel vsyscall area).  In "
4575 "particular it can be used to change existing code mappings to be writable."
4576 msgstr ""
4577 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
4578 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
4579 "マッピングを書き込み可能にするために使われる。"
4580
4581 #. type: Plain text
4582 #: build/C/man2/mprotect.2:133
4583 msgid ""
4584 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
4585 "architecture- and kernel version-dependent.  On some hardware architectures "
4586 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
4587 msgstr ""
4588 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
4589 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
4590 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
4591
4592 #. type: Plain text
4593 #: build/C/man2/mprotect.2:142
4594 msgid ""
4595 "POSIX.1-2001 says that an implementation may permit access other than that "
4596 "specified in I<prot>, but at a minimum can only allow write access if "
4597 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
4598 "has been set."
4599 msgstr ""
4600 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
4601 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
4602 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
4603 "ない点だけは 満たす必要がある。"
4604
4605 #. type: Plain text
4606 #: build/C/man2/mprotect.2:148
4607 msgid ""
4608 "The program below allocates four pages of memory, makes the third of these "
4609 "pages read-only, and then executes a loop that walks upward through the "
4610 "allocated region modifying bytes."
4611 msgstr ""
4612 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
4613 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
4614 "かって順番にバイト値を変更するループを実行する。"
4615
4616 #. type: Plain text
4617 #: build/C/man2/mprotect.2:151
4618 msgid ""
4619 "An example of what we might see when running the program is the following:"
4620 msgstr "プログラムを実行した場合の一例を以下に示す。"
4621
4622 #. type: Plain text
4623 #: build/C/man2/mprotect.2:157
4624 #, no-wrap
4625 msgid ""
4626 "$B< ./a.out>\n"
4627 "Start of region:        0x804c000\n"
4628 "Got SIGSEGV at address: 0x804e000\n"
4629 msgstr ""
4630 "$B< ./a.out>\n"
4631 "Start of region:        0x804c000\n"
4632 "Got SIGSEGV at address: 0x804e000\n"
4633
4634 #. type: Plain text
4635 #: build/C/man2/mprotect.2:169
4636 #, no-wrap
4637 msgid ""
4638 "#include E<lt>unistd.hE<gt>\n"
4639 "#include E<lt>signal.hE<gt>\n"
4640 "#include E<lt>stdio.hE<gt>\n"
4641 "#include E<lt>malloc.hE<gt>\n"
4642 "#include E<lt>stdlib.hE<gt>\n"
4643 "#include E<lt>errno.hE<gt>\n"
4644 "#include E<lt>sys/mman.hE<gt>\n"
4645 msgstr ""
4646 "#include E<lt>unistd.hE<gt>\n"
4647 "#include E<lt>signal.hE<gt>\n"
4648 "#include E<lt>stdio.hE<gt>\n"
4649 "#include E<lt>malloc.hE<gt>\n"
4650 "#include E<lt>stdlib.hE<gt>\n"
4651 "#include E<lt>errno.hE<gt>\n"
4652 "#include E<lt>sys/mman.hE<gt>\n"
4653
4654 #. type: Plain text
4655 #: build/C/man2/mprotect.2:174
4656 #, no-wrap
4657 msgid "char *buffer;\n"
4658 msgstr "char *buffer;\n"
4659
4660 #. type: Plain text
4661 #: build/C/man2/mprotect.2:182
4662 #, no-wrap
4663 msgid ""
4664 "static void\n"
4665 "handler(int sig, siginfo_t *si, void *unused)\n"
4666 "{\n"
4667 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4668 "            (long) si-E<gt>si_addr);\n"
4669 "    exit(EXIT_FAILURE);\n"
4670 "}\n"
4671 msgstr ""
4672 "static void\n"
4673 "handler(int sig, siginfo_t *si, void *unused)\n"
4674 "{\n"
4675 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4676 "            (long) si-E<gt>si_addr);\n"
4677 "    exit(EXIT_FAILURE);\n"
4678 "}\n"
4679
4680 #. type: Plain text
4681 #: build/C/man2/mprotect.2:189
4682 #, no-wrap
4683 msgid ""
4684 "int\n"
4685 "main(int argc, char *argv[])\n"
4686 "{\n"
4687 "    char *p;\n"
4688 "    int pagesize;\n"
4689 "    struct sigaction sa;\n"
4690 msgstr ""
4691 "int\n"
4692 "main(void)\n"
4693 "{\n"
4694 "    char *p;\n"
4695 "    int pagesize;\n"
4696 "    struct sigaction sa;\n"
4697
4698 #. type: Plain text
4699 #: build/C/man2/mprotect.2:195
4700 #, no-wrap
4701 msgid ""
4702 "    sa.sa_flags = SA_SIGINFO;\n"
4703 "    sigemptyset(&sa.sa_mask);\n"
4704 "    sa.sa_sigaction = handler;\n"
4705 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4706 "        handle_error(\"sigaction\");\n"
4707 msgstr ""
4708 "    sa.sa_flags = SA_SIGINFO;\n"
4709 "    sigemptyset(&sa.sa_mask);\n"
4710 "    sa.sa_sigaction = handler;\n"
4711 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4712 "        handle_error(\"sigaction\");\n"
4713
4714 #. type: Plain text
4715 #: build/C/man2/mprotect.2:199
4716 #, no-wrap
4717 msgid ""
4718 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
4719 "    if (pagesize == -1)\n"
4720 "        handle_error(\"sysconf\");\n"
4721 msgstr ""
4722 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
4723 "    if (pagesize == -1)\n"
4724 "        handle_error(\"sysconf\");\n"
4725
4726 #. type: Plain text
4727 #: build/C/man2/mprotect.2:202
4728 #, no-wrap
4729 msgid ""
4730 "    /* Allocate a buffer aligned on a page boundary;\n"
4731 "       initial protection is PROT_READ | PROT_WRITE */\n"
4732 msgstr ""
4733 "    /* Allocate a buffer aligned on a page boundary;\n"
4734 "       initial protection is PROT_READ | PROT_WRITE */\n"
4735
4736 #. type: Plain text
4737 #: build/C/man2/mprotect.2:206
4738 #, no-wrap
4739 msgid ""
4740 "    buffer = memalign(pagesize, 4 * pagesize);\n"
4741 "    if (buffer == NULL)\n"
4742 "        handle_error(\"memalign\");\n"
4743 msgstr ""
4744 "    buffer = memalign(pagesize, 4 * pagesize);\n"
4745 "    if (buffer == NULL)\n"
4746 "        handle_error(\"memalign\");\n"
4747
4748 #. type: Plain text
4749 #: build/C/man2/mprotect.2:208
4750 #, no-wrap
4751 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
4752 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
4753
4754 #. type: Plain text
4755 #: build/C/man2/mprotect.2:212
4756 #, no-wrap
4757 msgid ""
4758 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
4759 "                PROT_READ) == -1)\n"
4760 "        handle_error(\"mprotect\");\n"
4761 msgstr ""
4762 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
4763 "                PROT_READ) == -1)\n"
4764 "        handle_error(\"mprotect\");\n"
4765
4766 #. type: Plain text
4767 #: build/C/man2/mprotect.2:215
4768 #, no-wrap
4769 msgid ""
4770 "    for (p = buffer ; ; )\n"
4771 "        *(p++) = \\(aqa\\(aq;\n"
4772 msgstr ""
4773 "    for (p = buffer ; ; )\n"
4774 "        *(p++) = \\(aqa\\(aq;\n"
4775
4776 #. type: Plain text
4777 #: build/C/man2/mprotect.2:219
4778 #, no-wrap
4779 msgid ""
4780 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
4781 "    exit(EXIT_SUCCESS);\n"
4782 "}\n"
4783 msgstr ""
4784 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
4785 "    exit(EXIT_SUCCESS);\n"
4786 "}\n"
4787
4788 #. type: Plain text
4789 #: build/C/man2/mprotect.2:223
4790 msgid "B<mmap>(2), B<sysconf>(3)"
4791 msgstr "B<mmap>(2), B<sysconf>(3)"
4792
4793 #. type: TH
4794 #: build/C/man2/mremap.2:31
4795 #, no-wrap
4796 msgid "MREMAP"
4797 msgstr "MREMAP"
4798
4799 #. type: TH
4800 #: build/C/man2/mremap.2:31
4801 #, no-wrap
4802 msgid "2010-06-10"
4803 msgstr "2010-06-10"
4804
4805 #. type: Plain text
4806 #: build/C/man2/mremap.2:34
4807 msgid "mremap - remap a virtual memory address"
4808 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
4809
4810 #. type: Plain text
4811 #: build/C/man2/mremap.2:37
4812 #, no-wrap
4813 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
4814 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
4815
4816 #. type: Plain text
4817 #: build/C/man2/mremap.2:42
4818 #, no-wrap
4819 msgid ""
4820 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4821 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4822 msgstr ""
4823 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4824 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4825
4826 #. type: Plain text
4827 #: build/C/man2/mremap.2:48
4828 msgid ""
4829 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
4830 "moving it at the same time (controlled by the I<flags> argument and the "
4831 "available virtual address space)."
4832 msgstr ""
4833 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
4834 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
4835 "る)。"
4836
4837 #. type: Plain text
4838 #: build/C/man2/mremap.2:62
4839 msgid ""
4840 "I<old_address> is the old address of the virtual memory block that you want "
4841 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
4842 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
4843 "requested size of the virtual memory block after the resize.  An optional "
4844 "fifth argument, I<new_address>, may be provided; see the description of "
4845 "B<MREMAP_FIXED> below."
4846 msgstr ""
4847 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
4848 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
4849 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
4850 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
4851 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
4852 "明を参照のこと。"
4853
4854 #. type: Plain text
4855 #: build/C/man2/mremap.2:74
4856 msgid ""
4857 "In Linux the memory is divided into pages.  A user process has (one or)  "
4858 "several linear virtual memory segments.  Each virtual memory segment has one "
4859 "or more mappings to real memory pages (in the page table).  Each virtual "
4860 "memory segment has its own protection (access rights), which may cause a "
4861 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
4862 "to a read-only segment).  Accessing virtual memory outside of the segments "
4863 "will also cause a segmentation violation."
4864 msgstr ""
4865 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
4866 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
4867 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
4868 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
4869 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
4870 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
4871 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
4872 "ン侵害が発生する。"
4873
4874 #. type: Plain text
4875 #: build/C/man2/mremap.2:82
4876 msgid ""
4877 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
4878 "mapping between virtual addresses and memory pages.  This can be used to "
4879 "implement a very efficient B<realloc>(3)."
4880 msgstr ""
4881 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
4882 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
4883 "B<realloc>(3)  を実装するのに使用されている。"
4884
4885 #. type: Plain text
4886 #: build/C/man2/mremap.2:84
4887 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
4888 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
4889
4890 #. type: TP
4891 #: build/C/man2/mremap.2:84
4892 #, no-wrap
4893 msgid "B<MREMAP_MAYMOVE>"
4894 msgstr "B<MREMAP_MAYMOVE>"
4895
4896 #. type: Plain text
4897 #: build/C/man2/mremap.2:96
4898 msgid ""
4899 "By default, if there is not sufficient space to expand a mapping at its "
4900 "current location, then B<mremap>()  fails.  If this flag is specified, then "
4901 "the kernel is permitted to relocate the mapping to a new virtual address, if "
4902 "necessary.  If the mapping is relocated, then absolute pointers into the old "
4903 "mapping location become invalid (offsets relative to the starting address of "
4904 "the mapping should be employed)."
4905 msgstr ""
4906 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
4907 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
4908 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
4909 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
4910 "レスからの相対オフセットは有効のままである)。"
4911
4912 #. type: TP
4913 #: build/C/man2/mremap.2:96
4914 #, no-wrap
4915 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
4916 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
4917
4918 #. type: Plain text
4919 #: build/C/man2/mremap.2:118
4920 msgid ""
4921 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
4922 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
4923 "I<void *new_address>, which specifies a page-aligned address to which the "
4924 "mapping must be moved.  Any previous mapping at the address range specified "
4925 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
4926 "specified, then B<MREMAP_MAYMOVE> must also be specified."
4927 msgstr ""
4928 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
4929 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
4930 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
4931 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
4932 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
4933 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
4934 "B<MREMAP_MAYMOVE> も指定しなければならない。"
4935
4936 #. type: Plain text
4937 #: build/C/man2/mremap.2:128
4938 msgid ""
4939 "If the memory segment specified by I<old_address> and I<old_size> is locked "
4940 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
4941 "segment is resized and/or relocated.  As a consequence, the amount of memory "
4942 "locked by the process may change."
4943 msgstr ""
4944 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
4945 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
4946 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
4947 "の量は変化する。"
4948
4949 #. type: Plain text
4950 #: build/C/man2/mremap.2:136
4951 msgid ""
4952 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
4953 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
4954 "and I<errno> is set appropriately."
4955 msgstr ""
4956 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
4957 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
4958 "切に設定される。"
4959
4960 #. type: Plain text
4961 #: build/C/man2/mremap.2:143
4962 msgid ""
4963 "The caller tried to expand a memory segment that is locked, but this was not "
4964 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
4965 msgstr ""
4966 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
4967 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
4968
4969 #. type: Plain text
4970 #: build/C/man2/mremap.2:152
4971 msgid ""
4972 "\"Segmentation fault.\" Some address in the range I<old_address> to "
4973 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
4974 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
4975 "the whole address space requested, but those mappings are of different types."
4976 msgstr ""
4977 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
4978 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
4979 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
4980 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
4981 "を受け取るだろう。"
4982
4983 #. type: Plain text
4984 #: build/C/man2/mremap.2:180
4985 msgid ""
4986 "An invalid argument was given.  Possible causes are: I<old_address> was not "
4987 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
4988 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
4989 "was invalid; or the new address range specified by I<new_address> and "
4990 "I<new_size> overlapped the old address range specified by I<old_address> and "
4991 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
4992 "B<MREMAP_MAYMOVE>."
4993 msgstr ""
4994 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
4995 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
4996 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
4997 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
4998 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
4999 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
5000 "されていない。"
5001
5002 #. type: Plain text
5003 #: build/C/man2/mremap.2:186
5004 msgid ""
5005 "The memory area cannot be expanded at the current virtual address, and the "
5006 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
5007 "(virtual) memory available."
5008 msgstr ""
5009 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
5010 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
5011
5012 #.  4.2BSD had a (never actually implemented)
5013 #.  .BR mremap (2)
5014 #.  call with completely different semantics.
5015 #. type: Plain text
5016 #: build/C/man2/mremap.2:192
5017 msgid ""
5018 "This call is Linux-specific, and should not be used in programs intended to "
5019 "be portable."
5020 msgstr ""
5021 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
5022 "い。"
5023
5024 #. type: Plain text
5025 #: build/C/man2/mremap.2:200
5026 msgid ""
5027 "Prior to version 2.4, glibc did not expose the definition of "
5028 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
5029 "I<new_address> argument."
5030 msgstr ""
5031 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
5032 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
5033
5034 #. type: Plain text
5035 #: build/C/man2/mremap.2:209
5036 msgid ""
5037 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5038 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
5039 msgstr ""
5040 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5041 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
5042
5043 #. type: Plain text
5044 #: build/C/man2/mremap.2:214
5045 msgid ""
5046 "Your favorite OS text book for more information on paged memory.  (I<Modern "
5047 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
5048 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
5049 msgstr ""
5050 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
5051 "の\n"
5052 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
5053 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
5054 "System> by Maurice J. Bach.)"
5055
5056 #. type: TH
5057 #: build/C/man2/msync.2:25
5058 #, no-wrap
5059 msgid "MSYNC"
5060 msgstr "MSYNC"
5061
5062 #. type: TH
5063 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:26
5064 #, no-wrap
5065 msgid "2008-04-22"
5066 msgstr "2008-04-22"
5067
5068 #. type: Plain text
5069 #: build/C/man2/msync.2:28
5070 msgid "msync - synchronize a file with a memory map"
5071 msgstr "msync - ファイルをマップしたメモリと同期させる"
5072
5073 #. type: Plain text
5074 #: build/C/man2/msync.2:32
5075 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5076 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5077
5078 #. type: Plain text
5079 #: build/C/man2/msync.2:48
5080 msgid ""
5081 "B<msync>()  flushes changes made to the in-core copy of a file that was "
5082 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
5083 "there is no guarantee that changes are written back before B<munmap>(2)  is "
5084 "called.  To be more precise, the part of the file that corresponds to the "
5085 "memory area starting at I<addr> and having length I<length> is updated."
5086 msgstr ""
5087 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
5088 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
5089 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
5090 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
5091 "更新される。"
5092
5093 #. type: Plain text
5094 #: build/C/man2/msync.2:68
5095 msgid ""
5096 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
5097 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
5098 "specifies that an update be scheduled, but the call returns immediately.  "
5099 "B<MS_SYNC> asks for an update and waits for it to complete.  "
5100 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
5101 "they can be updated with the fresh values just written)."
5102 msgstr ""
5103 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
5104 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
5105 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
5106 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
5107 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
5108 "に対する他のマッピングを無効にすることを要求する。"
5109
5110 #. type: Plain text
5111 #: build/C/man2/msync.2:73
5112 msgid ""
5113 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5114 "appropriately."
5115 msgstr ""
5116 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
5117 "る。"
5118
5119 #. type: TP
5120 #: build/C/man2/msync.2:74
5121 #, no-wrap
5122 msgid "B<EBUSY>"
5123 msgstr "B<EBUSY>"
5124
5125 #. type: Plain text
5126 #: build/C/man2/msync.2:80
5127 msgid ""
5128 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
5129 "specified address range."
5130 msgstr ""
5131 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
5132 "存在する。"
5133
5134 #. type: Plain text
5135 #: build/C/man2/msync.2:93
5136 msgid ""
5137 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
5138 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
5139 "B<MS_ASYNC> are set in I<flags>."
5140 msgstr ""
5141 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
5142 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
5143 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
5144
5145 #. type: Plain text
5146 #: build/C/man2/msync.2:96
5147 msgid "The indicated memory (or part of it) was not mapped."
5148 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
5149
5150 #. type: Plain text
5151 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:103
5152 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
5153 msgid "POSIX.1-2001."
5154 msgstr "POSIX.1-2001."
5155
5156 #. type: Plain text
5157 #: build/C/man2/msync.2:105
5158 msgid ""
5159 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
5160 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
5161 msgstr ""
5162 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
5163 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
5164
5165 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5166 #.  -1: unavailable, 0: ask using sysconf().
5167 #.  glibc defines them to 1.
5168 #. type: Plain text
5169 #: build/C/man2/msync.2:118
5170 msgid ""
5171 "On POSIX systems on which B<msync>()  is available, both "
5172 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
5173 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
5174 msgstr ""
5175 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
5176 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
5177 "定義される。 (B<sysconf>(3)  を参照すること。 )"
5178
5179 #. type: TP
5180 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
5181 #, no-wrap
5182 msgid "B<mmap>(2)"
5183 msgstr "B<mmap>(2)"
5184
5185 #. type: TH
5186 #: build/C/man3/mtrace.3:23
5187 #, no-wrap
5188 msgid "MTRACE"
5189 msgstr "MTRACE"
5190
5191 #. type: Plain text
5192 #: build/C/man3/mtrace.3:26
5193 msgid "mtrace, muntrace - malloc tracing"
5194 msgstr "mtrace, muntrace - malloc のトレース"
5195
5196 #. type: Plain text
5197 #: build/C/man3/mtrace.3:28
5198 msgid "B<#include E<lt>mcheck.hE<gt>>"
5199 msgstr "B<#include E<lt>mcheck.hE<gt>>"
5200
5201 #. type: Plain text
5202 #: build/C/man3/mtrace.3:30
5203 msgid "B<void mtrace(void);>"
5204 msgstr "B<void mtrace(void);>"
5205
5206 #. type: Plain text
5207 #: build/C/man3/mtrace.3:32
5208 msgid "B<void muntrace(void);>"
5209 msgstr "B<void muntrace(void);>"
5210
5211 #. type: Plain text
5212 #: build/C/man3/mtrace.3:44
5213 msgid ""
5214 "The B<mtrace>()  function installs hook functions for the memory-allocation "
5215 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
5216 "hook functions record tracing information about memory allocation and "
5217 "deallocation.  The tracing information can be used to discover memory leaks "
5218 "and attempts to free nonallocated memory in a program."
5219 msgstr ""
5220
5221 #. type: Plain text
5222 #: build/C/man3/mtrace.3:55
5223 msgid ""
5224 "The B<muntrace>()  function disables the hook functions installed by "
5225 "B<mtrace>(), so that tracing information is no longer recorded for the "
5226 "memory-allocation functions.  If no hook functions were successfully "
5227 "installed by B<mtrace>(), B<muntrace>()  does nothing."
5228 msgstr ""
5229
5230 #. type: Plain text
5231 #: build/C/man3/mtrace.3:63
5232 msgid ""
5233 "When B<mtrace>(3)  is called, it checks the value of the environment "
5234 "variable B<MALLOC_TRACE>, which should contain the pathname of a file in "
5235 "which the tracing information is to be recorded.  If the pathname is "
5236 "successfully opened, it is truncated to zero length."
5237 msgstr ""
5238
5239 #. type: Plain text
5240 #: build/C/man3/mtrace.3:76
5241 msgid ""
5242 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
5243 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
5244 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
5245 "ignored, and B<mtrace>()  has no effect."
5246 msgstr ""
5247
5248 #. type: Plain text
5249 #: build/C/man3/mtrace.3:84
5250 msgid ""
5251 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
5252 "program, and B<muntrace>()  is never called."
5253 msgstr ""
5254
5255 #. type: Plain text
5256 #: build/C/man3/mtrace.3:94
5257 msgid ""
5258 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
5259 "designed to be human readable.  The GNU C library provides a Perl script, "
5260 "B<mtrace>(1), that interprets the trace log and produces human-readable "
5261 "output.  For best results, the traced program should be compiled with "
5262 "debugging enabled, so that line-number information is recorded in the "
5263 "executable."
5264 msgstr ""
5265
5266 #. type: Plain text
5267 #: build/C/man3/mtrace.3:100
5268 msgid ""
5269 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
5270 "B<MALLOC_TRACE> points to a valid, writable pathname)."
5271 msgstr ""
5272
5273 #. type: Plain text
5274 #: build/C/man3/mtrace.3:106
5275 msgid ""
5276 "The line-number information produced by B<mtrace>(1)  is not always precise: "
5277 "the line number references may refer to the previous or following (non-"
5278 "blank)  line of the source code."
5279 msgstr ""
5280
5281 #. type: Plain text
5282 #: build/C/man3/mtrace.3:113
5283 msgid ""
5284 "The shell session below demonstrates the use of the B<mtrace>()  function "
5285 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
5286 "different locations.  The demonstration uses the following program:"
5287 msgstr ""
5288
5289 #. type: Plain text
5290 #: build/C/man3/mtrace.3:120
5291 #, no-wrap
5292 msgid ""
5293 "$ B<cat t_mtrace.c>\n"
5294 "#include E<lt>mcheck.hE<gt>\n"
5295 "#include E<lt>stdlib.hE<gt>\n"
5296 "#include E<lt>stdio.hE<gt>\n"
5297 msgstr ""
5298 "$ B<cat t_mtrace.c>\n"
5299 "#include E<lt>mcheck.hE<gt>\n"
5300 "#include E<lt>stdlib.hE<gt>\n"
5301 "#include E<lt>stdio.hE<gt>\n"
5302
5303 #. type: Plain text
5304 #: build/C/man3/mtrace.3:125
5305 #, no-wrap
5306 msgid ""
5307 "int\n"
5308 "main(int argc, char *argv[])\n"
5309 "{\n"
5310 "    int j;\n"
5311 msgstr ""
5312 "int\n"
5313 "main(int argc, char *argv[])\n"
5314 "{\n"
5315 "    int j;\n"
5316
5317 #. type: Plain text
5318 #: build/C/man3/mtrace.3:127
5319 #, no-wrap
5320 msgid "    mtrace();\n"
5321 msgstr "    mtrace();\n"
5322
5323 #. type: Plain text
5324 #: build/C/man3/mtrace.3:130
5325 #, no-wrap
5326 msgid ""
5327 "    for (j = 0; j E<lt> 2; j++)\n"
5328 "        malloc(100);            /* Never freed--a memory leak */\n"
5329 msgstr ""
5330 "    for (j = 0; j E<lt> 2; j++)\n"
5331 "        malloc(100);            /* Never freed--a memory leak */\n"
5332
5333 #. type: Plain text
5334 #: build/C/man3/mtrace.3:134
5335 #, no-wrap
5336 msgid ""
5337 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
5338 "    exit(EXIT_SUCCESS);\n"
5339 "}\n"
5340 msgstr ""
5341 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
5342 "    exit(EXIT_SUCCESS);\n"
5343 "}\n"
5344
5345 #. type: Plain text
5346 #: build/C/man3/mtrace.3:140
5347 msgid ""
5348 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
5349 "memory leaks at two different locations in the program:"
5350 msgstr ""
5351
5352 #. type: Plain text
5353 #: build/C/man3/mtrace.3:153
5354 #, no-wrap
5355 msgid ""
5356 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5357 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5358 "$ B<./t_mtrace>\n"
5359 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5360 "Memory not freed:\n"
5361 "-----------------\n"
5362 "   Address     Size     Caller\n"
5363 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
5364 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
5365 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
5366 msgstr ""
5367 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5368 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5369 "$ B<./t_mtrace>\n"
5370 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5371 "Memory not freed:\n"
5372 "-----------------\n"
5373 "   Address     Size     Caller\n"
5374 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
5375 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
5376 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
5377
5378 #. type: Plain text
5379 #: build/C/man3/mtrace.3:165
5380 msgid ""
5381 "The first two messages about unfreed memory correspond to the two B<malloc>"
5382 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
5383 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
5384 msgstr ""
5385
5386 #. type: Plain text
5387 #: build/C/man3/mtrace.3:170
5388 #, fuzzy
5389 #| msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3)"
5390 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5391 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3)"
5392
5393 #. type: TH
5394 #: build/C/man2/posix_fadvise.2:27
5395 #, no-wrap
5396 msgid "POSIX_FADVISE"
5397 msgstr "POSIX_FADVISE"
5398
5399 #. type: TH
5400 #: build/C/man2/posix_fadvise.2:27 build/C/man2/sync_file_range.2:30
5401 #, no-wrap
5402 msgid "2010-10-09"
5403 msgstr "2010-10-09"
5404
5405 #. type: Plain text
5406 #: build/C/man2/posix_fadvise.2:30
5407 msgid "posix_fadvise - predeclare an access pattern for file data"
5408 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
5409
5410 #. type: Plain text
5411 #: build/C/man2/posix_fadvise.2:33 build/C/man3/posix_fallocate.3:29
5412 #, no-wrap
5413 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
5414 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
5415
5416 #. type: Plain text
5417 #: build/C/man2/posix_fadvise.2:36
5418 #, no-wrap
5419 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5420 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5421
5422 #. type: Plain text
5423 #: build/C/man2/posix_fadvise.2:45
5424 msgid "B<posix_fadvise>():"
5425 msgstr "B<posix_fadvise>():"
5426
5427 #. type: Plain text
5428 #: build/C/man2/posix_fadvise.2:47 build/C/man3/posix_fallocate.3:42
5429 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5430 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5431
5432 #. type: Plain text
5433 #: build/C/man2/posix_fadvise.2:55
5434 msgid ""
5435 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
5436 "data in a specific pattern in the future, thus allowing the kernel to "
5437 "perform appropriate optimizations."
5438 msgstr ""
5439 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
5440 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
5441 "適化を実行することが可能になる。"
5442
5443 #. type: Plain text
5444 #: build/C/man2/posix_fadvise.2:62
5445 msgid ""
5446 "The I<advice> applies to a (not necessarily existent) region starting at "
5447 "I<offset> and extending for I<len> bytes (or until the end of the file if "
5448 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
5449 "binding; it merely constitutes an expectation on behalf of the application."
5450 msgstr ""
5451 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
5452 "イ\n"
5453 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
5454 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
5455 "ケー\n"
5456 "ションのために可能性を構成するだけである。"
5457
5458 #. type: Plain text
5459 #: build/C/man2/posix_fadvise.2:64
5460 msgid "Permissible values for I<advice> include:"
5461 msgstr "I<advice> に許される値には、以下のものが含まれる:"
5462
5463 #. type: TP
5464 #: build/C/man2/posix_fadvise.2:64
5465 #, no-wrap
5466 msgid "B<POSIX_FADV_NORMAL>"
5467 msgstr "B<POSIX_FADV_NORMAL>"
5468
5469 #. type: Plain text
5470 #: build/C/man2/posix_fadvise.2:70
5471 msgid ""
5472 "Indicates that the application has no advice to give about its access "
5473 "pattern for the specified data.  If no advice is given for an open file, "
5474 "this is the default assumption."
5475 msgstr ""
5476 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
5477 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
5478 "合、 これがデフォルトで仮定される。"
5479
5480 #. type: TP
5481 #: build/C/man2/posix_fadvise.2:70
5482 #, no-wrap
5483 msgid "B<POSIX_FADV_SEQUENTIAL>"
5484 msgstr "B<POSIX_FADV_SEQUENTIAL>"
5485
5486 #. type: Plain text
5487 #: build/C/man2/posix_fadvise.2:74
5488 msgid ""
5489 "The application expects to access the specified data sequentially (with "
5490 "lower offsets read before higher ones)."
5491 msgstr ""
5492 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
5493 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
5494
5495 #. type: TP
5496 #: build/C/man2/posix_fadvise.2:74
5497 #, no-wrap
5498 msgid "B<POSIX_FADV_RANDOM>"
5499 msgstr "B<POSIX_FADV_RANDOM>"
5500
5501 #. type: Plain text
5502 #: build/C/man2/posix_fadvise.2:77
5503 msgid "The specified data will be accessed in random order."
5504 msgstr "指定されたデータがランダムな順番でアクセスされる。"
5505
5506 #. type: TP
5507 #: build/C/man2/posix_fadvise.2:77
5508 #, no-wrap
5509 msgid "B<POSIX_FADV_NOREUSE>"
5510 msgstr "B<POSIX_FADV_NOREUSE>"
5511
5512 #. type: Plain text
5513 #: build/C/man2/posix_fadvise.2:80
5514 msgid "The specified data will be accessed only once."
5515 msgstr "指定されたデータは 1 度しかアクセスされない。"
5516
5517 #. type: TP
5518 #: build/C/man2/posix_fadvise.2:80
5519 #, no-wrap
5520 msgid "B<POSIX_FADV_WILLNEED>"
5521 msgstr "B<POSIX_FADV_WILLNEED>"
5522
5523 #. type: Plain text
5524 #: build/C/man2/posix_fadvise.2:83
5525 msgid "The specified data will be accessed in the near future."
5526 msgstr "指定されたデータは近い将来アクセスされる。"
5527
5528 #. type: TP
5529 #: build/C/man2/posix_fadvise.2:83
5530 #, no-wrap
5531 msgid "B<POSIX_FADV_DONTNEED>"
5532 msgstr "B<POSIX_FADV_DONTNEED>"
5533
5534 #. type: Plain text
5535 #: build/C/man2/posix_fadvise.2:86
5536 msgid "The specified data will not be accessed in the near future."
5537 msgstr "指定されたデータは近い将来アクセスされない。"
5538
5539 #. type: Plain text
5540 #: build/C/man2/posix_fadvise.2:89
5541 msgid "On success, zero is returned.  On error, an error number is returned."
5542 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
5543
5544 #. type: Plain text
5545 #: build/C/man2/posix_fadvise.2:93
5546 msgid "The I<fd> argument was not a valid file descriptor."
5547 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
5548
5549 #. type: Plain text
5550 #: build/C/man2/posix_fadvise.2:96
5551 msgid "An invalid value was specified for I<advice>."
5552 msgstr "無効な値が I<advice> に指定された。"
5553
5554 #. type: Plain text
5555 #: build/C/man2/posix_fadvise.2:103
5556 msgid ""
5557 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
5558 "returns B<EINVAL> in this case.)"
5559 msgstr ""
5560 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
5561 "合、Linux は実際には B<EINVAL> を返す)。"
5562
5563 #.  of fadvise64_64()
5564 #. type: Plain text
5565 #: build/C/man2/posix_fadvise.2:111
5566 msgid ""
5567 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
5568 "called B<fadvise64>().  Library support has been provided since glibc "
5569 "version 2.2, via the wrapper function B<posix_fadvise>()."
5570 msgstr ""
5571 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
5572 "対応するシステムコールは B<fadvise64>() という名前である。\n"
5573 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
5574 "ラッパー関数は B<posix_fadvise>() という名前である。"
5575
5576 #. type: Plain text
5577 #: build/C/man2/posix_fadvise.2:120
5578 msgid ""
5579 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
5580 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
5581 msgstr ""
5582 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
5583 "I<off_t> に変更された点に注意すること。"
5584
5585 #. type: Plain text
5586 #: build/C/man2/posix_fadvise.2:126
5587 msgid ""
5588 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
5589 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
5590 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
5591 "the entire file, not just the specified region (but other open file handles "
5592 "to the same file are unaffected)."
5593 msgstr ""
5594 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
5595 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
5596 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
5597 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
5598 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
5599
5600 #. type: Plain text
5601 #: build/C/man2/posix_fadvise.2:133
5602 msgid ""
5603 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
5604 "into the page cache.  The amount of data read may be decreased by the kernel "
5605 "depending on virtual memory load.  (A few megabytes will usually be fully "
5606 "satisfied, and more is rarely useful.)"
5607 msgstr ""
5608 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
5609 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
5610 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
5611 "くてもめったに役に立たない)。"
5612
5613 #. type: Plain text
5614 #: build/C/man2/posix_fadvise.2:137
5615 msgid ""
5616 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
5617 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
5618 "flag is a no-op."
5619 msgstr ""
5620 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
5621 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
5622 "フラグは何も行わない。"
5623
5624 #. type: Plain text
5625 #: build/C/man2/posix_fadvise.2:145
5626 msgid ""
5627 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
5628 "specified region.  This is useful, for example, while streaming large "
5629 "files.  A program may periodically request the kernel to free cached data "
5630 "that has already been used, so that more useful cached pages are not "
5631 "discarded instead."
5632 msgstr ""
5633 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
5634 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
5635 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
5636 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
5637 "されたページが、 代わりに破棄されることはない。"
5638
5639 #. type: Plain text
5640 #: build/C/man2/posix_fadvise.2:153
5641 msgid ""
5642 "Pages that have not yet been written out will be unaffected, so if the "
5643 "application wishes to guarantee that pages will be released, it should call "
5644 "B<fsync>(2)  or B<fdatasync>(2)  first."
5645 msgstr ""
5646 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
5647 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
5648 "B<fdatasync>(2)  を呼ぶべきである。"
5649
5650 #. type: SS
5651 #: build/C/man2/posix_fadvise.2:153
5652 #, no-wrap
5653 msgid "arm_fadvise()"
5654 msgstr "arm_fadvise()"
5655
5656 #. type: Plain text
5657 #: build/C/man2/posix_fadvise.2:165
5658 msgid ""
5659 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
5660 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
5661 "()  is flawed, since it forces a register to be wasted as padding between "
5662 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
5663 "a different system call that orders the arguments suitably:"
5664 msgstr ""
5665
5666 #. type: Plain text
5667 #: build/C/man2/posix_fadvise.2:170
5668 #, no-wrap
5669 msgid ""
5670 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5671 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5672 msgstr ""
5673 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5674 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5675
5676 #.  No ARM support in glibc.
5677 #. type: Plain text
5678 #: build/C/man2/posix_fadvise.2:177
5679 msgid ""
5680 "The behavior of this system call is otherwise exactly the same as "
5681 "B<posix_fadvise>().  No library support is provided for this system call in "
5682 "glibc."
5683 msgstr ""
5684
5685 #. type: Plain text
5686 #: build/C/man2/posix_fadvise.2:182
5687 msgid ""
5688 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
5689 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
5690 "through to the end of the file\"."
5691 msgstr ""
5692 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
5693 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
5694 "いた。"
5695
5696 #.  FIXME . Write a posix_fadvise(3) page.
5697 #. type: Plain text
5698 #: build/C/man2/posix_fadvise.2:188
5699 msgid ""
5700 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
5701 "B<posix_madvise>(3)"
5702 msgstr ""
5703 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
5704 "B<posix_madvise>(3)"
5705
5706 #. type: TH
5707 #: build/C/man3/posix_fallocate.3:23
5708 #, no-wrap
5709 msgid "POSIX_FALLOCATE"
5710 msgstr "POSIX_FALLOCATE"
5711
5712 #. type: TH
5713 #: build/C/man3/posix_fallocate.3:23
5714 #, no-wrap
5715 msgid "2010-09-20"
5716 msgstr "2010-09-20"
5717
5718 #. type: Plain text
5719 #: build/C/man3/posix_fallocate.3:26
5720 msgid "posix_fallocate - allocate file space"
5721 msgstr "posix_fallocate - ファイルのスペースを確保する"
5722
5723 #. type: Plain text
5724 #: build/C/man3/posix_fallocate.3:31
5725 #, no-wrap
5726 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5727 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5728
5729 #. type: Plain text
5730 #: build/C/man3/posix_fallocate.3:40
5731 msgid "B<posix_fallocate>():"
5732 msgstr "B<posix_fallocate>():"
5733
5734 #. type: Plain text
5735 #: build/C/man3/posix_fallocate.3:59
5736 msgid ""
5737 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
5738 "the file referred to by the descriptor I<fd> for the bytes in the range "
5739 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
5740 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
5741 "range are guaranteed not to fail because of lack of disk space."
5742 msgstr ""
5743 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
5744 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
5745 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
5746 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
5747 "失敗しないことが保証される。"
5748
5749 #. type: Plain text
5750 #: build/C/man3/posix_fallocate.3:64
5751 msgid ""
5752 "If the size of the file is less than I<offset>+I<len>, then the file is "
5753 "increased to this size; otherwise the file size is left unchanged."
5754 msgstr ""
5755 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
5756 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
5757
5758 #. type: Plain text
5759 #: build/C/man3/posix_fallocate.3:70
5760 msgid ""
5761 "B<posix_fallocate>()  returns zero on success, or an error number on "
5762 "failure.  Note that I<errno> is not set."
5763 msgstr ""
5764 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
5765 "す。 I<errno> が設定されない点に注意すること。"
5766
5767 #. type: Plain text
5768 #: build/C/man3/posix_fallocate.3:79
5769 msgid "I<offset+len> exceeds the maximum file size."
5770 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
5771
5772 #. type: Plain text
5773 #: build/C/man3/posix_fallocate.3:89
5774 msgid "I<fd> does not refer to a regular file."
5775 msgstr "I<fd> が通常のファイルとして参照されていない。"
5776
5777 #. type: Plain text
5778 #: build/C/man3/posix_fallocate.3:98
5779 msgid "I<fd> refers to a pipe."
5780 msgstr "I<fd> がパイプを参照している。"
5781
5782 #. type: Plain text
5783 #: build/C/man3/posix_fallocate.3:101
5784 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
5785 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
5786
5787 #. type: Plain text
5788 #: build/C/man3/posix_fallocate.3:126
5789 msgid ""
5790 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
5791 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
5792 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
5793 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
5794 "zero."
5795 msgstr ""
5796 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
5797 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
5798 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
5799 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
5800 "る。"
5801
5802 #. type: Plain text
5803 #: build/C/man3/posix_fallocate.3:130
5804 msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5805 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5806
5807 #. type: TH
5808 #: build/C/man3/posix_memalign.3:28
5809 #, no-wrap
5810 msgid "POSIX_MEMALIGN"
5811 msgstr "POSIX_MEMALIGN"
5812
5813 #. type: TH
5814 #: build/C/man3/posix_memalign.3:28
5815 #, no-wrap
5816 msgid "2012-03-23"
5817 msgstr "2012-03-23"
5818
5819 #. type: Plain text
5820 #: build/C/man3/posix_memalign.3:31
5821 msgid ""
5822 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate aligned "
5823 "memory"
5824 msgstr ""
5825 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
5826 "されたメモリの割り当てを行う"
5827
5828 #. type: Plain text
5829 #: build/C/man3/posix_memalign.3:34 build/C/man3/malloc_get_state.3:29
5830 #, no-wrap
5831 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
5832 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
5833
5834 #. type: Plain text
5835 #: build/C/man3/posix_memalign.3:38
5836 #, no-wrap
5837 msgid ""
5838 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5839 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5840 "B<void *valloc(size_t >I<size>B<);>\n"
5841 msgstr ""
5842 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5843 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5844 "B<void *valloc(size_t >I<size>B<);>\n"
5845
5846 #. type: Plain text
5847 #: build/C/man3/posix_memalign.3:43
5848 #, no-wrap
5849 msgid ""
5850 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5851 "B<void *pvalloc(size_t >I<size>B<);>\n"
5852 msgstr ""
5853 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5854 "B<void *pvalloc(size_t >I<size>B<);>\n"
5855
5856 #. type: Plain text
5857 #: build/C/man3/posix_memalign.3:53
5858 msgid ""
5859 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5860 "E<gt>=\\ 600"
5861 msgstr ""
5862 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5863 "E<gt>=\\ 600"
5864
5865 #. type: Plain text
5866 #: build/C/man3/posix_memalign.3:56
5867 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
5868 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
5869
5870 #. type: Plain text
5871 #: build/C/man3/posix_memalign.3:58
5872 msgid "B<valloc>():"
5873 msgstr "B<valloc>():"
5874
5875 #. type: TP
5876 #: build/C/man3/posix_memalign.3:61
5877 #, no-wrap
5878 msgid "Since glibc 2.12:"
5879 msgstr "glibc 2.12 以降:"
5880
5881 #. type: Plain text
5882 #: build/C/man3/posix_memalign.3:68
5883 #, no-wrap
5884 msgid ""
5885 "_BSD_SOURCE ||\n"
5886 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5887 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5888 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5889 msgstr ""
5890 "_BSD_SOURCE ||\n"
5891 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5892 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5893 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5894
5895 #. type: TP
5896 #: build/C/man3/posix_memalign.3:70
5897 #, no-wrap
5898 msgid "Before glibc 2.12:"
5899 msgstr "glibc 2.12 より前:"
5900
5901 #. type: Plain text
5902 #: build/C/man3/posix_memalign.3:74
5903 msgid ""
5904 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5905 "_XOPEN_SOURCE_EXTENDED"
5906 msgstr ""
5907 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5908 "_XOPEN_SOURCE_EXTENDED"
5909
5910 #. type: Plain text
5911 #: build/C/man3/posix_memalign.3:81
5912 msgid ""
5913 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
5914 "declaration of B<valloc>(); no feature test macros are required.)"
5915 msgstr ""
5916 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
5917 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
5918
5919 #.  glibc does this:
5920 #. type: Plain text
5921 #: build/C/man3/posix_memalign.3:102
5922 msgid ""
5923 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
5924 "address of the allocated memory in I<*memptr>.  The address of the allocated "
5925 "memory will be a multiple of I<alignment>, which must be a power of two and "
5926 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
5927 "returns either NULL, or a unique pointer value that can later be "
5928 "successfully passed to B<free>(3)."
5929 msgstr ""
5930 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
5931 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
5932 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
5933 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
5934 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
5935 "で B<free>(3)  に問題なく渡すことができる。"
5936
5937 #.  The behavior of memalign() for size==0 is as for posix_memalign()
5938 #.  but no standards govern this.
5939 #. type: Plain text
5940 #: build/C/man3/posix_memalign.3:113
5941 msgid ""
5942 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
5943 "pointer to the allocated memory.  The memory address will be a multiple of "
5944 "I<alignment>, which must be a power of two."
5945 msgstr ""
5946 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
5947 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
5948 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
5949
5950 #. type: Plain text
5951 #: build/C/man3/posix_memalign.3:122
5952 msgid ""
5953 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
5954 "the added restriction that I<size> should be a multiple of I<alignment>."
5955 msgstr ""
5956 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
5957 "I<alignment>\n"
5958 "の倍数でなければならないという追加の制限がある点が異なる。"
5959
5960 #. type: Plain text
5961 #: build/C/man3/posix_memalign.3:132
5962 msgid ""
5963 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
5964 "pointer to the allocated memory.  The memory address will be a multiple of "
5965 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
5966 msgstr ""
5967 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
5968 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
5969 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
5970 "る。"
5971
5972 #. type: Plain text
5973 #: build/C/man3/posix_memalign.3:139
5974 msgid ""
5975 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
5976 "the size of the allocation up to the next multiple of the system page size."
5977 msgstr ""
5978 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
5979 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
5980
5981 #. type: Plain text
5982 #: build/C/man3/posix_memalign.3:141
5983 msgid "For all of these functions, the memory is not zeroed."
5984 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
5985
5986 #. type: Plain text
5987 #: build/C/man3/posix_memalign.3:148
5988 msgid ""
5989 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
5990 "pointer to the allocated memory, or NULL if the request fails."
5991 msgstr ""
5992 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
5993 "た\n"
5994 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
5995
5996 #. type: Plain text
5997 #: build/C/man3/posix_memalign.3:155
5998 msgid ""
5999 "B<posix_memalign>()  returns zero on success, or one of the error values "
6000 "listed in the next section on failure.  Note that I<errno> is not set."
6001 msgstr ""
6002 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
6003 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
6004 "ること。"
6005
6006 #. type: Plain text
6007 #: build/C/man3/posix_memalign.3:162
6008 msgid ""
6009 "The I<alignment> argument was not a power of two, or was not a multiple of "
6010 "I<sizeof(void *)>."
6011 msgstr ""
6012 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
6013 "かった。"
6014
6015 #. type: Plain text
6016 #: build/C/man3/posix_memalign.3:165
6017 msgid "There was insufficient memory to fulfill the allocation request."
6018 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
6019
6020 #. type: Plain text
6021 #: build/C/man3/posix_memalign.3:172
6022 msgid ""
6023 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
6024 "available in all Linux libc libraries."
6025 msgstr ""
6026 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
6027 "すべての Linux libc ライブラリで使用可能である。"
6028
6029 #. type: Plain text
6030 #: build/C/man3/posix_memalign.3:176
6031 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
6032 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
6033
6034 #. type: Plain text
6035 #: build/C/man3/posix_memalign.3:180
6036 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
6037 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
6038
6039 #. type: Plain text
6040 #: build/C/man3/posix_memalign.3:187
6041 msgid ""
6042 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
6043 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
6044 "POSIX.1-2001."
6045 msgstr ""
6046 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
6047 "り、\n"
6048 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
6049
6050 #. type: Plain text
6051 #: build/C/man3/posix_memalign.3:191
6052 msgid "The function B<pvalloc>()  is a GNU extension."
6053 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
6054
6055 #. type: Plain text
6056 #: build/C/man3/posix_memalign.3:195
6057 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
6058 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
6059
6060 #. type: Plain text
6061 #: build/C/man3/posix_memalign.3:199
6062 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
6063 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
6064
6065 #. type: Plain text
6066 #: build/C/man3/posix_memalign.3:204
6067 #, fuzzy
6068 #| msgid "The function I<aligned_alloc ()> is specified in the C11 standard."
6069 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
6070 msgstr "関数 I<aligned_alloc ()> は C11 標準で規定されている。"
6071
6072 #. type: SS
6073 #: build/C/man3/posix_memalign.3:204
6074 #, no-wrap
6075 msgid "Headers"
6076 msgstr "ヘッダ"
6077
6078 #. type: Plain text
6079 #: build/C/man3/posix_memalign.3:208
6080 msgid ""
6081 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
6082 "hE<gt>>."
6083 msgstr ""
6084 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
6085 "の意見が一致している。"
6086
6087 #. type: Plain text
6088 #: build/C/man3/posix_memalign.3:212
6089 msgid ""
6090 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
6091 "of I<E<lt>malloc.hE<gt>>."
6092 msgstr ""
6093 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
6094 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
6095
6096 #. type: Plain text
6097 #: build/C/man3/posix_memalign.3:219
6098 msgid ""
6099 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
6100 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
6101 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
6102 "above)."
6103 msgstr ""
6104 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
6105 "libc4,5\n"
6106 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
6107 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
6108
6109 #. type: Plain text
6110 #: build/C/man3/posix_memalign.3:228
6111 msgid ""
6112 "On many systems there are alignment restrictions, for example, on buffers "
6113 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
6114 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
6115 "use B<posix_memalign>()  to satisfy this requirement."
6116 msgstr ""
6117 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
6118 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
6119 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
6120 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
6121 "と、この必要条件を満たすことができる。"
6122
6123 #. type: Plain text
6124 #: build/C/man3/posix_memalign.3:237
6125 msgid ""
6126 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
6127 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
6128 "is correct."
6129 msgstr ""
6130 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
6131 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
6132 "確認を行わないかもしれない。"
6133
6134 #.  Other systems allow passing the result of
6135 #.  .IR valloc ()
6136 #.  to
6137 #.  .IR free (3),
6138 #.  but not to
6139 #.  .IR realloc (3).
6140 #. type: Plain text
6141 #: build/C/man3/posix_memalign.3:265
6142 msgid ""
6143 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
6144 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
6145 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
6146 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
6147 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
6148 "implementation allows memory obtained from any of these these functions to "
6149 "be reclaimed with B<free>(3)."
6150 msgstr ""
6151 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を使って\n"
6152 "解放することができる必要がある。 いくつかのシステムでは B<memalign>() や\n"
6153 "B<valloc>() で割り当てられたメモリを再利用する手段が提供されていない。\n"
6154 "(なぜなら B<free>(3) に渡すことができるのは B<malloc>(3) から受け取った\n"
6155 "ポインタだけだが、 例えば B<memalign>() は B<malloc>(3) を呼び出し、\n"
6156 "得た値をアラインメントしてしまうからである) glibc の実装では、 ここに述べた\n"
6157 "関数のいずれで獲得したメモリも B<free>(3) で再利用することができる。"
6158
6159 #. type: Plain text
6160 #: build/C/man3/posix_memalign.3:270
6161 msgid ""
6162 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
6163 "these functions are only needed if you require larger alignment values."
6164 msgstr ""
6165 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
6166 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
6167 "ト\n"
6168 "が必要な場合だけである。"
6169
6170 #. type: Plain text
6171 #: build/C/man3/posix_memalign.3:275
6172 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6173 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6174
6175 #. type: TH
6176 #: build/C/man2/readahead.2:28
6177 #, no-wrap
6178 msgid "READAHEAD"
6179 msgstr "READAHEAD"
6180
6181 #. type: TH
6182 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
6183 #, no-wrap
6184 msgid "2010-09-10"
6185 msgstr "2010-09-10"
6186
6187 #. type: Plain text
6188 #: build/C/man2/readahead.2:31
6189 msgid "readahead - perform file readahead into page cache"
6190 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
6191
6192 #. type: Plain text
6193 #: build/C/man2/readahead.2:37
6194 #, no-wrap
6195 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6196 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6197
6198 #. type: Plain text
6199 #: build/C/man2/readahead.2:65
6200 msgid ""
6201 "B<readahead>()  populates the page cache with data from a file so that "
6202 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
6203 "argument is a file descriptor identifying the file which is to be read.  The "
6204 "I<offset> argument specifies the starting point from which data is to be "
6205 "read and I<count> specifies the number of bytes to be read.  I/O is "
6206 "performed in whole pages, so that I<offset> is effectively rounded down to a "
6207 "page boundary and bytes are read up to the next page boundary greater than "
6208 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
6209 "of the file.  B<readahead>()  blocks until the specified data has been "
6210 "read.  The current file offset of the open file referred to by I<fd> is left "
6211 "unchanged."
6212 msgstr ""
6213 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
6214 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
6215 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
6216 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
6217 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
6218 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
6219 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
6220 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
6221 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
6222 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
6223 "更されない。"
6224
6225 #. type: Plain text
6226 #: build/C/man2/readahead.2:71
6227 msgid ""
6228 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
6229 "I<errno> set to indicate the cause of the error."
6230 msgstr ""
6231 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
6232 "ラーの原因を示す値を設定する。"
6233
6234 #. type: Plain text
6235 #: build/C/man2/readahead.2:76
6236 msgid "I<fd> is not a valid file descriptor or is not open for reading."
6237 msgstr ""
6238 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
6239 "ていない。"
6240
6241 #. type: Plain text
6242 #: build/C/man2/readahead.2:82
6243 msgid ""
6244 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
6245 msgstr ""
6246 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
6247 "ファイルであった。"
6248
6249 #. type: Plain text
6250 #: build/C/man2/readahead.2:87
6251 msgid ""
6252 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
6253 "been provided since version 2.3."
6254 msgstr ""
6255 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
6256 "は glibc バージョン 2.3 以降で行われている。"
6257
6258 #. type: Plain text
6259 #: build/C/man2/readahead.2:92
6260 msgid ""
6261 "The B<readahead>()  system call is Linux-specific, and its use should be "
6262 "avoided in portable applications."
6263 msgstr ""
6264 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
6265 "は 使用を避けるべきである。"
6266
6267 #. type: Plain text
6268 #: build/C/man2/readahead.2:98
6269 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6270 msgstr ""
6271 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6272
6273 #. type: TH
6274 #: build/C/man2/remap_file_pages.2:26
6275 #, no-wrap
6276 msgid "REMAP_FILE_PAGES"
6277 msgstr "REMAP_FILE_PAGES"
6278
6279 #. type: Plain text
6280 #: build/C/man2/remap_file_pages.2:29
6281 msgid "remap_file_pages - create a nonlinear file mapping"
6282 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
6283
6284 #. type: Plain text
6285 #: build/C/man2/remap_file_pages.2:33
6286 #, no-wrap
6287 msgid ""
6288 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6289 "B<#include E<lt>sys/mman.hE<gt>>\n"
6290 msgstr ""
6291 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6292 "B<#include E<lt>sys/mman.hE<gt>>\n"
6293
6294 #. type: Plain text
6295 #: build/C/man2/remap_file_pages.2:36
6296 #, no-wrap
6297 msgid ""
6298 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6299 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6300 msgstr ""
6301 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6302 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6303
6304 #. type: Plain text
6305 #: build/C/man2/remap_file_pages.2:49
6306 msgid ""
6307 "The B<remap_file_pages>()  system call is used to create a nonlinear "
6308 "mapping, that is, a mapping in which the pages of the file are mapped into a "
6309 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
6310 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
6311 "does not require the kernel to create additional VMA (Virtual Memory Area) "
6312 "data structures."
6313 msgstr ""
6314 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
6315 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
6316 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
6317 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
6318 "域)  データ構造体を追加で作成する必要がないことである。"
6319
6320 #. type: Plain text
6321 #: build/C/man2/remap_file_pages.2:51
6322 msgid "To create a nonlinear mapping we perform the following steps:"
6323 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
6324
6325 #. type: TP
6326 #: build/C/man2/remap_file_pages.2:51
6327 #, no-wrap
6328 msgid "1."
6329 msgstr "1."
6330
6331 #. type: Plain text
6332 #: build/C/man2/remap_file_pages.2:59
6333 msgid ""
6334 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
6335 "mapping must be created with the B<MAP_SHARED> flag."
6336 msgstr ""
6337 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
6338 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
6339 "い。"
6340
6341 #. type: TP
6342 #: build/C/man2/remap_file_pages.2:59
6343 #, no-wrap
6344 msgid "2."
6345 msgstr "2."
6346
6347 #. type: Plain text
6348 #: build/C/man2/remap_file_pages.2:67
6349 msgid ""
6350 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
6351 "correspondence between the pages of the mapping and the pages of the file.  "
6352 "It is possible to map the same page of a file into multiple locations within "
6353 "the mapped region."
6354 msgstr ""
6355 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
6356 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
6357 "所に マップすることが可能である。"
6358
6359 #. type: Plain text
6360 #: build/C/man2/remap_file_pages.2:78
6361 msgid ""
6362 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
6363 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
6364 "system page size; I<size> is the length of the region in bytes."
6365 msgstr ""
6366 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
6367 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
6368 "る。 I<size> は領域の長さであり、単位はバイトである。"
6369
6370 #. type: Plain text
6371 #: build/C/man2/remap_file_pages.2:96
6372 msgid ""
6373 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
6374 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
6375 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
6376 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
6377 "and I<size> will be placed."
6378 msgstr ""
6379 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
6380 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
6381 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
6382 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
6383 "レスを、 I<addr> によって指定することである。"
6384
6385 #.  This rounding is weird, and not consistent with the treatment of
6386 #.  the analogous arguments for munmap()/mprotect() and for mlock().
6387 #.  MTK, 14 Sep 2005
6388 #. type: Plain text
6389 #: build/C/man2/remap_file_pages.2:110
6390 msgid ""
6391 "The values specified in I<addr> and I<size> should be multiples of the "
6392 "system page size.  If they are not, then the kernel rounds I<both> values "
6393 "I<down> to the nearest multiple of the page size."
6394 msgstr ""
6395 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
6396 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
6397 "「切り下げる」。"
6398
6399 #. type: Plain text
6400 #: build/C/man2/remap_file_pages.2:114
6401 msgid "The I<prot> argument must be specified as 0."
6402 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
6403
6404 #. type: Plain text
6405 #: build/C/man2/remap_file_pages.2:122
6406 msgid ""
6407 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
6408 "other than B<MAP_NONBLOCK> are ignored."
6409 msgstr ""
6410 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
6411 "の全てのフラグは無視される。"
6412
6413 #. type: Plain text
6414 #: build/C/man2/remap_file_pages.2:129
6415 msgid ""
6416 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
6417 "I<errno> is set appropriately."
6418 msgstr ""
6419 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
6420 "れ、 I<errno> が適切に設定される。"
6421
6422 #. type: Plain text
6423 #: build/C/man2/remap_file_pages.2:137
6424 msgid ""
6425 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
6426 "flag."
6427 msgstr ""
6428 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
6429 "いない。"
6430
6431 #.  And possibly others from vma->vm_ops->populate()
6432 #. type: Plain text
6433 #: build/C/man2/remap_file_pages.2:146
6434 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
6435 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
6436
6437 #. type: Plain text
6438 #: build/C/man2/remap_file_pages.2:151
6439 msgid ""
6440 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
6441 "support was added in version 2.3.3."
6442 msgstr ""
6443 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
6444 "サポートは glibc バージョン 2.3.3 で追加された。"
6445
6446 #. type: Plain text
6447 #: build/C/man2/remap_file_pages.2:155
6448 msgid "The B<remap_file_pages>()  system call is Linux-specific."
6449 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
6450
6451 #. type: Plain text
6452 #: build/C/man2/remap_file_pages.2:162
6453 msgid ""
6454 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6455 "B<msync>(2)"
6456 msgstr ""
6457 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6458 "B<msync>(2)"
6459
6460 #. type: TH
6461 #: build/C/man3/shm_open.3:26
6462 #, no-wrap
6463 msgid "SHM_OPEN"
6464 msgstr "SHM_OPEN"
6465
6466 #. type: TH
6467 #: build/C/man3/shm_open.3:26
6468 #, no-wrap
6469 msgid "2009-02-25"
6470 msgstr "2009-02-25"
6471
6472 #. type: Plain text
6473 #: build/C/man3/shm_open.3:29
6474 msgid ""
6475 "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
6476 msgstr ""
6477 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
6478 "行う"
6479
6480 #. type: Plain text
6481 #: build/C/man3/shm_open.3:33
6482 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
6483 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
6484
6485 #. type: Plain text
6486 #: build/C/man3/shm_open.3:35
6487 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
6488 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
6489
6490 #. type: Plain text
6491 #: build/C/man3/shm_open.3:37
6492 msgid ""
6493 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
6494 msgstr ""
6495 "B<void * shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t "
6496 ">I<mode>B<);>"
6497
6498 #. type: Plain text
6499 #: build/C/man3/shm_open.3:39
6500 msgid "B<int shm_unlink(const char *>I<name>B<);>"
6501 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
6502
6503 #. type: Plain text
6504 #: build/C/man3/shm_open.3:41
6505 msgid "Link with I<-lrt>."
6506 msgstr "I<-lrt> でリンクする。"
6507
6508 #. type: Plain text
6509 #: build/C/man3/shm_open.3:53
6510 msgid ""
6511 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
6512 "memory object.  A POSIX shared memory object is in effect a handle which can "
6513 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
6514 "memory.  The B<shm_unlink>()  function performs the converse operation, "
6515 "removing an object previously created by B<shm_open>()."
6516 msgstr ""
6517 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
6518 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
6519 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
6520 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
6521 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
6522
6523 #.  glibc allows the initial slash to be omitted, and makes
6524 #.  multiple initial slashes equivalent to a single slash.
6525 #.  This differs from the implementation of POSIX message queues.
6526 #.  glibc allows subdirectory components in the name, in which
6527 #.  case the subdirectory must exist under /dev/shm, and allow the
6528 #.  required permissions if a user wants to create a shared memory
6529 #.  object in that subdirectory.
6530 #. type: Plain text
6531 #: build/C/man3/shm_open.3:74
6532 msgid ""
6533 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
6534 "specifies the shared memory object to be created or opened.  For portable "
6535 "use, a shared memory object should be identified by a name of the form I</"
6536 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
6537 "255) characters consisting of an initial slash, followed by one or more "
6538 "characters, none of which are slashes."
6539 msgstr ""
6540 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
6541 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
6542 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
6543 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
6544 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
6545
6546 #. type: Plain text
6547 #: build/C/man3/shm_open.3:81
6548 msgid ""
6549 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
6550 "or B<O_RDWR> and any of the other flags listed here:"
6551 msgstr ""
6552 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
6553 "述べる他のフラグの論理和をとったもの を指定する。"
6554
6555 #. type: TP
6556 #: build/C/man3/shm_open.3:81
6557 #, no-wrap
6558 msgid "B<O_RDONLY>"
6559 msgstr "B<O_RDONLY>"
6560
6561 #. type: Plain text
6562 #: build/C/man3/shm_open.3:87
6563 msgid ""
6564 "Open the object for read access.  A shared memory object opened in this way "
6565 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
6566 msgstr ""
6567 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
6568 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
6569 "B<mmap>(2)  することができる。"
6570
6571 #. type: TP
6572 #: build/C/man3/shm_open.3:87
6573 #, no-wrap
6574 msgid "B<O_RDWR>"
6575 msgstr "B<O_RDWR>"
6576
6577 #. type: Plain text
6578 #: build/C/man3/shm_open.3:90
6579 msgid "Open the object for read-write access."
6580 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
6581
6582 #. type: TP
6583 #: build/C/man3/shm_open.3:90
6584 #, no-wrap
6585 msgid "B<O_CREAT>"
6586 msgstr "B<O_CREAT>"
6587
6588 #.  In truth it is actually the file system IDs on Linux, but these
6589 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
6590 #. type: Plain text
6591 #: build/C/man3/shm_open.3:110
6592 msgid ""
6593 "Create the shared memory object if it does not exist.  The user and group "
6594 "ownership of the object are taken from the corresponding effective IDs of "
6595 "the calling process, and the object's permission bits are set according to "
6596 "the low-order 9 bits of I<mode>, except that those bits set in the process "
6597 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
6598 "A set of macro constants which can be used to define I<mode> is listed in "
6599 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
6600 "including I<E<lt>sys/stat.hE<gt>>.)"
6601 msgstr ""
6602 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
6603 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
6604 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
6605 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
6606 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
6607 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
6608 "hE<gt>> のインクルードにより得られる)。"
6609
6610 #. type: Plain text
6611 #: build/C/man3/shm_open.3:116
6612 msgid ""
6613 "A new shared memory object initially has zero length\\(emthe size of the "
6614 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
6615 "shared memory object are automatically initialized to 0."
6616 msgstr ""
6617 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
6618 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
6619 "して新規に確保されたバイトは自動的に 0 に初期化される。"
6620
6621 #. type: TP
6622 #: build/C/man3/shm_open.3:116
6623 #, no-wrap
6624 msgid "B<O_EXCL>"
6625 msgstr "B<O_EXCL>"
6626
6627 #. type: Plain text
6628 #: build/C/man3/shm_open.3:125
6629 msgid ""
6630 "If B<O_CREAT> was also specified, and a shared memory object with the given "
6631 "I<name> already exists, return an error.  The check for the existence of the "
6632 "object, and its creation if it does not exist, are performed atomically."
6633 msgstr ""
6634 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
6635 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
6636 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
6637 "atomically)。"
6638
6639 #. type: TP
6640 #: build/C/man3/shm_open.3:125
6641 #, no-wrap
6642 msgid "B<O_TRUNC>"
6643 msgstr "B<O_TRUNC>"
6644
6645 #. type: Plain text
6646 #: build/C/man3/shm_open.3:128
6647 msgid "If the shared memory object already exists, truncate it to zero bytes."
6648 msgstr ""
6649 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
6650 "切り詰める。"
6651
6652 #. type: Plain text
6653 #: build/C/man3/shm_open.3:131
6654 msgid ""
6655 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
6656 "hE<gt>>."
6657 msgstr ""
6658 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
6659
6660 #. type: Plain text
6661 #: build/C/man3/shm_open.3:142
6662 msgid ""
6663 "On successful completion B<shm_open>()  returns a new file descriptor "
6664 "referring to the shared memory object.  This file descriptor is guaranteed "
6665 "to be the lowest-numbered file descriptor not previously opened within the "
6666 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
6667 "descriptor."
6668 msgstr ""
6669 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
6670 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
6671 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
6672 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
6673 "ファイル・ディスクリプタに設定される。"
6674
6675 #. type: Plain text
6676 #: build/C/man3/shm_open.3:151
6677 msgid ""
6678 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
6679 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
6680 "the file descriptor may be closed without affecting the memory mapping."
6681 msgstr ""
6682 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
6683 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
6684 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
6685 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
6686
6687 #. type: Plain text
6688 #: build/C/man3/shm_open.3:169
6689 msgid ""
6690 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
6691 "shared memory object name, and, once all processes have unmapped the object, "
6692 "de-allocates and destroys the contents of the associated memory region.  "
6693 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
6694 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
6695 "case a new, distinct object is created)."
6696 msgstr ""
6697 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
6698 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
6699 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
6700 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
6701 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
6702 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
6703
6704 #. type: Plain text
6705 #: build/C/man3/shm_open.3:178
6706 msgid ""
6707 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
6708 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
6709 "or -1 on error."
6710 msgstr ""
6711 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
6712 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
6713 "を、エラーが起こった場合 -1 を返す。"
6714
6715 #. type: Plain text
6716 #: build/C/man3/shm_open.3:185
6717 msgid ""
6718 "On failure, I<errno> is set to indicate the cause of the error.  Values "
6719 "which may appear in I<errno> include the following:"
6720 msgstr ""
6721 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
6722 "される値は以下の通りである:"
6723
6724 #. type: Plain text
6725 #: build/C/man3/shm_open.3:190
6726 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
6727 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
6728
6729 #. type: Plain text
6730 #: build/C/man3/shm_open.3:200
6731 msgid ""
6732 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
6733 "B<O_TRUNC> was specified and the caller does not have write permission on "
6734 "the object."
6735 msgstr ""
6736 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
6737 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
6738 "み権限が なかった。"
6739
6740 #. type: TP
6741 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:192
6742 #, no-wrap
6743 msgid "B<EEXIST>"
6744 msgstr "B<EEXIST>"
6745
6746 #. type: Plain text
6747 #: build/C/man3/shm_open.3:211
6748 msgid ""
6749 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
6750 "shared memory object specified by I<name> already exists."
6751 msgstr ""
6752 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
6753 "定された共有メモリ・オブジェクトが既に存在した。"
6754
6755 #. type: Plain text
6756 #: build/C/man3/shm_open.3:218
6757 msgid "The I<name> argument to B<shm_open>()  was invalid."
6758 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
6759
6760 #. type: TP
6761 #: build/C/man3/shm_open.3:218
6762 #, no-wrap
6763 msgid "B<EMFILE>"
6764 msgstr "B<EMFILE>"
6765
6766 #. type: Plain text
6767 #: build/C/man3/shm_open.3:221
6768 msgid "The process already has the maximum number of files open."
6769 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
6770
6771 #. type: TP
6772 #: build/C/man3/shm_open.3:221
6773 #, no-wrap
6774 msgid "B<ENAMETOOLONG>"
6775 msgstr "B<ENAMETOOLONG>"
6776
6777 #. type: Plain text
6778 #: build/C/man3/shm_open.3:227
6779 msgid "The length of I<name> exceeds B<PATH_MAX>."
6780 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
6781
6782 #. type: Plain text
6783 #: build/C/man3/shm_open.3:231
6784 msgid ""
6785 "The limit on the total number of files open on the system has been reached."
6786 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
6787
6788 #. type: TP
6789 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
6790 #: build/C/man2/shmget.2:206
6791 #, no-wrap
6792 msgid "B<ENOENT>"
6793 msgstr "B<ENOENT>"
6794
6795 #. type: Plain text
6796 #: build/C/man3/shm_open.3:240
6797 msgid ""
6798 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
6799 "B<O_CREAT> was not specified."
6800 msgstr ""
6801 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
6802 "B<O_CREAT> が指定されていなかった。"
6803
6804 #. type: Plain text
6805 #: build/C/man3/shm_open.3:247
6806 msgid ""
6807 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
6808 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
6809
6810 #. type: Plain text
6811 #: build/C/man3/shm_open.3:249
6812 msgid "These functions are provided in glibc 2.2 and later."
6813 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
6814
6815 #. type: Plain text
6816 #: build/C/man3/shm_open.3:255
6817 msgid ""
6818 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
6819 "object is set to either the calling process's effective group ID or \"a "
6820 "system default group ID\"."
6821 msgstr ""
6822 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
6823 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
6824 "ID」 のどちらかに設定される、と書かれている。"
6825
6826 #. type: Plain text
6827 #: build/C/man3/shm_open.3:264
6828 msgid ""
6829 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
6830 "unspecified.  On Linux, this will successfully truncate an existing shared "
6831 "memory object\\(emthis may not be so on other UNIX systems."
6832 msgstr ""
6833 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
6834 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
6835 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
6836
6837 #. type: Plain text
6838 #: build/C/man3/shm_open.3:269
6839 msgid ""
6840 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
6841 "dedicated file system, which is normally mounted under I</dev/shm>."
6842 msgstr ""
6843 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
6844 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
6845
6846 #. type: Plain text
6847 #: build/C/man3/shm_open.3:280
6848 msgid ""
6849 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6850 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6851 msgstr ""
6852 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6853 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6854
6855 #. type: TH
6856 #: build/C/man7/shm_overview.7:27
6857 #, no-wrap
6858 msgid "SHM_OVERVIEW"
6859 msgstr "SHM_OVERVIEW"
6860
6861 #. type: Plain text
6862 #: build/C/man7/shm_overview.7:30
6863 msgid "shm_overview - Overview of POSIX shared memory"
6864 msgstr "shm_overview - POSIX 共有メモリの概要"
6865
6866 #. type: Plain text
6867 #: build/C/man7/shm_overview.7:33
6868 msgid ""
6869 "The POSIX shared memory API allows processes to communicate information by "
6870 "sharing a region of memory."
6871 msgstr ""
6872 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
6873 "情報をやり取りすることができる。"
6874
6875 #. type: Plain text
6876 #: build/C/man7/shm_overview.7:35
6877 msgid "The interfaces employed in the API are:"
6878 msgstr "この API では以下のインターフェースが採用されている。"
6879
6880 #. type: TP
6881 #: build/C/man7/shm_overview.7:35
6882 #, no-wrap
6883 msgid "B<shm_open>(3)"
6884 msgstr "B<shm_open>(3)"
6885
6886 #. type: Plain text
6887 #: build/C/man7/shm_overview.7:42
6888 msgid ""
6889 "Create and open a new object, or open an existing object.  This is analogous "
6890 "to B<open>(2).  The call returns a file descriptor for use by the other "
6891 "interfaces listed below."
6892 msgstr ""
6893 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
6894 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
6895 "る ファイルディスクリプタを返す。"
6896
6897 #. type: TP
6898 #: build/C/man7/shm_overview.7:42
6899 #, no-wrap
6900 msgid "B<ftruncate>(2)"
6901 msgstr "B<ftruncate>(2)"
6902
6903 #. type: Plain text
6904 #: build/C/man7/shm_overview.7:46
6905 msgid ""
6906 "Set the size of the shared memory object.  (A newly created shared memory "
6907 "object has a length of zero.)"
6908 msgstr "共有メモリオブジェクトの大きさを設定する。"
6909
6910 #. type: Plain text
6911 #: build/C/man7/shm_overview.7:50
6912 msgid ""
6913 "Map the shared memory object into the virtual address space of the calling "
6914 "process."
6915 msgstr ""
6916 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
6917
6918 #. type: TP
6919 #: build/C/man7/shm_overview.7:50
6920 #, no-wrap
6921 msgid "B<munmap>(2)"
6922 msgstr "B<munmap>(2)"
6923
6924 #. type: Plain text
6925 #: build/C/man7/shm_overview.7:54
6926 msgid ""
6927 "Unmap the shared memory object from the virtual address space of the calling "
6928 "process."
6929 msgstr ""
6930 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
6931 "る。"
6932
6933 #. type: TP
6934 #: build/C/man7/shm_overview.7:54
6935 #, no-wrap
6936 msgid "B<shm_unlink>(3)"
6937 msgstr "B<shm_unlink>(3)"
6938
6939 #. type: Plain text
6940 #: build/C/man7/shm_overview.7:57
6941 msgid "Remove a shared memory object name."
6942 msgstr "共有メモリオブジェクト名を削除する。"
6943
6944 #. type: TP
6945 #: build/C/man7/shm_overview.7:57
6946 #, no-wrap
6947 msgid "B<close>(2)"
6948 msgstr "B<close>(2)"
6949
6950 #. type: Plain text
6951 #: build/C/man7/shm_overview.7:62
6952 msgid ""
6953 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
6954 "needed."
6955 msgstr ""
6956 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
6957 "のファイルディスクリプタをクローズする。"
6958
6959 #. type: TP
6960 #: build/C/man7/shm_overview.7:62
6961 #, no-wrap
6962 msgid "B<fstat>(2)"
6963 msgstr "B<fstat>(2)"
6964
6965 #. type: Plain text
6966 #: build/C/man7/shm_overview.7:76
6967 msgid ""
6968 "Obtain a I<stat> structure that describes the shared memory object.  Among "
6969 "the information returned by this call are the object's size (I<st_size>), "
6970 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
6971 msgstr ""
6972 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
6973 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
6974 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
6975
6976 #. type: TP
6977 #: build/C/man7/shm_overview.7:76
6978 #, no-wrap
6979 msgid "B<fchown>(2)"
6980 msgstr "B<fchown>(2)"
6981
6982 #. type: Plain text
6983 #: build/C/man7/shm_overview.7:79
6984 msgid "To change the ownership of a shared memory object."
6985 msgstr "共有メモリオブジェクトの所有権を変更する。"
6986
6987 #. type: TP
6988 #: build/C/man7/shm_overview.7:79
6989 #, no-wrap
6990 msgid "B<fchmod>(2)"
6991 msgstr "B<fchmod>(2)"
6992
6993 #. type: Plain text
6994 #: build/C/man7/shm_overview.7:82
6995 msgid "To change the permissions of a shared memory object."
6996 msgstr "共有メモリオブジェクトの許可属性を変更する。"
6997
6998 #. type: SS
6999 #: build/C/man7/shm_overview.7:82
7000 #, no-wrap
7001 msgid "Versions"
7002 msgstr "Versions"
7003
7004 #. type: Plain text
7005 #: build/C/man7/shm_overview.7:84
7006 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
7007 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
7008
7009 #. type: SS
7010 #: build/C/man7/shm_overview.7:84
7011 #, no-wrap
7012 msgid "Persistence"
7013 msgstr "持続性"
7014
7015 #. type: Plain text
7016 #: build/C/man7/shm_overview.7:89
7017 msgid ""
7018 "POSIX shared memory objects have kernel persistence: a shared memory object "
7019 "will exist until the system is shut down, or until all processes have "
7020 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
7021 msgstr ""
7022 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
7023 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
7024 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
7025
7026 #. type: SS
7027 #: build/C/man7/shm_overview.7:89
7028 #, no-wrap
7029 msgid "Linking"
7030 msgstr "リンク"
7031
7032 #. type: Plain text
7033 #: build/C/man7/shm_overview.7:94
7034 msgid ""
7035 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
7036 "to link against the real-time library, I<librt>."
7037 msgstr ""
7038 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
7039 "タイムライブラリ I<librt> とリンクしなければならない。"
7040
7041 #. type: SS
7042 #: build/C/man7/shm_overview.7:94
7043 #, no-wrap
7044 msgid "Accessing shared memory objects via the file system"
7045 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
7046
7047 #. type: Plain text
7048 #: build/C/man7/shm_overview.7:101
7049 msgid ""
7050 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
7051 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
7052 "supports the use of access control lists (ACLs)  to control the permissions "
7053 "of objects in the virtual file system."
7054 msgstr ""
7055 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
7056 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
7057 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
7058 "スト (ACL; access control lists) を使うことができる。"
7059
7060 #. type: Plain text
7061 #: build/C/man7/shm_overview.7:106
7062 msgid ""
7063 "Typically, processes must synchronize their access to a shared memory "
7064 "object, using, for example, POSIX semaphores."
7065 msgstr ""
7066 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
7067 "使ってプロセス間で同期をとらなければならない。"
7068
7069 #. type: Plain text
7070 #: build/C/man7/shm_overview.7:114
7071 msgid ""
7072 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
7073 "memory API.  POSIX shared memory provides a simpler, and better designed "
7074 "interface; on the other hand POSIX shared memory is somewhat less widely "
7075 "available (especially on older systems) than System V shared memory."
7076 msgstr ""
7077 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
7078 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
7079 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
7080 "システムが少ない (特に、古いシステムでは少ない)。"
7081
7082 #. type: Plain text
7083 #: build/C/man7/shm_overview.7:127
7084 msgid ""
7085 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7086 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7087 "B<shm_unlink>(3), B<sem_overview>(7)"
7088 msgstr ""
7089 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7090 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7091 "B<shm_unlink>(3), B<sem_overview>(7)"
7092
7093 #. type: TH
7094 #: build/C/man2/shmctl.2:43
7095 #, no-wrap
7096 msgid "SHMCTL"
7097 msgstr "SHMCTL"
7098
7099 #. type: TH
7100 #: build/C/man2/shmctl.2:43
7101 #, no-wrap
7102 msgid "2008-08-07"
7103 msgstr "2008-08-07"
7104
7105 #. type: Plain text
7106 #: build/C/man2/shmctl.2:46
7107 msgid "shmctl - shared memory control"
7108 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
7109
7110 #. type: Plain text
7111 #: build/C/man2/shmctl.2:49 build/C/man2/shmget.2:42
7112 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
7113 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
7114
7115 #. type: Plain text
7116 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
7117 msgid "B<#include E<lt>sys/shm.hE<gt>>"
7118 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
7119
7120 #. type: Plain text
7121 #: build/C/man2/shmctl.2:53
7122 msgid ""
7123 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7124 msgstr ""
7125 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7126
7127 #. type: Plain text
7128 #: build/C/man2/shmctl.2:60
7129 msgid ""
7130 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
7131 "shared memory segment whose identifier is given in I<shmid>."
7132 msgstr ""
7133 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
7134 "指示した制御命令を実行する。"
7135
7136 #. type: Plain text
7137 #: build/C/man2/shmctl.2:65
7138 msgid ""
7139 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
7140 "I<E<lt>sys/shm.hE<gt>> as follows:"
7141 msgstr ""
7142 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
7143 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
7144
7145 #. type: Plain text
7146 #: build/C/man2/shmctl.2:79
7147 #, no-wrap
7148 msgid ""
7149 "struct shmid_ds {\n"
7150 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
7151 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
7152 "    time_t          shm_atime;   /* Last attach time */\n"
7153 "    time_t          shm_dtime;   /* Last detach time */\n"
7154 "    time_t          shm_ctime;   /* Last change time */\n"
7155 "    pid_t           shm_cpid;    /* PID of creator */\n"
7156 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
7157 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
7158 "    ...\n"
7159 "};\n"
7160 msgstr ""
7161 "struct shmid_ds {\n"
7162 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
7163 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
7164 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
7165 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
7166 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
7167 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
7168 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
7169 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
7170 "    ...\n"
7171 "};\n"
7172
7173 #. type: Plain text
7174 #: build/C/man2/shmctl.2:87
7175 msgid ""
7176 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
7177 "(the highlighted fields are settable using B<IPC_SET>):"
7178 msgstr ""
7179 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
7180 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
7181
7182 #. type: Plain text
7183 #: build/C/man2/shmctl.2:100
7184 #, no-wrap
7185 msgid ""
7186 "struct ipc_perm {\n"
7187 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
7188 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
7189 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
7190 "    uid_t          cuid;     /* Effective UID of creator */\n"
7191 "    gid_t          cgid;     /* Effective GID of creator */\n"
7192 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
7193 "                                SHM_LOCKED flags */\n"
7194 "    unsigned short __seq;    /* Sequence number */\n"
7195 "};\n"
7196 msgstr ""
7197 "struct ipc_perm {\n"
7198 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
7199 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
7200 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
7201 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
7202 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
7203 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
7204 "                                SHM_LOCKED フラグ */\n"
7205 "    unsigned short __seq;    /* シーケンス番号 */\n"
7206 "};\n"
7207
7208 #. type: Plain text
7209 #: build/C/man2/shmctl.2:106
7210 msgid "Valid values for I<cmd> are:"
7211 msgstr "I<cmd> として有効な値は以下の通り:"
7212
7213 #. type: TP
7214 #: build/C/man2/shmctl.2:107
7215 #, no-wrap
7216 msgid "B<IPC_STAT>"
7217 msgstr "B<IPC_STAT>"
7218
7219 #. type: Plain text
7220 #: build/C/man2/shmctl.2:116
7221 msgid ""
7222 "Copy information from the kernel data structure associated with I<shmid> "
7223 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
7224 "read permission on the shared memory segment."
7225 msgstr ""
7226 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
7227 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
7228 "読み込み許可を持たなければならない。"
7229
7230 #. type: TP
7231 #: build/C/man2/shmctl.2:116
7232 #, no-wrap
7233 msgid "B<IPC_SET>"
7234 msgstr "B<IPC_SET>"
7235
7236 #. type: Plain text
7237 #: build/C/man2/shmctl.2:134
7238 msgid ""
7239 "Write the values of some members of the I<shmid_ds> structure pointed to by "
7240 "I<buf> to the kernel data structure associated with this shared memory "
7241 "segment, updating also its I<shm_ctime> member.  The following fields can be "
7242 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
7243 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
7244 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
7245 "memory segment, or the caller must be privileged."
7246 msgstr ""
7247 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
7248 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
7249 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
7250 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
7251 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
7252 "と一致するか、呼び出し元が特権を持たなければならない。"
7253
7254 #. type: TP
7255 #: build/C/man2/shmctl.2:134
7256 #, no-wrap
7257 msgid "B<IPC_RMID>"
7258 msgstr "B<IPC_RMID>"
7259
7260 #. type: Plain text
7261 #: build/C/man2/shmctl.2:151
7262 msgid ""
7263 "Mark the segment to be destroyed.  The segment will only actually be "
7264 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
7265 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
7266 "the owner or creator, or be privileged.  If a segment has been marked for "
7267 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
7268 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
7269 "be set."
7270 msgstr ""
7271 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
7272 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
7273 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
7274 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
7275 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
7276 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
7277
7278 #. type: Plain text
7279 #: build/C/man2/shmctl.2:154
7280 msgid ""
7281 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
7282 "its pages that were faulted in will remain in memory or swap."
7283 msgstr ""
7284 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
7285 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
7286 "る。"
7287
7288 #. type: TP
7289 #: build/C/man2/shmctl.2:154
7290 #, no-wrap
7291 msgid "B<IPC_INFO> (Linux-specific)"
7292 msgstr "B<IPC_INFO> (Linux 固有)"
7293
7294 #. type: Plain text
7295 #: build/C/man2/shmctl.2:167
7296 msgid ""
7297 "Returns information about system-wide shared memory limits and parameters in "
7298 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
7299 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
7300 "B<_GNU_SOURCE> feature test macro is defined:"
7301 msgstr ""
7302 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
7303 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
7304 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7305 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7306
7307 #. type: Plain text
7308 #: build/C/man2/shmctl.2:181
7309 #, no-wrap
7310 msgid ""
7311 "struct  shminfo {\n"
7312 "    unsigned long shmmax; /* Maximum segment size */\n"
7313 "    unsigned long shmmin; /* Minimum segment size;\n"
7314 "                             always 1 */\n"
7315 "    unsigned long shmmni; /* Maximum number of segments */\n"
7316 "    unsigned long shmseg; /* Maximum number of segments\n"
7317 "                             that a process can attach;\n"
7318 "                             unused within kernel */\n"
7319 "    unsigned long shmall; /* Maximum number of pages of\n"
7320 "                             shared memory, system-wide */\n"
7321 "};\n"
7322 msgstr ""
7323 "struct  shminfo {\n"
7324 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
7325 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
7326 "                             常に 1 */\n"
7327 "    unsigned long shmmni; /* 最大セグメント数 */\n"
7328 "    unsigned long shmseg; /* プロセスが付加できる\n"
7329 "                             セグメントの最大数。\n"
7330 "                             カーネル内では未使用 */\n"
7331 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
7332 "                             システム全体での値 */\n"
7333 "};\n"
7334
7335 #. type: Plain text
7336 #: build/C/man2/shmctl.2:194
7337 msgid ""
7338 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
7339 "files of the same name; see B<proc>(5)  for details."
7340 msgstr ""
7341 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
7342 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
7343
7344 #. type: TP
7345 #: build/C/man2/shmctl.2:194
7346 #, no-wrap
7347 msgid "B<SHM_INFO> (Linux-specific)"
7348 msgstr "B<SHM_INFO> (Linux 固有)"
7349
7350 #. type: Plain text
7351 #: build/C/man2/shmctl.2:205
7352 msgid ""
7353 "Returns a I<shm_info> structure whose fields contain information about "
7354 "system resources consumed by shared memory.  This structure is defined in "
7355 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
7356 msgstr ""
7357 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
7358 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7359 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7360
7361 #. type: Plain text
7362 #: build/C/man2/shmctl.2:222
7363 #, no-wrap
7364 msgid ""
7365 "struct shm_info {\n"
7366 "    int           used_ids; /* # of currently existing\n"
7367 "                               segments */\n"
7368 "    unsigned long shm_tot;  /* Total number of shared\n"
7369 "                               memory pages */\n"
7370 "    unsigned long shm_rss;  /* # of resident shared\n"
7371 "                               memory pages */\n"
7372 "    unsigned long shm_swp;  /* # of swapped shared\n"
7373 "                               memory pages */\n"
7374 "    unsigned long swap_attempts;\n"
7375 "                            /* Unused since Linux 2.4 */\n"
7376 "    unsigned long swap_successes;\n"
7377 "                            /* Unused since Linux 2.4 */\n"
7378 "};\n"
7379 msgstr ""
7380 "struct shm_info {\n"
7381 "    int           used_ids; /* 現在存在するセグメント数 */\n"
7382 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
7383 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
7384 "                               いない) 共有メモリページ数 */\n"
7385 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
7386 "                               ページ数 */\n"
7387 "    unsigned long swap_attempts;\n"
7388 "                            /* Linux 2.4 以降では未使用 */\n"
7389 "    unsigned long swap_successes;\n"
7390 "                            /* Linux 2.4 以降では未使用 */\n"
7391 "};\n"
7392
7393 #. type: TP
7394 #: build/C/man2/shmctl.2:224
7395 #, no-wrap
7396 msgid "B<SHM_STAT> (Linux-specific)"
7397 msgstr "B<SHM_STAT> (Linux 固有)"
7398
7399 #. type: Plain text
7400 #: build/C/man2/shmctl.2:235
7401 msgid ""
7402 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
7403 "argument is not a segment identifier, but instead an index into the kernel's "
7404 "internal array that maintains information about all shared memory segments "
7405 "on the system."
7406 msgstr ""
7407 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
7408 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
7409 "管理するカーネルの内部配列へのインデックス である。"
7410
7411 #. type: Plain text
7412 #: build/C/man2/shmctl.2:238
7413 msgid ""
7414 "The caller can prevent or allow swapping of a shared memory segment with the "
7415 "following I<cmd> values:"
7416 msgstr ""
7417 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
7418 "ワップされることを防止したり、許可したりできる:"
7419
7420 #. type: TP
7421 #: build/C/man2/shmctl.2:239
7422 #, no-wrap
7423 msgid "B<SHM_LOCK> (Linux-specific)"
7424 msgstr "B<SHM_LOCK> (Linux 固有)"
7425
7426 #. type: Plain text
7427 #: build/C/man2/shmctl.2:251
7428 msgid ""
7429 "Prevent swapping of the shared memory segment.  The caller must fault in any "
7430 "pages that are required to be present after locking is enabled.  If a "
7431 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
7432 "I<shm_perm.mode> field in the associated data structure retrieved by "
7433 "B<IPC_STAT> will be set."
7434 msgstr ""
7435 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
7436 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
7437 "らない。 セグメントがロックされると、 関連するデータ構造体において "
7438 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
7439 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
7440
7441 #. type: TP
7442 #: build/C/man2/shmctl.2:251
7443 #, no-wrap
7444 msgid "B<SHM_UNLOCK> (Linux-specific)"
7445 msgstr "B<SHM_UNLOCK> (Linux 固有)"
7446
7447 #. type: Plain text
7448 #: build/C/man2/shmctl.2:254
7449 msgid "Unlock the segment, allowing it to be swapped out."
7450 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
7451
7452 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
7453 #.  be applied to a segment, regardless of ownership of the segment.
7454 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
7455 #.  in 2.6.10.  MTK, May 2005
7456 #. type: Plain text
7457 #: build/C/man2/shmctl.2:272
7458 msgid ""
7459 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
7460 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
7461 "these operations if its effective UID matches the owner or creator UID of "
7462 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
7463 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
7464 msgstr ""
7465 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
7466 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
7467 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
7468 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
7469 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
7470 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
7471
7472 #. type: Plain text
7473 #: build/C/man2/shmctl.2:290
7474 msgid ""
7475 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
7476 "highest used entry in the kernel's internal array recording information "
7477 "about all shared memory segments.  (This information can be used with "
7478 "repeated B<SHM_STAT> operations to obtain information about all shared "
7479 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
7480 "the identifier of the shared memory segment whose index was given in "
7481 "I<shmid>.  Other operations return 0 on success."
7482 msgstr ""
7483 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
7484 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
7485 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
7486 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
7487 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
7488 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
7489
7490 #. type: Plain text
7491 #: build/C/man2/shmctl.2:294
7492 msgid "On error, -1 is returned, and I<errno> is set appropriately."
7493 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
7494
7495 #. type: Plain text
7496 #: build/C/man2/shmctl.2:303
7497 msgid ""
7498 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
7499 "read access for I<shmid>, and the calling process does not have the "
7500 "B<CAP_IPC_OWNER> capability."
7501 msgstr ""
7502 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
7503 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
7504 "ケーパビリティ (capability) を持っていない。"
7505
7506 #. type: Plain text
7507 #: build/C/man2/shmctl.2:314
7508 msgid ""
7509 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
7510 "pointed to by I<buf> isn't accessible."
7511 msgstr ""
7512 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
7513 "るアドレスにアクセスできない。"
7514
7515 #. type: TP
7516 #: build/C/man2/shmctl.2:314
7517 #, no-wrap
7518 msgid "B<EIDRM>"
7519 msgstr "B<EIDRM>"
7520
7521 #. type: Plain text
7522 #: build/C/man2/shmctl.2:317
7523 msgid "I<shmid> points to a removed identifier."
7524 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
7525
7526 #. type: Plain text
7527 #: build/C/man2/shmctl.2:326
7528 msgid ""
7529 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
7530 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
7531 "to an array slot that is currently unused."
7532 msgstr ""
7533 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
7534 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
7535 "配列のスロットを参照していた。"
7536
7537 #. type: Plain text
7538 #: build/C/man2/shmctl.2:337
7539 msgid ""
7540 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
7541 "be-locked segment would mean that the total bytes in locked shared memory "
7542 "segments would exceed the limit for the real user ID of the calling "
7543 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
7544 "(see B<setrlimit>(2))."
7545 msgstr ""
7546 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
7547 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
7548 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
7549 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
7550
7551 #. type: TP
7552 #: build/C/man2/shmctl.2:337
7553 #, no-wrap
7554 msgid "B<EOVERFLOW>"
7555 msgstr "B<EOVERFLOW>"
7556
7557 #. type: Plain text
7558 #: build/C/man2/shmctl.2:342
7559 msgid ""
7560 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
7561 "in the structure pointed to by I<buf>."
7562 msgstr ""
7563 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
7564 "には大き過ぎる。"
7565
7566 #. type: Plain text
7567 #: build/C/man2/shmctl.2:354
7568 msgid ""
7569 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
7570 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
7571 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
7572 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
7573 msgstr ""
7574 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
7575 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
7576 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
7577
7578 #. type: Plain text
7579 #: build/C/man2/shmctl.2:366
7580 msgid ""
7581 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
7582 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
7583 "capability).  (Since Linux 2.6.9, this error can also occur if the "
7584 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
7585 msgstr ""
7586 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
7587 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
7588 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
7589 "が特権を持たない場合にも、このエラーが起こる。)"
7590
7591 #.  SVr4 documents an additional error condition EMFILE.
7592 #. type: Plain text
7593 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:232
7594 #: build/C/man2/shmop.2:229
7595 msgid "SVr4, POSIX.1-2001."
7596 msgstr "SVr4, POSIX.1-2001."
7597
7598 #. type: Plain text
7599 #: build/C/man2/shmctl.2:382
7600 msgid ""
7601 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
7602 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
7603 "future these may modified or moved to a /proc file system interface."
7604 msgstr ""
7605 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
7606 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
7607 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
7608
7609 #. type: Plain text
7610 #: build/C/man2/shmctl.2:390
7611 msgid ""
7612 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
7613 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
7614 "feature is not available on other UNIX implementations; portable "
7615 "applications should avoid relying on it."
7616 msgstr ""
7617 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
7618 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
7619 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
7620 "プリケーションではこれに依存しないようにすべきである。"
7621
7622 #. type: Plain text
7623 #: build/C/man2/shmctl.2:403
7624 msgid ""
7625 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
7626 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
7627 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
7628 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
7629 msgstr ""
7630 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
7631 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
7632 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
7633 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
7634
7635 #. type: Plain text
7636 #: build/C/man2/shmctl.2:410
7637 msgid ""
7638 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7639 "B<svipc>(7)"
7640 msgstr ""
7641 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7642 "B<shm_overview>(7), B<svipc>(7)"
7643
7644 #. type: TH
7645 #: build/C/man2/shmget.2:36
7646 #, no-wrap
7647 msgid "SHMGET"
7648 msgstr "SHMGET"
7649
7650 #. type: TH
7651 #: build/C/man2/shmget.2:36
7652 #, no-wrap
7653 msgid "2006-05-02"
7654 msgstr "2006-05-02"
7655
7656 #. type: Plain text
7657 #: build/C/man2/shmget.2:39
7658 msgid "shmget - allocates a shared memory segment"
7659 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
7660
7661 #. type: Plain text
7662 #: build/C/man2/shmget.2:46
7663 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7664 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7665
7666 #. type: Plain text
7667 #: build/C/man2/shmget.2:70
7668 msgid ""
7669 "B<shmget>()  returns the identifier of the shared memory segment associated "
7670 "with the value of the argument I<key>.  A new shared memory segment, with "
7671 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
7672 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
7673 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
7674 "B<IPC_CREAT> is specified in I<shmflg>."
7675 msgstr ""
7676 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
7677 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
7678 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
7679 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
7680 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
7681 "となる。"
7682
7683 #. type: Plain text
7684 #: build/C/man2/shmget.2:89
7685 msgid ""
7686 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
7687 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
7688 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
7689 "| O_EXCL> for B<open>(2).)"
7690 msgstr ""
7691 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
7692 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
7693 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
7694 "O_EXCL> を指定した場合の動作と同じである)。"
7695
7696 #. type: Plain text
7697 #: build/C/man2/shmget.2:93
7698 msgid "The value I<shmflg> is composed of:"
7699 msgstr "I<shmflg> は以下の内容から構成される:"
7700
7701 #. type: TP
7702 #: build/C/man2/shmget.2:93
7703 #, no-wrap
7704 msgid "B<IPC_CREAT>"
7705 msgstr "B<IPC_CREAT>"
7706
7707 #. type: Plain text
7708 #: build/C/man2/shmget.2:100
7709 msgid ""
7710 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
7711 "find the segment associated with I<key> and check to see if the user has "
7712 "permission to access the segment."
7713 msgstr ""
7714 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
7715 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
7716 "可があるかどうかをチェックする。"
7717
7718 #. type: TP
7719 #: build/C/man2/shmget.2:100
7720 #, no-wrap
7721 msgid "B<IPC_EXCL>"
7722 msgstr "B<IPC_EXCL>"
7723
7724 #. type: Plain text
7725 #: build/C/man2/shmget.2:103
7726 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
7727 msgstr ""
7728 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
7729 "証する。"
7730
7731 #. type: TP
7732 #: build/C/man2/shmget.2:103
7733 #, no-wrap
7734 msgid "I<mode_flags>"
7735 msgstr "I<mode_flags>"
7736
7737 #. type: Plain text
7738 #: build/C/man2/shmget.2:113
7739 msgid ""
7740 "(least significant 9 bits)  specifying the permissions granted to the owner, "
7741 "group, and world.  These bits have the same format, and the same meaning, as "
7742 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
7743 "not used by the system."
7744 msgstr ""
7745 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
7746 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
7747 "ろ、システムは実行 (execute) 許可を参照しない。"
7748
7749 #. type: TP
7750 #: build/C/man2/shmget.2:113
7751 #, no-wrap
7752 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
7753 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
7754
7755 #. type: Plain text
7756 #: build/C/man2/shmget.2:119
7757 msgid ""
7758 "Allocate the segment using \"huge pages.\" See the kernel source file "
7759 "I<Documentation/vm/hugetlbpage.txt> for further information."
7760 msgstr ""
7761 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
7762 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
7763
7764 #. type: TP
7765 #: build/C/man2/shmget.2:119
7766 #, no-wrap
7767 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
7768 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
7769
7770 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
7771 #.  specified.
7772 #. type: Plain text
7773 #: build/C/man2/shmget.2:138
7774 msgid ""
7775 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
7776 "Do not reserve swap space for this segment.  When swap space is reserved, "
7777 "one has the guarantee that it is possible to modify the segment.  When swap "
7778 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
7779 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
7780 "overcommit_memory> in B<proc>(5)."
7781 msgstr ""
7782 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
7783 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
7784 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
7785 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
7786 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
7787 "ルに関する議論も参照のこと。"
7788
7789 #. type: Plain text
7790 #: build/C/man2/shmget.2:146
7791 msgid ""
7792 "When a new shared memory segment is created, its contents are initialized to "
7793 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
7794 "(2)), is initialized as follows:"
7795 msgstr ""
7796 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
7797 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
7798 "期化される。"
7799
7800 #. type: Plain text
7801 #: build/C/man2/shmget.2:151
7802 msgid ""
7803 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
7804 "calling process."
7805 msgstr ""
7806 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
7807 "ユーザーID を設定する。"
7808
7809 #. type: Plain text
7810 #: build/C/man2/shmget.2:156
7811 msgid ""
7812 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
7813 "the calling process."
7814 msgstr ""
7815 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
7816 "定する。"
7817
7818 #. type: Plain text
7819 #: build/C/man2/shmget.2:161
7820 msgid ""
7821 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
7822 "significant 9 bit of I<shmflg>."
7823 msgstr ""
7824 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
7825
7826 #. type: Plain text
7827 #: build/C/man2/shmget.2:165
7828 msgid "I<shm_segsz> is set to the value of I<size>."
7829 msgstr "I<shm_segsz> に I<size> の値を設定する。"
7830
7831 #. type: Plain text
7832 #: build/C/man2/shmget.2:172
7833 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
7834 msgstr ""
7835 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
7836
7837 #. type: Plain text
7838 #: build/C/man2/shmget.2:175
7839 msgid "I<shm_ctime> is set to the current time."
7840 msgstr "I<shm_ctime> に現在の時刻を設定する。"
7841
7842 #. type: Plain text
7843 #: build/C/man2/shmget.2:178
7844 msgid ""
7845 "If the shared memory segment already exists, the permissions are verified, "
7846 "and a check is made to see if it is marked for destruction."
7847 msgstr ""
7848 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
7849 "(destruction) マークがつけられていないかのチェックが行われる。"
7850
7851 #. type: Plain text
7852 #: build/C/man2/shmget.2:182
7853 msgid ""
7854 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
7855 msgstr ""
7856 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
7857 "が返される。"
7858
7859 #. type: Plain text
7860 #: build/C/man2/shmget.2:186
7861 msgid "On failure, I<errno> is set to one of the following:"
7862 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
7863
7864 #. type: Plain text
7865 #: build/C/man2/shmget.2:192
7866 msgid ""
7867 "The user does not have permission to access the shared memory segment, and "
7868 "does not have the B<CAP_IPC_OWNER> capability."
7869 msgstr ""
7870 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
7871 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
7872
7873 #. type: Plain text
7874 #: build/C/man2/shmget.2:196
7875 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
7876 msgstr ""
7877 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
7878
7879 #. type: Plain text
7880 #: build/C/man2/shmget.2:202
7881 msgid ""
7882 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
7883 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
7884 "existed, but I<size> is greater than the size of that segment."
7885 msgstr ""
7886 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
7887 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
7888 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
7889 "在するセグメントの サイズよりも大きかった。"
7890
7891 #. type: Plain text
7892 #: build/C/man2/shmget.2:211
7893 msgid ""
7894 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
7895 msgstr ""
7896 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
7897 "いなかった。"
7898
7899 #. type: Plain text
7900 #: build/C/man2/shmget.2:214
7901 msgid "No memory could be allocated for segment overhead."
7902 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
7903
7904 #. type: Plain text
7905 #: build/C/man2/shmget.2:222
7906 msgid ""
7907 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
7908 "segment of the requested I<size> would cause the system to exceed the system-"
7909 "wide limit on shared memory (B<SHMALL>)."
7910 msgstr ""
7911 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
7912 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
7913 "限 (B<SHMALL>)  を超過した。"
7914
7915 #. type: Plain text
7916 #: build/C/man2/shmget.2:229
7917 msgid ""
7918 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
7919 "(did not have the B<CAP_IPC_LOCK> capability)."
7920 msgstr ""
7921 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
7922 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
7923
7924 #. type: Plain text
7925 #: build/C/man2/shmget.2:235
7926 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
7927 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
7928
7929 #. type: Plain text
7930 #: build/C/man2/shmget.2:245
7931 msgid ""
7932 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
7933 "value is used for I<key>, the system call ignores everything but the least "
7934 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
7935 "success)."
7936 msgstr ""
7937 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
7938 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
7939 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
7940
7941 #. type: Plain text
7942 #: build/C/man2/shmget.2:249
7943 msgid ""
7944 "The following limits on shared memory segment resources affect the B<shmget>"
7945 "()  call:"
7946 msgstr ""
7947 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
7948 "る:"
7949
7950 #. type: TP
7951 #: build/C/man2/shmget.2:249
7952 #, no-wrap
7953 msgid "B<SHMALL>"
7954 msgstr "B<SHMALL>"
7955
7956 #. type: Plain text
7957 #: build/C/man2/shmget.2:254
7958 msgid ""
7959 "System wide maximum of shared memory pages (on Linux, this limit can be read "
7960 "and modified via I</proc/sys/kernel/shmall>)."
7961 msgstr ""
7962 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
7963 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
7964
7965 #. type: TP
7966 #: build/C/man2/shmget.2:254
7967 #, no-wrap
7968 msgid "B<SHMMAX>"
7969 msgstr "B<SHMMAX>"
7970
7971 #. type: Plain text
7972 #: build/C/man2/shmget.2:259
7973 msgid ""
7974 "Maximum size in bytes for a shared memory segment: policy dependent (on "
7975 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
7976 msgstr ""
7977 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
7978 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
7979
7980 #. type: TP
7981 #: build/C/man2/shmget.2:259
7982 #, no-wrap
7983 msgid "B<SHMMIN>"
7984 msgstr "B<SHMMIN>"
7985
7986 #. type: Plain text
7987 #: build/C/man2/shmget.2:265
7988 msgid ""
7989 "Minimum size in bytes for a shared memory segment: implementation dependent "
7990 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
7991 msgstr ""
7992 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
7993 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
7994
7995 #. type: TP
7996 #: build/C/man2/shmget.2:265
7997 #, no-wrap
7998 msgid "B<SHMMNI>"
7999 msgstr "B<SHMMNI>"
8000
8001 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
8002 #.  that we could create one more segment than SHMMNI -- MTK
8003 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
8004 #. type: Plain text
8005 #: build/C/man2/shmget.2:274
8006 msgid ""
8007 "System wide maximum number of shared memory segments: implementation "
8008 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
8009 "can be read and modified via I</proc/sys/kernel/shmmni>)."
8010 msgstr ""
8011 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
8012 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
8013 "したり、変更したりできる)。"
8014
8015 #. type: Plain text
8016 #: build/C/man2/shmget.2:278
8017 msgid ""
8018 "The implementation has no specific limits for the per-process maximum number "
8019 "of shared memory segments (B<SHMSEG>)."
8020 msgstr ""
8021 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
8022 "上の制限はない。"
8023
8024 #. type: Plain text
8025 #: build/C/man2/shmget.2:284
8026 msgid ""
8027 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
8028 "shared memory segment scheduled for deletion."
8029 msgstr ""
8030 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
8031 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
8032
8033 #. type: Plain text
8034 #: build/C/man2/shmget.2:290
8035 msgid ""
8036 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
8037 "more clearly show its function."
8038 msgstr ""
8039 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
8040 "より明確にその機能を表しているだろう。"
8041
8042 #. type: Plain text
8043 #: build/C/man2/shmget.2:298
8044 msgid ""
8045 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8046 "B<shm_overview>(7), B<svipc>(7)"
8047 msgstr ""
8048 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8049 "B<shm_overview>(7), B<svipc>(7)"
8050
8051 #. type: TH
8052 #: build/C/man2/shmop.2:39
8053 #, no-wrap
8054 msgid "SHMOP"
8055 msgstr "SHMOP"
8056
8057 #. type: TH
8058 #: build/C/man2/shmop.2:39
8059 #, no-wrap
8060 msgid "2008-06-03"
8061 msgstr "2008-06-03"
8062
8063 #. type: Plain text
8064 #: build/C/man2/shmop.2:42
8065 msgid "shmat, shmdt - shared memory operations"
8066 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
8067
8068 #. type: Plain text
8069 #: build/C/man2/shmop.2:46
8070 #, no-wrap
8071 msgid ""
8072 "B<#include E<lt>sys/types.hE<gt>>\n"
8073 "B<#include E<lt>sys/shm.hE<gt>>\n"
8074 msgstr ""
8075 "B<#include E<lt>sys/types.hE<gt>>\n"
8076 "B<#include E<lt>sys/shm.hE<gt>>\n"
8077
8078 #. type: Plain text
8079 #: build/C/man2/shmop.2:48
8080 #, no-wrap
8081 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8082 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8083
8084 #. type: Plain text
8085 #: build/C/man2/shmop.2:50
8086 #, no-wrap
8087 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8088 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8089
8090 #. type: Plain text
8091 #: build/C/man2/shmop.2:59
8092 msgid ""
8093 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
8094 "address space of the calling process.  The attaching address is specified by "
8095 "I<shmaddr> with one of the following criteria:"
8096 msgstr ""
8097 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
8098 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
8099 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
8100
8101 #. type: Plain text
8102 #: build/C/man2/shmop.2:65
8103 msgid ""
8104 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
8105 "which to attach the segment."
8106 msgstr ""
8107 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
8108 "されていない) アドレスを選択する。"
8109
8110 #. type: Plain text
8111 #: build/C/man2/shmop.2:80
8112 msgid ""
8113 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
8114 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
8115 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
8116 "at which the attach occurs."
8117 msgstr ""
8118 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
8119 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
8120 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
8121 "を指している必要がある。"
8122
8123 #. type: Plain text
8124 #: build/C/man2/shmop.2:90
8125 msgid ""
8126 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
8127 "reading and the process must have read permission for the segment.  "
8128 "Otherwise the segment is attached for read and write and the process must "
8129 "have read and write permission for the segment.  There is no notion of a "
8130 "write-only shared memory segment."
8131 msgstr ""
8132 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
8133 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
8134 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
8135 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
8136 "の共有メモリ・セグメントという概念は存在しない。"
8137
8138 #. type: Plain text
8139 #: build/C/man2/shmop.2:105
8140 msgid ""
8141 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
8142 "indicate that the mapping of the segment should replace any existing mapping "
8143 "in the range starting at I<shmaddr> and continuing for the size of the "
8144 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
8145 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
8146 msgstr ""
8147 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
8148 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
8149 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
8150 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
8151 "場合は、 I<shmaddr> が NULL であってはならない。"
8152
8153 #. type: Plain text
8154 #: build/C/man2/shmop.2:112
8155 msgid ""
8156 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
8157 "The segment will automatically be detached at process exit.  The same "
8158 "segment may be attached as a read and as a read-write one, and more than "
8159 "once, in the process's address space."
8160 msgstr ""
8161 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
8162 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
8163 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
8164 "複数回付加することもできる。"
8165
8166 #. type: Plain text
8167 #: build/C/man2/shmop.2:120
8168 msgid ""
8169 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
8170 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
8171 "follows:"
8172 msgstr ""
8173 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
8174 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
8175
8176 #. type: Plain text
8177 #: build/C/man2/shmop.2:123
8178 msgid "I<shm_atime> is set to the current time."
8179 msgstr "I<shm_atime> には現在の時刻を設定する。"
8180
8181 #. type: Plain text
8182 #: build/C/man2/shmop.2:126 build/C/man2/shmop.2:152
8183 msgid "I<shm_lpid> is set to the process-ID of the calling process."
8184 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
8185
8186 #. type: Plain text
8187 #: build/C/man2/shmop.2:129
8188 msgid "I<shm_nattch> is incremented by one."
8189 msgstr "I<shm_nattch> を 1 増加させる。"
8190
8191 #. type: Plain text
8192 #: build/C/man2/shmop.2:140
8193 msgid ""
8194 "B<shmdt>()  detaches the shared memory segment located at the address "
8195 "specified by I<shmaddr> from the address space of the calling process.  The "
8196 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
8197 "the value returned by the attaching B<shmat>()  call."
8198 msgstr ""
8199 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
8200 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
8201 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
8202 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
8203 "ない。"
8204
8205 #. type: Plain text
8206 #: build/C/man2/shmop.2:146
8207 msgid ""
8208 "On a successful B<shmdt>()  call the system updates the members of the "
8209 "I<shmid_ds> structure associated with the shared memory segment as follows:"
8210 msgstr ""
8211 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
8212 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
8213
8214 #. type: Plain text
8215 #: build/C/man2/shmop.2:149
8216 msgid "I<shm_dtime> is set to the current time."
8217 msgstr "I<shm_dtime> には現在の時刻が設定される。"
8218
8219 #. type: Plain text
8220 #: build/C/man2/shmop.2:157
8221 msgid ""
8222 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
8223 "marked for deletion, the segment is deleted."
8224 msgstr ""
8225 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
8226 "セグメントは削除される。"
8227
8228 #. type: Plain text
8229 #: build/C/man2/shmop.2:161
8230 msgid ""
8231 "After a B<fork>(2)  the child inherits the attached shared memory segments."
8232 msgstr ""
8233 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
8234
8235 #. type: Plain text
8236 #: build/C/man2/shmop.2:165
8237 msgid ""
8238 "After an B<execve>(2)  all attached shared memory segments are detached from "
8239 "the process."
8240 msgstr ""
8241 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
8242 "される。"
8243
8244 #. type: Plain text
8245 #: build/C/man2/shmop.2:169
8246 msgid ""
8247 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
8248 "process."
8249 msgstr ""
8250 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
8251 "離される。"
8252
8253 #. type: Plain text
8254 #: build/C/man2/shmop.2:177
8255 msgid ""
8256 "On success B<shmat>()  returns the address of the attached shared memory "
8257 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
8258 "indicate the cause of the error."
8259 msgstr ""
8260 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
8261 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
8262 "値を設定する。"
8263
8264 #. type: Plain text
8265 #: build/C/man2/shmop.2:183
8266 msgid ""
8267 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
8268 "set to indicate the cause of the error."
8269 msgstr ""
8270 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
8271 "ラーの原因を示す値を設定する。"
8272
8273 #. type: Plain text
8274 #: build/C/man2/shmop.2:189
8275 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
8276 msgstr ""
8277 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
8278
8279 #. type: Plain text
8280 #: build/C/man2/shmop.2:195
8281 msgid ""
8282 "The calling process does not have the required permissions for the requested "
8283 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
8284 msgstr ""
8285 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
8286 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
8287
8288 #. type: Plain text
8289 #: build/C/man2/shmop.2:209
8290 msgid ""
8291 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
8292 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
8293 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
8294 msgstr ""
8295 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
8296 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
8297 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
8298 "れているが、 I<shmaddr> が NULL であった。"
8299
8300 #. type: Plain text
8301 #: build/C/man2/shmop.2:212
8302 msgid "Could not allocate memory for the descriptor or for the page tables."
8303 msgstr ""
8304 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
8305 "とができない。"
8306
8307 #. type: Plain text
8308 #: build/C/man2/shmop.2:218
8309 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
8310 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
8311
8312 #.  The following since 2.6.17-rc1:
8313 #. type: Plain text
8314 #: build/C/man2/shmop.2:226
8315 msgid ""
8316 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
8317 "not aligned on a page boundary."
8318 msgstr ""
8319 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
8320 "I<shmaddr> がページ境界に合っていない。"
8321
8322 #. type: Plain text
8323 #: build/C/man2/shmop.2:245
8324 msgid ""
8325 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
8326 "changed from I<char *> into I<const void *>, and the returned type of "
8327 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
8328 "I<char *> prototypes; glibc2 has I<void *>.)"
8329 msgstr ""
8330 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
8331 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
8332 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
8333 "glibc2 のプロトタイプは I<void *> である)。"
8334
8335 #. type: Plain text
8336 #: build/C/man2/shmop.2:257
8337 msgid ""
8338 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
8339 "way of attaching a shared memory segment.  Be aware that the shared memory "
8340 "segment attached in this way may be attached at different addresses in "
8341 "different processes.  Therefore, any pointers maintained within the shared "
8342 "memory must be made relative (typically to the starting address of the "
8343 "segment), rather than absolute."
8344 msgstr ""
8345 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
8346 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
8347 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
8348 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
8349 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
8350 "る。"
8351
8352 #. type: Plain text
8353 #: build/C/man2/shmop.2:262
8354 msgid ""
8355 "On Linux, it is possible to attach a shared memory segment even if it is "
8356 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
8357 "behavior and many other implementations do not support it."
8358 msgstr ""
8359 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
8360 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
8361 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
8362
8363 #. type: Plain text
8364 #: build/C/man2/shmop.2:265
8365 msgid "The following system parameter affects B<shmat>():"
8366 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
8367
8368 #.  FIXME A good explanation of the rationale for the existence
8369 #.  of SHMLBA would be useful here
8370 #. type: TP
8371 #: build/C/man2/shmop.2:265
8372 #, no-wrap
8373 msgid "B<SHMLBA>"
8374 msgstr "B<SHMLBA>"
8375
8376 #.  FIXME That last sentence isn't true for all Linux
8377 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
8378 #.  -- MTK, Nov 04
8379 #. type: Plain text
8380 #: build/C/man2/shmop.2:278
8381 msgid ""
8382 "Segment low boundary address multiple.  Must be page aligned.  For the "
8383 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
8384 msgstr ""
8385 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
8386 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
8387
8388 #. type: Plain text
8389 #: build/C/man2/shmop.2:282
8390 msgid ""
8391 "The implementation places no intrinsic limit on the per-process maximum "
8392 "number of shared memory segments (B<SHMSEG>)."
8393 msgstr ""
8394 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
8395 "関する実装依存の制限はない。"
8396
8397 #. type: Plain text
8398 #: build/C/man2/shmop.2:290
8399 msgid ""
8400 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8401 "B<shm_overview>(7), B<svipc>(7)"
8402 msgstr ""
8403 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8404 "B<shm_overview>(7), B<svipc>(7)"
8405
8406 #. type: TH
8407 #: build/C/man2/subpage_prot.2:28
8408 #, no-wrap
8409 msgid "SUBPAGE_PROT"
8410 msgstr "SUBPAGE_PROT"
8411
8412 #. type: TH
8413 #: build/C/man2/subpage_prot.2:28
8414 #, no-wrap
8415 msgid "2010-10-30"
8416 msgstr "2010-10-30"
8417
8418 #. type: Plain text
8419 #: build/C/man2/subpage_prot.2:31
8420 msgid "subpage_prot - define a subpage protection for an address range"
8421 msgstr "subpage_prot - define a subpage protection for an address range"
8422
8423 #. type: Plain text
8424 #: build/C/man2/subpage_prot.2:35
8425 #, no-wrap
8426 msgid ""
8427 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8428 "B<                  uint32_t *>I<map>B<);>\n"
8429 msgstr ""
8430 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8431 "B<                  uint32_t *>I<map>B<);>\n"
8432
8433 #. type: Plain text
8434 #: build/C/man2/subpage_prot.2:42
8435 msgid ""
8436 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
8437 "control the access permissions on individual 4kB subpages on systems "
8438 "configured with a page size of 64kB."
8439 msgstr ""
8440 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
8441 "control the access permissions on individual 4kB subpages on systems "
8442 "configured with a page size of 64kB."
8443
8444 #. type: Plain text
8445 #: build/C/man2/subpage_prot.2:49
8446 msgid ""
8447 "The protection map is applied to the memory pages in the region starting at "
8448 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
8449 "aligned to a 64-kB boundary."
8450 msgstr ""
8451 "The protection map is applied to the memory pages in the region starting at "
8452 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
8453 "aligned to a 64-kB boundary."
8454
8455 #. type: Plain text
8456 #: build/C/man2/subpage_prot.2:61
8457 msgid ""
8458 "The protection map is specified in the buffer pointed to by I<map>.  The map "
8459 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8460 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8461 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8462 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
8463 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8464 msgstr ""
8465 "The protection map is specified in the buffer pointed to by I<map>.  The map "
8466 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8467 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8468 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8469 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
8470 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8471
8472 #. type: Plain text
8473 #: build/C/man2/subpage_prot.2:66
8474 msgid ""
8475 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
8476 "specified below is returned."
8477 msgstr ""
8478 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
8479 "specified below is returned."
8480
8481 #. type: Plain text
8482 #: build/C/man2/subpage_prot.2:72
8483 msgid "The buffer referred to by I<map> is not accessible."
8484 msgstr "The buffer referred to by I<map> is not accessible."
8485
8486 #. type: Plain text
8487 #: build/C/man2/subpage_prot.2:82
8488 msgid ""
8489 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
8490 "be aligned to a multiple of the system page size, and they must not refer to "
8491 "a region outside of the address space of the process or to a region that "
8492 "consists of huge pages."
8493 msgstr ""
8494 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
8495 "be aligned to a multiple of the system page size, and they must not refer to "
8496 "a region outside of the address space of the process or to a region that "
8497 "consists of huge pages."
8498
8499 #. type: Plain text
8500 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:166
8501 msgid "Out of memory."
8502 msgstr "メモリ不足である。"
8503
8504 #. type: Plain text
8505 #: build/C/man2/subpage_prot.2:91
8506 msgid ""
8507 "This system call is provided on the PowerPC architecture since Linux "
8508 "2.6.25.  The system call is provided only if the kernel is configured with "
8509 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
8510 msgstr ""
8511 "This system call is provided on the PowerPC architecture since Linux "
8512 "2.6.25.  The system call is provided only if the kernel is configured with "
8513 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
8514
8515 #. type: Plain text
8516 #: build/C/man2/subpage_prot.2:98
8517 msgid ""
8518 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8519 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8520 "field won't allow writes to a page that is otherwise write-protected."
8521 msgstr ""
8522 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8523 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8524 "field won't allow writes to a page that is otherwise write-protected."
8525
8526 #. type: SS
8527 #: build/C/man2/subpage_prot.2:98
8528 #, no-wrap
8529 msgid "Rationale"
8530 msgstr "Rationale"
8531
8532 #.  In the initial implementation, it was the case that:
8533 #.      In fact the whole process is switched to use 4k hardware pages when the
8534 #.      subpage_prot system call is used, but this could be improved in future
8535 #.      to switch only the affected segments.
8536 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
8537 #.  the affected segment, not the whole process.
8538 #. type: Plain text
8539 #: build/C/man2/subpage_prot.2:120
8540 msgid ""
8541 "This system call is provided to assist writing emulators that operate using "
8542 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
8543 "uses a smaller page size, the emulator can no longer use the memory-"
8544 "management unit (MMU)  and normal system calls for controlling page "
8545 "protections.  (The emulator could emulate the MMU by checking and possibly "
8546 "remapping the address for each memory access in software, but that is "
8547 "slow.)  The idea is that the emulator supplies an array of protection masks "
8548 "to apply to a specified range of virtual addresses.  These masks are applied "
8549 "at the level where hardware page-table entries (PTEs)  are inserted into the "
8550 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
8551 "affected.  Implicit in this is that the regions of the address space that "
8552 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
8553 "hardware pages (on machines with hardware 64-kB page support)."
8554 msgstr ""
8555 "This system call is provided to assist writing emulators that operate using "
8556 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
8557 "uses a smaller page size, the emulator can no longer use the memory-"
8558 "management unit (MMU)  and normal system calls for controlling page "
8559 "protections.  (The emulator could emulate the MMU by checking and possibly "
8560 "remapping the address for each memory access in software, but that is "
8561 "slow.)  The idea is that the emulator supplies an array of protection masks "
8562 "to apply to a specified range of virtual addresses.  These masks are applied "
8563 "at the level where hardware page-table entries (PTEs)  are inserted into the "
8564 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
8565 "affected.  Implicit in this is that the regions of the address space that "
8566 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
8567 "hardware pages (on machines with hardware 64-kB page support)."
8568
8569 #. type: Plain text
8570 #: build/C/man2/subpage_prot.2:123
8571 msgid "B<mprotect>(2), B<syscall>(2);"
8572 msgstr "B<mprotect>(2), B<syscall>(2);"
8573
8574 #. type: Plain text
8575 #: build/C/man2/subpage_prot.2:126
8576 msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
8577 msgstr "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
8578
8579 #. type: TH
8580 #: build/C/man2/sync_file_range.2:30
8581 #, no-wrap
8582 msgid "SYNC_FILE_RANGE"
8583 msgstr "SYNC_FILE_RANGE"
8584
8585 #. type: Plain text
8586 #: build/C/man2/sync_file_range.2:33
8587 msgid "sync_file_range - sync a file segment with disk"
8588 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
8589
8590 #. type: Plain text
8591 #: build/C/man2/sync_file_range.2:37
8592 #, no-wrap
8593 msgid ""
8594 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8595 "B<#include E<lt>fcntl.hE<gt>>\n"
8596 msgstr ""
8597 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8598 "B<#include E<lt>fcntl.hE<gt>>\n"
8599
8600 #. type: Plain text
8601 #: build/C/man2/sync_file_range.2:40
8602 #, no-wrap
8603 msgid ""
8604 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8605 "B<                    unsigned int >I<flags>B<);>\n"
8606 msgstr ""
8607 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8608 "B<                    unsigned int >I<flags>B<);>\n"
8609
8610 #. type: Plain text
8611 #: build/C/man2/sync_file_range.2:47
8612 msgid ""
8613 "B<sync_file_range>()  permits fine control when synchronizing the open file "
8614 "referred to by the file descriptor I<fd> with disk."
8615 msgstr ""
8616 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
8617 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
8618
8619 #. type: Plain text
8620 #: build/C/man2/sync_file_range.2:61
8621 msgid ""
8622 "I<offset> is the starting byte of the file range to be synchronized.  "
8623 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
8624 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
8625 "are synchronized.  Synchronization is in units of the system page size: "
8626 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
8627 "rounded up to a page boundary."
8628 msgstr ""
8629 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
8630 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
8631 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
8632 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
8633 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
8634
8635 #. type: Plain text
8636 #: build/C/man2/sync_file_range.2:65
8637 msgid "The I<flags> bit-mask argument can include any of the following values:"
8638 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
8639
8640 #. type: TP
8641 #: build/C/man2/sync_file_range.2:65
8642 #, no-wrap
8643 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8644 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8645
8646 #. type: Plain text
8647 #: build/C/man2/sync_file_range.2:70
8648 msgid ""
8649 "Wait upon write-out of all pages in the specified range that have already "
8650 "been submitted to the device driver for write-out before performing any "
8651 "write."
8652 msgstr ""
8653 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
8654 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
8655 "つ。"
8656
8657 #. type: TP
8658 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
8659 #, no-wrap
8660 msgid "B<SYNC_FILE_RANGE_WRITE>"
8661 msgstr "B<SYNC_FILE_RANGE_WRITE>"
8662
8663 #. type: Plain text
8664 #: build/C/man2/sync_file_range.2:76
8665 msgid ""
8666 "Initiate write-out of all dirty pages in the specified range which are not "
8667 "presently submitted write-out.  Note that even this may block if you attempt "
8668 "to write more than request queue size."
8669 msgstr ""
8670 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
8671 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
8672 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
8673 "る点に注意すること。"
8674
8675 #. type: TP
8676 #: build/C/man2/sync_file_range.2:76
8677 #, no-wrap
8678 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8679 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8680
8681 #. type: Plain text
8682 #: build/C/man2/sync_file_range.2:80
8683 msgid ""
8684 "Wait upon write-out of all pages in the range after performing any write."
8685 msgstr ""
8686 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
8687 "つ。"
8688
8689 #. type: Plain text
8690 #: build/C/man2/sync_file_range.2:84
8691 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
8692 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
8693
8694 #. type: SS
8695 #: build/C/man2/sync_file_range.2:84
8696 #, no-wrap
8697 msgid "Warning"
8698 msgstr "警告"
8699
8700 #. type: Plain text
8701 #: build/C/man2/sync_file_range.2:100
8702 msgid ""
8703 "This system call is extremely dangerous and should not be used in portable "
8704 "programs.  None of these operations writes out the file's metadata.  "
8705 "Therefore, unless the application is strictly performing overwrites of "
8706 "already-instantiated disk blocks, there are no guarantees that the data will "
8707 "be available after a crash.  There is no user interface to know if a write "
8708 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
8709 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
8710 "When writing into preallocated space, many file systems also require calls "
8711 "into the block allocator, which this system call does not sync out to disk.  "
8712 "This system call does not flush disk write caches and thus does not provide "
8713 "any data integrity on systems with volatile disk write caches."
8714 msgstr ""
8715 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
8716 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
8717 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
8718 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
8719 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
8720 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
8721 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
8722 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
8723 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
8724 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
8725 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
8726 "コールではデータの一貫性を確保できないことになる。"
8727
8728 #. type: SS
8729 #: build/C/man2/sync_file_range.2:100
8730 #, no-wrap
8731 msgid "Some details"
8732 msgstr "詳細"
8733
8734 #. type: Plain text
8735 #: build/C/man2/sync_file_range.2:108
8736 msgid ""
8737 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
8738 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
8739 msgstr ""
8740 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
8741 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
8742
8743 #. type: Plain text
8744 #: build/C/man2/sync_file_range.2:112
8745 msgid "Useful combinations of the I<flags> bits are:"
8746 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
8747
8748 #. type: TP
8749 #: build/C/man2/sync_file_range.2:112
8750 #, no-wrap
8751 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8752 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8753
8754 #. type: Plain text
8755 #: build/C/man2/sync_file_range.2:120
8756 msgid ""
8757 "Ensures that all pages in the specified range which were dirty when "
8758 "B<sync_file_range>()  was called are placed under write-out.  This is a "
8759 "start-write-for-data-integrity operation."
8760 msgstr ""
8761 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
8762 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
8763 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
8764 "ある。"
8765
8766 #. type: Plain text
8767 #: build/C/man2/sync_file_range.2:127
8768 msgid ""
8769 "Start write-out of all dirty pages in the specified range which are not "
8770 "presently under write-out.  This is an asynchronous flush-to-disk "
8771 "operation.  This is not suitable for data integrity operations."
8772 msgstr ""
8773 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
8774 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
8775 "る。データ完全性確保が必要な操作としては適切ではない。"
8776
8777 #. type: TP
8778 #: build/C/man2/sync_file_range.2:127
8779 #, no-wrap
8780 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8781 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8782
8783 #. type: Plain text
8784 #: build/C/man2/sync_file_range.2:134
8785 msgid ""
8786 "Wait for completion of write-out of all pages in the specified range.  This "
8787 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
8788 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
8789 "and obtain its result."
8790 msgstr ""
8791 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
8792 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
8793 "き、この操作の完了を待ち、結果を取得することができる。"
8794
8795 #. type: TP
8796 #: build/C/man2/sync_file_range.2:134
8797 #, no-wrap
8798 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8799 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8800
8801 #. type: Plain text
8802 #: build/C/man2/sync_file_range.2:141
8803 msgid ""
8804 "This is a write-for-data-integrity operation that will ensure that all pages "
8805 "in the specified range which were dirty when B<sync_file_range>()  was "
8806 "called are committed to disk."
8807 msgstr ""
8808 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
8809 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
8810 "のページが ディスクに格納されることが保証される。"
8811
8812 #. type: Plain text
8813 #: build/C/man2/sync_file_range.2:147
8814 msgid ""
8815 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
8816 "I<errno> is set to indicate the error."
8817 msgstr ""
8818 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
8819 "I<error> にエラーを示す値を設定する。"
8820
8821 #. type: Plain text
8822 #: build/C/man2/sync_file_range.2:152
8823 msgid "I<fd> is not a valid file descriptor."
8824 msgstr "I<fd> が有効なファイルディスクリプタではない。"
8825
8826 #. type: Plain text
8827 #: build/C/man2/sync_file_range.2:160
8828 msgid ""
8829 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
8830 msgstr ""
8831 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
8832 "である。"
8833
8834 #. type: Plain text
8835 #: build/C/man2/sync_file_range.2:163
8836 msgid "I/O error."
8837 msgstr "I/O エラー。"
8838
8839 #. type: Plain text
8840 #: build/C/man2/sync_file_range.2:169
8841 msgid "Out of disk space."
8842 msgstr "ディスク領域不足である。"
8843
8844 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
8845 #.  (In userspace at least) it isn't possible to obtain a file descriptor
8846 #.  for a symbolic link.
8847 #. type: Plain text
8848 #: build/C/man2/sync_file_range.2:177
8849 msgid ""
8850 "I<fd> refers to something other than a regular file, a block device, a "
8851 "directory, or a symbolic link."
8852 msgstr ""
8853 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
8854 "以外のものを指している。"
8855
8856 #. type: Plain text
8857 #: build/C/man2/sync_file_range.2:180
8858 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
8859 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
8860
8861 #. type: Plain text
8862 #: build/C/man2/sync_file_range.2:183
8863 msgid ""
8864 "This system call is Linux-specific, and should be avoided in portable "
8865 "programs."
8866 msgstr ""
8867 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
8868 "けるべきである。"
8869
8870 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
8871 #. type: Plain text
8872 #: build/C/man2/sync_file_range.2:196
8873 msgid ""
8874 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
8875 "in a suitable pair of registers.  On such architectures, the call signature "
8876 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
8877 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
8878 "architectures define a different system call that orders the arguments "
8879 "suitably:"
8880 msgstr ""
8881
8882 #. type: Plain text
8883 #: build/C/man2/sync_file_range.2:201
8884 #, no-wrap
8885 msgid ""
8886 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8887 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8888 msgstr ""
8889 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8890 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8891
8892 #. type: Plain text
8893 #: build/C/man2/sync_file_range.2:206
8894 msgid ""
8895 "The behavior of this system call is otherwise exactly the same as "
8896 "B<sync_file_range>()."
8897 msgstr ""
8898
8899 #. type: Plain text
8900 #: build/C/man2/sync_file_range.2:217
8901 msgid ""
8902 "A system call with this signature first appeared on the ARM architecture in "
8903 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
8904 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
8905 "architectures where glibc support is provided, glibc transparently wraps "
8906 "B<sync_file_range2>()  under the name B<sync_file_range>()."
8907 msgstr ""
8908
8909 #. type: Plain text
8910 #: build/C/man2/sync_file_range.2:222
8911 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8912 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8913
8914 #. type: TH
8915 #: build/C/man3/malloc_get_state.3:23
8916 #, no-wrap
8917 msgid "MALLOC_GET_STATE"
8918 msgstr "MALLOC_GET_STATE"
8919
8920 #. type: TH
8921 #: build/C/man3/malloc_get_state.3:23
8922 #, no-wrap
8923 msgid "2012-03-26"
8924 msgstr "2012-03-26"
8925
8926 #. type: Plain text
8927 #: build/C/man3/malloc_get_state.3:26
8928 msgid ""
8929 "get_malloc_state, set_malloc_state - record and restore state of malloc "
8930 "implementation"
8931 msgstr ""
8932
8933 #. type: Plain text
8934 #: build/C/man3/malloc_get_state.3:31
8935 #, no-wrap
8936 msgid "B<void* malloc_get_state(void);>\n"
8937 msgstr "B<void* malloc_get_state(void);>\n"
8938
8939 #. type: Plain text
8940 #: build/C/man3/malloc_get_state.3:33
8941 #, no-wrap
8942 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
8943 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
8944
8945 #. type: Plain text
8946 #: build/C/man3/malloc_get_state.3:51
8947 msgid ""
8948 "The B<malloc_get_state>()  function records the current state of all "
8949 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
8950 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
8951 "is recorded in a system-dependent opaque data structure dynamically "
8952 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
8953 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
8954 "this memory.)"
8955 msgstr ""
8956
8957 #. type: Plain text
8958 #: build/C/man3/malloc_get_state.3:59
8959 msgid ""
8960 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
8961 "internal bookkeeping variables to the values recorded in the opaque data "
8962 "structure pointed to by I<state>."
8963 msgstr ""
8964
8965 #. type: Plain text
8966 #: build/C/man3/malloc_get_state.3:66
8967 msgid ""
8968 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
8969 "opaque data structure.  On error (for example, memory could not be allocated "
8970 "for the data structure), B<malloc_get_state>()  returns NULL."
8971 msgstr ""
8972
8973 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
8974 #.  /* Must fail if the major version is too high. */
8975 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
8976 #. type: Plain text
8977 #: build/C/man3/malloc_get_state.3:84
8978 msgid ""
8979 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
8980 "that I<state> does not point to a correctly formed data structure, "
8981 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
8982 "version of the data structure referred to by I<state> is a more recent "
8983 "version than this implementation knows about, B<malloc_set_state>()  returns "
8984 "-2."
8985 msgstr ""
8986
8987 #. type: Plain text
8988 #: build/C/man3/malloc_get_state.3:92
8989 msgid ""
8990 "These functions are especially useful when using this B<malloc>(3)  "
8991 "implementation as part of a shared library, and the heap contents are saved/"
8992 "restored via some other method.  This technique is used by the GNU Emacs to "
8993 "implement its \"dumping\" function."
8994 msgstr ""
8995
8996 #.  i.e., calls __malloc_check_init()
8997 #.  i.e., malloc checking is not already in use
8998 #.  and the caller requested malloc checking
8999 #. type: Plain text
9000 #: build/C/man3/malloc_get_state.3:109
9001 msgid ""
9002 "Hook function pointers are never saved or restored by these functions, with "
9003 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
9004 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
9005 "checking hooks if possible; if malloc checking was not in use in the "
9006 "recorded state, but the caller has requested malloc checking, then the hooks "
9007 "are reset to 0."
9008 msgstr ""
9009
9010 #. type: Plain text
9011 #: build/C/man3/malloc_get_state.3:112
9012 msgid "B<malloc>(3), B<mallopt>(3)"
9013 msgstr "B<malloc>(3), B<mallopt>(3)"
9014
9015 #. type: TH
9016 #: build/C/man3/malloc_trim.3:24
9017 #, no-wrap
9018 msgid "MALLOC_TRIM"
9019 msgstr "MALLOC_TRIM"
9020
9021 #. type: TH
9022 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
9023 #, no-wrap
9024 msgid "2012-03-29"
9025 msgstr "2012-03-29"
9026
9027 #. type: Plain text
9028 #: build/C/man3/malloc_trim.3:27
9029 msgid "malloc_trim - release free memory from the top of the heap"
9030 msgstr ""
9031
9032 #. type: Plain text
9033 #: build/C/man3/malloc_trim.3:31
9034 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
9035 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
9036
9037 #. type: Plain text
9038 #: build/C/man3/malloc_trim.3:38
9039 msgid ""
9040 "The B<malloc_trim>()  function attempts to release free memory at the top of "
9041 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
9042 msgstr ""
9043
9044 #. type: Plain text
9045 #: build/C/man3/malloc_trim.3:49
9046 msgid ""
9047 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
9048 "the top of the heap.  If this argument is 0, only the minimum amount of "
9049 "memory is maintained at the top of the heap (i.e., one page or less).  A "
9050 "nonzero argument can be used to maintain some trailing space at the top of "
9051 "the heap in order to allow future allocations to be made without having to "
9052 "extend the heap with B<sbrk>(2)."
9053 msgstr ""
9054
9055 #. type: Plain text
9056 #: build/C/man3/malloc_trim.3:54
9057 msgid ""
9058 "The B<malloc_trim>()  function returns 1 if memory was actually released "
9059 "back to the system, or 0 if it was not possible to release any memory."
9060 msgstr ""
9061
9062 #.  .SH VERSIONS
9063 #.  Available already in glibc 2.0, possibly earlier
9064 #. type: Plain text
9065 #: build/C/man3/malloc_trim.3:58
9066 msgid "No errors are defined."
9067 msgstr ""
9068
9069 #. type: Plain text
9070 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
9071 msgid "This function is a GNU extension."
9072 msgstr "この関数は GNU による拡張である。"
9073
9074 #. type: Plain text
9075 #: build/C/man3/malloc_trim.3:69
9076 msgid ""
9077 "This function is automatically called by B<free>(3)  in certain "
9078 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
9079 "B<mallopt>(3)."
9080 msgstr ""
9081
9082 #. type: Plain text
9083 #: build/C/man3/malloc_trim.3:72
9084 msgid ""
9085 "This function cannot release free memory located at places other than the "
9086 "top of the heap."
9087 msgstr ""
9088
9089 #.  malloc/malloc.c::mTRIm():
9090 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
9091 #. type: Plain text
9092 #: build/C/man3/malloc_trim.3:76
9093 msgid "This function only releases memory in the main arena."
9094 msgstr ""
9095
9096 #. type: Plain text
9097 #: build/C/man3/malloc_trim.3:80
9098 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9099 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9100
9101 #. type: TH
9102 #: build/C/man3/malloc_usable_size.3:23
9103 #, no-wrap
9104 msgid "MALLOC_USABLE_SIZE"
9105 msgstr "MALLOC_USABLE_SIZE"
9106
9107 #. type: Plain text
9108 #: build/C/man3/malloc_usable_size.3:26
9109 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
9110 msgstr ""
9111
9112 #. type: Plain text
9113 #: build/C/man3/malloc_usable_size.3:30
9114 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9115 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9116
9117 #. type: Plain text
9118 #: build/C/man3/malloc_usable_size.3:38
9119 msgid ""
9120 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
9121 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
9122 "B<malloc>(3)  or a related function."
9123 msgstr ""
9124
9125 #. type: Plain text
9126 #: build/C/man3/malloc_usable_size.3:46
9127 msgid ""
9128 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
9129 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
9130 msgstr ""
9131
9132 #. type: Plain text
9133 #: build/C/man3/malloc_usable_size.3:58
9134 msgid ""
9135 "The value returned by B<malloc_usable_size>()  may be greater than the "
9136 "requested size of the allocation because of alignment and minimum size "
9137 "constraints.  Although the excess bytes can be overwritten by the "
9138 "application without ill effects, this is not good programming practice: the "
9139 "number of excess bytes in an allocation depends on the underlying "
9140 "implementation."
9141 msgstr ""
9142
9143 #. type: Plain text
9144 #: build/C/man3/malloc_usable_size.3:60
9145 msgid "The main use of this function is for debugging and introspection."
9146 msgstr ""
9147
9148 #. type: Plain text
9149 #: build/C/man3/malloc_usable_size.3:62
9150 msgid "B<malloc>(3)"
9151 msgstr "B<malloc>(3)"
9152
9153 #. type: TH
9154 #: build/C/man3/mcheck.3:23
9155 #, no-wrap
9156 msgid "MCHECK"
9157 msgstr ""
9158
9159 #. type: Plain text
9160 #: build/C/man3/mcheck.3:26
9161 msgid ""
9162 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
9163 msgstr ""
9164
9165 #. type: Plain text
9166 #: build/C/man3/mcheck.3:29
9167 #, fuzzy, no-wrap
9168 #| msgid "B<#include E<lt>mcheck.hE<gt>>"
9169 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
9170 msgstr "B<#include E<lt>mcheck.hE<gt>>"
9171
9172 #. type: Plain text
9173 #: build/C/man3/mcheck.3:31
9174 #, no-wrap
9175 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
9176 msgstr ""
9177
9178 #. type: Plain text
9179 #: build/C/man3/mcheck.3:33
9180 #, no-wrap
9181 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
9182 msgstr ""
9183
9184 #. type: Plain text
9185 #: build/C/man3/mcheck.3:35
9186 #, fuzzy, no-wrap
9187 #| msgid "B<void mtrace(void);>"
9188 msgid "B<void mcheck_check_all(void);>\n"
9189 msgstr "B<void mtrace(void);>"
9190
9191 #. type: Plain text
9192 #: build/C/man3/mcheck.3:37
9193 #, fuzzy, no-wrap
9194 #| msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
9195 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
9196 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
9197
9198 #. type: Plain text
9199 #: build/C/man3/mcheck.3:50
9200 msgid ""
9201 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
9202 "(3)  family of memory-allocation functions.  These hooks cause certain "
9203 "consistency checks to be performed on the state of the heap.  The checks can "
9204 "detect application errors such as freeing a block of memory more than once "
9205 "or corrupting the bookkeeping data structures that immediately precede a "
9206 "block of allocated memory."
9207 msgstr ""
9208
9209 #. type: Plain text
9210 #: build/C/man3/mcheck.3:62
9211 msgid ""
9212 "To be effective, the B<mcheck>()  function must be called before the first "
9213 "call to B<malloc>(3)  or a related function.  In cases where this is "
9214 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
9215 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
9216 "memory-allocation function."
9217 msgstr ""
9218
9219 #. type: Plain text
9220 #: build/C/man3/mcheck.3:70
9221 msgid ""
9222 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
9223 "checks on all allocated blocks whenever one of the memory-allocation "
9224 "functions is called.  This can be very slow!"
9225 msgstr ""
9226
9227 #. type: Plain text
9228 #: build/C/man3/mcheck.3:77
9229 msgid ""
9230 "The B<mcheck_check_all>()  function causes an immediate check on all "
9231 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
9232 "beforehand."
9233 msgstr ""
9234
9235 #. type: Plain text
9236 #: build/C/man3/mcheck.3:90
9237 msgid ""
9238 "If the system detects an inconsistency in the heap, the caller-supplied "
9239 "function pointed to by I<abortfunc> is invoked with a single argument "
9240 "argument, I<mstatus>, that indicates what type of inconsistency was "
9241 "detected.  If I<abortfunc> is NULL, a default function prints an error "
9242 "message on I<stderr> and calls B<abort>(3)."
9243 msgstr ""
9244
9245 #. type: Plain text
9246 #: build/C/man3/mcheck.3:102
9247 msgid ""
9248 "The B<mprobe>()  function performs a consistency check on the block of "
9249 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
9250 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
9251 msgstr ""
9252
9253 #. type: Plain text
9254 #: build/C/man3/mcheck.3:110
9255 msgid ""
9256 "The following list describes the values returned by B<mprobe>()  or passed "
9257 "as the I<mstatus> argument when I<abortfunc> is invoked:"
9258 msgstr ""
9259
9260 #. type: TP
9261 #: build/C/man3/mcheck.3:110
9262 #, no-wrap
9263 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
9264 msgstr ""
9265
9266 #. type: Plain text
9267 #: build/C/man3/mcheck.3:115
9268 msgid ""
9269 "B<mcheck>()  was not called before the first memory allocation function was "
9270 "called.  Consistency checking is not possible."
9271 msgstr ""
9272
9273 #. type: TP
9274 #: build/C/man3/mcheck.3:115
9275 #, no-wrap
9276 msgid "B<MCHECK_OK> (B<mprobe>() only)"
9277 msgstr ""
9278
9279 #. type: Plain text
9280 #: build/C/man3/mcheck.3:118
9281 msgid "No inconsistency detected."
9282 msgstr ""
9283
9284 #. type: TP
9285 #: build/C/man3/mcheck.3:118
9286 #, fuzzy, no-wrap
9287 #| msgid "B<M_CHECK_ACTION>"
9288 msgid "B<MCHECK_HEAD>"
9289 msgstr "B<M_CHECK_ACTION>"
9290
9291 #. type: Plain text
9292 #: build/C/man3/mcheck.3:121
9293 #, fuzzy
9294 #| msgid "No memory could be allocated for segment overhead."
9295 msgid "Memory preceding an allocated block was clobbered."
9296 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9297
9298 #. type: TP
9299 #: build/C/man3/mcheck.3:121
9300 #, fuzzy, no-wrap
9301 #| msgid "B<M_CHECK_ACTION>"
9302 msgid "B<MCHECK_TAIL>"
9303 msgstr "B<M_CHECK_ACTION>"
9304
9305 #. type: Plain text
9306 #: build/C/man3/mcheck.3:124
9307 #, fuzzy
9308 #| msgid "No memory could be allocated for segment overhead."
9309 msgid "Memory following an allocated block was clobbered."
9310 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9311
9312 #. type: TP
9313 #: build/C/man3/mcheck.3:124
9314 #, fuzzy, no-wrap
9315 #| msgid "B<MALLOC_CHECK_>"
9316 msgid "B<MCHECK_FREE>"
9317 msgstr "B<MALLOC_CHECK_>"
9318
9319 #. type: Plain text
9320 #: build/C/man3/mcheck.3:128
9321 msgid "A block of memory was freed twice."
9322 msgstr ""
9323
9324 #. type: Plain text
9325 #: build/C/man3/mcheck.3:133
9326 msgid ""
9327 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
9328 msgstr ""
9329
9330 #. type: Plain text
9331 #: build/C/man3/mcheck.3:144
9332 msgid ""
9333 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
9334 "since glibc 2.2.  The B<mcheck()> and B<mprobe()> functions are present "
9335 "since at least glibc 2.0"
9336 msgstr ""
9337
9338 #.  But is MALLOC_CHECK_ slower?
9339 #. type: Plain text
9340 #: build/C/man3/mcheck.3:158
9341 msgid ""
9342 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
9343 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
9344 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
9345 "application to be relinked."
9346 msgstr ""
9347
9348 #. type: Plain text
9349 #: build/C/man3/mcheck.3:165
9350 msgid ""
9351 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
9352 "same block of memory twice.  The following shell session demonstrates what "
9353 "happens when running the program:"
9354 msgstr ""
9355
9356 #. type: Plain text
9357 #: build/C/man3/mcheck.3:170
9358 #, no-wrap
9359 msgid ""
9360 "$B< ./a.out>\n"
9361 "About to free\n"
9362 msgstr ""
9363
9364 #. type: Plain text
9365 #: build/C/man3/mcheck.3:174
9366 #, no-wrap
9367 msgid ""
9368 "About to free a second time\n"
9369 "block freed twice\n"
9370 "Aborted (core dumped)\n"
9371 msgstr ""
9372
9373 #. type: Plain text
9374 #: build/C/man3/mcheck.3:182
9375 #, fuzzy, no-wrap
9376 #| msgid ""
9377 #| "#include E<lt>malloc.hE<gt>\n"
9378 #| "#include E<lt>stdio.hE<gt>\n"
9379 #| "#include E<lt>stdlib.hE<gt>\n"
9380 msgid ""
9381 "#include E<lt>stdlib.hE<gt>\n"
9382 "#include E<lt>stdio.hE<gt>\n"
9383 "#include E<lt>mcheck.hE<gt>\n"
9384 msgstr ""
9385 "#include E<lt>malloc.hE<gt>\n"
9386 "#include E<lt>stdio.hE<gt>\n"
9387 "#include E<lt>stdlib.hE<gt>\n"
9388
9389 #. type: Plain text
9390 #: build/C/man3/mcheck.3:190
9391 #, no-wrap
9392 msgid ""
9393 "    if (mcheck(NULL) != 0) {\n"
9394 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
9395 msgstr ""
9396
9397 #. type: Plain text
9398 #: build/C/man3/mcheck.3:193
9399 #, fuzzy, no-wrap
9400 #| msgid ""
9401 #| "    exit(EXIT_SUCCESS);\n"
9402 #| "}\n"
9403 msgid ""
9404 "        exit(EXIT_FAILURE);\n"
9405 "    }\n"
9406 msgstr ""
9407 "    exit(EXIT_SUCCESS);\n"
9408 "}\n"
9409
9410 #. type: Plain text
9411 #: build/C/man3/mcheck.3:195
9412 #, fuzzy, no-wrap
9413 #| msgid "    mtrace();\n"
9414 msgid "    p = malloc(1000);\n"
9415 msgstr "    mtrace();\n"
9416
9417 #. type: Plain text
9418 #: build/C/man3/mcheck.3:200
9419 #, no-wrap
9420 msgid ""
9421 "    fprintf(stderr, \"About to free\\en\");\n"
9422 "    free(p);\n"
9423 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
9424 "    free(p);\n"
9425 msgstr ""
9426
9427 #.  FIXME add SEE ALSO pointer from malloc(3) to here
9428 #.  FIXME add SEE ALSO pointer from mallopt(3) to here
9429 #.  FIXME add SEE ALSO pointer from mtrace(3) to here
9430 #. type: Plain text
9431 #: build/C/man3/mcheck.3:211
9432 #, fuzzy
9433 #| msgid "B<malloc>(3), B<mallopt>(3)"
9434 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
9435 msgstr "B<malloc>(3), B<mallopt>(3)"
9436
9437 #~ msgid "2012-02-27"
9438 #~ msgstr "2012-02-27"
9439
9440 #~ msgid ""
9441 #~ "The I<mode> is not supported by the file system containing the file "
9442 #~ "referred to by I<fd>."
9443 #~ msgstr ""
9444 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
9445 #~ "ない。"
9446
9447 #~ msgid "2012-03-22"
9448 #~ msgstr "2012-03-22"
9449
9450 #~ msgid ""
9451 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
9452 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
9453 #~ msgstr ""
9454 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
9455 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
9456
9457 #~ msgid ""
9458 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
9459 #~ "()  writes its output.  This file must be writable to the user or "
9460 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
9461 #~ "truncated."
9462 #~ msgstr ""
9463 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
9464 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
9465 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
9466 #~ "イルの元の内容を上書きする。"
9467
9468 #~ msgid "These are GNU extensions."
9469 #~ msgstr "この関数は GNU 拡張である。"
9470
9471 #~ msgid ""
9472 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
9473 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
9474 #~ msgstr ""
9475 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
9476 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
9477 #~ "リプトが付属している。"
9478
9479 #~ msgid ""
9480 #~ "This flag allocates and initializes to zero the disk space within the "
9481 #~ "range specified by I<offset> and I<len>.  After a successful call, "
9482 #~ "subsequent writes into this range are guaranteed not to fail because of "
9483 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
9484 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
9485 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
9486 #~ "less than I<offset>+I<len>."
9487 #~ msgstr ""
9488 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
9489 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
9490 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
9491 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
9492 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
9493 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
9494 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
9495 #~ "は変更されることはない。"
9496
9497 #, fuzzy
9498 #~| msgid "The buffer referred to by I<map> is not accessible."
9499 #~ msgid ""
9500 #~ "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
9501 #~ msgstr "The buffer referred to by I<map> is not accessible."
9502
9503 #~ msgid ""
9504 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
9505 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
9506 #~ msgstr ""
9507 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
9508 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
9509
9510 #~ msgid ""
9511 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
9512 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
9513 #~ "required."
9514 #~ msgstr ""
9515 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
9516 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
9517 #~ "が必要である。"
9518
9519 #~ msgid ""
9520 #~ "B<#define _XOPEN_SOURCE 600>\n"
9521 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9522 #~ msgstr ""
9523 #~ "B<#define _XOPEN_SOURCE 600>\n"
9524 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9525
9526 #~ msgid ""
9527 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
9528 #~ "provided since version 2.2."
9529 #~ msgstr ""
9530 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
9531 #~ "glibc バージョン 2.2 以降で行われている。"
9532
9533 #~ msgid ""
9534 #~ "B<#define _GNU_SOURCE>\n"
9535 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9536 #~ msgstr ""
9537 #~ "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
9538 #~ "B<#include E<lt>fcntl.hE<gt>>\n"