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.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2012-04-25 05:59+0900\n"
10 "PO-Revision-Date: 2012-05-01 00:10+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man2/alloc_hugepages.2:25
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
25 #: build/C/man2/alloc_hugepages.2:25
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
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
61 msgid "Linux Programmer's Manual"
62 msgstr "Linux Programmer's Manual"
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
84 #: build/C/man2/alloc_hugepages.2:28
85 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
87 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
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
107 #. asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
108 #. unsigned long len, int prot, int flag);
110 #: build/C/man2/alloc_hugepages.2:34
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"
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"
119 #. asmlinkage int sys_free_hugepages(unsigned long addr);
121 #: build/C/man2/alloc_hugepages.2:37
123 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
124 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
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
146 #: build/C/man2/alloc_hugepages.2:49
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>."
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> で失"
160 #: build/C/man2/alloc_hugepages.2:57
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."
168 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
169 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
170 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
171 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
172 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
175 #: build/C/man2/alloc_hugepages.2:66
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."
181 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
182 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
186 #: build/C/man2/alloc_hugepages.2:81
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."
194 "B<free_hugepages>() の I<addr> 引き数は、どのページを解放するかを指定する: "
195 "I<addr> は B<alloc_hugepages>() の呼び出しの返り値である (全てのユーザがメモ"
196 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
197 "() の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
198 "わないかもしれない。 アドレスは正しく配置されなければならない。"
201 #: build/C/man2/alloc_hugepages.2:86
203 "The I<len> argument is the length of the required segment. It must be a "
204 "multiple of the huge page size."
206 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
210 #: build/C/man2/alloc_hugepages.2:94
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>."
215 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
216 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
219 #: build/C/man2/alloc_hugepages.2:109
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."
226 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
227 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
228 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
229 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
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
251 #: build/C/man2/alloc_hugepages.2:118
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."
257 "成功した場合、 B<alloc_hugepages>() は割り当てられた仮想アドレスを返し、 "
258 "B<free_hugepages>() は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
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
278 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:151
284 #: build/C/man2/alloc_hugepages.2:122
285 msgid "The system call is not supported on this kernel."
286 msgstr "このシステムコールはカーネルでサポートされていない。"
289 #: build/C/man2/alloc_hugepages.2:122
295 #: build/C/man2/alloc_hugepages.2:126
297 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages. This can "
298 "be read and written."
300 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
304 #: build/C/man2/alloc_hugepages.2:130
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, "
310 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
311 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
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:186
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
330 msgid "CONFORMING TO"
334 #: build/C/man2/alloc_hugepages.2:133
336 "These calls are specific to Linux on Intel processors, and should not be "
337 "used in programs intended to be portable."
339 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
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
359 #: build/C/man2/alloc_hugepages.2:141
361 "These system calls are gone; they existed only in Linux 2.5.36 through to "
362 "2.5.54. Now the hugetlbfs file system can be used instead. Memory backed "
363 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2) to "
364 "map files in this virtual file system."
366 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
367 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
368 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2) を使ってこ"
369 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
372 #: build/C/man2/alloc_hugepages.2:145
374 "The maximal number of huge pages can be specified using the B<hugepages=> "
377 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
380 #: build/C/man3/alloca.3:41
386 #: build/C/man3/alloca.3:41
392 #: build/C/man3/alloca.3:41 build/C/man3/malloc_hook.3:6
393 #: build/C/man3/mtrace.3:23 build/C/man3/posix_fallocate.3:23
394 #: build/C/man3/posix_memalign.3:28 build/C/man3/malloc_get_state.3:23
395 #: build/C/man3/malloc_usable_size.3:23
401 #: build/C/man3/alloca.3:44
402 msgid "alloca - allocate memory that is automatically freed"
403 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
406 #: build/C/man3/alloca.3:46
407 msgid "B<#include E<lt>alloca.hE<gt>>"
408 msgstr "B<#include E<lt>alloca.hE<gt>>"
411 #: build/C/man3/alloca.3:48
412 msgid "B<void *alloca(size_t >I<size>B<);>"
413 msgstr "B<void *alloca(size_t >I<size>B<);>"
416 #: build/C/man3/alloca.3:58
418 "The B<alloca>() function allocates I<size> bytes of space in the stack "
419 "frame of the caller. This temporary space is automatically freed when the "
420 "function that called B<alloca>() returns to its caller."
422 "B<alloca>() 関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
423 "付ける。 この一時的な領域は、 B<alloca>() を呼び出した関数が呼出元に返るとき"
427 #: build/C/man3/alloca.3:63
429 "The B<alloca>() function returns a pointer to the beginning of the "
430 "allocated space. If the allocation causes stack overflow, program behavior "
433 "B<alloca>() 関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
434 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
438 #: build/C/man3/alloca.3:65
439 msgid "This function is not in POSIX.1-2001."
440 msgstr "この関数は POSIX.1-2001 にはない。"
443 #: build/C/man3/alloca.3:71
445 "There is evidence that the B<alloca>() function appeared in 32V, PWB, "
446 "PWB.2, 3BSD, and 4BSD. There is a man page for it in 4.3BSD. Linux uses "
449 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>() 関数が登場した証拠がある。 "
450 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
451 "は POSIX.1-2001 にはない。"
454 #: build/C/man3/alloca.3:86
456 "The B<alloca>() function is machine- and compiler-dependent. For certain "
457 "applications, its use can improve efficiency compared to the use of B<malloc>"
458 "(3) plus B<free>(3). In certain cases, it can also simplify memory "
459 "deallocation in applications that use B<longjmp>(3) or B<siglongjmp>(3). "
460 "Otherwise, its use is discouraged."
462 "B<alloca>() 関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
463 "は、この関数を使うと B<malloc>(3) と B<free>(3) を組み合わせて使った場合に"
464 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
465 "B<longjmp>(3) や B<siglongjmp>(3) を使うアプリケーションでのメモリの開放を"
466 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
469 #: build/C/man3/alloca.3:95
471 "Because the space allocated by B<alloca>() is allocated within the stack "
472 "frame, that space is automatically freed if the function return is jumped "
473 "over by a call to B<longjmp>(3) or B<siglongjmp>(3)."
475 "B<alloca>() により割り当てられる空間はスタックフレームから割り当てらるの"
476 "で、 関数の戻り先が B<longjmp>(3) や B<siglongjmp>(3) の呼び出しによりジャ"
477 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
480 #: build/C/man3/alloca.3:100
481 msgid "Do not attempt to B<free>(3) space allocated by B<alloca>()!"
483 "B<alloca>() で割り当てられた空間を B<free>(3) しようとすることのないよう"
487 #: build/C/man3/alloca.3:100
489 msgid "Notes on the GNU Version"
490 msgstr "GNU 版についての注意"
493 #: build/C/man3/alloca.3:122
495 "Normally, B<gcc>(1) translates calls to B<alloca>() with inlined code. "
496 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
497 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
498 "included). But beware! By default the glibc version of I<E<lt>stdlib."
499 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
501 "通常 B<gcc>(1) は B<alloca>() の呼び出しをインラインコードに変換する。 I<-"
502 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
503 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
504 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
505 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
509 #: build/C/man3/alloca.3:125
511 msgid " #define alloca(size) __builtin_alloca (size)\n"
512 msgstr " #define alloca(size) __builtin_alloca (size)\n"
515 #: build/C/man3/alloca.3:128
516 msgid "with messy consequences if one has a private version of this function."
517 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
520 #: build/C/man3/alloca.3:132
522 "The fact that the code is inlined means that it is impossible to take the "
523 "address of this function, or to change its behavior by linking with a "
526 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
527 "のライブラリをリンクして動作を変更することはできない。"
530 #: build/C/man3/alloca.3:136
532 "The inlined code often consists of a single instruction adjusting the stack "
533 "pointer, and does not check for stack overflow. Thus, there is no NULL "
536 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
537 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
538 "よって NULL エラーが返されることはない。"
541 #: build/C/man3/alloca.3:136 build/C/man2/cacheflush.2:81
542 #: build/C/man3/mallopt.3:404 build/C/man2/mlock.2:305 build/C/man2/mmap.2:544
543 #: build/C/man3/mtrace.3:100 build/C/man2/posix_fadvise.2:177
544 #: build/C/man2/shmget.2:284
550 #: build/C/man3/alloca.3:141
552 "There is no error indication if the stack frame cannot be extended. "
553 "(However, after a failed allocation, the program is likely to receive a "
554 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
556 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
557 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
558 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
561 #: build/C/man3/alloca.3:149
563 "On many systems B<alloca>() cannot be used inside the list of arguments of "
564 "a function call, because the stack space reserved by B<alloca>() would "
565 "appear on the stack in the middle of the space for the function arguments."
567 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>() が使え"
568 "ない。 これは、 B<alloca>() によって予約されるスタック領域が、 関数引き数に"
569 "使われるスタック領域の中に現れてしまうためである。"
572 #: build/C/man3/alloca.3:149 build/C/man2/fallocate.2:189
573 #: build/C/man2/madvise.2:353 build/C/man3/malloc_hook.3:133
574 #: build/C/man3/mallopt.3:568 build/C/man2/mlock.2:330 build/C/man2/mmap.2:653
575 #: build/C/man2/mmap2.2:92 build/C/man2/mprotect.2:220
576 #: build/C/man2/mremap.2:200 build/C/man2/msync.2:118
577 #: build/C/man3/mtrace.3:165 build/C/man2/posix_fadvise.2:182
578 #: build/C/man3/posix_fallocate.3:126 build/C/man3/posix_memalign.3:270
579 #: build/C/man2/readahead.2:92 build/C/man2/remap_file_pages.2:155
580 #: build/C/man3/shm_open.3:269 build/C/man7/shm_overview.7:114
581 #: build/C/man2/shmctl.2:403 build/C/man2/shmget.2:290
582 #: build/C/man2/shmop.2:282 build/C/man2/subpage_prot.2:120
583 #: build/C/man2/sync_file_range.2:217 build/C/man3/malloc_get_state.3:109
584 #: build/C/man3/malloc_trim.3:76 build/C/man3/malloc_usable_size.3:60
590 #: build/C/man3/alloca.3:152
591 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
592 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
595 #: build/C/man2/cacheflush.2:24
601 #: build/C/man2/cacheflush.2:24
607 #: build/C/man2/cacheflush.2:27
608 msgid "cacheflush - flush contents of instruction and/or data cache"
609 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
612 #: build/C/man2/cacheflush.2:30
614 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
615 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
618 #: build/C/man2/cacheflush.2:32
620 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
621 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
624 #: build/C/man2/cacheflush.2:42
626 "B<cacheflush>() flushes the contents of the indicated cache(s) for the user "
627 "addresses in the range I<addr> to I<(addr+nbytes-1)>. I<cache> may be one "
630 "B<cacheflush>() は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
631 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
635 #: build/C/man2/cacheflush.2:42
641 #: build/C/man2/cacheflush.2:45
642 msgid "Flush the instruction cache."
643 msgstr "命令 (instruction) キャッシュをフラッシュする。"
646 #: build/C/man2/cacheflush.2:45
652 #: build/C/man2/cacheflush.2:48
653 msgid "Write back to memory and invalidate the affected valid cache lines."
654 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
657 #: build/C/man2/cacheflush.2:48
663 #: build/C/man2/cacheflush.2:52
664 msgid "Same as B<(ICACHE|DCACHE)>."
665 msgstr "B<(ICACHE|DCACHE)> と同じ。"
668 #: build/C/man2/cacheflush.2:58
670 "B<cacheflush>() returns 0 on success or -1 on error. If errors are "
671 "detected, I<errno> will indicate the error."
673 "B<cacheflush>() は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
674 "出された場合は I<errno> にエラーが指示される。"
677 #: build/C/man2/cacheflush.2:59 build/C/man2/mmap2.2:62
678 #: build/C/man2/mremap.2:143 build/C/man2/shmctl.2:303
679 #: build/C/man2/subpage_prot.2:67
685 #: build/C/man2/cacheflush.2:66
687 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
690 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
694 #: build/C/man2/cacheflush.2:66 build/C/man2/fallocate.2:124
695 #: build/C/man2/madvise.2:264 build/C/man2/mlock.2:158
696 #: build/C/man2/mlock.2:165 build/C/man2/mlock.2:177 build/C/man2/mmap.2:421
697 #: build/C/man2/mmap.2:429 build/C/man2/mmap.2:434 build/C/man2/mmap2.2:65
698 #: build/C/man2/mprotect.2:89 build/C/man2/mremap.2:152
699 #: build/C/man2/msync.2:80 build/C/man2/posix_fadvise.2:93
700 #: build/C/man3/posix_fallocate.3:79 build/C/man3/posix_memalign.3:156
701 #: build/C/man2/readahead.2:76 build/C/man2/remap_file_pages.2:130
702 #: build/C/man2/remap_file_pages.2:137 build/C/man3/shm_open.3:211
703 #: build/C/man2/shmctl.2:317 build/C/man2/shmget.2:196
704 #: build/C/man2/shmop.2:195 build/C/man2/shmop.2:218
705 #: build/C/man2/subpage_prot.2:72 build/C/man2/sync_file_range.2:152
711 #: build/C/man2/cacheflush.2:74
712 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
713 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
715 #. FIXME This system call was only on MIPS back in 1.2 days, but
716 #. by now it is on a number of other architectures (but not i386).
717 #. Investigate the details and update this page.
718 #. Irix 6.5 appears to have a cacheflush() syscall -- mtk
720 #: build/C/man2/cacheflush.2:81
722 "This Linux-specific system call is only available on MIPS-based systems. It "
723 "should not be used in programs intended to be portable."
725 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
726 "植を意図したプログラムで使用すべきではない。"
729 #: build/C/man2/cacheflush.2:87
731 "The current implementation ignores the I<addr> and I<nbytes> arguments. "
732 "Therefore, the whole cache is always flushed."
734 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
738 #: build/C/man2/fallocate.2:8
744 #: build/C/man2/fallocate.2:8
750 #: build/C/man2/fallocate.2:11
751 msgid "fallocate - manipulate file space"
752 msgstr "fallocate - ファイル空間の操作"
755 #: build/C/man2/fallocate.2:15 build/C/man2/readahead.2:35
758 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
759 "B<#include E<lt>fcntl.hE<gt>>\n"
761 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
762 "B<#include E<lt>fcntl.hE<gt>>\n"
765 #: build/C/man2/fallocate.2:18
767 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
768 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
771 #: build/C/man2/fallocate.2:24
773 "This is a nonportable, Linux-specific system call. For the portable, "
774 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
775 "B<posix_fallocate>(3)."
777 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
778 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
779 "で規定された方法である B<posix_fallocate>(3) を使うこと。"
782 #: build/C/man2/fallocate.2:34
784 "B<fallocate>() allows the caller to directly manipulate the allocated disk "
785 "space for the file referred to by I<fd> for the byte range starting at "
786 "I<offset> and continuing for I<len> bytes."
788 "B<fallocate>() を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
789 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
793 #: build/C/man2/fallocate.2:39
795 "The I<mode> argument determines the operation to be performed on the given "
796 "range. Details of the supported operations are given in the subsections "
799 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
800 "サポートされている操作の詳細は以下のサブセクションで説明する。"
803 #: build/C/man2/fallocate.2:39
805 msgid "Allocating disk space"
809 #: build/C/man2/fallocate.2:58
811 "The default operation (i.e., I<mode> is zero) of B<fallocate>() allocates "
812 "and initializes to zero the disk space within the range specified by "
813 "I<offset> and I<len>. The file size (as reported by B<stat>(2)) will be "
814 "changed if I<offset>+I<len> is greater than the file size. This default "
815 "behavior closely resembles the behavior of the B<posix_fallocate>(3) "
816 "library function, and is intended as a method of optimally implementing that "
819 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
820 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行う。\n"
821 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
822 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作は、\n"
823 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
824 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
828 #: build/C/man2/fallocate.2:64
830 "After a successful call, subsequent writes into the range specified by "
831 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
836 #: build/C/man2/fallocate.2:75
838 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
839 "the call is similar, but the file size will not be changed even if I<offset>"
840 "+I<len> is greater than the file size. Preallocating zeroed blocks beyond "
841 "the end of the file in this manner is useful for optimizing append workloads."
843 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコール\n"
844 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
845 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
846 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
850 #: build/C/man2/fallocate.2:79
852 "Because allocation is done in block size chunks, B<fallocate>() may "
853 "allocate a larger range of disk space than was specified."
855 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたより\n"
856 "も大きなディスク領域を割り当てることがある。"
859 #: build/C/man2/fallocate.2:79
861 msgid "Deallocating file space"
862 msgstr "ファイル空間の割り当て解除"
865 #: build/C/man2/fallocate.2:94
867 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
868 "in I<mode> deallocates space (i.e., creates a hole) in the byte range "
869 "starting at I<offset> and continuing for I<len> bytes. Within the specified "
870 "range, partial file system blocks are zeroed, and whole file system blocks "
871 "are removed from the file. After a successful call, subsequent reads from "
872 "this range will return zeroes."
876 #: build/C/man2/fallocate.2:105
878 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
879 "I<mode>; in other words, even when punching off the end of the file, the "
880 "file size (as reported by B<stat>(2)) does not change."
884 #: build/C/man2/fallocate.2:109
886 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
887 "doesn't support the operation, an error is returned."
891 #: build/C/man2/fallocate.2:112
892 msgid "B<fallocate>() returns zero on success, and -1 on failure."
893 msgstr "B<fallocate>() は成功すると 0 を返し、エラーの場合は -1 を返す。"
896 #: build/C/man2/fallocate.2:113 build/C/man2/madvise.2:261
897 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:90
898 #: build/C/man3/posix_fallocate.3:71 build/C/man2/readahead.2:72
899 #: build/C/man2/sync_file_range.2:148
905 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
906 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
908 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
912 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
918 #: build/C/man2/fallocate.2:121
919 msgid "I<offset>+I<len> exceeds the maximum file size."
920 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
923 #: build/C/man2/fallocate.2:121
929 #: build/C/man2/fallocate.2:124
930 msgid "A signal was caught during execution."
931 msgstr "実行中にシグナルが捕捉された。"
934 #: build/C/man2/fallocate.2:136 build/C/man3/posix_fallocate.3:85
935 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
936 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
939 #: build/C/man2/fallocate.2:136 build/C/man2/madvise.2:292
940 #: build/C/man2/sync_file_range.2:160
946 #: build/C/man2/fallocate.2:139
947 msgid "An I/O error occurred while reading from or writing to a file system."
948 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
951 #: build/C/man2/fallocate.2:139 build/C/man2/mmap.2:450
952 #: build/C/man3/posix_fallocate.3:85
958 #: build/C/man2/fallocate.2:146
960 "I<fd> does not refer to a regular file or a directory. (If I<fd> is a pipe "
961 "or FIFO, a different error results.)"
963 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
964 "を参照している場合、別のエラーが発生する)。"
967 #: build/C/man2/fallocate.2:146 build/C/man3/posix_fallocate.3:89
968 #: build/C/man2/shmget.2:214 build/C/man2/sync_file_range.2:166
974 #: build/C/man2/fallocate.2:151 build/C/man3/posix_fallocate.3:94
976 "There is not enough space left on the device containing the file referred to "
978 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
981 #: build/C/man2/fallocate.2:156
983 "The file system containing the file referred to by I<fd> does not support "
986 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作をサポートして"
990 #: build/C/man2/fallocate.2:156
992 msgid "B<EOPNOTSUPP>"
993 msgstr "B<EOPNOTSUPP>"
996 #: build/C/man2/fallocate.2:162
998 "The I<mode> is not supported by the file system containing the file referred "
1001 "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしていな"
1005 #: build/C/man2/fallocate.2:162 build/C/man2/mlock.2:144
1006 #: build/C/man2/mlock.2:183 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:342
1007 #: build/C/man2/shmget.2:222
1013 #: build/C/man2/fallocate.2:178
1015 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)). Or: "
1016 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1017 "is marked append-only (see B<chattr>(1))."
1021 #: build/C/man2/fallocate.2:178 build/C/man2/posix_fadvise.2:96
1022 #: build/C/man3/posix_fallocate.3:94 build/C/man2/sync_file_range.2:169
1028 #: build/C/man2/fallocate.2:182
1029 msgid "I<fd> refers to a pipe or FIFO."
1030 msgstr "I<fd> がパイプか FIFO を参照している。"
1033 #: build/C/man2/fallocate.2:182 build/C/man2/mmap2.2:74
1034 #: build/C/man2/posix_fadvise.2:103 build/C/man3/posix_fallocate.3:98
1035 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1036 #: build/C/man2/remap_file_pages.2:146 build/C/man3/shm_open.3:247
1037 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:177
1043 #: build/C/man2/fallocate.2:186
1045 "B<fallocate>() is available on Linux since kernel 2.6.23. Support is "
1046 "provided by glibc since version 2.10."
1048 "B<fallocate>() はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1049 "対応はバージョン 3.10 以降で行われている。"
1052 #: build/C/man2/fallocate.2:189
1053 msgid "B<fallocate>() is Linux-specific."
1054 msgstr "B<fallocate>() は Linux 固有である。"
1057 #: build/C/man2/fallocate.2:192
1058 msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1059 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1062 #: build/C/man2/madvise.2:35
1068 #: build/C/man2/madvise.2:35
1074 #: build/C/man2/madvise.2:38
1075 msgid "madvise - give advice about use of memory"
1076 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1079 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1080 #: build/C/man3/shm_open.3:31
1081 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1082 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1085 #: build/C/man2/madvise.2:42
1087 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1089 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1092 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:42
1093 #: build/C/man3/posix_fallocate.3:37 build/C/man3/posix_memalign.3:48
1095 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1096 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1099 #: build/C/man2/madvise.2:50
1100 msgid "B<madvise>(): _BSD_SOURCE"
1101 msgstr "B<madvise>(): _BSD_SOURCE"
1104 #: build/C/man2/madvise.2:68
1106 "The B<madvise>() system call advises the kernel about how to handle paging "
1107 "input/output in the address range beginning at address I<addr> and with size "
1108 "I<length> bytes. It allows an application to tell the kernel how it expects "
1109 "to use some mapped or shared memory areas, so that the kernel can choose "
1110 "appropriate read-ahead and caching techniques. This call does not influence "
1111 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1112 "but may influence its performance. The kernel is free to ignore the advice."
1114 "B<madvise>() システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1115 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1116 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1117 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1118 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1119 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1120 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1123 #: build/C/man2/madvise.2:72
1124 msgid "The advice is indicated in the I<advice> argument which can be"
1126 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1129 #: build/C/man2/madvise.2:72
1131 msgid "B<MADV_NORMAL>"
1132 msgstr "B<MADV_NORMAL>"
1135 #: build/C/man2/madvise.2:76
1136 msgid "No special treatment. This is the default."
1137 msgstr "特別な扱いは行わない。これがデフォルトである。"
1140 #: build/C/man2/madvise.2:76
1142 msgid "B<MADV_RANDOM>"
1143 msgstr "B<MADV_RANDOM>"
1146 #: build/C/man2/madvise.2:80
1148 "Expect page references in random order. (Hence, read ahead may be less "
1149 "useful than normally.)"
1151 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1155 #: build/C/man2/madvise.2:80
1157 msgid "B<MADV_SEQUENTIAL>"
1158 msgstr "B<MADV_SEQUENTIAL>"
1161 #: build/C/man2/madvise.2:85
1163 "Expect page references in sequential order. (Hence, pages in the given "
1164 "range can be aggressively read ahead, and may be freed soon after they are "
1167 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1168 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1172 #: build/C/man2/madvise.2:85
1174 msgid "B<MADV_WILLNEED>"
1175 msgstr "B<MADV_WILLNEED>"
1178 #: build/C/man2/madvise.2:89
1180 "Expect access in the near future. (Hence, it might be a good idea to read "
1181 "some pages ahead.)"
1183 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1187 #: build/C/man2/madvise.2:89
1189 msgid "B<MADV_DONTNEED>"
1190 msgstr "B<MADV_DONTNEED>"
1193 #: build/C/man2/madvise.2:100
1195 "Do not expect access in the near future. (For the time being, the "
1196 "application is finished with the given range, so the kernel can free "
1197 "resources associated with it.) Subsequent accesses of pages in this range "
1198 "will succeed, but will result either in reloading of the memory contents "
1199 "from the underlying mapped file (see B<mmap>(2)) or zero-fill-on-demand "
1200 "pages for mappings without an underlying file."
1202 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1203 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。) こ"
1204 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1205 "プ元のファイルからロードし直すことになる (B<mmap>(2) を見よ) か、 または元"
1206 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1210 #: build/C/man2/madvise.2:100
1212 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1213 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1216 #. Databases want to use this feature to drop a section of their
1217 #. bufferpool (shared memory segments) - without writing back to
1218 #. disk/swap space. This feature is also useful for supporting
1219 #. hot-plug memory on UML.
1221 #: build/C/man2/madvise.2:113
1223 "Free up a given range of pages and its associated backing store. Currently, "
1224 "only shmfs/tmpfs supports this; other file systems return with the error "
1227 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1228 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1232 #: build/C/man2/madvise.2:113
1234 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1235 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1237 #. See http://lwn.net/Articles/171941/
1238 #. [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1239 #. Currently, copy-on-write may change the physical address of
1240 #. a page even if the user requested that the page is pinned in
1241 #. memory (either by mlock or by get_user_pages). This happens
1242 #. if the process forks meanwhile, and the parent writes to that
1243 #. page. As a result, the page is orphaned: in case of
1244 #. get_user_pages, the application will never see any data hardware
1245 #. DMA's into this page after the COW. In case of mlock'd memory,
1246 #. the parent is not getting the realtime/security benefits of mlock.
1247 #. In particular, this affects the Infiniband modules which do DMA from
1248 #. and into user pages all the time.
1249 #. This patch adds madvise options to control whether memory range is
1250 #. inherited across fork. Useful e.g. for when hardware is doing DMA
1251 #. from/into these pages. Could also be useful to an application
1252 #. wanting to speed up its forks by cutting large areas out of
1254 #. SEE ALSO: http://lwn.net/Articles/171941/
1255 #. "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1257 #: build/C/man2/madvise.2:144
1259 "Do not make the pages in this range available to the child after a B<fork>"
1260 "(2). This is useful to prevent copy-on-write semantics from changing the "
1261 "physical location of a page(s) if the parent writes to it after a B<fork>"
1262 "(2). (Such page relocations cause problems for hardware that DMAs into the "
1265 "B<fork>(2) が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1266 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2) "
1267 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1268 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1269 "を行うような場合に 問題を起こすことがある)。"
1272 #: build/C/man2/madvise.2:144
1274 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1275 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1278 #: build/C/man2/madvise.2:150
1280 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1281 "a mapping is inherited across B<fork>(2)."
1283 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1284 "(2) の前後でマッピングは継承されるようになる。"
1287 #: build/C/man2/madvise.2:150
1289 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1290 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1293 #: build/C/man2/madvise.2:162
1295 "Poison a page and handle it like a hardware memory corruption. This "
1296 "operation is only available for privileged (B<CAP_SYS_ADMIN>) processes. "
1297 "This operation may result in the calling process receiving a B<SIGBUS> and "
1298 "the page being unmapped. This feature is intended for testing of memory "
1299 "error-handling code; it is only available if the kernel was configured with "
1300 "B<CONFIG_MEMORY_FAILURE>."
1304 #: build/C/man2/madvise.2:162
1306 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1307 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1310 #: build/C/man2/madvise.2:180
1312 "Soft offline the pages in the range specified by I<addr> and I<length>. The "
1313 "memory of each page in the specified range is preserved (i.e., when next "
1314 "accessed, the same content will be visible, but in a new physical page "
1315 "frame), and the original page is offlined (i.e., no longer used, and taken "
1316 "out of normal memory management). The effect of the B<MADV_SOFT_OFFLINE> "
1317 "operation is invisible to (i.e., does not change the semantics of) the "
1318 "calling process. This feature is intended for testing of memory error-"
1319 "handling code; it is only available if the kernel was configured with "
1320 "B<CONFIG_MEMORY_FAILURE>."
1324 #: build/C/man2/madvise.2:180
1326 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1327 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1330 #: build/C/man2/madvise.2:205
1332 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1333 "I<addr> and I<length>. The kernel regularly scans those areas of user "
1334 "memory that have been marked as mergeable, looking for pages with identical "
1335 "content. These are replaced by a single write-protected page (which is "
1336 "automatically copied if a process later wants to update the content of the "
1337 "page). KSM only merges private anonymous pages (see B<mmap>(2)). The KSM "
1338 "feature is intended for applications that generate many instances of the "
1339 "same data (e.g., virtualization systems such as KVM). It can consume a lot "
1340 "of processing power; use with care. See the kernel source file "
1341 "I<Documentation/vm/ksm.txt> for more details. The B<MADV_MERGEABLE> and "
1342 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1343 "configured with B<CONFIG_KSM>."
1347 #: build/C/man2/madvise.2:205
1349 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1350 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1353 #: build/C/man2/madvise.2:214
1355 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1356 "address range; KSM unmerges whatever pages it had merged in the address "
1357 "range specified by I<addr> and I<length>."
1361 #: build/C/man2/madvise.2:214
1363 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1364 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1366 #. http://lwn.net/Articles/358904/
1367 #. https://lwn.net/Articles/423584/
1369 #: build/C/man2/madvise.2:243
1371 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1372 "I<addr> and I<length>. Currently, Transparent Huge Pages only work with "
1373 "private anonymous pages (see B<mmap>(2)). The kernel will regularly scan "
1374 "the areas marked as huge page candidates to replace them with huge pages. "
1375 "The kernel will also allocate huge pages directly when the region is "
1376 "naturally aligned to the huge page size (see B<posix_memalign>(2)). This "
1377 "feature is primarily aimed at applications that use large mappings of data "
1378 "and access large regions of that memory at a time (e.g. virtualization "
1379 "systems such as QEMU). It can very easily waste memory (e.g. a 2MB mapping "
1380 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1381 "one 4KB page). See the kernel source file I<Documentation/vm/transhuge.txt> "
1382 "for more details. The B<MADV_HUGEPAGE> and B<MADV_NOHUGEPAGE> operations "
1383 "are only available if the kernel was configured with "
1384 "B<CONFIG_TRANSPARENT_HUGEPAGE>."
1388 #: build/C/man2/madvise.2:243
1390 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1391 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1394 #: build/C/man2/madvise.2:250
1396 "Ensures that memory in the address range specified by I<addr> and I<length> "
1397 "will not be collapsed into huge pages."
1401 #: build/C/man2/madvise.2:257
1403 "On success B<madvise>() returns zero. On error, it returns -1 and I<errno> "
1404 "is set appropriately."
1406 "B<madvise>() は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1410 #: build/C/man2/madvise.2:258 build/C/man2/mlock.2:155 build/C/man2/mmap.2:411
1411 #: build/C/man2/mremap.2:137
1417 #: build/C/man2/madvise.2:261
1418 msgid "A kernel resource was temporarily unavailable."
1419 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1422 #: build/C/man2/madvise.2:264
1423 msgid "The map exists, but the area maps something that isn't a file."
1424 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1427 #: build/C/man2/madvise.2:267
1428 msgid "This error can occur for the following reasons:"
1432 #: build/C/man2/madvise.2:268 build/C/man2/madvise.2:274
1433 #: build/C/man2/madvise.2:277 build/C/man2/madvise.2:280
1434 #: build/C/man2/madvise.2:283 build/C/man3/mallopt.3:233
1435 #: build/C/man3/mallopt.3:239
1443 #: build/C/man2/madvise.2:274
1444 msgid "The value I<len> is negative."
1445 msgstr "I<len> が負の値である。"
1448 #: build/C/man2/madvise.2:277
1449 msgid "I<addr> is not page-aligned."
1453 #: build/C/man2/madvise.2:280
1454 msgid "I<advice> is not a valid value"
1455 msgstr "I<advice> が有効な値でない。"
1458 #: build/C/man2/madvise.2:283
1460 "The application is attempting to release locked or shared pages (with "
1461 "B<MADV_DONTNEED>)."
1463 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解放\n"
1467 #: build/C/man2/madvise.2:291
1469 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1470 "kernel was not configured with B<CONFIG_KSM>."
1474 #: build/C/man2/madvise.2:298
1476 "(for B<MADV_WILLNEED>) Paging in this area would exceed the process's "
1477 "maximum resident set size."
1479 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1480 "(resident set size) の最大値を越えてしまう。"
1483 #: build/C/man2/madvise.2:298 build/C/man2/madvise.2:303
1484 #: build/C/man2/mlock.2:124 build/C/man2/mlock.2:132 build/C/man2/mlock.2:170
1485 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:94
1486 #: build/C/man2/mprotect.2:97 build/C/man2/mremap.2:180
1487 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1488 #: build/C/man2/shmctl.2:326 build/C/man2/shmget.2:211
1489 #: build/C/man2/shmop.2:209 build/C/man2/subpage_prot.2:82
1490 #: build/C/man2/sync_file_range.2:163
1496 #: build/C/man2/madvise.2:303
1497 msgid "(for B<MADV_WILLNEED>) Not enough memory: paging in failed."
1498 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1501 #: build/C/man2/madvise.2:307
1503 "Addresses in the specified range are not currently mapped, or are outside "
1504 "the address space of the process."
1506 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1509 #. FIXME . Write a posix_fadvise(3) page.
1511 #: build/C/man2/madvise.2:319
1513 "POSIX.1b. POSIX.1-2001 describes B<posix_madvise>(3) with constants "
1514 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here. "
1515 "There is a similar B<posix_fadvise>(2) for file access."
1517 "POSIX.1b. POSIX.1-2001 では、 B<posix_madvise>(3) を B<POSIX_MADV_NORMAL> "
1518 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1519 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2) という類似の関数が存在"
1523 #: build/C/man2/madvise.2:328
1525 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1526 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1528 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1529 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1532 #: build/C/man2/madvise.2:329 build/C/man2/mlock.2:268
1533 #: build/C/man2/shmget.2:278
1539 #: build/C/man2/madvise.2:337
1541 "The current Linux implementation (2.4.0) views this system call more as a "
1542 "command than as advice and hence may return an error when it cannot do what "
1543 "it usually would do in response to this advice. (See the ERRORS description "
1544 "above.) This is nonstandard behavior."
1546 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1547 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1548 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1554 #. function first appeared in 4.4BSD.
1556 #: build/C/man2/madvise.2:353
1558 "The Linux implementation requires that the address I<addr> be page-aligned, "
1559 "and allows I<length> to be zero. If there are some parts of the specified "
1560 "address range that are not mapped, the Linux version of B<madvise>() "
1561 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1562 "the system call, as it should)."
1564 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1565 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>() では、指定"
1566 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1567 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1571 #: build/C/man2/madvise.2:359
1573 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1576 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1580 #: build/C/man3/malloc_hook.3:6
1583 msgstr "MALLOC_HOOK"
1586 #: build/C/man3/malloc_hook.3:6
1592 #: build/C/man3/malloc_hook.3:11
1594 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1595 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
1597 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1598 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
1601 #: build/C/man3/malloc_hook.3:14 build/C/man3/posix_memalign.3:40
1603 msgid "B<#include E<lt>malloc.hE<gt>>\n"
1604 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
1607 #: build/C/man3/malloc_hook.3:16
1609 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1610 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1613 #: build/C/man3/malloc_hook.3:19
1615 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1616 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1619 #: build/C/man3/malloc_hook.3:22
1622 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1623 "B< const void *>I<caller>B<);>\n"
1625 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1626 "B< const void *>I<caller>B<);>\n"
1629 #: build/C/man3/malloc_hook.3:24
1631 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1632 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1635 #: build/C/man3/malloc_hook.3:26
1637 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
1638 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
1641 #: build/C/man3/malloc_hook.3:28
1643 msgid "B<void (*__after_morecore_hook)(void);>\n"
1644 msgstr "B<void (*__after_morecore_hook)(void);>\n"
1647 #: build/C/man3/malloc_hook.3:39
1649 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
1650 "(3), and B<free>(3) by specifying appropriate hook functions. You can use "
1651 "these hooks to help you debug programs that use dynamic memory allocation, "
1654 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
1655 "B<malloc>(3), B<realloc>(3), B<free>(3) の動作を変更することができる。例え"
1656 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
1660 #: build/C/man3/malloc_hook.3:46
1662 "The variable B<__malloc_initialize_hook> points at a function that is called "
1663 "once when the malloc implementation is initialized. This is a weak "
1664 "variable, so it can be overridden in the application with a definition like "
1667 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
1668 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
1669 "ケーション内で 以下のような定義で上書きできる:"
1672 #: build/C/man3/malloc_hook.3:49
1674 msgid " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1675 msgstr " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1678 #: build/C/man3/malloc_hook.3:54
1680 "Now the function I<my_init_hook>() can do the initialization of all hooks."
1682 "なお、関数 I<my_init_hook>() で全てのフックの初期化をすることができる。"
1685 #: build/C/man3/malloc_hook.3:70
1687 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
1688 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
1689 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
1690 "except that they have a final argument I<caller> that gives the address of "
1691 "the caller of B<malloc>(3), etc."
1693 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
1694 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
1695 "B<free>(3) とよく似たプロトタイプを持っているが、 一番最後の引き数 "
1696 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3) などの呼び"
1697 "出し元 (caller) のアドレスが格納される。"
1700 #: build/C/man3/malloc_hook.3:76
1702 "The variable B<__after_morecore_hook> points at a function that is called "
1703 "each time after B<sbrk>(2) was asked for more memory."
1705 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2) が呼ばれた"
1706 "後で毎回呼び出される関数へのポインタである。"
1709 #: build/C/man3/malloc_hook.3:78 build/C/man3/mtrace.3:78
1710 #: build/C/man3/malloc_get_state.3:86
1711 msgid "These functions are GNU extensions."
1712 msgstr "これらの関数は GNU による拡張である。"
1714 #. https://bugzilla.redhat.com/show_bug.cgi?id=450187
1715 #. http://sourceware.org/bugzilla/show_bug.cgi?id=9957
1717 #: build/C/man3/malloc_hook.3:85
1719 "The use of these hook functions is not safe in multithreaded programs, and "
1720 "they are now deprecated. Programmers should instead preempt calls to the "
1721 "relevant functions by defining and exporting functions such as \"malloc\" "
1726 #: build/C/man3/malloc_hook.3:85 build/C/man3/mallopt.3:464
1727 #: build/C/man2/mmap.2:571 build/C/man2/mprotect.2:142
1728 #: build/C/man3/mtrace.3:106
1734 #: build/C/man3/malloc_hook.3:87
1735 msgid "Here is a short example of how to use these variables."
1736 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
1739 #: build/C/man3/malloc_hook.3:91
1742 "#include E<lt>stdio.hE<gt>\n"
1743 "#include E<lt>malloc.hE<gt>\n"
1745 "#include E<lt>stdio.hE<gt>\n"
1746 "#include E<lt>malloc.hE<gt>\n"
1749 #: build/C/man3/malloc_hook.3:95
1752 "/* Prototypes for our hooks. */\n"
1753 "static void my_init_hook(void);\n"
1754 "static void *my_malloc_hook(size_t, const void *);\n"
1756 "/* 使おうとするフックのプロトタイプ宣言 */\n"
1757 "static void my_init_hook(void);\n"
1758 "static void *my_malloc_hook(size_t, const void *);\n"
1761 #: build/C/man3/malloc_hook.3:98
1764 "/* Variables to save original hooks. */\n"
1765 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1767 "/* 元々のフックを保存するための変数 */\n"
1768 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1771 #: build/C/man3/malloc_hook.3:101
1774 "/* Override initializing hook from the C library. */\n"
1775 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1777 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
1778 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1781 #: build/C/man3/malloc_hook.3:108
1785 "my_init_hook(void)\n"
1787 " old_malloc_hook = __malloc_hook;\n"
1788 " __malloc_hook = my_malloc_hook;\n"
1792 "my_init_hook(void)\n"
1794 " old_malloc_hook = __malloc_hook;\n"
1795 " __malloc_hook = my_malloc_hook;\n"
1799 #: build/C/man3/malloc_hook.3:113
1803 "my_malloc_hook(size_t size, const void *caller)\n"
1808 "my_malloc_hook(size_t size, const void *caller)\n"
1813 #: build/C/man3/malloc_hook.3:116
1816 " /* Restore all old hooks */\n"
1817 " __malloc_hook = old_malloc_hook;\n"
1819 " /* 元々のフックを全て戻す */\n"
1820 " __malloc_hook = old_malloc_hook;\n"
1823 #: build/C/man3/malloc_hook.3:119
1826 " /* Call recursively */\n"
1827 " result = malloc(size);\n"
1829 " /* malloc の再帰的呼び出し */\n"
1830 " result = malloc(size);\n"
1833 #: build/C/man3/malloc_hook.3:122
1836 " /* Save underlying hooks */\n"
1837 " old_malloc_hook = __malloc_hook;\n"
1839 " /* 現在設定されているフック (underlying hook) を保存する */\n"
1840 " old_malloc_hook = __malloc_hook;\n"
1843 #: build/C/man3/malloc_hook.3:126
1846 " /* printf() might call malloc(), so protect it too. */\n"
1847 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1848 " (unsigned int) size, caller, result);\n"
1850 " /* printf() は malloc() を呼び出す可能性があるので\n"
1851 " ここでもガードを行う (元々のフックのままにしておく) */\n"
1852 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1853 " (unsigned int) size, caller, result);\n"
1856 #: build/C/man3/malloc_hook.3:129
1859 " /* Restore our own hooks */\n"
1860 " __malloc_hook = my_malloc_hook;\n"
1862 " /* ユーザが使おうとするフックを再設定する */\n"
1863 " __malloc_hook = my_malloc_hook;\n"
1866 #: build/C/man3/malloc_hook.3:132
1876 #: build/C/man3/malloc_hook.3:137
1877 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1878 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1881 #: build/C/man3/mallopt.3:24
1887 #: build/C/man3/mallopt.3:24
1893 #: build/C/man3/mallopt.3:27
1894 msgid "mallopt - set memory allocation parameters"
1898 #: build/C/man3/mallopt.3:29 build/C/man3/malloc_trim.3:29
1899 #: build/C/man3/malloc_usable_size.3:28
1900 msgid "B<#include E<lt>malloc.hE<gt>>"
1901 msgstr "B<#include E<lt>malloc.hE<gt>>"
1904 #: build/C/man3/mallopt.3:31
1905 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1906 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1909 #: build/C/man3/mallopt.3:42
1911 "The B<mallopt>() function adjusts parameters that control the behavior of "
1912 "the memory-allocation functions (see B<malloc>(3)). The I<param> argument "
1913 "specifies the parameter to be modified, and I<value> specifies the new value "
1914 "for that parameter."
1918 #: build/C/man3/mallopt.3:45
1919 msgid "The following values can be specified for I<param>:"
1920 msgstr "I<param> には以下の値を指定することができる。"
1923 #: build/C/man3/mallopt.3:45
1925 msgid "B<M_CHECK_ACTION>"
1926 msgstr "B<M_CHECK_ACTION>"
1929 #: build/C/man3/mallopt.3:51
1931 "Setting this parameter controls how glibc responds when various kinds of "
1932 "programming errors are detected (e.g., freeing the same pointer twice). The "
1933 "3 least significant bits (2, 1, and 0) of the value assigned to this "
1934 "parameter determine the glibc behavior, as follows:"
1938 #: build/C/man3/mallopt.3:52
1944 #: build/C/man3/mallopt.3:62
1946 "If this bit is set, then print a one-line message on I<stderr> that provides "
1947 "details about the error. The message starts with the string \"***\\ glibc "
1948 "detected\\ ***\", followed by the program name, the name of the memory-"
1949 "allocation function in which the error was detected, a brief description of "
1950 "the error, and the memory address where the error was detected."
1954 #: build/C/man3/mallopt.3:62
1960 #: build/C/man3/mallopt.3:77
1962 "If this bit is set, then, after printing any error message specified by bit "
1963 "0, the program is terminated by calling B<abort>(3). In glibc versions "
1964 "since 2.4, if bit 0 is also set, then, between printing the error message "
1965 "and aborting, the program also prints a stack trace in the manner of "
1966 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
1967 "proc/[pid]/maps> (see B<proc>(5))."
1971 #: build/C/man3/mallopt.3:77
1973 msgid "Bit 2 (since glibc 2.4)"
1974 msgstr "Bit 2 (glibc 2.4 以降)"
1977 #: build/C/man3/mallopt.3:84
1979 "This bit has an effect only if bit 0 is also set. If this bit is set, then "
1980 "the one-line message describing the error is simplified to contain just the "
1981 "name of the function where the error was detected and the brief description "
1986 #: build/C/man3/mallopt.3:89
1987 msgid "The remaining bits in I<value> are ignored."
1991 #: build/C/man3/mallopt.3:93
1993 "Combining the above details, the following numeric values are meaningful for "
1994 "B<M_CHECK_ACTION>:"
1998 #: build/C/man3/mallopt.3:94
2004 #: build/C/man3/mallopt.3:96
2005 msgid "Ignore error conditions; continue execution (with undefined results)."
2009 #: build/C/man3/mallopt.3:96
2015 #: build/C/man3/mallopt.3:98
2016 msgid "Print a detailed error message and continue execution."
2020 #: build/C/man3/mallopt.3:98
2026 #: build/C/man3/mallopt.3:100
2027 msgid "Abort the program."
2031 #: build/C/man3/mallopt.3:100
2037 #: build/C/man3/mallopt.3:103
2039 "Print detailed error message, stack trace, and memory mappings, and abort "
2044 #: build/C/man3/mallopt.3:103
2050 #: build/C/man3/mallopt.3:105
2051 msgid "Print a simple error message and continue execution."
2055 #: build/C/man3/mallopt.3:105
2061 #: build/C/man3/mallopt.3:108
2063 "Print simple error message, stack trace, and memory mappings, and abort the "
2068 #: build/C/man3/mallopt.3:114
2070 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
2071 "3. In glibc version 2.3.3 and earlier, the default value is 1."
2075 #: build/C/man3/mallopt.3:119
2077 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
2078 "crash may happen much later, and the true cause of the problem is then very "
2079 "hard to track down."
2083 #: build/C/man3/mallopt.3:119
2085 msgid "B<M_MMAP_MAX>"
2086 msgstr "B<M_MMAP_MAX>"
2088 #. The following text adapted from comments in the glibc source:
2090 #: build/C/man3/mallopt.3:129
2092 "This parameter specifies the maximum number of allocation requests that may "
2093 "be simultaneously serviced using B<mmap>(2). This parameter exists because "
2094 "some systems have a limited number of internal tables for use by B<mmap>(2), "
2095 "and using more than a few of them may degrade performance."
2099 #: build/C/man3/mallopt.3:136
2101 "The default value is 65,536, a value which has no special significance and "
2102 "which servers only as a safeguard. Setting this parameter to 0 disables the "
2103 "use of B<mmap>(2) for servicing large allocation requests."
2107 #: build/C/man3/mallopt.3:136
2109 msgid "B<M_MMAP_THRESHOLD>"
2110 msgstr "B<M_MMAP_THRESHOLD>"
2113 #: build/C/man3/mallopt.3:145
2115 "For allocations greater than or equal to the limit specified (in bytes) by "
2116 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
2117 "allocation functions employ B<mmap>(2) instead of increasing the program "
2118 "break using B<sbrk>(2)."
2122 #: build/C/man3/mallopt.3:165
2124 "Allocating memory using B<mmap>(2) has the significant advantage that the "
2125 "allocated memory blocks can always be independently released back to the "
2126 "system. (By contrast, the heap can be trimmed only if memory is freed at "
2127 "the top end.) On the other hand, there are some disadvantages to the use of "
2128 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
2129 "later allocations; memory may be wasted because B<mmap>(2) allocations must "
2130 "be page-aligned; and the kernel must perform the expensive task of zeroing "
2131 "out memory allocated via B<mmap>(2). Balancing these factors leads to a "
2132 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
2136 #: build/C/man3/mallopt.3:172
2138 "The lower limit for this parameter is 0. The upper limit is "
2139 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
2140 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
2144 #: build/C/man3/mallopt.3:190
2146 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default. The "
2147 "initial value of the threshold is 128*1024, but when blocks larger than the "
2148 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
2149 "are freed, the threshold is adjusted upwards to the size of the freed "
2150 "block. When dynamic mmap thresholding is in effect, the threshold for "
2151 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
2152 "threshold. Dynamic adjustment of the mmap threshold is disabled if any of "
2153 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
2154 "parameters is set."
2158 #: build/C/man3/mallopt.3:190
2160 msgid "B<M_MXFAST> (since glibc 2.3)"
2161 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
2163 #. The following text adapted from comments in the glibc sources:
2165 #: build/C/man3/mallopt.3:210
2167 "Set the upper limit for memory allocation requests that are satisfied using "
2168 "\"fastbins\". (The measurement unit for this parameter is bytes.) Fastbins "
2169 "are storage areas that hold deallocated blocks of memory of the same size "
2170 "without merging adjacent free blocks. Subsequent reallocation of blocks of "
2171 "the same size can be handled very quickly by allocating from the fastbin, "
2172 "although memory fragmentation and the overall memory footprint of the "
2173 "program can increase. The default value for this parameter is I<64*sizeof"
2174 "(size_t)/4> (i.e., 64 on 32-bit architectures). The range for this "
2175 "parameter is 0 to I<80*sizeof(size_t)/4>. Setting B<M_MXFAST> to 0 disables "
2176 "the use of fastbins."
2180 #: build/C/man3/mallopt.3:210
2182 msgid "B<M_PERTURB> (since glibc 2.4)"
2183 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
2186 #: build/C/man3/mallopt.3:225
2188 "If this parameter is set to a nonzero value, then bytes of allocated memory "
2189 "(other than allocations via B<calloc>(3)) are initialized to the complement "
2190 "of the value in the least significant byte of I<value>, and when allocated "
2191 "memory is released using B<free>(3), the freed bytes are set to the least "
2192 "significant byte of I<value>. This can be useful for detecting errors where "
2193 "programs incorrectly rely on allocated memory being initialized to zero, or "
2194 "reuse values in memory that has already been freed."
2198 #: build/C/man3/mallopt.3:225
2200 msgid "B<M_TOP_PAD>"
2204 #: build/C/man3/mallopt.3:232
2206 "This parameter defines the amount of padding to employ when calling B<sbrk>"
2207 "(2) to modify the program break. (The measurement unit for this parameter "
2208 "is bytes.) This parameter has an effect in the following circumstances:"
2212 #: build/C/man3/mallopt.3:239
2214 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
2215 "the B<sbrk>(2) request."
2219 #: build/C/man3/mallopt.3:245
2221 "When the heap is trimmed as a consequence of calling B<free>(3) (see the "
2222 "discussion of B<M_TRIM_THRESHOLD>) this much free space is preserved at the "
2227 #: build/C/man3/mallopt.3:249
2229 "In either case, the amount of padding is always rounded to a system page "
2234 #: build/C/man3/mallopt.3:256
2236 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
2237 "system calls (when the parameter is set low) and wasting unused memory at "
2238 "the top of the heap (when the parameter is set high)."
2241 #. DEFAULT_TOP_PAD in glibc source
2243 #: build/C/man3/mallopt.3:259
2244 msgid "The default value for this parameter is 128*1024."
2248 #: build/C/man3/mallopt.3:259
2250 msgid "B<M_TRIM_THRESHOLD>"
2254 #: build/C/man3/mallopt.3:275
2256 "When the amount of contiguous free memory at the top of the heap grows "
2257 "sufficiently large, B<free>(3) employs B<sbrk>(2) to release this memory "
2258 "back to the system. (This can be useful in programs that continue to "
2259 "execute for a long period after freeing a significant amount of memory.) "
2260 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
2261 "this block of memory must reach before B<sbrk>(2) is used to trim the heap."
2265 #: build/C/man3/mallopt.3:280
2267 "The default value for this parameter is 128*1024. Setting "
2268 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
2274 #. FIXME Do the arena parameters need to be documented?
2276 #. .BR M_ARENA_TEST " (since glibc 2.10)"
2278 #. .BR M_ARENA_MAX " (since glibc 2.10)"
2279 #. Environment variables
2280 #. MALLOC_ARENA_MAX_
2281 #. MALLOC_ARENA_TEST_
2282 #. http://udrepper.livejournal.com/20948.html describes some details
2283 #. of the MALLOC_ARENA_* environment variables.
2284 #. These macros aren't enabled in production releases until 2.15?
2285 #. (see glibc malloc/Makefile)
2287 #: build/C/man3/mallopt.3:303
2289 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
2290 "of system calls (when the parameter is set low) and wasting unused memory "
2291 "at the top of the heap (when the parameter is set high)."
2295 #: build/C/man3/mallopt.3:303
2297 msgid "Environment Variables"
2301 #: build/C/man3/mallopt.3:318
2303 "A number of environment variables can be defined to modify some of the same "
2304 "parameters as are controlled by B<mallopt>(). Using these variables has the "
2305 "advantage that the source code of the program need not be changed. To be "
2306 "effective, these variables must be defined before the first call to a memory-"
2307 "allocation function. (If the same parameters are adjusted via B<mallopt>() "
2308 "then the B<mallopt>() settings take precedence.) For security reasons, "
2309 "these variables are ignored in set-user-ID and set-group-ID programs."
2313 #: build/C/man3/mallopt.3:321
2315 "The environment variables are as follows (note the trailing underscore at "
2316 "the end of the name of each variable):"
2320 #: build/C/man3/mallopt.3:321
2322 msgid "B<MALLOC_CHECK_>"
2323 msgstr "B<MALLOC_CHECK_>"
2325 #. On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
2326 #. when MALLOC_CHECK_ was set.
2328 #: build/C/man3/mallopt.3:338
2330 "This environment variable controls the same parameter as B<mallopt>() "
2331 "B<M_CHECK_ACTION>. If this variable is set to a nonzero value, then a "
2332 "special implementation of the memory-allocation functions is used. (This is "
2333 "accomplished using the B<malloc_hook>(3) feature.) This implementation "
2334 "performs additional error checking, but is slower than the standard set of "
2335 "memory-allocation functions. (This implementation does not detect all "
2336 "possible errors; memory leaks can still occur.)"
2340 #: build/C/man3/mallopt.3:343
2342 "The value assigned to this environment variable should be a single digit, "
2343 "whose meaning is as described for B<M_CHECK_ACTION>. Any characters beyond "
2344 "the initial digit are ignored."
2348 #: build/C/man3/mallopt.3:352
2350 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
2351 "for set-user-ID and set-group-ID programs. However, if the file I</etc/suid-"
2352 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
2353 "also has an effect for set-user-ID and set-group-ID programs."
2357 #: build/C/man3/mallopt.3:352
2359 msgid "B<MALLOC_MMAP_MAX_>"
2363 #: build/C/man3/mallopt.3:357
2364 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_MAX>."
2368 #: build/C/man3/mallopt.3:357
2370 msgid "B<MALLOC_MMAP_THRESHOLD_>"
2374 #: build/C/man3/mallopt.3:362
2375 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_THRESHOLD>."
2379 #: build/C/man3/mallopt.3:362
2381 msgid "B<MALLOC_PERTURB_>"
2385 #: build/C/man3/mallopt.3:367
2386 msgid "Controls the same parameter as B<mallopt>() B<M_PERTURB>."
2390 #: build/C/man3/mallopt.3:367
2392 msgid "B<MALLOC_TRIM_THRESHOLD_>"
2396 #: build/C/man3/mallopt.3:372
2397 msgid "Controls the same parameter as B<mallopt>() B<M_TRIM_THRESHOLD>."
2401 #: build/C/man3/mallopt.3:372
2403 msgid "B<MALLOC_TOP_PAD_>"
2404 msgstr "B<MALLOC_TOP_PAD_>"
2407 #: build/C/man3/mallopt.3:377
2408 msgid "Controls the same parameter as B<mallopt>() B<M_TOP_PAD>."
2412 #: build/C/man3/mallopt.3:382
2413 msgid "On success, B<mallopt>() returns 1. On error, it returns 0."
2414 msgstr "B<mallopt>() は成功すると 1 を返す。エラーの場合は 0 を返す。"
2417 #. Available already in glibc 2.0, possibly earlier
2419 #: build/C/man3/mallopt.3:390
2420 msgid "On error, I<errno> is I<not> set."
2421 msgstr "エラーの場合、I<errno> は設定I<されない>。"
2425 #: build/C/man3/mallopt.3:404
2427 "This function is not specified by POSIX or the C standards. A similar "
2428 "function exists on many System V derivatives, but the range of values for "
2429 "I<param> varies across systems. The SVID defined options B<M_MXFAST>, "
2430 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
2431 "implemented in glibc."
2435 #: build/C/man3/mallopt.3:408
2436 msgid "Specifying an invalid value for I<param> does not generate an error."
2439 #. FIXME This looks buggy:
2440 #. setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
2441 #. malloc requests are rounded up:
2442 #. (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
2443 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
2445 #: build/C/man3/mallopt.3:416
2447 "A calculation error within the glibc implementation means that a call of the "
2452 #: build/C/man3/mallopt.3:419
2454 msgid " mallopt(M_MXFAST, n)\n"
2457 #. Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
2459 #: build/C/man3/mallopt.3:431
2461 "does not result in fastbins being employed for all allocations of size up to "
2462 "I<n>. To ensure desired results, I<n> should be rounded up to the next "
2463 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
2467 #. FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
2468 #. do have an effect for set-user-ID programs (but not
2469 #. set-group-ID programs).
2470 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
2472 #: build/C/man3/mallopt.3:443
2474 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
2475 "ignored in set-group-ID programs."
2478 #. FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
2480 #: build/C/man3/mallopt.3:464
2482 "If B<mallopt>() is used to set B<M_PERTURB>, then, as expected, the bytes "
2483 "of allocated memory are initialized to the complement of the byte in "
2484 "I<value>, and when that memory is freed, the bytes of the region are "
2485 "initialized to the byte specified in I<value>. However, there is an off-by-"
2486 "I<sizeof(size_t)> error in the implementation: instead of initializing "
2487 "precisely the block of memory being freed by the call I<free(p)>, the block "
2488 "starting at I<p+sizeof(size_t)> is initialized."
2492 #: build/C/man3/mallopt.3:473
2494 "The program below demonstrates the use of B<M_CHECK_ACTION>. If the program "
2495 "is supplied with an (integer) command-line argument, then that argument is "
2496 "used to set the B<M_CHECK_ACTION> parameter. The program then allocates a "
2497 "block of memory, and frees it twice (an error)."
2501 #: build/C/man3/mallopt.3:477
2503 "The following shell session shows what happens when we run this program "
2504 "under glibc, with the default value for B<M_CHECK_ACTION>:"
2508 #: build/C/man3/mallopt.3:496
2512 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
2513 "======= Backtrace: =========\n"
2514 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
2515 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
2516 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
2517 "\\&./a.out[0x80485db]\n"
2518 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
2519 "\\&./a.out[0x8048471]\n"
2520 "======= Memory map: ========\n"
2521 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
2522 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
2523 "[some lines omitted]\n"
2524 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
2525 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
2526 "Aborted (core dumped)\n"
2530 #: build/C/man3/mallopt.3:501
2532 "The following runs show the results when employing other values for "
2533 "B<M_CHECK_ACTION:>"
2537 #: build/C/man3/mallopt.3:514
2540 "$ B<./a.out 1> # Diagnose error and continue\n"
2541 "main(): returned from first free() call\n"
2542 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
2543 "main(): returned from second free() call\n"
2544 "$ B<./a.out 2> # Abort without error message\n"
2545 "main(): returned from first free() call\n"
2546 "Aborted (core dumped)\n"
2547 "$ B<./a.out 0> # Ignore error and continue\n"
2548 "main(): returned from first free() call\n"
2549 "main(): returned from second free() call\n"
2553 #: build/C/man3/mallopt.3:520
2555 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
2556 "environment variable:"
2560 #: build/C/man3/mallopt.3:527
2563 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
2564 "main(): returned from first free() call\n"
2565 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
2566 "main(): returned from second free() call\n"
2570 #: build/C/man3/mallopt.3:529 build/C/man2/mprotect.2:159
2572 msgid "Program source"
2576 #: build/C/man3/mallopt.3:535
2579 "#include E<lt>malloc.hE<gt>\n"
2580 "#include E<lt>stdio.hE<gt>\n"
2581 "#include E<lt>stdlib.hE<gt>\n"
2583 "#include E<lt>malloc.hE<gt>\n"
2584 "#include E<lt>stdio.hE<gt>\n"
2585 "#include E<lt>stdlib.hE<gt>\n"
2588 #: build/C/man3/mallopt.3:540
2592 "main(int argc, char *argv[])\n"
2597 "main(int argc, char *argv[])\n"
2602 #: build/C/man3/mallopt.3:547
2605 " if (argc E<gt> 1) {\n"
2606 " if (argc != 2) {\n"
2607 " fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2608 " exit(EXIT_FAILURE);\n"
2612 " if (argc E<gt> 1) {\n"
2613 " if (argc != 2) {\n"
2614 " fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2615 " exit(EXIT_FAILURE);\n"
2620 #: build/C/man3/mallopt.3:552
2623 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2624 " fprintf(stderr, \"mallopt() failed\");\n"
2625 " exit(EXIT_FAILURE);\n"
2628 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2629 " fprintf(stderr, \"mallopt() failed\");\n"
2630 " exit(EXIT_FAILURE);\n"
2634 #: build/C/man3/mallopt.3:558
2637 " p = malloc(1000);\n"
2638 " if (p == NULL) {\n"
2639 " fprintf(stderr, \"malloc() failed\");\n"
2640 " exit(EXIT_FAILURE);\n"
2643 " p = malloc(1000);\n"
2644 " if (p == NULL) {\n"
2645 " fprintf(stderr, \"malloc() failed\");\n"
2646 " exit(EXIT_FAILURE);\n"
2650 #: build/C/man3/mallopt.3:561
2654 " printf(\"main(): returned from first free() call\\en\");\n"
2658 #: build/C/man3/mallopt.3:564
2662 " printf(\"main(): returned from second free() call\\en\");\n"
2666 #: build/C/man3/mallopt.3:567 build/C/man2/mmap.2:652
2669 " exit(EXIT_SUCCESS);\n"
2672 " exit(EXIT_SUCCESS);\n"
2676 #: build/C/man3/mallopt.3:578
2678 "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
2679 "B<malloc_trim>(3), B<mtrace>(3), B<posix_memalign>(3)"
2681 "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3),\n"
2682 "B<malloc_trim>(3), B<mtrace>(3), B<posix_memalign>(3)"
2685 #: build/C/man2/mlock.2:27
2691 #: build/C/man2/mlock.2:27
2697 #: build/C/man2/mlock.2:30
2698 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
2699 msgstr "mlock - メモリのロックとロック解除を行う"
2702 #: build/C/man2/mlock.2:33 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
2703 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:39
2705 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
2706 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
2709 #: build/C/man2/mlock.2:36
2712 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2713 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2715 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2716 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2719 #: build/C/man2/mlock.2:39
2722 "B<int mlockall(int >I<flags>B<);>\n"
2723 "B<int munlockall(void);>\n"
2725 "B<int mlockall(int >I<flags>B<);>\n"
2726 "B<int munlockall(void);>\n"
2729 #: build/C/man2/mlock.2:55
2731 "B<mlock>() and B<mlockall>() respectively lock part or all of the calling "
2732 "process's virtual address space into RAM, preventing that memory from being "
2733 "paged to the swap area. B<munlock>() and B<munlockall>() perform the "
2734 "converse operation, respectively unlocking part or all of the calling "
2735 "process's virtual address space, so that pages in the specified virtual "
2736 "address range may once more to be swapped out if required by the kernel "
2737 "memory manager. Memory locking and unlocking are performed in units of "
2740 "B<mlock>() と B<mlockall>() はそれぞれ、呼び出し元プロセスの仮想アドレス空"
2741 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
2742 "るのを防ぐ。 B<munlock>() と B<munlockall>() は逆の操作で、それぞれ呼び出し"
2743 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
2744 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
2745 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
2749 #: build/C/man2/mlock.2:55
2751 msgid "mlock() and munlock()"
2752 msgstr "mlock() と munlock()"
2755 #: build/C/man2/mlock.2:65
2757 "B<mlock>() locks pages in the address range starting at I<addr> and "
2758 "continuing for I<len> bytes. All pages that contain a part of the specified "
2759 "address range are guaranteed to be resident in RAM when the call returns "
2760 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
2762 "B<mlock>() は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
2763 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
2764 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
2765 "れるまで RAM に残り続けることが保証される。"
2768 #: build/C/man2/mlock.2:74
2770 "B<munlock>() unlocks pages in the address range starting at I<addr> and "
2771 "continuing for I<len> bytes. After this call, all pages that contain a part "
2772 "of the specified memory range can be moved to external swap space again by "
2775 "B<munlock>() は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
2776 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
2777 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
2780 #: build/C/man2/mlock.2:74
2782 msgid "mlockall() and munlockall()"
2783 msgstr "mlockall() と munlockall()"
2786 #: build/C/man2/mlock.2:84
2788 "B<mlockall>() locks all pages mapped into the address space of the calling "
2789 "process. This includes the pages of the code, data and stack segment, as "
2790 "well as shared libraries, user space kernel data, shared memory, and memory-"
2791 "mapped files. All mapped pages are guaranteed to be resident in RAM when "
2792 "the call returns successfully; the pages are guaranteed to stay in RAM until "
2795 "B<mlockall>() は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
2796 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
2797 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
2798 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
2799 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
2803 #: build/C/man2/mlock.2:89
2805 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
2806 "following constants:"
2807 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
2810 #: build/C/man2/mlock.2:89
2812 msgid "B<MCL_CURRENT>"
2813 msgstr "B<MCL_CURRENT>"
2816 #: build/C/man2/mlock.2:93
2818 "Lock all pages which are currently mapped into the address space of the "
2821 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
2824 #: build/C/man2/mlock.2:93
2826 msgid "B<MCL_FUTURE>"
2827 msgstr "B<MCL_FUTURE>"
2830 #: build/C/man2/mlock.2:100
2832 "Lock all pages which will become mapped into the address space of the "
2833 "process in the future. These could be for instance new pages required by a "
2834 "growing heap and stack as well as new memory mapped files or shared memory "
2837 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
2838 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
2839 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
2842 #: build/C/man2/mlock.2:113
2844 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
2845 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
2846 "locked bytes to exceed the permitted maximum (see below). In the same "
2847 "circumstances, stack growth may likewise fail: the kernel will deny stack "
2848 "expansion and deliver a B<SIGSEGV> signal to the process."
2850 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
2851 "B<sbrk>(2), B<malloc>(3)) は、ロックするバイト数が許可された最大値 (下記参"
2852 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
2853 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
2857 #: build/C/man2/mlock.2:117
2859 "B<munlockall>() unlocks all pages mapped into the address space of the "
2862 "B<munlockall>() は、呼び出し元プロセスのアドレス空間にマッピングされている "
2866 #: build/C/man2/mlock.2:123
2868 "On success these system calls return 0. On error, -1 is returned, I<errno> "
2869 "is set appropriately, and no changes are made to any locks in the address "
2870 "space of the process."
2872 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
2873 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
2877 #: build/C/man2/mlock.2:132
2879 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
2880 "resource limit, but tried to lock more memory than the limit permitted. "
2881 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
2883 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
2884 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
2885 "スが特権 (B<CAP_IPC_LOCK>) を持っている場合は適用されない。"
2887 #. In the case of mlock(), this check is somewhat buggy: it doesn't
2888 #. take into account whether the to-be-locked range overlaps with
2889 #. already locked pages. Thus, suppose we allocate
2890 #. (num_physpages / 4 + 1) of memory, and lock those pages once using
2891 #. mlock(), and then lock the *same* page range a second time.
2892 #. In the case, the second mlock() call will fail, since the check
2893 #. calculates that the process is trying to lock (num_physpages / 2 + 2)
2894 #. pages, which of course is not true. (MTK, Nov 04, kernel 2.4.28)
2896 #: build/C/man2/mlock.2:144
2898 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
2901 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
2903 #. SVr4 documents an additional EAGAIN error code.
2905 #: build/C/man2/mlock.2:150
2907 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>) to "
2908 "perform the requested operation."
2910 "呼び出し側が特権を持っていないが、\n"
2911 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
2914 #: build/C/man2/mlock.2:155
2915 msgid "For B<mlock>() and B<munlock>():"
2916 msgstr "B<mlock>() と B<munlock>() 用として:"
2919 #: build/C/man2/mlock.2:158
2920 msgid "Some or all of the specified address range could not be locked."
2921 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
2924 #: build/C/man2/mlock.2:165
2926 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
2927 "addition may have resulted in an overflow)."
2929 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
2930 "(例えば、加算でオーバーフローが発生したなど)。"
2933 #: build/C/man2/mlock.2:170
2934 msgid "(Not on Linux) I<addr> was not a multiple of the page size."
2936 "(Linux ではこの意味で使われない) I<addr> がページサイズの倍数ではない。"
2939 #: build/C/man2/mlock.2:174
2941 "Some of the specified address range does not correspond to mapped pages in "
2942 "the address space of the process."
2944 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
2948 #: build/C/man2/mlock.2:177
2949 msgid "For B<mlockall>():"
2950 msgstr "B<mlockall>() 用として:"
2953 #: build/C/man2/mlock.2:180
2954 msgid "Unknown I<flags> were specified."
2955 msgstr "未知の I<flags> が指定された。"
2958 #: build/C/man2/mlock.2:183
2959 msgid "For B<munlockall>():"
2960 msgstr "B<munlockall>() 用として:"
2963 #: build/C/man2/mlock.2:187
2965 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
2967 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>) を持っていない。"
2970 #: build/C/man2/mlock.2:189
2971 msgid "POSIX.1-2001, SVr4."
2972 msgstr "POSIX.1-2001, SVr4."
2975 #: build/C/man2/mlock.2:189 build/C/man2/mmap.2:487 build/C/man2/msync.2:105
2977 msgid "AVAILABILITY"
2981 #: build/C/man2/mlock.2:201
2983 "On POSIX systems on which B<mlock>() and B<munlock>() are available, "
2984 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
2985 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
2986 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
2988 "B<mlock>() と B<munlock>() が使用可能な POSIX システムでは "
2989 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
2990 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
2991 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
2994 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
2995 #. -1: unavailable, 0: ask using sysconf().
2996 #. glibc defines it to 1.
2998 #: build/C/man2/mlock.2:214
3000 "On POSIX systems on which B<mlockall>() and B<munlockall>() are available, "
3001 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
3002 "than 0. (See also B<sysconf>(3).)"
3004 "B<mlockall>() と B<munlockall>() が利用可能な POSIX システムでは、 "
3005 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
3006 "(B<sysconf>(3) も参照のこと)。"
3009 #: build/C/man2/mlock.2:232
3011 "Memory locking has two main applications: real-time algorithms and high-"
3012 "security data processing. Real-time applications require deterministic "
3013 "timing, and, like scheduling, paging is one major cause of unexpected "
3014 "program execution delays. Real-time applications will usually also switch "
3015 "to a real-time scheduler with B<sched_setscheduler>(2). Cryptographic "
3016 "security software often handles critical bytes like passwords or secret keys "
3017 "as data structures. As a result of paging, these secrets could be "
3018 "transferred onto a persistent swap store medium, where they might be "
3019 "accessible to the enemy long after the security software has erased the "
3020 "secrets in RAM and terminated. (But be aware that the suspend mode on "
3021 "laptops and some desktop computers will save a copy of the system's RAM to "
3022 "disk, regardless of memory locks.)"
3024 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
3025 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
3026 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
3027 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
3028 "いは B<sched_setscheduler>(2) でリアルタイムスケジューラに変更される。 暗号"
3029 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
3030 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
3031 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
3032 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
3033 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
3034 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
3038 #: build/C/man2/mlock.2:245
3040 "Real-time processes that are using B<mlockall>() to prevent delays on page "
3041 "faults should reserve enough locked stack pages before entering the time-"
3042 "critical section, so that no page fault can be caused by function calls. "
3043 "This can be achieved by calling a function that allocates a sufficiently "
3044 "large automatic variable (an array) and writes to the memory occupied by "
3045 "this array in order to touch these stack pages. This way, enough pages will "
3046 "be mapped for the stack and can be locked into RAM. The dummy writes ensure "
3047 "that not even copy-on-write page faults can occur in the critical section."
3049 "リアルタイムプロセスが B<mlockall>() を使ってページフォールトによる遅延を防"
3050 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
3051 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
3052 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
3053 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
3054 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
3055 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
3056 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
3057 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
3060 #: build/C/man2/mlock.2:251
3062 "Memory locks are not inherited by a child created via B<fork>(2) and are "
3063 "automatically removed (unlocked) during an B<execve>(2) or when the process "
3066 "メモリロックは B<fork>(2) で作成された子プロセスには継承されず、 B<execve>"
3067 "(2) が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
3071 #: build/C/man2/mlock.2:255
3073 "The memory lock on an address range is automatically removed if the address "
3074 "range is unmapped via B<munmap>(2)."
3076 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2) に"
3077 "よってアンマップされた場合は削除される。"
3080 #: build/C/man2/mlock.2:268
3082 "Memory locks do not stack, that is, pages which have been locked several "
3083 "times by calls to B<mlock>() or B<mlockall>() will be unlocked by a single "
3084 "call to B<munlock>() for the corresponding range or by B<munlockall>(). "
3085 "Pages which are mapped to several locations or by several processes stay "
3086 "locked into RAM as long as they are locked at least at one location or by at "
3087 "least one process."
3089 "メモリのロックは累積しない。 すなわち複数回 B<mlock>() や B<mlockall>() を"
3090 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>() を 1 回"
3091 "呼び出したり B<munlockall>() を呼び出したりするだけでロック解除される。 複数"
3092 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
3093 "のプロセスでロックされている限りは RAM に残り続ける。"
3096 #: build/C/man2/mlock.2:279
3098 "Under Linux, B<mlock>() and B<munlock>() automatically round I<addr> down "
3099 "to the nearest page boundary. However, POSIX.1-2001 allows an "
3100 "implementation to require that I<addr> is page aligned, so portable "
3101 "applications should ensure this."
3103 "Linux では、 B<mlock>() と B<munlock>() は自動的に I<addr> を端数切り捨てに"
3104 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
3105 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
3106 "ケーションではきちんと境界に合わせた方が良い。"
3109 #: build/C/man2/mlock.2:292
3111 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
3112 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
3113 "(), B<mlockall>(), and B<mmap>(2) B<MAP_LOCKED>."
3115 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
3116 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
3117 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
3121 #: build/C/man2/mlock.2:292
3123 msgid "Limits and permissions"
3127 #: build/C/man2/mlock.2:299
3129 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>) "
3130 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
3131 "defines a limit on how much memory the process may lock."
3133 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>) が必"
3134 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
3138 #: build/C/man2/mlock.2:305
3140 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
3141 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
3142 "instead defines a limit on how much memory an unprivileged process may lock."
3144 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
3145 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
3149 #: build/C/man2/mlock.2:313
3151 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
3152 "B<mlockall>() B<MCL_FUTURE> flag to be inherited across a B<fork>(2). This "
3153 "was rectified in kernel 2.4.18."
3155 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>() "
3156 "B<MCL_FUTURE> フラグが B<fork>(2) で継承されると言うバグがある。 これはカー"
3159 #. See the following LKML thread:
3160 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
3161 #. "Rationale for RLIMIT_MEMLOCK"
3164 #: build/C/man2/mlock.2:330
3166 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
3167 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
3168 "example, setting its effective UID to a nonzero value), then subsequent "
3169 "memory allocations (e.g., B<mmap>(2), B<brk>(2)) will fail if the "
3170 "B<RLIMIT_MEMLOCK> resource limit is encountered."
3172 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
3173 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
3174 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
3175 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
3179 #: build/C/man2/mlock.2:336
3181 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
3182 "B<capabilities>(7)"
3184 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
3185 "B<capabilities>(7)"
3188 #: build/C/man2/mmap.2:40
3194 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
3200 #: build/C/man2/mmap.2:43
3201 msgid "mmap, munmap - map or unmap files or devices into memory"
3202 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
3205 #: build/C/man2/mmap.2:51
3208 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3209 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
3210 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3212 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3213 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
3214 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3217 #: build/C/man2/mmap.2:61
3219 "B<mmap>() creates a new mapping in the virtual address space of the calling "
3220 "process. The starting address for the new mapping is specified in I<addr>. "
3221 "The I<length> argument specifies the length of the mapping."
3223 "B<mmap>() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
3224 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
3225 "は I<length> 引き数で指定される。"
3227 #. Before Linux 2.6.24, the address was rounded up to the next page
3228 #. boundary; since 2.6.24, it is rounded down!
3230 #: build/C/man2/mmap.2:75
3232 "If I<addr> is NULL, then the kernel chooses the address at which to create "
3233 "the mapping; this is the most portable method of creating a new mapping. If "
3234 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
3235 "the mapping; on Linux, the mapping will be created at a nearby page "
3236 "boundary. The address of the new mapping is returned as the result of the "
3239 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
3240 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
3241 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
3242 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
3243 "ングのアドレスは、呼び出しの返り値として返される。"
3246 #: build/C/man2/mmap.2:87
3248 "The contents of a file mapping (as opposed to an anonymous mapping; see "
3249 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
3250 "offset I<offset> in the file (or other object) referred to by the file "
3251 "descriptor I<fd>. I<offset> must be a multiple of the page size as returned "
3252 "by I<sysconf(_SC_PAGE_SIZE)>."
3254 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
3255 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
3256 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
3257 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
3258 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
3261 #: build/C/man2/mmap.2:95
3263 "The I<prot> argument describes the desired memory protection of the mapping "
3264 "(and must not conflict with the open mode of the file). It is either "
3265 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
3267 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
3268 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
3269 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
3272 #: build/C/man2/mmap.2:95 build/C/man2/mprotect.2:67
3274 msgid "B<PROT_EXEC>"
3275 msgstr "B<PROT_EXEC>"
3278 #: build/C/man2/mmap.2:98
3279 msgid "Pages may be executed."
3280 msgstr "ページは実行可能である。"
3283 #: build/C/man2/mmap.2:98 build/C/man2/mprotect.2:61
3285 msgid "B<PROT_READ>"
3286 msgstr "B<PROT_READ>"
3289 #: build/C/man2/mmap.2:101
3290 msgid "Pages may be read."
3291 msgstr "ページは読み込み可能である。"
3294 #: build/C/man2/mmap.2:101 build/C/man2/mprotect.2:64
3296 msgid "B<PROT_WRITE>"
3297 msgstr "B<PROT_WRITE>"
3300 #: build/C/man2/mmap.2:104
3301 msgid "Pages may be written."
3302 msgstr "ページに書き込み可能である。"
3305 #: build/C/man2/mmap.2:104 build/C/man2/mprotect.2:58
3307 msgid "B<PROT_NONE>"
3308 msgstr "B<PROT_NONE>"
3311 #: build/C/man2/mmap.2:107
3312 msgid "Pages may not be accessed."
3313 msgstr "ページにはアクセスできない。"
3316 #: build/C/man2/mmap.2:116
3318 "The I<flags> argument determines whether updates to the mapping are visible "
3319 "to other processes mapping the same region, and whether updates are carried "
3320 "through to the underlying file. This behavior is determined by including "
3321 "exactly one of the following values in I<flags>:"
3323 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
3324 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
3325 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
3326 "I<flags> に含めることで指定する。"
3329 #: build/C/man2/mmap.2:116
3331 msgid "B<MAP_SHARED>"
3332 msgstr "B<MAP_SHARED>"
3335 #: build/C/man2/mmap.2:126
3337 "Share this mapping. Updates to the mapping are visible to other processes "
3338 "that map this file, and are carried through to the underlying file. The "
3339 "file may not actually be updated until B<msync>(2) or B<munmap>() is "
3342 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
3343 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
3344 "る。 ただし、ファイルの実際の更新は B<msync>(2) または B<munmap>() が呼ばれ"
3348 #: build/C/man2/mmap.2:126
3350 msgid "B<MAP_PRIVATE>"
3351 msgstr "B<MAP_PRIVATE>"
3354 #: build/C/man2/mmap.2:135
3356 "Create a private copy-on-write mapping. Updates to the mapping are not "
3357 "visible to other processes mapping the same file, and are not carried "
3358 "through to the underlying file. It is unspecified whether changes made to "
3359 "the file after the B<mmap>() call are visible in the mapped region."
3361 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
3362 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
3363 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>() の呼び出し後"
3364 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
3368 #: build/C/man2/mmap.2:137
3369 msgid "Both of these flags are described in POSIX.1-2001."
3370 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
3373 #: build/C/man2/mmap.2:140
3375 "In addition, zero or more of the following values can be ORed in I<flags>:"
3377 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
3381 #: build/C/man2/mmap.2:140
3383 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
3384 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
3386 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3388 #: build/C/man2/mmap.2:156
3390 "Put the mapping into the first 2 Gigabytes of the process address space. "
3391 "This flag is only supported on x86-64, for 64-bit programs. It was added to "
3392 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
3393 "as to improve context-switch performance on some early 64-bit processors. "
3394 "Modern x86-64 processors no longer have this performance problem, so use of "
3395 "this flag is not required on those systems. The B<MAP_32BIT> flag is "
3396 "ignored when B<MAP_FIXED> is set."
3398 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
3399 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
3400 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
3401 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
3402 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
3403 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
3404 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
3408 #: build/C/man2/mmap.2:156
3411 msgstr "B<MAP_ANON>"
3414 #: build/C/man2/mmap.2:161
3415 msgid "Synonym for B<MAP_ANONYMOUS>. Deprecated."
3416 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
3419 #: build/C/man2/mmap.2:161
3421 msgid "B<MAP_ANONYMOUS>"
3422 msgstr "B<MAP_ANONYMOUS>"
3425 #: build/C/man2/mmap.2:183
3427 "The mapping is not backed by any file; its contents are initialized to "
3428 "zero. The I<fd> and I<offset> arguments are ignored; however, some "
3429 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>) "
3430 "is specified, and portable applications should ensure this. The use of "
3431 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
3432 "Linux since kernel 2.4."
3434 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
3435 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
3436 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>) が指定された場合、 I<fd> を -1 にす"
3437 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
3438 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
3439 "以降の Linux でのみサポートされている。"
3442 #: build/C/man2/mmap.2:183
3444 msgid "B<MAP_DENYWRITE>"
3445 msgstr "B<MAP_DENYWRITE>"
3447 #. Introduced in 1.1.36, removed in 1.3.24.
3449 #: build/C/man2/mmap.2:191
3451 "This flag is ignored. (Long ago, it signaled that attempts to write to the "
3452 "underlying file should fail with B<ETXTBUSY>. But this was a source of "
3453 "denial-of-service attacks.)"
3455 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
3456 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
3457 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
3460 #: build/C/man2/mmap.2:191
3462 msgid "B<MAP_EXECUTABLE>"
3463 msgstr "B<MAP_EXECUTABLE>"
3465 #. Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
3466 #. (Long ago, it signaled that the underlying file is an executable.
3467 #. However, that information was not really used anywhere.)
3468 #. Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
3471 #: build/C/man2/mmap.2:199
3472 msgid "This flag is ignored."
3473 msgstr "このフラグは無視される。"
3476 #: build/C/man2/mmap.2:199
3479 msgstr "B<MAP_FILE>"
3481 #. On some systems, this was required as the opposite of
3482 #. MAP_ANONYMOUS -- mtk, 1 May 2007
3484 #: build/C/man2/mmap.2:205
3485 msgid "Compatibility flag. Ignored."
3486 msgstr "互換性のためのフラグ。無視される。"
3489 #: build/C/man2/mmap.2:205
3491 msgid "B<MAP_FIXED>"
3492 msgstr "B<MAP_FIXED>"
3495 #: build/C/man2/mmap.2:223
3497 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
3498 "address. I<addr> must be a multiple of the page size. If the memory region "
3499 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
3500 "then the overlapped part of the existing mapping(s) will be discarded. If "
3501 "the specified address cannot be used, B<mmap>() will fail. Because "
3502 "requiring a fixed address for a mapping is less portable, the use of this "
3503 "option is discouraged."
3505 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
3506 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
3507 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
3508 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
3509 "れたアドレスが使用できない場合、 B<mmap>() は失敗する。 マッピングに対して固"
3510 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
3514 #: build/C/man2/mmap.2:223
3516 msgid "B<MAP_GROWSDOWN>"
3517 msgstr "B<MAP_GROWSDOWN>"
3520 #: build/C/man2/mmap.2:228
3522 "Used for stacks. Indicates to the kernel virtual memory system that the "
3523 "mapping should extend downward in memory."
3525 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
3526 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
3527 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
3530 #: build/C/man2/mmap.2:228
3532 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
3533 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
3536 #: build/C/man2/mmap.2:234
3538 "Allocate the mapping using \"huge pages.\" See the kernel source file "
3539 "I<Documentation/vm/hugetlbpage.txt> for further information."
3541 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
3542 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
3545 #: build/C/man2/mmap.2:234
3547 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
3548 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
3550 #. If set, the mapped pages will not be swapped out.
3552 #: build/C/man2/mmap.2:240
3554 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
3555 "(2). This flag is ignored in older kernels."
3557 "マップされた領域のページを B<mlock>(2) の方法でメモリ内にロックする。 それ以"
3558 "前のカーネルでは、このフラグは無視される。"
3561 #: build/C/man2/mmap.2:240
3563 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
3564 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
3567 #: build/C/man2/mmap.2:255
3569 "Only meaningful in conjunction with B<MAP_POPULATE>. Don't perform read-"
3570 "ahead: only create page tables entries for pages that are already present in "
3571 "RAM. Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing. "
3572 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
3575 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
3576 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
3577 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
3578 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
3579 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
3582 #: build/C/man2/mmap.2:255
3584 msgid "B<MAP_NORESERVE>"
3585 msgstr "B<MAP_NORESERVE>"
3588 #: build/C/man2/mmap.2:270
3590 "Do not reserve swap space for this mapping. When swap space is reserved, "
3591 "one has the guarantee that it is possible to modify the mapping. When swap "
3592 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
3593 "memory is available. See also the discussion of the file I</proc/sys/vm/"
3594 "overcommit_memory> in B<proc>(5). In kernels before 2.6, this flag only had "
3595 "effect for private writable mappings."
3597 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
3598 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
3599 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
3600 "る。 B<proc>(5) の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
3601 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
3602 "イベート・マッピングについてのみ効果があった。"
3605 #: build/C/man2/mmap.2:270
3607 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
3608 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
3611 #: build/C/man2/mmap.2:277
3613 "Populate (prefault) page tables for a mapping. For a file mapping, this "
3614 "causes read-ahead on the file. Later accesses to the mapping will not be "
3615 "blocked by page faults. B<MAP_POPULATE> is only supported for private "
3616 "mappings since Linux 2.6.23."
3618 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
3619 "は、これによりファイルが先読み (read-ahead) が行われる。この以後は、マッピン"
3620 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
3621 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
3625 #: build/C/man2/mmap.2:277
3627 msgid "B<MAP_STACK> (since Linux 2.6.27)"
3628 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
3630 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3631 #. commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
3632 #. http://thread.gmane.org/gmane.linux.kernel/720412
3633 #. "pthread_create() slow for many threads; also time to revisit 64b
3634 #. context switch optimization?"
3636 #: build/C/man2/mmap.2:290
3638 "Allocate the mapping at an address suitable for a process or thread stack. "
3639 "This flag is currently a no-op, but is used in the glibc threading "
3640 "implementation so that if some architectures require special treatment for "
3641 "stack allocations, support can later be transparently implemented for glibc."
3643 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
3644 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
3645 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
3646 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
3650 #: build/C/man2/mmap.2:290
3652 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
3653 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
3656 #: build/C/man2/mmap.2:300
3658 "Don't clear anonymous pages. This flag is intended to improve performance "
3659 "on embedded devices. This flag is only honored if the kernel was configured "
3660 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option. Because of the security "
3661 "implications, that option is normally enabled only on embedded devices (i."
3662 "e., devices where one has complete control of the contents of user memory)."
3664 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイス\n"
3665 "での性能向上を目的に作られてものである。カーネルの設定で\n"
3666 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
3668 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
3669 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
3672 #: build/C/man2/mmap.2:308
3674 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001. "
3675 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
3678 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
3679 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
3680 "B<MAP_ANON>) もサポートされている。"
3683 #: build/C/man2/mmap.2:315
3685 "Some systems document the additional flags B<MAP_AUTOGROW>, "
3686 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
3688 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
3689 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
3692 #: build/C/man2/mmap.2:321
3694 "Memory mapped by B<mmap>() is preserved across B<fork>(2), with the same "
3697 "B<mmap>() によってマップされたメモリの属性は B<fork>(2) の際に継承される。"
3700 #: build/C/man2/mmap.2:329
3702 "A file is mapped in multiples of the page size. For a file that is not a "
3703 "multiple of the page size, the remaining memory is zeroed when mapped, and "
3704 "writes to that region are not written out to the file. The effect of "
3705 "changing the size of the underlying file of a mapping on the pages that "
3706 "correspond to added or removed regions of the file is unspecified."
3708 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
3709 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
3710 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
3711 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
3712 "マップされたページに対してどのような影響があるかは規定されていない。"
3715 #: build/C/man2/mmap.2:329
3721 #: build/C/man2/mmap.2:339
3723 "The B<munmap>() system call deletes the mappings for the specified address "
3724 "range, and causes further references to addresses within the range to "
3725 "generate invalid memory references. The region is also automatically "
3726 "unmapped when the process is terminated. On the other hand, closing the "
3727 "file descriptor does not unmap the region."
3729 "システムコール B<munmap>() は指定されたアドレス範囲のマップを消去し、 これ以"
3730 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
3731 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
3735 #: build/C/man2/mmap.2:349
3737 "The address I<addr> must be a multiple of the page size. All pages "
3738 "containing a part of the indicated range are unmapped, and subsequent "
3739 "references to these pages will generate B<SIGSEGV>. It is not an error if "
3740 "the indicated range does not contain any mapped pages."
3742 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
3743 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
3744 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
3745 "ていない場合でも エラーにならない。"
3748 #: build/C/man2/mmap.2:349
3750 msgid "Timestamps changes for file-backed mappings"
3751 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
3754 #: build/C/man2/mmap.2:356
3756 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
3757 "updated at any time between the B<mmap>() and the corresponding unmapping; "
3758 "the first reference to a mapped page will update the field if it has not "
3761 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
3762 "I<st_atime> フィールドは、 B<mmap>() されてからアンマップ (unmap) されるまで"
3763 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
3764 "ページへの最初の参照があった 際に更新される。"
3767 #: build/C/man2/mmap.2:373
3769 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
3770 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
3771 "before a subsequent B<msync>(2) with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
3774 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
3775 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
3776 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
3777 "B<msync>(2) が呼ばれる前までに更新される。"
3780 #: build/C/man2/mmap.2:390
3782 "On success, B<mmap>() returns a pointer to the mapped area. On error, the "
3783 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, and I<errno> "
3784 "is set appropriately. On success, B<munmap>() returns 0, on failure -1, "
3785 "and I<errno> is set (probably to B<EINVAL>)."
3787 "B<mmap>() は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
3788 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>) を返し、 I<errno> がエラーの内容に"
3789 "したがってセットされる。 B<munmap>() は成功すると 0 を返す。失敗すると -1 を"
3790 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
3793 #: build/C/man2/mmap.2:391 build/C/man2/mprotect.2:80
3794 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
3795 #: build/C/man2/shmctl.2:295 build/C/man2/shmget.2:186
3796 #: build/C/man2/shmop.2:189
3802 #: build/C/man2/mmap.2:411
3804 "A file descriptor refers to a non-regular file. Or B<MAP_PRIVATE> was "
3805 "requested, but I<fd> is not open for reading. Or B<MAP_SHARED> was "
3806 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
3807 "(B<O_RDWR>) mode. Or B<PROT_WRITE> is set, but the file is append-only."
3809 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
3810 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
3811 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
3812 "書きモード (B<O_RDWR>) でオープンされていない、 B<PROT_WRITE> をセットした"
3813 "が、ファイルは追加 (append) 専用である。"
3816 #: build/C/man2/mmap.2:415
3818 "The file has been locked, or too much memory has been locked (see "
3821 "ファイルがロックされている。またはロックされているメモリが多すぎる "
3822 "(B<setrlimit>(2) を参照)。"
3825 #: build/C/man2/mmap.2:421
3827 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
3829 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
3830 "B<MAP_ANONYMOUS> がセットされていない)。"
3833 #: build/C/man2/mmap.2:429
3835 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
3836 "not aligned on a page boundary)."
3838 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
3839 "ジ境界にアラインメントされていない)。"
3842 #: build/C/man2/mmap.2:434
3843 msgid "(since Linux 2.6.12) I<length> was 0."
3844 msgstr "(Linux 2.6.12 以降) I<length> が 0 であった。"
3847 #: build/C/man2/mmap.2:442
3849 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
3850 "both of these values."
3852 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
3856 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:227
3857 #: build/C/man2/shmget.2:202
3862 #. [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
3864 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:206
3865 msgid "The system limit on the total number of open files has been reached."
3866 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
3869 #: build/C/man2/mmap.2:454
3871 "The underlying file system of the specified file does not support memory "
3874 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
3878 #: build/C/man2/mmap.2:458
3880 "No memory is available, or the process's maximum number of mappings would "
3881 "have been exceeded."
3883 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
3885 #. (Since 2.4.25 / 2.6.0.)
3887 #: build/C/man2/mmap.2:467
3889 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
3890 "file on a file system that was mounted no-exec."
3892 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
3893 "トされたファイルシステム上のファイルに マップ領域が対応している。"
3896 #: build/C/man2/mmap.2:467
3902 #: build/C/man2/mmap.2:473
3904 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
3907 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
3911 #: build/C/man2/mmap.2:475
3912 msgid "Use of a mapped region can result in these signals:"
3913 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
3916 #: build/C/man2/mmap.2:475
3922 #: build/C/man2/mmap.2:478
3923 msgid "Attempted write into a region mapped as read-only."
3924 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
3927 #: build/C/man2/mmap.2:478
3933 #: build/C/man2/mmap.2:483
3935 "Attempted access to a portion of the buffer that does not correspond to the "
3936 "file (for example, beyond the end of the file, including the case where "
3937 "another process has truncated the file)."
3939 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
3940 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる) "
3943 #. SVr4 documents additional error codes ENXIO and ENODEV.
3944 #. SUSv2 documents additional error codes EMFILE and EOVERFLOW.
3946 #: build/C/man2/mmap.2:487
3947 msgid "SVr4, 4.4BSD, POSIX.1-2001."
3948 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
3950 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
3951 #. -1: unavailable, 0: ask using sysconf().
3952 #. glibc defines it to 1.
3954 #: build/C/man2/mmap.2:501
3956 "On POSIX systems on which B<mmap>(), B<msync>(2) and B<munmap>() are "
3957 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
3958 "value greater than 0. (See also B<sysconf>(3).)"
3960 "B<mmap>(), B<msync>(2) B<munmap>() が利用可能な POSIX システムでは、 "
3961 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
3962 "(B<sysconf>(3) も参照のこと)。"
3964 #. Since around glibc 2.1/2.2, depending on the platform.
3966 #: build/C/man2/mmap.2:516
3968 "This page describes the interface provided by the glibc B<mmap>() wrapper "
3969 "function. Originally, this function invoked a system call of the same "
3970 "name. Since kernel 2.4, that system call has been superseded by B<mmap2>"
3971 "(2), and nowadays the glibc B<mmap>() wrapper function invokes B<mmap2>(2) "
3972 "with a suitably adjusted value for I<offset>."
3974 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェースに\n"
3975 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動していた。\n"
3976 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
3977 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
3978 "B<mmap2>(2) を起動する。"
3981 #: build/C/man2/mmap.2:529
3983 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
3984 "B<PROT_READ>. It is architecture dependent whether B<PROT_READ> implies "
3985 "B<PROT_EXEC> or not. Portable programs should always set B<PROT_EXEC> if "
3986 "they intend to execute code in the new mapping."
3988 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
3989 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
3990 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
3991 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
3992 "常に B<PROT_EXEC> をセットすべきである。"
3995 #: build/C/man2/mmap.2:544
3997 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
3998 "omit B<MAP_FIXED> from I<flags>. In this case, the system chooses the "
3999 "address for the mapping; the address is chosen so as not to conflict with "
4000 "any existing mapping, and will not be 0. If the B<MAP_FIXED> flag is "
4001 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
4003 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
4004 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
4005 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
4006 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
4007 "I<addr> が 0 (NULL) の場合には、マップされるアドレスが 0 (NULL) になる。"
4010 #: build/C/man2/mmap.2:549
4012 "On Linux there are no guarantees like those suggested above under "
4013 "B<MAP_NORESERVE>. By default, any process can be killed at any moment when "
4014 "the system runs out of memory."
4016 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
4017 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
4021 #: build/C/man2/mmap.2:556
4023 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
4024 "is specified as B<PROT_NONE>."
4026 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
4027 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
4030 #: build/C/man2/mmap.2:571
4032 "SUSv3 specifies that B<mmap>() should fail if I<length> is 0. However, in "
4033 "kernels before 2.6.12, B<mmap>() succeeded in this case: no mapping was "
4034 "created and the call returned I<addr>. Since kernel 2.6.12, B<mmap>() "
4035 "fails with the error B<EINVAL> for this case."
4037 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>() は失敗すると規定されている。"
4038 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>() は成功して"
4039 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
4040 "では、 B<mmap>() はエラー B<EINVAL> で失敗する。"
4043 #: build/C/man2/mmap.2:583
4045 "The following program prints part of the file specified in its first command-"
4046 "line argument to standard output. The range of bytes to be printed is "
4047 "specified via offset and length values in the second and third command-line "
4048 "arguments. The program creates a memory mapping of the required pages of "
4049 "the file and then uses B<write>(2) to output the desired bytes."
4051 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
4052 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
4053 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
4054 "必要なページのメモリ・ マッピングを作成し、 B<write>(2) を使って所望のバイト"
4058 #: build/C/man2/mmap.2:591
4061 "#include E<lt>sys/mman.hE<gt>\n"
4062 "#include E<lt>sys/stat.hE<gt>\n"
4063 "#include E<lt>fcntl.hE<gt>\n"
4064 "#include E<lt>stdio.hE<gt>\n"
4065 "#include E<lt>stdlib.hE<gt>\n"
4066 "#include E<lt>unistd.hE<gt>\n"
4068 "#include E<lt>sys/mman.hE<gt>\n"
4069 "#include E<lt>sys/stat.hE<gt>\n"
4070 "#include E<lt>fcntl.hE<gt>\n"
4071 "#include E<lt>stdio.hE<gt>\n"
4072 "#include E<lt>stdlib.hE<gt>\n"
4073 "#include E<lt>unistd.hE<gt>\n"
4076 #: build/C/man2/mmap.2:594 build/C/man2/mprotect.2:172
4079 "#define handle_error(msg) \\e\n"
4080 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4082 "#define handle_error(msg) \\e\n"
4083 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4086 #: build/C/man2/mmap.2:604
4090 "main(int argc, char *argv[])\n"
4094 " struct stat sb;\n"
4095 " off_t offset, pa_offset;\n"
4100 "main(int argc, char *argv[])\n"
4104 " struct stat sb;\n"
4105 " off_t offset, pa_offset;\n"
4110 #: build/C/man2/mmap.2:609
4113 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
4114 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4115 " exit(EXIT_FAILURE);\n"
4118 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
4119 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4120 " exit(EXIT_FAILURE);\n"
4124 #: build/C/man2/mmap.2:613
4127 " fd = open(argv[1], O_RDONLY);\n"
4129 " handle_error(\"open\");\n"
4131 " fd = open(argv[1], O_RDONLY);\n"
4133 " handle_error(\"open\");\n"
4136 #: build/C/man2/mmap.2:616
4139 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
4140 " handle_error(\"fstat\");\n"
4142 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
4143 " handle_error(\"fstat\");\n"
4146 #: build/C/man2/mmap.2:620
4149 " offset = atoi(argv[2]);\n"
4150 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4151 " /* offset for mmap() must be page aligned */\n"
4153 " offset = atoi(argv[2]);\n"
4154 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4155 " /* offset for mmap() must be page aligned */\n"
4158 #: build/C/man2/mmap.2:625
4161 " if (offset E<gt>= sb.st_size) {\n"
4162 " fprintf(stderr, \"offset is past end of file\\en\");\n"
4163 " exit(EXIT_FAILURE);\n"
4166 " if (offset E<gt>= sb.st_size) {\n"
4167 " fprintf(stderr, \"offset is past end of file\\en\");\n"
4168 " exit(EXIT_FAILURE);\n"
4172 #: build/C/man2/mmap.2:631
4175 " if (argc == 4) {\n"
4176 " length = atoi(argv[3]);\n"
4177 " if (offset + length E<gt> sb.st_size)\n"
4178 " length = sb.st_size - offset;\n"
4179 " /* Can\\(aqt display bytes past end of file */\n"
4181 " if (argc == 4) {\n"
4182 " length = atoi(argv[3]);\n"
4183 " if (offset + length E<gt> sb.st_size)\n"
4184 " length = sb.st_size - offset;\n"
4185 " /* Can\\(aqt display bytes past end of file */\n"
4188 #: build/C/man2/mmap.2:635
4191 " } else { /* No length arg ==E<gt> display to end of file */\n"
4192 " length = sb.st_size - offset;\n"
4195 " } else { /* No length arg ==E<gt> display to end of file */\n"
4196 " length = sb.st_size - offset;\n"
4200 #: build/C/man2/mmap.2:640
4203 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4204 " MAP_PRIVATE, fd, pa_offset);\n"
4205 " if (addr == MAP_FAILED)\n"
4206 " handle_error(\"mmap\");\n"
4208 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4209 " MAP_PRIVATE, fd, pa_offset);\n"
4210 " if (addr == MAP_FAILED)\n"
4211 " handle_error(\"mmap\");\n"
4214 #: build/C/man2/mmap.2:645
4217 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4218 " if (s != length) {\n"
4220 " handle_error(\"write\");\n"
4222 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4223 " if (s != length) {\n"
4225 " handle_error(\"write\");\n"
4228 #: build/C/man2/mmap.2:649
4231 " fprintf(stderr, \"partial write\");\n"
4232 " exit(EXIT_FAILURE);\n"
4235 " fprintf(stderr, \"partial write\");\n"
4236 " exit(EXIT_FAILURE);\n"
4240 #: build/C/man2/mmap.2:666
4242 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4243 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4244 "(2), B<shm_open>(3), B<shm_overview>(7)"
4246 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4247 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4248 "(2), B<shm_open>(3), B<shm_overview>(7)"
4251 #: build/C/man2/mmap.2:667 build/C/man2/msync.2:121
4252 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4253 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4256 #: build/C/man2/mmap2.2:29
4262 #: build/C/man2/mmap2.2:32
4263 msgid "mmap2 - map files or devices into memory"
4264 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
4267 #: build/C/man2/mmap2.2:38
4270 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4271 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4273 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4274 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4277 #: build/C/man2/mmap2.2:43
4279 "This is probably not the system call you are interested; instead, see B<mmap>"
4280 "(2), which describes the glibc wrapper function that invokes this system "
4283 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
4284 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc の\n"
4288 #: build/C/man2/mmap2.2:54
4290 "The B<mmap2>() system call provides the same interface as B<mmap>(2), "
4291 "except that the final argument specifies the offset into the file in 4096-"
4292 "byte units (instead of bytes, as is done by B<mmap>(2)). This enables "
4293 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
4296 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。ただ\n"
4297 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイト\n"
4298 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
4299 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマップ\n"
4303 #: build/C/man2/mmap2.2:61
4305 "On success, B<mmap2>() returns a pointer to the mapped area. On error -1 "
4306 "is returned and I<errno> is set appropriately."
4308 "成功した場合、 B<mmap2>() はマップされた領域へのポインタを返す。 エラーの場"
4309 "合は -1 が返されて、 I<errno> が適切に設定される。"
4312 #: build/C/man2/mmap2.2:65
4313 msgid "Problem with getting the data from userspace."
4314 msgstr "ユーザ空間からデータを取得するときに問題があった。"
4317 #: build/C/man2/mmap2.2:70
4319 "(Various platforms where the page size is not 4096 bytes.) I<offset * 4096> "
4320 "is not a multiple of the system page size."
4322 "(ページサイズが 4096 バイトでないプラットフォームにおいて) I<offset * 4096> "
4323 "がシステムのページサイズの倍数ではない。"
4326 #: build/C/man2/mmap2.2:74
4327 msgid "B<mmap2>() can also return any of the errors described in B<mmap>(2)."
4328 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
4331 #: build/C/man2/mmap2.2:77
4332 msgid "B<mmap2>() is available since Linux 2.3.31."
4333 msgstr "B<mmap2>() は、Linux 2.3.31 以降で使用可能である。"
4336 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:93
4337 msgid "This system call is Linux-specific."
4338 msgstr "このシステムコールは Linux 独自である。"
4341 #: build/C/man2/mmap2.2:85
4343 "Nowadays, the glibc B<mmap>() wrapper function invokes this system call "
4344 "rather than the B<mmap>(2) system call."
4346 "現在では、glibc の B<mmap>() のラッパー関数は、 B<mmap>(2) システムコールで"
4347 "はなく、このシステムコール (B<mmap2>(2)) を起動する。"
4349 #. ia64 can have page sizes ranging from 4kB to 64kB.
4350 #. On cris, it looks like the unit might also be the page size,
4351 #. which is 8192 bytes. -- mtk, June 2007
4353 #: build/C/man2/mmap2.2:92
4355 "On ia64, the unit for I<offset> is actually the system page size, rather "
4358 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
4362 #: build/C/man2/mmap2.2:97
4364 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4366 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4369 #: build/C/man2/mprotect.2:32
4375 #: build/C/man2/mprotect.2:32
4381 #: build/C/man2/mprotect.2:35
4382 msgid "mprotect - set protection on a region of memory"
4383 msgstr "mprotect - メモリ領域の保護を設定する"
4386 #: build/C/man2/mprotect.2:40
4388 msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4389 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4392 #: build/C/man2/mprotect.2:48
4394 "B<mprotect>() changes protection for the calling process's memory page(s) "
4395 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
4396 "+I<len>-1]. I<addr> must be aligned to a page boundary."
4398 "B<mprotect>() は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
4399 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
4403 #: build/C/man2/mprotect.2:53
4405 "If the calling process tries to access memory in a manner that violates the "
4406 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
4408 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
4409 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
4412 #: build/C/man2/mprotect.2:58
4414 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
4417 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
4418 "毎の論理和 (bitwize-or) で指定する:"
4421 #: build/C/man2/mprotect.2:61
4422 msgid "The memory cannot be accessed at all."
4423 msgstr "そのメモリには全くアクセスできない。"
4426 #: build/C/man2/mprotect.2:64
4427 msgid "The memory can be read."
4428 msgstr "そのメモリを読み取ることができる。"
4431 #: build/C/man2/mprotect.2:67
4432 msgid "The memory can be modified."
4433 msgstr "そのメモリを変更できる。"
4436 #. Document PROT_GROWSUP and PROT_GROWSDOWN
4438 #: build/C/man2/mprotect.2:72
4439 msgid "The memory can be executed."
4440 msgstr "そのメモリは実行可能である。"
4443 #: build/C/man2/mprotect.2:79
4445 "On success, B<mprotect>() returns zero. On error, -1 is returned, and "
4446 "I<errno> is set appropriately."
4448 "成功した場合、 B<mprotect>() は 0 を返す。エラーの場合は -1 が返り、 "
4449 "I<errno> が適切に設定される。"
4452 #: build/C/man2/mprotect.2:89
4454 "The memory cannot be given the specified access. This can happen, for "
4455 "example, if you B<mmap>(2) a file to which you have read-only access, then "
4456 "ask B<mprotect>() to mark it B<PROT_WRITE>."
4458 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
4459 "を読み取り専用で B<mmap>(2) しており、その領域に対して B<mprotect>() を呼び"
4460 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
4462 #. Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
4464 #: build/C/man2/mprotect.2:94
4466 "I<addr> is not a valid pointer, or not a multiple of the system page size."
4468 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
4471 #: build/C/man2/mprotect.2:97
4472 msgid "Internal kernel structures could not be allocated."
4473 msgstr "カーネル内部の構造体を割り当てることができなかった。"
4476 #: build/C/man2/mprotect.2:107
4478 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
4479 "address space of the process, or specify one or more pages that are not "
4480 "mapped. (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
4483 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
4484 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
4485 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
4488 #. SVr4 defines an additional error
4489 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
4491 #: build/C/man2/mprotect.2:116
4493 "SVr4, POSIX.1-2001. POSIX says that the behavior of B<mprotect>() is "
4494 "unspecified if it is applied to a region of memory that was not obtained via "
4497 "SVr4, POSIX.1-2001. POSIX では、 B<mmap>(2) 経由で獲得していないメモリ領域"
4498 "に対して B<mprotect>() を行った場合の B<mprotect>() の動作は未定義であると"
4502 #: build/C/man2/mprotect.2:123
4504 "On Linux it is always permissible to call B<mprotect>() on any address in a "
4505 "process's address space (except for the kernel vsyscall area). In "
4506 "particular it can be used to change existing code mappings to be writable."
4508 "Linux では、(カーネル vsyscall 領域以外の) 任意のプロセスアドレス空間に対し"
4509 "て B<mprotect>() を呼び出すことが、常に許されている。 これは特に既存のコード"
4510 "マッピングを書き込み可能にするために使われる。"
4513 #: build/C/man2/mprotect.2:133
4515 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
4516 "architecture- and kernel version-dependent. On some hardware architectures "
4517 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
4519 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
4520 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
4521 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
4524 #: build/C/man2/mprotect.2:142
4526 "POSIX.1-2001 says that an implementation may permit access other than that "
4527 "specified in I<prot>, but at a minimum can only allow write access if "
4528 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
4531 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
4532 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
4533 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
4537 #: build/C/man2/mprotect.2:148
4539 "The program below allocates four pages of memory, makes the third of these "
4540 "pages read-only, and then executes a loop that walks upward through the "
4541 "allocated region modifying bytes."
4543 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
4544 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
4545 "かって順番にバイト値を変更するループを実行する。"
4548 #: build/C/man2/mprotect.2:151
4550 "An example of what we might see when running the program is the following:"
4551 msgstr "プログラムを実行した場合の一例を以下に示す。"
4554 #: build/C/man2/mprotect.2:157
4558 "Start of region: 0x804c000\n"
4559 "Got SIGSEGV at address: 0x804e000\n"
4562 "Start of region: 0x804c000\n"
4563 "Got SIGSEGV at address: 0x804e000\n"
4566 #: build/C/man2/mprotect.2:169
4569 "#include E<lt>unistd.hE<gt>\n"
4570 "#include E<lt>signal.hE<gt>\n"
4571 "#include E<lt>stdio.hE<gt>\n"
4572 "#include E<lt>malloc.hE<gt>\n"
4573 "#include E<lt>stdlib.hE<gt>\n"
4574 "#include E<lt>errno.hE<gt>\n"
4575 "#include E<lt>sys/mman.hE<gt>\n"
4577 "#include E<lt>unistd.hE<gt>\n"
4578 "#include E<lt>signal.hE<gt>\n"
4579 "#include E<lt>stdio.hE<gt>\n"
4580 "#include E<lt>malloc.hE<gt>\n"
4581 "#include E<lt>stdlib.hE<gt>\n"
4582 "#include E<lt>errno.hE<gt>\n"
4583 "#include E<lt>sys/mman.hE<gt>\n"
4586 #: build/C/man2/mprotect.2:174
4588 msgid "char *buffer;\n"
4589 msgstr "char *buffer;\n"
4592 #: build/C/man2/mprotect.2:182
4596 "handler(int sig, siginfo_t *si, void *unused)\n"
4598 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4599 " (long) si-E<gt>si_addr);\n"
4600 " exit(EXIT_FAILURE);\n"
4604 "handler(int sig, siginfo_t *si, void *unused)\n"
4606 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4607 " (long) si-E<gt>si_addr);\n"
4608 " exit(EXIT_FAILURE);\n"
4612 #: build/C/man2/mprotect.2:189
4616 "main(int argc, char *argv[])\n"
4620 " struct sigaction sa;\n"
4627 " struct sigaction sa;\n"
4630 #: build/C/man2/mprotect.2:195
4633 " sa.sa_flags = SA_SIGINFO;\n"
4634 " sigemptyset(&sa.sa_mask);\n"
4635 " sa.sa_sigaction = handler;\n"
4636 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4637 " handle_error(\"sigaction\");\n"
4639 " sa.sa_flags = SA_SIGINFO;\n"
4640 " sigemptyset(&sa.sa_mask);\n"
4641 " sa.sa_sigaction = handler;\n"
4642 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4643 " handle_error(\"sigaction\");\n"
4646 #: build/C/man2/mprotect.2:199
4649 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
4650 " if (pagesize == -1)\n"
4651 " handle_error(\"sysconf\");\n"
4653 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
4654 " if (pagesize == -1)\n"
4655 " handle_error(\"sysconf\");\n"
4658 #: build/C/man2/mprotect.2:202
4661 " /* Allocate a buffer aligned on a page boundary;\n"
4662 " initial protection is PROT_READ | PROT_WRITE */\n"
4664 " /* Allocate a buffer aligned on a page boundary;\n"
4665 " initial protection is PROT_READ | PROT_WRITE */\n"
4668 #: build/C/man2/mprotect.2:206
4671 " buffer = memalign(pagesize, 4 * pagesize);\n"
4672 " if (buffer == NULL)\n"
4673 " handle_error(\"memalign\");\n"
4675 " buffer = memalign(pagesize, 4 * pagesize);\n"
4676 " if (buffer == NULL)\n"
4677 " handle_error(\"memalign\");\n"
4680 #: build/C/man2/mprotect.2:208
4682 msgid " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
4683 msgstr " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
4686 #: build/C/man2/mprotect.2:212
4689 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
4690 " PROT_READ) == -1)\n"
4691 " handle_error(\"mprotect\");\n"
4693 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
4694 " PROT_READ) == -1)\n"
4695 " handle_error(\"mprotect\");\n"
4698 #: build/C/man2/mprotect.2:215
4701 " for (p = buffer ; ; )\n"
4702 " *(p++) = \\(aqa\\(aq;\n"
4704 " for (p = buffer ; ; )\n"
4705 " *(p++) = \\(aqa\\(aq;\n"
4708 #: build/C/man2/mprotect.2:219
4711 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
4712 " exit(EXIT_SUCCESS);\n"
4715 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
4716 " exit(EXIT_SUCCESS);\n"
4720 #: build/C/man2/mprotect.2:222
4721 msgid "B<mmap>(2), B<sysconf>(3)"
4722 msgstr "B<mmap>(2), B<sysconf>(3)"
4725 #: build/C/man2/mremap.2:31
4731 #: build/C/man2/mremap.2:31
4737 #: build/C/man2/mremap.2:34
4738 msgid "mremap - remap a virtual memory address"
4739 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
4742 #: build/C/man2/mremap.2:37
4744 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
4745 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
4748 #: build/C/man2/mremap.2:42
4751 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4752 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4754 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4755 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4758 #: build/C/man2/mremap.2:48
4760 "B<mremap>() expands (or shrinks) an existing memory mapping, potentially "
4761 "moving it at the same time (controlled by the I<flags> argument and the "
4762 "available virtual address space)."
4764 "B<mremap>() は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
4765 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
4769 #: build/C/man2/mremap.2:62
4771 "I<old_address> is the old address of the virtual memory block that you want "
4772 "to expand (or shrink). Note that I<old_address> has to be page aligned. "
4773 "I<old_size> is the old size of the virtual memory block. I<new_size> is the "
4774 "requested size of the virtual memory block after the resize. An optional "
4775 "fifth argument, I<new_address>, may be provided; see the description of "
4776 "B<MREMAP_FIXED> below."
4778 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
4779 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
4780 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
4781 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
4782 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
4786 #: build/C/man2/mremap.2:74
4788 "In Linux the memory is divided into pages. A user process has (one or) "
4789 "several linear virtual memory segments. Each virtual memory segment has one "
4790 "or more mappings to real memory pages (in the page table). Each virtual "
4791 "memory segment has its own protection (access rights), which may cause a "
4792 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
4793 "to a read-only segment). Accessing virtual memory outside of the segments "
4794 "will also cause a segmentation violation."
4796 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは) 複数"
4797 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
4798 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
4799 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
4800 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
4801 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
4802 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
4806 #: build/C/man2/mremap.2:82
4808 "B<mremap>() uses the Linux page table scheme. B<mremap>() changes the "
4809 "mapping between virtual addresses and memory pages. This can be used to "
4810 "implement a very efficient B<realloc>(3)."
4812 "B<mremap>() は Linux のページ・テーブル方式を使用する。 B<mremap>() は仮想"
4813 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
4814 "B<realloc>(3) を実装するのに使用されている。"
4817 #: build/C/man2/mremap.2:84
4818 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
4819 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
4822 #: build/C/man2/mremap.2:84
4824 msgid "B<MREMAP_MAYMOVE>"
4825 msgstr "B<MREMAP_MAYMOVE>"
4828 #: build/C/man2/mremap.2:96
4830 "By default, if there is not sufficient space to expand a mapping at its "
4831 "current location, then B<mremap>() fails. If this flag is specified, then "
4832 "the kernel is permitted to relocate the mapping to a new virtual address, if "
4833 "necessary. If the mapping is relocated, then absolute pointers into the old "
4834 "mapping location become invalid (offsets relative to the starting address of "
4835 "the mapping should be employed)."
4837 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
4838 "B<mremap>() は失敗する。 このフラグが指定されると、カーネルは必要があれば"
4839 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
4840 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
4841 "レスからの相対オフセットは有効のままである)。"
4844 #: build/C/man2/mremap.2:96
4846 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
4847 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
4850 #: build/C/man2/mremap.2:118
4852 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2). "
4853 "If this flag is specified, then B<mremap>() accepts a fifth argument, "
4854 "I<void *new_address>, which specifies a page-aligned address to which the "
4855 "mapping must be moved. Any previous mapping at the address range specified "
4856 "by I<new_address> and I<new_size> is unmapped. If B<MREMAP_FIXED> is "
4857 "specified, then B<MREMAP_MAYMOVE> must also be specified."
4859 "このフラグは B<mmap>(2) の B<MAP_FIXED> フラグと似たような目的で用いられ"
4860 "る。 このフラグが指定されると、 B<mremap>() は 5 番目の引き数 I<void "
4861 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
4862 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
4863 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
4864 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
4865 "B<MREMAP_MAYMOVE> も指定しなければならない。"
4868 #: build/C/man2/mremap.2:128
4870 "If the memory segment specified by I<old_address> and I<old_size> is locked "
4871 "(using B<mlock>(2) or similar), then this lock is maintained when the "
4872 "segment is resized and/or relocated. As a consequence, the amount of memory "
4873 "locked by the process may change."
4875 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2) や"
4876 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
4877 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
4881 #: build/C/man2/mremap.2:136
4883 "On success B<mremap>() returns a pointer to the new virtual memory area. "
4884 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
4885 "and I<errno> is set appropriately."
4887 "成功した場合は B<mremap>() は新しい仮想メモリ領域へのポインタを返す。 エラー"
4888 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
4892 #: build/C/man2/mremap.2:143
4894 "The caller tried to expand a memory segment that is locked, but this was not "
4895 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
4897 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
4898 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
4901 #: build/C/man2/mremap.2:152
4903 "\"Segmentation fault.\" Some address in the range I<old_address> to "
4904 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
4905 "process. You can also get B<EFAULT> even if there exist mappings that cover "
4906 "the whole address space requested, but those mappings are of different types."
4908 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
4909 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
4910 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
4911 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
4915 #: build/C/man2/mremap.2:180
4917 "An invalid argument was given. Possible causes are: I<old_address> was not "
4918 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
4919 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
4920 "was invalid; or the new address range specified by I<new_address> and "
4921 "I<new_size> overlapped the old address range specified by I<old_address> and "
4922 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
4923 "B<MREMAP_MAYMOVE>."
4925 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
4926 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
4927 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
4928 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
4929 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
4930 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
4934 #: build/C/man2/mremap.2:186
4936 "The memory area cannot be expanded at the current virtual address, and the "
4937 "B<MREMAP_MAYMOVE> flag is not set in I<flags>. Or, there is not enough "
4938 "(virtual) memory available."
4940 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
4941 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
4943 #. 4.2BSD had a (never actually implemented)
4945 #. call with completely different semantics.
4947 #: build/C/man2/mremap.2:192
4949 "This call is Linux-specific, and should not be used in programs intended to "
4952 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
4956 #: build/C/man2/mremap.2:200
4958 "Prior to version 2.4, glibc did not expose the definition of "
4959 "B<MREMAP_FIXED>, and the prototype for B<mremap>() did not allow for the "
4960 "I<new_address> argument."
4962 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
4963 "ず、 B<mremap>() のプロトタイプは I<new_address> 引き数を取らなかった。"
4966 #: build/C/man2/mremap.2:209
4968 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
4969 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
4971 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
4972 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
4975 #: build/C/man2/mremap.2:213
4977 "Your favorite OS text book for more information on paged memory. (I<Modern "
4978 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
4979 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
4981 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS の\n"
4982 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
4983 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
4984 "System> by Maurice J. Bach.)"
4987 #: build/C/man2/msync.2:25
4993 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:26
4999 #: build/C/man2/msync.2:28
5000 msgid "msync - synchronize a file with a memory map"
5001 msgstr "msync - ファイルをマップしたメモリと同期させる"
5004 #: build/C/man2/msync.2:32
5005 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5006 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5009 #: build/C/man2/msync.2:48
5011 "B<msync>() flushes changes made to the in-core copy of a file that was "
5012 "mapped into memory using B<mmap>(2) back to disk. Without use of this call "
5013 "there is no guarantee that changes are written back before B<munmap>(2) is "
5014 "called. To be more precise, the part of the file that corresponds to the "
5015 "memory area starting at I<addr> and having length I<length> is updated."
5017 "B<msync>() は B<mmap>(2) を使ってメモリにマップされたファイルの、 メモリ上"
5018 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
5019 "B<munmap>(2) が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
5020 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
5024 #: build/C/man2/msync.2:68
5026 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
5027 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>. B<MS_ASYNC> "
5028 "specifies that an update be scheduled, but the call returns immediately. "
5029 "B<MS_SYNC> asks for an update and waits for it to complete. "
5030 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
5031 "they can be updated with the fresh values just written)."
5033 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
5034 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
5035 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
5036 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
5037 "た今書き込んだ新しい値でマッピングを更新することができるように) 同じファイル"
5038 "に対する他のマッピングを無効にすることを要求する。"
5041 #: build/C/man2/msync.2:73
5043 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
5046 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
5050 #: build/C/man2/msync.2:74
5056 #: build/C/man2/msync.2:80
5058 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
5059 "specified address range."
5061 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
5065 #: build/C/man2/msync.2:93
5067 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
5068 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
5069 "B<MS_ASYNC> are set in I<flags>."
5071 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
5072 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
5073 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
5076 #: build/C/man2/msync.2:96
5077 msgid "The indicated memory (or part of it) was not mapped."
5078 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
5081 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:103
5082 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
5083 msgid "POSIX.1-2001."
5084 msgstr "POSIX.1-2001."
5087 #: build/C/man2/msync.2:105
5089 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
5090 "B<ENOMEM>. In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
5092 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
5093 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
5095 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5096 #. -1: unavailable, 0: ask using sysconf().
5097 #. glibc defines them to 1.
5099 #: build/C/man2/msync.2:118
5101 "On POSIX systems on which B<msync>() is available, both "
5102 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
5103 "I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
5105 "B<msync>() が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
5106 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
5107 "定義される。 (B<sysconf>(3) を参照すること。 )"
5110 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
5116 #: build/C/man3/mtrace.3:23
5122 #: build/C/man3/mtrace.3:23
5128 #: build/C/man3/mtrace.3:26
5129 msgid "mtrace, muntrace - malloc tracing"
5130 msgstr "mtrace, muntrace - malloc のトレース"
5133 #: build/C/man3/mtrace.3:28
5134 msgid "B<#include E<lt>mcheck.hE<gt>>"
5135 msgstr "B<#include E<lt>mcheck.hE<gt>>"
5138 #: build/C/man3/mtrace.3:30
5139 msgid "B<void mtrace(void);>"
5140 msgstr "B<void mtrace(void);>"
5143 #: build/C/man3/mtrace.3:32
5144 msgid "B<void muntrace(void);>"
5145 msgstr "B<void muntrace(void);>"
5148 #: build/C/man3/mtrace.3:44
5150 "The B<mtrace>() function installs hook functions for the memory-allocation "
5151 "functions (B<malloc>(3), B<realloc>(3) B<memalign>(3), B<free>(3)). These "
5152 "hook functions record tracing information about memory allocation and "
5153 "deallocation. The tracing information can be used to discover memory leaks "
5154 "and attempts to free nonallocated memory in a program."
5158 #: build/C/man3/mtrace.3:55
5160 "The B<muntrace>() function disables the hook functions installed by "
5161 "B<mtrace>(), so that tracing information is no longer recorded for the "
5162 "memory-allocation functions. If no hook functions were successfully "
5163 "installed by B<mtrace>(), B<muntrace>() does nothing."
5167 #: build/C/man3/mtrace.3:63
5169 "When B<mtrace>(3) is called, it checks the value of the environment "
5170 "variable B<MALLOC_TRACE>, which should contain the pathname of a file in "
5171 "which the tracing information is to be recorded. If the pathname is "
5172 "successfully opened, it is truncated to zero length."
5176 #: build/C/man3/mtrace.3:76
5178 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
5179 "not writable, then no hook functions are installed, and B<mtrace>() has no "
5180 "effect. In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
5181 "ignored, and B<mtrace>() has no effect."
5185 #: build/C/man3/mtrace.3:84
5187 "In normal usage, B<mtrace>() is called once at the start of execution of a "
5188 "program, and B<muntrace>() is never called."
5192 #: build/C/man3/mtrace.3:94
5194 "The tracing output produced after a call to B<mtrace>() is textual, but not "
5195 "designed to be human readable. The GNU C library provides a Perl script, "
5196 "B<mtrace>(1), that interprets the trace log and produces human-readable "
5197 "output. For best results, the traced program should be compiled with "
5198 "debugging enabled, so that line-number information is recorded in the "
5203 #: build/C/man3/mtrace.3:100
5205 "The tracing performed by B<mtrace>() incurs a performance penalty (if "
5206 "B<MALLOC_TRACE> points to a valid, writable pathname)."
5210 #: build/C/man3/mtrace.3:106
5212 "The line-number information produced by B<mtrace>(1) is not always precise: "
5213 "the line number references may refer to the previous or following (non-"
5214 "blank) line of the source code."
5218 #: build/C/man3/mtrace.3:113
5220 "The shell session below demonstrates the use of the B<mtrace>() function "
5221 "and the B<mtrace>(1) command in a program that has memory leaks at two "
5222 "different locations. The demonstration uses the following program:"
5226 #: build/C/man3/mtrace.3:120
5229 "$ B<cat t_mtrace.c>\n"
5230 "#include E<lt>mcheck.hE<gt>\n"
5231 "#include E<lt>stdlib.hE<gt>\n"
5232 "#include E<lt>stdio.hE<gt>\n"
5234 "$ B<cat t_mtrace.c>\n"
5235 "#include E<lt>mcheck.hE<gt>\n"
5236 "#include E<lt>stdlib.hE<gt>\n"
5237 "#include E<lt>stdio.hE<gt>\n"
5240 #: build/C/man3/mtrace.3:125
5244 "main(int argc, char *argv[])\n"
5249 "main(int argc, char *argv[])\n"
5254 #: build/C/man3/mtrace.3:127
5256 msgid " mtrace();\n"
5257 msgstr " mtrace();\n"
5260 #: build/C/man3/mtrace.3:130
5263 " for (j = 0; j E<lt> 2; j++)\n"
5264 " malloc(100); /* Never freed--a memory leak */\n"
5266 " for (j = 0; j E<lt> 2; j++)\n"
5267 " malloc(100); /* Never freed--a memory leak */\n"
5270 #: build/C/man3/mtrace.3:134
5273 " calloc(16, 16); /* Never freed--a memory leak */\n"
5274 " exit(EXIT_SUCCESS);\n"
5277 " calloc(16, 16); /* Never freed--a memory leak */\n"
5278 " exit(EXIT_SUCCESS);\n"
5282 #: build/C/man3/mtrace.3:140
5284 "When we run the program as follows, we see that B<mtrace>() diagnosed "
5285 "memory leaks at two different locations in the program:"
5289 #: build/C/man3/mtrace.3:153
5292 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5293 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5295 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5296 "Memory not freed:\n"
5297 "-----------------\n"
5298 " Address Size Caller\n"
5299 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
5300 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
5301 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
5303 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5304 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5306 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5307 "Memory not freed:\n"
5308 "-----------------\n"
5309 " Address Size Caller\n"
5310 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
5311 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
5312 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
5315 #: build/C/man3/mtrace.3:165
5317 "The first two messages about unfreed memory correspond to the two B<malloc>"
5318 "(3) calls inside the I<for> loop. The final message corresponds to the "
5319 "call to B<calloc>(3) (which in turn calls B<malloc>(3))."
5323 #: build/C/man3/mtrace.3:168
5324 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3)"
5325 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3)"
5328 #: build/C/man2/posix_fadvise.2:27
5330 msgid "POSIX_FADVISE"
5331 msgstr "POSIX_FADVISE"
5334 #: build/C/man2/posix_fadvise.2:27 build/C/man2/sync_file_range.2:30
5340 #: build/C/man2/posix_fadvise.2:30
5341 msgid "posix_fadvise - predeclare an access pattern for file data"
5342 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
5345 #: build/C/man2/posix_fadvise.2:33 build/C/man3/posix_fallocate.3:29
5347 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
5348 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
5351 #: build/C/man2/posix_fadvise.2:36
5353 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5354 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5357 #: build/C/man2/posix_fadvise.2:45
5358 msgid "B<posix_fadvise>():"
5359 msgstr "B<posix_fadvise>():"
5362 #: build/C/man2/posix_fadvise.2:47 build/C/man3/posix_fallocate.3:42
5363 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5364 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5367 #: build/C/man2/posix_fadvise.2:55
5369 "Programs can use B<posix_fadvise>() to announce an intention to access file "
5370 "data in a specific pattern in the future, thus allowing the kernel to "
5371 "perform appropriate optimizations."
5373 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
5374 "めに B<posix_fadvise>() を使うことができる。 これにより、カーネルが適切な最"
5378 #: build/C/man2/posix_fadvise.2:62
5380 "The I<advice> applies to a (not necessarily existent) region starting at "
5381 "I<offset> and extending for I<len> bytes (or until the end of the file if "
5382 "I<len> is 0) within the file referred to by I<fd>. The I<advice> is not "
5383 "binding; it merely constitutes an expectation on behalf of the application."
5385 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バイ\n"
5386 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
5387 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリケー\n"
5388 "ションのために可能性を構成するだけである。"
5391 #: build/C/man2/posix_fadvise.2:64
5392 msgid "Permissible values for I<advice> include:"
5393 msgstr "I<advice> に許される値には、以下のものが含まれる:"
5396 #: build/C/man2/posix_fadvise.2:64
5398 msgid "B<POSIX_FADV_NORMAL>"
5399 msgstr "B<POSIX_FADV_NORMAL>"
5402 #: build/C/man2/posix_fadvise.2:70
5404 "Indicates that the application has no advice to give about its access "
5405 "pattern for the specified data. If no advice is given for an open file, "
5406 "this is the default assumption."
5408 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
5409 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
5410 "合、 これがデフォルトで仮定される。"
5413 #: build/C/man2/posix_fadvise.2:70
5415 msgid "B<POSIX_FADV_SEQUENTIAL>"
5416 msgstr "B<POSIX_FADV_SEQUENTIAL>"
5419 #: build/C/man2/posix_fadvise.2:74
5421 "The application expects to access the specified data sequentially (with "
5422 "lower offsets read before higher ones)."
5424 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
5425 "小さなオフセットのデータを読むように) アクセスされることを期待する。"
5428 #: build/C/man2/posix_fadvise.2:74
5430 msgid "B<POSIX_FADV_RANDOM>"
5431 msgstr "B<POSIX_FADV_RANDOM>"
5434 #: build/C/man2/posix_fadvise.2:77
5435 msgid "The specified data will be accessed in random order."
5436 msgstr "指定されたデータがランダムな順番でアクセスされる。"
5439 #: build/C/man2/posix_fadvise.2:77
5441 msgid "B<POSIX_FADV_NOREUSE>"
5442 msgstr "B<POSIX_FADV_NOREUSE>"
5445 #: build/C/man2/posix_fadvise.2:80
5446 msgid "The specified data will be accessed only once."
5447 msgstr "指定されたデータは 1 度しかアクセスされない。"
5450 #: build/C/man2/posix_fadvise.2:80
5452 msgid "B<POSIX_FADV_WILLNEED>"
5453 msgstr "B<POSIX_FADV_WILLNEED>"
5456 #: build/C/man2/posix_fadvise.2:83
5457 msgid "The specified data will be accessed in the near future."
5458 msgstr "指定されたデータは近い将来アクセスされる。"
5461 #: build/C/man2/posix_fadvise.2:83
5463 msgid "B<POSIX_FADV_DONTNEED>"
5464 msgstr "B<POSIX_FADV_DONTNEED>"
5467 #: build/C/man2/posix_fadvise.2:86
5468 msgid "The specified data will not be accessed in the near future."
5469 msgstr "指定されたデータは近い将来アクセスされない。"
5472 #: build/C/man2/posix_fadvise.2:89
5473 msgid "On success, zero is returned. On error, an error number is returned."
5474 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
5477 #: build/C/man2/posix_fadvise.2:93
5478 msgid "The I<fd> argument was not a valid file descriptor."
5479 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
5482 #: build/C/man2/posix_fadvise.2:96
5483 msgid "An invalid value was specified for I<advice>."
5484 msgstr "無効な値が I<advice> に指定された。"
5487 #: build/C/man2/posix_fadvise.2:103
5489 "The specified file descriptor refers to a pipe or FIFO. (Linux actually "
5490 "returns B<EINVAL> in this case.)"
5492 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
5493 "合、Linux は実際には B<EINVAL> を返す)。"
5495 #. of fadvise64_64()
5497 #: build/C/man2/posix_fadvise.2:111
5499 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
5500 "called B<fadvise64>(). Library support has been provided since glibc "
5501 "version 2.2, via the wrapper function B<posix_fadvise>()."
5503 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
5504 "対応するシステムコールは B<fadvise64>() という名前である。\n"
5505 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
5506 "ラッパー関数は B<posix_fadvise>() という名前である。"
5509 #: build/C/man2/posix_fadvise.2:120
5511 "POSIX.1-2001. Note that the type of the I<len> argument was changed from "
5512 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
5514 "POSIX.1-2001. I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
5515 "I<off_t> に変更された点に注意すること。"
5518 #: build/C/man2/posix_fadvise.2:126
5520 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
5521 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
5522 "B<POSIX_FADV_RANDOM> disables file readahead entirely. These changes affect "
5523 "the entire file, not just the specified region (but other open file handles "
5524 "to the same file are unaffected)."
5526 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
5527 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
5528 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
5529 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
5530 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
5533 #: build/C/man2/posix_fadvise.2:133
5535 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
5536 "into the page cache. The amount of data read may be decreased by the kernel "
5537 "depending on virtual memory load. (A few megabytes will usually be fully "
5538 "satisfied, and more is rarely useful.)"
5540 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
5541 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
5542 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
5546 #: build/C/man2/posix_fadvise.2:137
5548 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
5549 "B<POSIX_FADV_WILLNEED>. This was probably a bug; since kernel 2.6.18, this "
5552 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
5553 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
5557 #: build/C/man2/posix_fadvise.2:145
5559 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
5560 "specified region. This is useful, for example, while streaming large "
5561 "files. A program may periodically request the kernel to free cached data "
5562 "that has already been used, so that more useful cached pages are not "
5563 "discarded instead."
5565 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
5566 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
5567 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
5568 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
5569 "されたページが、 代わりに破棄されることはない。"
5572 #: build/C/man2/posix_fadvise.2:153
5574 "Pages that have not yet been written out will be unaffected, so if the "
5575 "application wishes to guarantee that pages will be released, it should call "
5576 "B<fsync>(2) or B<fdatasync>(2) first."
5578 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
5579 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2) または "
5580 "B<fdatasync>(2) を呼ぶべきである。"
5583 #: build/C/man2/posix_fadvise.2:153
5585 msgid "arm_fadvise()"
5586 msgstr "arm_fadvise()"
5589 #: build/C/man2/posix_fadvise.2:165
5591 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
5592 "of registers. On this architecture, the call signature of B<posix_fadvise>"
5593 "() is flawed, since it forces a register to be wasted as padding between "
5594 "the I<fd> and I<len> arguments. Therefore, since Linux 2.6.14, ARM defines "
5595 "a different system call that orders the arguments suitably:"
5599 #: build/C/man2/posix_fadvise.2:170
5602 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5603 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5605 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5606 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5608 #. No ARM support in glibc.
5610 #: build/C/man2/posix_fadvise.2:177
5612 "The behavior of this system call is otherwise exactly the same as "
5613 "B<posix_fadvise>(). No library support is provided for this system call in "
5618 #: build/C/man2/posix_fadvise.2:182
5620 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
5621 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
5622 "through to the end of the file\"."
5624 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
5625 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
5629 #: build/C/man2/posix_fadvise.2:186
5631 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
5632 "B<posix_madvise>(3)"
5634 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
5635 "B<posix_madvise>(3)"
5638 #: build/C/man3/posix_fallocate.3:23
5640 msgid "POSIX_FALLOCATE"
5641 msgstr "POSIX_FALLOCATE"
5644 #: build/C/man3/posix_fallocate.3:23
5650 #: build/C/man3/posix_fallocate.3:26
5651 msgid "posix_fallocate - allocate file space"
5652 msgstr "posix_fallocate - ファイルのスペースを確保する"
5655 #: build/C/man3/posix_fallocate.3:31
5657 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5658 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5661 #: build/C/man3/posix_fallocate.3:40
5662 msgid "B<posix_fallocate>():"
5663 msgstr "B<posix_fallocate>():"
5666 #: build/C/man3/posix_fallocate.3:59
5668 "The function B<posix_fallocate>() ensures that disk space is allocated for "
5669 "the file referred to by the descriptor I<fd> for the bytes in the range "
5670 "starting at I<offset> and continuing for I<len> bytes. After a successful "
5671 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
5672 "range are guaranteed not to fail because of lack of disk space."
5674 "関数 B<posix_fallocate>() は、ディスクリプタ I<fd> で参照されるファイルに対"
5675 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
5676 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>() の呼び出しが成"
5677 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
5681 #: build/C/man3/posix_fallocate.3:64
5683 "If the size of the file is less than I<offset>+I<len>, then the file is "
5684 "increased to this size; otherwise the file size is left unchanged."
5686 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
5687 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
5690 #: build/C/man3/posix_fallocate.3:70
5692 "B<posix_fallocate>() returns zero on success, or an error number on "
5693 "failure. Note that I<errno> is not set."
5695 "B<posix_fallocate>() は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
5696 "す。 I<errno> が設定されない点に注意すること。"
5699 #: build/C/man3/posix_fallocate.3:79
5700 msgid "I<offset+len> exceeds the maximum file size."
5701 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
5704 #: build/C/man3/posix_fallocate.3:89
5705 msgid "I<fd> does not refer to a regular file."
5706 msgstr "I<fd> が通常のファイルとして参照されていない。"
5709 #: build/C/man3/posix_fallocate.3:98
5710 msgid "I<fd> refers to a pipe."
5711 msgstr "I<fd> がパイプを参照している。"
5714 #: build/C/man3/posix_fallocate.3:101
5715 msgid "B<posix_fallocate>() is available since glibc 2.1.94."
5716 msgstr "B<posix_fallocate>() は glibc 2.1.94 以降で利用可能である。"
5719 #: build/C/man3/posix_fallocate.3:126
5721 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
5722 "if I<len> was 0, or I<offset> was less than 0. POSIX.1-2001 says that an "
5723 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
5724 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
5727 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
5728 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
5729 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
5730 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
5734 #: build/C/man3/posix_fallocate.3:129
5735 msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5736 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5739 #: build/C/man3/posix_memalign.3:28
5741 msgid "POSIX_MEMALIGN"
5742 msgstr "POSIX_MEMALIGN"
5745 #: build/C/man3/posix_memalign.3:28
5751 #: build/C/man3/posix_memalign.3:31
5753 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate aligned "
5756 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
5760 #: build/C/man3/posix_memalign.3:34 build/C/man3/malloc_get_state.3:29
5762 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
5763 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
5766 #: build/C/man3/posix_memalign.3:38
5769 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5770 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5771 "B<void *valloc(size_t >I<size>B<);>\n"
5773 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5774 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5775 "B<void *valloc(size_t >I<size>B<);>\n"
5778 #: build/C/man3/posix_memalign.3:43
5781 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5782 "B<void *pvalloc(size_t >I<size>B<);>\n"
5784 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5785 "B<void *pvalloc(size_t >I<size>B<);>\n"
5788 #: build/C/man3/posix_memalign.3:53
5790 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5793 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5797 #: build/C/man3/posix_memalign.3:56
5798 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
5799 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
5802 #: build/C/man3/posix_memalign.3:58
5803 msgid "B<valloc>():"
5804 msgstr "B<valloc>():"
5807 #: build/C/man3/posix_memalign.3:61
5809 msgid "Since glibc 2.12:"
5810 msgstr "glibc 2.12 以降:"
5813 #: build/C/man3/posix_memalign.3:68
5817 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5818 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5819 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5822 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5823 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5824 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5827 #: build/C/man3/posix_memalign.3:70
5829 msgid "Before glibc 2.12:"
5830 msgstr "glibc 2.12 より前:"
5833 #: build/C/man3/posix_memalign.3:74
5835 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5836 "_XOPEN_SOURCE_EXTENDED"
5838 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5839 "_XOPEN_SOURCE_EXTENDED"
5842 #: build/C/man3/posix_memalign.3:81
5844 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
5845 "declaration of B<valloc>(); no feature test macros are required.)"
5847 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
5848 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
5852 #: build/C/man3/posix_memalign.3:102
5854 "The function B<posix_memalign>() allocates I<size> bytes and places the "
5855 "address of the allocated memory in I<*memptr>. The address of the allocated "
5856 "memory will be a multiple of I<alignment>, which must be a power of two and "
5857 "a multiple of I<sizeof(void *)>. If I<size> is 0, then B<posix_memalign>() "
5858 "returns either NULL, or a unique pointer value that can later be "
5859 "successfully passed to B<free>(3)."
5861 "関数 B<posix_memalign>() は、 I<size> バイトのメモリを割り当て、割り当てられ"
5862 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
5863 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
5864 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
5865 "B<posix_memalign>() は NULL か一意なポインタ値を返す。 このポインタ値は、後"
5866 "で B<free>(3) に問題なく渡すことができる。"
5868 #. The behavior of memalign() for size==0 is as for posix_memalign()
5869 #. but no standards govern this.
5871 #: build/C/man3/posix_memalign.3:113
5873 "The obsolete function B<memalign>() allocates I<size> bytes and returns a "
5874 "pointer to the allocated memory. The memory address will be a multiple of "
5875 "I<alignment>, which must be a power of two."
5877 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
5878 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
5879 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
5882 #: build/C/man3/posix_memalign.3:122
5884 "The function B<aligned_alloc>() is the same as B<memalign>(), except for "
5885 "the added restriction that I<size> should be a multiple of I<alignment>."
5887 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が I<alignment>\n"
5888 "の倍数でなければならないという追加の制限がある点が異なる。"
5891 #: build/C/man3/posix_memalign.3:132
5893 "The obsolete function B<valloc>() allocates I<size> bytes and returns a "
5894 "pointer to the allocated memory. The memory address will be a multiple of "
5895 "the page size. It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
5897 "廃止された関数である B<valloc>() は I<size> バイトのメモリを割り当て、割り当"
5898 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
5899 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
5903 #: build/C/man3/posix_memalign.3:139
5905 "The obsolete function B<pvalloc>() is similar to B<valloc>(), but rounds "
5906 "the size of the allocation up to the next multiple of the system page size."
5908 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
5909 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
5912 #: build/C/man3/posix_memalign.3:141
5913 msgid "For all of these functions, the memory is not zeroed."
5914 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
5917 #: build/C/man3/posix_memalign.3:148
5919 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>() return a "
5920 "pointer to the allocated memory, or NULL if the request fails."
5922 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられた\n"
5923 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
5926 #: build/C/man3/posix_memalign.3:155
5928 "B<posix_memalign>() returns zero on success, or one of the error values "
5929 "listed in the next section on failure. Note that I<errno> is not set."
5931 "B<posix_memalign>() は成功した場合は 0 を返し、 失敗した場合は次のセクション"
5932 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
5936 #: build/C/man3/posix_memalign.3:162
5938 "The I<alignment> argument was not a power of two, or was not a multiple of "
5939 "I<sizeof(void *)>."
5941 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
5945 #: build/C/man3/posix_memalign.3:165
5946 msgid "There was insufficient memory to fulfill the allocation request."
5947 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
5950 #: build/C/man3/posix_memalign.3:172
5952 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>() have been "
5953 "available in all Linux libc libraries."
5955 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
5956 "すべての Linux libc ライブラリで使用可能である。"
5959 #: build/C/man3/posix_memalign.3:176
5960 msgid "The function B<aligned_alloc>() was added to glibc in version 2.16."
5961 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
5964 #: build/C/man3/posix_memalign.3:180
5965 msgid "The function B<posix_memalign>() is available since glibc 2.1.91."
5966 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
5969 #: build/C/man3/posix_memalign.3:187
5971 "The function B<valloc>() appeared in 3.0BSD. It is documented as being "
5972 "obsolete in 4.3BSD, and as legacy in SUSv2. It does not appear in "
5975 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されており、\n"
5976 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
5979 #: build/C/man3/posix_memalign.3:191
5980 msgid "The function B<pvalloc>() is a GNU extension."
5981 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
5984 #: build/C/man3/posix_memalign.3:195
5985 msgid "The function B<memalign>() appears in SunOS 4.1.3 but not in 4.4BSD."
5986 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
5989 #: build/C/man3/posix_memalign.3:199
5990 msgid "The function B<posix_memalign>() comes from POSIX.1d."
5991 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
5994 #: build/C/man3/posix_memalign.3:204
5995 msgid "The function I<aligned_alloc ()> is specified in the C11 standard."
5996 msgstr "関数 I<aligned_alloc ()> は C11 標準で規定されている。"
5999 #: build/C/man3/posix_memalign.3:204
6005 #: build/C/man3/posix_memalign.3:208
6007 "Everybody agrees that B<posix_memalign>() is declared in I<E<lt>stdlib."
6010 "B<posix_memalign>() の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
6014 #: build/C/man3/posix_memalign.3:212
6016 "On some systems B<memalign>() is declared in I<E<lt>stdlib.hE<gt>> instead "
6017 "of I<E<lt>malloc.hE<gt>>."
6019 "いくつかのシステムでは、 B<memalign>() は I<E<lt>malloc.hE<gt>> ではなく "
6020 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
6023 #: build/C/man3/posix_memalign.3:219
6025 "According to SUSv2, B<valloc>() is declared in I<E<lt>stdlib.hE<gt>>. "
6026 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
6027 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
6030 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 libc4,5\n"
6031 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
6032 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
6035 #: build/C/man3/posix_memalign.3:228
6037 "On many systems there are alignment restrictions, for example, on buffers "
6038 "used for direct block device I/O. POSIX specifies the I<pathconf(path,"
6039 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed. Now one can "
6040 "use B<posix_memalign>() to satisfy this requirement."
6042 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
6043 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
6044 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
6045 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>() を使う"
6046 "と、この必要条件を満たすことができる。"
6049 #: build/C/man3/posix_memalign.3:237
6051 "B<posix_memalign>() verifies that I<alignment> matches the requirements "
6052 "detailed above. B<memalign>() may not check that the I<alignment> argument "
6055 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
6056 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
6059 #. Other systems allow passing the result of
6066 #: build/C/man3/posix_memalign.3:265
6068 "POSIX requires that memory obtained from B<posix_memalign>() can be freed "
6069 "using B<free>(3). Some systems provide no way to reclaim memory allocated "
6070 "with B<memalign>() or B<valloc>() (because one can only pass to B<free>"
6071 "(3) a pointer gotten from B<malloc>(3), while, for example, B<memalign>() "
6072 "would call B<malloc>(3) and then align the obtained value). The glibc "
6073 "implementation allows memory obtained from any of these these functions to "
6074 "be reclaimed with B<free>(3)."
6076 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を使って\n"
6077 "解放することができる必要がある。 いくつかのシステムでは B<memalign>() や\n"
6078 "B<valloc>() で割り当てられたメモリを再利用する手段が提供されていない。\n"
6079 "(なぜなら B<free>(3) に渡すことができるのは B<malloc>(3) から受け取った\n"
6080 "ポインタだけだが、 例えば B<memalign>() は B<malloc>(3) を呼び出し、\n"
6081 "得た値をアラインメントしてしまうからである) glibc の実装では、 ここに述べた\n"
6082 "関数のいずれで獲得したメモリも B<free>(3) で再利用することができる。"
6085 #: build/C/man3/posix_memalign.3:270
6087 "The glibc B<malloc>(3) always returns 8-byte aligned memory addresses, so "
6088 "these functions are only needed if you require larger alignment values."
6090 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
6091 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメント\n"
6095 #: build/C/man3/posix_memalign.3:274
6096 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6097 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6100 #: build/C/man2/readahead.2:28
6106 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
6112 #: build/C/man2/readahead.2:31
6113 msgid "readahead - perform file readahead into page cache"
6114 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
6117 #: build/C/man2/readahead.2:37
6119 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6120 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6123 #: build/C/man2/readahead.2:65
6125 "B<readahead>() populates the page cache with data from a file so that "
6126 "subsequent reads from that file will not block on disk I/O. The I<fd> "
6127 "argument is a file descriptor identifying the file which is to be read. The "
6128 "I<offset> argument specifies the starting point from which data is to be "
6129 "read and I<count> specifies the number of bytes to be read. I/O is "
6130 "performed in whole pages, so that I<offset> is effectively rounded down to a "
6131 "page boundary and bytes are read up to the next page boundary greater than "
6132 "or equal to I<(offset+count)>. B<readahead>() does not read beyond the end "
6133 "of the file. B<readahead>() blocks until the specified data has been "
6134 "read. The current file offset of the open file referred to by I<fd> is left "
6137 "B<readahead>() は、この後の同じファイルからのデータ読み込み時にディスク I/O "
6138 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
6139 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
6140 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
6141 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
6142 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
6143 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
6144 "B<readahead>() はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
6145 "た、 B<readahead>() は指定したデータの読み込みが終わるまで停止 (block) す"
6146 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
6150 #: build/C/man2/readahead.2:71
6152 "On success, B<readahead>() returns 0; on failure, -1 is returned, with "
6153 "I<errno> set to indicate the cause of the error."
6155 "B<readahead>() は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
6159 #: build/C/man2/readahead.2:76
6160 msgid "I<fd> is not a valid file descriptor or is not open for reading."
6162 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
6166 #: build/C/man2/readahead.2:82
6168 "I<fd> does not refer to a file type to which B<readahead>() can be applied."
6170 "I<fd> が参照しているファイルが、 B<readahead>() を行うことができないタイプの"
6174 #: build/C/man2/readahead.2:87
6176 "The B<readahead>() system call appeared in Linux 2.4.13; glibc support has "
6177 "been provided since version 2.3."
6179 "B<readahead>() システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
6180 "は glibc バージョン 2.3 以降で行われている。"
6183 #: build/C/man2/readahead.2:92
6185 "The B<readahead>() system call is Linux-specific, and its use should be "
6186 "avoided in portable applications."
6188 "B<readahead>() システムコールは Linux 固有であり、移植を考慮したプログラムで"
6192 #: build/C/man2/readahead.2:97
6193 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6195 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6198 #: build/C/man2/remap_file_pages.2:26
6200 msgid "REMAP_FILE_PAGES"
6201 msgstr "REMAP_FILE_PAGES"
6204 #: build/C/man2/remap_file_pages.2:29
6205 msgid "remap_file_pages - create a nonlinear file mapping"
6206 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
6209 #: build/C/man2/remap_file_pages.2:33
6212 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
6213 "B<#include E<lt>sys/mman.hE<gt>>\n"
6215 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
6216 "B<#include E<lt>sys/mman.hE<gt>>\n"
6219 #: build/C/man2/remap_file_pages.2:36
6222 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6223 "B< ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6225 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6226 "B< ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6229 #: build/C/man2/remap_file_pages.2:49
6231 "The B<remap_file_pages>() system call is used to create a nonlinear "
6232 "mapping, that is, a mapping in which the pages of the file are mapped into a "
6233 "nonsequential order in memory. The advantage of using B<remap_file_pages>"
6234 "() over using repeated calls to B<mmap>(2) is that the former approach "
6235 "does not require the kernel to create additional VMA (Virtual Memory Area) "
6238 "B<remap_file_pages>() システムコールは非線形なマッピング、 つまりファイルの"
6239 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
6240 "れる。 B<remap_file_pages>() を使う方が B<mmap>(2) を繰り返して使うより優れ"
6241 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
6242 "域) データ構造体を追加で作成する必要がないことである。"
6245 #: build/C/man2/remap_file_pages.2:51
6246 msgid "To create a nonlinear mapping we perform the following steps:"
6247 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
6250 #: build/C/man2/remap_file_pages.2:51
6256 #: build/C/man2/remap_file_pages.2:59
6258 "Use B<mmap>(2) to create a mapping (which is initially linear). This "
6259 "mapping must be created with the B<MAP_SHARED> flag."
6261 "B<mmap>(2) を使い、マッピングを作成する (このマッピングは最初は線形であ"
6262 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
6266 #: build/C/man2/remap_file_pages.2:59
6272 #: build/C/man2/remap_file_pages.2:67
6274 "Use one or more calls to B<remap_file_pages>() to rearrange the "
6275 "correspondence between the pages of the mapping and the pages of the file. "
6276 "It is possible to map the same page of a file into multiple locations within "
6277 "the mapped region."
6279 "B<remap_file_pages>() を 1 回以上呼び出して、 マッピングのページとファイルの"
6280 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
6284 #: build/C/man2/remap_file_pages.2:78
6286 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
6287 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
6288 "system page size; I<size> is the length of the region in bytes."
6290 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
6291 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
6292 "る。 I<size> は領域の長さであり、単位はバイトである。"
6295 #: build/C/man2/remap_file_pages.2:96
6297 "The I<addr> argument serves two purposes. First, it identifies the mapping "
6298 "whose pages we want to rearrange. Thus, I<addr> must be an address that "
6299 "falls within a region previously mapped by a call to B<mmap>(2). Second, "
6300 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
6301 "and I<size> will be placed."
6303 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
6304 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
6305 "(2) の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
6306 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
6307 "レスを、 I<addr> によって指定することである。"
6309 #. This rounding is weird, and not consistent with the treatment of
6310 #. the analogous arguments for munmap()/mprotect() and for mlock().
6313 #: build/C/man2/remap_file_pages.2:110
6315 "The values specified in I<addr> and I<size> should be multiples of the "
6316 "system page size. If they are not, then the kernel rounds I<both> values "
6317 "I<down> to the nearest multiple of the page size."
6319 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
6320 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
6324 #: build/C/man2/remap_file_pages.2:114
6325 msgid "The I<prot> argument must be specified as 0."
6326 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
6329 #: build/C/man2/remap_file_pages.2:122
6331 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
6332 "other than B<MAP_NONBLOCK> are ignored."
6334 "I<flags> 引き数は B<mmap>(2) のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
6338 #: build/C/man2/remap_file_pages.2:129
6340 "On success, B<remap_file_pages>() returns 0. On error, -1 is returned, and "
6341 "I<errno> is set appropriately."
6343 "成功した場合、 B<remap_file_pages>() は 0 を返す。 エラーの場合、-1 が返さ"
6344 "れ、 I<errno> が適切に設定される。"
6347 #: build/C/man2/remap_file_pages.2:137
6349 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
6352 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
6355 #. And possibly others from vma->vm_ops->populate()
6357 #: build/C/man2/remap_file_pages.2:146
6358 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
6359 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
6362 #: build/C/man2/remap_file_pages.2:151
6364 "The B<remap_file_pages>() system call appeared in Linux 2.5.46; glibc "
6365 "support was added in version 2.3.3."
6367 "B<remap_file_pages>() システムコールは Linux 2.5.46 で登場した。 glibc での"
6368 "サポートは glibc バージョン 2.3.3 で追加された。"
6371 #: build/C/man2/remap_file_pages.2:155
6372 msgid "The B<remap_file_pages>() system call is Linux-specific."
6373 msgstr "B<remap_file_pages>() システムコールは Linux 固有のものである。"
6376 #: build/C/man2/remap_file_pages.2:161
6378 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6381 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6385 #: build/C/man3/shm_open.3:26
6391 #: build/C/man3/shm_open.3:26
6397 #: build/C/man3/shm_open.3:29
6399 "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
6401 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
6405 #: build/C/man3/shm_open.3:33
6406 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
6407 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
6410 #: build/C/man3/shm_open.3:35
6411 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
6412 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
6415 #: build/C/man3/shm_open.3:37
6417 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
6419 "B<void * shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t "
6423 #: build/C/man3/shm_open.3:39
6424 msgid "B<int shm_unlink(const char *>I<name>B<);>"
6425 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
6428 #: build/C/man3/shm_open.3:41
6429 msgid "Link with I<-lrt>."
6430 msgstr "I<-lrt> でリンクする。"
6433 #: build/C/man3/shm_open.3:53
6435 "B<shm_open>() creates and opens a new, or opens an existing, POSIX shared "
6436 "memory object. A POSIX shared memory object is in effect a handle which can "
6437 "be used by unrelated processes to B<mmap>(2) the same region of shared "
6438 "memory. The B<shm_unlink>() function performs the converse operation, "
6439 "removing an object previously created by B<shm_open>()."
6441 "B<shm_open>() は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
6442 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
6443 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
6444 "(2) するために使用することができる手段である。 B<shm_unlink>() は、逆の操"
6445 "作、つまり以前に B<shm_open>() で作成されたオブジェクトの削除を行う。"
6447 #. glibc allows the initial slash to be omitted, and makes
6448 #. multiple initial slashes equivalent to a single slash.
6449 #. This differs from the implementation of POSIX message queues.
6450 #. glibc allows subdirectory components in the name, in which
6451 #. case the subdirectory must exist under /dev/shm, and allow the
6452 #. required permissions if a user wants to create a shared memory
6453 #. object in that subdirectory.
6455 #: build/C/man3/shm_open.3:74
6457 "The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> "
6458 "specifies the shared memory object to be created or opened. For portable "
6459 "use, a shared memory object should be identified by a name of the form I</"
6460 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
6461 "255) characters consisting of an initial slash, followed by one or more "
6462 "characters, none of which are slashes."
6464 "B<shm_open>() の動作は B<open>(2) とよく似ている。 I<name> で作成したりオー"
6465 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
6466 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
6467 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
6468 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
6471 #: build/C/man3/shm_open.3:81
6473 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
6474 "or B<O_RDWR> and any of the other flags listed here:"
6476 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
6477 "述べる他のフラグの論理和をとったもの を指定する。"
6480 #: build/C/man3/shm_open.3:81
6483 msgstr "B<O_RDONLY>"
6486 #: build/C/man3/shm_open.3:87
6488 "Open the object for read access. A shared memory object opened in this way "
6489 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
6491 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
6492 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
6493 "B<mmap>(2) することができる。"
6496 #: build/C/man3/shm_open.3:87
6502 #: build/C/man3/shm_open.3:90
6503 msgid "Open the object for read-write access."
6504 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
6507 #: build/C/man3/shm_open.3:90
6512 #. In truth it is actually the file system IDs on Linux, but these
6513 #. are nearly always the same as the effective IDs. (MTK, Jul 05)
6515 #: build/C/man3/shm_open.3:110
6517 "Create the shared memory object if it does not exist. The user and group "
6518 "ownership of the object are taken from the corresponding effective IDs of "
6519 "the calling process, and the object's permission bits are set according to "
6520 "the low-order 9 bits of I<mode>, except that those bits set in the process "
6521 "file mode creation mask (see B<umask>(2)) are cleared for the new object. "
6522 "A set of macro constants which can be used to define I<mode> is listed in "
6523 "B<open>(2). (Symbolic definitions of these constants can be obtained by "
6524 "including I<E<lt>sys/stat.hE<gt>>.)"
6526 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
6527 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
6528 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
6529 "ルモード作成マスク (B<umask>(2) 参照) に設定されている値は、新規オブジェクト"
6530 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
6531 "B<open>(2) に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
6532 "hE<gt>> のインクルードにより得られる)。"
6535 #: build/C/man3/shm_open.3:116
6537 "A new shared memory object initially has zero length\\(emthe size of the "
6538 "object can be set using B<ftruncate>(2). The newly allocated bytes of a "
6539 "shared memory object are automatically initialized to 0."
6541 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
6542 "トの大きさは B<ftruncate>(2) を使って設定できる。 共有メモリ・オブジェクトと"
6543 "して新規に確保されたバイトは自動的に 0 に初期化される。"
6546 #: build/C/man3/shm_open.3:116
6552 #: build/C/man3/shm_open.3:125
6554 "If B<O_CREAT> was also specified, and a shared memory object with the given "
6555 "I<name> already exists, return an error. The check for the existence of the "
6556 "object, and its creation if it does not exist, are performed atomically."
6558 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
6559 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
6560 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
6564 #: build/C/man3/shm_open.3:125
6570 #: build/C/man3/shm_open.3:128
6571 msgid "If the shared memory object already exists, truncate it to zero bytes."
6573 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
6577 #: build/C/man3/shm_open.3:131
6579 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
6582 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
6585 #: build/C/man3/shm_open.3:142
6587 "On successful completion B<shm_open>() returns a new file descriptor "
6588 "referring to the shared memory object. This file descriptor is guaranteed "
6589 "to be the lowest-numbered file descriptor not previously opened within the "
6590 "process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file "
6593 "成功して完了した場合、 B<shm_open>() は共有メモリ・オブジェクトを参照する新"
6594 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
6595 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
6596 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2) を参照) が、この"
6597 "ファイル・ディスクリプタに設定される。"
6600 #: build/C/man3/shm_open.3:151
6602 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2) "
6603 "(for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) "
6604 "the file descriptor may be closed without affecting the memory mapping."
6606 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
6607 "(2) (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2) の呼び出しに使用"
6608 "される。 B<mmap>(2) を呼び出した後は、ファイル・ディスクリプタをクローズして"
6609 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
6612 #: build/C/man3/shm_open.3:169
6614 "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a "
6615 "shared memory object name, and, once all processes have unmapped the object, "
6616 "de-allocates and destroys the contents of the associated memory region. "
6617 "After a successful B<shm_unlink>(), attempts to B<shm_open>() an object "
6618 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
6619 "case a new, distinct object is created)."
6621 "B<shm_unlink>() の動作は B<unlink>(2) とよく似ている: 共有メモリ・オブジェ"
6622 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
6623 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
6624 "B<shm_unlink>() が成功した後で、同じ I<name> を持つオブジェクトに対して "
6625 "B<shm_open>() を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
6626 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
6629 #: build/C/man3/shm_open.3:178
6631 "On success, B<shm_open>() returns a nonnegative file descriptor. On "
6632 "failure, B<shm_open>() returns -1. B<shm_unlink>() returns 0 on success, "
6635 "成功した場合、 B<shm_open>() は非負のファイル・ディスクリプタを返す。 失敗し"
6636 "た場合、 B<shm_open>() は -1 を返す。 B<shm_unlink>() は、成功した場合 0 "
6637 "を、エラーが起こった場合 -1 を返す。"
6640 #: build/C/man3/shm_open.3:185
6642 "On failure, I<errno> is set to indicate the cause of the error. Values "
6643 "which may appear in I<errno> include the following:"
6645 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
6649 #: build/C/man3/shm_open.3:190
6650 msgid "Permission to B<shm_unlink>() the shared memory object was denied."
6651 msgstr "共有メモリオブジェクトを B<shm_unlink>() する権限がなかった。"
6654 #: build/C/man3/shm_open.3:200
6656 "Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or "
6657 "B<O_TRUNC> was specified and the caller does not have write permission on "
6660 "指定された I<mode> で I<name> を B<shm_open>() する権限がなかった。もしく"
6661 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
6665 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:192
6671 #: build/C/man3/shm_open.3:211
6673 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the "
6674 "shared memory object specified by I<name> already exists."
6676 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>() に指定されたが、 I<name> で指"
6677 "定された共有メモリ・オブジェクトが既に存在した。"
6680 #: build/C/man3/shm_open.3:218
6681 msgid "The I<name> argument to B<shm_open>() was invalid."
6682 msgstr "B<shm_open>() に与えられた I<name> 引き数が不正であった。"
6685 #: build/C/man3/shm_open.3:218
6691 #: build/C/man3/shm_open.3:221
6692 msgid "The process already has the maximum number of files open."
6693 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
6696 #: build/C/man3/shm_open.3:221
6698 msgid "B<ENAMETOOLONG>"
6699 msgstr "B<ENAMETOOLONG>"
6702 #: build/C/man3/shm_open.3:227
6703 msgid "The length of I<name> exceeds B<PATH_MAX>."
6704 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
6707 #: build/C/man3/shm_open.3:231
6709 "The limit on the total number of files open on the system has been reached."
6710 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
6713 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
6714 #: build/C/man2/shmget.2:206
6720 #: build/C/man3/shm_open.3:240
6722 "An attempt was made to B<shm_open>() a I<name> that did not exist, and "
6723 "B<O_CREAT> was not specified."
6725 "存在していない I<name> のオブジェクトを B<shm_open>() しようとしたが、 "
6726 "B<O_CREAT> が指定されていなかった。"
6729 #: build/C/man3/shm_open.3:247
6731 "An attempt was to made to B<shm_unlink>() a I<name> that does not exist."
6732 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>() しようとした。"
6735 #: build/C/man3/shm_open.3:249
6736 msgid "These functions are provided in glibc 2.2 and later."
6737 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
6740 #: build/C/man3/shm_open.3:255
6742 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
6743 "object is set to either the calling process's effective group ID or \"a "
6744 "system default group ID\"."
6746 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
6747 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
6748 "ID」 のどちらかに設定される、と書かれている。"
6751 #: build/C/man3/shm_open.3:264
6753 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
6754 "unspecified. On Linux, this will successfully truncate an existing shared "
6755 "memory object\\(emthis may not be so on other UNIX systems."
6757 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
6758 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
6759 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
6762 #: build/C/man3/shm_open.3:269
6764 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
6765 "dedicated file system, which is normally mounted under I</dev/shm>."
6767 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
6768 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
6771 #: build/C/man3/shm_open.3:279
6773 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6774 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6776 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6777 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6780 #: build/C/man7/shm_overview.7:27
6782 msgid "SHM_OVERVIEW"
6783 msgstr "SHM_OVERVIEW"
6786 #: build/C/man7/shm_overview.7:30
6787 msgid "shm_overview - Overview of POSIX shared memory"
6788 msgstr "shm_overview - POSIX 共有メモリの概要"
6791 #: build/C/man7/shm_overview.7:33
6793 "The POSIX shared memory API allows processes to communicate information by "
6794 "sharing a region of memory."
6796 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
6800 #: build/C/man7/shm_overview.7:35
6801 msgid "The interfaces employed in the API are:"
6802 msgstr "この API では以下のインターフェースが採用されている。"
6805 #: build/C/man7/shm_overview.7:35
6807 msgid "B<shm_open>(3)"
6808 msgstr "B<shm_open>(3)"
6811 #: build/C/man7/shm_overview.7:42
6813 "Create and open a new object, or open an existing object. This is analogous "
6814 "to B<open>(2). The call returns a file descriptor for use by the other "
6815 "interfaces listed below."
6817 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
6818 "する。これは B<open>(2) と同じである。下記にある他のインターフェースで使用す"
6822 #: build/C/man7/shm_overview.7:42
6824 msgid "B<ftruncate>(2)"
6825 msgstr "B<ftruncate>(2)"
6828 #: build/C/man7/shm_overview.7:46
6830 "Set the size of the shared memory object. (A newly created shared memory "
6831 "object has a length of zero.)"
6832 msgstr "共有メモリオブジェクトの大きさを設定する。"
6835 #: build/C/man7/shm_overview.7:50
6837 "Map the shared memory object into the virtual address space of the calling "
6840 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
6843 #: build/C/man7/shm_overview.7:50
6845 msgid "B<munmap>(2)"
6846 msgstr "B<munmap>(2)"
6849 #: build/C/man7/shm_overview.7:54
6851 "Unmap the shared memory object from the virtual address space of the calling "
6854 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
6858 #: build/C/man7/shm_overview.7:54
6860 msgid "B<shm_unlink>(3)"
6861 msgstr "B<shm_unlink>(3)"
6864 #: build/C/man7/shm_overview.7:57
6865 msgid "Remove a shared memory object name."
6866 msgstr "共有メモリオブジェクト名を削除する。"
6869 #: build/C/man7/shm_overview.7:57
6872 msgstr "B<close>(2)"
6875 #: build/C/man7/shm_overview.7:62
6877 "Close the file descriptor allocated by B<shm_open>(3) when it is no longer "
6880 "B<shm_open>(3) で割り当てられたファイルディスクリプタが不要になった際に、 そ"
6881 "のファイルディスクリプタをクローズする。"
6884 #: build/C/man7/shm_overview.7:62
6887 msgstr "B<fstat>(2)"
6890 #: build/C/man7/shm_overview.7:76
6892 "Obtain a I<stat> structure that describes the shared memory object. Among "
6893 "the information returned by this call are the object's size (I<st_size>), "
6894 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
6896 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
6897 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
6898 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>) がある。"
6901 #: build/C/man7/shm_overview.7:76
6903 msgid "B<fchown>(2)"
6904 msgstr "B<fchown>(2)"
6907 #: build/C/man7/shm_overview.7:79
6908 msgid "To change the ownership of a shared memory object."
6909 msgstr "共有メモリオブジェクトの所有権を変更する。"
6912 #: build/C/man7/shm_overview.7:79
6914 msgid "B<fchmod>(2)"
6915 msgstr "B<fchmod>(2)"
6918 #: build/C/man7/shm_overview.7:82
6919 msgid "To change the permissions of a shared memory object."
6920 msgstr "共有メモリオブジェクトの許可属性を変更する。"
6923 #: build/C/man7/shm_overview.7:82
6929 #: build/C/man7/shm_overview.7:84
6930 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
6931 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
6934 #: build/C/man7/shm_overview.7:84
6940 #: build/C/man7/shm_overview.7:89
6942 "POSIX shared memory objects have kernel persistence: a shared memory object "
6943 "will exist until the system is shut down, or until all processes have "
6944 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
6946 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
6947 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
6948 "マップし、 B<shm_unlink>(3) で削除されるまで、存在し続ける。"
6951 #: build/C/man7/shm_overview.7:89
6957 #: build/C/man7/shm_overview.7:94
6959 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
6960 "to link against the real-time library, I<librt>."
6962 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
6963 "タイムライブラリ I<librt> とリンクしなければならない。"
6966 #: build/C/man7/shm_overview.7:94
6968 msgid "Accessing shared memory objects via the file system"
6969 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
6972 #: build/C/man7/shm_overview.7:101
6974 "On Linux, shared memory objects are created in a (I<tmpfs>) virtual file "
6975 "system, normally mounted under I</dev/shm>. Since kernel 2.6.19, Linux "
6976 "supports the use of access control lists (ACLs) to control the permissions "
6977 "of objects in the virtual file system."
6979 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
6980 "ファイルシステム (I<tmpfs>) 内に作成される。 カーネル 2.6.19 以降の Linux で"
6981 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
6982 "スト (ACL; access control lists) を使うことができる。"
6985 #: build/C/man7/shm_overview.7:106
6987 "Typically, processes must synchronize their access to a shared memory "
6988 "object, using, for example, POSIX semaphores."
6990 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
6991 "使ってプロセス間で同期をとらなければならない。"
6994 #: build/C/man7/shm_overview.7:114
6996 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
6997 "memory API. POSIX shared memory provides a simpler, and better designed "
6998 "interface; on the other hand POSIX shared memory is somewhat less widely "
6999 "available (especially on older systems) than System V shared memory."
7001 "System V 共有メモリ (B<shmget>(2), B<shmop>(2) など) は古い共有メモリ API で"
7002 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
7003 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
7004 "システムが少ない (特に、古いシステムでは少ない)。"
7007 #: build/C/man7/shm_overview.7:126
7009 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7010 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7011 "B<shm_unlink>(3), B<sem_overview>(7)"
7013 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7014 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7015 "B<shm_unlink>(3), B<sem_overview>(7)"
7018 #: build/C/man2/shmctl.2:43
7024 #: build/C/man2/shmctl.2:43
7030 #: build/C/man2/shmctl.2:46
7031 msgid "shmctl - shared memory control"
7032 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
7035 #: build/C/man2/shmctl.2:49 build/C/man2/shmget.2:42
7036 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
7037 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
7040 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
7041 msgid "B<#include E<lt>sys/shm.hE<gt>>"
7042 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
7045 #: build/C/man2/shmctl.2:53
7047 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7049 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7052 #: build/C/man2/shmctl.2:60
7054 "B<shmctl>() performs the control operation specified by I<cmd> on the "
7055 "shared memory segment whose identifier is given in I<shmid>."
7057 "B<shmctl>() は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
7061 #: build/C/man2/shmctl.2:65
7063 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
7064 "I<E<lt>sys/shm.hE<gt>> as follows:"
7066 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
7067 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
7070 #: build/C/man2/shmctl.2:79
7073 "struct shmid_ds {\n"
7074 " struct ipc_perm shm_perm; /* Ownership and permissions */\n"
7075 " size_t shm_segsz; /* Size of segment (bytes) */\n"
7076 " time_t shm_atime; /* Last attach time */\n"
7077 " time_t shm_dtime; /* Last detach time */\n"
7078 " time_t shm_ctime; /* Last change time */\n"
7079 " pid_t shm_cpid; /* PID of creator */\n"
7080 " pid_t shm_lpid; /* PID of last shmat(2)/shmdt(2) */\n"
7081 " shmatt_t shm_nattch; /* No. of current attaches */\n"
7085 "struct shmid_ds {\n"
7086 " struct ipc_perm shm_perm; /* 所有権と許可 */\n"
7087 " size_t shm_segsz; /* セグメントのサイズ (バイト) */\n"
7088 " time_t shm_atime; /* 最後の付加 (attach) の時刻 */\n"
7089 " time_t shm_dtime; /* 最後の分離 (detach) の時刻 */\n"
7090 " time_t shm_ctime; /* 最後に変更が行われた時刻 */\n"
7091 " pid_t shm_cpid; /* 作成者 (creator) の PID */\n"
7092 " pid_t shm_lpid; /* 最後の shmat(2)/shmdt(2) の PID */\n"
7093 " shmatt_t shm_nattch; /* 現在付加されている数 */\n"
7098 #: build/C/man2/shmctl.2:87
7100 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
7101 "(the highlighted fields are settable using B<IPC_SET>):"
7103 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
7104 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
7107 #: build/C/man2/shmctl.2:100
7110 "struct ipc_perm {\n"
7111 " key_t __key; /* Key supplied to shmget(2) */\n"
7112 " uid_t B<uid>; /* Effective UID of owner */\n"
7113 " gid_t B<gid>; /* Effective GID of owner */\n"
7114 " uid_t cuid; /* Effective UID of creator */\n"
7115 " gid_t cgid; /* Effective GID of creator */\n"
7116 " unsigned short B<mode>; /* B<Permissions> + SHM_DEST and\n"
7117 " SHM_LOCKED flags */\n"
7118 " unsigned short __seq; /* Sequence number */\n"
7121 "struct ipc_perm {\n"
7122 " key_t __key; /* shmget(2) に与えられるキー */\n"
7123 " uid_t B<uid>; /* 所有者の実効 UID */\n"
7124 " gid_t B<gid>; /* 所有者の実効 GID */\n"
7125 " uid_t cuid; /* 作成者の実効 UID */\n"
7126 " gid_t cgid; /* 作成者の実効 GID */\n"
7127 " unsigned short B<mode>; /* B<許可> + SHM_DEST と\n"
7128 " SHM_LOCKED フラグ */\n"
7129 " unsigned short __seq; /* シーケンス番号 */\n"
7133 #: build/C/man2/shmctl.2:106
7134 msgid "Valid values for I<cmd> are:"
7135 msgstr "I<cmd> として有効な値は以下の通り:"
7138 #: build/C/man2/shmctl.2:107
7141 msgstr "B<IPC_STAT>"
7144 #: build/C/man2/shmctl.2:116
7146 "Copy information from the kernel data structure associated with I<shmid> "
7147 "into the I<shmid_ds> structure pointed to by I<buf>. The caller must have "
7148 "read permission on the shared memory segment."
7150 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
7151 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
7152 "読み込み許可を持たなければならない。"
7155 #: build/C/man2/shmctl.2:116
7161 #: build/C/man2/shmctl.2:134
7163 "Write the values of some members of the I<shmid_ds> structure pointed to by "
7164 "I<buf> to the kernel data structure associated with this shared memory "
7165 "segment, updating also its I<shm_ctime> member. The following fields can be "
7166 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
7167 "of) I<shm_perm.mode>. The effective UID of the calling process must match "
7168 "the owner (I<shm_perm.uid>) or creator (I<shm_perm.cuid>) of the shared "
7169 "memory segment, or the caller must be privileged."
7171 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
7172 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
7173 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
7174 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
7175 "セスの実効 UID が所有者 (I<shm_perm.uid>) または作成者 (I<shm_perm.cuid>) "
7176 "と一致するか、呼び出し元が特権を持たなければならない。"
7179 #: build/C/man2/shmctl.2:134
7182 msgstr "B<IPC_RMID>"
7185 #: build/C/man2/shmctl.2:151
7187 "Mark the segment to be destroyed. The segment will only actually be "
7188 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
7189 "member of the associated structure I<shmid_ds> is zero). The caller must be "
7190 "the owner or creator, or be privileged. If a segment has been marked for "
7191 "destruction, then the (nonstandard) B<SHM_DEST> flag of the I<shm_perm."
7192 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
7195 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
7196 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
7197 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
7198 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
7199 "造体において I<shm_perm.mode> フィールドの (標準ではない) B<SHM_DEST> フラグ"
7200 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
7203 #: build/C/man2/shmctl.2:154
7205 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
7206 "its pages that were faulted in will remain in memory or swap."
7208 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
7209 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
7213 #: build/C/man2/shmctl.2:154
7215 msgid "B<IPC_INFO> (Linux-specific)"
7216 msgstr "B<IPC_INFO> (Linux 固有)"
7219 #: build/C/man2/shmctl.2:167
7221 "Returns information about system-wide shared memory limits and parameters in "
7222 "the structure pointed to by I<buf>. This structure is of type I<shminfo> "
7223 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
7224 "B<_GNU_SOURCE> feature test macro is defined:"
7226 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
7227 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
7228 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7229 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7232 #: build/C/man2/shmctl.2:181
7235 "struct shminfo {\n"
7236 " unsigned long shmmax; /* Maximum segment size */\n"
7237 " unsigned long shmmin; /* Minimum segment size;\n"
7239 " unsigned long shmmni; /* Maximum number of segments */\n"
7240 " unsigned long shmseg; /* Maximum number of segments\n"
7241 " that a process can attach;\n"
7242 " unused within kernel */\n"
7243 " unsigned long shmall; /* Maximum number of pages of\n"
7244 " shared memory, system-wide */\n"
7247 "struct shminfo {\n"
7248 " unsigned long shmmax; /* 最大セグメントサイズ */\n"
7249 " unsigned long shmmin; /* 最小セグメントサイズ。\n"
7251 " unsigned long shmmni; /* 最大セグメント数 */\n"
7252 " unsigned long shmseg; /* プロセスが付加できる\n"
7255 " unsigned long shmall; /* 共有メモリの最大ページ数。\n"
7260 #: build/C/man2/shmctl.2:194
7262 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
7263 "files of the same name; see B<proc>(5) for details."
7265 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
7266 "で変更可能である。 詳しくは B<proc>(5) を参照。"
7269 #: build/C/man2/shmctl.2:194
7271 msgid "B<SHM_INFO> (Linux-specific)"
7272 msgstr "B<SHM_INFO> (Linux 固有)"
7275 #: build/C/man2/shmctl.2:205
7277 "Returns a I<shm_info> structure whose fields contain information about "
7278 "system resources consumed by shared memory. This structure is defined in "
7279 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
7281 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
7282 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7283 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7286 #: build/C/man2/shmctl.2:222
7289 "struct shm_info {\n"
7290 " int used_ids; /* # of currently existing\n"
7292 " unsigned long shm_tot; /* Total number of shared\n"
7293 " memory pages */\n"
7294 " unsigned long shm_rss; /* # of resident shared\n"
7295 " memory pages */\n"
7296 " unsigned long shm_swp; /* # of swapped shared\n"
7297 " memory pages */\n"
7298 " unsigned long swap_attempts;\n"
7299 " /* Unused since Linux 2.4 */\n"
7300 " unsigned long swap_successes;\n"
7301 " /* Unused since Linux 2.4 */\n"
7304 "struct shm_info {\n"
7305 " int used_ids; /* 現在存在するセグメント数 */\n"
7306 " unsigned long shm_tot; /* 共有メモリのページ総数 */\n"
7307 " unsigned long shm_rss; /* メモリ上にある (スワップされて\n"
7308 " いない) 共有メモリページ数 */\n"
7309 " unsigned long shm_swp; /* スワップされている共有メモリ\n"
7311 " unsigned long swap_attempts;\n"
7312 " /* Linux 2.4 以降では未使用 */\n"
7313 " unsigned long swap_successes;\n"
7314 " /* Linux 2.4 以降では未使用 */\n"
7318 #: build/C/man2/shmctl.2:224
7320 msgid "B<SHM_STAT> (Linux-specific)"
7321 msgstr "B<SHM_STAT> (Linux 固有)"
7324 #: build/C/man2/shmctl.2:235
7326 "Returns a I<shmid_ds> structure as for B<IPC_STAT>. However, the I<shmid> "
7327 "argument is not a segment identifier, but instead an index into the kernel's "
7328 "internal array that maintains information about all shared memory segments "
7331 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
7332 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
7333 "管理するカーネルの内部配列へのインデックス である。"
7336 #: build/C/man2/shmctl.2:238
7338 "The caller can prevent or allow swapping of a shared memory segment with the "
7339 "following I<cmd> values:"
7341 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
7342 "ワップされることを防止したり、許可したりできる:"
7345 #: build/C/man2/shmctl.2:239
7347 msgid "B<SHM_LOCK> (Linux-specific)"
7348 msgstr "B<SHM_LOCK> (Linux 固有)"
7351 #: build/C/man2/shmctl.2:251
7353 "Prevent swapping of the shared memory segment. The caller must fault in any "
7354 "pages that are required to be present after locking is enabled. If a "
7355 "segment has been locked, then the (nonstandard) B<SHM_LOCKED> flag of the "
7356 "I<shm_perm.mode> field in the associated data structure retrieved by "
7357 "B<IPC_STAT> will be set."
7359 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
7360 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
7361 "らない。 セグメントがロックされると、 関連するデータ構造体において "
7362 "I<shm_perm.mode> フィールドの (標準的ではない) B<SHM_LOCKED> フラグが設定さ"
7363 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
7366 #: build/C/man2/shmctl.2:251
7368 msgid "B<SHM_UNLOCK> (Linux-specific)"
7369 msgstr "B<SHM_UNLOCK> (Linux 固有)"
7372 #: build/C/man2/shmctl.2:254
7373 msgid "Unlock the segment, allowing it to be swapped out."
7374 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
7376 #. There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
7377 #. be applied to a segment, regardless of ownership of the segment.
7378 #. This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
7379 #. in 2.6.10. MTK, May 2005
7381 #: build/C/man2/shmctl.2:272
7383 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
7384 "and B<SHM_UNLOCK>. Since kernel 2.6.10, an unprivileged process can employ "
7385 "these operations if its effective UID matches the owner or creator UID of "
7386 "the segment, and (for B<SHM_LOCK>) the amount of memory to be locked falls "
7387 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
7389 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
7390 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
7391 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
7392 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
7393 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
7394 "上限 (B<setrlimit>(2) 参照) の範囲内に入っていることである。"
7397 #: build/C/man2/shmctl.2:290
7399 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
7400 "highest used entry in the kernel's internal array recording information "
7401 "about all shared memory segments. (This information can be used with "
7402 "repeated B<SHM_STAT> operations to obtain information about all shared "
7403 "memory segments on the system.) A successful B<SHM_STAT> operation returns "
7404 "the identifier of the shared memory segment whose index was given in "
7405 "I<shmid>. Other operations return 0 on success."
7407 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
7408 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
7409 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
7410 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
7411 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
7412 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
7415 #: build/C/man2/shmctl.2:294
7416 msgid "On error, -1 is returned, and I<errno> is set appropriately."
7417 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
7420 #: build/C/man2/shmctl.2:303
7422 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
7423 "read access for I<shmid>, and the calling process does not have the "
7424 "B<CAP_IPC_OWNER> capability."
7426 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
7427 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
7428 "ケーパビリティ (capability) を持っていない。"
7431 #: build/C/man2/shmctl.2:314
7433 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
7434 "pointed to by I<buf> isn't accessible."
7436 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
7440 #: build/C/man2/shmctl.2:314
7446 #: build/C/man2/shmctl.2:317
7447 msgid "I<shmid> points to a removed identifier."
7448 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
7451 #: build/C/man2/shmctl.2:326
7453 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command. Or: "
7454 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
7455 "to an array slot that is currently unused."
7457 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
7458 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
7462 #: build/C/man2/shmctl.2:337
7464 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
7465 "be-locked segment would mean that the total bytes in locked shared memory "
7466 "segments would exceed the limit for the real user ID of the calling "
7467 "process. This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
7468 "(see B<setrlimit>(2))."
7470 "(2.6.9 以降のカーネルにおいて) B<SHM_LOCK> が指定され、 ロックされる予定のセ"
7471 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
7472 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
7473 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2) を参照)。"
7476 #: build/C/man2/shmctl.2:337
7478 msgid "B<EOVERFLOW>"
7479 msgstr "B<EOVERFLOW>"
7482 #: build/C/man2/shmctl.2:342
7484 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
7485 "in the structure pointed to by I<buf>."
7487 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
7491 #: build/C/man2/shmctl.2:354
7493 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
7494 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
7495 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
7496 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
7498 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
7499 "作成者 (I<shm_perm.cuid>) でも所有者 (I<shm_perm.uid>) でもなく、プロセスが"
7500 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
7503 #: build/C/man2/shmctl.2:366
7505 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
7506 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
7507 "capability). (Since Linux 2.6.9, this error can also occur if the "
7508 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
7510 "または (2.6.9 より前のカーネルで) B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
7511 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
7512 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
7513 "が特権を持たない場合にも、このエラーが起こる。)"
7515 #. SVr4 documents an additional error condition EMFILE.
7517 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:232
7518 #: build/C/man2/shmop.2:229
7519 msgid "SVr4, POSIX.1-2001."
7520 msgstr "SVr4, POSIX.1-2001."
7523 #: build/C/man2/shmctl.2:382
7525 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
7526 "B<ipcs>(1) program to provide information on allocated resources. In the "
7527 "future these may modified or moved to a /proc file system interface."
7529 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1) プログラムで割り当"
7530 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
7531 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
7534 #: build/C/man2/shmctl.2:390
7536 "Linux permits a process to attach (B<shmat>(2)) a shared memory segment "
7537 "that has already been marked for deletion using I<shmctl(IPC_RMID)>. This "
7538 "feature is not available on other UNIX implementations; portable "
7539 "applications should avoid relying on it."
7541 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
7542 "メモリ・セグメントを あるプロセスが付加 (attach) (B<shmat>(2)) することを許"
7543 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
7544 "プリケーションではこれに依存しないようにすべきである。"
7547 #: build/C/man2/shmctl.2:403
7549 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
7550 "2.2 and have become I<long> under Linux 2.4. To take advantage of this, a "
7551 "recompilation under glibc-2.1.91 or later should suffice. (The kernel "
7552 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
7554 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
7555 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
7556 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
7557 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
7560 #: build/C/man2/shmctl.2:409
7562 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7565 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7566 "B<shm_overview>(7), B<svipc>(7)"
7569 #: build/C/man2/shmget.2:36
7575 #: build/C/man2/shmget.2:36
7581 #: build/C/man2/shmget.2:39
7582 msgid "shmget - allocates a shared memory segment"
7583 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
7586 #: build/C/man2/shmget.2:46
7587 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7588 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7591 #: build/C/man2/shmget.2:70
7593 "B<shmget>() returns the identifier of the shared memory segment associated "
7594 "with the value of the argument I<key>. A new shared memory segment, with "
7595 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
7596 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
7597 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
7598 "B<IPC_CREAT> is specified in I<shmflg>."
7600 "B<shmget>() は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
7601 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
7602 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
7603 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
7604 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
7608 #: build/C/man2/shmget.2:89
7610 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
7611 "segment already exists for I<key>, then B<shmget>() fails with I<errno> set "
7612 "to B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT "
7613 "| O_EXCL> for B<open>(2).)"
7615 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
7616 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>() は失敗し、 "
7617 "I<errno> に B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | "
7618 "O_EXCL> を指定した場合の動作と同じである)。"
7621 #: build/C/man2/shmget.2:93
7622 msgid "The value I<shmflg> is composed of:"
7623 msgstr "I<shmflg> は以下の内容から構成される:"
7626 #: build/C/man2/shmget.2:93
7628 msgid "B<IPC_CREAT>"
7629 msgstr "B<IPC_CREAT>"
7632 #: build/C/man2/shmget.2:100
7634 "to create a new segment. If this flag is not used, then B<shmget>() will "
7635 "find the segment associated with I<key> and check to see if the user has "
7636 "permission to access the segment."
7638 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>() "
7639 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
7643 #: build/C/man2/shmget.2:100
7646 msgstr "B<IPC_EXCL>"
7649 #: build/C/man2/shmget.2:103
7650 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
7652 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
7656 #: build/C/man2/shmget.2:103
7658 msgid "I<mode_flags>"
7659 msgstr "I<mode_flags>"
7662 #: build/C/man2/shmget.2:113
7664 "(least significant 9 bits) specifying the permissions granted to the owner, "
7665 "group, and world. These bits have the same format, and the same meaning, as "
7666 "the I<mode> argument of B<open>(2). Presently, the execute permissions are "
7667 "not used by the system."
7669 "(下位 9 ビット) 所有者、グループ、他人 (world) への許可を指定する。 これらの"
7670 "ビットは B<open>(2) の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
7671 "ろ、システムは実行 (execute) 許可を参照しない。"
7674 #: build/C/man2/shmget.2:113
7676 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
7677 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
7680 #: build/C/man2/shmget.2:119
7682 "Allocate the segment using \"huge pages.\" See the kernel source file "
7683 "I<Documentation/vm/hugetlbpage.txt> for further information."
7685 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
7686 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
7689 #: build/C/man2/shmget.2:119
7691 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
7692 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
7694 #. As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
7697 #: build/C/man2/shmget.2:138
7699 "This flag serves the same purpose as the B<mmap>(2) B<MAP_NORESERVE> flag. "
7700 "Do not reserve swap space for this segment. When swap space is reserved, "
7701 "one has the guarantee that it is possible to modify the segment. When swap "
7702 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
7703 "memory is available. See also the discussion of the file I</proc/sys/vm/"
7704 "overcommit_memory> in B<proc>(5)."
7706 "このフラグは、 B<mmap>(2) の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
7707 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
7708 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
7709 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
7710 "る可能性がある。 B<proc>(5) にある I</proc/sys/vm/overcommit_memory> ファイ"
7714 #: build/C/man2/shmget.2:146
7716 "When a new shared memory segment is created, its contents are initialized to "
7717 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
7718 "(2)), is initialized as follows:"
7720 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
7721 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
7725 #: build/C/man2/shmget.2:151
7727 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
7730 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
7734 #: build/C/man2/shmget.2:156
7736 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
7737 "the calling process."
7739 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
7743 #: build/C/man2/shmget.2:161
7745 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
7746 "significant 9 bit of I<shmflg>."
7748 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
7751 #: build/C/man2/shmget.2:165
7752 msgid "I<shm_segsz> is set to the value of I<size>."
7753 msgstr "I<shm_segsz> に I<size> の値を設定する。"
7756 #: build/C/man2/shmget.2:172
7757 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
7759 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
7762 #: build/C/man2/shmget.2:175
7763 msgid "I<shm_ctime> is set to the current time."
7764 msgstr "I<shm_ctime> に現在の時刻を設定する。"
7767 #: build/C/man2/shmget.2:178
7769 "If the shared memory segment already exists, the permissions are verified, "
7770 "and a check is made to see if it is marked for destruction."
7772 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
7773 "(destruction) マークがつけられていないかのチェックが行われる。"
7776 #: build/C/man2/shmget.2:182
7778 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
7780 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
7784 #: build/C/man2/shmget.2:186
7785 msgid "On failure, I<errno> is set to one of the following:"
7786 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
7789 #: build/C/man2/shmget.2:192
7791 "The user does not have permission to access the shared memory segment, and "
7792 "does not have the B<CAP_IPC_OWNER> capability."
7794 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
7795 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
7798 #: build/C/man2/shmget.2:196
7799 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
7801 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
7804 #: build/C/man2/shmget.2:202
7806 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
7807 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
7808 "existed, but I<size> is greater than the size of that segment."
7810 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
7811 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
7812 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
7813 "在するセグメントの サイズよりも大きかった。"
7816 #: build/C/man2/shmget.2:211
7818 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
7820 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
7824 #: build/C/man2/shmget.2:214
7825 msgid "No memory could be allocated for segment overhead."
7826 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
7829 #: build/C/man2/shmget.2:222
7831 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
7832 "segment of the requested I<size> would cause the system to exceed the system-"
7833 "wide limit on shared memory (B<SHMALL>)."
7835 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>) に達した、または要"
7836 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
7837 "限 (B<SHMALL>) を超過した。"
7840 #: build/C/man2/shmget.2:229
7842 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
7843 "(did not have the B<CAP_IPC_LOCK> capability)."
7845 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
7846 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
7849 #: build/C/man2/shmget.2:235
7850 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
7851 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
7854 #: build/C/man2/shmget.2:245
7856 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special "
7857 "value is used for I<key>, the system call ignores everything but the least "
7858 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
7861 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
7862 "使用された場合は、 B<shmget>() は I<shmflg> の下位 9 ビットを除いた全てを無"
7863 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
7866 #: build/C/man2/shmget.2:249
7868 "The following limits on shared memory segment resources affect the B<shmget>"
7871 "B<shmget>() コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
7875 #: build/C/man2/shmget.2:249
7881 #: build/C/man2/shmget.2:254
7883 "System wide maximum of shared memory pages (on Linux, this limit can be read "
7884 "and modified via I</proc/sys/kernel/shmall>)."
7886 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
7887 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
7890 #: build/C/man2/shmget.2:254
7896 #: build/C/man2/shmget.2:259
7898 "Maximum size in bytes for a shared memory segment: policy dependent (on "
7899 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
7901 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
7902 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
7905 #: build/C/man2/shmget.2:259
7911 #: build/C/man2/shmget.2:265
7913 "Minimum size in bytes for a shared memory segment: implementation dependent "
7914 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
7916 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
7917 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
7920 #: build/C/man2/shmget.2:265
7925 #. Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
7926 #. that we could create one more segment than SHMMNI -- MTK
7927 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
7929 #: build/C/man2/shmget.2:274
7931 "System wide maximum number of shared memory segments: implementation "
7932 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
7933 "can be read and modified via I</proc/sys/kernel/shmmni>)."
7935 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
7936 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
7940 #: build/C/man2/shmget.2:278
7942 "The implementation has no specific limits for the per-process maximum number "
7943 "of shared memory segments (B<SHMSEG>)."
7945 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>) に関する実装"
7949 #: build/C/man2/shmget.2:284
7951 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>() on a "
7952 "shared memory segment scheduled for deletion."
7954 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
7955 "に対して B<shmget>() が行われると B<EIDRM> を返していた。"
7958 #: build/C/man2/shmget.2:290
7960 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
7961 "more clearly show its function."
7963 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
7964 "より明確にその機能を表しているだろう。"
7967 #: build/C/man2/shmget.2:297
7969 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
7970 "B<shm_overview>(7), B<svipc>(7)"
7972 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
7973 "B<shm_overview>(7), B<svipc>(7)"
7976 #: build/C/man2/shmop.2:39
7982 #: build/C/man2/shmop.2:39
7988 #: build/C/man2/shmop.2:42
7989 msgid "shmat, shmdt - shared memory operations"
7990 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
7993 #: build/C/man2/shmop.2:46
7996 "B<#include E<lt>sys/types.hE<gt>>\n"
7997 "B<#include E<lt>sys/shm.hE<gt>>\n"
7999 "B<#include E<lt>sys/types.hE<gt>>\n"
8000 "B<#include E<lt>sys/shm.hE<gt>>\n"
8003 #: build/C/man2/shmop.2:48
8005 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8006 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8009 #: build/C/man2/shmop.2:50
8011 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8012 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8015 #: build/C/man2/shmop.2:59
8017 "B<shmat>() attaches the shared memory segment identified by I<shmid> to the "
8018 "address space of the calling process. The attaching address is specified by "
8019 "I<shmaddr> with one of the following criteria:"
8021 "B<shmat>() は I<shmid> で指定された共有メモリ・セグメント (shared memory "
8022 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
8023 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
8026 #: build/C/man2/shmop.2:65
8028 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
8029 "which to attach the segment."
8031 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
8032 "されていない) アドレスを選択する。"
8035 #: build/C/man2/shmop.2:80
8037 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
8038 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
8039 "multiple of B<SHMLBA>. Otherwise I<shmaddr> must be a page-aligned address "
8040 "at which the attach occurs."
8042 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
8043 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
8044 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
8048 #: build/C/man2/shmop.2:90
8050 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
8051 "reading and the process must have read permission for the segment. "
8052 "Otherwise the segment is attached for read and write and the process must "
8053 "have read and write permission for the segment. There is no notion of a "
8054 "write-only shared memory segment."
8056 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
8057 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
8058 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
8059 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
8060 "の共有メモリ・セグメントという概念は存在しない。"
8063 #: build/C/man2/shmop.2:105
8065 "The (Linux-specific) B<SHM_REMAP> flag may be specified in I<shmflg> to "
8066 "indicate that the mapping of the segment should replace any existing mapping "
8067 "in the range starting at I<shmaddr> and continuing for the size of the "
8068 "segment. (Normally an B<EINVAL> error would result if a mapping already "
8069 "exists in this address range.) In this case, I<shmaddr> must not be NULL."
8071 "(Linux 特有の) B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
8072 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
8073 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
8074 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
8075 "場合は、 I<shmaddr> が NULL であってはならない。"
8078 #: build/C/man2/shmop.2:112
8080 "The B<brk>(2) value of the calling process is not altered by the attach. "
8081 "The segment will automatically be detached at process exit. The same "
8082 "segment may be attached as a read and as a read-write one, and more than "
8083 "once, in the process's address space."
8085 "呼び出したプロセスの B<brk>(2) の値は付加によって変化しない。 そのセグメント"
8086 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
8087 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
8091 #: build/C/man2/shmop.2:120
8093 "A successful B<shmat>() call updates the members of the I<shmid_ds> "
8094 "structure (see B<shmctl>(2)) associated with the shared memory segment as "
8097 "成功した B<shmat>() コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
8098 "造体 (B<shmctl>(2) を参照) のメンバーを以下のように更新する:"
8101 #: build/C/man2/shmop.2:123
8102 msgid "I<shm_atime> is set to the current time."
8103 msgstr "I<shm_atime> には現在の時刻を設定する。"
8106 #: build/C/man2/shmop.2:126 build/C/man2/shmop.2:152
8107 msgid "I<shm_lpid> is set to the process-ID of the calling process."
8108 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
8111 #: build/C/man2/shmop.2:129
8112 msgid "I<shm_nattch> is incremented by one."
8113 msgstr "I<shm_nattch> を 1 増加させる。"
8116 #: build/C/man2/shmop.2:140
8118 "B<shmdt>() detaches the shared memory segment located at the address "
8119 "specified by I<shmaddr> from the address space of the calling process. The "
8120 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
8121 "the value returned by the attaching B<shmat>() call."
8123 "B<shmdt>() は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
8124 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
8125 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
8126 "I<shmaddr> は、それを付加した時に B<shmat>() が返した値に等しくなければなら"
8130 #: build/C/man2/shmop.2:146
8132 "On a successful B<shmdt>() call the system updates the members of the "
8133 "I<shmid_ds> structure associated with the shared memory segment as follows:"
8135 "成功した B<shmdt>() コールはその共有メモリ・セグメントに関連する "
8136 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
8139 #: build/C/man2/shmop.2:149
8140 msgid "I<shm_dtime> is set to the current time."
8141 msgstr "I<shm_dtime> には現在の時刻が設定される。"
8144 #: build/C/man2/shmop.2:157
8146 "I<shm_nattch> is decremented by one. If it becomes 0 and the segment is "
8147 "marked for deletion, the segment is deleted."
8149 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
8153 #: build/C/man2/shmop.2:161
8155 "After a B<fork>(2) the child inherits the attached shared memory segments."
8157 "B<fork>(2) した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
8160 #: build/C/man2/shmop.2:165
8162 "After an B<execve>(2) all attached shared memory segments are detached from "
8165 "B<exec>(2) した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
8169 #: build/C/man2/shmop.2:169
8171 "Upon B<_exit>(2) all attached shared memory segments are detached from the "
8174 "B<exit>(2) において、全ての付加された共有メモリ・セグメントはプロセスから分"
8178 #: build/C/man2/shmop.2:177
8180 "On success B<shmat>() returns the address of the attached shared memory "
8181 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
8182 "indicate the cause of the error."
8184 "B<shmat>() は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
8185 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
8189 #: build/C/man2/shmop.2:183
8191 "On success B<shmdt>() returns 0; on error -1 is returned, and I<errno> is "
8192 "set to indicate the cause of the error."
8194 "B<shmdt>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
8198 #: build/C/man2/shmop.2:189
8199 msgid "When B<shmat>() fails, I<errno> is set to one of the following:"
8201 "B<shmat>() が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
8204 #: build/C/man2/shmop.2:195
8206 "The calling process does not have the required permissions for the requested "
8207 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
8209 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
8210 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
8213 #: build/C/man2/shmop.2:209
8215 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
8216 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
8217 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
8219 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
8220 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
8221 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
8222 "れているが、 I<shmaddr> が NULL であった。"
8225 #: build/C/man2/shmop.2:212
8226 msgid "Could not allocate memory for the descriptor or for the page tables."
8228 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
8232 #: build/C/man2/shmop.2:218
8233 msgid "When B<shmdt>() fails, I<errno> is set as follows:"
8234 msgstr "B<shmdt>() が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
8236 #. The following since 2.6.17-rc1:
8238 #: build/C/man2/shmop.2:226
8240 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
8241 "not aligned on a page boundary."
8243 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
8244 "I<shmaddr> がページ境界に合っていない。"
8247 #: build/C/man2/shmop.2:245
8249 "In SVID 3 (or perhaps earlier) the type of the I<shmaddr> argument was "
8250 "changed from I<char *> into I<const void *>, and the returned type of "
8251 "B<shmat>() from I<char *> into I<void *>. (Linux libc4 and libc5 have the "
8252 "I<char *> prototypes; glibc2 has I<void *>.)"
8254 "SVID 3 で (たぶんそれより前だと思うが) I<shmaddr> 引き数の型は I<char *> か"
8255 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
8256 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
8257 "glibc2 のプロトタイプは I<void *> である)。"
8260 #: build/C/man2/shmop.2:257
8262 "Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable "
8263 "way of attaching a shared memory segment. Be aware that the shared memory "
8264 "segment attached in this way may be attached at different addresses in "
8265 "different processes. Therefore, any pointers maintained within the shared "
8266 "memory must be made relative (typically to the starting address of the "
8267 "segment), rather than absolute."
8269 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
8270 "NULL にして B<shmat>() を使用するのがよい。 このような方法で付加される共有メ"
8271 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
8272 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
8273 "(一般的にはセグメントの開始アドレスからの) 相対アドレスで作成するべきであ"
8277 #: build/C/man2/shmop.2:262
8279 "On Linux, it is possible to attach a shared memory segment even if it is "
8280 "already marked to be deleted. However, POSIX.1-2001 does not specify this "
8281 "behavior and many other implementations do not support it."
8283 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
8284 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
8285 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
8288 #: build/C/man2/shmop.2:265
8289 msgid "The following system parameter affects B<shmat>():"
8290 msgstr "以下のシステム・パラメーターは、 B<shmat>() に影響する:"
8292 #. FIXME A good explanation of the rationale for the existence
8293 #. of SHMLBA would be useful here
8295 #: build/C/man2/shmop.2:265
8300 #. FIXME That last sentence isn't true for all Linux
8301 #. architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
8304 #: build/C/man2/shmop.2:278
8306 "Segment low boundary address multiple. Must be page aligned. For the "
8307 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
8309 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
8310 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
8313 #: build/C/man2/shmop.2:282
8315 "The implementation places no intrinsic limit on the per-process maximum "
8316 "number of shared memory segments (B<SHMSEG>)."
8318 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>) に"
8322 #: build/C/man2/shmop.2:289
8324 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8325 "B<shm_overview>(7), B<svipc>(7)"
8327 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8328 "B<shm_overview>(7), B<svipc>(7)"
8331 #: build/C/man2/subpage_prot.2:28
8333 msgid "SUBPAGE_PROT"
8334 msgstr "SUBPAGE_PROT"
8337 #: build/C/man2/subpage_prot.2:28
8343 #: build/C/man2/subpage_prot.2:31
8344 msgid "subpage_prot - define a subpage protection for an address range"
8345 msgstr "subpage_prot - define a subpage protection for an address range"
8348 #: build/C/man2/subpage_prot.2:35
8351 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8352 "B< uint32_t *>I<map>B<);>\n"
8354 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8355 "B< uint32_t *>I<map>B<);>\n"
8358 #: build/C/man2/subpage_prot.2:42
8360 "The PowerPC-specific B<subpage_prot>() system call provides the facility to "
8361 "control the access permissions on individual 4kB subpages on systems "
8362 "configured with a page size of 64kB."
8364 "The PowerPC-specific B<subpage_prot>() system call provides the facility to "
8365 "control the access permissions on individual 4kB subpages on systems "
8366 "configured with a page size of 64kB."
8369 #: build/C/man2/subpage_prot.2:49
8371 "The protection map is applied to the memory pages in the region starting at "
8372 "I<addr> and continuing for I<len> bytes. Both of these arguments must be "
8373 "aligned to a 64-kB boundary."
8375 "The protection map is applied to the memory pages in the region starting at "
8376 "I<addr> and continuing for I<len> bytes. Both of these arguments must be "
8377 "aligned to a 64-kB boundary."
8380 #: build/C/man2/subpage_prot.2:61
8382 "The protection map is specified in the buffer pointed to by I<map>. The map "
8383 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8384 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8385 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8386 "I<len>). Each 2-bit field in the protection map is either 0 to allow any "
8387 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8389 "The protection map is specified in the buffer pointed to by I<map>. The map "
8390 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8391 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8392 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8393 "I<len>). Each 2-bit field in the protection map is either 0 to allow any "
8394 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8397 #: build/C/man2/subpage_prot.2:66
8399 "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes "
8400 "specified below is returned."
8402 "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes "
8403 "specified below is returned."
8406 #: build/C/man2/subpage_prot.2:72
8407 msgid "The buffer referred to by I<map> is not accessible."
8408 msgstr "The buffer referred to by I<map> is not accessible."
8411 #: build/C/man2/subpage_prot.2:82
8413 "The I<addr> or I<len> arguments are incorrect. Both of these arguments must "
8414 "be aligned to a multiple of the system page size, and they must not refer to "
8415 "a region outside of the address space of the process or to a region that "
8416 "consists of huge pages."
8418 "The I<addr> or I<len> arguments are incorrect. Both of these arguments must "
8419 "be aligned to a multiple of the system page size, and they must not refer to "
8420 "a region outside of the address space of the process or to a region that "
8421 "consists of huge pages."
8424 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:166
8425 msgid "Out of memory."
8429 #: build/C/man2/subpage_prot.2:91
8431 "This system call is provided on the PowerPC architecture since Linux "
8432 "2.6.25. The system call is provided only if the kernel is configured with "
8433 "B<CONFIG_PPC_64K_PAGES>. No library support is provided."
8435 "This system call is provided on the PowerPC architecture since Linux "
8436 "2.6.25. The system call is provided only if the kernel is configured with "
8437 "B<CONFIG_PPC_64K_PAGES>. No library support is provided."
8440 #: build/C/man2/subpage_prot.2:98
8442 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8443 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8444 "field won't allow writes to a page that is otherwise write-protected."
8446 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8447 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8448 "field won't allow writes to a page that is otherwise write-protected."
8451 #: build/C/man2/subpage_prot.2:98
8456 #. In the initial implementation, it was the case that:
8457 #. In fact the whole process is switched to use 4k hardware pages when the
8458 #. subpage_prot system call is used, but this could be improved in future
8459 #. to switch only the affected segments.
8460 #. But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
8461 #. the affected segment, not the whole process.
8463 #: build/C/man2/subpage_prot.2:120
8465 "This system call is provided to assist writing emulators that operate using "
8466 "64-kB pages on PowerPC systems. When emulating systems such as x86, which "
8467 "uses a smaller page size, the emulator can no longer use the memory-"
8468 "management unit (MMU) and normal system calls for controlling page "
8469 "protections. (The emulator could emulate the MMU by checking and possibly "
8470 "remapping the address for each memory access in software, but that is "
8471 "slow.) The idea is that the emulator supplies an array of protection masks "
8472 "to apply to a specified range of virtual addresses. These masks are applied "
8473 "at the level where hardware page-table entries (PTEs) are inserted into the "
8474 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
8475 "affected. Implicit in this is that the regions of the address space that "
8476 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
8477 "hardware pages (on machines with hardware 64-kB page support)."
8479 "This system call is provided to assist writing emulators that operate using "
8480 "64-kB pages on PowerPC systems. When emulating systems such as x86, which "
8481 "uses a smaller page size, the emulator can no longer use the memory-"
8482 "management unit (MMU) and normal system calls for controlling page "
8483 "protections. (The emulator could emulate the MMU by checking and possibly "
8484 "remapping the address for each memory access in software, but that is "
8485 "slow.) The idea is that the emulator supplies an array of protection masks "
8486 "to apply to a specified range of virtual addresses. These masks are applied "
8487 "at the level where hardware page-table entries (PTEs) are inserted into the "
8488 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
8489 "affected. Implicit in this is that the regions of the address space that "
8490 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
8491 "hardware pages (on machines with hardware 64-kB page support)."
8494 #: build/C/man2/subpage_prot.2:123
8495 msgid "B<mprotect>(2), B<syscall>(2);"
8496 msgstr "B<mprotect>(2), B<syscall>(2);"
8499 #: build/C/man2/subpage_prot.2:125
8500 msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
8501 msgstr "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
8504 #: build/C/man2/sync_file_range.2:30
8506 msgid "SYNC_FILE_RANGE"
8507 msgstr "SYNC_FILE_RANGE"
8510 #: build/C/man2/sync_file_range.2:33
8511 msgid "sync_file_range - sync a file segment with disk"
8512 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
8515 #: build/C/man2/sync_file_range.2:37
8518 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
8519 "B<#include E<lt>fcntl.hE<gt>>\n"
8521 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
8522 "B<#include E<lt>fcntl.hE<gt>>\n"
8525 #: build/C/man2/sync_file_range.2:40
8528 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8529 "B< unsigned int >I<flags>B<);>\n"
8531 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8532 "B< unsigned int >I<flags>B<);>\n"
8535 #: build/C/man2/sync_file_range.2:47
8537 "B<sync_file_range>() permits fine control when synchronizing the open file "
8538 "referred to by the file descriptor I<fd> with disk."
8540 "B<sync_file_range>() を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
8541 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
8544 #: build/C/man2/sync_file_range.2:61
8546 "I<offset> is the starting byte of the file range to be synchronized. "
8547 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
8548 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
8549 "are synchronized. Synchronization is in units of the system page size: "
8550 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
8551 "rounded up to a page boundary."
8553 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
8554 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
8555 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
8556 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
8557 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
8560 #: build/C/man2/sync_file_range.2:65
8561 msgid "The I<flags> bit-mask argument can include any of the following values:"
8562 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
8565 #: build/C/man2/sync_file_range.2:65
8567 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8568 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8571 #: build/C/man2/sync_file_range.2:70
8573 "Wait upon write-out of all pages in the specified range that have already "
8574 "been submitted to the device driver for write-out before performing any "
8577 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
8578 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
8582 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
8584 msgid "B<SYNC_FILE_RANGE_WRITE>"
8585 msgstr "B<SYNC_FILE_RANGE_WRITE>"
8588 #: build/C/man2/sync_file_range.2:76
8590 "Initiate write-out of all dirty pages in the specified range which are not "
8591 "presently submitted write-out. Note that even this may block if you attempt "
8592 "to write more than request queue size."
8594 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
8595 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
8596 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
8600 #: build/C/man2/sync_file_range.2:76
8602 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8603 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8606 #: build/C/man2/sync_file_range.2:80
8608 "Wait upon write-out of all pages in the range after performing any write."
8610 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
8614 #: build/C/man2/sync_file_range.2:84
8615 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
8616 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
8619 #: build/C/man2/sync_file_range.2:84
8625 #: build/C/man2/sync_file_range.2:100
8627 "This system call is extremely dangerous and should not be used in portable "
8628 "programs. None of these operations writes out the file's metadata. "
8629 "Therefore, unless the application is strictly performing overwrites of "
8630 "already-instantiated disk blocks, there are no guarantees that the data will "
8631 "be available after a crash. There is no user interface to know if a write "
8632 "is purely an overwrite. On file systems using copy-on-write semantics (e."
8633 "g., I<btrfs>) an overwrite of existing allocated blocks is impossible. "
8634 "When writing into preallocated space, many file systems also require calls "
8635 "into the block allocator, which this system call does not sync out to disk. "
8636 "This system call does not flush disk write caches and thus does not provide "
8637 "any data integrity on systems with volatile disk write caches."
8639 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
8640 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
8641 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
8642 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
8643 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
8644 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
8645 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
8646 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
8647 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
8648 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
8649 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
8650 "コールではデータの一貫性を確保できないことになる。"
8653 #: build/C/man2/sync_file_range.2:100
8655 msgid "Some details"
8659 #: build/C/man2/sync_file_range.2:108
8661 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
8662 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
8664 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
8665 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
8668 #: build/C/man2/sync_file_range.2:112
8669 msgid "Useful combinations of the I<flags> bits are:"
8670 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
8673 #: build/C/man2/sync_file_range.2:112
8675 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8676 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8679 #: build/C/man2/sync_file_range.2:120
8681 "Ensures that all pages in the specified range which were dirty when "
8682 "B<sync_file_range>() was called are placed under write-out. This is a "
8683 "start-write-for-data-integrity operation."
8685 "指定された範囲内のページで、 B<sync_file_range>() が呼び出された際に dirty "
8686 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
8687 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
8691 #: build/C/man2/sync_file_range.2:127
8693 "Start write-out of all dirty pages in the specified range which are not "
8694 "presently under write-out. This is an asynchronous flush-to-disk "
8695 "operation. This is not suitable for data integrity operations."
8697 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
8698 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk) 操作であ"
8699 "る。データ完全性確保が必要な操作としては適切ではない。"
8702 #: build/C/man2/sync_file_range.2:127
8704 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8705 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8708 #: build/C/man2/sync_file_range.2:134
8710 "Wait for completion of write-out of all pages in the specified range. This "
8711 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
8712 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
8713 "and obtain its result."
8715 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
8716 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
8717 "き、この操作の完了を待ち、結果を取得することができる。"
8720 #: build/C/man2/sync_file_range.2:134
8722 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8723 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8726 #: build/C/man2/sync_file_range.2:141
8728 "This is a write-for-data-integrity operation that will ensure that all pages "
8729 "in the specified range which were dirty when B<sync_file_range>() was "
8730 "called are committed to disk."
8732 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
8733 "り、指定された範囲内の、 B<sync_file_range>() が呼ばれた時点で dirty な全て"
8734 "のページが ディスクに格納されることが保証される。"
8737 #: build/C/man2/sync_file_range.2:147
8739 "On success, B<sync_file_range>() returns 0; on failure -1 is returned and "
8740 "I<errno> is set to indicate the error."
8742 "成功の場合、 B<sync_file_range>() は 0 を返す。失敗の場合、-1 を返し、 "
8743 "I<error> にエラーを示す値を設定する。"
8746 #: build/C/man2/sync_file_range.2:152
8747 msgid "I<fd> is not a valid file descriptor."
8748 msgstr "I<fd> が有効なファイルディスクリプタではない。"
8751 #: build/C/man2/sync_file_range.2:160
8753 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
8755 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
8759 #: build/C/man2/sync_file_range.2:163
8764 #: build/C/man2/sync_file_range.2:169
8765 msgid "Out of disk space."
8766 msgstr "ディスク領域不足である。"
8768 #. FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
8769 #. (In userspace at least) it isn't possible to obtain a file descriptor
8770 #. for a symbolic link.
8772 #: build/C/man2/sync_file_range.2:177
8774 "I<fd> refers to something other than a regular file, a block device, a "
8775 "directory, or a symbolic link."
8777 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
8781 #: build/C/man2/sync_file_range.2:180
8782 msgid "B<sync_file_range>() appeared on Linux in kernel 2.6.17."
8783 msgstr "B<sync_file_range>() はカーネル 2.6.17 で Linux に登場した。"
8786 #: build/C/man2/sync_file_range.2:183
8788 "This system call is Linux-specific, and should be avoided in portable "
8791 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
8794 #. See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
8796 #: build/C/man2/sync_file_range.2:196
8798 "Some architectures (e.g., PowerPC, ARM) need 64-bit arguments to be aligned "
8799 "in a suitable pair of registers. On such architectures, the call signature "
8800 "of B<sync_file_range>() is flawed, since it forces a register to be wasted "
8801 "as padding between the I<fd> and I<offset> arguments. Therefore, these "
8802 "architectures define a different system call that orders the arguments "
8807 #: build/C/man2/sync_file_range.2:201
8810 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8811 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8813 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8814 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8817 #: build/C/man2/sync_file_range.2:206
8819 "The behavior of this system call is otherwise exactly the same as "
8820 "B<sync_file_range>()."
8824 #: build/C/man2/sync_file_range.2:217
8826 "A system call with this signature first appeared on the ARM architecture in "
8827 "Linux 2.6.20, with the name B<arm_sync_file_range>(). It was renamed in "
8828 "Linux 2.6.22, when the analogous system call was added for PowerPC. On "
8829 "architectures where glibc support is provided, glibc transparently wraps "
8830 "B<sync_file_range2>() under the name B<sync_file_range>()."
8834 #: build/C/man2/sync_file_range.2:221
8835 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8836 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8839 #: build/C/man3/malloc_get_state.3:23
8841 msgid "MALLOC_GET_STATE"
8842 msgstr "MALLOC_GET_STATE"
8845 #: build/C/man3/malloc_get_state.3:23
8851 #: build/C/man3/malloc_get_state.3:26
8853 "get_malloc_state, set_malloc_state - record and restore state of malloc "
8858 #: build/C/man3/malloc_get_state.3:31
8860 msgid "B<void* malloc_get_state(void);>\n"
8861 msgstr "B<void* malloc_get_state(void);>\n"
8864 #: build/C/man3/malloc_get_state.3:33
8866 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
8867 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
8870 #: build/C/man3/malloc_get_state.3:51
8872 "The B<malloc_get_state>() function records the current state of all "
8873 "B<malloc>(3) internal bookkeeping variables (but not the actual contents of "
8874 "the heap or the state of B<malloc_hook>(3) functions pointers). The state "
8875 "is recorded in a system-dependent opaque data structure dynamically "
8876 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
8877 "as the function result. (It is the caller's responsibility to B<free>(3) "
8882 #: build/C/man3/malloc_get_state.3:59
8884 "The B<malloc_set_state>() function restores the state of all B<malloc>(3) "
8885 "internal bookkeeping variables to the values recorded in the opaque data "
8886 "structure pointed to by I<state>."
8890 #: build/C/man3/malloc_get_state.3:66
8892 "On success, B<malloc_get_state>() returns a pointer to a newly allocated "
8893 "opaque data structure. On error (for example, memory could not be allocated "
8894 "for the data structure), B<malloc_get_state>() returns NULL."
8897 #. if(ms->magic != MALLOC_STATE_MAGIC) return -1;
8898 #. /* Must fail if the major version is too high. */
8899 #. if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
8901 #: build/C/man3/malloc_get_state.3:84
8903 "On success, B<malloc_set_state>() returns 0. If the implementation detects "
8904 "that I<state> does not point to a correctly formed data structure, "
8905 "B<malloc_set_state>() returns -1. If the implementation detects that the "
8906 "version of the data structure referred to by I<state> is a more recent "
8907 "version than this implementation knows about, B<malloc_set_state>() returns "
8912 #: build/C/man3/malloc_get_state.3:92
8914 "These functions are especially useful when using this B<malloc>(3) "
8915 "implementation as part of a shared library, and the heap contents are saved/"
8916 "restored via some other method. This technique is used by the GNU Emacs to "
8917 "implement its \"dumping\" function."
8920 #. i.e., calls __malloc_check_init()
8921 #. i.e., malloc checking is not already in use
8922 #. and the caller requested malloc checking
8924 #: build/C/man3/malloc_get_state.3:109
8926 "Hook function pointers are never saved or restored by these functions, with "
8927 "two exceptions: if malloc checking (see B<mallopt>(3)) was in use when "
8928 "B<malloc_get_state>() was called, then B<malloc_set_state>() resets malloc "
8929 "checking hooks if possible; if malloc checking was not in use in the "
8930 "recorded state, but the caller has requested malloc checking, then the hooks "
8935 #: build/C/man3/malloc_get_state.3:111
8936 msgid "B<malloc>(3), B<mallopt>(3)"
8937 msgstr "B<malloc>(3), B<mallopt>(3)"
8940 #: build/C/man3/malloc_trim.3:24
8943 msgstr "MALLOC_TRIM"
8946 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
8952 #: build/C/man3/malloc_trim.3:27
8953 msgid "malloc_trim - release free memory from the top of the heap"
8957 #: build/C/man3/malloc_trim.3:31
8958 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
8959 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
8962 #: build/C/man3/malloc_trim.3:38
8964 "The B<malloc_trim>() function attempts to release free memory at the top of "
8965 "the heap (by calling B<sbrk>(2) with a suitable argument)."
8969 #: build/C/man3/malloc_trim.3:49
8971 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
8972 "the top of the heap. If this argument is 0, only the minimum amount of "
8973 "memory is maintained at the top of the heap (i.e., one page or less). A "
8974 "nonzero argument can be used to maintain some trailing space at the top of "
8975 "the heap in order to allow future allocations to be made without having to "
8976 "extend the heap with B<sbrk>(2)."
8980 #: build/C/man3/malloc_trim.3:54
8982 "The B<malloc_trim>() function returns 1 if memory was actually released "
8983 "back to the system, or 0 if it was not possible to release any memory."
8987 #. Available already in glibc 2.0, possibly earlier
8989 #: build/C/man3/malloc_trim.3:58
8990 msgid "No errors are defined."
8994 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
8995 msgid "This function is a GNU extension."
8996 msgstr "この関数は GNU による拡張である。"
8999 #: build/C/man3/malloc_trim.3:69
9001 "This function is automatically called by B<free>(3) in certain "
9002 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
9007 #: build/C/man3/malloc_trim.3:72
9009 "This function cannot release free memory located at places other than the "
9013 #. malloc/malloc.c::mTRIm():
9014 #. return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
9016 #: build/C/man3/malloc_trim.3:76
9017 msgid "This function only releases memory in the main arena."
9021 #: build/C/man3/malloc_trim.3:79
9022 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9023 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9026 #: build/C/man3/malloc_usable_size.3:23
9028 msgid "MALLOC_USABLE_SIZE"
9029 msgstr "MALLOC_USABLE_SIZE"
9032 #: build/C/man3/malloc_usable_size.3:26
9033 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
9037 #: build/C/man3/malloc_usable_size.3:30
9038 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9039 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9042 #: build/C/man3/malloc_usable_size.3:38
9044 "The B<malloc_usable_size>() function returns the number of usable bytes in "
9045 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
9046 "B<malloc>(3) or a related function."
9050 #: build/C/man3/malloc_usable_size.3:46
9052 "B<malloc_usable_size>() returns the number of usable bytes in the block of "
9053 "allocated memory pointed to by I<ptr>. If I<ptr> is NULL, 0 is returned."
9057 #: build/C/man3/malloc_usable_size.3:58
9059 "The value returned by B<malloc_usable_size>() may be greater than the "
9060 "requested size of the allocation because of alignment and minimum size "
9061 "constraints. Although the excess bytes can be overwritten by the "
9062 "application without ill effects, this is not good programming practice: the "
9063 "number of excess bytes in an allocation depends on the underlying "
9068 #: build/C/man3/malloc_usable_size.3:60
9069 msgid "The main use of this function is for debugging and introspection."
9073 #: build/C/man3/malloc_usable_size.3:61
9074 msgid "B<malloc>(3)"
9075 msgstr "B<malloc>(3)"
9078 #~ msgstr "この文書について"
9081 #~ "This page is part of release 3.38 of the Linux I<man-pages> project. A "
9082 #~ "description of the project, and information about reporting bugs, can be "
9083 #~ "found at http://www.kernel.org/doc/man-pages/."
9085 #~ "この man ページは Linux I<man-pages> プロジェクトのリリース 3.38 の一部である。\n"
9086 #~ "プロジェクトの説明とバグ報告に関する情報は\n"
9087 #~ "http://www.kernel.org/doc/man-pages/ に書かれている。"
9090 #~ "The function B<mtrace>() installs handlers for B<malloc>(3), B<realloc>"
9091 #~ "(3) and B<free>(3). The function B<muntrace>() disables these handlers."
9093 #~ "関数 B<mtrace>() は、 B<malloc>(3), B<realloc>(3), B<free>(3) のハンドラ"
9094 #~ "を組み込む。 関数 B<muntrace>() はこれらのハンドラを解除する。"
9097 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
9098 #~ "() writes its output. This file must be writable to the user or "
9099 #~ "B<mtrace>() will do nothing. If the file is not empty it will be "
9102 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>() が出力を書き出すファイルを指定す"
9103 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
9104 #~ "権限がない場合、 B<mtrace>() は何もしない。 ファイルが空でない場合、ファ"
9107 #~ msgid "These are GNU extensions."
9108 #~ msgstr "この関数は GNU 拡張である。"
9111 #~ "The output of B<mtrace>() will be ASCII but not in a friendly format. "
9112 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
9114 #~ "B<mtrace>() の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
9115 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
9119 #~ "This flag allocates and initializes to zero the disk space within the "
9120 #~ "range specified by I<offset> and I<len>. After a successful call, "
9121 #~ "subsequent writes into this range are guaranteed not to fail because of "
9122 #~ "lack of disk space. Preallocating zeroed blocks beyond the end of the "
9123 #~ "file is useful for optimizing append workloads. Preallocating blocks "
9124 #~ "does not change the file size (as reported by B<stat>(2)) even if it is "
9125 #~ "less than I<offset>+I<len>."
9127 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
9128 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
9129 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
9130 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
9131 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
9132 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
9133 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2) が返す) ファイルサイズ"
9137 #~| msgid "The buffer referred to by I<map> is not accessible."
9139 #~ "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
9140 #~ msgstr "The buffer referred to by I<map> is not accessible."
9143 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>) "
9144 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
9146 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>) を持たず、ソフト資"
9147 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
9150 #~ "(Linux 2.6.8 and earlier) The calling process has insufficient privilege "
9151 #~ "to call B<munlockall>(). Under Linux the B<CAP_IPC_LOCK> capability is "
9154 #~ "(Linux 2.6.8 以前) 呼び出し元プロセスが B<munlockall>() を呼び出すのに必"
9155 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
9159 #~ "B<#define _XOPEN_SOURCE 600>\n"
9160 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9162 #~ "B<#define _XOPEN_SOURCE 600>\n"
9163 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9166 #~ "B<posix_fadvise>() appeared in kernel 2.5.60. Glibc support has been "
9167 #~ "provided since version 2.2."
9169 #~ "B<posix_fadvise>() はカーネル 2.5.60 で登場した。 glibc でのサポートは "
9170 #~ "glibc バージョン 2.2 以降で行われている。"
9173 #~ "B<#define _GNU_SOURCE>\n"
9174 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9176 #~ "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
9177 #~ "B<#include E<lt>fcntl.hE<gt>>\n"