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-05-01 04:21+0900\n"
10 "PO-Revision-Date: 2012-05-01 04:49+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
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 build/C/man3/mcheck.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 build/C/man3/mcheck.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 build/C/man3/mcheck.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 build/C/man3/mcheck.3:39
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 build/C/man3/mcheck.3:128
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:188
317 #: build/C/man2/madvise.2:307 build/C/man3/malloc_hook.3:76
318 #: build/C/man3/mallopt.3:390 build/C/man2/mlock.2:187 build/C/man2/mmap.2:483
319 #: build/C/man2/mmap2.2:77 build/C/man2/mprotect.2:107
320 #: build/C/man2/mremap.2:186 build/C/man2/msync.2:96 build/C/man3/mtrace.3:76
321 #: build/C/man2/posix_fadvise.2:111 build/C/man3/posix_fallocate.3:101
322 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
323 #: build/C/man2/remap_file_pages.2:151 build/C/man3/shm_open.3:249
324 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:366
325 #: build/C/man2/shmget.2:229 build/C/man2/shmop.2:226
326 #: build/C/man2/subpage_prot.2:91 build/C/man2/sync_file_range.2:180
327 #: build/C/man3/malloc_get_state.3:84 build/C/man3/malloc_trim.3:58
328 #: build/C/man3/malloc_usable_size.3:46 build/C/man3/mcheck.3:144
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
354 #: build/C/man3/mcheck.3:146
360 #: build/C/man2/alloc_hugepages.2:141
362 "These system calls are gone; they existed only in Linux 2.5.36 through to "
363 "2.5.54. Now the hugetlbfs file system can be used instead. Memory backed "
364 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2) to "
365 "map files in this virtual file system."
367 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
368 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
369 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2) を使ってこ"
370 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
373 #: build/C/man2/alloc_hugepages.2:145
375 "The maximal number of huge pages can be specified using the B<hugepages=> "
378 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
381 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:153
382 #: build/C/man2/cacheflush.2:88 build/C/man2/fallocate.2:195
383 #: build/C/man2/madvise.2:360 build/C/man3/malloc_hook.3:138
384 #: build/C/man3/mallopt.3:580 build/C/man2/mlock.2:337 build/C/man2/mmap.2:671
385 #: build/C/man2/mmap2.2:98 build/C/man2/mprotect.2:223
386 #: build/C/man2/mremap.2:214 build/C/man2/msync.2:122
387 #: build/C/man3/mtrace.3:170 build/C/man2/posix_fadvise.2:188
388 #: build/C/man3/posix_fallocate.3:130 build/C/man3/posix_memalign.3:275
389 #: build/C/man2/readahead.2:98 build/C/man2/remap_file_pages.2:162
390 #: build/C/man3/shm_open.3:280 build/C/man7/shm_overview.7:127
391 #: build/C/man2/shmctl.2:410 build/C/man2/shmget.2:298
392 #: build/C/man2/shmop.2:290 build/C/man2/subpage_prot.2:126
393 #: build/C/man2/sync_file_range.2:222 build/C/man3/malloc_get_state.3:112
394 #: build/C/man3/malloc_trim.3:80 build/C/man3/malloc_usable_size.3:62
395 #: build/C/man3/mcheck.3:211
401 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:160
402 #: build/C/man2/cacheflush.2:95 build/C/man2/fallocate.2:202
403 #: build/C/man2/madvise.2:367 build/C/man3/malloc_hook.3:145
404 #: build/C/man3/mallopt.3:587 build/C/man2/mlock.2:344 build/C/man2/mmap.2:678
405 #: build/C/man2/mmap2.2:105 build/C/man2/mprotect.2:230
406 #: build/C/man2/mremap.2:221 build/C/man2/msync.2:129
407 #: build/C/man3/mtrace.3:177 build/C/man2/posix_fadvise.2:195
408 #: build/C/man3/posix_fallocate.3:137 build/C/man3/posix_memalign.3:282
409 #: build/C/man2/readahead.2:105 build/C/man2/remap_file_pages.2:169
410 #: build/C/man3/shm_open.3:287 build/C/man7/shm_overview.7:134
411 #: build/C/man2/shmctl.2:417 build/C/man2/shmget.2:305
412 #: build/C/man2/shmop.2:297 build/C/man2/subpage_prot.2:133
413 #: build/C/man2/sync_file_range.2:229 build/C/man3/malloc_get_state.3:119
414 #: build/C/man3/malloc_trim.3:87 build/C/man3/malloc_usable_size.3:69
415 #: build/C/man3/mcheck.3:218
417 "This page is part of release 3.40 of the Linux I<man-pages> project. A "
418 "description of the project, and information about reporting bugs, can be "
419 "found at http://www.kernel.org/doc/man-pages/."
421 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.40 の一部\n"
422 "である。プロジェクトの説明とバグ報告に関する情報は\n"
423 "http://www.kernel.org/doc/man-pages/ に書かれている。"
426 #: build/C/man3/alloca.3:41
432 #: build/C/man3/alloca.3:41
438 #: build/C/man3/alloca.3:41 build/C/man3/malloc_hook.3:6
439 #: build/C/man3/mtrace.3:23 build/C/man3/posix_fallocate.3:23
440 #: build/C/man3/posix_memalign.3:28 build/C/man3/malloc_get_state.3:23
441 #: build/C/man3/malloc_usable_size.3:23 build/C/man3/mcheck.3:23
447 #: build/C/man3/alloca.3:44
448 msgid "alloca - allocate memory that is automatically freed"
449 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
452 #: build/C/man3/alloca.3:46
453 msgid "B<#include E<lt>alloca.hE<gt>>"
454 msgstr "B<#include E<lt>alloca.hE<gt>>"
457 #: build/C/man3/alloca.3:48
458 msgid "B<void *alloca(size_t >I<size>B<);>"
459 msgstr "B<void *alloca(size_t >I<size>B<);>"
462 #: build/C/man3/alloca.3:58
464 "The B<alloca>() function allocates I<size> bytes of space in the stack "
465 "frame of the caller. This temporary space is automatically freed when the "
466 "function that called B<alloca>() returns to its caller."
468 "B<alloca>() 関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
469 "付ける。 この一時的な領域は、 B<alloca>() を呼び出した関数が呼出元に返るとき"
473 #: build/C/man3/alloca.3:63
475 "The B<alloca>() function returns a pointer to the beginning of the "
476 "allocated space. If the allocation causes stack overflow, program behavior "
479 "B<alloca>() 関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
480 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
484 #: build/C/man3/alloca.3:65
485 msgid "This function is not in POSIX.1-2001."
486 msgstr "この関数は POSIX.1-2001 にはない。"
489 #: build/C/man3/alloca.3:71
491 "There is evidence that the B<alloca>() function appeared in 32V, PWB, "
492 "PWB.2, 3BSD, and 4BSD. There is a man page for it in 4.3BSD. Linux uses "
495 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>() 関数が登場した証拠がある。 "
496 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
497 "は POSIX.1-2001 にはない。"
500 #: build/C/man3/alloca.3:86
502 "The B<alloca>() function is machine- and compiler-dependent. For certain "
503 "applications, its use can improve efficiency compared to the use of B<malloc>"
504 "(3) plus B<free>(3). In certain cases, it can also simplify memory "
505 "deallocation in applications that use B<longjmp>(3) or B<siglongjmp>(3). "
506 "Otherwise, its use is discouraged."
508 "B<alloca>() 関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
509 "は、この関数を使うと B<malloc>(3) と B<free>(3) を組み合わせて使った場合に"
510 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
511 "B<longjmp>(3) や B<siglongjmp>(3) を使うアプリケーションでのメモリの開放を"
512 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
515 #: build/C/man3/alloca.3:95
517 "Because the space allocated by B<alloca>() is allocated within the stack "
518 "frame, that space is automatically freed if the function return is jumped "
519 "over by a call to B<longjmp>(3) or B<siglongjmp>(3)."
521 "B<alloca>() により割り当てられる空間はスタックフレームから割り当てらるの"
522 "で、 関数の戻り先が B<longjmp>(3) や B<siglongjmp>(3) の呼び出しによりジャ"
523 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
526 #: build/C/man3/alloca.3:100
527 msgid "Do not attempt to B<free>(3) space allocated by B<alloca>()!"
529 "B<alloca>() で割り当てられた空間を B<free>(3) しようとすることのないよう"
533 #: build/C/man3/alloca.3:100
535 msgid "Notes on the GNU Version"
536 msgstr "GNU 版についての注意"
539 #: build/C/man3/alloca.3:122
541 "Normally, B<gcc>(1) translates calls to B<alloca>() with inlined code. "
542 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
543 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
544 "included). But beware! By default the glibc version of I<E<lt>stdlib."
545 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
547 "通常 B<gcc>(1) は B<alloca>() の呼び出しをインラインコードに変換する。 I<-"
548 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
549 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
550 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
551 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
555 #: build/C/man3/alloca.3:125
557 msgid " #define alloca(size) __builtin_alloca (size)\n"
558 msgstr " #define alloca(size) __builtin_alloca (size)\n"
561 #: build/C/man3/alloca.3:128
562 msgid "with messy consequences if one has a private version of this function."
563 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
566 #: build/C/man3/alloca.3:132
568 "The fact that the code is inlined means that it is impossible to take the "
569 "address of this function, or to change its behavior by linking with a "
572 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
573 "のライブラリをリンクして動作を変更することはできない。"
576 #: build/C/man3/alloca.3:136
578 "The inlined code often consists of a single instruction adjusting the stack "
579 "pointer, and does not check for stack overflow. Thus, there is no NULL "
582 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
583 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
584 "よって NULL エラーが返されることはない。"
587 #: build/C/man3/alloca.3:136 build/C/man2/cacheflush.2:81
588 #: build/C/man3/mallopt.3:404 build/C/man2/mlock.2:305 build/C/man2/mmap.2:544
589 #: build/C/man3/mtrace.3:100 build/C/man2/posix_fadvise.2:177
590 #: build/C/man2/shmget.2:284
596 #: build/C/man3/alloca.3:141
598 "There is no error indication if the stack frame cannot be extended. "
599 "(However, after a failed allocation, the program is likely to receive a "
600 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
602 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
603 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
604 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
607 #: build/C/man3/alloca.3:149
609 "On many systems B<alloca>() cannot be used inside the list of arguments of "
610 "a function call, because the stack space reserved by B<alloca>() would "
611 "appear on the stack in the middle of the space for the function arguments."
613 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>() が使え"
614 "ない。 これは、 B<alloca>() によって予約されるスタック領域が、 関数引き数に"
615 "使われるスタック領域の中に現れてしまうためである。"
618 #: build/C/man3/alloca.3:149 build/C/man2/fallocate.2:191
619 #: build/C/man2/madvise.2:353 build/C/man3/malloc_hook.3:133
620 #: build/C/man3/mallopt.3:568 build/C/man2/mlock.2:330 build/C/man2/mmap.2:653
621 #: build/C/man2/mmap2.2:92 build/C/man2/mprotect.2:220
622 #: build/C/man2/mremap.2:200 build/C/man2/msync.2:118
623 #: build/C/man3/mtrace.3:165 build/C/man2/posix_fadvise.2:182
624 #: build/C/man3/posix_fallocate.3:126 build/C/man3/posix_memalign.3:270
625 #: build/C/man2/readahead.2:92 build/C/man2/remap_file_pages.2:155
626 #: build/C/man3/shm_open.3:269 build/C/man7/shm_overview.7:114
627 #: build/C/man2/shmctl.2:403 build/C/man2/shmget.2:290
628 #: build/C/man2/shmop.2:282 build/C/man2/subpage_prot.2:120
629 #: build/C/man2/sync_file_range.2:217 build/C/man3/malloc_get_state.3:109
630 #: build/C/man3/malloc_trim.3:76 build/C/man3/malloc_usable_size.3:60
631 #: build/C/man3/mcheck.3:204
637 #: build/C/man3/alloca.3:153
638 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
639 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
642 #: build/C/man2/cacheflush.2:24
648 #: build/C/man2/cacheflush.2:24
654 #: build/C/man2/cacheflush.2:27
655 msgid "cacheflush - flush contents of instruction and/or data cache"
656 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
659 #: build/C/man2/cacheflush.2:30
661 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
662 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
665 #: build/C/man2/cacheflush.2:32
667 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
668 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
671 #: build/C/man2/cacheflush.2:42
673 "B<cacheflush>() flushes the contents of the indicated cache(s) for the user "
674 "addresses in the range I<addr> to I<(addr+nbytes-1)>. I<cache> may be one "
677 "B<cacheflush>() は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
678 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
682 #: build/C/man2/cacheflush.2:42
688 #: build/C/man2/cacheflush.2:45
689 msgid "Flush the instruction cache."
690 msgstr "命令 (instruction) キャッシュをフラッシュする。"
693 #: build/C/man2/cacheflush.2:45
699 #: build/C/man2/cacheflush.2:48
700 msgid "Write back to memory and invalidate the affected valid cache lines."
701 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
704 #: build/C/man2/cacheflush.2:48
710 #: build/C/man2/cacheflush.2:52
711 msgid "Same as B<(ICACHE|DCACHE)>."
712 msgstr "B<(ICACHE|DCACHE)> と同じ。"
715 #: build/C/man2/cacheflush.2:58
717 "B<cacheflush>() returns 0 on success or -1 on error. If errors are "
718 "detected, I<errno> will indicate the error."
720 "B<cacheflush>() は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
721 "出された場合は I<errno> にエラーが指示される。"
724 #: build/C/man2/cacheflush.2:59 build/C/man2/mmap2.2:62
725 #: build/C/man2/mremap.2:143 build/C/man2/shmctl.2:303
726 #: build/C/man2/subpage_prot.2:67
732 #: build/C/man2/cacheflush.2:66
734 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
737 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
741 #: build/C/man2/cacheflush.2:66 build/C/man2/fallocate.2:124
742 #: build/C/man2/madvise.2:264 build/C/man2/mlock.2:158
743 #: build/C/man2/mlock.2:165 build/C/man2/mlock.2:177 build/C/man2/mmap.2:421
744 #: build/C/man2/mmap.2:429 build/C/man2/mmap.2:434 build/C/man2/mmap2.2:65
745 #: build/C/man2/mprotect.2:89 build/C/man2/mremap.2:152
746 #: build/C/man2/msync.2:80 build/C/man2/posix_fadvise.2:93
747 #: build/C/man3/posix_fallocate.3:79 build/C/man3/posix_memalign.3:156
748 #: build/C/man2/readahead.2:76 build/C/man2/remap_file_pages.2:130
749 #: build/C/man2/remap_file_pages.2:137 build/C/man3/shm_open.3:211
750 #: build/C/man2/shmctl.2:317 build/C/man2/shmget.2:196
751 #: build/C/man2/shmop.2:195 build/C/man2/shmop.2:218
752 #: build/C/man2/subpage_prot.2:72 build/C/man2/sync_file_range.2:152
758 #: build/C/man2/cacheflush.2:74
759 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
760 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
762 #. FIXME This system call was only on MIPS back in 1.2 days, but
763 #. by now it is on a number of other architectures (but not i386).
764 #. Investigate the details and update this page.
765 #. Irix 6.5 appears to have a cacheflush() syscall -- mtk
767 #: build/C/man2/cacheflush.2:81
769 "This Linux-specific system call is only available on MIPS-based systems. It "
770 "should not be used in programs intended to be portable."
772 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
773 "植を意図したプログラムで使用すべきではない。"
776 #: build/C/man2/cacheflush.2:88
778 "The current implementation ignores the I<addr> and I<nbytes> arguments. "
779 "Therefore, the whole cache is always flushed."
781 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
785 #: build/C/man2/fallocate.2:8
791 #: build/C/man2/fallocate.2:8
793 #| msgid "2012-03-23"
798 #: build/C/man2/fallocate.2:11
799 msgid "fallocate - manipulate file space"
800 msgstr "fallocate - ファイル空間の操作"
803 #: build/C/man2/fallocate.2:15 build/C/man2/readahead.2:35
806 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
807 "B<#include E<lt>fcntl.hE<gt>>\n"
809 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
810 "B<#include E<lt>fcntl.hE<gt>>\n"
813 #: build/C/man2/fallocate.2:18
815 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
816 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
819 #: build/C/man2/fallocate.2:24
821 "This is a nonportable, Linux-specific system call. For the portable, "
822 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
823 "B<posix_fallocate>(3)."
825 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
826 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
827 "で規定された方法である B<posix_fallocate>(3) を使うこと。"
830 #: build/C/man2/fallocate.2:34
832 "B<fallocate>() allows the caller to directly manipulate the allocated disk "
833 "space for the file referred to by I<fd> for the byte range starting at "
834 "I<offset> and continuing for I<len> bytes."
836 "B<fallocate>() を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
837 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
841 #: build/C/man2/fallocate.2:39
843 "The I<mode> argument determines the operation to be performed on the given "
844 "range. Details of the supported operations are given in the subsections "
847 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
848 "サポートされている操作の詳細は以下のサブセクションで説明する。"
851 #: build/C/man2/fallocate.2:39
853 msgid "Allocating disk space"
857 #: build/C/man2/fallocate.2:58
859 "The default operation (i.e., I<mode> is zero) of B<fallocate>() allocates "
860 "and initializes to zero the disk space within the range specified by "
861 "I<offset> and I<len>. The file size (as reported by B<stat>(2)) will be "
862 "changed if I<offset>+I<len> is greater than the file size. This default "
863 "behavior closely resembles the behavior of the B<posix_fallocate>(3) "
864 "library function, and is intended as a method of optimally implementing that "
867 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
868 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
870 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
871 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
873 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
874 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
878 #: build/C/man2/fallocate.2:64
880 "After a successful call, subsequent writes into the range specified by "
881 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
886 #: build/C/man2/fallocate.2:75
888 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
889 "the call is similar, but the file size will not be changed even if I<offset>"
890 "+I<len> is greater than the file size. Preallocating zeroed blocks beyond "
891 "the end of the file in this manner is useful for optimizing append workloads."
893 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
895 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
896 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
897 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
901 #: build/C/man2/fallocate.2:79
903 "Because allocation is done in block size chunks, B<fallocate>() may "
904 "allocate a larger range of disk space than was specified."
906 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
908 "も大きなディスク領域を割り当てることがある。"
911 #: build/C/man2/fallocate.2:79
913 msgid "Deallocating file space"
914 msgstr "ファイル空間の割り当て解除"
917 #: build/C/man2/fallocate.2:94
919 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
920 "in I<mode> deallocates space (i.e., creates a hole) in the byte range "
921 "starting at I<offset> and continuing for I<len> bytes. Within the specified "
922 "range, partial file system blocks are zeroed, and whole file system blocks "
923 "are removed from the file. After a successful call, subsequent reads from "
924 "this range will return zeroes."
928 #: build/C/man2/fallocate.2:105
930 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
931 "I<mode>; in other words, even when punching off the end of the file, the "
932 "file size (as reported by B<stat>(2)) does not change."
936 #: build/C/man2/fallocate.2:109
938 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
939 "doesn't support the operation, an error is returned."
943 #: build/C/man2/fallocate.2:112
944 msgid "B<fallocate>() returns zero on success, and -1 on failure."
945 msgstr "B<fallocate>() は成功すると 0 を返し、エラーの場合は -1 を返す。"
948 #: build/C/man2/fallocate.2:113 build/C/man2/madvise.2:261
949 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:90
950 #: build/C/man3/posix_fallocate.3:71 build/C/man2/readahead.2:72
951 #: build/C/man2/sync_file_range.2:148
957 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
958 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
960 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
964 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
970 #: build/C/man2/fallocate.2:121
971 msgid "I<offset>+I<len> exceeds the maximum file size."
972 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
975 #: build/C/man2/fallocate.2:121
981 #: build/C/man2/fallocate.2:124
982 msgid "A signal was caught during execution."
983 msgstr "実行中にシグナルが捕捉された。"
986 #: build/C/man2/fallocate.2:136 build/C/man3/posix_fallocate.3:85
987 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
988 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
991 #: build/C/man2/fallocate.2:136 build/C/man2/madvise.2:292
992 #: build/C/man2/sync_file_range.2:160
998 #: build/C/man2/fallocate.2:139
999 msgid "An I/O error occurred while reading from or writing to a file system."
1000 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1003 #: build/C/man2/fallocate.2:139 build/C/man2/mmap.2:450
1004 #: build/C/man3/posix_fallocate.3:85
1010 #: build/C/man2/fallocate.2:146
1012 "I<fd> does not refer to a regular file or a directory. (If I<fd> is a pipe "
1013 "or FIFO, a different error results.)"
1015 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1016 "を参照している場合、別のエラーが発生する)。"
1019 #: build/C/man2/fallocate.2:146 build/C/man3/posix_fallocate.3:89
1020 #: build/C/man2/shmget.2:214 build/C/man2/sync_file_range.2:166
1026 #: build/C/man2/fallocate.2:151 build/C/man3/posix_fallocate.3:94
1028 "There is not enough space left on the device containing the file referred to "
1030 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1033 #: build/C/man2/fallocate.2:155
1034 msgid "This kernel does not implement B<fallocate>()."
1038 #: build/C/man2/fallocate.2:155
1040 msgid "B<EOPNOTSUPP>"
1041 msgstr "B<EOPNOTSUPP>"
1044 #: build/C/man2/fallocate.2:164
1047 #| "The file system containing the file referred to by I<fd> does not support "
1048 #| "this operation."
1050 "The file system containing the file referred to by I<fd> does not support "
1051 "this operation; or the I<mode> is not supported by the file system "
1052 "containing the file referred to by I<fd>."
1054 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作をサポートして"
1058 #: build/C/man2/fallocate.2:164 build/C/man2/mlock.2:144
1059 #: build/C/man2/mlock.2:183 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:342
1060 #: build/C/man2/shmget.2:222
1066 #: build/C/man2/fallocate.2:180
1068 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)). Or: "
1069 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1070 "is marked append-only (see B<chattr>(1))."
1074 #: build/C/man2/fallocate.2:180 build/C/man2/posix_fadvise.2:96
1075 #: build/C/man3/posix_fallocate.3:94 build/C/man2/sync_file_range.2:169
1081 #: build/C/man2/fallocate.2:184
1082 msgid "I<fd> refers to a pipe or FIFO."
1083 msgstr "I<fd> がパイプか FIFO を参照している。"
1086 #: build/C/man2/fallocate.2:184 build/C/man2/mmap2.2:74
1087 #: build/C/man2/posix_fadvise.2:103 build/C/man3/posix_fallocate.3:98
1088 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1089 #: build/C/man2/remap_file_pages.2:146 build/C/man3/shm_open.3:247
1090 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:177
1091 #: build/C/man3/mcheck.3:133
1097 #: build/C/man2/fallocate.2:188
1099 "B<fallocate>() is available on Linux since kernel 2.6.23. Support is "
1100 "provided by glibc since version 2.10."
1102 "B<fallocate>() はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1103 "対応はバージョン 3.10 以降で行われている。"
1106 #: build/C/man2/fallocate.2:191
1107 msgid "B<fallocate>() is Linux-specific."
1108 msgstr "B<fallocate>() は Linux 固有である。"
1111 #: build/C/man2/fallocate.2:195
1112 msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1113 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1116 #: build/C/man2/madvise.2:35
1122 #: build/C/man2/madvise.2:35
1128 #: build/C/man2/madvise.2:38
1129 msgid "madvise - give advice about use of memory"
1130 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1133 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1134 #: build/C/man3/shm_open.3:31
1135 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1136 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1139 #: build/C/man2/madvise.2:42
1141 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1143 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1146 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:42
1147 #: build/C/man3/posix_fallocate.3:37 build/C/man3/posix_memalign.3:48
1149 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1150 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1153 #: build/C/man2/madvise.2:50
1154 msgid "B<madvise>(): _BSD_SOURCE"
1155 msgstr "B<madvise>(): _BSD_SOURCE"
1158 #: build/C/man2/madvise.2:68
1160 "The B<madvise>() system call advises the kernel about how to handle paging "
1161 "input/output in the address range beginning at address I<addr> and with size "
1162 "I<length> bytes. It allows an application to tell the kernel how it expects "
1163 "to use some mapped or shared memory areas, so that the kernel can choose "
1164 "appropriate read-ahead and caching techniques. This call does not influence "
1165 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1166 "but may influence its performance. The kernel is free to ignore the advice."
1168 "B<madvise>() システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1169 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1170 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1171 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1172 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1173 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1174 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1177 #: build/C/man2/madvise.2:72
1178 msgid "The advice is indicated in the I<advice> argument which can be"
1180 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1183 #: build/C/man2/madvise.2:72
1185 msgid "B<MADV_NORMAL>"
1186 msgstr "B<MADV_NORMAL>"
1189 #: build/C/man2/madvise.2:76
1190 msgid "No special treatment. This is the default."
1191 msgstr "特別な扱いは行わない。これがデフォルトである。"
1194 #: build/C/man2/madvise.2:76
1196 msgid "B<MADV_RANDOM>"
1197 msgstr "B<MADV_RANDOM>"
1200 #: build/C/man2/madvise.2:80
1202 "Expect page references in random order. (Hence, read ahead may be less "
1203 "useful than normally.)"
1205 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1209 #: build/C/man2/madvise.2:80
1211 msgid "B<MADV_SEQUENTIAL>"
1212 msgstr "B<MADV_SEQUENTIAL>"
1215 #: build/C/man2/madvise.2:85
1217 "Expect page references in sequential order. (Hence, pages in the given "
1218 "range can be aggressively read ahead, and may be freed soon after they are "
1221 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1222 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1226 #: build/C/man2/madvise.2:85
1228 msgid "B<MADV_WILLNEED>"
1229 msgstr "B<MADV_WILLNEED>"
1232 #: build/C/man2/madvise.2:89
1234 "Expect access in the near future. (Hence, it might be a good idea to read "
1235 "some pages ahead.)"
1237 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1241 #: build/C/man2/madvise.2:89
1243 msgid "B<MADV_DONTNEED>"
1244 msgstr "B<MADV_DONTNEED>"
1247 #: build/C/man2/madvise.2:100
1249 "Do not expect access in the near future. (For the time being, the "
1250 "application is finished with the given range, so the kernel can free "
1251 "resources associated with it.) Subsequent accesses of pages in this range "
1252 "will succeed, but will result either in reloading of the memory contents "
1253 "from the underlying mapped file (see B<mmap>(2)) or zero-fill-on-demand "
1254 "pages for mappings without an underlying file."
1256 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1257 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。) こ"
1258 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1259 "プ元のファイルからロードし直すことになる (B<mmap>(2) を見よ) か、 または元"
1260 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1264 #: build/C/man2/madvise.2:100
1266 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1267 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1270 #. Databases want to use this feature to drop a section of their
1271 #. bufferpool (shared memory segments) - without writing back to
1272 #. disk/swap space. This feature is also useful for supporting
1273 #. hot-plug memory on UML.
1275 #: build/C/man2/madvise.2:113
1277 "Free up a given range of pages and its associated backing store. Currently, "
1278 "only shmfs/tmpfs supports this; other file systems return with the error "
1281 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1282 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1286 #: build/C/man2/madvise.2:113
1288 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1289 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1291 #. See http://lwn.net/Articles/171941/
1292 #. [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1293 #. Currently, copy-on-write may change the physical address of
1294 #. a page even if the user requested that the page is pinned in
1295 #. memory (either by mlock or by get_user_pages). This happens
1296 #. if the process forks meanwhile, and the parent writes to that
1297 #. page. As a result, the page is orphaned: in case of
1298 #. get_user_pages, the application will never see any data hardware
1299 #. DMA's into this page after the COW. In case of mlock'd memory,
1300 #. the parent is not getting the realtime/security benefits of mlock.
1301 #. In particular, this affects the Infiniband modules which do DMA from
1302 #. and into user pages all the time.
1303 #. This patch adds madvise options to control whether memory range is
1304 #. inherited across fork. Useful e.g. for when hardware is doing DMA
1305 #. from/into these pages. Could also be useful to an application
1306 #. wanting to speed up its forks by cutting large areas out of
1308 #. SEE ALSO: http://lwn.net/Articles/171941/
1309 #. "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1311 #: build/C/man2/madvise.2:144
1313 "Do not make the pages in this range available to the child after a B<fork>"
1314 "(2). This is useful to prevent copy-on-write semantics from changing the "
1315 "physical location of a page(s) if the parent writes to it after a B<fork>"
1316 "(2). (Such page relocations cause problems for hardware that DMAs into the "
1319 "B<fork>(2) が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1320 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2) "
1321 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1322 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1323 "を行うような場合に 問題を起こすことがある)。"
1326 #: build/C/man2/madvise.2:144
1328 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1329 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1332 #: build/C/man2/madvise.2:150
1334 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1335 "a mapping is inherited across B<fork>(2)."
1337 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1338 "(2) の前後でマッピングは継承されるようになる。"
1341 #: build/C/man2/madvise.2:150
1343 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1344 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1347 #: build/C/man2/madvise.2:162
1349 "Poison a page and handle it like a hardware memory corruption. This "
1350 "operation is only available for privileged (B<CAP_SYS_ADMIN>) processes. "
1351 "This operation may result in the calling process receiving a B<SIGBUS> and "
1352 "the page being unmapped. This feature is intended for testing of memory "
1353 "error-handling code; it is only available if the kernel was configured with "
1354 "B<CONFIG_MEMORY_FAILURE>."
1358 #: build/C/man2/madvise.2:162
1360 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1361 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1364 #: build/C/man2/madvise.2:180
1366 "Soft offline the pages in the range specified by I<addr> and I<length>. The "
1367 "memory of each page in the specified range is preserved (i.e., when next "
1368 "accessed, the same content will be visible, but in a new physical page "
1369 "frame), and the original page is offlined (i.e., no longer used, and taken "
1370 "out of normal memory management). The effect of the B<MADV_SOFT_OFFLINE> "
1371 "operation is invisible to (i.e., does not change the semantics of) the "
1372 "calling process. This feature is intended for testing of memory error-"
1373 "handling code; it is only available if the kernel was configured with "
1374 "B<CONFIG_MEMORY_FAILURE>."
1378 #: build/C/man2/madvise.2:180
1380 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1381 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1384 #: build/C/man2/madvise.2:205
1386 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1387 "I<addr> and I<length>. The kernel regularly scans those areas of user "
1388 "memory that have been marked as mergeable, looking for pages with identical "
1389 "content. These are replaced by a single write-protected page (which is "
1390 "automatically copied if a process later wants to update the content of the "
1391 "page). KSM only merges private anonymous pages (see B<mmap>(2)). The KSM "
1392 "feature is intended for applications that generate many instances of the "
1393 "same data (e.g., virtualization systems such as KVM). It can consume a lot "
1394 "of processing power; use with care. See the kernel source file "
1395 "I<Documentation/vm/ksm.txt> for more details. The B<MADV_MERGEABLE> and "
1396 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1397 "configured with B<CONFIG_KSM>."
1401 #: build/C/man2/madvise.2:205
1403 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1404 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1407 #: build/C/man2/madvise.2:214
1409 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1410 "address range; KSM unmerges whatever pages it had merged in the address "
1411 "range specified by I<addr> and I<length>."
1415 #: build/C/man2/madvise.2:214
1417 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1418 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1420 #. http://lwn.net/Articles/358904/
1421 #. https://lwn.net/Articles/423584/
1423 #: build/C/man2/madvise.2:243
1425 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1426 "I<addr> and I<length>. Currently, Transparent Huge Pages only work with "
1427 "private anonymous pages (see B<mmap>(2)). The kernel will regularly scan "
1428 "the areas marked as huge page candidates to replace them with huge pages. "
1429 "The kernel will also allocate huge pages directly when the region is "
1430 "naturally aligned to the huge page size (see B<posix_memalign>(2)). This "
1431 "feature is primarily aimed at applications that use large mappings of data "
1432 "and access large regions of that memory at a time (e.g. virtualization "
1433 "systems such as QEMU). It can very easily waste memory (e.g. a 2MB mapping "
1434 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1435 "one 4KB page). See the kernel source file I<Documentation/vm/transhuge.txt> "
1436 "for more details. The B<MADV_HUGEPAGE> and B<MADV_NOHUGEPAGE> operations "
1437 "are only available if the kernel was configured with "
1438 "B<CONFIG_TRANSPARENT_HUGEPAGE>."
1442 #: build/C/man2/madvise.2:243
1444 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1445 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1448 #: build/C/man2/madvise.2:250
1450 "Ensures that memory in the address range specified by I<addr> and I<length> "
1451 "will not be collapsed into huge pages."
1455 #: build/C/man2/madvise.2:257
1457 "On success B<madvise>() returns zero. On error, it returns -1 and I<errno> "
1458 "is set appropriately."
1460 "B<madvise>() は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1464 #: build/C/man2/madvise.2:258 build/C/man2/mlock.2:155 build/C/man2/mmap.2:411
1465 #: build/C/man2/mremap.2:137
1471 #: build/C/man2/madvise.2:261
1472 msgid "A kernel resource was temporarily unavailable."
1473 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1476 #: build/C/man2/madvise.2:264
1477 msgid "The map exists, but the area maps something that isn't a file."
1478 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1481 #: build/C/man2/madvise.2:267
1482 msgid "This error can occur for the following reasons:"
1486 #: build/C/man2/madvise.2:268 build/C/man2/madvise.2:274
1487 #: build/C/man2/madvise.2:277 build/C/man2/madvise.2:280
1488 #: build/C/man2/madvise.2:283 build/C/man3/mallopt.3:233
1489 #: build/C/man3/mallopt.3:239
1497 #: build/C/man2/madvise.2:274
1498 msgid "The value I<len> is negative."
1499 msgstr "I<len> が負の値である。"
1502 #: build/C/man2/madvise.2:277
1503 msgid "I<addr> is not page-aligned."
1507 #: build/C/man2/madvise.2:280
1508 msgid "I<advice> is not a valid value"
1509 msgstr "I<advice> が有効な値でない。"
1512 #: build/C/man2/madvise.2:283
1514 "The application is attempting to release locked or shared pages (with "
1515 "B<MADV_DONTNEED>)."
1517 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1522 #: build/C/man2/madvise.2:291
1524 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1525 "kernel was not configured with B<CONFIG_KSM>."
1529 #: build/C/man2/madvise.2:298
1531 "(for B<MADV_WILLNEED>) Paging in this area would exceed the process's "
1532 "maximum resident set size."
1534 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1535 "(resident set size) の最大値を越えてしまう。"
1538 #: build/C/man2/madvise.2:298 build/C/man2/madvise.2:303
1539 #: build/C/man2/mlock.2:124 build/C/man2/mlock.2:132 build/C/man2/mlock.2:170
1540 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:94
1541 #: build/C/man2/mprotect.2:97 build/C/man2/mremap.2:180
1542 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1543 #: build/C/man2/shmctl.2:326 build/C/man2/shmget.2:211
1544 #: build/C/man2/shmop.2:209 build/C/man2/subpage_prot.2:82
1545 #: build/C/man2/sync_file_range.2:163
1551 #: build/C/man2/madvise.2:303
1552 msgid "(for B<MADV_WILLNEED>) Not enough memory: paging in failed."
1553 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1556 #: build/C/man2/madvise.2:307
1558 "Addresses in the specified range are not currently mapped, or are outside "
1559 "the address space of the process."
1561 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1564 #. FIXME . Write a posix_fadvise(3) page.
1566 #: build/C/man2/madvise.2:319
1568 "POSIX.1b. POSIX.1-2001 describes B<posix_madvise>(3) with constants "
1569 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here. "
1570 "There is a similar B<posix_fadvise>(2) for file access."
1572 "POSIX.1b. POSIX.1-2001 では、 B<posix_madvise>(3) を B<POSIX_MADV_NORMAL> "
1573 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1574 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2) という類似の関数が存在"
1578 #: build/C/man2/madvise.2:328
1580 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1581 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1583 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1584 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1587 #: build/C/man2/madvise.2:329 build/C/man2/mlock.2:268
1588 #: build/C/man2/shmget.2:278
1594 #: build/C/man2/madvise.2:337
1596 "The current Linux implementation (2.4.0) views this system call more as a "
1597 "command than as advice and hence may return an error when it cannot do what "
1598 "it usually would do in response to this advice. (See the ERRORS description "
1599 "above.) This is nonstandard behavior."
1601 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1602 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1603 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1609 #. function first appeared in 4.4BSD.
1611 #: build/C/man2/madvise.2:353
1613 "The Linux implementation requires that the address I<addr> be page-aligned, "
1614 "and allows I<length> to be zero. If there are some parts of the specified "
1615 "address range that are not mapped, the Linux version of B<madvise>() "
1616 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1617 "the system call, as it should)."
1619 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1620 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>() では、指定"
1621 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1622 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1626 #: build/C/man2/madvise.2:360
1628 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1631 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1635 #: build/C/man3/malloc_hook.3:6
1638 msgstr "MALLOC_HOOK"
1641 #: build/C/man3/malloc_hook.3:6
1647 #: build/C/man3/malloc_hook.3:11
1649 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1650 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
1652 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1653 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
1656 #: build/C/man3/malloc_hook.3:14 build/C/man3/posix_memalign.3:40
1658 msgid "B<#include E<lt>malloc.hE<gt>>\n"
1659 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
1662 #: build/C/man3/malloc_hook.3:16
1664 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1665 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1668 #: build/C/man3/malloc_hook.3:19
1670 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1671 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1674 #: build/C/man3/malloc_hook.3:22
1677 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1678 "B< const void *>I<caller>B<);>\n"
1680 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1681 "B< const void *>I<caller>B<);>\n"
1684 #: build/C/man3/malloc_hook.3:24
1686 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1687 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1690 #: build/C/man3/malloc_hook.3:26
1692 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
1693 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
1696 #: build/C/man3/malloc_hook.3:28
1698 msgid "B<void (*__after_morecore_hook)(void);>\n"
1699 msgstr "B<void (*__after_morecore_hook)(void);>\n"
1702 #: build/C/man3/malloc_hook.3:39
1704 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
1705 "(3), and B<free>(3) by specifying appropriate hook functions. You can use "
1706 "these hooks to help you debug programs that use dynamic memory allocation, "
1709 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
1710 "B<malloc>(3), B<realloc>(3), B<free>(3) の動作を変更することができる。例え"
1711 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
1715 #: build/C/man3/malloc_hook.3:46
1717 "The variable B<__malloc_initialize_hook> points at a function that is called "
1718 "once when the malloc implementation is initialized. This is a weak "
1719 "variable, so it can be overridden in the application with a definition like "
1722 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
1723 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
1724 "ケーション内で 以下のような定義で上書きできる:"
1727 #: build/C/man3/malloc_hook.3:49
1729 msgid " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1730 msgstr " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1733 #: build/C/man3/malloc_hook.3:54
1735 "Now the function I<my_init_hook>() can do the initialization of all hooks."
1737 "なお、関数 I<my_init_hook>() で全てのフックの初期化をすることができる。"
1740 #: build/C/man3/malloc_hook.3:70
1742 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
1743 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
1744 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
1745 "except that they have a final argument I<caller> that gives the address of "
1746 "the caller of B<malloc>(3), etc."
1748 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
1749 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
1750 "B<free>(3) とよく似たプロトタイプを持っているが、 一番最後の引き数 "
1751 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3) などの呼び"
1752 "出し元 (caller) のアドレスが格納される。"
1755 #: build/C/man3/malloc_hook.3:76
1757 "The variable B<__after_morecore_hook> points at a function that is called "
1758 "each time after B<sbrk>(2) was asked for more memory."
1760 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2) が呼ばれた"
1761 "後で毎回呼び出される関数へのポインタである。"
1764 #: build/C/man3/malloc_hook.3:78 build/C/man3/mtrace.3:78
1765 #: build/C/man3/malloc_get_state.3:86 build/C/man3/mcheck.3:146
1766 msgid "These functions are GNU extensions."
1767 msgstr "これらの関数は GNU による拡張である。"
1769 #. https://bugzilla.redhat.com/show_bug.cgi?id=450187
1770 #. http://sourceware.org/bugzilla/show_bug.cgi?id=9957
1772 #: build/C/man3/malloc_hook.3:85
1774 "The use of these hook functions is not safe in multithreaded programs, and "
1775 "they are now deprecated. Programmers should instead preempt calls to the "
1776 "relevant functions by defining and exporting functions such as \"malloc\" "
1781 #: build/C/man3/malloc_hook.3:85 build/C/man3/mallopt.3:464
1782 #: build/C/man2/mmap.2:571 build/C/man2/mprotect.2:142
1783 #: build/C/man3/mtrace.3:106 build/C/man3/mcheck.3:159
1789 #: build/C/man3/malloc_hook.3:87
1790 msgid "Here is a short example of how to use these variables."
1791 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
1794 #: build/C/man3/malloc_hook.3:91
1797 "#include E<lt>stdio.hE<gt>\n"
1798 "#include E<lt>malloc.hE<gt>\n"
1800 "#include E<lt>stdio.hE<gt>\n"
1801 "#include E<lt>malloc.hE<gt>\n"
1804 #: build/C/man3/malloc_hook.3:95
1807 "/* Prototypes for our hooks. */\n"
1808 "static void my_init_hook(void);\n"
1809 "static void *my_malloc_hook(size_t, const void *);\n"
1811 "/* 使おうとするフックのプロトタイプ宣言 */\n"
1812 "static void my_init_hook(void);\n"
1813 "static void *my_malloc_hook(size_t, const void *);\n"
1816 #: build/C/man3/malloc_hook.3:98
1819 "/* Variables to save original hooks. */\n"
1820 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1822 "/* 元々のフックを保存するための変数 */\n"
1823 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1826 #: build/C/man3/malloc_hook.3:101
1829 "/* Override initializing hook from the C library. */\n"
1830 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1832 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
1833 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1836 #: build/C/man3/malloc_hook.3:108
1840 "my_init_hook(void)\n"
1842 " old_malloc_hook = __malloc_hook;\n"
1843 " __malloc_hook = my_malloc_hook;\n"
1847 "my_init_hook(void)\n"
1849 " old_malloc_hook = __malloc_hook;\n"
1850 " __malloc_hook = my_malloc_hook;\n"
1854 #: build/C/man3/malloc_hook.3:113
1858 "my_malloc_hook(size_t size, const void *caller)\n"
1863 "my_malloc_hook(size_t size, const void *caller)\n"
1868 #: build/C/man3/malloc_hook.3:116
1871 " /* Restore all old hooks */\n"
1872 " __malloc_hook = old_malloc_hook;\n"
1874 " /* 元々のフックを全て戻す */\n"
1875 " __malloc_hook = old_malloc_hook;\n"
1878 #: build/C/man3/malloc_hook.3:119
1881 " /* Call recursively */\n"
1882 " result = malloc(size);\n"
1884 " /* malloc の再帰的呼び出し */\n"
1885 " result = malloc(size);\n"
1888 #: build/C/man3/malloc_hook.3:122
1891 " /* Save underlying hooks */\n"
1892 " old_malloc_hook = __malloc_hook;\n"
1894 " /* 現在設定されているフック (underlying hook) を保存する */\n"
1895 " old_malloc_hook = __malloc_hook;\n"
1898 #: build/C/man3/malloc_hook.3:126
1901 " /* printf() might call malloc(), so protect it too. */\n"
1902 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1903 " (unsigned int) size, caller, result);\n"
1905 " /* printf() は malloc() を呼び出す可能性があるので\n"
1906 " ここでもガードを行う (元々のフックのままにしておく) */\n"
1907 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1908 " (unsigned int) size, caller, result);\n"
1911 #: build/C/man3/malloc_hook.3:129
1914 " /* Restore our own hooks */\n"
1915 " __malloc_hook = my_malloc_hook;\n"
1917 " /* ユーザが使おうとするフックを再設定する */\n"
1918 " __malloc_hook = my_malloc_hook;\n"
1921 #: build/C/man3/malloc_hook.3:132
1931 #: build/C/man3/malloc_hook.3:138
1932 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1933 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1936 #: build/C/man3/mallopt.3:24
1942 #: build/C/man3/mallopt.3:24 build/C/man3/mtrace.3:23 build/C/man3/mcheck.3:23
1944 #| msgid "2012-04-17"
1949 #: build/C/man3/mallopt.3:27
1950 msgid "mallopt - set memory allocation parameters"
1954 #: build/C/man3/mallopt.3:29 build/C/man3/malloc_trim.3:29
1955 #: build/C/man3/malloc_usable_size.3:28
1956 msgid "B<#include E<lt>malloc.hE<gt>>"
1957 msgstr "B<#include E<lt>malloc.hE<gt>>"
1960 #: build/C/man3/mallopt.3:31
1961 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1962 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1965 #: build/C/man3/mallopt.3:42
1967 "The B<mallopt>() function adjusts parameters that control the behavior of "
1968 "the memory-allocation functions (see B<malloc>(3)). The I<param> argument "
1969 "specifies the parameter to be modified, and I<value> specifies the new value "
1970 "for that parameter."
1974 #: build/C/man3/mallopt.3:45
1975 msgid "The following values can be specified for I<param>:"
1976 msgstr "I<param> には以下の値を指定することができる。"
1979 #: build/C/man3/mallopt.3:45
1981 msgid "B<M_CHECK_ACTION>"
1982 msgstr "B<M_CHECK_ACTION>"
1985 #: build/C/man3/mallopt.3:51
1987 "Setting this parameter controls how glibc responds when various kinds of "
1988 "programming errors are detected (e.g., freeing the same pointer twice). The "
1989 "3 least significant bits (2, 1, and 0) of the value assigned to this "
1990 "parameter determine the glibc behavior, as follows:"
1994 #: build/C/man3/mallopt.3:52
2000 #: build/C/man3/mallopt.3:62
2002 "If this bit is set, then print a one-line message on I<stderr> that provides "
2003 "details about the error. The message starts with the string \"***\\ glibc "
2004 "detected\\ ***\", followed by the program name, the name of the memory-"
2005 "allocation function in which the error was detected, a brief description of "
2006 "the error, and the memory address where the error was detected."
2010 #: build/C/man3/mallopt.3:62
2016 #: build/C/man3/mallopt.3:77
2018 "If this bit is set, then, after printing any error message specified by bit "
2019 "0, the program is terminated by calling B<abort>(3). In glibc versions "
2020 "since 2.4, if bit 0 is also set, then, between printing the error message "
2021 "and aborting, the program also prints a stack trace in the manner of "
2022 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
2023 "proc/[pid]/maps> (see B<proc>(5))."
2027 #: build/C/man3/mallopt.3:77
2029 msgid "Bit 2 (since glibc 2.4)"
2030 msgstr "Bit 2 (glibc 2.4 以降)"
2033 #: build/C/man3/mallopt.3:84
2035 "This bit has an effect only if bit 0 is also set. If this bit is set, then "
2036 "the one-line message describing the error is simplified to contain just the "
2037 "name of the function where the error was detected and the brief description "
2042 #: build/C/man3/mallopt.3:89
2043 msgid "The remaining bits in I<value> are ignored."
2047 #: build/C/man3/mallopt.3:93
2049 "Combining the above details, the following numeric values are meaningful for "
2050 "B<M_CHECK_ACTION>:"
2054 #: build/C/man3/mallopt.3:94
2060 #: build/C/man3/mallopt.3:96
2061 msgid "Ignore error conditions; continue execution (with undefined results)."
2065 #: build/C/man3/mallopt.3:96
2071 #: build/C/man3/mallopt.3:98
2072 msgid "Print a detailed error message and continue execution."
2076 #: build/C/man3/mallopt.3:98
2082 #: build/C/man3/mallopt.3:100
2083 msgid "Abort the program."
2087 #: build/C/man3/mallopt.3:100
2093 #: build/C/man3/mallopt.3:103
2095 "Print detailed error message, stack trace, and memory mappings, and abort "
2100 #: build/C/man3/mallopt.3:103
2106 #: build/C/man3/mallopt.3:105
2107 msgid "Print a simple error message and continue execution."
2111 #: build/C/man3/mallopt.3:105
2117 #: build/C/man3/mallopt.3:108
2119 "Print simple error message, stack trace, and memory mappings, and abort the "
2124 #: build/C/man3/mallopt.3:114
2126 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
2127 "3. In glibc version 2.3.3 and earlier, the default value is 1."
2131 #: build/C/man3/mallopt.3:119
2133 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
2134 "crash may happen much later, and the true cause of the problem is then very "
2135 "hard to track down."
2139 #: build/C/man3/mallopt.3:119
2141 msgid "B<M_MMAP_MAX>"
2142 msgstr "B<M_MMAP_MAX>"
2144 #. The following text adapted from comments in the glibc source:
2146 #: build/C/man3/mallopt.3:129
2148 "This parameter specifies the maximum number of allocation requests that may "
2149 "be simultaneously serviced using B<mmap>(2). This parameter exists because "
2150 "some systems have a limited number of internal tables for use by B<mmap>(2), "
2151 "and using more than a few of them may degrade performance."
2155 #: build/C/man3/mallopt.3:136
2157 "The default value is 65,536, a value which has no special significance and "
2158 "which servers only as a safeguard. Setting this parameter to 0 disables the "
2159 "use of B<mmap>(2) for servicing large allocation requests."
2163 #: build/C/man3/mallopt.3:136
2165 msgid "B<M_MMAP_THRESHOLD>"
2166 msgstr "B<M_MMAP_THRESHOLD>"
2169 #: build/C/man3/mallopt.3:145
2171 "For allocations greater than or equal to the limit specified (in bytes) by "
2172 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
2173 "allocation functions employ B<mmap>(2) instead of increasing the program "
2174 "break using B<sbrk>(2)."
2178 #: build/C/man3/mallopt.3:165
2180 "Allocating memory using B<mmap>(2) has the significant advantage that the "
2181 "allocated memory blocks can always be independently released back to the "
2182 "system. (By contrast, the heap can be trimmed only if memory is freed at "
2183 "the top end.) On the other hand, there are some disadvantages to the use of "
2184 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
2185 "later allocations; memory may be wasted because B<mmap>(2) allocations must "
2186 "be page-aligned; and the kernel must perform the expensive task of zeroing "
2187 "out memory allocated via B<mmap>(2). Balancing these factors leads to a "
2188 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
2192 #: build/C/man3/mallopt.3:172
2194 "The lower limit for this parameter is 0. The upper limit is "
2195 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
2196 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
2200 #: build/C/man3/mallopt.3:190
2202 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default. The "
2203 "initial value of the threshold is 128*1024, but when blocks larger than the "
2204 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
2205 "are freed, the threshold is adjusted upwards to the size of the freed "
2206 "block. When dynamic mmap thresholding is in effect, the threshold for "
2207 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
2208 "threshold. Dynamic adjustment of the mmap threshold is disabled if any of "
2209 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
2210 "parameters is set."
2214 #: build/C/man3/mallopt.3:190
2216 msgid "B<M_MXFAST> (since glibc 2.3)"
2217 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
2219 #. The following text adapted from comments in the glibc sources:
2221 #: build/C/man3/mallopt.3:210
2223 "Set the upper limit for memory allocation requests that are satisfied using "
2224 "\"fastbins\". (The measurement unit for this parameter is bytes.) Fastbins "
2225 "are storage areas that hold deallocated blocks of memory of the same size "
2226 "without merging adjacent free blocks. Subsequent reallocation of blocks of "
2227 "the same size can be handled very quickly by allocating from the fastbin, "
2228 "although memory fragmentation and the overall memory footprint of the "
2229 "program can increase. The default value for this parameter is I<64*sizeof"
2230 "(size_t)/4> (i.e., 64 on 32-bit architectures). The range for this "
2231 "parameter is 0 to I<80*sizeof(size_t)/4>. Setting B<M_MXFAST> to 0 disables "
2232 "the use of fastbins."
2236 #: build/C/man3/mallopt.3:210
2238 msgid "B<M_PERTURB> (since glibc 2.4)"
2239 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
2242 #: build/C/man3/mallopt.3:225
2244 "If this parameter is set to a nonzero value, then bytes of allocated memory "
2245 "(other than allocations via B<calloc>(3)) are initialized to the complement "
2246 "of the value in the least significant byte of I<value>, and when allocated "
2247 "memory is released using B<free>(3), the freed bytes are set to the least "
2248 "significant byte of I<value>. This can be useful for detecting errors where "
2249 "programs incorrectly rely on allocated memory being initialized to zero, or "
2250 "reuse values in memory that has already been freed."
2254 #: build/C/man3/mallopt.3:225
2256 msgid "B<M_TOP_PAD>"
2260 #: build/C/man3/mallopt.3:232
2262 "This parameter defines the amount of padding to employ when calling B<sbrk>"
2263 "(2) to modify the program break. (The measurement unit for this parameter "
2264 "is bytes.) This parameter has an effect in the following circumstances:"
2268 #: build/C/man3/mallopt.3:239
2270 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
2271 "the B<sbrk>(2) request."
2275 #: build/C/man3/mallopt.3:245
2277 "When the heap is trimmed as a consequence of calling B<free>(3) (see the "
2278 "discussion of B<M_TRIM_THRESHOLD>) this much free space is preserved at the "
2283 #: build/C/man3/mallopt.3:249
2285 "In either case, the amount of padding is always rounded to a system page "
2290 #: build/C/man3/mallopt.3:256
2292 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
2293 "system calls (when the parameter is set low) and wasting unused memory at "
2294 "the top of the heap (when the parameter is set high)."
2297 #. DEFAULT_TOP_PAD in glibc source
2299 #: build/C/man3/mallopt.3:259
2300 msgid "The default value for this parameter is 128*1024."
2304 #: build/C/man3/mallopt.3:259
2306 msgid "B<M_TRIM_THRESHOLD>"
2310 #: build/C/man3/mallopt.3:275
2312 "When the amount of contiguous free memory at the top of the heap grows "
2313 "sufficiently large, B<free>(3) employs B<sbrk>(2) to release this memory "
2314 "back to the system. (This can be useful in programs that continue to "
2315 "execute for a long period after freeing a significant amount of memory.) "
2316 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
2317 "this block of memory must reach before B<sbrk>(2) is used to trim the heap."
2321 #: build/C/man3/mallopt.3:280
2323 "The default value for this parameter is 128*1024. Setting "
2324 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
2330 #. FIXME Do the arena parameters need to be documented?
2332 #. .BR M_ARENA_TEST " (since glibc 2.10)"
2334 #. .BR M_ARENA_MAX " (since glibc 2.10)"
2335 #. Environment variables
2336 #. MALLOC_ARENA_MAX_
2337 #. MALLOC_ARENA_TEST_
2338 #. http://udrepper.livejournal.com/20948.html describes some details
2339 #. of the MALLOC_ARENA_* environment variables.
2340 #. These macros aren't enabled in production releases until 2.15?
2341 #. (see glibc malloc/Makefile)
2343 #: build/C/man3/mallopt.3:303
2345 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
2346 "of system calls (when the parameter is set low) and wasting unused memory "
2347 "at the top of the heap (when the parameter is set high)."
2351 #: build/C/man3/mallopt.3:303
2353 msgid "Environment Variables"
2357 #: build/C/man3/mallopt.3:318
2359 "A number of environment variables can be defined to modify some of the same "
2360 "parameters as are controlled by B<mallopt>(). Using these variables has the "
2361 "advantage that the source code of the program need not be changed. To be "
2362 "effective, these variables must be defined before the first call to a memory-"
2363 "allocation function. (If the same parameters are adjusted via B<mallopt>() "
2364 "then the B<mallopt>() settings take precedence.) For security reasons, "
2365 "these variables are ignored in set-user-ID and set-group-ID programs."
2369 #: build/C/man3/mallopt.3:321
2371 "The environment variables are as follows (note the trailing underscore at "
2372 "the end of the name of each variable):"
2376 #: build/C/man3/mallopt.3:321
2378 msgid "B<MALLOC_CHECK_>"
2379 msgstr "B<MALLOC_CHECK_>"
2381 #. On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
2382 #. when MALLOC_CHECK_ was set.
2384 #: build/C/man3/mallopt.3:338
2386 "This environment variable controls the same parameter as B<mallopt>() "
2387 "B<M_CHECK_ACTION>. If this variable is set to a nonzero value, then a "
2388 "special implementation of the memory-allocation functions is used. (This is "
2389 "accomplished using the B<malloc_hook>(3) feature.) This implementation "
2390 "performs additional error checking, but is slower than the standard set of "
2391 "memory-allocation functions. (This implementation does not detect all "
2392 "possible errors; memory leaks can still occur.)"
2396 #: build/C/man3/mallopt.3:343
2398 "The value assigned to this environment variable should be a single digit, "
2399 "whose meaning is as described for B<M_CHECK_ACTION>. Any characters beyond "
2400 "the initial digit are ignored."
2404 #: build/C/man3/mallopt.3:352
2406 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
2407 "for set-user-ID and set-group-ID programs. However, if the file I</etc/suid-"
2408 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
2409 "also has an effect for set-user-ID and set-group-ID programs."
2413 #: build/C/man3/mallopt.3:352
2415 msgid "B<MALLOC_MMAP_MAX_>"
2419 #: build/C/man3/mallopt.3:357
2420 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_MAX>."
2424 #: build/C/man3/mallopt.3:357
2426 msgid "B<MALLOC_MMAP_THRESHOLD_>"
2430 #: build/C/man3/mallopt.3:362
2431 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_THRESHOLD>."
2435 #: build/C/man3/mallopt.3:362
2437 msgid "B<MALLOC_PERTURB_>"
2441 #: build/C/man3/mallopt.3:367
2442 msgid "Controls the same parameter as B<mallopt>() B<M_PERTURB>."
2446 #: build/C/man3/mallopt.3:367
2448 msgid "B<MALLOC_TRIM_THRESHOLD_>"
2452 #: build/C/man3/mallopt.3:372
2453 msgid "Controls the same parameter as B<mallopt>() B<M_TRIM_THRESHOLD>."
2457 #: build/C/man3/mallopt.3:372
2459 msgid "B<MALLOC_TOP_PAD_>"
2460 msgstr "B<MALLOC_TOP_PAD_>"
2463 #: build/C/man3/mallopt.3:377
2464 msgid "Controls the same parameter as B<mallopt>() B<M_TOP_PAD>."
2468 #: build/C/man3/mallopt.3:382
2469 msgid "On success, B<mallopt>() returns 1. On error, it returns 0."
2470 msgstr "B<mallopt>() は成功すると 1 を返す。エラーの場合は 0 を返す。"
2473 #. Available already in glibc 2.0, possibly earlier
2475 #: build/C/man3/mallopt.3:390
2476 msgid "On error, I<errno> is I<not> set."
2477 msgstr "エラーの場合、I<errno> は設定I<されない>。"
2481 #: build/C/man3/mallopt.3:404
2483 "This function is not specified by POSIX or the C standards. A similar "
2484 "function exists on many System V derivatives, but the range of values for "
2485 "I<param> varies across systems. The SVID defined options B<M_MXFAST>, "
2486 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
2487 "implemented in glibc."
2491 #: build/C/man3/mallopt.3:408
2492 msgid "Specifying an invalid value for I<param> does not generate an error."
2495 #. FIXME This looks buggy:
2496 #. setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
2497 #. malloc requests are rounded up:
2498 #. (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
2499 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
2501 #: build/C/man3/mallopt.3:416
2503 "A calculation error within the glibc implementation means that a call of the "
2508 #: build/C/man3/mallopt.3:419
2510 msgid " mallopt(M_MXFAST, n)\n"
2513 #. Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
2515 #: build/C/man3/mallopt.3:431
2517 "does not result in fastbins being employed for all allocations of size up to "
2518 "I<n>. To ensure desired results, I<n> should be rounded up to the next "
2519 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
2523 #. FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
2524 #. do have an effect for set-user-ID programs (but not
2525 #. set-group-ID programs).
2526 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
2528 #: build/C/man3/mallopt.3:443
2530 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
2531 "ignored in set-group-ID programs."
2534 #. FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
2536 #: build/C/man3/mallopt.3:464
2538 "If B<mallopt>() is used to set B<M_PERTURB>, then, as expected, the bytes "
2539 "of allocated memory are initialized to the complement of the byte in "
2540 "I<value>, and when that memory is freed, the bytes of the region are "
2541 "initialized to the byte specified in I<value>. However, there is an off-by-"
2542 "I<sizeof(size_t)> error in the implementation: instead of initializing "
2543 "precisely the block of memory being freed by the call I<free(p)>, the block "
2544 "starting at I<p+sizeof(size_t)> is initialized."
2548 #: build/C/man3/mallopt.3:473
2550 "The program below demonstrates the use of B<M_CHECK_ACTION>. If the program "
2551 "is supplied with an (integer) command-line argument, then that argument is "
2552 "used to set the B<M_CHECK_ACTION> parameter. The program then allocates a "
2553 "block of memory, and frees it twice (an error)."
2557 #: build/C/man3/mallopt.3:477
2559 "The following shell session shows what happens when we run this program "
2560 "under glibc, with the default value for B<M_CHECK_ACTION>:"
2564 #: build/C/man3/mallopt.3:496
2568 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
2569 "======= Backtrace: =========\n"
2570 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
2571 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
2572 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
2573 "\\&./a.out[0x80485db]\n"
2574 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
2575 "\\&./a.out[0x8048471]\n"
2576 "======= Memory map: ========\n"
2577 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
2578 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
2579 "[some lines omitted]\n"
2580 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
2581 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
2582 "Aborted (core dumped)\n"
2586 #: build/C/man3/mallopt.3:501
2588 "The following runs show the results when employing other values for "
2589 "B<M_CHECK_ACTION>:"
2593 #: build/C/man3/mallopt.3:514
2596 "$ B<./a.out 1> # Diagnose error and continue\n"
2597 "main(): returned from first free() call\n"
2598 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
2599 "main(): returned from second free() call\n"
2600 "$ B<./a.out 2> # Abort without error message\n"
2601 "main(): returned from first free() call\n"
2602 "Aborted (core dumped)\n"
2603 "$ B<./a.out 0> # Ignore error and continue\n"
2604 "main(): returned from first free() call\n"
2605 "main(): returned from second free() call\n"
2609 #: build/C/man3/mallopt.3:520
2611 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
2612 "environment variable:"
2616 #: build/C/man3/mallopt.3:527
2619 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
2620 "main(): returned from first free() call\n"
2621 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
2622 "main(): returned from second free() call\n"
2626 #: build/C/man3/mallopt.3:529 build/C/man2/mprotect.2:159
2627 #: build/C/man3/mcheck.3:176
2629 msgid "Program source"
2633 #: build/C/man3/mallopt.3:535
2636 "#include E<lt>malloc.hE<gt>\n"
2637 "#include E<lt>stdio.hE<gt>\n"
2638 "#include E<lt>stdlib.hE<gt>\n"
2640 "#include E<lt>malloc.hE<gt>\n"
2641 "#include E<lt>stdio.hE<gt>\n"
2642 "#include E<lt>stdlib.hE<gt>\n"
2645 #: build/C/man3/mallopt.3:540 build/C/man3/mcheck.3:187
2649 "main(int argc, char *argv[])\n"
2654 "main(int argc, char *argv[])\n"
2659 #: build/C/man3/mallopt.3:547
2662 " if (argc E<gt> 1) {\n"
2663 " if (argc != 2) {\n"
2664 " fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2665 " exit(EXIT_FAILURE);\n"
2669 " if (argc E<gt> 1) {\n"
2670 " if (argc != 2) {\n"
2671 " fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2672 " exit(EXIT_FAILURE);\n"
2677 #: build/C/man3/mallopt.3:552
2680 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2681 " fprintf(stderr, \"mallopt() failed\");\n"
2682 " exit(EXIT_FAILURE);\n"
2685 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2686 " fprintf(stderr, \"mallopt() failed\");\n"
2687 " exit(EXIT_FAILURE);\n"
2691 #: build/C/man3/mallopt.3:558
2694 " p = malloc(1000);\n"
2695 " if (p == NULL) {\n"
2696 " fprintf(stderr, \"malloc() failed\");\n"
2697 " exit(EXIT_FAILURE);\n"
2700 " p = malloc(1000);\n"
2701 " if (p == NULL) {\n"
2702 " fprintf(stderr, \"malloc() failed\");\n"
2703 " exit(EXIT_FAILURE);\n"
2707 #: build/C/man3/mallopt.3:561
2711 " printf(\"main(): returned from first free() call\\en\");\n"
2715 #: build/C/man3/mallopt.3:564
2719 " printf(\"main(): returned from second free() call\\en\");\n"
2723 #: build/C/man3/mallopt.3:567 build/C/man2/mmap.2:652
2724 #: build/C/man3/mcheck.3:203
2727 " exit(EXIT_SUCCESS);\n"
2730 " exit(EXIT_SUCCESS);\n"
2734 #: build/C/man3/mallopt.3:580
2737 #| "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
2738 #| "B<malloc_trim>(3), B<mtrace>(3), B<posix_memalign>(3)"
2740 "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
2741 "B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
2743 "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3),\n"
2744 "B<malloc_trim>(3), B<mtrace>(3), B<posix_memalign>(3)"
2747 #: build/C/man2/mlock.2:27
2753 #: build/C/man2/mlock.2:27
2759 #: build/C/man2/mlock.2:30
2760 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
2761 msgstr "mlock - メモリのロックとロック解除を行う"
2764 #: build/C/man2/mlock.2:33 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
2765 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:39
2767 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
2768 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
2771 #: build/C/man2/mlock.2:36
2774 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2775 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2777 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2778 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2781 #: build/C/man2/mlock.2:39
2784 "B<int mlockall(int >I<flags>B<);>\n"
2785 "B<int munlockall(void);>\n"
2787 "B<int mlockall(int >I<flags>B<);>\n"
2788 "B<int munlockall(void);>\n"
2791 #: build/C/man2/mlock.2:55
2793 "B<mlock>() and B<mlockall>() respectively lock part or all of the calling "
2794 "process's virtual address space into RAM, preventing that memory from being "
2795 "paged to the swap area. B<munlock>() and B<munlockall>() perform the "
2796 "converse operation, respectively unlocking part or all of the calling "
2797 "process's virtual address space, so that pages in the specified virtual "
2798 "address range may once more to be swapped out if required by the kernel "
2799 "memory manager. Memory locking and unlocking are performed in units of "
2802 "B<mlock>() と B<mlockall>() はそれぞれ、呼び出し元プロセスの仮想アドレス空"
2803 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
2804 "るのを防ぐ。 B<munlock>() と B<munlockall>() は逆の操作で、それぞれ呼び出し"
2805 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
2806 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
2807 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
2811 #: build/C/man2/mlock.2:55
2813 msgid "mlock() and munlock()"
2814 msgstr "mlock() と munlock()"
2817 #: build/C/man2/mlock.2:65
2819 "B<mlock>() locks pages in the address range starting at I<addr> and "
2820 "continuing for I<len> bytes. All pages that contain a part of the specified "
2821 "address range are guaranteed to be resident in RAM when the call returns "
2822 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
2824 "B<mlock>() は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
2825 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
2826 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
2827 "れるまで RAM に残り続けることが保証される。"
2830 #: build/C/man2/mlock.2:74
2832 "B<munlock>() unlocks pages in the address range starting at I<addr> and "
2833 "continuing for I<len> bytes. After this call, all pages that contain a part "
2834 "of the specified memory range can be moved to external swap space again by "
2837 "B<munlock>() は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
2838 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
2839 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
2842 #: build/C/man2/mlock.2:74
2844 msgid "mlockall() and munlockall()"
2845 msgstr "mlockall() と munlockall()"
2848 #: build/C/man2/mlock.2:84
2850 "B<mlockall>() locks all pages mapped into the address space of the calling "
2851 "process. This includes the pages of the code, data and stack segment, as "
2852 "well as shared libraries, user space kernel data, shared memory, and memory-"
2853 "mapped files. All mapped pages are guaranteed to be resident in RAM when "
2854 "the call returns successfully; the pages are guaranteed to stay in RAM until "
2857 "B<mlockall>() は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
2858 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
2859 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
2860 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
2861 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
2865 #: build/C/man2/mlock.2:89
2867 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
2868 "following constants:"
2869 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
2872 #: build/C/man2/mlock.2:89
2874 msgid "B<MCL_CURRENT>"
2875 msgstr "B<MCL_CURRENT>"
2878 #: build/C/man2/mlock.2:93
2880 "Lock all pages which are currently mapped into the address space of the "
2883 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
2886 #: build/C/man2/mlock.2:93
2888 msgid "B<MCL_FUTURE>"
2889 msgstr "B<MCL_FUTURE>"
2892 #: build/C/man2/mlock.2:100
2894 "Lock all pages which will become mapped into the address space of the "
2895 "process in the future. These could be for instance new pages required by a "
2896 "growing heap and stack as well as new memory mapped files or shared memory "
2899 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
2900 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
2901 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
2904 #: build/C/man2/mlock.2:113
2906 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
2907 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
2908 "locked bytes to exceed the permitted maximum (see below). In the same "
2909 "circumstances, stack growth may likewise fail: the kernel will deny stack "
2910 "expansion and deliver a B<SIGSEGV> signal to the process."
2912 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
2913 "B<sbrk>(2), B<malloc>(3)) は、ロックするバイト数が許可された最大値 (下記参"
2914 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
2915 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
2919 #: build/C/man2/mlock.2:117
2921 "B<munlockall>() unlocks all pages mapped into the address space of the "
2924 "B<munlockall>() は、呼び出し元プロセスのアドレス空間にマッピングされている "
2928 #: build/C/man2/mlock.2:123
2930 "On success these system calls return 0. On error, -1 is returned, I<errno> "
2931 "is set appropriately, and no changes are made to any locks in the address "
2932 "space of the process."
2934 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
2935 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
2939 #: build/C/man2/mlock.2:132
2941 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
2942 "resource limit, but tried to lock more memory than the limit permitted. "
2943 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
2945 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
2946 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
2947 "スが特権 (B<CAP_IPC_LOCK>) を持っている場合は適用されない。"
2949 #. In the case of mlock(), this check is somewhat buggy: it doesn't
2950 #. take into account whether the to-be-locked range overlaps with
2951 #. already locked pages. Thus, suppose we allocate
2952 #. (num_physpages / 4 + 1) of memory, and lock those pages once using
2953 #. mlock(), and then lock the *same* page range a second time.
2954 #. In the case, the second mlock() call will fail, since the check
2955 #. calculates that the process is trying to lock (num_physpages / 2 + 2)
2956 #. pages, which of course is not true. (MTK, Nov 04, kernel 2.4.28)
2958 #: build/C/man2/mlock.2:144
2960 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
2963 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
2965 #. SVr4 documents an additional EAGAIN error code.
2967 #: build/C/man2/mlock.2:150
2969 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>) to "
2970 "perform the requested operation."
2972 "呼び出し側が特権を持っていないが、\n"
2973 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
2976 #: build/C/man2/mlock.2:155
2977 msgid "For B<mlock>() and B<munlock>():"
2978 msgstr "B<mlock>() と B<munlock>() 用として:"
2981 #: build/C/man2/mlock.2:158
2982 msgid "Some or all of the specified address range could not be locked."
2983 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
2986 #: build/C/man2/mlock.2:165
2988 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
2989 "addition may have resulted in an overflow)."
2991 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
2992 "(例えば、加算でオーバーフローが発生したなど)。"
2995 #: build/C/man2/mlock.2:170
2996 msgid "(Not on Linux) I<addr> was not a multiple of the page size."
2998 "(Linux ではこの意味で使われない) I<addr> がページサイズの倍数ではない。"
3001 #: build/C/man2/mlock.2:174
3003 "Some of the specified address range does not correspond to mapped pages in "
3004 "the address space of the process."
3006 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
3010 #: build/C/man2/mlock.2:177
3011 msgid "For B<mlockall>():"
3012 msgstr "B<mlockall>() 用として:"
3015 #: build/C/man2/mlock.2:180
3016 msgid "Unknown I<flags> were specified."
3017 msgstr "未知の I<flags> が指定された。"
3020 #: build/C/man2/mlock.2:183
3021 msgid "For B<munlockall>():"
3022 msgstr "B<munlockall>() 用として:"
3025 #: build/C/man2/mlock.2:187
3027 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
3029 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>) を持っていない。"
3032 #: build/C/man2/mlock.2:189
3033 msgid "POSIX.1-2001, SVr4."
3034 msgstr "POSIX.1-2001, SVr4."
3037 #: build/C/man2/mlock.2:189 build/C/man2/mmap.2:487 build/C/man2/msync.2:105
3039 msgid "AVAILABILITY"
3043 #: build/C/man2/mlock.2:201
3045 "On POSIX systems on which B<mlock>() and B<munlock>() are available, "
3046 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
3047 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
3048 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
3050 "B<mlock>() と B<munlock>() が使用可能な POSIX システムでは "
3051 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
3052 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
3053 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
3056 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
3057 #. -1: unavailable, 0: ask using sysconf().
3058 #. glibc defines it to 1.
3060 #: build/C/man2/mlock.2:214
3062 "On POSIX systems on which B<mlockall>() and B<munlockall>() are available, "
3063 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
3064 "than 0. (See also B<sysconf>(3).)"
3066 "B<mlockall>() と B<munlockall>() が利用可能な POSIX システムでは、 "
3067 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
3068 "(B<sysconf>(3) も参照のこと)。"
3071 #: build/C/man2/mlock.2:232
3073 "Memory locking has two main applications: real-time algorithms and high-"
3074 "security data processing. Real-time applications require deterministic "
3075 "timing, and, like scheduling, paging is one major cause of unexpected "
3076 "program execution delays. Real-time applications will usually also switch "
3077 "to a real-time scheduler with B<sched_setscheduler>(2). Cryptographic "
3078 "security software often handles critical bytes like passwords or secret keys "
3079 "as data structures. As a result of paging, these secrets could be "
3080 "transferred onto a persistent swap store medium, where they might be "
3081 "accessible to the enemy long after the security software has erased the "
3082 "secrets in RAM and terminated. (But be aware that the suspend mode on "
3083 "laptops and some desktop computers will save a copy of the system's RAM to "
3084 "disk, regardless of memory locks.)"
3086 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
3087 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
3088 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
3089 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
3090 "いは B<sched_setscheduler>(2) でリアルタイムスケジューラに変更される。 暗号"
3091 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
3092 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
3093 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
3094 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
3095 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
3096 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
3100 #: build/C/man2/mlock.2:245
3102 "Real-time processes that are using B<mlockall>() to prevent delays on page "
3103 "faults should reserve enough locked stack pages before entering the time-"
3104 "critical section, so that no page fault can be caused by function calls. "
3105 "This can be achieved by calling a function that allocates a sufficiently "
3106 "large automatic variable (an array) and writes to the memory occupied by "
3107 "this array in order to touch these stack pages. This way, enough pages will "
3108 "be mapped for the stack and can be locked into RAM. The dummy writes ensure "
3109 "that not even copy-on-write page faults can occur in the critical section."
3111 "リアルタイムプロセスが B<mlockall>() を使ってページフォールトによる遅延を防"
3112 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
3113 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
3114 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
3115 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
3116 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
3117 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
3118 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
3119 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
3122 #: build/C/man2/mlock.2:251
3124 "Memory locks are not inherited by a child created via B<fork>(2) and are "
3125 "automatically removed (unlocked) during an B<execve>(2) or when the process "
3128 "メモリロックは B<fork>(2) で作成された子プロセスには継承されず、 B<execve>"
3129 "(2) が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
3133 #: build/C/man2/mlock.2:255
3135 "The memory lock on an address range is automatically removed if the address "
3136 "range is unmapped via B<munmap>(2)."
3138 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2) に"
3139 "よってアンマップされた場合は削除される。"
3142 #: build/C/man2/mlock.2:268
3144 "Memory locks do not stack, that is, pages which have been locked several "
3145 "times by calls to B<mlock>() or B<mlockall>() will be unlocked by a single "
3146 "call to B<munlock>() for the corresponding range or by B<munlockall>(). "
3147 "Pages which are mapped to several locations or by several processes stay "
3148 "locked into RAM as long as they are locked at least at one location or by at "
3149 "least one process."
3151 "メモリのロックは累積しない。 すなわち複数回 B<mlock>() や B<mlockall>() を"
3152 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>() を 1 回"
3153 "呼び出したり B<munlockall>() を呼び出したりするだけでロック解除される。 複数"
3154 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
3155 "のプロセスでロックされている限りは RAM に残り続ける。"
3158 #: build/C/man2/mlock.2:279
3160 "Under Linux, B<mlock>() and B<munlock>() automatically round I<addr> down "
3161 "to the nearest page boundary. However, POSIX.1-2001 allows an "
3162 "implementation to require that I<addr> is page aligned, so portable "
3163 "applications should ensure this."
3165 "Linux では、 B<mlock>() と B<munlock>() は自動的に I<addr> を端数切り捨てに"
3166 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
3167 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
3168 "ケーションではきちんと境界に合わせた方が良い。"
3171 #: build/C/man2/mlock.2:292
3173 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
3174 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
3175 "(), B<mlockall>(), and B<mmap>(2) B<MAP_LOCKED>."
3177 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
3178 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
3179 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
3183 #: build/C/man2/mlock.2:292
3185 msgid "Limits and permissions"
3189 #: build/C/man2/mlock.2:299
3191 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>) "
3192 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
3193 "defines a limit on how much memory the process may lock."
3195 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>) が必"
3196 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
3200 #: build/C/man2/mlock.2:305
3202 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
3203 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
3204 "instead defines a limit on how much memory an unprivileged process may lock."
3206 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
3207 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
3211 #: build/C/man2/mlock.2:313
3213 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
3214 "B<mlockall>() B<MCL_FUTURE> flag to be inherited across a B<fork>(2). This "
3215 "was rectified in kernel 2.4.18."
3217 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>() "
3218 "B<MCL_FUTURE> フラグが B<fork>(2) で継承されると言うバグがある。 これはカー"
3221 #. See the following LKML thread:
3222 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
3223 #. "Rationale for RLIMIT_MEMLOCK"
3226 #: build/C/man2/mlock.2:330
3228 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
3229 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
3230 "example, setting its effective UID to a nonzero value), then subsequent "
3231 "memory allocations (e.g., B<mmap>(2), B<brk>(2)) will fail if the "
3232 "B<RLIMIT_MEMLOCK> resource limit is encountered."
3234 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
3235 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
3236 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
3237 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
3241 #: build/C/man2/mlock.2:337
3243 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
3244 "B<capabilities>(7)"
3246 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
3247 "B<capabilities>(7)"
3250 #: build/C/man2/mmap.2:40
3256 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
3262 #: build/C/man2/mmap.2:43
3263 msgid "mmap, munmap - map or unmap files or devices into memory"
3264 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
3267 #: build/C/man2/mmap.2:51
3270 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3271 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
3272 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3274 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3275 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
3276 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3279 #: build/C/man2/mmap.2:61
3281 "B<mmap>() creates a new mapping in the virtual address space of the calling "
3282 "process. The starting address for the new mapping is specified in I<addr>. "
3283 "The I<length> argument specifies the length of the mapping."
3285 "B<mmap>() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
3286 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
3287 "は I<length> 引き数で指定される。"
3289 #. Before Linux 2.6.24, the address was rounded up to the next page
3290 #. boundary; since 2.6.24, it is rounded down!
3292 #: build/C/man2/mmap.2:75
3294 "If I<addr> is NULL, then the kernel chooses the address at which to create "
3295 "the mapping; this is the most portable method of creating a new mapping. If "
3296 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
3297 "the mapping; on Linux, the mapping will be created at a nearby page "
3298 "boundary. The address of the new mapping is returned as the result of the "
3301 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
3302 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
3303 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
3304 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
3305 "ングのアドレスは、呼び出しの返り値として返される。"
3308 #: build/C/man2/mmap.2:87
3310 "The contents of a file mapping (as opposed to an anonymous mapping; see "
3311 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
3312 "offset I<offset> in the file (or other object) referred to by the file "
3313 "descriptor I<fd>. I<offset> must be a multiple of the page size as returned "
3314 "by I<sysconf(_SC_PAGE_SIZE)>."
3316 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
3317 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
3318 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
3319 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
3320 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
3323 #: build/C/man2/mmap.2:95
3325 "The I<prot> argument describes the desired memory protection of the mapping "
3326 "(and must not conflict with the open mode of the file). It is either "
3327 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
3329 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
3330 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
3331 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
3334 #: build/C/man2/mmap.2:95 build/C/man2/mprotect.2:67
3336 msgid "B<PROT_EXEC>"
3337 msgstr "B<PROT_EXEC>"
3340 #: build/C/man2/mmap.2:98
3341 msgid "Pages may be executed."
3342 msgstr "ページは実行可能である。"
3345 #: build/C/man2/mmap.2:98 build/C/man2/mprotect.2:61
3347 msgid "B<PROT_READ>"
3348 msgstr "B<PROT_READ>"
3351 #: build/C/man2/mmap.2:101
3352 msgid "Pages may be read."
3353 msgstr "ページは読み込み可能である。"
3356 #: build/C/man2/mmap.2:101 build/C/man2/mprotect.2:64
3358 msgid "B<PROT_WRITE>"
3359 msgstr "B<PROT_WRITE>"
3362 #: build/C/man2/mmap.2:104
3363 msgid "Pages may be written."
3364 msgstr "ページに書き込み可能である。"
3367 #: build/C/man2/mmap.2:104 build/C/man2/mprotect.2:58
3369 msgid "B<PROT_NONE>"
3370 msgstr "B<PROT_NONE>"
3373 #: build/C/man2/mmap.2:107
3374 msgid "Pages may not be accessed."
3375 msgstr "ページにはアクセスできない。"
3378 #: build/C/man2/mmap.2:116
3380 "The I<flags> argument determines whether updates to the mapping are visible "
3381 "to other processes mapping the same region, and whether updates are carried "
3382 "through to the underlying file. This behavior is determined by including "
3383 "exactly one of the following values in I<flags>:"
3385 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
3386 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
3387 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
3388 "I<flags> に含めることで指定する。"
3391 #: build/C/man2/mmap.2:116
3393 msgid "B<MAP_SHARED>"
3394 msgstr "B<MAP_SHARED>"
3397 #: build/C/man2/mmap.2:126
3399 "Share this mapping. Updates to the mapping are visible to other processes "
3400 "that map this file, and are carried through to the underlying file. The "
3401 "file may not actually be updated until B<msync>(2) or B<munmap>() is "
3404 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
3405 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
3406 "る。 ただし、ファイルの実際の更新は B<msync>(2) または B<munmap>() が呼ばれ"
3410 #: build/C/man2/mmap.2:126
3412 msgid "B<MAP_PRIVATE>"
3413 msgstr "B<MAP_PRIVATE>"
3416 #: build/C/man2/mmap.2:135
3418 "Create a private copy-on-write mapping. Updates to the mapping are not "
3419 "visible to other processes mapping the same file, and are not carried "
3420 "through to the underlying file. It is unspecified whether changes made to "
3421 "the file after the B<mmap>() call are visible in the mapped region."
3423 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
3424 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
3425 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>() の呼び出し後"
3426 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
3430 #: build/C/man2/mmap.2:137
3431 msgid "Both of these flags are described in POSIX.1-2001."
3432 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
3435 #: build/C/man2/mmap.2:140
3437 "In addition, zero or more of the following values can be ORed in I<flags>:"
3439 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
3443 #: build/C/man2/mmap.2:140
3445 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
3446 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
3448 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3450 #: build/C/man2/mmap.2:156
3452 "Put the mapping into the first 2 Gigabytes of the process address space. "
3453 "This flag is only supported on x86-64, for 64-bit programs. It was added to "
3454 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
3455 "as to improve context-switch performance on some early 64-bit processors. "
3456 "Modern x86-64 processors no longer have this performance problem, so use of "
3457 "this flag is not required on those systems. The B<MAP_32BIT> flag is "
3458 "ignored when B<MAP_FIXED> is set."
3460 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
3461 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
3462 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
3463 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
3464 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
3465 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
3466 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
3470 #: build/C/man2/mmap.2:156
3473 msgstr "B<MAP_ANON>"
3476 #: build/C/man2/mmap.2:161
3477 msgid "Synonym for B<MAP_ANONYMOUS>. Deprecated."
3478 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
3481 #: build/C/man2/mmap.2:161
3483 msgid "B<MAP_ANONYMOUS>"
3484 msgstr "B<MAP_ANONYMOUS>"
3487 #: build/C/man2/mmap.2:183
3489 "The mapping is not backed by any file; its contents are initialized to "
3490 "zero. The I<fd> and I<offset> arguments are ignored; however, some "
3491 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>) "
3492 "is specified, and portable applications should ensure this. The use of "
3493 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
3494 "Linux since kernel 2.4."
3496 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
3497 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
3498 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>) が指定された場合、 I<fd> を -1 にす"
3499 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
3500 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
3501 "以降の Linux でのみサポートされている。"
3504 #: build/C/man2/mmap.2:183
3506 msgid "B<MAP_DENYWRITE>"
3507 msgstr "B<MAP_DENYWRITE>"
3509 #. Introduced in 1.1.36, removed in 1.3.24.
3511 #: build/C/man2/mmap.2:191
3513 "This flag is ignored. (Long ago, it signaled that attempts to write to the "
3514 "underlying file should fail with B<ETXTBUSY>. But this was a source of "
3515 "denial-of-service attacks.)"
3517 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
3518 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
3519 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
3522 #: build/C/man2/mmap.2:191
3524 msgid "B<MAP_EXECUTABLE>"
3525 msgstr "B<MAP_EXECUTABLE>"
3527 #. Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
3528 #. (Long ago, it signaled that the underlying file is an executable.
3529 #. However, that information was not really used anywhere.)
3530 #. Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
3533 #: build/C/man2/mmap.2:199
3534 msgid "This flag is ignored."
3535 msgstr "このフラグは無視される。"
3538 #: build/C/man2/mmap.2:199
3541 msgstr "B<MAP_FILE>"
3543 #. On some systems, this was required as the opposite of
3544 #. MAP_ANONYMOUS -- mtk, 1 May 2007
3546 #: build/C/man2/mmap.2:205
3547 msgid "Compatibility flag. Ignored."
3548 msgstr "互換性のためのフラグ。無視される。"
3551 #: build/C/man2/mmap.2:205
3553 msgid "B<MAP_FIXED>"
3554 msgstr "B<MAP_FIXED>"
3557 #: build/C/man2/mmap.2:223
3559 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
3560 "address. I<addr> must be a multiple of the page size. If the memory region "
3561 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
3562 "then the overlapped part of the existing mapping(s) will be discarded. If "
3563 "the specified address cannot be used, B<mmap>() will fail. Because "
3564 "requiring a fixed address for a mapping is less portable, the use of this "
3565 "option is discouraged."
3567 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
3568 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
3569 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
3570 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
3571 "れたアドレスが使用できない場合、 B<mmap>() は失敗する。 マッピングに対して固"
3572 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
3576 #: build/C/man2/mmap.2:223
3578 msgid "B<MAP_GROWSDOWN>"
3579 msgstr "B<MAP_GROWSDOWN>"
3582 #: build/C/man2/mmap.2:228
3584 "Used for stacks. Indicates to the kernel virtual memory system that the "
3585 "mapping should extend downward in memory."
3587 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
3588 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
3589 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
3592 #: build/C/man2/mmap.2:228
3594 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
3595 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
3598 #: build/C/man2/mmap.2:234
3600 "Allocate the mapping using \"huge pages.\" See the kernel source file "
3601 "I<Documentation/vm/hugetlbpage.txt> for further information."
3603 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
3604 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
3607 #: build/C/man2/mmap.2:234
3609 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
3610 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
3612 #. If set, the mapped pages will not be swapped out.
3614 #: build/C/man2/mmap.2:240
3616 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
3617 "(2). This flag is ignored in older kernels."
3619 "マップされた領域のページを B<mlock>(2) の方法でメモリ内にロックする。 それ以"
3620 "前のカーネルでは、このフラグは無視される。"
3623 #: build/C/man2/mmap.2:240
3625 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
3626 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
3629 #: build/C/man2/mmap.2:255
3631 "Only meaningful in conjunction with B<MAP_POPULATE>. Don't perform read-"
3632 "ahead: only create page tables entries for pages that are already present in "
3633 "RAM. Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing. "
3634 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
3637 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
3638 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
3639 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
3640 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
3641 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
3644 #: build/C/man2/mmap.2:255
3646 msgid "B<MAP_NORESERVE>"
3647 msgstr "B<MAP_NORESERVE>"
3650 #: build/C/man2/mmap.2:270
3652 "Do not reserve swap space for this mapping. When swap space is reserved, "
3653 "one has the guarantee that it is possible to modify the mapping. When swap "
3654 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
3655 "memory is available. See also the discussion of the file I</proc/sys/vm/"
3656 "overcommit_memory> in B<proc>(5). In kernels before 2.6, this flag only had "
3657 "effect for private writable mappings."
3659 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
3660 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
3661 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
3662 "る。 B<proc>(5) の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
3663 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
3664 "イベート・マッピングについてのみ効果があった。"
3667 #: build/C/man2/mmap.2:270
3669 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
3670 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
3673 #: build/C/man2/mmap.2:277
3675 "Populate (prefault) page tables for a mapping. For a file mapping, this "
3676 "causes read-ahead on the file. Later accesses to the mapping will not be "
3677 "blocked by page faults. B<MAP_POPULATE> is only supported for private "
3678 "mappings since Linux 2.6.23."
3680 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
3681 "は、これによりファイルが先読み (read-ahead) が行われる。この以後は、マッピン"
3682 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
3683 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
3687 #: build/C/man2/mmap.2:277
3689 msgid "B<MAP_STACK> (since Linux 2.6.27)"
3690 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
3692 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3693 #. commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
3694 #. http://thread.gmane.org/gmane.linux.kernel/720412
3695 #. "pthread_create() slow for many threads; also time to revisit 64b
3696 #. context switch optimization?"
3698 #: build/C/man2/mmap.2:290
3700 "Allocate the mapping at an address suitable for a process or thread stack. "
3701 "This flag is currently a no-op, but is used in the glibc threading "
3702 "implementation so that if some architectures require special treatment for "
3703 "stack allocations, support can later be transparently implemented for glibc."
3705 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
3706 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
3707 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
3708 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
3712 #: build/C/man2/mmap.2:290
3714 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
3715 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
3718 #: build/C/man2/mmap.2:300
3720 "Don't clear anonymous pages. This flag is intended to improve performance "
3721 "on embedded devices. This flag is only honored if the kernel was configured "
3722 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option. Because of the security "
3723 "implications, that option is normally enabled only on embedded devices (i."
3724 "e., devices where one has complete control of the contents of user memory)."
3726 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
3728 "での性能向上を目的に作られてものである。カーネルの設定で\n"
3729 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
3731 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
3732 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
3735 #: build/C/man2/mmap.2:308
3737 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001. "
3738 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
3741 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
3742 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
3743 "B<MAP_ANON>) もサポートされている。"
3746 #: build/C/man2/mmap.2:315
3748 "Some systems document the additional flags B<MAP_AUTOGROW>, "
3749 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
3751 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
3752 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
3755 #: build/C/man2/mmap.2:321
3757 "Memory mapped by B<mmap>() is preserved across B<fork>(2), with the same "
3760 "B<mmap>() によってマップされたメモリの属性は B<fork>(2) の際に継承される。"
3763 #: build/C/man2/mmap.2:329
3765 "A file is mapped in multiples of the page size. For a file that is not a "
3766 "multiple of the page size, the remaining memory is zeroed when mapped, and "
3767 "writes to that region are not written out to the file. The effect of "
3768 "changing the size of the underlying file of a mapping on the pages that "
3769 "correspond to added or removed regions of the file is unspecified."
3771 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
3772 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
3773 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
3774 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
3775 "マップされたページに対してどのような影響があるかは規定されていない。"
3778 #: build/C/man2/mmap.2:329
3784 #: build/C/man2/mmap.2:339
3786 "The B<munmap>() system call deletes the mappings for the specified address "
3787 "range, and causes further references to addresses within the range to "
3788 "generate invalid memory references. The region is also automatically "
3789 "unmapped when the process is terminated. On the other hand, closing the "
3790 "file descriptor does not unmap the region."
3792 "システムコール B<munmap>() は指定されたアドレス範囲のマップを消去し、 これ以"
3793 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
3794 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
3798 #: build/C/man2/mmap.2:349
3800 "The address I<addr> must be a multiple of the page size. All pages "
3801 "containing a part of the indicated range are unmapped, and subsequent "
3802 "references to these pages will generate B<SIGSEGV>. It is not an error if "
3803 "the indicated range does not contain any mapped pages."
3805 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
3806 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
3807 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
3808 "ていない場合でも エラーにならない。"
3811 #: build/C/man2/mmap.2:349
3813 msgid "Timestamps changes for file-backed mappings"
3814 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
3817 #: build/C/man2/mmap.2:356
3819 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
3820 "updated at any time between the B<mmap>() and the corresponding unmapping; "
3821 "the first reference to a mapped page will update the field if it has not "
3824 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
3825 "I<st_atime> フィールドは、 B<mmap>() されてからアンマップ (unmap) されるまで"
3826 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
3827 "ページへの最初の参照があった 際に更新される。"
3830 #: build/C/man2/mmap.2:373
3832 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
3833 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
3834 "before a subsequent B<msync>(2) with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
3837 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
3838 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
3839 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
3840 "B<msync>(2) が呼ばれる前までに更新される。"
3843 #: build/C/man2/mmap.2:390
3845 "On success, B<mmap>() returns a pointer to the mapped area. On error, the "
3846 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, and I<errno> "
3847 "is set appropriately. On success, B<munmap>() returns 0, on failure -1, "
3848 "and I<errno> is set (probably to B<EINVAL>)."
3850 "B<mmap>() は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
3851 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>) を返し、 I<errno> がエラーの内容に"
3852 "したがってセットされる。 B<munmap>() は成功すると 0 を返す。失敗すると -1 を"
3853 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
3856 #: build/C/man2/mmap.2:391 build/C/man2/mprotect.2:80
3857 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
3858 #: build/C/man2/shmctl.2:295 build/C/man2/shmget.2:186
3859 #: build/C/man2/shmop.2:189
3865 #: build/C/man2/mmap.2:411
3867 "A file descriptor refers to a non-regular file. Or B<MAP_PRIVATE> was "
3868 "requested, but I<fd> is not open for reading. Or B<MAP_SHARED> was "
3869 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
3870 "(B<O_RDWR>) mode. Or B<PROT_WRITE> is set, but the file is append-only."
3872 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
3873 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
3874 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
3875 "書きモード (B<O_RDWR>) でオープンされていない、 B<PROT_WRITE> をセットした"
3876 "が、ファイルは追加 (append) 専用である。"
3879 #: build/C/man2/mmap.2:415
3881 "The file has been locked, or too much memory has been locked (see "
3884 "ファイルがロックされている。またはロックされているメモリが多すぎる "
3885 "(B<setrlimit>(2) を参照)。"
3888 #: build/C/man2/mmap.2:421
3890 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
3892 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
3893 "B<MAP_ANONYMOUS> がセットされていない)。"
3896 #: build/C/man2/mmap.2:429
3898 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
3899 "not aligned on a page boundary)."
3901 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
3902 "ジ境界にアラインメントされていない)。"
3905 #: build/C/man2/mmap.2:434
3906 msgid "(since Linux 2.6.12) I<length> was 0."
3907 msgstr "(Linux 2.6.12 以降) I<length> が 0 であった。"
3910 #: build/C/man2/mmap.2:442
3912 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
3913 "both of these values."
3915 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
3919 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:227
3920 #: build/C/man2/shmget.2:202
3925 #. [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
3927 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:206
3928 msgid "The system limit on the total number of open files has been reached."
3929 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
3932 #: build/C/man2/mmap.2:454
3934 "The underlying file system of the specified file does not support memory "
3937 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
3941 #: build/C/man2/mmap.2:458
3943 "No memory is available, or the process's maximum number of mappings would "
3944 "have been exceeded."
3946 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
3948 #. (Since 2.4.25 / 2.6.0.)
3950 #: build/C/man2/mmap.2:467
3952 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
3953 "file on a file system that was mounted no-exec."
3955 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
3956 "トされたファイルシステム上のファイルに マップ領域が対応している。"
3959 #: build/C/man2/mmap.2:467
3965 #: build/C/man2/mmap.2:473
3967 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
3970 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
3974 #: build/C/man2/mmap.2:475
3975 msgid "Use of a mapped region can result in these signals:"
3976 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
3979 #: build/C/man2/mmap.2:475
3985 #: build/C/man2/mmap.2:478
3986 msgid "Attempted write into a region mapped as read-only."
3987 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
3990 #: build/C/man2/mmap.2:478
3996 #: build/C/man2/mmap.2:483
3998 "Attempted access to a portion of the buffer that does not correspond to the "
3999 "file (for example, beyond the end of the file, including the case where "
4000 "another process has truncated the file)."
4002 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
4003 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる) "
4006 #. SVr4 documents additional error codes ENXIO and ENODEV.
4007 #. SUSv2 documents additional error codes EMFILE and EOVERFLOW.
4009 #: build/C/man2/mmap.2:487
4010 msgid "SVr4, 4.4BSD, POSIX.1-2001."
4011 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
4013 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4014 #. -1: unavailable, 0: ask using sysconf().
4015 #. glibc defines it to 1.
4017 #: build/C/man2/mmap.2:501
4019 "On POSIX systems on which B<mmap>(), B<msync>(2) and B<munmap>() are "
4020 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
4021 "value greater than 0. (See also B<sysconf>(3).)"
4023 "B<mmap>(), B<msync>(2) B<munmap>() が利用可能な POSIX システムでは、 "
4024 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
4025 "(B<sysconf>(3) も参照のこと)。"
4027 #. Since around glibc 2.1/2.2, depending on the platform.
4029 #: build/C/man2/mmap.2:516
4031 "This page describes the interface provided by the glibc B<mmap>() wrapper "
4032 "function. Originally, this function invoked a system call of the same "
4033 "name. Since kernel 2.4, that system call has been superseded by B<mmap2>"
4034 "(2), and nowadays the glibc B<mmap>() wrapper function invokes B<mmap2>(2) "
4035 "with a suitably adjusted value for I<offset>."
4037 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
4039 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
4041 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
4042 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
4043 "B<mmap2>(2) を起動する。"
4046 #: build/C/man2/mmap.2:529
4048 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
4049 "B<PROT_READ>. It is architecture dependent whether B<PROT_READ> implies "
4050 "B<PROT_EXEC> or not. Portable programs should always set B<PROT_EXEC> if "
4051 "they intend to execute code in the new mapping."
4053 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
4054 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
4055 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
4056 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
4057 "常に B<PROT_EXEC> をセットすべきである。"
4060 #: build/C/man2/mmap.2:544
4062 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
4063 "omit B<MAP_FIXED> from I<flags>. In this case, the system chooses the "
4064 "address for the mapping; the address is chosen so as not to conflict with "
4065 "any existing mapping, and will not be 0. If the B<MAP_FIXED> flag is "
4066 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
4068 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
4069 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
4070 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
4071 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
4072 "I<addr> が 0 (NULL) の場合には、マップされるアドレスが 0 (NULL) になる。"
4075 #: build/C/man2/mmap.2:549
4077 "On Linux there are no guarantees like those suggested above under "
4078 "B<MAP_NORESERVE>. By default, any process can be killed at any moment when "
4079 "the system runs out of memory."
4081 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
4082 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
4086 #: build/C/man2/mmap.2:556
4088 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
4089 "is specified as B<PROT_NONE>."
4091 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
4092 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
4095 #: build/C/man2/mmap.2:571
4097 "SUSv3 specifies that B<mmap>() should fail if I<length> is 0. However, in "
4098 "kernels before 2.6.12, B<mmap>() succeeded in this case: no mapping was "
4099 "created and the call returned I<addr>. Since kernel 2.6.12, B<mmap>() "
4100 "fails with the error B<EINVAL> for this case."
4102 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>() は失敗すると規定されている。"
4103 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>() は成功して"
4104 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
4105 "では、 B<mmap>() はエラー B<EINVAL> で失敗する。"
4108 #: build/C/man2/mmap.2:583
4110 "The following program prints part of the file specified in its first command-"
4111 "line argument to standard output. The range of bytes to be printed is "
4112 "specified via offset and length values in the second and third command-line "
4113 "arguments. The program creates a memory mapping of the required pages of "
4114 "the file and then uses B<write>(2) to output the desired bytes."
4116 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
4117 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
4118 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
4119 "必要なページのメモリ・ マッピングを作成し、 B<write>(2) を使って所望のバイト"
4123 #: build/C/man2/mmap.2:591
4126 "#include E<lt>sys/mman.hE<gt>\n"
4127 "#include E<lt>sys/stat.hE<gt>\n"
4128 "#include E<lt>fcntl.hE<gt>\n"
4129 "#include E<lt>stdio.hE<gt>\n"
4130 "#include E<lt>stdlib.hE<gt>\n"
4131 "#include E<lt>unistd.hE<gt>\n"
4133 "#include E<lt>sys/mman.hE<gt>\n"
4134 "#include E<lt>sys/stat.hE<gt>\n"
4135 "#include E<lt>fcntl.hE<gt>\n"
4136 "#include E<lt>stdio.hE<gt>\n"
4137 "#include E<lt>stdlib.hE<gt>\n"
4138 "#include E<lt>unistd.hE<gt>\n"
4141 #: build/C/man2/mmap.2:594 build/C/man2/mprotect.2:172
4144 "#define handle_error(msg) \\e\n"
4145 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4147 "#define handle_error(msg) \\e\n"
4148 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4151 #: build/C/man2/mmap.2:604
4155 "main(int argc, char *argv[])\n"
4159 " struct stat sb;\n"
4160 " off_t offset, pa_offset;\n"
4165 "main(int argc, char *argv[])\n"
4169 " struct stat sb;\n"
4170 " off_t offset, pa_offset;\n"
4175 #: build/C/man2/mmap.2:609
4178 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
4179 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4180 " exit(EXIT_FAILURE);\n"
4183 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
4184 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4185 " exit(EXIT_FAILURE);\n"
4189 #: build/C/man2/mmap.2:613
4192 " fd = open(argv[1], O_RDONLY);\n"
4194 " handle_error(\"open\");\n"
4196 " fd = open(argv[1], O_RDONLY);\n"
4198 " handle_error(\"open\");\n"
4201 #: build/C/man2/mmap.2:616
4204 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
4205 " handle_error(\"fstat\");\n"
4207 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
4208 " handle_error(\"fstat\");\n"
4211 #: build/C/man2/mmap.2:620
4214 " offset = atoi(argv[2]);\n"
4215 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4216 " /* offset for mmap() must be page aligned */\n"
4218 " offset = atoi(argv[2]);\n"
4219 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4220 " /* offset for mmap() must be page aligned */\n"
4223 #: build/C/man2/mmap.2:625
4226 " if (offset E<gt>= sb.st_size) {\n"
4227 " fprintf(stderr, \"offset is past end of file\\en\");\n"
4228 " exit(EXIT_FAILURE);\n"
4231 " if (offset E<gt>= sb.st_size) {\n"
4232 " fprintf(stderr, \"offset is past end of file\\en\");\n"
4233 " exit(EXIT_FAILURE);\n"
4237 #: build/C/man2/mmap.2:631
4240 " if (argc == 4) {\n"
4241 " length = atoi(argv[3]);\n"
4242 " if (offset + length E<gt> sb.st_size)\n"
4243 " length = sb.st_size - offset;\n"
4244 " /* Can\\(aqt display bytes past end of file */\n"
4246 " if (argc == 4) {\n"
4247 " length = atoi(argv[3]);\n"
4248 " if (offset + length E<gt> sb.st_size)\n"
4249 " length = sb.st_size - offset;\n"
4250 " /* Can\\(aqt display bytes past end of file */\n"
4253 #: build/C/man2/mmap.2:635
4256 " } else { /* No length arg ==E<gt> display to end of file */\n"
4257 " length = sb.st_size - offset;\n"
4260 " } else { /* No length arg ==E<gt> display to end of file */\n"
4261 " length = sb.st_size - offset;\n"
4265 #: build/C/man2/mmap.2:640
4268 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4269 " MAP_PRIVATE, fd, pa_offset);\n"
4270 " if (addr == MAP_FAILED)\n"
4271 " handle_error(\"mmap\");\n"
4273 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4274 " MAP_PRIVATE, fd, pa_offset);\n"
4275 " if (addr == MAP_FAILED)\n"
4276 " handle_error(\"mmap\");\n"
4279 #: build/C/man2/mmap.2:645
4282 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4283 " if (s != length) {\n"
4285 " handle_error(\"write\");\n"
4287 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4288 " if (s != length) {\n"
4290 " handle_error(\"write\");\n"
4293 #: build/C/man2/mmap.2:649
4296 " fprintf(stderr, \"partial write\");\n"
4297 " exit(EXIT_FAILURE);\n"
4300 " fprintf(stderr, \"partial write\");\n"
4301 " exit(EXIT_FAILURE);\n"
4305 #: build/C/man2/mmap.2:666
4307 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4308 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4309 "(2), B<shm_open>(3), B<shm_overview>(7)"
4311 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4312 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4313 "(2), B<shm_open>(3), B<shm_overview>(7)"
4316 #: build/C/man2/mmap.2:671 build/C/man2/msync.2:122
4317 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4318 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4321 #: build/C/man2/mmap2.2:29
4327 #: build/C/man2/mmap2.2:32
4328 msgid "mmap2 - map files or devices into memory"
4329 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
4332 #: build/C/man2/mmap2.2:38
4335 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4336 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4338 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4339 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4342 #: build/C/man2/mmap2.2:43
4344 "This is probably not the system call you are interested; instead, see B<mmap>"
4345 "(2), which describes the glibc wrapper function that invokes this system "
4348 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
4349 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
4354 #: build/C/man2/mmap2.2:54
4356 "The B<mmap2>() system call provides the same interface as B<mmap>(2), "
4357 "except that the final argument specifies the offset into the file in 4096-"
4358 "byte units (instead of bytes, as is done by B<mmap>(2)). This enables "
4359 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
4362 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
4364 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
4366 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
4367 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
4372 #: build/C/man2/mmap2.2:61
4374 "On success, B<mmap2>() returns a pointer to the mapped area. On error -1 "
4375 "is returned and I<errno> is set appropriately."
4377 "成功した場合、 B<mmap2>() はマップされた領域へのポインタを返す。 エラーの場"
4378 "合は -1 が返されて、 I<errno> が適切に設定される。"
4381 #: build/C/man2/mmap2.2:65
4382 msgid "Problem with getting the data from userspace."
4383 msgstr "ユーザ空間からデータを取得するときに問題があった。"
4386 #: build/C/man2/mmap2.2:70
4388 "(Various platforms where the page size is not 4096 bytes.) I<offset * 4096> "
4389 "is not a multiple of the system page size."
4391 "(ページサイズが 4096 バイトでないプラットフォームにおいて) I<offset * 4096> "
4392 "がシステムのページサイズの倍数ではない。"
4395 #: build/C/man2/mmap2.2:74
4396 msgid "B<mmap2>() can also return any of the errors described in B<mmap>(2)."
4397 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
4400 #: build/C/man2/mmap2.2:77
4401 msgid "B<mmap2>() is available since Linux 2.3.31."
4402 msgstr "B<mmap2>() は、Linux 2.3.31 以降で使用可能である。"
4405 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:93
4406 msgid "This system call is Linux-specific."
4407 msgstr "このシステムコールは Linux 独自である。"
4410 #: build/C/man2/mmap2.2:85
4412 "Nowadays, the glibc B<mmap>() wrapper function invokes this system call "
4413 "rather than the B<mmap>(2) system call."
4415 "現在では、glibc の B<mmap>() のラッパー関数は、 B<mmap>(2) システムコールで"
4416 "はなく、このシステムコール (B<mmap2>(2)) を起動する。"
4418 #. ia64 can have page sizes ranging from 4kB to 64kB.
4419 #. On cris, it looks like the unit might also be the page size,
4420 #. which is 8192 bytes. -- mtk, June 2007
4422 #: build/C/man2/mmap2.2:92
4424 "On ia64, the unit for I<offset> is actually the system page size, rather "
4427 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
4431 #: build/C/man2/mmap2.2:98
4433 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4435 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4438 #: build/C/man2/mprotect.2:32
4444 #: build/C/man2/mprotect.2:32
4450 #: build/C/man2/mprotect.2:35
4451 msgid "mprotect - set protection on a region of memory"
4452 msgstr "mprotect - メモリ領域の保護を設定する"
4455 #: build/C/man2/mprotect.2:40
4457 msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4458 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4461 #: build/C/man2/mprotect.2:48
4463 "B<mprotect>() changes protection for the calling process's memory page(s) "
4464 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
4465 "+I<len>-1]. I<addr> must be aligned to a page boundary."
4467 "B<mprotect>() は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
4468 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
4472 #: build/C/man2/mprotect.2:53
4474 "If the calling process tries to access memory in a manner that violates the "
4475 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
4477 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
4478 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
4481 #: build/C/man2/mprotect.2:58
4483 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
4486 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
4487 "毎の論理和 (bitwize-or) で指定する:"
4490 #: build/C/man2/mprotect.2:61
4491 msgid "The memory cannot be accessed at all."
4492 msgstr "そのメモリには全くアクセスできない。"
4495 #: build/C/man2/mprotect.2:64
4496 msgid "The memory can be read."
4497 msgstr "そのメモリを読み取ることができる。"
4500 #: build/C/man2/mprotect.2:67
4501 msgid "The memory can be modified."
4502 msgstr "そのメモリを変更できる。"
4505 #. Document PROT_GROWSUP and PROT_GROWSDOWN
4507 #: build/C/man2/mprotect.2:72
4508 msgid "The memory can be executed."
4509 msgstr "そのメモリは実行可能である。"
4512 #: build/C/man2/mprotect.2:79
4514 "On success, B<mprotect>() returns zero. On error, -1 is returned, and "
4515 "I<errno> is set appropriately."
4517 "成功した場合、 B<mprotect>() は 0 を返す。エラーの場合は -1 が返り、 "
4518 "I<errno> が適切に設定される。"
4521 #: build/C/man2/mprotect.2:89
4523 "The memory cannot be given the specified access. This can happen, for "
4524 "example, if you B<mmap>(2) a file to which you have read-only access, then "
4525 "ask B<mprotect>() to mark it B<PROT_WRITE>."
4527 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
4528 "を読み取り専用で B<mmap>(2) しており、その領域に対して B<mprotect>() を呼び"
4529 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
4531 #. Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
4533 #: build/C/man2/mprotect.2:94
4535 "I<addr> is not a valid pointer, or not a multiple of the system page size."
4537 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
4540 #: build/C/man2/mprotect.2:97
4541 msgid "Internal kernel structures could not be allocated."
4542 msgstr "カーネル内部の構造体を割り当てることができなかった。"
4545 #: build/C/man2/mprotect.2:107
4547 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
4548 "address space of the process, or specify one or more pages that are not "
4549 "mapped. (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
4552 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
4553 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
4554 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
4557 #. SVr4 defines an additional error
4558 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
4560 #: build/C/man2/mprotect.2:116
4562 "SVr4, POSIX.1-2001. POSIX says that the behavior of B<mprotect>() is "
4563 "unspecified if it is applied to a region of memory that was not obtained via "
4566 "SVr4, POSIX.1-2001. POSIX では、 B<mmap>(2) 経由で獲得していないメモリ領域"
4567 "に対して B<mprotect>() を行った場合の B<mprotect>() の動作は未定義であると"
4571 #: build/C/man2/mprotect.2:123
4573 "On Linux it is always permissible to call B<mprotect>() on any address in a "
4574 "process's address space (except for the kernel vsyscall area). In "
4575 "particular it can be used to change existing code mappings to be writable."
4577 "Linux では、(カーネル vsyscall 領域以外の) 任意のプロセスアドレス空間に対し"
4578 "て B<mprotect>() を呼び出すことが、常に許されている。 これは特に既存のコード"
4579 "マッピングを書き込み可能にするために使われる。"
4582 #: build/C/man2/mprotect.2:133
4584 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
4585 "architecture- and kernel version-dependent. On some hardware architectures "
4586 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
4588 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
4589 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
4590 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
4593 #: build/C/man2/mprotect.2:142
4595 "POSIX.1-2001 says that an implementation may permit access other than that "
4596 "specified in I<prot>, but at a minimum can only allow write access if "
4597 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
4600 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
4601 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
4602 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
4606 #: build/C/man2/mprotect.2:148
4608 "The program below allocates four pages of memory, makes the third of these "
4609 "pages read-only, and then executes a loop that walks upward through the "
4610 "allocated region modifying bytes."
4612 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
4613 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
4614 "かって順番にバイト値を変更するループを実行する。"
4617 #: build/C/man2/mprotect.2:151
4619 "An example of what we might see when running the program is the following:"
4620 msgstr "プログラムを実行した場合の一例を以下に示す。"
4623 #: build/C/man2/mprotect.2:157
4627 "Start of region: 0x804c000\n"
4628 "Got SIGSEGV at address: 0x804e000\n"
4631 "Start of region: 0x804c000\n"
4632 "Got SIGSEGV at address: 0x804e000\n"
4635 #: build/C/man2/mprotect.2:169
4638 "#include E<lt>unistd.hE<gt>\n"
4639 "#include E<lt>signal.hE<gt>\n"
4640 "#include E<lt>stdio.hE<gt>\n"
4641 "#include E<lt>malloc.hE<gt>\n"
4642 "#include E<lt>stdlib.hE<gt>\n"
4643 "#include E<lt>errno.hE<gt>\n"
4644 "#include E<lt>sys/mman.hE<gt>\n"
4646 "#include E<lt>unistd.hE<gt>\n"
4647 "#include E<lt>signal.hE<gt>\n"
4648 "#include E<lt>stdio.hE<gt>\n"
4649 "#include E<lt>malloc.hE<gt>\n"
4650 "#include E<lt>stdlib.hE<gt>\n"
4651 "#include E<lt>errno.hE<gt>\n"
4652 "#include E<lt>sys/mman.hE<gt>\n"
4655 #: build/C/man2/mprotect.2:174
4657 msgid "char *buffer;\n"
4658 msgstr "char *buffer;\n"
4661 #: build/C/man2/mprotect.2:182
4665 "handler(int sig, siginfo_t *si, void *unused)\n"
4667 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4668 " (long) si-E<gt>si_addr);\n"
4669 " exit(EXIT_FAILURE);\n"
4673 "handler(int sig, siginfo_t *si, void *unused)\n"
4675 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4676 " (long) si-E<gt>si_addr);\n"
4677 " exit(EXIT_FAILURE);\n"
4681 #: build/C/man2/mprotect.2:189
4685 "main(int argc, char *argv[])\n"
4689 " struct sigaction sa;\n"
4696 " struct sigaction sa;\n"
4699 #: build/C/man2/mprotect.2:195
4702 " sa.sa_flags = SA_SIGINFO;\n"
4703 " sigemptyset(&sa.sa_mask);\n"
4704 " sa.sa_sigaction = handler;\n"
4705 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4706 " handle_error(\"sigaction\");\n"
4708 " sa.sa_flags = SA_SIGINFO;\n"
4709 " sigemptyset(&sa.sa_mask);\n"
4710 " sa.sa_sigaction = handler;\n"
4711 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4712 " handle_error(\"sigaction\");\n"
4715 #: build/C/man2/mprotect.2:199
4718 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
4719 " if (pagesize == -1)\n"
4720 " handle_error(\"sysconf\");\n"
4722 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
4723 " if (pagesize == -1)\n"
4724 " handle_error(\"sysconf\");\n"
4727 #: build/C/man2/mprotect.2:202
4730 " /* Allocate a buffer aligned on a page boundary;\n"
4731 " initial protection is PROT_READ | PROT_WRITE */\n"
4733 " /* Allocate a buffer aligned on a page boundary;\n"
4734 " initial protection is PROT_READ | PROT_WRITE */\n"
4737 #: build/C/man2/mprotect.2:206
4740 " buffer = memalign(pagesize, 4 * pagesize);\n"
4741 " if (buffer == NULL)\n"
4742 " handle_error(\"memalign\");\n"
4744 " buffer = memalign(pagesize, 4 * pagesize);\n"
4745 " if (buffer == NULL)\n"
4746 " handle_error(\"memalign\");\n"
4749 #: build/C/man2/mprotect.2:208
4751 msgid " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
4752 msgstr " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
4755 #: build/C/man2/mprotect.2:212
4758 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
4759 " PROT_READ) == -1)\n"
4760 " handle_error(\"mprotect\");\n"
4762 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
4763 " PROT_READ) == -1)\n"
4764 " handle_error(\"mprotect\");\n"
4767 #: build/C/man2/mprotect.2:215
4770 " for (p = buffer ; ; )\n"
4771 " *(p++) = \\(aqa\\(aq;\n"
4773 " for (p = buffer ; ; )\n"
4774 " *(p++) = \\(aqa\\(aq;\n"
4777 #: build/C/man2/mprotect.2:219
4780 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
4781 " exit(EXIT_SUCCESS);\n"
4784 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
4785 " exit(EXIT_SUCCESS);\n"
4789 #: build/C/man2/mprotect.2:223
4790 msgid "B<mmap>(2), B<sysconf>(3)"
4791 msgstr "B<mmap>(2), B<sysconf>(3)"
4794 #: build/C/man2/mremap.2:31
4800 #: build/C/man2/mremap.2:31
4806 #: build/C/man2/mremap.2:34
4807 msgid "mremap - remap a virtual memory address"
4808 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
4811 #: build/C/man2/mremap.2:37
4813 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
4814 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
4817 #: build/C/man2/mremap.2:42
4820 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4821 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4823 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4824 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4827 #: build/C/man2/mremap.2:48
4829 "B<mremap>() expands (or shrinks) an existing memory mapping, potentially "
4830 "moving it at the same time (controlled by the I<flags> argument and the "
4831 "available virtual address space)."
4833 "B<mremap>() は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
4834 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
4838 #: build/C/man2/mremap.2:62
4840 "I<old_address> is the old address of the virtual memory block that you want "
4841 "to expand (or shrink). Note that I<old_address> has to be page aligned. "
4842 "I<old_size> is the old size of the virtual memory block. I<new_size> is the "
4843 "requested size of the virtual memory block after the resize. An optional "
4844 "fifth argument, I<new_address>, may be provided; see the description of "
4845 "B<MREMAP_FIXED> below."
4847 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
4848 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
4849 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
4850 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
4851 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
4855 #: build/C/man2/mremap.2:74
4857 "In Linux the memory is divided into pages. A user process has (one or) "
4858 "several linear virtual memory segments. Each virtual memory segment has one "
4859 "or more mappings to real memory pages (in the page table). Each virtual "
4860 "memory segment has its own protection (access rights), which may cause a "
4861 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
4862 "to a read-only segment). Accessing virtual memory outside of the segments "
4863 "will also cause a segmentation violation."
4865 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは) 複数"
4866 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
4867 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
4868 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
4869 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
4870 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
4871 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
4875 #: build/C/man2/mremap.2:82
4877 "B<mremap>() uses the Linux page table scheme. B<mremap>() changes the "
4878 "mapping between virtual addresses and memory pages. This can be used to "
4879 "implement a very efficient B<realloc>(3)."
4881 "B<mremap>() は Linux のページ・テーブル方式を使用する。 B<mremap>() は仮想"
4882 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
4883 "B<realloc>(3) を実装するのに使用されている。"
4886 #: build/C/man2/mremap.2:84
4887 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
4888 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
4891 #: build/C/man2/mremap.2:84
4893 msgid "B<MREMAP_MAYMOVE>"
4894 msgstr "B<MREMAP_MAYMOVE>"
4897 #: build/C/man2/mremap.2:96
4899 "By default, if there is not sufficient space to expand a mapping at its "
4900 "current location, then B<mremap>() fails. If this flag is specified, then "
4901 "the kernel is permitted to relocate the mapping to a new virtual address, if "
4902 "necessary. If the mapping is relocated, then absolute pointers into the old "
4903 "mapping location become invalid (offsets relative to the starting address of "
4904 "the mapping should be employed)."
4906 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
4907 "B<mremap>() は失敗する。 このフラグが指定されると、カーネルは必要があれば"
4908 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
4909 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
4910 "レスからの相対オフセットは有効のままである)。"
4913 #: build/C/man2/mremap.2:96
4915 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
4916 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
4919 #: build/C/man2/mremap.2:118
4921 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2). "
4922 "If this flag is specified, then B<mremap>() accepts a fifth argument, "
4923 "I<void *new_address>, which specifies a page-aligned address to which the "
4924 "mapping must be moved. Any previous mapping at the address range specified "
4925 "by I<new_address> and I<new_size> is unmapped. If B<MREMAP_FIXED> is "
4926 "specified, then B<MREMAP_MAYMOVE> must also be specified."
4928 "このフラグは B<mmap>(2) の B<MAP_FIXED> フラグと似たような目的で用いられ"
4929 "る。 このフラグが指定されると、 B<mremap>() は 5 番目の引き数 I<void "
4930 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
4931 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
4932 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
4933 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
4934 "B<MREMAP_MAYMOVE> も指定しなければならない。"
4937 #: build/C/man2/mremap.2:128
4939 "If the memory segment specified by I<old_address> and I<old_size> is locked "
4940 "(using B<mlock>(2) or similar), then this lock is maintained when the "
4941 "segment is resized and/or relocated. As a consequence, the amount of memory "
4942 "locked by the process may change."
4944 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2) や"
4945 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
4946 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
4950 #: build/C/man2/mremap.2:136
4952 "On success B<mremap>() returns a pointer to the new virtual memory area. "
4953 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
4954 "and I<errno> is set appropriately."
4956 "成功した場合は B<mremap>() は新しい仮想メモリ領域へのポインタを返す。 エラー"
4957 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
4961 #: build/C/man2/mremap.2:143
4963 "The caller tried to expand a memory segment that is locked, but this was not "
4964 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
4966 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
4967 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
4970 #: build/C/man2/mremap.2:152
4972 "\"Segmentation fault.\" Some address in the range I<old_address> to "
4973 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
4974 "process. You can also get B<EFAULT> even if there exist mappings that cover "
4975 "the whole address space requested, but those mappings are of different types."
4977 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
4978 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
4979 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
4980 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
4984 #: build/C/man2/mremap.2:180
4986 "An invalid argument was given. Possible causes are: I<old_address> was not "
4987 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
4988 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
4989 "was invalid; or the new address range specified by I<new_address> and "
4990 "I<new_size> overlapped the old address range specified by I<old_address> and "
4991 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
4992 "B<MREMAP_MAYMOVE>."
4994 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
4995 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
4996 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
4997 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
4998 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
4999 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
5003 #: build/C/man2/mremap.2:186
5005 "The memory area cannot be expanded at the current virtual address, and the "
5006 "B<MREMAP_MAYMOVE> flag is not set in I<flags>. Or, there is not enough "
5007 "(virtual) memory available."
5009 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
5010 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
5012 #. 4.2BSD had a (never actually implemented)
5014 #. call with completely different semantics.
5016 #: build/C/man2/mremap.2:192
5018 "This call is Linux-specific, and should not be used in programs intended to "
5021 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
5025 #: build/C/man2/mremap.2:200
5027 "Prior to version 2.4, glibc did not expose the definition of "
5028 "B<MREMAP_FIXED>, and the prototype for B<mremap>() did not allow for the "
5029 "I<new_address> argument."
5031 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
5032 "ず、 B<mremap>() のプロトタイプは I<new_address> 引き数を取らなかった。"
5035 #: build/C/man2/mremap.2:209
5037 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5038 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
5040 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5041 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
5044 #: build/C/man2/mremap.2:214
5046 "Your favorite OS text book for more information on paged memory. (I<Modern "
5047 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
5048 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
5050 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
5052 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
5053 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
5054 "System> by Maurice J. Bach.)"
5057 #: build/C/man2/msync.2:25
5063 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:26
5069 #: build/C/man2/msync.2:28
5070 msgid "msync - synchronize a file with a memory map"
5071 msgstr "msync - ファイルをマップしたメモリと同期させる"
5074 #: build/C/man2/msync.2:32
5075 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5076 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5079 #: build/C/man2/msync.2:48
5081 "B<msync>() flushes changes made to the in-core copy of a file that was "
5082 "mapped into memory using B<mmap>(2) back to disk. Without use of this call "
5083 "there is no guarantee that changes are written back before B<munmap>(2) is "
5084 "called. To be more precise, the part of the file that corresponds to the "
5085 "memory area starting at I<addr> and having length I<length> is updated."
5087 "B<msync>() は B<mmap>(2) を使ってメモリにマップされたファイルの、 メモリ上"
5088 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
5089 "B<munmap>(2) が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
5090 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
5094 #: build/C/man2/msync.2:68
5096 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
5097 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>. B<MS_ASYNC> "
5098 "specifies that an update be scheduled, but the call returns immediately. "
5099 "B<MS_SYNC> asks for an update and waits for it to complete. "
5100 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
5101 "they can be updated with the fresh values just written)."
5103 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
5104 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
5105 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
5106 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
5107 "た今書き込んだ新しい値でマッピングを更新することができるように) 同じファイル"
5108 "に対する他のマッピングを無効にすることを要求する。"
5111 #: build/C/man2/msync.2:73
5113 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
5116 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
5120 #: build/C/man2/msync.2:74
5126 #: build/C/man2/msync.2:80
5128 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
5129 "specified address range."
5131 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
5135 #: build/C/man2/msync.2:93
5137 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
5138 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
5139 "B<MS_ASYNC> are set in I<flags>."
5141 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
5142 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
5143 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
5146 #: build/C/man2/msync.2:96
5147 msgid "The indicated memory (or part of it) was not mapped."
5148 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
5151 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:103
5152 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
5153 msgid "POSIX.1-2001."
5154 msgstr "POSIX.1-2001."
5157 #: build/C/man2/msync.2:105
5159 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
5160 "B<ENOMEM>. In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
5162 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
5163 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
5165 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5166 #. -1: unavailable, 0: ask using sysconf().
5167 #. glibc defines them to 1.
5169 #: build/C/man2/msync.2:118
5171 "On POSIX systems on which B<msync>() is available, both "
5172 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
5173 "I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
5175 "B<msync>() が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
5176 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
5177 "定義される。 (B<sysconf>(3) を参照すること。 )"
5180 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
5186 #: build/C/man3/mtrace.3:23
5192 #: build/C/man3/mtrace.3:26
5193 msgid "mtrace, muntrace - malloc tracing"
5194 msgstr "mtrace, muntrace - malloc のトレース"
5197 #: build/C/man3/mtrace.3:28
5198 msgid "B<#include E<lt>mcheck.hE<gt>>"
5199 msgstr "B<#include E<lt>mcheck.hE<gt>>"
5202 #: build/C/man3/mtrace.3:30
5203 msgid "B<void mtrace(void);>"
5204 msgstr "B<void mtrace(void);>"
5207 #: build/C/man3/mtrace.3:32
5208 msgid "B<void muntrace(void);>"
5209 msgstr "B<void muntrace(void);>"
5212 #: build/C/man3/mtrace.3:44
5214 "The B<mtrace>() function installs hook functions for the memory-allocation "
5215 "functions (B<malloc>(3), B<realloc>(3) B<memalign>(3), B<free>(3)). These "
5216 "hook functions record tracing information about memory allocation and "
5217 "deallocation. The tracing information can be used to discover memory leaks "
5218 "and attempts to free nonallocated memory in a program."
5222 #: build/C/man3/mtrace.3:55
5224 "The B<muntrace>() function disables the hook functions installed by "
5225 "B<mtrace>(), so that tracing information is no longer recorded for the "
5226 "memory-allocation functions. If no hook functions were successfully "
5227 "installed by B<mtrace>(), B<muntrace>() does nothing."
5231 #: build/C/man3/mtrace.3:63
5233 "When B<mtrace>(3) is called, it checks the value of the environment "
5234 "variable B<MALLOC_TRACE>, which should contain the pathname of a file in "
5235 "which the tracing information is to be recorded. If the pathname is "
5236 "successfully opened, it is truncated to zero length."
5240 #: build/C/man3/mtrace.3:76
5242 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
5243 "not writable, then no hook functions are installed, and B<mtrace>() has no "
5244 "effect. In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
5245 "ignored, and B<mtrace>() has no effect."
5249 #: build/C/man3/mtrace.3:84
5251 "In normal usage, B<mtrace>() is called once at the start of execution of a "
5252 "program, and B<muntrace>() is never called."
5256 #: build/C/man3/mtrace.3:94
5258 "The tracing output produced after a call to B<mtrace>() is textual, but not "
5259 "designed to be human readable. The GNU C library provides a Perl script, "
5260 "B<mtrace>(1), that interprets the trace log and produces human-readable "
5261 "output. For best results, the traced program should be compiled with "
5262 "debugging enabled, so that line-number information is recorded in the "
5267 #: build/C/man3/mtrace.3:100
5269 "The tracing performed by B<mtrace>() incurs a performance penalty (if "
5270 "B<MALLOC_TRACE> points to a valid, writable pathname)."
5274 #: build/C/man3/mtrace.3:106
5276 "The line-number information produced by B<mtrace>(1) is not always precise: "
5277 "the line number references may refer to the previous or following (non-"
5278 "blank) line of the source code."
5282 #: build/C/man3/mtrace.3:113
5284 "The shell session below demonstrates the use of the B<mtrace>() function "
5285 "and the B<mtrace>(1) command in a program that has memory leaks at two "
5286 "different locations. The demonstration uses the following program:"
5290 #: build/C/man3/mtrace.3:120
5293 "$ B<cat t_mtrace.c>\n"
5294 "#include E<lt>mcheck.hE<gt>\n"
5295 "#include E<lt>stdlib.hE<gt>\n"
5296 "#include E<lt>stdio.hE<gt>\n"
5298 "$ B<cat t_mtrace.c>\n"
5299 "#include E<lt>mcheck.hE<gt>\n"
5300 "#include E<lt>stdlib.hE<gt>\n"
5301 "#include E<lt>stdio.hE<gt>\n"
5304 #: build/C/man3/mtrace.3:125
5308 "main(int argc, char *argv[])\n"
5313 "main(int argc, char *argv[])\n"
5318 #: build/C/man3/mtrace.3:127
5320 msgid " mtrace();\n"
5321 msgstr " mtrace();\n"
5324 #: build/C/man3/mtrace.3:130
5327 " for (j = 0; j E<lt> 2; j++)\n"
5328 " malloc(100); /* Never freed--a memory leak */\n"
5330 " for (j = 0; j E<lt> 2; j++)\n"
5331 " malloc(100); /* Never freed--a memory leak */\n"
5334 #: build/C/man3/mtrace.3:134
5337 " calloc(16, 16); /* Never freed--a memory leak */\n"
5338 " exit(EXIT_SUCCESS);\n"
5341 " calloc(16, 16); /* Never freed--a memory leak */\n"
5342 " exit(EXIT_SUCCESS);\n"
5346 #: build/C/man3/mtrace.3:140
5348 "When we run the program as follows, we see that B<mtrace>() diagnosed "
5349 "memory leaks at two different locations in the program:"
5353 #: build/C/man3/mtrace.3:153
5356 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5357 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5359 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5360 "Memory not freed:\n"
5361 "-----------------\n"
5362 " Address Size Caller\n"
5363 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
5364 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
5365 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
5367 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5368 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5370 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5371 "Memory not freed:\n"
5372 "-----------------\n"
5373 " Address Size Caller\n"
5374 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
5375 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
5376 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
5379 #: build/C/man3/mtrace.3:165
5381 "The first two messages about unfreed memory correspond to the two B<malloc>"
5382 "(3) calls inside the I<for> loop. The final message corresponds to the "
5383 "call to B<calloc>(3) (which in turn calls B<malloc>(3))."
5387 #: build/C/man3/mtrace.3:170
5389 #| msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3)"
5390 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5391 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3)"
5394 #: build/C/man2/posix_fadvise.2:27
5396 msgid "POSIX_FADVISE"
5397 msgstr "POSIX_FADVISE"
5400 #: build/C/man2/posix_fadvise.2:27 build/C/man2/sync_file_range.2:30
5406 #: build/C/man2/posix_fadvise.2:30
5407 msgid "posix_fadvise - predeclare an access pattern for file data"
5408 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
5411 #: build/C/man2/posix_fadvise.2:33 build/C/man3/posix_fallocate.3:29
5413 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
5414 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
5417 #: build/C/man2/posix_fadvise.2:36
5419 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5420 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5423 #: build/C/man2/posix_fadvise.2:45
5424 msgid "B<posix_fadvise>():"
5425 msgstr "B<posix_fadvise>():"
5428 #: build/C/man2/posix_fadvise.2:47 build/C/man3/posix_fallocate.3:42
5429 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5430 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5433 #: build/C/man2/posix_fadvise.2:55
5435 "Programs can use B<posix_fadvise>() to announce an intention to access file "
5436 "data in a specific pattern in the future, thus allowing the kernel to "
5437 "perform appropriate optimizations."
5439 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
5440 "めに B<posix_fadvise>() を使うことができる。 これにより、カーネルが適切な最"
5444 #: build/C/man2/posix_fadvise.2:62
5446 "The I<advice> applies to a (not necessarily existent) region starting at "
5447 "I<offset> and extending for I<len> bytes (or until the end of the file if "
5448 "I<len> is 0) within the file referred to by I<fd>. The I<advice> is not "
5449 "binding; it merely constitutes an expectation on behalf of the application."
5451 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
5453 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
5454 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
5456 "ションのために可能性を構成するだけである。"
5459 #: build/C/man2/posix_fadvise.2:64
5460 msgid "Permissible values for I<advice> include:"
5461 msgstr "I<advice> に許される値には、以下のものが含まれる:"
5464 #: build/C/man2/posix_fadvise.2:64
5466 msgid "B<POSIX_FADV_NORMAL>"
5467 msgstr "B<POSIX_FADV_NORMAL>"
5470 #: build/C/man2/posix_fadvise.2:70
5472 "Indicates that the application has no advice to give about its access "
5473 "pattern for the specified data. If no advice is given for an open file, "
5474 "this is the default assumption."
5476 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
5477 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
5478 "合、 これがデフォルトで仮定される。"
5481 #: build/C/man2/posix_fadvise.2:70
5483 msgid "B<POSIX_FADV_SEQUENTIAL>"
5484 msgstr "B<POSIX_FADV_SEQUENTIAL>"
5487 #: build/C/man2/posix_fadvise.2:74
5489 "The application expects to access the specified data sequentially (with "
5490 "lower offsets read before higher ones)."
5492 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
5493 "小さなオフセットのデータを読むように) アクセスされることを期待する。"
5496 #: build/C/man2/posix_fadvise.2:74
5498 msgid "B<POSIX_FADV_RANDOM>"
5499 msgstr "B<POSIX_FADV_RANDOM>"
5502 #: build/C/man2/posix_fadvise.2:77
5503 msgid "The specified data will be accessed in random order."
5504 msgstr "指定されたデータがランダムな順番でアクセスされる。"
5507 #: build/C/man2/posix_fadvise.2:77
5509 msgid "B<POSIX_FADV_NOREUSE>"
5510 msgstr "B<POSIX_FADV_NOREUSE>"
5513 #: build/C/man2/posix_fadvise.2:80
5514 msgid "The specified data will be accessed only once."
5515 msgstr "指定されたデータは 1 度しかアクセスされない。"
5518 #: build/C/man2/posix_fadvise.2:80
5520 msgid "B<POSIX_FADV_WILLNEED>"
5521 msgstr "B<POSIX_FADV_WILLNEED>"
5524 #: build/C/man2/posix_fadvise.2:83
5525 msgid "The specified data will be accessed in the near future."
5526 msgstr "指定されたデータは近い将来アクセスされる。"
5529 #: build/C/man2/posix_fadvise.2:83
5531 msgid "B<POSIX_FADV_DONTNEED>"
5532 msgstr "B<POSIX_FADV_DONTNEED>"
5535 #: build/C/man2/posix_fadvise.2:86
5536 msgid "The specified data will not be accessed in the near future."
5537 msgstr "指定されたデータは近い将来アクセスされない。"
5540 #: build/C/man2/posix_fadvise.2:89
5541 msgid "On success, zero is returned. On error, an error number is returned."
5542 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
5545 #: build/C/man2/posix_fadvise.2:93
5546 msgid "The I<fd> argument was not a valid file descriptor."
5547 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
5550 #: build/C/man2/posix_fadvise.2:96
5551 msgid "An invalid value was specified for I<advice>."
5552 msgstr "無効な値が I<advice> に指定された。"
5555 #: build/C/man2/posix_fadvise.2:103
5557 "The specified file descriptor refers to a pipe or FIFO. (Linux actually "
5558 "returns B<EINVAL> in this case.)"
5560 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
5561 "合、Linux は実際には B<EINVAL> を返す)。"
5563 #. of fadvise64_64()
5565 #: build/C/man2/posix_fadvise.2:111
5567 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
5568 "called B<fadvise64>(). Library support has been provided since glibc "
5569 "version 2.2, via the wrapper function B<posix_fadvise>()."
5571 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
5572 "対応するシステムコールは B<fadvise64>() という名前である。\n"
5573 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
5574 "ラッパー関数は B<posix_fadvise>() という名前である。"
5577 #: build/C/man2/posix_fadvise.2:120
5579 "POSIX.1-2001. Note that the type of the I<len> argument was changed from "
5580 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
5582 "POSIX.1-2001. I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
5583 "I<off_t> に変更された点に注意すること。"
5586 #: build/C/man2/posix_fadvise.2:126
5588 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
5589 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
5590 "B<POSIX_FADV_RANDOM> disables file readahead entirely. These changes affect "
5591 "the entire file, not just the specified region (but other open file handles "
5592 "to the same file are unaffected)."
5594 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
5595 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
5596 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
5597 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
5598 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
5601 #: build/C/man2/posix_fadvise.2:133
5603 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
5604 "into the page cache. The amount of data read may be decreased by the kernel "
5605 "depending on virtual memory load. (A few megabytes will usually be fully "
5606 "satisfied, and more is rarely useful.)"
5608 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
5609 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
5610 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
5614 #: build/C/man2/posix_fadvise.2:137
5616 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
5617 "B<POSIX_FADV_WILLNEED>. This was probably a bug; since kernel 2.6.18, this "
5620 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
5621 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
5625 #: build/C/man2/posix_fadvise.2:145
5627 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
5628 "specified region. This is useful, for example, while streaming large "
5629 "files. A program may periodically request the kernel to free cached data "
5630 "that has already been used, so that more useful cached pages are not "
5631 "discarded instead."
5633 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
5634 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
5635 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
5636 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
5637 "されたページが、 代わりに破棄されることはない。"
5640 #: build/C/man2/posix_fadvise.2:153
5642 "Pages that have not yet been written out will be unaffected, so if the "
5643 "application wishes to guarantee that pages will be released, it should call "
5644 "B<fsync>(2) or B<fdatasync>(2) first."
5646 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
5647 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2) または "
5648 "B<fdatasync>(2) を呼ぶべきである。"
5651 #: build/C/man2/posix_fadvise.2:153
5653 msgid "arm_fadvise()"
5654 msgstr "arm_fadvise()"
5657 #: build/C/man2/posix_fadvise.2:165
5659 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
5660 "of registers. On this architecture, the call signature of B<posix_fadvise>"
5661 "() is flawed, since it forces a register to be wasted as padding between "
5662 "the I<fd> and I<len> arguments. Therefore, since Linux 2.6.14, ARM defines "
5663 "a different system call that orders the arguments suitably:"
5667 #: build/C/man2/posix_fadvise.2:170
5670 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5671 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5673 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5674 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5676 #. No ARM support in glibc.
5678 #: build/C/man2/posix_fadvise.2:177
5680 "The behavior of this system call is otherwise exactly the same as "
5681 "B<posix_fadvise>(). No library support is provided for this system call in "
5686 #: build/C/man2/posix_fadvise.2:182
5688 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
5689 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
5690 "through to the end of the file\"."
5692 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
5693 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
5696 #. FIXME . Write a posix_fadvise(3) page.
5698 #: build/C/man2/posix_fadvise.2:188
5700 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
5701 "B<posix_madvise>(3)"
5703 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
5704 "B<posix_madvise>(3)"
5707 #: build/C/man3/posix_fallocate.3:23
5709 msgid "POSIX_FALLOCATE"
5710 msgstr "POSIX_FALLOCATE"
5713 #: build/C/man3/posix_fallocate.3:23
5719 #: build/C/man3/posix_fallocate.3:26
5720 msgid "posix_fallocate - allocate file space"
5721 msgstr "posix_fallocate - ファイルのスペースを確保する"
5724 #: build/C/man3/posix_fallocate.3:31
5726 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5727 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5730 #: build/C/man3/posix_fallocate.3:40
5731 msgid "B<posix_fallocate>():"
5732 msgstr "B<posix_fallocate>():"
5735 #: build/C/man3/posix_fallocate.3:59
5737 "The function B<posix_fallocate>() ensures that disk space is allocated for "
5738 "the file referred to by the descriptor I<fd> for the bytes in the range "
5739 "starting at I<offset> and continuing for I<len> bytes. After a successful "
5740 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
5741 "range are guaranteed not to fail because of lack of disk space."
5743 "関数 B<posix_fallocate>() は、ディスクリプタ I<fd> で参照されるファイルに対"
5744 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
5745 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>() の呼び出しが成"
5746 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
5750 #: build/C/man3/posix_fallocate.3:64
5752 "If the size of the file is less than I<offset>+I<len>, then the file is "
5753 "increased to this size; otherwise the file size is left unchanged."
5755 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
5756 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
5759 #: build/C/man3/posix_fallocate.3:70
5761 "B<posix_fallocate>() returns zero on success, or an error number on "
5762 "failure. Note that I<errno> is not set."
5764 "B<posix_fallocate>() は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
5765 "す。 I<errno> が設定されない点に注意すること。"
5768 #: build/C/man3/posix_fallocate.3:79
5769 msgid "I<offset+len> exceeds the maximum file size."
5770 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
5773 #: build/C/man3/posix_fallocate.3:89
5774 msgid "I<fd> does not refer to a regular file."
5775 msgstr "I<fd> が通常のファイルとして参照されていない。"
5778 #: build/C/man3/posix_fallocate.3:98
5779 msgid "I<fd> refers to a pipe."
5780 msgstr "I<fd> がパイプを参照している。"
5783 #: build/C/man3/posix_fallocate.3:101
5784 msgid "B<posix_fallocate>() is available since glibc 2.1.94."
5785 msgstr "B<posix_fallocate>() は glibc 2.1.94 以降で利用可能である。"
5788 #: build/C/man3/posix_fallocate.3:126
5790 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
5791 "if I<len> was 0, or I<offset> was less than 0. POSIX.1-2001 says that an "
5792 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
5793 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
5796 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
5797 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
5798 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
5799 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
5803 #: build/C/man3/posix_fallocate.3:130
5804 msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5805 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5808 #: build/C/man3/posix_memalign.3:28
5810 msgid "POSIX_MEMALIGN"
5811 msgstr "POSIX_MEMALIGN"
5814 #: build/C/man3/posix_memalign.3:28
5820 #: build/C/man3/posix_memalign.3:31
5822 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate aligned "
5825 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
5829 #: build/C/man3/posix_memalign.3:34 build/C/man3/malloc_get_state.3:29
5831 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
5832 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
5835 #: build/C/man3/posix_memalign.3:38
5838 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5839 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5840 "B<void *valloc(size_t >I<size>B<);>\n"
5842 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5843 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5844 "B<void *valloc(size_t >I<size>B<);>\n"
5847 #: build/C/man3/posix_memalign.3:43
5850 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5851 "B<void *pvalloc(size_t >I<size>B<);>\n"
5853 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5854 "B<void *pvalloc(size_t >I<size>B<);>\n"
5857 #: build/C/man3/posix_memalign.3:53
5859 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5862 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5866 #: build/C/man3/posix_memalign.3:56
5867 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
5868 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
5871 #: build/C/man3/posix_memalign.3:58
5872 msgid "B<valloc>():"
5873 msgstr "B<valloc>():"
5876 #: build/C/man3/posix_memalign.3:61
5878 msgid "Since glibc 2.12:"
5879 msgstr "glibc 2.12 以降:"
5882 #: build/C/man3/posix_memalign.3:68
5886 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5887 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5888 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5891 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5892 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5893 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5896 #: build/C/man3/posix_memalign.3:70
5898 msgid "Before glibc 2.12:"
5899 msgstr "glibc 2.12 より前:"
5902 #: build/C/man3/posix_memalign.3:74
5904 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5905 "_XOPEN_SOURCE_EXTENDED"
5907 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5908 "_XOPEN_SOURCE_EXTENDED"
5911 #: build/C/man3/posix_memalign.3:81
5913 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
5914 "declaration of B<valloc>(); no feature test macros are required.)"
5916 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
5917 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
5921 #: build/C/man3/posix_memalign.3:102
5923 "The function B<posix_memalign>() allocates I<size> bytes and places the "
5924 "address of the allocated memory in I<*memptr>. The address of the allocated "
5925 "memory will be a multiple of I<alignment>, which must be a power of two and "
5926 "a multiple of I<sizeof(void *)>. If I<size> is 0, then B<posix_memalign>() "
5927 "returns either NULL, or a unique pointer value that can later be "
5928 "successfully passed to B<free>(3)."
5930 "関数 B<posix_memalign>() は、 I<size> バイトのメモリを割り当て、割り当てられ"
5931 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
5932 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
5933 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
5934 "B<posix_memalign>() は NULL か一意なポインタ値を返す。 このポインタ値は、後"
5935 "で B<free>(3) に問題なく渡すことができる。"
5937 #. The behavior of memalign() for size==0 is as for posix_memalign()
5938 #. but no standards govern this.
5940 #: build/C/man3/posix_memalign.3:113
5942 "The obsolete function B<memalign>() allocates I<size> bytes and returns a "
5943 "pointer to the allocated memory. The memory address will be a multiple of "
5944 "I<alignment>, which must be a power of two."
5946 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
5947 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
5948 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
5951 #: build/C/man3/posix_memalign.3:122
5953 "The function B<aligned_alloc>() is the same as B<memalign>(), except for "
5954 "the added restriction that I<size> should be a multiple of I<alignment>."
5956 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
5958 "の倍数でなければならないという追加の制限がある点が異なる。"
5961 #: build/C/man3/posix_memalign.3:132
5963 "The obsolete function B<valloc>() allocates I<size> bytes and returns a "
5964 "pointer to the allocated memory. The memory address will be a multiple of "
5965 "the page size. It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
5967 "廃止された関数である B<valloc>() は I<size> バイトのメモリを割り当て、割り当"
5968 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
5969 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
5973 #: build/C/man3/posix_memalign.3:139
5975 "The obsolete function B<pvalloc>() is similar to B<valloc>(), but rounds "
5976 "the size of the allocation up to the next multiple of the system page size."
5978 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
5979 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
5982 #: build/C/man3/posix_memalign.3:141
5983 msgid "For all of these functions, the memory is not zeroed."
5984 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
5987 #: build/C/man3/posix_memalign.3:148
5989 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>() return a "
5990 "pointer to the allocated memory, or NULL if the request fails."
5992 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
5994 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
5997 #: build/C/man3/posix_memalign.3:155
5999 "B<posix_memalign>() returns zero on success, or one of the error values "
6000 "listed in the next section on failure. Note that I<errno> is not set."
6002 "B<posix_memalign>() は成功した場合は 0 を返し、 失敗した場合は次のセクション"
6003 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
6007 #: build/C/man3/posix_memalign.3:162
6009 "The I<alignment> argument was not a power of two, or was not a multiple of "
6010 "I<sizeof(void *)>."
6012 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
6016 #: build/C/man3/posix_memalign.3:165
6017 msgid "There was insufficient memory to fulfill the allocation request."
6018 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
6021 #: build/C/man3/posix_memalign.3:172
6023 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>() have been "
6024 "available in all Linux libc libraries."
6026 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
6027 "すべての Linux libc ライブラリで使用可能である。"
6030 #: build/C/man3/posix_memalign.3:176
6031 msgid "The function B<aligned_alloc>() was added to glibc in version 2.16."
6032 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
6035 #: build/C/man3/posix_memalign.3:180
6036 msgid "The function B<posix_memalign>() is available since glibc 2.1.91."
6037 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
6040 #: build/C/man3/posix_memalign.3:187
6042 "The function B<valloc>() appeared in 3.0BSD. It is documented as being "
6043 "obsolete in 4.3BSD, and as legacy in SUSv2. It does not appear in "
6046 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
6048 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
6051 #: build/C/man3/posix_memalign.3:191
6052 msgid "The function B<pvalloc>() is a GNU extension."
6053 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
6056 #: build/C/man3/posix_memalign.3:195
6057 msgid "The function B<memalign>() appears in SunOS 4.1.3 but not in 4.4BSD."
6058 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
6061 #: build/C/man3/posix_memalign.3:199
6062 msgid "The function B<posix_memalign>() comes from POSIX.1d."
6063 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
6066 #: build/C/man3/posix_memalign.3:204
6068 #| msgid "The function I<aligned_alloc ()> is specified in the C11 standard."
6069 msgid "The function B<aligned_alloc>() is specified in the C11 standard."
6070 msgstr "関数 I<aligned_alloc ()> は C11 標準で規定されている。"
6073 #: build/C/man3/posix_memalign.3:204
6079 #: build/C/man3/posix_memalign.3:208
6081 "Everybody agrees that B<posix_memalign>() is declared in I<E<lt>stdlib."
6084 "B<posix_memalign>() の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
6088 #: build/C/man3/posix_memalign.3:212
6090 "On some systems B<memalign>() is declared in I<E<lt>stdlib.hE<gt>> instead "
6091 "of I<E<lt>malloc.hE<gt>>."
6093 "いくつかのシステムでは、 B<memalign>() は I<E<lt>malloc.hE<gt>> ではなく "
6094 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
6097 #: build/C/man3/posix_memalign.3:219
6099 "According to SUSv2, B<valloc>() is declared in I<E<lt>stdlib.hE<gt>>. "
6100 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
6101 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
6104 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
6106 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
6107 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
6110 #: build/C/man3/posix_memalign.3:228
6112 "On many systems there are alignment restrictions, for example, on buffers "
6113 "used for direct block device I/O. POSIX specifies the I<pathconf(path,"
6114 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed. Now one can "
6115 "use B<posix_memalign>() to satisfy this requirement."
6117 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
6118 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
6119 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
6120 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>() を使う"
6121 "と、この必要条件を満たすことができる。"
6124 #: build/C/man3/posix_memalign.3:237
6126 "B<posix_memalign>() verifies that I<alignment> matches the requirements "
6127 "detailed above. B<memalign>() may not check that the I<alignment> argument "
6130 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
6131 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
6134 #. Other systems allow passing the result of
6141 #: build/C/man3/posix_memalign.3:265
6143 "POSIX requires that memory obtained from B<posix_memalign>() can be freed "
6144 "using B<free>(3). Some systems provide no way to reclaim memory allocated "
6145 "with B<memalign>() or B<valloc>() (because one can only pass to B<free>"
6146 "(3) a pointer gotten from B<malloc>(3), while, for example, B<memalign>() "
6147 "would call B<malloc>(3) and then align the obtained value). The glibc "
6148 "implementation allows memory obtained from any of these these functions to "
6149 "be reclaimed with B<free>(3)."
6151 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を使って\n"
6152 "解放することができる必要がある。 いくつかのシステムでは B<memalign>() や\n"
6153 "B<valloc>() で割り当てられたメモリを再利用する手段が提供されていない。\n"
6154 "(なぜなら B<free>(3) に渡すことができるのは B<malloc>(3) から受け取った\n"
6155 "ポインタだけだが、 例えば B<memalign>() は B<malloc>(3) を呼び出し、\n"
6156 "得た値をアラインメントしてしまうからである) glibc の実装では、 ここに述べた\n"
6157 "関数のいずれで獲得したメモリも B<free>(3) で再利用することができる。"
6160 #: build/C/man3/posix_memalign.3:270
6162 "The glibc B<malloc>(3) always returns 8-byte aligned memory addresses, so "
6163 "these functions are only needed if you require larger alignment values."
6165 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
6166 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
6171 #: build/C/man3/posix_memalign.3:275
6172 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6173 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6176 #: build/C/man2/readahead.2:28
6182 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
6188 #: build/C/man2/readahead.2:31
6189 msgid "readahead - perform file readahead into page cache"
6190 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
6193 #: build/C/man2/readahead.2:37
6195 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6196 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6199 #: build/C/man2/readahead.2:65
6201 "B<readahead>() populates the page cache with data from a file so that "
6202 "subsequent reads from that file will not block on disk I/O. The I<fd> "
6203 "argument is a file descriptor identifying the file which is to be read. The "
6204 "I<offset> argument specifies the starting point from which data is to be "
6205 "read and I<count> specifies the number of bytes to be read. I/O is "
6206 "performed in whole pages, so that I<offset> is effectively rounded down to a "
6207 "page boundary and bytes are read up to the next page boundary greater than "
6208 "or equal to I<(offset+count)>. B<readahead>() does not read beyond the end "
6209 "of the file. B<readahead>() blocks until the specified data has been "
6210 "read. The current file offset of the open file referred to by I<fd> is left "
6213 "B<readahead>() は、この後の同じファイルからのデータ読み込み時にディスク I/O "
6214 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
6215 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
6216 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
6217 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
6218 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
6219 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
6220 "B<readahead>() はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
6221 "た、 B<readahead>() は指定したデータの読み込みが終わるまで停止 (block) す"
6222 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
6226 #: build/C/man2/readahead.2:71
6228 "On success, B<readahead>() returns 0; on failure, -1 is returned, with "
6229 "I<errno> set to indicate the cause of the error."
6231 "B<readahead>() は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
6235 #: build/C/man2/readahead.2:76
6236 msgid "I<fd> is not a valid file descriptor or is not open for reading."
6238 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
6242 #: build/C/man2/readahead.2:82
6244 "I<fd> does not refer to a file type to which B<readahead>() can be applied."
6246 "I<fd> が参照しているファイルが、 B<readahead>() を行うことができないタイプの"
6250 #: build/C/man2/readahead.2:87
6252 "The B<readahead>() system call appeared in Linux 2.4.13; glibc support has "
6253 "been provided since version 2.3."
6255 "B<readahead>() システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
6256 "は glibc バージョン 2.3 以降で行われている。"
6259 #: build/C/man2/readahead.2:92
6261 "The B<readahead>() system call is Linux-specific, and its use should be "
6262 "avoided in portable applications."
6264 "B<readahead>() システムコールは Linux 固有であり、移植を考慮したプログラムで"
6268 #: build/C/man2/readahead.2:98
6269 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6271 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6274 #: build/C/man2/remap_file_pages.2:26
6276 msgid "REMAP_FILE_PAGES"
6277 msgstr "REMAP_FILE_PAGES"
6280 #: build/C/man2/remap_file_pages.2:29
6281 msgid "remap_file_pages - create a nonlinear file mapping"
6282 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
6285 #: build/C/man2/remap_file_pages.2:33
6288 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
6289 "B<#include E<lt>sys/mman.hE<gt>>\n"
6291 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
6292 "B<#include E<lt>sys/mman.hE<gt>>\n"
6295 #: build/C/man2/remap_file_pages.2:36
6298 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6299 "B< ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6301 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6302 "B< ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6305 #: build/C/man2/remap_file_pages.2:49
6307 "The B<remap_file_pages>() system call is used to create a nonlinear "
6308 "mapping, that is, a mapping in which the pages of the file are mapped into a "
6309 "nonsequential order in memory. The advantage of using B<remap_file_pages>"
6310 "() over using repeated calls to B<mmap>(2) is that the former approach "
6311 "does not require the kernel to create additional VMA (Virtual Memory Area) "
6314 "B<remap_file_pages>() システムコールは非線形なマッピング、 つまりファイルの"
6315 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
6316 "れる。 B<remap_file_pages>() を使う方が B<mmap>(2) を繰り返して使うより優れ"
6317 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
6318 "域) データ構造体を追加で作成する必要がないことである。"
6321 #: build/C/man2/remap_file_pages.2:51
6322 msgid "To create a nonlinear mapping we perform the following steps:"
6323 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
6326 #: build/C/man2/remap_file_pages.2:51
6332 #: build/C/man2/remap_file_pages.2:59
6334 "Use B<mmap>(2) to create a mapping (which is initially linear). This "
6335 "mapping must be created with the B<MAP_SHARED> flag."
6337 "B<mmap>(2) を使い、マッピングを作成する (このマッピングは最初は線形であ"
6338 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
6342 #: build/C/man2/remap_file_pages.2:59
6348 #: build/C/man2/remap_file_pages.2:67
6350 "Use one or more calls to B<remap_file_pages>() to rearrange the "
6351 "correspondence between the pages of the mapping and the pages of the file. "
6352 "It is possible to map the same page of a file into multiple locations within "
6353 "the mapped region."
6355 "B<remap_file_pages>() を 1 回以上呼び出して、 マッピングのページとファイルの"
6356 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
6360 #: build/C/man2/remap_file_pages.2:78
6362 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
6363 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
6364 "system page size; I<size> is the length of the region in bytes."
6366 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
6367 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
6368 "る。 I<size> は領域の長さであり、単位はバイトである。"
6371 #: build/C/man2/remap_file_pages.2:96
6373 "The I<addr> argument serves two purposes. First, it identifies the mapping "
6374 "whose pages we want to rearrange. Thus, I<addr> must be an address that "
6375 "falls within a region previously mapped by a call to B<mmap>(2). Second, "
6376 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
6377 "and I<size> will be placed."
6379 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
6380 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
6381 "(2) の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
6382 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
6383 "レスを、 I<addr> によって指定することである。"
6385 #. This rounding is weird, and not consistent with the treatment of
6386 #. the analogous arguments for munmap()/mprotect() and for mlock().
6389 #: build/C/man2/remap_file_pages.2:110
6391 "The values specified in I<addr> and I<size> should be multiples of the "
6392 "system page size. If they are not, then the kernel rounds I<both> values "
6393 "I<down> to the nearest multiple of the page size."
6395 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
6396 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
6400 #: build/C/man2/remap_file_pages.2:114
6401 msgid "The I<prot> argument must be specified as 0."
6402 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
6405 #: build/C/man2/remap_file_pages.2:122
6407 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
6408 "other than B<MAP_NONBLOCK> are ignored."
6410 "I<flags> 引き数は B<mmap>(2) のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
6414 #: build/C/man2/remap_file_pages.2:129
6416 "On success, B<remap_file_pages>() returns 0. On error, -1 is returned, and "
6417 "I<errno> is set appropriately."
6419 "成功した場合、 B<remap_file_pages>() は 0 を返す。 エラーの場合、-1 が返さ"
6420 "れ、 I<errno> が適切に設定される。"
6423 #: build/C/man2/remap_file_pages.2:137
6425 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
6428 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
6431 #. And possibly others from vma->vm_ops->populate()
6433 #: build/C/man2/remap_file_pages.2:146
6434 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
6435 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
6438 #: build/C/man2/remap_file_pages.2:151
6440 "The B<remap_file_pages>() system call appeared in Linux 2.5.46; glibc "
6441 "support was added in version 2.3.3."
6443 "B<remap_file_pages>() システムコールは Linux 2.5.46 で登場した。 glibc での"
6444 "サポートは glibc バージョン 2.3.3 で追加された。"
6447 #: build/C/man2/remap_file_pages.2:155
6448 msgid "The B<remap_file_pages>() system call is Linux-specific."
6449 msgstr "B<remap_file_pages>() システムコールは Linux 固有のものである。"
6452 #: build/C/man2/remap_file_pages.2:162
6454 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6457 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6461 #: build/C/man3/shm_open.3:26
6467 #: build/C/man3/shm_open.3:26
6473 #: build/C/man3/shm_open.3:29
6475 "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
6477 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
6481 #: build/C/man3/shm_open.3:33
6482 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
6483 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
6486 #: build/C/man3/shm_open.3:35
6487 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
6488 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
6491 #: build/C/man3/shm_open.3:37
6493 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
6495 "B<void * shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t "
6499 #: build/C/man3/shm_open.3:39
6500 msgid "B<int shm_unlink(const char *>I<name>B<);>"
6501 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
6504 #: build/C/man3/shm_open.3:41
6505 msgid "Link with I<-lrt>."
6506 msgstr "I<-lrt> でリンクする。"
6509 #: build/C/man3/shm_open.3:53
6511 "B<shm_open>() creates and opens a new, or opens an existing, POSIX shared "
6512 "memory object. A POSIX shared memory object is in effect a handle which can "
6513 "be used by unrelated processes to B<mmap>(2) the same region of shared "
6514 "memory. The B<shm_unlink>() function performs the converse operation, "
6515 "removing an object previously created by B<shm_open>()."
6517 "B<shm_open>() は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
6518 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
6519 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
6520 "(2) するために使用することができる手段である。 B<shm_unlink>() は、逆の操"
6521 "作、つまり以前に B<shm_open>() で作成されたオブジェクトの削除を行う。"
6523 #. glibc allows the initial slash to be omitted, and makes
6524 #. multiple initial slashes equivalent to a single slash.
6525 #. This differs from the implementation of POSIX message queues.
6526 #. glibc allows subdirectory components in the name, in which
6527 #. case the subdirectory must exist under /dev/shm, and allow the
6528 #. required permissions if a user wants to create a shared memory
6529 #. object in that subdirectory.
6531 #: build/C/man3/shm_open.3:74
6533 "The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> "
6534 "specifies the shared memory object to be created or opened. For portable "
6535 "use, a shared memory object should be identified by a name of the form I</"
6536 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
6537 "255) characters consisting of an initial slash, followed by one or more "
6538 "characters, none of which are slashes."
6540 "B<shm_open>() の動作は B<open>(2) とよく似ている。 I<name> で作成したりオー"
6541 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
6542 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
6543 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
6544 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
6547 #: build/C/man3/shm_open.3:81
6549 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
6550 "or B<O_RDWR> and any of the other flags listed here:"
6552 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
6553 "述べる他のフラグの論理和をとったもの を指定する。"
6556 #: build/C/man3/shm_open.3:81
6559 msgstr "B<O_RDONLY>"
6562 #: build/C/man3/shm_open.3:87
6564 "Open the object for read access. A shared memory object opened in this way "
6565 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
6567 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
6568 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
6569 "B<mmap>(2) することができる。"
6572 #: build/C/man3/shm_open.3:87
6578 #: build/C/man3/shm_open.3:90
6579 msgid "Open the object for read-write access."
6580 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
6583 #: build/C/man3/shm_open.3:90
6588 #. In truth it is actually the file system IDs on Linux, but these
6589 #. are nearly always the same as the effective IDs. (MTK, Jul 05)
6591 #: build/C/man3/shm_open.3:110
6593 "Create the shared memory object if it does not exist. The user and group "
6594 "ownership of the object are taken from the corresponding effective IDs of "
6595 "the calling process, and the object's permission bits are set according to "
6596 "the low-order 9 bits of I<mode>, except that those bits set in the process "
6597 "file mode creation mask (see B<umask>(2)) are cleared for the new object. "
6598 "A set of macro constants which can be used to define I<mode> is listed in "
6599 "B<open>(2). (Symbolic definitions of these constants can be obtained by "
6600 "including I<E<lt>sys/stat.hE<gt>>.)"
6602 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
6603 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
6604 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
6605 "ルモード作成マスク (B<umask>(2) 参照) に設定されている値は、新規オブジェクト"
6606 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
6607 "B<open>(2) に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
6608 "hE<gt>> のインクルードにより得られる)。"
6611 #: build/C/man3/shm_open.3:116
6613 "A new shared memory object initially has zero length\\(emthe size of the "
6614 "object can be set using B<ftruncate>(2). The newly allocated bytes of a "
6615 "shared memory object are automatically initialized to 0."
6617 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
6618 "トの大きさは B<ftruncate>(2) を使って設定できる。 共有メモリ・オブジェクトと"
6619 "して新規に確保されたバイトは自動的に 0 に初期化される。"
6622 #: build/C/man3/shm_open.3:116
6628 #: build/C/man3/shm_open.3:125
6630 "If B<O_CREAT> was also specified, and a shared memory object with the given "
6631 "I<name> already exists, return an error. The check for the existence of the "
6632 "object, and its creation if it does not exist, are performed atomically."
6634 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
6635 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
6636 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
6640 #: build/C/man3/shm_open.3:125
6646 #: build/C/man3/shm_open.3:128
6647 msgid "If the shared memory object already exists, truncate it to zero bytes."
6649 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
6653 #: build/C/man3/shm_open.3:131
6655 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
6658 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
6661 #: build/C/man3/shm_open.3:142
6663 "On successful completion B<shm_open>() returns a new file descriptor "
6664 "referring to the shared memory object. This file descriptor is guaranteed "
6665 "to be the lowest-numbered file descriptor not previously opened within the "
6666 "process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file "
6669 "成功して完了した場合、 B<shm_open>() は共有メモリ・オブジェクトを参照する新"
6670 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
6671 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
6672 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2) を参照) が、この"
6673 "ファイル・ディスクリプタに設定される。"
6676 #: build/C/man3/shm_open.3:151
6678 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2) "
6679 "(for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) "
6680 "the file descriptor may be closed without affecting the memory mapping."
6682 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
6683 "(2) (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2) の呼び出しに使用"
6684 "される。 B<mmap>(2) を呼び出した後は、ファイル・ディスクリプタをクローズして"
6685 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
6688 #: build/C/man3/shm_open.3:169
6690 "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a "
6691 "shared memory object name, and, once all processes have unmapped the object, "
6692 "de-allocates and destroys the contents of the associated memory region. "
6693 "After a successful B<shm_unlink>(), attempts to B<shm_open>() an object "
6694 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
6695 "case a new, distinct object is created)."
6697 "B<shm_unlink>() の動作は B<unlink>(2) とよく似ている: 共有メモリ・オブジェ"
6698 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
6699 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
6700 "B<shm_unlink>() が成功した後で、同じ I<name> を持つオブジェクトに対して "
6701 "B<shm_open>() を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
6702 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
6705 #: build/C/man3/shm_open.3:178
6707 "On success, B<shm_open>() returns a nonnegative file descriptor. On "
6708 "failure, B<shm_open>() returns -1. B<shm_unlink>() returns 0 on success, "
6711 "成功した場合、 B<shm_open>() は非負のファイル・ディスクリプタを返す。 失敗し"
6712 "た場合、 B<shm_open>() は -1 を返す。 B<shm_unlink>() は、成功した場合 0 "
6713 "を、エラーが起こった場合 -1 を返す。"
6716 #: build/C/man3/shm_open.3:185
6718 "On failure, I<errno> is set to indicate the cause of the error. Values "
6719 "which may appear in I<errno> include the following:"
6721 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
6725 #: build/C/man3/shm_open.3:190
6726 msgid "Permission to B<shm_unlink>() the shared memory object was denied."
6727 msgstr "共有メモリオブジェクトを B<shm_unlink>() する権限がなかった。"
6730 #: build/C/man3/shm_open.3:200
6732 "Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or "
6733 "B<O_TRUNC> was specified and the caller does not have write permission on "
6736 "指定された I<mode> で I<name> を B<shm_open>() する権限がなかった。もしく"
6737 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
6741 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:192
6747 #: build/C/man3/shm_open.3:211
6749 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the "
6750 "shared memory object specified by I<name> already exists."
6752 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>() に指定されたが、 I<name> で指"
6753 "定された共有メモリ・オブジェクトが既に存在した。"
6756 #: build/C/man3/shm_open.3:218
6757 msgid "The I<name> argument to B<shm_open>() was invalid."
6758 msgstr "B<shm_open>() に与えられた I<name> 引き数が不正であった。"
6761 #: build/C/man3/shm_open.3:218
6767 #: build/C/man3/shm_open.3:221
6768 msgid "The process already has the maximum number of files open."
6769 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
6772 #: build/C/man3/shm_open.3:221
6774 msgid "B<ENAMETOOLONG>"
6775 msgstr "B<ENAMETOOLONG>"
6778 #: build/C/man3/shm_open.3:227
6779 msgid "The length of I<name> exceeds B<PATH_MAX>."
6780 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
6783 #: build/C/man3/shm_open.3:231
6785 "The limit on the total number of files open on the system has been reached."
6786 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
6789 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
6790 #: build/C/man2/shmget.2:206
6796 #: build/C/man3/shm_open.3:240
6798 "An attempt was made to B<shm_open>() a I<name> that did not exist, and "
6799 "B<O_CREAT> was not specified."
6801 "存在していない I<name> のオブジェクトを B<shm_open>() しようとしたが、 "
6802 "B<O_CREAT> が指定されていなかった。"
6805 #: build/C/man3/shm_open.3:247
6807 "An attempt was to made to B<shm_unlink>() a I<name> that does not exist."
6808 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>() しようとした。"
6811 #: build/C/man3/shm_open.3:249
6812 msgid "These functions are provided in glibc 2.2 and later."
6813 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
6816 #: build/C/man3/shm_open.3:255
6818 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
6819 "object is set to either the calling process's effective group ID or \"a "
6820 "system default group ID\"."
6822 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
6823 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
6824 "ID」 のどちらかに設定される、と書かれている。"
6827 #: build/C/man3/shm_open.3:264
6829 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
6830 "unspecified. On Linux, this will successfully truncate an existing shared "
6831 "memory object\\(emthis may not be so on other UNIX systems."
6833 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
6834 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
6835 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
6838 #: build/C/man3/shm_open.3:269
6840 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
6841 "dedicated file system, which is normally mounted under I</dev/shm>."
6843 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
6844 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
6847 #: build/C/man3/shm_open.3:280
6849 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6850 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6852 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6853 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6856 #: build/C/man7/shm_overview.7:27
6858 msgid "SHM_OVERVIEW"
6859 msgstr "SHM_OVERVIEW"
6862 #: build/C/man7/shm_overview.7:30
6863 msgid "shm_overview - Overview of POSIX shared memory"
6864 msgstr "shm_overview - POSIX 共有メモリの概要"
6867 #: build/C/man7/shm_overview.7:33
6869 "The POSIX shared memory API allows processes to communicate information by "
6870 "sharing a region of memory."
6872 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
6876 #: build/C/man7/shm_overview.7:35
6877 msgid "The interfaces employed in the API are:"
6878 msgstr "この API では以下のインターフェースが採用されている。"
6881 #: build/C/man7/shm_overview.7:35
6883 msgid "B<shm_open>(3)"
6884 msgstr "B<shm_open>(3)"
6887 #: build/C/man7/shm_overview.7:42
6889 "Create and open a new object, or open an existing object. This is analogous "
6890 "to B<open>(2). The call returns a file descriptor for use by the other "
6891 "interfaces listed below."
6893 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
6894 "する。これは B<open>(2) と同じである。下記にある他のインターフェースで使用す"
6898 #: build/C/man7/shm_overview.7:42
6900 msgid "B<ftruncate>(2)"
6901 msgstr "B<ftruncate>(2)"
6904 #: build/C/man7/shm_overview.7:46
6906 "Set the size of the shared memory object. (A newly created shared memory "
6907 "object has a length of zero.)"
6908 msgstr "共有メモリオブジェクトの大きさを設定する。"
6911 #: build/C/man7/shm_overview.7:50
6913 "Map the shared memory object into the virtual address space of the calling "
6916 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
6919 #: build/C/man7/shm_overview.7:50
6921 msgid "B<munmap>(2)"
6922 msgstr "B<munmap>(2)"
6925 #: build/C/man7/shm_overview.7:54
6927 "Unmap the shared memory object from the virtual address space of the calling "
6930 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
6934 #: build/C/man7/shm_overview.7:54
6936 msgid "B<shm_unlink>(3)"
6937 msgstr "B<shm_unlink>(3)"
6940 #: build/C/man7/shm_overview.7:57
6941 msgid "Remove a shared memory object name."
6942 msgstr "共有メモリオブジェクト名を削除する。"
6945 #: build/C/man7/shm_overview.7:57
6948 msgstr "B<close>(2)"
6951 #: build/C/man7/shm_overview.7:62
6953 "Close the file descriptor allocated by B<shm_open>(3) when it is no longer "
6956 "B<shm_open>(3) で割り当てられたファイルディスクリプタが不要になった際に、 そ"
6957 "のファイルディスクリプタをクローズする。"
6960 #: build/C/man7/shm_overview.7:62
6963 msgstr "B<fstat>(2)"
6966 #: build/C/man7/shm_overview.7:76
6968 "Obtain a I<stat> structure that describes the shared memory object. Among "
6969 "the information returned by this call are the object's size (I<st_size>), "
6970 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
6972 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
6973 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
6974 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>) がある。"
6977 #: build/C/man7/shm_overview.7:76
6979 msgid "B<fchown>(2)"
6980 msgstr "B<fchown>(2)"
6983 #: build/C/man7/shm_overview.7:79
6984 msgid "To change the ownership of a shared memory object."
6985 msgstr "共有メモリオブジェクトの所有権を変更する。"
6988 #: build/C/man7/shm_overview.7:79
6990 msgid "B<fchmod>(2)"
6991 msgstr "B<fchmod>(2)"
6994 #: build/C/man7/shm_overview.7:82
6995 msgid "To change the permissions of a shared memory object."
6996 msgstr "共有メモリオブジェクトの許可属性を変更する。"
6999 #: build/C/man7/shm_overview.7:82
7005 #: build/C/man7/shm_overview.7:84
7006 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
7007 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
7010 #: build/C/man7/shm_overview.7:84
7016 #: build/C/man7/shm_overview.7:89
7018 "POSIX shared memory objects have kernel persistence: a shared memory object "
7019 "will exist until the system is shut down, or until all processes have "
7020 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
7022 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
7023 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
7024 "マップし、 B<shm_unlink>(3) で削除されるまで、存在し続ける。"
7027 #: build/C/man7/shm_overview.7:89
7033 #: build/C/man7/shm_overview.7:94
7035 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
7036 "to link against the real-time library, I<librt>."
7038 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
7039 "タイムライブラリ I<librt> とリンクしなければならない。"
7042 #: build/C/man7/shm_overview.7:94
7044 msgid "Accessing shared memory objects via the file system"
7045 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
7048 #: build/C/man7/shm_overview.7:101
7050 "On Linux, shared memory objects are created in a (I<tmpfs>) virtual file "
7051 "system, normally mounted under I</dev/shm>. Since kernel 2.6.19, Linux "
7052 "supports the use of access control lists (ACLs) to control the permissions "
7053 "of objects in the virtual file system."
7055 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
7056 "ファイルシステム (I<tmpfs>) 内に作成される。 カーネル 2.6.19 以降の Linux で"
7057 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
7058 "スト (ACL; access control lists) を使うことができる。"
7061 #: build/C/man7/shm_overview.7:106
7063 "Typically, processes must synchronize their access to a shared memory "
7064 "object, using, for example, POSIX semaphores."
7066 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
7067 "使ってプロセス間で同期をとらなければならない。"
7070 #: build/C/man7/shm_overview.7:114
7072 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
7073 "memory API. POSIX shared memory provides a simpler, and better designed "
7074 "interface; on the other hand POSIX shared memory is somewhat less widely "
7075 "available (especially on older systems) than System V shared memory."
7077 "System V 共有メモリ (B<shmget>(2), B<shmop>(2) など) は古い共有メモリ API で"
7078 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
7079 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
7080 "システムが少ない (特に、古いシステムでは少ない)。"
7083 #: build/C/man7/shm_overview.7:127
7085 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7086 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7087 "B<shm_unlink>(3), B<sem_overview>(7)"
7089 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7090 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7091 "B<shm_unlink>(3), B<sem_overview>(7)"
7094 #: build/C/man2/shmctl.2:43
7100 #: build/C/man2/shmctl.2:43
7106 #: build/C/man2/shmctl.2:46
7107 msgid "shmctl - shared memory control"
7108 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
7111 #: build/C/man2/shmctl.2:49 build/C/man2/shmget.2:42
7112 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
7113 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
7116 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
7117 msgid "B<#include E<lt>sys/shm.hE<gt>>"
7118 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
7121 #: build/C/man2/shmctl.2:53
7123 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7125 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7128 #: build/C/man2/shmctl.2:60
7130 "B<shmctl>() performs the control operation specified by I<cmd> on the "
7131 "shared memory segment whose identifier is given in I<shmid>."
7133 "B<shmctl>() は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
7137 #: build/C/man2/shmctl.2:65
7139 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
7140 "I<E<lt>sys/shm.hE<gt>> as follows:"
7142 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
7143 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
7146 #: build/C/man2/shmctl.2:79
7149 "struct shmid_ds {\n"
7150 " struct ipc_perm shm_perm; /* Ownership and permissions */\n"
7151 " size_t shm_segsz; /* Size of segment (bytes) */\n"
7152 " time_t shm_atime; /* Last attach time */\n"
7153 " time_t shm_dtime; /* Last detach time */\n"
7154 " time_t shm_ctime; /* Last change time */\n"
7155 " pid_t shm_cpid; /* PID of creator */\n"
7156 " pid_t shm_lpid; /* PID of last shmat(2)/shmdt(2) */\n"
7157 " shmatt_t shm_nattch; /* No. of current attaches */\n"
7161 "struct shmid_ds {\n"
7162 " struct ipc_perm shm_perm; /* 所有権と許可 */\n"
7163 " size_t shm_segsz; /* セグメントのサイズ (バイト) */\n"
7164 " time_t shm_atime; /* 最後の付加 (attach) の時刻 */\n"
7165 " time_t shm_dtime; /* 最後の分離 (detach) の時刻 */\n"
7166 " time_t shm_ctime; /* 最後に変更が行われた時刻 */\n"
7167 " pid_t shm_cpid; /* 作成者 (creator) の PID */\n"
7168 " pid_t shm_lpid; /* 最後の shmat(2)/shmdt(2) の PID */\n"
7169 " shmatt_t shm_nattch; /* 現在付加されている数 */\n"
7174 #: build/C/man2/shmctl.2:87
7176 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
7177 "(the highlighted fields are settable using B<IPC_SET>):"
7179 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
7180 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
7183 #: build/C/man2/shmctl.2:100
7186 "struct ipc_perm {\n"
7187 " key_t __key; /* Key supplied to shmget(2) */\n"
7188 " uid_t B<uid>; /* Effective UID of owner */\n"
7189 " gid_t B<gid>; /* Effective GID of owner */\n"
7190 " uid_t cuid; /* Effective UID of creator */\n"
7191 " gid_t cgid; /* Effective GID of creator */\n"
7192 " unsigned short B<mode>; /* B<Permissions> + SHM_DEST and\n"
7193 " SHM_LOCKED flags */\n"
7194 " unsigned short __seq; /* Sequence number */\n"
7197 "struct ipc_perm {\n"
7198 " key_t __key; /* shmget(2) に与えられるキー */\n"
7199 " uid_t B<uid>; /* 所有者の実効 UID */\n"
7200 " gid_t B<gid>; /* 所有者の実効 GID */\n"
7201 " uid_t cuid; /* 作成者の実効 UID */\n"
7202 " gid_t cgid; /* 作成者の実効 GID */\n"
7203 " unsigned short B<mode>; /* B<許可> + SHM_DEST と\n"
7204 " SHM_LOCKED フラグ */\n"
7205 " unsigned short __seq; /* シーケンス番号 */\n"
7209 #: build/C/man2/shmctl.2:106
7210 msgid "Valid values for I<cmd> are:"
7211 msgstr "I<cmd> として有効な値は以下の通り:"
7214 #: build/C/man2/shmctl.2:107
7217 msgstr "B<IPC_STAT>"
7220 #: build/C/man2/shmctl.2:116
7222 "Copy information from the kernel data structure associated with I<shmid> "
7223 "into the I<shmid_ds> structure pointed to by I<buf>. The caller must have "
7224 "read permission on the shared memory segment."
7226 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
7227 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
7228 "読み込み許可を持たなければならない。"
7231 #: build/C/man2/shmctl.2:116
7237 #: build/C/man2/shmctl.2:134
7239 "Write the values of some members of the I<shmid_ds> structure pointed to by "
7240 "I<buf> to the kernel data structure associated with this shared memory "
7241 "segment, updating also its I<shm_ctime> member. The following fields can be "
7242 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
7243 "of) I<shm_perm.mode>. The effective UID of the calling process must match "
7244 "the owner (I<shm_perm.uid>) or creator (I<shm_perm.cuid>) of the shared "
7245 "memory segment, or the caller must be privileged."
7247 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
7248 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
7249 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
7250 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
7251 "セスの実効 UID が所有者 (I<shm_perm.uid>) または作成者 (I<shm_perm.cuid>) "
7252 "と一致するか、呼び出し元が特権を持たなければならない。"
7255 #: build/C/man2/shmctl.2:134
7258 msgstr "B<IPC_RMID>"
7261 #: build/C/man2/shmctl.2:151
7263 "Mark the segment to be destroyed. The segment will only actually be "
7264 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
7265 "member of the associated structure I<shmid_ds> is zero). The caller must be "
7266 "the owner or creator, or be privileged. If a segment has been marked for "
7267 "destruction, then the (nonstandard) B<SHM_DEST> flag of the I<shm_perm."
7268 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
7271 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
7272 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
7273 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
7274 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
7275 "造体において I<shm_perm.mode> フィールドの (標準ではない) B<SHM_DEST> フラグ"
7276 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
7279 #: build/C/man2/shmctl.2:154
7281 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
7282 "its pages that were faulted in will remain in memory or swap."
7284 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
7285 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
7289 #: build/C/man2/shmctl.2:154
7291 msgid "B<IPC_INFO> (Linux-specific)"
7292 msgstr "B<IPC_INFO> (Linux 固有)"
7295 #: build/C/man2/shmctl.2:167
7297 "Returns information about system-wide shared memory limits and parameters in "
7298 "the structure pointed to by I<buf>. This structure is of type I<shminfo> "
7299 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
7300 "B<_GNU_SOURCE> feature test macro is defined:"
7302 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
7303 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
7304 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7305 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7308 #: build/C/man2/shmctl.2:181
7311 "struct shminfo {\n"
7312 " unsigned long shmmax; /* Maximum segment size */\n"
7313 " unsigned long shmmin; /* Minimum segment size;\n"
7315 " unsigned long shmmni; /* Maximum number of segments */\n"
7316 " unsigned long shmseg; /* Maximum number of segments\n"
7317 " that a process can attach;\n"
7318 " unused within kernel */\n"
7319 " unsigned long shmall; /* Maximum number of pages of\n"
7320 " shared memory, system-wide */\n"
7323 "struct shminfo {\n"
7324 " unsigned long shmmax; /* 最大セグメントサイズ */\n"
7325 " unsigned long shmmin; /* 最小セグメントサイズ。\n"
7327 " unsigned long shmmni; /* 最大セグメント数 */\n"
7328 " unsigned long shmseg; /* プロセスが付加できる\n"
7331 " unsigned long shmall; /* 共有メモリの最大ページ数。\n"
7336 #: build/C/man2/shmctl.2:194
7338 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
7339 "files of the same name; see B<proc>(5) for details."
7341 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
7342 "で変更可能である。 詳しくは B<proc>(5) を参照。"
7345 #: build/C/man2/shmctl.2:194
7347 msgid "B<SHM_INFO> (Linux-specific)"
7348 msgstr "B<SHM_INFO> (Linux 固有)"
7351 #: build/C/man2/shmctl.2:205
7353 "Returns a I<shm_info> structure whose fields contain information about "
7354 "system resources consumed by shared memory. This structure is defined in "
7355 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
7357 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
7358 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7359 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7362 #: build/C/man2/shmctl.2:222
7365 "struct shm_info {\n"
7366 " int used_ids; /* # of currently existing\n"
7368 " unsigned long shm_tot; /* Total number of shared\n"
7369 " memory pages */\n"
7370 " unsigned long shm_rss; /* # of resident shared\n"
7371 " memory pages */\n"
7372 " unsigned long shm_swp; /* # of swapped shared\n"
7373 " memory pages */\n"
7374 " unsigned long swap_attempts;\n"
7375 " /* Unused since Linux 2.4 */\n"
7376 " unsigned long swap_successes;\n"
7377 " /* Unused since Linux 2.4 */\n"
7380 "struct shm_info {\n"
7381 " int used_ids; /* 現在存在するセグメント数 */\n"
7382 " unsigned long shm_tot; /* 共有メモリのページ総数 */\n"
7383 " unsigned long shm_rss; /* メモリ上にある (スワップされて\n"
7384 " いない) 共有メモリページ数 */\n"
7385 " unsigned long shm_swp; /* スワップされている共有メモリ\n"
7387 " unsigned long swap_attempts;\n"
7388 " /* Linux 2.4 以降では未使用 */\n"
7389 " unsigned long swap_successes;\n"
7390 " /* Linux 2.4 以降では未使用 */\n"
7394 #: build/C/man2/shmctl.2:224
7396 msgid "B<SHM_STAT> (Linux-specific)"
7397 msgstr "B<SHM_STAT> (Linux 固有)"
7400 #: build/C/man2/shmctl.2:235
7402 "Returns a I<shmid_ds> structure as for B<IPC_STAT>. However, the I<shmid> "
7403 "argument is not a segment identifier, but instead an index into the kernel's "
7404 "internal array that maintains information about all shared memory segments "
7407 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
7408 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
7409 "管理するカーネルの内部配列へのインデックス である。"
7412 #: build/C/man2/shmctl.2:238
7414 "The caller can prevent or allow swapping of a shared memory segment with the "
7415 "following I<cmd> values:"
7417 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
7418 "ワップされることを防止したり、許可したりできる:"
7421 #: build/C/man2/shmctl.2:239
7423 msgid "B<SHM_LOCK> (Linux-specific)"
7424 msgstr "B<SHM_LOCK> (Linux 固有)"
7427 #: build/C/man2/shmctl.2:251
7429 "Prevent swapping of the shared memory segment. The caller must fault in any "
7430 "pages that are required to be present after locking is enabled. If a "
7431 "segment has been locked, then the (nonstandard) B<SHM_LOCKED> flag of the "
7432 "I<shm_perm.mode> field in the associated data structure retrieved by "
7433 "B<IPC_STAT> will be set."
7435 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
7436 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
7437 "らない。 セグメントがロックされると、 関連するデータ構造体において "
7438 "I<shm_perm.mode> フィールドの (標準的ではない) B<SHM_LOCKED> フラグが設定さ"
7439 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
7442 #: build/C/man2/shmctl.2:251
7444 msgid "B<SHM_UNLOCK> (Linux-specific)"
7445 msgstr "B<SHM_UNLOCK> (Linux 固有)"
7448 #: build/C/man2/shmctl.2:254
7449 msgid "Unlock the segment, allowing it to be swapped out."
7450 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
7452 #. There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
7453 #. be applied to a segment, regardless of ownership of the segment.
7454 #. This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
7455 #. in 2.6.10. MTK, May 2005
7457 #: build/C/man2/shmctl.2:272
7459 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
7460 "and B<SHM_UNLOCK>. Since kernel 2.6.10, an unprivileged process can employ "
7461 "these operations if its effective UID matches the owner or creator UID of "
7462 "the segment, and (for B<SHM_LOCK>) the amount of memory to be locked falls "
7463 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
7465 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
7466 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
7467 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
7468 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
7469 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
7470 "上限 (B<setrlimit>(2) 参照) の範囲内に入っていることである。"
7473 #: build/C/man2/shmctl.2:290
7475 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
7476 "highest used entry in the kernel's internal array recording information "
7477 "about all shared memory segments. (This information can be used with "
7478 "repeated B<SHM_STAT> operations to obtain information about all shared "
7479 "memory segments on the system.) A successful B<SHM_STAT> operation returns "
7480 "the identifier of the shared memory segment whose index was given in "
7481 "I<shmid>. Other operations return 0 on success."
7483 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
7484 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
7485 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
7486 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
7487 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
7488 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
7491 #: build/C/man2/shmctl.2:294
7492 msgid "On error, -1 is returned, and I<errno> is set appropriately."
7493 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
7496 #: build/C/man2/shmctl.2:303
7498 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
7499 "read access for I<shmid>, and the calling process does not have the "
7500 "B<CAP_IPC_OWNER> capability."
7502 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
7503 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
7504 "ケーパビリティ (capability) を持っていない。"
7507 #: build/C/man2/shmctl.2:314
7509 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
7510 "pointed to by I<buf> isn't accessible."
7512 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
7516 #: build/C/man2/shmctl.2:314
7522 #: build/C/man2/shmctl.2:317
7523 msgid "I<shmid> points to a removed identifier."
7524 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
7527 #: build/C/man2/shmctl.2:326
7529 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command. Or: "
7530 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
7531 "to an array slot that is currently unused."
7533 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
7534 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
7538 #: build/C/man2/shmctl.2:337
7540 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
7541 "be-locked segment would mean that the total bytes in locked shared memory "
7542 "segments would exceed the limit for the real user ID of the calling "
7543 "process. This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
7544 "(see B<setrlimit>(2))."
7546 "(2.6.9 以降のカーネルにおいて) B<SHM_LOCK> が指定され、 ロックされる予定のセ"
7547 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
7548 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
7549 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2) を参照)。"
7552 #: build/C/man2/shmctl.2:337
7554 msgid "B<EOVERFLOW>"
7555 msgstr "B<EOVERFLOW>"
7558 #: build/C/man2/shmctl.2:342
7560 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
7561 "in the structure pointed to by I<buf>."
7563 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
7567 #: build/C/man2/shmctl.2:354
7569 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
7570 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
7571 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
7572 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
7574 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
7575 "作成者 (I<shm_perm.cuid>) でも所有者 (I<shm_perm.uid>) でもなく、プロセスが"
7576 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
7579 #: build/C/man2/shmctl.2:366
7581 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
7582 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
7583 "capability). (Since Linux 2.6.9, this error can also occur if the "
7584 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
7586 "または (2.6.9 より前のカーネルで) B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
7587 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
7588 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
7589 "が特権を持たない場合にも、このエラーが起こる。)"
7591 #. SVr4 documents an additional error condition EMFILE.
7593 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:232
7594 #: build/C/man2/shmop.2:229
7595 msgid "SVr4, POSIX.1-2001."
7596 msgstr "SVr4, POSIX.1-2001."
7599 #: build/C/man2/shmctl.2:382
7601 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
7602 "B<ipcs>(1) program to provide information on allocated resources. In the "
7603 "future these may modified or moved to a /proc file system interface."
7605 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1) プログラムで割り当"
7606 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
7607 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
7610 #: build/C/man2/shmctl.2:390
7612 "Linux permits a process to attach (B<shmat>(2)) a shared memory segment "
7613 "that has already been marked for deletion using I<shmctl(IPC_RMID)>. This "
7614 "feature is not available on other UNIX implementations; portable "
7615 "applications should avoid relying on it."
7617 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
7618 "メモリ・セグメントを あるプロセスが付加 (attach) (B<shmat>(2)) することを許"
7619 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
7620 "プリケーションではこれに依存しないようにすべきである。"
7623 #: build/C/man2/shmctl.2:403
7625 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
7626 "2.2 and have become I<long> under Linux 2.4. To take advantage of this, a "
7627 "recompilation under glibc-2.1.91 or later should suffice. (The kernel "
7628 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
7630 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
7631 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
7632 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
7633 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
7636 #: build/C/man2/shmctl.2:410
7638 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7641 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7642 "B<shm_overview>(7), B<svipc>(7)"
7645 #: build/C/man2/shmget.2:36
7651 #: build/C/man2/shmget.2:36
7657 #: build/C/man2/shmget.2:39
7658 msgid "shmget - allocates a shared memory segment"
7659 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
7662 #: build/C/man2/shmget.2:46
7663 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7664 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7667 #: build/C/man2/shmget.2:70
7669 "B<shmget>() returns the identifier of the shared memory segment associated "
7670 "with the value of the argument I<key>. A new shared memory segment, with "
7671 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
7672 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
7673 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
7674 "B<IPC_CREAT> is specified in I<shmflg>."
7676 "B<shmget>() は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
7677 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
7678 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
7679 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
7680 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
7684 #: build/C/man2/shmget.2:89
7686 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
7687 "segment already exists for I<key>, then B<shmget>() fails with I<errno> set "
7688 "to B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT "
7689 "| O_EXCL> for B<open>(2).)"
7691 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
7692 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>() は失敗し、 "
7693 "I<errno> に B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | "
7694 "O_EXCL> を指定した場合の動作と同じである)。"
7697 #: build/C/man2/shmget.2:93
7698 msgid "The value I<shmflg> is composed of:"
7699 msgstr "I<shmflg> は以下の内容から構成される:"
7702 #: build/C/man2/shmget.2:93
7704 msgid "B<IPC_CREAT>"
7705 msgstr "B<IPC_CREAT>"
7708 #: build/C/man2/shmget.2:100
7710 "to create a new segment. If this flag is not used, then B<shmget>() will "
7711 "find the segment associated with I<key> and check to see if the user has "
7712 "permission to access the segment."
7714 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>() "
7715 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
7719 #: build/C/man2/shmget.2:100
7722 msgstr "B<IPC_EXCL>"
7725 #: build/C/man2/shmget.2:103
7726 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
7728 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
7732 #: build/C/man2/shmget.2:103
7734 msgid "I<mode_flags>"
7735 msgstr "I<mode_flags>"
7738 #: build/C/man2/shmget.2:113
7740 "(least significant 9 bits) specifying the permissions granted to the owner, "
7741 "group, and world. These bits have the same format, and the same meaning, as "
7742 "the I<mode> argument of B<open>(2). Presently, the execute permissions are "
7743 "not used by the system."
7745 "(下位 9 ビット) 所有者、グループ、他人 (world) への許可を指定する。 これらの"
7746 "ビットは B<open>(2) の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
7747 "ろ、システムは実行 (execute) 許可を参照しない。"
7750 #: build/C/man2/shmget.2:113
7752 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
7753 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
7756 #: build/C/man2/shmget.2:119
7758 "Allocate the segment using \"huge pages.\" See the kernel source file "
7759 "I<Documentation/vm/hugetlbpage.txt> for further information."
7761 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
7762 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
7765 #: build/C/man2/shmget.2:119
7767 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
7768 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
7770 #. As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
7773 #: build/C/man2/shmget.2:138
7775 "This flag serves the same purpose as the B<mmap>(2) B<MAP_NORESERVE> flag. "
7776 "Do not reserve swap space for this segment. When swap space is reserved, "
7777 "one has the guarantee that it is possible to modify the segment. When swap "
7778 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
7779 "memory is available. See also the discussion of the file I</proc/sys/vm/"
7780 "overcommit_memory> in B<proc>(5)."
7782 "このフラグは、 B<mmap>(2) の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
7783 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
7784 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
7785 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
7786 "る可能性がある。 B<proc>(5) にある I</proc/sys/vm/overcommit_memory> ファイ"
7790 #: build/C/man2/shmget.2:146
7792 "When a new shared memory segment is created, its contents are initialized to "
7793 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
7794 "(2)), is initialized as follows:"
7796 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
7797 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
7801 #: build/C/man2/shmget.2:151
7803 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
7806 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
7810 #: build/C/man2/shmget.2:156
7812 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
7813 "the calling process."
7815 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
7819 #: build/C/man2/shmget.2:161
7821 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
7822 "significant 9 bit of I<shmflg>."
7824 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
7827 #: build/C/man2/shmget.2:165
7828 msgid "I<shm_segsz> is set to the value of I<size>."
7829 msgstr "I<shm_segsz> に I<size> の値を設定する。"
7832 #: build/C/man2/shmget.2:172
7833 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
7835 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
7838 #: build/C/man2/shmget.2:175
7839 msgid "I<shm_ctime> is set to the current time."
7840 msgstr "I<shm_ctime> に現在の時刻を設定する。"
7843 #: build/C/man2/shmget.2:178
7845 "If the shared memory segment already exists, the permissions are verified, "
7846 "and a check is made to see if it is marked for destruction."
7848 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
7849 "(destruction) マークがつけられていないかのチェックが行われる。"
7852 #: build/C/man2/shmget.2:182
7854 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
7856 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
7860 #: build/C/man2/shmget.2:186
7861 msgid "On failure, I<errno> is set to one of the following:"
7862 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
7865 #: build/C/man2/shmget.2:192
7867 "The user does not have permission to access the shared memory segment, and "
7868 "does not have the B<CAP_IPC_OWNER> capability."
7870 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
7871 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
7874 #: build/C/man2/shmget.2:196
7875 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
7877 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
7880 #: build/C/man2/shmget.2:202
7882 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
7883 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
7884 "existed, but I<size> is greater than the size of that segment."
7886 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
7887 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
7888 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
7889 "在するセグメントの サイズよりも大きかった。"
7892 #: build/C/man2/shmget.2:211
7894 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
7896 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
7900 #: build/C/man2/shmget.2:214
7901 msgid "No memory could be allocated for segment overhead."
7902 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
7905 #: build/C/man2/shmget.2:222
7907 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
7908 "segment of the requested I<size> would cause the system to exceed the system-"
7909 "wide limit on shared memory (B<SHMALL>)."
7911 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>) に達した、または要"
7912 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
7913 "限 (B<SHMALL>) を超過した。"
7916 #: build/C/man2/shmget.2:229
7918 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
7919 "(did not have the B<CAP_IPC_LOCK> capability)."
7921 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
7922 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
7925 #: build/C/man2/shmget.2:235
7926 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
7927 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
7930 #: build/C/man2/shmget.2:245
7932 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special "
7933 "value is used for I<key>, the system call ignores everything but the least "
7934 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
7937 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
7938 "使用された場合は、 B<shmget>() は I<shmflg> の下位 9 ビットを除いた全てを無"
7939 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
7942 #: build/C/man2/shmget.2:249
7944 "The following limits on shared memory segment resources affect the B<shmget>"
7947 "B<shmget>() コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
7951 #: build/C/man2/shmget.2:249
7957 #: build/C/man2/shmget.2:254
7959 "System wide maximum of shared memory pages (on Linux, this limit can be read "
7960 "and modified via I</proc/sys/kernel/shmall>)."
7962 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
7963 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
7966 #: build/C/man2/shmget.2:254
7972 #: build/C/man2/shmget.2:259
7974 "Maximum size in bytes for a shared memory segment: policy dependent (on "
7975 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
7977 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
7978 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
7981 #: build/C/man2/shmget.2:259
7987 #: build/C/man2/shmget.2:265
7989 "Minimum size in bytes for a shared memory segment: implementation dependent "
7990 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
7992 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
7993 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
7996 #: build/C/man2/shmget.2:265
8001 #. Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
8002 #. that we could create one more segment than SHMMNI -- MTK
8003 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
8005 #: build/C/man2/shmget.2:274
8007 "System wide maximum number of shared memory segments: implementation "
8008 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
8009 "can be read and modified via I</proc/sys/kernel/shmmni>)."
8011 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
8012 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
8016 #: build/C/man2/shmget.2:278
8018 "The implementation has no specific limits for the per-process maximum number "
8019 "of shared memory segments (B<SHMSEG>)."
8021 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>) に関する実装"
8025 #: build/C/man2/shmget.2:284
8027 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>() on a "
8028 "shared memory segment scheduled for deletion."
8030 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
8031 "に対して B<shmget>() が行われると B<EIDRM> を返していた。"
8034 #: build/C/man2/shmget.2:290
8036 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
8037 "more clearly show its function."
8039 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
8040 "より明確にその機能を表しているだろう。"
8043 #: build/C/man2/shmget.2:298
8045 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8046 "B<shm_overview>(7), B<svipc>(7)"
8048 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8049 "B<shm_overview>(7), B<svipc>(7)"
8052 #: build/C/man2/shmop.2:39
8058 #: build/C/man2/shmop.2:39
8064 #: build/C/man2/shmop.2:42
8065 msgid "shmat, shmdt - shared memory operations"
8066 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
8069 #: build/C/man2/shmop.2:46
8072 "B<#include E<lt>sys/types.hE<gt>>\n"
8073 "B<#include E<lt>sys/shm.hE<gt>>\n"
8075 "B<#include E<lt>sys/types.hE<gt>>\n"
8076 "B<#include E<lt>sys/shm.hE<gt>>\n"
8079 #: build/C/man2/shmop.2:48
8081 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8082 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8085 #: build/C/man2/shmop.2:50
8087 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8088 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8091 #: build/C/man2/shmop.2:59
8093 "B<shmat>() attaches the shared memory segment identified by I<shmid> to the "
8094 "address space of the calling process. The attaching address is specified by "
8095 "I<shmaddr> with one of the following criteria:"
8097 "B<shmat>() は I<shmid> で指定された共有メモリ・セグメント (shared memory "
8098 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
8099 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
8102 #: build/C/man2/shmop.2:65
8104 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
8105 "which to attach the segment."
8107 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
8108 "されていない) アドレスを選択する。"
8111 #: build/C/man2/shmop.2:80
8113 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
8114 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
8115 "multiple of B<SHMLBA>. Otherwise I<shmaddr> must be a page-aligned address "
8116 "at which the attach occurs."
8118 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
8119 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
8120 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
8124 #: build/C/man2/shmop.2:90
8126 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
8127 "reading and the process must have read permission for the segment. "
8128 "Otherwise the segment is attached for read and write and the process must "
8129 "have read and write permission for the segment. There is no notion of a "
8130 "write-only shared memory segment."
8132 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
8133 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
8134 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
8135 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
8136 "の共有メモリ・セグメントという概念は存在しない。"
8139 #: build/C/man2/shmop.2:105
8141 "The (Linux-specific) B<SHM_REMAP> flag may be specified in I<shmflg> to "
8142 "indicate that the mapping of the segment should replace any existing mapping "
8143 "in the range starting at I<shmaddr> and continuing for the size of the "
8144 "segment. (Normally an B<EINVAL> error would result if a mapping already "
8145 "exists in this address range.) In this case, I<shmaddr> must not be NULL."
8147 "(Linux 特有の) B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
8148 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
8149 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
8150 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
8151 "場合は、 I<shmaddr> が NULL であってはならない。"
8154 #: build/C/man2/shmop.2:112
8156 "The B<brk>(2) value of the calling process is not altered by the attach. "
8157 "The segment will automatically be detached at process exit. The same "
8158 "segment may be attached as a read and as a read-write one, and more than "
8159 "once, in the process's address space."
8161 "呼び出したプロセスの B<brk>(2) の値は付加によって変化しない。 そのセグメント"
8162 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
8163 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
8167 #: build/C/man2/shmop.2:120
8169 "A successful B<shmat>() call updates the members of the I<shmid_ds> "
8170 "structure (see B<shmctl>(2)) associated with the shared memory segment as "
8173 "成功した B<shmat>() コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
8174 "造体 (B<shmctl>(2) を参照) のメンバーを以下のように更新する:"
8177 #: build/C/man2/shmop.2:123
8178 msgid "I<shm_atime> is set to the current time."
8179 msgstr "I<shm_atime> には現在の時刻を設定する。"
8182 #: build/C/man2/shmop.2:126 build/C/man2/shmop.2:152
8183 msgid "I<shm_lpid> is set to the process-ID of the calling process."
8184 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
8187 #: build/C/man2/shmop.2:129
8188 msgid "I<shm_nattch> is incremented by one."
8189 msgstr "I<shm_nattch> を 1 増加させる。"
8192 #: build/C/man2/shmop.2:140
8194 "B<shmdt>() detaches the shared memory segment located at the address "
8195 "specified by I<shmaddr> from the address space of the calling process. The "
8196 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
8197 "the value returned by the attaching B<shmat>() call."
8199 "B<shmdt>() は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
8200 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
8201 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
8202 "I<shmaddr> は、それを付加した時に B<shmat>() が返した値に等しくなければなら"
8206 #: build/C/man2/shmop.2:146
8208 "On a successful B<shmdt>() call the system updates the members of the "
8209 "I<shmid_ds> structure associated with the shared memory segment as follows:"
8211 "成功した B<shmdt>() コールはその共有メモリ・セグメントに関連する "
8212 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
8215 #: build/C/man2/shmop.2:149
8216 msgid "I<shm_dtime> is set to the current time."
8217 msgstr "I<shm_dtime> には現在の時刻が設定される。"
8220 #: build/C/man2/shmop.2:157
8222 "I<shm_nattch> is decremented by one. If it becomes 0 and the segment is "
8223 "marked for deletion, the segment is deleted."
8225 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
8229 #: build/C/man2/shmop.2:161
8231 "After a B<fork>(2) the child inherits the attached shared memory segments."
8233 "B<fork>(2) した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
8236 #: build/C/man2/shmop.2:165
8238 "After an B<execve>(2) all attached shared memory segments are detached from "
8241 "B<exec>(2) した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
8245 #: build/C/man2/shmop.2:169
8247 "Upon B<_exit>(2) all attached shared memory segments are detached from the "
8250 "B<exit>(2) において、全ての付加された共有メモリ・セグメントはプロセスから分"
8254 #: build/C/man2/shmop.2:177
8256 "On success B<shmat>() returns the address of the attached shared memory "
8257 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
8258 "indicate the cause of the error."
8260 "B<shmat>() は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
8261 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
8265 #: build/C/man2/shmop.2:183
8267 "On success B<shmdt>() returns 0; on error -1 is returned, and I<errno> is "
8268 "set to indicate the cause of the error."
8270 "B<shmdt>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
8274 #: build/C/man2/shmop.2:189
8275 msgid "When B<shmat>() fails, I<errno> is set to one of the following:"
8277 "B<shmat>() が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
8280 #: build/C/man2/shmop.2:195
8282 "The calling process does not have the required permissions for the requested "
8283 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
8285 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
8286 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
8289 #: build/C/man2/shmop.2:209
8291 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
8292 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
8293 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
8295 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
8296 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
8297 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
8298 "れているが、 I<shmaddr> が NULL であった。"
8301 #: build/C/man2/shmop.2:212
8302 msgid "Could not allocate memory for the descriptor or for the page tables."
8304 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
8308 #: build/C/man2/shmop.2:218
8309 msgid "When B<shmdt>() fails, I<errno> is set as follows:"
8310 msgstr "B<shmdt>() が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
8312 #. The following since 2.6.17-rc1:
8314 #: build/C/man2/shmop.2:226
8316 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
8317 "not aligned on a page boundary."
8319 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
8320 "I<shmaddr> がページ境界に合っていない。"
8323 #: build/C/man2/shmop.2:245
8325 "In SVID 3 (or perhaps earlier) the type of the I<shmaddr> argument was "
8326 "changed from I<char *> into I<const void *>, and the returned type of "
8327 "B<shmat>() from I<char *> into I<void *>. (Linux libc4 and libc5 have the "
8328 "I<char *> prototypes; glibc2 has I<void *>.)"
8330 "SVID 3 で (たぶんそれより前だと思うが) I<shmaddr> 引き数の型は I<char *> か"
8331 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
8332 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
8333 "glibc2 のプロトタイプは I<void *> である)。"
8336 #: build/C/man2/shmop.2:257
8338 "Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable "
8339 "way of attaching a shared memory segment. Be aware that the shared memory "
8340 "segment attached in this way may be attached at different addresses in "
8341 "different processes. Therefore, any pointers maintained within the shared "
8342 "memory must be made relative (typically to the starting address of the "
8343 "segment), rather than absolute."
8345 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
8346 "NULL にして B<shmat>() を使用するのがよい。 このような方法で付加される共有メ"
8347 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
8348 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
8349 "(一般的にはセグメントの開始アドレスからの) 相対アドレスで作成するべきであ"
8353 #: build/C/man2/shmop.2:262
8355 "On Linux, it is possible to attach a shared memory segment even if it is "
8356 "already marked to be deleted. However, POSIX.1-2001 does not specify this "
8357 "behavior and many other implementations do not support it."
8359 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
8360 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
8361 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
8364 #: build/C/man2/shmop.2:265
8365 msgid "The following system parameter affects B<shmat>():"
8366 msgstr "以下のシステム・パラメーターは、 B<shmat>() に影響する:"
8368 #. FIXME A good explanation of the rationale for the existence
8369 #. of SHMLBA would be useful here
8371 #: build/C/man2/shmop.2:265
8376 #. FIXME That last sentence isn't true for all Linux
8377 #. architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
8380 #: build/C/man2/shmop.2:278
8382 "Segment low boundary address multiple. Must be page aligned. For the "
8383 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
8385 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
8386 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
8389 #: build/C/man2/shmop.2:282
8391 "The implementation places no intrinsic limit on the per-process maximum "
8392 "number of shared memory segments (B<SHMSEG>)."
8394 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>) に"
8398 #: build/C/man2/shmop.2:290
8400 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8401 "B<shm_overview>(7), B<svipc>(7)"
8403 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8404 "B<shm_overview>(7), B<svipc>(7)"
8407 #: build/C/man2/subpage_prot.2:28
8409 msgid "SUBPAGE_PROT"
8410 msgstr "SUBPAGE_PROT"
8413 #: build/C/man2/subpage_prot.2:28
8419 #: build/C/man2/subpage_prot.2:31
8420 msgid "subpage_prot - define a subpage protection for an address range"
8421 msgstr "subpage_prot - define a subpage protection for an address range"
8424 #: build/C/man2/subpage_prot.2:35
8427 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8428 "B< uint32_t *>I<map>B<);>\n"
8430 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8431 "B< uint32_t *>I<map>B<);>\n"
8434 #: build/C/man2/subpage_prot.2:42
8436 "The PowerPC-specific B<subpage_prot>() system call provides the facility to "
8437 "control the access permissions on individual 4kB subpages on systems "
8438 "configured with a page size of 64kB."
8440 "The PowerPC-specific B<subpage_prot>() system call provides the facility to "
8441 "control the access permissions on individual 4kB subpages on systems "
8442 "configured with a page size of 64kB."
8445 #: build/C/man2/subpage_prot.2:49
8447 "The protection map is applied to the memory pages in the region starting at "
8448 "I<addr> and continuing for I<len> bytes. Both of these arguments must be "
8449 "aligned to a 64-kB boundary."
8451 "The protection map is applied to the memory pages in the region starting at "
8452 "I<addr> and continuing for I<len> bytes. Both of these arguments must be "
8453 "aligned to a 64-kB boundary."
8456 #: build/C/man2/subpage_prot.2:61
8458 "The protection map is specified in the buffer pointed to by I<map>. The map "
8459 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8460 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8461 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8462 "I<len>). Each 2-bit field in the protection map is either 0 to allow any "
8463 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8465 "The protection map is specified in the buffer pointed to by I<map>. The map "
8466 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8467 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8468 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8469 "I<len>). Each 2-bit field in the protection map is either 0 to allow any "
8470 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8473 #: build/C/man2/subpage_prot.2:66
8475 "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes "
8476 "specified below is returned."
8478 "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes "
8479 "specified below is returned."
8482 #: build/C/man2/subpage_prot.2:72
8483 msgid "The buffer referred to by I<map> is not accessible."
8484 msgstr "The buffer referred to by I<map> is not accessible."
8487 #: build/C/man2/subpage_prot.2:82
8489 "The I<addr> or I<len> arguments are incorrect. Both of these arguments must "
8490 "be aligned to a multiple of the system page size, and they must not refer to "
8491 "a region outside of the address space of the process or to a region that "
8492 "consists of huge pages."
8494 "The I<addr> or I<len> arguments are incorrect. Both of these arguments must "
8495 "be aligned to a multiple of the system page size, and they must not refer to "
8496 "a region outside of the address space of the process or to a region that "
8497 "consists of huge pages."
8500 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:166
8501 msgid "Out of memory."
8505 #: build/C/man2/subpage_prot.2:91
8507 "This system call is provided on the PowerPC architecture since Linux "
8508 "2.6.25. The system call is provided only if the kernel is configured with "
8509 "B<CONFIG_PPC_64K_PAGES>. No library support is provided."
8511 "This system call is provided on the PowerPC architecture since Linux "
8512 "2.6.25. The system call is provided only if the kernel is configured with "
8513 "B<CONFIG_PPC_64K_PAGES>. No library support is provided."
8516 #: build/C/man2/subpage_prot.2:98
8518 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8519 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8520 "field won't allow writes to a page that is otherwise write-protected."
8522 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8523 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8524 "field won't allow writes to a page that is otherwise write-protected."
8527 #: build/C/man2/subpage_prot.2:98
8532 #. In the initial implementation, it was the case that:
8533 #. In fact the whole process is switched to use 4k hardware pages when the
8534 #. subpage_prot system call is used, but this could be improved in future
8535 #. to switch only the affected segments.
8536 #. But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
8537 #. the affected segment, not the whole process.
8539 #: build/C/man2/subpage_prot.2:120
8541 "This system call is provided to assist writing emulators that operate using "
8542 "64-kB pages on PowerPC systems. When emulating systems such as x86, which "
8543 "uses a smaller page size, the emulator can no longer use the memory-"
8544 "management unit (MMU) and normal system calls for controlling page "
8545 "protections. (The emulator could emulate the MMU by checking and possibly "
8546 "remapping the address for each memory access in software, but that is "
8547 "slow.) The idea is that the emulator supplies an array of protection masks "
8548 "to apply to a specified range of virtual addresses. These masks are applied "
8549 "at the level where hardware page-table entries (PTEs) are inserted into the "
8550 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
8551 "affected. Implicit in this is that the regions of the address space that "
8552 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
8553 "hardware pages (on machines with hardware 64-kB page support)."
8555 "This system call is provided to assist writing emulators that operate using "
8556 "64-kB pages on PowerPC systems. When emulating systems such as x86, which "
8557 "uses a smaller page size, the emulator can no longer use the memory-"
8558 "management unit (MMU) and normal system calls for controlling page "
8559 "protections. (The emulator could emulate the MMU by checking and possibly "
8560 "remapping the address for each memory access in software, but that is "
8561 "slow.) The idea is that the emulator supplies an array of protection masks "
8562 "to apply to a specified range of virtual addresses. These masks are applied "
8563 "at the level where hardware page-table entries (PTEs) are inserted into the "
8564 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
8565 "affected. Implicit in this is that the regions of the address space that "
8566 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
8567 "hardware pages (on machines with hardware 64-kB page support)."
8570 #: build/C/man2/subpage_prot.2:123
8571 msgid "B<mprotect>(2), B<syscall>(2);"
8572 msgstr "B<mprotect>(2), B<syscall>(2);"
8575 #: build/C/man2/subpage_prot.2:126
8576 msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
8577 msgstr "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
8580 #: build/C/man2/sync_file_range.2:30
8582 msgid "SYNC_FILE_RANGE"
8583 msgstr "SYNC_FILE_RANGE"
8586 #: build/C/man2/sync_file_range.2:33
8587 msgid "sync_file_range - sync a file segment with disk"
8588 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
8591 #: build/C/man2/sync_file_range.2:37
8594 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
8595 "B<#include E<lt>fcntl.hE<gt>>\n"
8597 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
8598 "B<#include E<lt>fcntl.hE<gt>>\n"
8601 #: build/C/man2/sync_file_range.2:40
8604 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8605 "B< unsigned int >I<flags>B<);>\n"
8607 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8608 "B< unsigned int >I<flags>B<);>\n"
8611 #: build/C/man2/sync_file_range.2:47
8613 "B<sync_file_range>() permits fine control when synchronizing the open file "
8614 "referred to by the file descriptor I<fd> with disk."
8616 "B<sync_file_range>() を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
8617 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
8620 #: build/C/man2/sync_file_range.2:61
8622 "I<offset> is the starting byte of the file range to be synchronized. "
8623 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
8624 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
8625 "are synchronized. Synchronization is in units of the system page size: "
8626 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
8627 "rounded up to a page boundary."
8629 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
8630 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
8631 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
8632 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
8633 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
8636 #: build/C/man2/sync_file_range.2:65
8637 msgid "The I<flags> bit-mask argument can include any of the following values:"
8638 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
8641 #: build/C/man2/sync_file_range.2:65
8643 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8644 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8647 #: build/C/man2/sync_file_range.2:70
8649 "Wait upon write-out of all pages in the specified range that have already "
8650 "been submitted to the device driver for write-out before performing any "
8653 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
8654 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
8658 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
8660 msgid "B<SYNC_FILE_RANGE_WRITE>"
8661 msgstr "B<SYNC_FILE_RANGE_WRITE>"
8664 #: build/C/man2/sync_file_range.2:76
8666 "Initiate write-out of all dirty pages in the specified range which are not "
8667 "presently submitted write-out. Note that even this may block if you attempt "
8668 "to write more than request queue size."
8670 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
8671 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
8672 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
8676 #: build/C/man2/sync_file_range.2:76
8678 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8679 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8682 #: build/C/man2/sync_file_range.2:80
8684 "Wait upon write-out of all pages in the range after performing any write."
8686 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
8690 #: build/C/man2/sync_file_range.2:84
8691 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
8692 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
8695 #: build/C/man2/sync_file_range.2:84
8701 #: build/C/man2/sync_file_range.2:100
8703 "This system call is extremely dangerous and should not be used in portable "
8704 "programs. None of these operations writes out the file's metadata. "
8705 "Therefore, unless the application is strictly performing overwrites of "
8706 "already-instantiated disk blocks, there are no guarantees that the data will "
8707 "be available after a crash. There is no user interface to know if a write "
8708 "is purely an overwrite. On file systems using copy-on-write semantics (e."
8709 "g., I<btrfs>) an overwrite of existing allocated blocks is impossible. "
8710 "When writing into preallocated space, many file systems also require calls "
8711 "into the block allocator, which this system call does not sync out to disk. "
8712 "This system call does not flush disk write caches and thus does not provide "
8713 "any data integrity on systems with volatile disk write caches."
8715 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
8716 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
8717 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
8718 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
8719 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
8720 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
8721 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
8722 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
8723 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
8724 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
8725 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
8726 "コールではデータの一貫性を確保できないことになる。"
8729 #: build/C/man2/sync_file_range.2:100
8731 msgid "Some details"
8735 #: build/C/man2/sync_file_range.2:108
8737 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
8738 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
8740 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
8741 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
8744 #: build/C/man2/sync_file_range.2:112
8745 msgid "Useful combinations of the I<flags> bits are:"
8746 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
8749 #: build/C/man2/sync_file_range.2:112
8751 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8752 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8755 #: build/C/man2/sync_file_range.2:120
8757 "Ensures that all pages in the specified range which were dirty when "
8758 "B<sync_file_range>() was called are placed under write-out. This is a "
8759 "start-write-for-data-integrity operation."
8761 "指定された範囲内のページで、 B<sync_file_range>() が呼び出された際に dirty "
8762 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
8763 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
8767 #: build/C/man2/sync_file_range.2:127
8769 "Start write-out of all dirty pages in the specified range which are not "
8770 "presently under write-out. This is an asynchronous flush-to-disk "
8771 "operation. This is not suitable for data integrity operations."
8773 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
8774 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk) 操作であ"
8775 "る。データ完全性確保が必要な操作としては適切ではない。"
8778 #: build/C/man2/sync_file_range.2:127
8780 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8781 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8784 #: build/C/man2/sync_file_range.2:134
8786 "Wait for completion of write-out of all pages in the specified range. This "
8787 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
8788 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
8789 "and obtain its result."
8791 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
8792 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
8793 "き、この操作の完了を待ち、結果を取得することができる。"
8796 #: build/C/man2/sync_file_range.2:134
8798 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8799 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8802 #: build/C/man2/sync_file_range.2:141
8804 "This is a write-for-data-integrity operation that will ensure that all pages "
8805 "in the specified range which were dirty when B<sync_file_range>() was "
8806 "called are committed to disk."
8808 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
8809 "り、指定された範囲内の、 B<sync_file_range>() が呼ばれた時点で dirty な全て"
8810 "のページが ディスクに格納されることが保証される。"
8813 #: build/C/man2/sync_file_range.2:147
8815 "On success, B<sync_file_range>() returns 0; on failure -1 is returned and "
8816 "I<errno> is set to indicate the error."
8818 "成功の場合、 B<sync_file_range>() は 0 を返す。失敗の場合、-1 を返し、 "
8819 "I<error> にエラーを示す値を設定する。"
8822 #: build/C/man2/sync_file_range.2:152
8823 msgid "I<fd> is not a valid file descriptor."
8824 msgstr "I<fd> が有効なファイルディスクリプタではない。"
8827 #: build/C/man2/sync_file_range.2:160
8829 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
8831 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
8835 #: build/C/man2/sync_file_range.2:163
8840 #: build/C/man2/sync_file_range.2:169
8841 msgid "Out of disk space."
8842 msgstr "ディスク領域不足である。"
8844 #. FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
8845 #. (In userspace at least) it isn't possible to obtain a file descriptor
8846 #. for a symbolic link.
8848 #: build/C/man2/sync_file_range.2:177
8850 "I<fd> refers to something other than a regular file, a block device, a "
8851 "directory, or a symbolic link."
8853 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
8857 #: build/C/man2/sync_file_range.2:180
8858 msgid "B<sync_file_range>() appeared on Linux in kernel 2.6.17."
8859 msgstr "B<sync_file_range>() はカーネル 2.6.17 で Linux に登場した。"
8862 #: build/C/man2/sync_file_range.2:183
8864 "This system call is Linux-specific, and should be avoided in portable "
8867 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
8870 #. See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
8872 #: build/C/man2/sync_file_range.2:196
8874 "Some architectures (e.g., PowerPC, ARM) need 64-bit arguments to be aligned "
8875 "in a suitable pair of registers. On such architectures, the call signature "
8876 "of B<sync_file_range>() is flawed, since it forces a register to be wasted "
8877 "as padding between the I<fd> and I<offset> arguments. Therefore, these "
8878 "architectures define a different system call that orders the arguments "
8883 #: build/C/man2/sync_file_range.2:201
8886 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8887 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8889 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8890 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8893 #: build/C/man2/sync_file_range.2:206
8895 "The behavior of this system call is otherwise exactly the same as "
8896 "B<sync_file_range>()."
8900 #: build/C/man2/sync_file_range.2:217
8902 "A system call with this signature first appeared on the ARM architecture in "
8903 "Linux 2.6.20, with the name B<arm_sync_file_range>(). It was renamed in "
8904 "Linux 2.6.22, when the analogous system call was added for PowerPC. On "
8905 "architectures where glibc support is provided, glibc transparently wraps "
8906 "B<sync_file_range2>() under the name B<sync_file_range>()."
8910 #: build/C/man2/sync_file_range.2:222
8911 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8912 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8915 #: build/C/man3/malloc_get_state.3:23
8917 msgid "MALLOC_GET_STATE"
8918 msgstr "MALLOC_GET_STATE"
8921 #: build/C/man3/malloc_get_state.3:23
8927 #: build/C/man3/malloc_get_state.3:26
8929 "get_malloc_state, set_malloc_state - record and restore state of malloc "
8934 #: build/C/man3/malloc_get_state.3:31
8936 msgid "B<void* malloc_get_state(void);>\n"
8937 msgstr "B<void* malloc_get_state(void);>\n"
8940 #: build/C/man3/malloc_get_state.3:33
8942 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
8943 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
8946 #: build/C/man3/malloc_get_state.3:51
8948 "The B<malloc_get_state>() function records the current state of all "
8949 "B<malloc>(3) internal bookkeeping variables (but not the actual contents of "
8950 "the heap or the state of B<malloc_hook>(3) functions pointers). The state "
8951 "is recorded in a system-dependent opaque data structure dynamically "
8952 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
8953 "as the function result. (It is the caller's responsibility to B<free>(3) "
8958 #: build/C/man3/malloc_get_state.3:59
8960 "The B<malloc_set_state>() function restores the state of all B<malloc>(3) "
8961 "internal bookkeeping variables to the values recorded in the opaque data "
8962 "structure pointed to by I<state>."
8966 #: build/C/man3/malloc_get_state.3:66
8968 "On success, B<malloc_get_state>() returns a pointer to a newly allocated "
8969 "opaque data structure. On error (for example, memory could not be allocated "
8970 "for the data structure), B<malloc_get_state>() returns NULL."
8973 #. if(ms->magic != MALLOC_STATE_MAGIC) return -1;
8974 #. /* Must fail if the major version is too high. */
8975 #. if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
8977 #: build/C/man3/malloc_get_state.3:84
8979 "On success, B<malloc_set_state>() returns 0. If the implementation detects "
8980 "that I<state> does not point to a correctly formed data structure, "
8981 "B<malloc_set_state>() returns -1. If the implementation detects that the "
8982 "version of the data structure referred to by I<state> is a more recent "
8983 "version than this implementation knows about, B<malloc_set_state>() returns "
8988 #: build/C/man3/malloc_get_state.3:92
8990 "These functions are especially useful when using this B<malloc>(3) "
8991 "implementation as part of a shared library, and the heap contents are saved/"
8992 "restored via some other method. This technique is used by the GNU Emacs to "
8993 "implement its \"dumping\" function."
8996 #. i.e., calls __malloc_check_init()
8997 #. i.e., malloc checking is not already in use
8998 #. and the caller requested malloc checking
9000 #: build/C/man3/malloc_get_state.3:109
9002 "Hook function pointers are never saved or restored by these functions, with "
9003 "two exceptions: if malloc checking (see B<mallopt>(3)) was in use when "
9004 "B<malloc_get_state>() was called, then B<malloc_set_state>() resets malloc "
9005 "checking hooks if possible; if malloc checking was not in use in the "
9006 "recorded state, but the caller has requested malloc checking, then the hooks "
9011 #: build/C/man3/malloc_get_state.3:112
9012 msgid "B<malloc>(3), B<mallopt>(3)"
9013 msgstr "B<malloc>(3), B<mallopt>(3)"
9016 #: build/C/man3/malloc_trim.3:24
9019 msgstr "MALLOC_TRIM"
9022 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
9028 #: build/C/man3/malloc_trim.3:27
9029 msgid "malloc_trim - release free memory from the top of the heap"
9033 #: build/C/man3/malloc_trim.3:31
9034 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
9035 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
9038 #: build/C/man3/malloc_trim.3:38
9040 "The B<malloc_trim>() function attempts to release free memory at the top of "
9041 "the heap (by calling B<sbrk>(2) with a suitable argument)."
9045 #: build/C/man3/malloc_trim.3:49
9047 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
9048 "the top of the heap. If this argument is 0, only the minimum amount of "
9049 "memory is maintained at the top of the heap (i.e., one page or less). A "
9050 "nonzero argument can be used to maintain some trailing space at the top of "
9051 "the heap in order to allow future allocations to be made without having to "
9052 "extend the heap with B<sbrk>(2)."
9056 #: build/C/man3/malloc_trim.3:54
9058 "The B<malloc_trim>() function returns 1 if memory was actually released "
9059 "back to the system, or 0 if it was not possible to release any memory."
9063 #. Available already in glibc 2.0, possibly earlier
9065 #: build/C/man3/malloc_trim.3:58
9066 msgid "No errors are defined."
9070 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
9071 msgid "This function is a GNU extension."
9072 msgstr "この関数は GNU による拡張である。"
9075 #: build/C/man3/malloc_trim.3:69
9077 "This function is automatically called by B<free>(3) in certain "
9078 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
9083 #: build/C/man3/malloc_trim.3:72
9085 "This function cannot release free memory located at places other than the "
9089 #. malloc/malloc.c::mTRIm():
9090 #. return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
9092 #: build/C/man3/malloc_trim.3:76
9093 msgid "This function only releases memory in the main arena."
9097 #: build/C/man3/malloc_trim.3:80
9098 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9099 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9102 #: build/C/man3/malloc_usable_size.3:23
9104 msgid "MALLOC_USABLE_SIZE"
9105 msgstr "MALLOC_USABLE_SIZE"
9108 #: build/C/man3/malloc_usable_size.3:26
9109 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
9113 #: build/C/man3/malloc_usable_size.3:30
9114 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9115 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9118 #: build/C/man3/malloc_usable_size.3:38
9120 "The B<malloc_usable_size>() function returns the number of usable bytes in "
9121 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
9122 "B<malloc>(3) or a related function."
9126 #: build/C/man3/malloc_usable_size.3:46
9128 "B<malloc_usable_size>() returns the number of usable bytes in the block of "
9129 "allocated memory pointed to by I<ptr>. If I<ptr> is NULL, 0 is returned."
9133 #: build/C/man3/malloc_usable_size.3:58
9135 "The value returned by B<malloc_usable_size>() may be greater than the "
9136 "requested size of the allocation because of alignment and minimum size "
9137 "constraints. Although the excess bytes can be overwritten by the "
9138 "application without ill effects, this is not good programming practice: the "
9139 "number of excess bytes in an allocation depends on the underlying "
9144 #: build/C/man3/malloc_usable_size.3:60
9145 msgid "The main use of this function is for debugging and introspection."
9149 #: build/C/man3/malloc_usable_size.3:62
9150 msgid "B<malloc>(3)"
9151 msgstr "B<malloc>(3)"
9154 #: build/C/man3/mcheck.3:23
9160 #: build/C/man3/mcheck.3:26
9162 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
9166 #: build/C/man3/mcheck.3:29
9168 #| msgid "B<#include E<lt>mcheck.hE<gt>>"
9169 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
9170 msgstr "B<#include E<lt>mcheck.hE<gt>>"
9173 #: build/C/man3/mcheck.3:31
9175 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
9179 #: build/C/man3/mcheck.3:33
9181 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
9185 #: build/C/man3/mcheck.3:35
9187 #| msgid "B<void mtrace(void);>"
9188 msgid "B<void mcheck_check_all(void);>\n"
9189 msgstr "B<void mtrace(void);>"
9192 #: build/C/man3/mcheck.3:37
9194 #| msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
9195 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
9196 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
9199 #: build/C/man3/mcheck.3:50
9201 "The B<mcheck>() function installs a set of debugging hooks for the B<malloc>"
9202 "(3) family of memory-allocation functions. These hooks cause certain "
9203 "consistency checks to be performed on the state of the heap. The checks can "
9204 "detect application errors such as freeing a block of memory more than once "
9205 "or corrupting the bookkeeping data structures that immediately precede a "
9206 "block of allocated memory."
9210 #: build/C/man3/mcheck.3:62
9212 "To be effective, the B<mcheck>() function must be called before the first "
9213 "call to B<malloc>(3) or a related function. In cases where this is "
9214 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
9215 "call to B<mcheck>() (with a NULL argument) before the first call to a "
9216 "memory-allocation function."
9220 #: build/C/man3/mcheck.3:70
9222 "The B<mcheck_pedantic>() function is similar to B<mcheck>(), but performs "
9223 "checks on all allocated blocks whenever one of the memory-allocation "
9224 "functions is called. This can be very slow!"
9228 #: build/C/man3/mcheck.3:77
9230 "The B<mcheck_check_all>() function causes an immediate check on all "
9231 "allocated blocks. This call is only effective if B<mcheck>() is called "
9236 #: build/C/man3/mcheck.3:90
9238 "If the system detects an inconsistency in the heap, the caller-supplied "
9239 "function pointed to by I<abortfunc> is invoked with a single argument "
9240 "argument, I<mstatus>, that indicates what type of inconsistency was "
9241 "detected. If I<abortfunc> is NULL, a default function prints an error "
9242 "message on I<stderr> and calls B<abort>(3)."
9246 #: build/C/man3/mcheck.3:102
9248 "The B<mprobe>() function performs a consistency check on the block of "
9249 "allocated memory pointed to by I<ptr>. The B<mcheck>() function should be "
9250 "called beforehand (otherwise B<mprobe>() returns B<MCHECK_DISABLED>)."
9254 #: build/C/man3/mcheck.3:110
9256 "The following list describes the values returned by B<mprobe>() or passed "
9257 "as the I<mstatus> argument when I<abortfunc> is invoked:"
9261 #: build/C/man3/mcheck.3:110
9263 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
9267 #: build/C/man3/mcheck.3:115
9269 "B<mcheck>() was not called before the first memory allocation function was "
9270 "called. Consistency checking is not possible."
9274 #: build/C/man3/mcheck.3:115
9276 msgid "B<MCHECK_OK> (B<mprobe>() only)"
9280 #: build/C/man3/mcheck.3:118
9281 msgid "No inconsistency detected."
9285 #: build/C/man3/mcheck.3:118
9287 #| msgid "B<M_CHECK_ACTION>"
9288 msgid "B<MCHECK_HEAD>"
9289 msgstr "B<M_CHECK_ACTION>"
9292 #: build/C/man3/mcheck.3:121
9294 #| msgid "No memory could be allocated for segment overhead."
9295 msgid "Memory preceding an allocated block was clobbered."
9296 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9299 #: build/C/man3/mcheck.3:121
9301 #| msgid "B<M_CHECK_ACTION>"
9302 msgid "B<MCHECK_TAIL>"
9303 msgstr "B<M_CHECK_ACTION>"
9306 #: build/C/man3/mcheck.3:124
9308 #| msgid "No memory could be allocated for segment overhead."
9309 msgid "Memory following an allocated block was clobbered."
9310 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9313 #: build/C/man3/mcheck.3:124
9315 #| msgid "B<MALLOC_CHECK_>"
9316 msgid "B<MCHECK_FREE>"
9317 msgstr "B<MALLOC_CHECK_>"
9320 #: build/C/man3/mcheck.3:128
9321 msgid "A block of memory was freed twice."
9325 #: build/C/man3/mcheck.3:133
9327 "B<mcheck>() and B<mcheck_pedantic>() return 0 on success, or -1 on error."
9331 #: build/C/man3/mcheck.3:144
9333 "The B<mcheck_pedantic>() and B<mcheck_check_all>() functions are available "
9334 "since glibc 2.2. The B<mcheck()> and B<mprobe()> functions are present "
9335 "since at least glibc 2.0"
9338 #. But is MALLOC_CHECK_ slower?
9340 #: build/C/man3/mcheck.3:158
9342 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
9343 "environment variable (described in B<mallopt>(3)) cause the same kinds of "
9344 "errors to be detected. But, using B<MALLOC_CHECK_> does not require the "
9345 "application to be relinked."
9349 #: build/C/man3/mcheck.3:165
9351 "The program below calls B<mcheck>() with a NULL argument and then frees the "
9352 "same block of memory twice. The following shell session demonstrates what "
9353 "happens when running the program:"
9357 #: build/C/man3/mcheck.3:170
9365 #: build/C/man3/mcheck.3:174
9368 "About to free a second time\n"
9369 "block freed twice\n"
9370 "Aborted (core dumped)\n"
9374 #: build/C/man3/mcheck.3:182
9377 #| "#include E<lt>malloc.hE<gt>\n"
9378 #| "#include E<lt>stdio.hE<gt>\n"
9379 #| "#include E<lt>stdlib.hE<gt>\n"
9381 "#include E<lt>stdlib.hE<gt>\n"
9382 "#include E<lt>stdio.hE<gt>\n"
9383 "#include E<lt>mcheck.hE<gt>\n"
9385 "#include E<lt>malloc.hE<gt>\n"
9386 "#include E<lt>stdio.hE<gt>\n"
9387 "#include E<lt>stdlib.hE<gt>\n"
9390 #: build/C/man3/mcheck.3:190
9393 " if (mcheck(NULL) != 0) {\n"
9394 " fprintf(stderr, \"mcheck() failed\\en\");\n"
9398 #: build/C/man3/mcheck.3:193
9401 #| " exit(EXIT_SUCCESS);\n"
9404 " exit(EXIT_FAILURE);\n"
9407 " exit(EXIT_SUCCESS);\n"
9411 #: build/C/man3/mcheck.3:195
9413 #| msgid " mtrace();\n"
9414 msgid " p = malloc(1000);\n"
9415 msgstr " mtrace();\n"
9418 #: build/C/man3/mcheck.3:200
9421 " fprintf(stderr, \"About to free\\en\");\n"
9423 " fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
9427 #. FIXME add SEE ALSO pointer from malloc(3) to here
9428 #. FIXME add SEE ALSO pointer from mallopt(3) to here
9429 #. FIXME add SEE ALSO pointer from mtrace(3) to here
9431 #: build/C/man3/mcheck.3:211
9433 #| msgid "B<malloc>(3), B<mallopt>(3)"
9434 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
9435 msgstr "B<malloc>(3), B<mallopt>(3)"
9437 #~ msgid "2012-02-27"
9438 #~ msgstr "2012-02-27"
9441 #~ "The I<mode> is not supported by the file system containing the file "
9442 #~ "referred to by I<fd>."
9444 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
9447 #~ msgid "2012-03-22"
9448 #~ msgstr "2012-03-22"
9451 #~ "The function B<mtrace>() installs handlers for B<malloc>(3), B<realloc>"
9452 #~ "(3) and B<free>(3). The function B<muntrace>() disables these handlers."
9454 #~ "関数 B<mtrace>() は、 B<malloc>(3), B<realloc>(3), B<free>(3) のハンドラ"
9455 #~ "を組み込む。 関数 B<muntrace>() はこれらのハンドラを解除する。"
9458 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
9459 #~ "() writes its output. This file must be writable to the user or "
9460 #~ "B<mtrace>() will do nothing. If the file is not empty it will be "
9463 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>() が出力を書き出すファイルを指定す"
9464 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
9465 #~ "権限がない場合、 B<mtrace>() は何もしない。 ファイルが空でない場合、ファ"
9468 #~ msgid "These are GNU extensions."
9469 #~ msgstr "この関数は GNU 拡張である。"
9472 #~ "The output of B<mtrace>() will be ASCII but not in a friendly format. "
9473 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
9475 #~ "B<mtrace>() の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
9476 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
9480 #~ "This flag allocates and initializes to zero the disk space within the "
9481 #~ "range specified by I<offset> and I<len>. After a successful call, "
9482 #~ "subsequent writes into this range are guaranteed not to fail because of "
9483 #~ "lack of disk space. Preallocating zeroed blocks beyond the end of the "
9484 #~ "file is useful for optimizing append workloads. Preallocating blocks "
9485 #~ "does not change the file size (as reported by B<stat>(2)) even if it is "
9486 #~ "less than I<offset>+I<len>."
9488 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
9489 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
9490 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
9491 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
9492 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
9493 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
9494 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2) が返す) ファイルサイズ"
9498 #~| msgid "The buffer referred to by I<map> is not accessible."
9500 #~ "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
9501 #~ msgstr "The buffer referred to by I<map> is not accessible."
9504 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>) "
9505 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
9507 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>) を持たず、ソフト資"
9508 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
9511 #~ "(Linux 2.6.8 and earlier) The calling process has insufficient privilege "
9512 #~ "to call B<munlockall>(). Under Linux the B<CAP_IPC_LOCK> capability is "
9515 #~ "(Linux 2.6.8 以前) 呼び出し元プロセスが B<munlockall>() を呼び出すのに必"
9516 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
9520 #~ "B<#define _XOPEN_SOURCE 600>\n"
9521 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9523 #~ "B<#define _XOPEN_SOURCE 600>\n"
9524 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9527 #~ "B<posix_fadvise>() appeared in kernel 2.5.60. Glibc support has been "
9528 #~ "provided since version 2.2."
9530 #~ "B<posix_fadvise>() はカーネル 2.5.60 で登場した。 glibc でのサポートは "
9531 #~ "glibc バージョン 2.2 以降で行われている。"
9534 #~ "B<#define _GNU_SOURCE>\n"
9535 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9537 #~ "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
9538 #~ "B<#include E<lt>fcntl.hE<gt>>\n"