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: 2015-02-04 23:30+0900\n"
10 "PO-Revision-Date: 2015-02-05 00:03+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:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:39 build/C/man2/mremap.2:30 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
40 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
41 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
42 #: build/C/man2/memfd_create.2:21
48 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
49 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
50 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
51 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
52 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
53 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
54 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
55 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:39
56 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
57 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
58 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
59 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
60 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
61 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
62 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
63 #: build/C/man2/memfd_create.2:21 build/C/man2/s390_pci_mmio_write.2:25
65 msgid "Linux Programmer's Manual"
66 msgstr "Linux Programmer's Manual"
69 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
70 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
71 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
72 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
73 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
74 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
75 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
76 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:40
77 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
78 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
79 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
80 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
81 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
82 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
83 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
84 #: build/C/man2/memfd_create.2:22 build/C/man2/s390_pci_mmio_write.2:26
90 #: build/C/man2/alloc_hugepages.2:28
91 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
93 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
96 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
97 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
98 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
99 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
100 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
101 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
102 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
103 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:42
104 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
105 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
106 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
107 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
108 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
109 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
110 #: build/C/man2/memfd_create.2:24 build/C/man2/s390_pci_mmio_write.2:29
115 #. asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
116 #. unsigned long len, int prot, int flag);
118 #: build/C/man2/alloc_hugepages.2:34
121 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
122 "B< int >I<prot>B<, int >I<flag>B<);>\n"
124 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
125 "B< int >I<prot>B<, int >I<flag>B<);>\n"
127 #. asmlinkage int sys_free_hugepages(unsigned long addr);
129 #: build/C/man2/alloc_hugepages.2:37
131 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
132 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
135 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
136 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
137 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
138 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
139 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
140 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
141 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
142 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:48
143 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
144 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
145 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
146 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
147 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
148 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
149 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
150 #: build/C/man2/memfd_create.2:28 build/C/man2/s390_pci_mmio_write.2:39
156 #: build/C/man2/alloc_hugepages.2:49
158 "The system calls B<alloc_hugepages>() and B<free_hugepages>() were "
159 "introduced in Linux 2.5.36 and removed again in 2.5.54. They existed only "
160 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>). In Linux 2.4.20, "
161 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
163 "システムコール B<alloc_hugepages>() と B<free_hugepages>() は Linux 2.5.36 "
164 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
165 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
166 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
170 #: build/C/man2/alloc_hugepages.2:57
172 "On i386 the memory management hardware knows about ordinary pages (4 KiB) "
173 "and huge pages (2 or 4 MiB). Similarly ia64 knows about huge pages of "
174 "several sizes. These system calls serve to map huge pages into the "
175 "process's memory or to free them again. Huge pages are locked into memory, "
176 "and are not swapped."
178 "i386 では、メモリー管理ハードウェアは通常のページ (4 KiB) と 大きなサイズの"
179 "ページ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様"
180 "に、ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシス"
181 "テムコールは、ヒュージページをプロセスのメモリーにマップしたり、 再び解放した"
182 "りする。 ヒュージページはメモリー内にロックされ、スワップされない。"
185 #: build/C/man2/alloc_hugepages.2:66
187 "The I<key> argument is an identifier. When zero the pages are private, and "
188 "not inherited by children. When positive the pages are shared with other "
189 "applications using the same I<key>, and inherited by child processes."
191 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
192 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
196 #: build/C/man2/alloc_hugepages.2:81
198 "The I<addr> argument of B<free_hugepages>() tells which page is being "
199 "freed: it was the return value of a call to B<alloc_hugepages>(). (The "
200 "memory is first actually freed when all users have released it.) The "
201 "I<addr> argument of B<alloc_hugepages>() is a hint, that the kernel may or "
202 "may not follow. Addresses must be properly aligned."
204 "B<free_hugepages>() の I<addr> 引き数は、どのページを解放するかを指定する: "
205 "I<addr> は B<alloc_hugepages>() の呼び出しの返り値である (全てのユーザーがメ"
206 "モリーを解放したときに、 そのメモリーは初めて実際に解放される)。 "
207 "B<alloc_hugepages>() の I<addr> 引き数はヒントであり、カーネルはそれに従うか"
208 "もしれないし、 従わないかもしれない。 アドレスは正しく配置されなければならな"
212 #: build/C/man2/alloc_hugepages.2:86
214 "The I<len> argument is the length of the required segment. It must be a "
215 "multiple of the huge page size."
217 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
221 #: build/C/man2/alloc_hugepages.2:94
223 "The I<prot> argument specifies the memory protection of the segment. It is "
224 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
226 "I<prot> 引き数はセグメントのメモリー保護を指定する。 これは B<PROT_READ>, "
227 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
230 #: build/C/man2/alloc_hugepages.2:109
232 "The I<flag> argument is ignored, unless I<key> is positive. In that case, "
233 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
234 "none with the given key existed. If this flag is not set, then B<ENOENT> is "
235 "returned when no segment with the given key exists."
237 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
238 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
239 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
240 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
244 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
245 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:228
246 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
247 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
248 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
249 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
250 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:77
251 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
252 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
253 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
254 #: build/C/man2/remap_file_pages.2:132 build/C/man3/shm_open.3:171
255 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:183
256 #: build/C/man2/shmop.2:168 build/C/man2/subpage_prot.2:66
257 #: build/C/man2/sync_file_range.2:141 build/C/man2/memfd_create.2:126
258 #: build/C/man2/s390_pci_mmio_write.2:68
264 #: build/C/man2/alloc_hugepages.2:118
266 "On success, B<alloc_hugepages>() returns the allocated virtual address, and "
267 "B<free_hugepages>() returns zero. On error, -1 is returned, and I<errno> "
268 "is set appropriately."
270 "成功した場合、 B<alloc_hugepages>() は割り当てられた仮想アドレスを返し、 "
271 "B<free_hugepages>() は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
275 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
276 #: build/C/man2/fallocate.2:235 build/C/man2/madvise.2:275
277 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
278 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
279 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:84
280 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
281 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
282 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
283 #: build/C/man2/remap_file_pages.2:139 build/C/man3/shm_open.3:180
284 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:188
285 #: build/C/man2/shmop.2:182 build/C/man2/subpage_prot.2:71
286 #: build/C/man2/sync_file_range.2:147 build/C/man2/memfd_create.2:133
287 #: build/C/man2/s390_pci_mmio_write.2:77
293 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:319
299 #: build/C/man2/alloc_hugepages.2:122
300 msgid "The system call is not supported on this kernel."
301 msgstr "このシステムコールはカーネルでサポートされていない。"
304 #: build/C/man2/alloc_hugepages.2:122
310 #: build/C/man2/alloc_hugepages.2:126
312 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages. This can "
313 "be read and written."
315 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
319 #: build/C/man2/alloc_hugepages.2:130
321 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
322 "their size in the three variables HugePages_Total, HugePages_Free, "
325 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
326 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
330 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
331 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:375
332 #: build/C/man2/madvise.2:332 build/C/man3/mallinfo.3:110
333 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
334 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
335 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:53
336 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
337 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:499 build/C/man2/mmap2.2:77
338 #: build/C/man2/mprotect.2:112 build/C/man2/mremap.2:185
339 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
340 #: build/C/man2/posix_fadvise.2:122 build/C/man3/posix_fallocate.3:108
341 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
342 #: build/C/man2/remap_file_pages.2:161 build/C/man3/shm_open.3:251
343 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:377
344 #: build/C/man2/shmget.2:248 build/C/man2/shmop.2:228
345 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
346 #: build/C/man2/memfd_create.2:161 build/C/man2/s390_pci_mmio_write.2:100
348 msgid "CONFORMING TO"
352 #: build/C/man2/alloc_hugepages.2:133
354 "These calls are specific to Linux on Intel processors, and should not be "
355 "used in programs intended to be portable."
357 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
361 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:78
362 #: build/C/man2/madvise.2:354 build/C/man3/malloc_get_state.3:88
363 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
364 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
365 #: build/C/man3/malloc_usable_size.3:55 build/C/man3/mcheck.3:147
366 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:517 build/C/man2/mmap2.2:79
367 #: build/C/man2/mprotect.2:121 build/C/man2/mremap.2:191
368 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:80
369 #: build/C/man2/posix_fadvise.2:131 build/C/man3/posix_fallocate.3:133
370 #: build/C/man3/posix_memalign.3:221 build/C/man2/readahead.2:93
371 #: build/C/man2/remap_file_pages.2:165 build/C/man3/shm_open.3:257
372 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:382
373 #: build/C/man2/shmget.2:256 build/C/man2/shmop.2:243
374 #: build/C/man2/subpage_prot.2:98 build/C/man2/sync_file_range.2:183
375 #: build/C/man2/memfd_create.2:165 build/C/man2/s390_pci_mmio_write.2:103
381 #: build/C/man2/alloc_hugepages.2:141
383 "These system calls are gone; they existed only in Linux 2.5.36 through to "
384 "2.5.54. Now the hugetlbfs filesystem can be used instead. Memory backed by "
385 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2) to "
386 "map files in this virtual filesystem."
388 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
389 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
390 "がサポートしている場合) ヒュージページを持つメモリーは、 B<mmap>(2) を使って"
391 "この仮想ファイルシステムでファイルをマップすることで取得できる。"
394 #: build/C/man2/alloc_hugepages.2:145
396 "The maximal number of huge pages can be specified using the B<hugepages=> "
399 "ヒュージページの最大数は、 B<hugepages=> 起動パラメーターを使って指定できる。"
402 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
403 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:383
404 #: build/C/man2/madvise.2:388 build/C/man3/mallinfo.3:279
405 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
406 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
407 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:69
408 #: build/C/man3/mallopt.3:568 build/C/man3/mcheck.3:208
409 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:741 build/C/man2/mmap2.2:101
410 #: build/C/man2/mprotect.2:228 build/C/man2/mremap.2:214
411 #: build/C/man2/msync.2:151 build/C/man3/mtrace.3:172
412 #: build/C/man2/posix_fadvise.2:215 build/C/man3/posix_fallocate.3:143
413 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
414 #: build/C/man2/remap_file_pages.2:183 build/C/man3/shm_open.3:283
415 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
416 #: build/C/man2/shmget.2:391 build/C/man2/shmop.2:301
417 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:227
418 #: build/C/man2/memfd_create.2:493 build/C/man2/s390_pci_mmio_write.2:109
424 #: build/C/man2/alloc_hugepages.2:158 build/C/man3/alloca.3:170
425 #: build/C/man2/cacheflush.2:97 build/C/man2/fallocate.2:391
426 #: build/C/man2/madvise.2:396 build/C/man3/mallinfo.3:287
427 #: build/C/man3/malloc_get_state.3:122 build/C/man3/malloc_hook.3:150
428 #: build/C/man3/malloc_info.3:270 build/C/man3/malloc_stats.3:75
429 #: build/C/man3/malloc_trim.3:90 build/C/man3/malloc_usable_size.3:77
430 #: build/C/man3/mallopt.3:576 build/C/man3/mcheck.3:216
431 #: build/C/man2/mlock.2:351 build/C/man2/mmap.2:749 build/C/man2/mmap2.2:109
432 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:222
433 #: build/C/man2/msync.2:159 build/C/man3/mtrace.3:180
434 #: build/C/man2/posix_fadvise.2:223 build/C/man3/posix_fallocate.3:151
435 #: build/C/man3/posix_memalign.3:285 build/C/man2/readahead.2:121
436 #: build/C/man2/remap_file_pages.2:191 build/C/man3/shm_open.3:291
437 #: build/C/man7/shm_overview.7:135 build/C/man2/shmctl.2:443
438 #: build/C/man2/shmget.2:399 build/C/man2/shmop.2:309
439 #: build/C/man2/subpage_prot.2:142 build/C/man2/sync_file_range.2:235
440 #: build/C/man2/memfd_create.2:501 build/C/man2/s390_pci_mmio_write.2:117
442 "This page is part of release 3.79 of the Linux I<man-pages> project. A "
443 "description of the project, information about reporting bugs, and the latest "
444 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
447 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.79 の一部\n"
448 "である。プロジェクトの説明とバグ報告に関する情報は\n"
449 "http://www.kernel.org/doc/man-pages/ に書かれている。"
452 #: build/C/man3/alloca.3:43
458 #: build/C/man3/alloca.3:43
464 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
465 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
466 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
467 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
468 #: build/C/man3/posix_memalign.3:29
474 #: build/C/man3/alloca.3:46
475 msgid "alloca - allocate memory that is automatically freed"
476 msgstr "alloca - 自動的に解放されるメモリーを割り当てる"
479 #: build/C/man3/alloca.3:48
480 msgid "B<#include E<lt>alloca.hE<gt>>"
481 msgstr "B<#include E<lt>alloca.hE<gt>>"
484 #: build/C/man3/alloca.3:50
485 msgid "B<void *alloca(size_t >I<size>B<);>"
486 msgstr "B<void *alloca(size_t >I<size>B<);>"
489 #: build/C/man3/alloca.3:60
491 "The B<alloca>() function allocates I<size> bytes of space in the stack "
492 "frame of the caller. This temporary space is automatically freed when the "
493 "function that called B<alloca>() returns to its caller."
495 "B<alloca>() 関数は、 I<size> バイトの領域を呼出元のスタックフレームに割り付"
496 "ける。 この一時的な領域は、 B<alloca>() を呼び出した関数が呼出元に返るときに"
500 #: build/C/man3/alloca.3:65
502 "The B<alloca>() function returns a pointer to the beginning of the "
503 "allocated space. If the allocation causes stack overflow, program behavior "
506 "B<alloca>() 関数は、割り付けた領域の始まりを指すポインターを返す。 割り付け"
507 "によってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
511 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
512 #: build/C/man3/posix_fallocate.3:103
518 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
519 #: build/C/man3/posix_fallocate.3:104
521 msgid "Multithreading (see pthreads(7))"
522 msgstr "マルチスレッディング (pthreads(7) 参照)"
525 #: build/C/man3/alloca.3:70
526 msgid "The B<alloca>() function is thread-safe."
527 msgstr "B<alloca>() 関数はスレッドセーフである。"
530 #: build/C/man3/alloca.3:72
531 msgid "This function is not in POSIX.1-2001."
532 msgstr "この関数は POSIX.1-2001 にはない。"
535 #: build/C/man3/alloca.3:78
537 "There is evidence that the B<alloca>() function appeared in 32V, PWB, "
538 "PWB.2, 3BSD, and 4BSD. There is a man page for it in 4.3BSD. Linux uses "
541 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>() 関数が登場した証拠がある。 "
542 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
543 "は POSIX.1-2001 にはない。"
546 #: build/C/man3/alloca.3:93
548 "The B<alloca>() function is machine- and compiler-dependent. For certain "
549 "applications, its use can improve efficiency compared to the use of "
550 "B<malloc>(3) plus B<free>(3). In certain cases, it can also simplify "
551 "memory deallocation in applications that use B<longjmp>(3) or "
552 "B<siglongjmp>(3). Otherwise, its use is discouraged."
554 "B<alloca>() 関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
555 "は、この関数を使うと B<malloc>(3) と B<free>(3) を組み合わせて使った場合に"
556 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
557 "B<longjmp>(3) や B<siglongjmp>(3) を使うアプリケーションでのメモリーの開放"
558 "を簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
561 #: build/C/man3/alloca.3:102
563 "Because the space allocated by B<alloca>() is allocated within the stack "
564 "frame, that space is automatically freed if the function return is jumped "
565 "over by a call to B<longjmp>(3) or B<siglongjmp>(3)."
567 "B<alloca>() により割り当てられる空間はスタックフレームから割り当てらるの"
568 "で、 関数の戻り先が B<longjmp>(3) や B<siglongjmp>(3) の呼び出しによりジャ"
569 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
572 #: build/C/man3/alloca.3:107
573 msgid "Do not attempt to B<free>(3) space allocated by B<alloca>()!"
575 "B<alloca>() で割り当てられた空間を B<free>(3) しようとすることのないよう"
579 #: build/C/man3/alloca.3:107
581 msgid "Notes on the GNU version"
582 msgstr "GNU 版についての注意"
585 #: build/C/man3/alloca.3:129
587 "Normally, B<gcc>(1) translates calls to B<alloca>() with inlined code. "
588 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
589 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
590 "included. Otherwise, (without an -ansi or -std=c* option) the glibc version "
591 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
594 "通常 B<gcc>(1) は B<alloca>() の呼び出しをインラインコードに変換する。 I<-"
595 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
596 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
597 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
598 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
599 "インクルードするが、このファイルには以下の行が含まれており、"
602 #: build/C/man3/alloca.3:134
606 " #define alloca(size) __builtin_alloca (size)\n"
610 " #define alloca(size) __builtin_alloca (size)\n"
614 #: build/C/man3/alloca.3:137
615 msgid "with messy consequences if one has a private version of this function."
616 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
619 #: build/C/man3/alloca.3:141
621 "The fact that the code is inlined means that it is impossible to take the "
622 "address of this function, or to change its behavior by linking with a "
625 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
626 "のライブラリをリンクして動作を変更することはできない。"
629 #: build/C/man3/alloca.3:145
631 "The inlined code often consists of a single instruction adjusting the stack "
632 "pointer, and does not check for stack overflow. Thus, there is no NULL "
635 "通常このインラインコードはスタックポインターを移動する 1 つの命令 "
636 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
637 "よって NULL エラーが返されることはない。"
640 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
641 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
642 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:590 build/C/man3/mtrace.3:102
643 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
644 #: build/C/man2/shmget.2:376
650 #: build/C/man3/alloca.3:150
652 "There is no error indication if the stack frame cannot be extended. "
653 "(However, after a failed allocation, the program is likely to receive a "
654 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
656 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
657 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
658 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
661 #: build/C/man3/alloca.3:158
663 "On many systems B<alloca>() cannot be used inside the list of arguments of "
664 "a function call, because the stack space reserved by B<alloca>() would "
665 "appear on the stack in the middle of the space for the function arguments."
667 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>() が使え"
668 "ない。 これは、 B<alloca>() によって予約されるスタック領域が、 関数引き数に"
669 "使われるスタック領域の中に現れてしまうためである。"
672 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:378
673 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
674 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
675 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
676 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
677 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
678 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:715 build/C/man2/mmap2.2:95
679 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
680 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
681 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:138
682 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
683 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
684 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
685 #: build/C/man2/shmget.2:382 build/C/man2/shmop.2:293
686 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
687 #: build/C/man2/memfd_create.2:487 build/C/man2/s390_pci_mmio_write.2:107
693 #: build/C/man3/alloca.3:162
694 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
695 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
698 #: build/C/man2/cacheflush.2:25
704 #: build/C/man2/cacheflush.2:25
710 #: build/C/man2/cacheflush.2:28
711 msgid "cacheflush - flush contents of instruction and/or data cache"
712 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
715 #: build/C/man2/cacheflush.2:31
717 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
718 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
721 #: build/C/man2/cacheflush.2:33
723 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
724 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
727 #: build/C/man2/cacheflush.2:43
729 "B<cacheflush>() flushes the contents of the indicated cache(s) for the user "
730 "addresses in the range I<addr> to I<(addr+nbytes-1)>. I<cache> may be one "
733 "B<cacheflush>() は I<addr> から I<(addr+nbytes-1)> の範囲のユーザーアドレス"
734 "に対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれか"
738 #: build/C/man2/cacheflush.2:43
744 #: build/C/man2/cacheflush.2:46
745 msgid "Flush the instruction cache."
746 msgstr "命令 (instruction) キャッシュをフラッシュする。"
749 #: build/C/man2/cacheflush.2:46
755 #: build/C/man2/cacheflush.2:49
756 msgid "Write back to memory and invalidate the affected valid cache lines."
757 msgstr "変更があったキャッシュラインをメモリーに書き戻し、無効にする。"
760 #: build/C/man2/cacheflush.2:49
766 #: build/C/man2/cacheflush.2:53
767 msgid "Same as B<(ICACHE|DCACHE)>."
768 msgstr "B<(ICACHE|DCACHE)> と同じ。"
771 #: build/C/man2/cacheflush.2:59
773 "B<cacheflush>() returns 0 on success or -1 on error. If errors are "
774 "detected, I<errno> will indicate the error."
776 "B<cacheflush>() は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
777 "出された場合は I<errno> にエラーが指示される。"
780 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
781 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
782 #: build/C/man2/subpage_prot.2:72 build/C/man2/memfd_create.2:134
783 #: build/C/man2/s390_pci_mmio_write.2:78 build/C/man2/s390_pci_mmio_write.2:83
789 #: build/C/man2/cacheflush.2:67
791 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
794 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
798 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
799 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
800 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
801 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
802 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
803 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
804 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
805 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
806 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
807 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
808 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
809 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
810 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
811 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
812 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
813 #: build/C/man2/memfd_create.2:139 build/C/man2/s390_pci_mmio_write.2:87
819 #: build/C/man2/cacheflush.2:75
820 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
822 "I<cache> パラメーターが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
824 #. FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
825 #. but by now it is on a number of other architectures (but not i386).
826 #. Investigate the details and update this page.
827 #. Irix 6.5 appears to have a cacheflush() syscall -- mtk
829 #: build/C/man2/cacheflush.2:82
831 "This Linux-specific system call is available only on MIPS-based systems. It "
832 "should not be used in programs intended to be portable."
834 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
835 "植を意図したプログラムで使用すべきではない。"
838 #: build/C/man2/cacheflush.2:89
840 "The current implementation ignores the I<addr> and I<nbytes> arguments. "
841 "Therefore, the whole cache is always flushed."
843 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
847 #: build/C/man2/fallocate.2:11
853 #: build/C/man2/fallocate.2:11 build/C/man3/malloc_info.3:25
854 #: build/C/man2/mmap.2:40 build/C/man3/posix_fallocate.3:25
855 #: build/C/man3/shm_open.3:26 build/C/man2/memfd_create.2:21
861 #: build/C/man2/fallocate.2:14
862 msgid "fallocate - manipulate file space"
863 msgstr "fallocate - ファイル空間の操作"
866 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
869 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
870 "B<#include E<lt>fcntl.hE<gt>>\n"
872 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
873 "B<#include E<lt>fcntl.hE<gt>>\n"
876 #: build/C/man2/fallocate.2:21
878 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
879 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
882 #: build/C/man2/fallocate.2:27
884 "This is a nonportable, Linux-specific system call. For the portable, "
885 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
886 "B<posix_fallocate>(3)."
888 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
889 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
890 "で規定された方法である B<posix_fallocate>(3) を使うこと。"
893 #: build/C/man2/fallocate.2:37
895 "B<fallocate>() allows the caller to directly manipulate the allocated disk "
896 "space for the file referred to by I<fd> for the byte range starting at "
897 "I<offset> and continuing for I<len> bytes."
899 "B<fallocate>() を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
900 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
904 #: build/C/man2/fallocate.2:42
906 "The I<mode> argument determines the operation to be performed on the given "
907 "range. Details of the supported operations are given in the subsections "
910 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
911 "サポートされている操作の詳細は以下のサブセクションで説明する。"
914 #: build/C/man2/fallocate.2:42
916 msgid "Allocating disk space"
920 #: build/C/man2/fallocate.2:65
922 "The default operation (i.e., I<mode> is zero) of B<fallocate>() allocates "
923 "the disk space within the range specified by I<offset> and I<len>. The file "
924 "size (as reported by B<stat>(2)) will be changed if I<offset>+I<len> is "
925 "greater than the file size. Any subregion within the range specified by "
926 "I<offset> and I<len> that did not contain data before the call will be "
927 "initialized to zero. This default behavior closely resembles the behavior "
928 "of the B<posix_fallocate>(3) library function, and is intended as a method "
929 "of optimally implementing that function."
931 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
932 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
933 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
934 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
935 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
936 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
937 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
938 "適に実装する手段を提供することを目的としているからである。"
941 #: build/C/man2/fallocate.2:71
943 "After a successful call, subsequent writes into the range specified by "
944 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
948 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
949 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
952 #: build/C/man2/fallocate.2:82
954 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
955 "the call is similar, but the file size will not be changed even if I<offset>"
956 "+I<len> is greater than the file size. Preallocating zeroed blocks beyond "
957 "the end of the file in this manner is useful for optimizing append workloads."
959 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
961 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
962 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
963 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
967 #: build/C/man2/fallocate.2:86
969 "Because allocation is done in block size chunks, B<fallocate>() may "
970 "allocate a larger range of disk space than was specified."
972 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
974 "も大きなディスク領域を割り当てることがある。"
977 #: build/C/man2/fallocate.2:86
979 msgid "Deallocating file space"
980 msgstr "ファイル空間の割り当て解除"
983 #: build/C/man2/fallocate.2:101
985 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
986 "in I<mode> deallocates space (i.e., creates a hole) in the byte range "
987 "starting at I<offset> and continuing for I<len> bytes. Within the specified "
988 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
989 "removed from the file. After a successful call, subsequent reads from this "
990 "range will return zeroes."
992 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
993 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
994 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
995 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
996 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1000 #: build/C/man2/fallocate.2:112
1002 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
1003 "I<mode>; in other words, even when punching off the end of the file, the "
1004 "file size (as reported by B<stat>(2)) does not change."
1006 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
1007 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
1008 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
1011 #: build/C/man2/fallocate.2:117
1013 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1014 "support the operation, an error is returned. The operation is supported on "
1015 "at least the following filesystems:"
1017 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1018 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1019 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1022 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1023 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1024 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1025 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1026 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1027 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1028 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1029 #: build/C/man2/shmop.2:80 build/C/man2/memfd_create.2:248
1030 #: build/C/man2/memfd_create.2:258 build/C/man2/memfd_create.2:266
1036 #: build/C/man2/fallocate.2:119
1037 msgid "XFS (since Linux 2.6.38)"
1038 msgstr "XFS (Linux 2.6.38 以降)"
1040 #. commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1042 #: build/C/man2/fallocate.2:122
1043 msgid "ext4 (since Linux 3.0)"
1044 msgstr "ext4 (Linux 3.0 以降)"
1047 #: build/C/man2/fallocate.2:124
1048 msgid "Btrfs (since Linux 3.7)"
1049 msgstr "Btrfs (Linux 3.7 以降)"
1051 #. commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1053 #: build/C/man2/fallocate.2:127
1054 msgid "tmpfs (since Linux 3.5)"
1055 msgstr "tmpfs (Linux 3.5 以降)"
1058 #: build/C/man2/fallocate.2:127
1060 msgid "Collapsing file space"
1061 msgstr "ファイル空間の一部削除"
1063 #. commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1065 #: build/C/man2/fallocate.2:147
1067 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1068 "in I<mode> removes a byte range from a file, without leaving a hole. The "
1069 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1070 "bytes. At the completion of the operation, the contents of the file "
1071 "starting at the location I<offset+len> will be appended at the location "
1072 "I<offset>, and the file will be I<len> bytes smaller."
1074 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1075 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残さ"
1076 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1077 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1078 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1082 #: build/C/man2/fallocate.2:161
1084 "A filesystem may place limitations on the granularity of the operation, in "
1085 "order to ensure efficient implementation. Typically, I<offset> and I<len> "
1086 "must be a multiple of the filesystem logical block size, which varies "
1087 "according to the filesystem type and configuration. If a filesystem has "
1088 "such a requirement, B<fallocate>() will fail with the error B<EINVAL> if "
1089 "this requirement is violated."
1091 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1092 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1093 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1094 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1095 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1098 #: build/C/man2/fallocate.2:170
1100 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1101 "of file, an error is returned; instead, use B<ftruncate>(2) to truncate a "
1104 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1105 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1106 "B<ftruncate>(2) を使用すること。"
1109 #: build/C/man2/fallocate.2:175
1111 "No other flags may be specified in I<mode> in conjunction with "
1112 "B<FALLOC_FL_COLLAPSE_RANGE>."
1114 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1117 #. commit 9eb79482a97152930b113b51dff530aba9e28c8e
1118 #. commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1120 #: build/C/man2/fallocate.2:183
1122 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1123 "extent-based files) and XFS."
1125 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1126 "ファイル) と XFS でサポートされている。"
1129 #: build/C/man2/fallocate.2:183
1131 msgid "Zeroing file space"
1132 msgstr "ファイル空間のゼロ埋め"
1134 #. commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1136 #: build/C/man2/fallocate.2:199
1138 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14) in "
1139 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1140 "for I<len> bytes. Within the specified range, blocks are preallocated for "
1141 "the regions that span the holes in the file. After a successful call, "
1142 "subsequent reads from this range will return zeroes."
1144 "B<FALLOC_FL_ZERO_RANGE> フラグ (Linux 3.14 以降で利用可能) を I<mode> に指定"
1145 "すると、 I<offset> で始まる I<len> バイト範囲の空間をゼロ埋めする。 指定され"
1146 "た範囲の中では、ブロックは、そのファイル内のホールが広がる領域にあらかじめ割"
1147 "り当てられたものである。 呼び出しが成功すると、 これ以降のこの範囲からの読み"
1151 #: build/C/man2/fallocate.2:205
1153 "Zeroing is done within the filesystem preferably by converting the range "
1154 "into unwritten extents. This approach means that the specified range will "
1155 "not be physically zeroed out on the device (except for partial blocks at the "
1156 "either end of the range), and I/O is (otherwise) required only to update "
1159 "ゼロ埋めは、ファイルシステム内部では、指定された範囲を書き込みを伴わないエク"
1160 "ステントに変換する方法をできるだけ使って行われる。 この方法は、指定された範囲"
1161 "について物理的にゼロ埋めしたデータがデバイスに書き込まれるのではないことを意"
1162 "味する (例外は指定された範囲の端の部分的に使用しているブロックである)。 (これ"
1163 "以外で) I/O が必要なのはメタデータの更新だけである。"
1166 #: build/C/man2/fallocate.2:217
1168 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1169 "behavior of the call is similar, but the file size will not be changed even "
1170 "if I<offset>+I<len> is greater than the file size. This behavior is the "
1171 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1173 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に追加で指定された場合、 このシステム"
1174 "コールの動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合"
1175 "であってもファイルサイズは変更されない点が異なる。 この動作は "
1176 "B<FALLOC_FL_KEEP_SIZE> を指定してスペースを前もって割り当てた場合と同じであ"
1180 #: build/C/man2/fallocate.2:222
1182 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1183 "support the operation, an error is returned. The operation is supported on "
1184 "at least the following filesystems:"
1186 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1187 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1188 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1190 #. commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1192 #: build/C/man2/fallocate.2:225
1193 msgid "XFS (since Linux 3.14)"
1194 msgstr "XFS (Linux 3.14 以降)"
1196 #. commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1198 #: build/C/man2/fallocate.2:228
1199 msgid "ext4, for extent-based files (since Linux 3.14)"
1200 msgstr "ext4 のエクステントベースのファイル (Linux 3.14 以降)"
1203 #: build/C/man2/fallocate.2:235
1205 "On success, B<fallocate>() returns zero. On error, -1 is returned and "
1206 "I<errno> is set to indicate the error."
1208 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> "
1212 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1213 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1214 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1215 #: build/C/man2/sync_file_range.2:148
1221 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1222 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1224 "I<fd> が有効なファイルディスクリプターでないか、 書き込み用としてオープンされ"
1228 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1234 #: build/C/man2/fallocate.2:244
1235 msgid "I<offset>+I<len> exceeds the maximum file size."
1236 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1239 #: build/C/man2/fallocate.2:244
1245 #: build/C/man2/fallocate.2:247
1246 msgid "A signal was caught during execution."
1247 msgstr "実行中にシグナルが捕捉された。"
1250 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1251 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1252 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1255 #: build/C/man2/fallocate.2:269
1257 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1258 "plus I<len> reaches or passes the end of the file."
1260 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1261 "範囲がファイルの末尾かそれより先まで達している。"
1264 #: build/C/man2/fallocate.2:279
1266 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1267 "not a multiple of the filesystem block size."
1269 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1270 "がファイルシステムのブロックサイズの倍数ではない。"
1273 #: build/C/man2/fallocate.2:287
1275 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1276 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1278 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1279 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1281 #. There was a inconsistency in 3.15-rc1, that should be resolved so that all
1282 #. filesystems use this error for this case. (Tytso says ex4 will change.)
1283 #. http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1284 #. From: Michael Kerrisk (man-pages <mtk.manpages@...>
1285 #. Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1286 #. Newsgroups: gmane.linux.man, gmane.linux.file-systems
1287 #. Date: 2014-04-17 13:40:05 GMT
1289 #: build/C/man2/fallocate.2:304
1291 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1292 "file referred to by I<fd> is not a regular file."
1294 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1295 "I<fd> が参照しているファイルが通常のファイルではない。"
1298 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1299 #: build/C/man2/sync_file_range.2:160
1305 #: build/C/man2/fallocate.2:307
1306 msgid "An I/O error occurred while reading from or writing to a filesystem."
1307 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1310 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1311 #: build/C/man3/posix_fallocate.3:87 build/C/man2/s390_pci_mmio_write.2:92
1317 #: build/C/man2/fallocate.2:314
1319 "I<fd> does not refer to a regular file or a directory. (If I<fd> is a pipe "
1320 "or FIFO, a different error results.)"
1322 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1323 "を参照している場合、別のエラーが発生する)。"
1326 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1327 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1333 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1335 "There is not enough space left on the device containing the file referred to "
1337 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1340 #: build/C/man2/fallocate.2:323
1341 msgid "This kernel does not implement B<fallocate>()."
1342 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1345 #: build/C/man2/fallocate.2:323
1347 msgid "B<EOPNOTSUPP>"
1348 msgstr "B<EOPNOTSUPP>"
1351 #: build/C/man2/fallocate.2:332
1353 "The filesystem containing the file referred to by I<fd> does not support "
1354 "this operation; or the I<mode> is not supported by the filesystem containing "
1355 "the file referred to by I<fd>."
1357 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1358 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1359 "I<mode> をサポートしていない。"
1362 #: build/C/man2/fallocate.2:332 build/C/man2/fallocate.2:338
1363 #: build/C/man2/fallocate.2:351 build/C/man2/mlock.2:143
1364 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/mmap.2:467
1365 #: build/C/man2/shmctl.2:353 build/C/man2/shmget.2:241
1371 #: build/C/man2/fallocate.2:338
1372 msgid "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
1374 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1375 "(B<chattr>(1) 参照)。"
1378 #: build/C/man2/fallocate.2:351
1380 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1381 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1383 "I<mode> に B<FALLOC_FL_PUNCH_HOLE> か B<FALLOC_FL_COLLAPSE_RANGE> が指定され"
1384 "たが、 I<fd> が参照するファイルに追加のみ (append-only) の属性が付いている "
1385 "(B<chattr>(1) 参照)。"
1388 #: build/C/man2/fallocate.2:355 build/C/man2/mmap.2:471
1389 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
1390 msgstr "操作が file seal により禁止されている。 B<fcntl>(2) 参照。"
1393 #: build/C/man2/fallocate.2:355 build/C/man2/posix_fadvise.2:97
1394 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1400 #: build/C/man2/fallocate.2:359
1401 msgid "I<fd> refers to a pipe or FIFO."
1402 msgstr "I<fd> がパイプか FIFO を参照している。"
1405 #: build/C/man2/fallocate.2:359 build/C/man2/mmap.2:471
1411 #: build/C/man2/fallocate.2:367
1413 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1414 "I<fd> is currently being executed."
1416 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1420 #: build/C/man2/fallocate.2:367 build/C/man2/madvise.2:325
1421 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1422 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1423 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1424 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1425 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1426 #: build/C/man2/sync_file_range.2:177 build/C/man2/memfd_create.2:155
1427 #: build/C/man2/s390_pci_mmio_write.2:98
1432 #. See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1434 #: build/C/man2/fallocate.2:375
1436 "B<fallocate>() is available on Linux since kernel 2.6.23. Support is "
1437 "provided by glibc since version 2.10. The B<FALLOC_FL_*> flags are defined "
1438 "in glibc headers only since version 2.18."
1440 "B<fallocate>() はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1441 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダー"
1442 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1445 #: build/C/man2/fallocate.2:378
1446 msgid "B<fallocate>() is Linux-specific."
1447 msgstr "B<fallocate>() は Linux 固有である。"
1450 #: build/C/man2/fallocate.2:383
1452 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1454 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1457 #: build/C/man2/madvise.2:35
1463 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1469 #: build/C/man2/madvise.2:38
1470 msgid "madvise - give advice about use of memory"
1471 msgstr "madvise - メモリー利用に関するアドバイスを与える"
1474 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1475 #: build/C/man3/shm_open.3:31
1476 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1477 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1480 #: build/C/man2/madvise.2:42
1482 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1484 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1487 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1488 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1490 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1491 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1494 #: build/C/man2/madvise.2:50
1495 msgid "B<madvise>(): _BSD_SOURCE"
1496 msgstr "B<madvise>(): _BSD_SOURCE"
1499 #: build/C/man2/madvise.2:68
1501 "The B<madvise>() system call advises the kernel about how to handle paging "
1502 "input/output in the address range beginning at address I<addr> and with size "
1503 "I<length> bytes. It allows an application to tell the kernel how it expects "
1504 "to use some mapped or shared memory areas, so that the kernel can choose "
1505 "appropriate read-ahead and caching techniques. This call does not influence "
1506 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1507 "but may influence its performance. The kernel is free to ignore the advice."
1509 "B<madvise>() システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1510 "トのメモリーブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイ"
1511 "スする。 これを用いると、 アプリケーションからカーネルに、 マップされたメモ"
1512 "リーや共有メモリーをどのように扱ってほしいか伝えることができ、 カーネルはそれ"
1513 "に応じて先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリ"
1514 "ケーションの動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性"
1515 "能には影響しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任され"
1519 #: build/C/man2/madvise.2:72
1520 msgid "The advice is indicated in the I<advice> argument which can be"
1522 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1525 #: build/C/man2/madvise.2:72
1527 msgid "B<MADV_NORMAL>"
1528 msgstr "B<MADV_NORMAL>"
1531 #: build/C/man2/madvise.2:76
1532 msgid "No special treatment. This is the default."
1533 msgstr "特別な扱いは行わない。これがデフォルトである。"
1536 #: build/C/man2/madvise.2:76
1538 msgid "B<MADV_RANDOM>"
1539 msgstr "B<MADV_RANDOM>"
1542 #: build/C/man2/madvise.2:80
1544 "Expect page references in random order. (Hence, read ahead may be less "
1545 "useful than normally.)"
1547 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1551 #: build/C/man2/madvise.2:80
1553 msgid "B<MADV_SEQUENTIAL>"
1554 msgstr "B<MADV_SEQUENTIAL>"
1557 #: build/C/man2/madvise.2:85
1559 "Expect page references in sequential order. (Hence, pages in the given "
1560 "range can be aggressively read ahead, and may be freed soon after they are "
1563 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1564 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1568 #: build/C/man2/madvise.2:85
1570 msgid "B<MADV_WILLNEED>"
1571 msgstr "B<MADV_WILLNEED>"
1574 #: build/C/man2/madvise.2:89
1576 "Expect access in the near future. (Hence, it might be a good idea to read "
1577 "some pages ahead.)"
1579 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1583 #: build/C/man2/madvise.2:89
1585 msgid "B<MADV_DONTNEED>"
1586 msgstr "B<MADV_DONTNEED>"
1589 #: build/C/man2/madvise.2:100
1591 "Do not expect access in the near future. (For the time being, the "
1592 "application is finished with the given range, so the kernel can free "
1593 "resources associated with it.) Subsequent accesses of pages in this range "
1594 "will succeed, but will result either in reloading of the memory contents "
1595 "from the underlying mapped file (see B<mmap>(2)) or zero-fill-on-demand "
1596 "pages for mappings without an underlying file."
1598 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1599 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。) こ"
1600 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリーの内容を"
1601 "マップ元のファイルからロードし直すことになる (B<mmap>(2) を見よ) か、 または"
1602 "元ファイルがないマップページでは アクセスがあったときに 0 埋めが行われること"
1606 #: build/C/man2/madvise.2:100
1608 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1609 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1612 #. Databases want to use this feature to drop a section of their
1613 #. bufferpool (shared memory segments) - without writing back to
1614 #. disk/swap space. This feature is also useful for supporting
1615 #. hot-plug memory on UML.
1617 #: build/C/man2/madvise.2:113
1619 "Free up a given range of pages and its associated backing store. Currently, "
1620 "only shmfs/tmpfs supports this; other filesystems return with the error "
1623 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1624 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1628 #: build/C/man2/madvise.2:113
1630 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1631 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1633 #. See http://lwn.net/Articles/171941/
1634 #. [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1635 #. Currently, copy-on-write may change the physical address of
1636 #. a page even if the user requested that the page is pinned in
1637 #. memory (either by mlock or by get_user_pages). This happens
1638 #. if the process forks meanwhile, and the parent writes to that
1639 #. page. As a result, the page is orphaned: in case of
1640 #. get_user_pages, the application will never see any data hardware
1641 #. DMA's into this page after the COW. In case of mlock'd memory,
1642 #. the parent is not getting the realtime/security benefits of mlock.
1643 #. In particular, this affects the Infiniband modules which do DMA from
1644 #. and into user pages all the time.
1645 #. This patch adds madvise options to control whether memory range is
1646 #. inherited across fork. Useful e.g. for when hardware is doing DMA
1647 #. from/into these pages. Could also be useful to an application
1648 #. wanting to speed up its forks by cutting large areas out of
1650 #. SEE ALSO: http://lwn.net/Articles/171941/
1651 #. "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1653 #: build/C/man2/madvise.2:144
1655 "Do not make the pages in this range available to the child after a "
1656 "B<fork>(2). This is useful to prevent copy-on-write semantics from changing "
1657 "the physical location of a page(s) if the parent writes to it after a "
1658 "B<fork>(2). (Such page relocations cause problems for hardware that DMAs "
1659 "into the page(s).)"
1661 "B<fork>(2) が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1662 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2) "
1663 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1664 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1665 "を行うような場合に 問題を起こすことがある)。"
1668 #: build/C/man2/madvise.2:144
1670 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1671 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1674 #: build/C/man2/madvise.2:150
1676 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1677 "a mapping is inherited across B<fork>(2)."
1679 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1680 "B<fork>(2) の前後でマッピングは継承されるようになる。"
1683 #: build/C/man2/madvise.2:150
1685 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1686 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1689 #: build/C/man2/madvise.2:162
1691 "Poison a page and handle it like a hardware memory corruption. This "
1692 "operation is available only for privileged (B<CAP_SYS_ADMIN>) processes. "
1693 "This operation may result in the calling process receiving a B<SIGBUS> and "
1694 "the page being unmapped. This feature is intended for testing of memory "
1695 "error-handling code; it is available only if the kernel was configured with "
1696 "B<CONFIG_MEMORY_FAILURE>."
1698 "ページに毒入れを行い、ハードウェアメモリーの破損のようにそのページを取り扱"
1699 "う。 この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 こ"
1700 "の操作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマッ"
1701 "プされる。 この機能はメモリーのエラー処理コードをテストするためのものであ"
1702 "る。 カーネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能"
1706 #: build/C/man2/madvise.2:162
1708 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1709 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1712 #: build/C/man2/madvise.2:180
1714 "Soft offline the pages in the range specified by I<addr> and I<length>. The "
1715 "memory of each page in the specified range is preserved (i.e., when next "
1716 "accessed, the same content will be visible, but in a new physical page "
1717 "frame), and the original page is offlined (i.e., no longer used, and taken "
1718 "out of normal memory management). The effect of the B<MADV_SOFT_OFFLINE> "
1719 "operation is invisible to (i.e., does not change the semantics of) the "
1720 "calling process. This feature is intended for testing of memory error-"
1721 "handling code; it is available only if the kernel was configured with "
1722 "B<CONFIG_MEMORY_FAILURE>."
1724 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1725 "された範囲の各ページのメモリーの内容は保持され (すなわち、次にアクセスされた"
1726 "際に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオ"
1727 "フラインになる (すなわち、 そのフレームは使用される、通常のメモリー管理からは"
1728 "取り除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えな"
1729 "い (つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリーのエラー"
1730 "処理コードをテストすることを目的に作られた。 カーネルで "
1731 "B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1734 #: build/C/man2/madvise.2:180
1736 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1737 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1740 #: build/C/man2/madvise.2:205
1742 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1743 "I<addr> and I<length>. The kernel regularly scans those areas of user "
1744 "memory that have been marked as mergeable, looking for pages with identical "
1745 "content. These are replaced by a single write-protected page (which is "
1746 "automatically copied if a process later wants to update the content of the "
1747 "page). KSM merges only private anonymous pages (see B<mmap>(2)). The KSM "
1748 "feature is intended for applications that generate many instances of the "
1749 "same data (e.g., virtualization systems such as KVM). It can consume a lot "
1750 "of processing power; use with care. See the Linux kernel source file "
1751 "I<Documentation/vm/ksm.txt> for more details. The B<MADV_MERGEABLE> and "
1752 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1753 "configured with B<CONFIG_KSM>."
1755 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1756 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1757 "いたユーザーメモリーの領域を定期的にスキャンし、内容が全く同じページを探す。 "
1758 "内容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) "
1759 "がかかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよ"
1760 "うとした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名"
1761 "ページ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じ"
1762 "データのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システ"
1763 "ム) での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合"
1764 "があり、注意して使用すること。 詳細は Linux カーネルソースファイル "
1765 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1766 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1770 #: build/C/man2/madvise.2:205
1772 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1773 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1776 #: build/C/man2/madvise.2:214
1778 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1779 "address range; KSM unmerges whatever pages it had merged in the address "
1780 "range specified by I<addr> and I<length>."
1782 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1783 "果を取り消す。 KSM は、 I<addr> と I<length> で指定されたアドレス範囲の統合"
1784 "済みのすべてのページの統合解除を行う。"
1787 #: build/C/man2/madvise.2:214
1789 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1790 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1792 #. http://lwn.net/Articles/358904/
1793 #. https://lwn.net/Articles/423584/
1795 #: build/C/man2/madvise.2:243
1797 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1798 "I<addr> and I<length>. Currently, Transparent Huge Pages work only with "
1799 "private anonymous pages (see B<mmap>(2)). The kernel will regularly scan "
1800 "the areas marked as huge page candidates to replace them with huge pages. "
1801 "The kernel will also allocate huge pages directly when the region is "
1802 "naturally aligned to the huge page size (see B<posix_memalign>(2)). This "
1803 "feature is primarily aimed at applications that use large mappings of data "
1804 "and access large regions of that memory at a time (e.g., virtualization "
1805 "systems such as QEMU). It can very easily waste memory (e.g., a 2MB mapping "
1806 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1807 "one 4KB page). See the Linux kernel source file I<Documentation/vm/"
1808 "transhuge.txt> for more details. The B<MADV_HUGEPAGE> and "
1809 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1810 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1812 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1813 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1814 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1815 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1816 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1817 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1818 "マッピングを使用し、一度にそのメモリーの大きな範囲にアクセスするようなアプリ"
1819 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1820 "る。 この機能は非常に簡単にメモリーを浪費してしまう (例えば、1 バイトしかアク"
1821 "セスしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリーを使っ"
1822 "てしまう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1823 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1824 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1828 #: build/C/man2/madvise.2:243
1830 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1831 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1834 #: build/C/man2/madvise.2:250
1836 "Ensures that memory in the address range specified by I<addr> and I<length> "
1837 "will not be collapsed into huge pages."
1839 "I<addr> と I<length> で指定されたアドレス範囲のメモリーがヒュージページに組み"
1843 #: build/C/man2/madvise.2:250
1845 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1846 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1849 #: build/C/man2/madvise.2:264
1851 "Exclude from a core dump those pages in the range specified by I<addr> and "
1852 "I<length>. This is useful in applications that have large areas of memory "
1853 "that are known not to be useful in a core dump. The effect of "
1854 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1855 "proc/PID/coredump_filter> file (see B<core>(5))."
1857 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1858 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリー領域があ"
1859 "るアプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1860 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1864 #: build/C/man2/madvise.2:264
1866 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1867 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1870 #: build/C/man2/madvise.2:268
1871 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1872 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1875 #: build/C/man2/madvise.2:275
1877 "On success B<madvise>() returns zero. On error, it returns -1 and I<errno> "
1878 "is set appropriately."
1880 "B<madvise>() は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1884 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1885 #: build/C/man2/mremap.2:136
1891 #: build/C/man2/madvise.2:279
1892 msgid "A kernel resource was temporarily unavailable."
1893 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1896 #: build/C/man2/madvise.2:282
1897 msgid "The map exists, but the area maps something that isn't a file."
1898 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1901 #: build/C/man2/madvise.2:285
1902 msgid "This error can occur for the following reasons:"
1903 msgstr "このエラーは以下の理由で発生する。"
1908 #: build/C/man2/madvise.2:292
1909 msgid "The value I<len> is negative."
1910 msgstr "I<len> が負の値である。"
1913 #: build/C/man2/madvise.2:295
1914 msgid "I<addr> is not page-aligned."
1915 msgstr "I<addr> がページ境界ではない。"
1918 #: build/C/man2/madvise.2:298
1919 msgid "I<advice> is not a valid value"
1920 msgstr "I<advice> が有効な値でない。"
1923 #: build/C/man2/madvise.2:301
1925 "The application is attempting to release locked or shared pages (with "
1926 "B<MADV_DONTNEED>)."
1928 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1933 #: build/C/man2/madvise.2:309
1935 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1936 "kernel was not configured with B<CONFIG_KSM>."
1938 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1939 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1942 #: build/C/man2/madvise.2:316
1944 "(for B<MADV_WILLNEED>) Paging in this area would exceed the process's "
1945 "maximum resident set size."
1947 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1948 "(resident set size) の最大値を越えてしまう。"
1951 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1952 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1953 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1954 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1955 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1956 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1957 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1958 #: build/C/man2/sync_file_range.2:163 build/C/man2/memfd_create.2:152
1959 #: build/C/man2/s390_pci_mmio_write.2:95
1965 #: build/C/man2/madvise.2:321
1966 msgid "(for B<MADV_WILLNEED>) Not enough memory: paging in failed."
1967 msgstr "(B<MADV_WILLNEED> の場合) メモリーが足りず、ページングに失敗した。"
1970 #: build/C/man2/madvise.2:325
1972 "Addresses in the specified range are not currently mapped, or are outside "
1973 "the address space of the process."
1975 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1978 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1980 #: build/C/man2/madvise.2:332
1982 "Since Linux 3.18, support for this system call is optional, depending on the "
1983 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1985 "Linux 3.18 以降では、このシステムコールのサポートは任意となり、利用できるかは"
1986 "カーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされてい"
1989 #. FIXME . Write a posix_madvise(3) page.
1991 #: build/C/man2/madvise.2:345
1993 "POSIX.1b. POSIX.1-2001 describes B<posix_madvise>(3) with constants "
1994 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1995 "to that described here. There is a similar B<posix_fadvise>(2) for file "
1998 "POSIX.1b. POSIX.1-2001 では、 B<posix_madvise>(3) を B<POSIX_MADV_NORMAL>, "
1999 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
2000 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2) という"
2004 #: build/C/man2/madvise.2:354
2006 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
2007 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
2009 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
2010 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
2013 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
2014 #: build/C/man2/shmget.2:370
2020 #: build/C/man2/madvise.2:363
2022 "The current Linux implementation (2.4.0) views this system call more as a "
2023 "command than as advice and hence may return an error when it cannot do what "
2024 "it usually would do in response to this advice. (See the ERRORS description "
2025 "above.) This is nonstandard behavior."
2027 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2028 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2029 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2035 #. function first appeared in 4.4BSD.
2037 #: build/C/man2/madvise.2:379
2039 "The Linux implementation requires that the address I<addr> be page-aligned, "
2040 "and allows I<length> to be zero. If there are some parts of the specified "
2041 "address range that are not mapped, the Linux version of B<madvise>() "
2042 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2043 "the system call, as it should)."
2045 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2046 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>() では、指定"
2047 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2048 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2052 #: build/C/man2/madvise.2:388
2054 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2055 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2057 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2058 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2061 #: build/C/man3/mallinfo.3:26
2067 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2073 #: build/C/man3/mallinfo.3:29
2074 msgid "mallinfo - obtain memory allocation information"
2075 msgstr "mallinfo - メモリー割り当て情報を取得する"
2078 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2079 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2080 #: build/C/man3/mallopt.3:31
2081 msgid "B<#include E<lt>malloc.hE<gt>>"
2082 msgstr "B<#include E<lt>malloc.hE<gt>>"
2085 #: build/C/man3/mallinfo.3:33
2086 msgid "B<struct mallinfo mallinfo(void);>"
2087 msgstr "B<struct mallinfo mallinfo(void);>"
2090 #: build/C/man3/mallinfo.3:41
2092 "The B<mallinfo>() function returns a copy of a structure containing "
2093 "information about memory allocations performed by B<malloc>(3) and related "
2094 "functions. This structure is defined as follows:"
2096 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリー\n"
2097 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2098 "この構造体は以下のように定義されている。"
2101 #: build/C/man3/mallinfo.3:56
2104 "struct mallinfo {\n"
2105 " int arena; /* Non-mmapped space allocated (bytes) */\n"
2106 " int ordblks; /* Number of free chunks */\n"
2107 " int smblks; /* Number of free fastbin blocks */\n"
2108 " int hblks; /* Number of mmapped regions */\n"
2109 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
2110 " int usmblks; /* Maximum total allocated space (bytes) */\n"
2111 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
2112 " int uordblks; /* Total allocated space (bytes) */\n"
2113 " int fordblks; /* Total free space (bytes) */\n"
2114 " int keepcost; /* Top-most, releasable space (bytes) */\n"
2117 "struct mallinfo {\n"
2118 " int arena; /* Non-mmapped space allocated (bytes) */\n"
2119 " int ordblks; /* Number of free chunks */\n"
2120 " int smblks; /* Number of free fastbin blocks */\n"
2121 " int hblks; /* Number of mmapped regions */\n"
2122 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
2123 " int usmblks; /* Maximum total allocated space (bytes) */\n"
2124 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
2125 " int uordblks; /* Total allocated space (bytes) */\n"
2126 " int fordblks; /* Total free space (bytes) */\n"
2127 " int keepcost; /* Top-most, releasable space (bytes) */\n"
2131 #: build/C/man3/mallinfo.3:62
2133 "The fields of the I<mallinfo> structure contain the following information:"
2134 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2137 #: build/C/man3/mallinfo.3:62
2143 #: build/C/man3/mallinfo.3:68
2145 "The total amount of memory allocated by means other than B<mmap>(2) (i.e., "
2146 "memory allocated on the heap). This figure includes both in-use blocks and "
2147 "blocks on the free list."
2149 "B<mmap>(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられ"
2150 "たメモリー) 。 この数字には使用中のブロックやフリーリスト上のブロックも含まれ"
2154 #: build/C/man3/mallinfo.3:68
2160 #: build/C/man3/mallinfo.3:71
2161 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2162 msgstr "通常の (つまり fastbin ではない) 未使用ブロック数。"
2165 #: build/C/man3/mallinfo.3:71
2171 #: build/C/man3/mallinfo.3:75
2172 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2173 msgstr "fastbin 未使用ブロック数 (B<mallopt>(3) 参照)。"
2176 #: build/C/man3/mallinfo.3:75
2182 #: build/C/man3/mallinfo.3:83
2184 "The number of blocks currently allocated using B<mmap>(2). (See the "
2185 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2187 "B<mmap>(2) を使って現在割り当てられているブロック数 (B<mallopt>(3) の "
2188 "B<M_MMAP_THRESHOLD> の議論を参照)。"
2191 #: build/C/man3/mallinfo.3:83
2197 #: build/C/man3/mallinfo.3:87
2198 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2199 msgstr "B<mmap>(2) を使って現在割り当てられているブロックのバイト数。"
2202 #: build/C/man3/mallinfo.3:87
2208 #: build/C/man3/mallinfo.3:92
2210 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2211 "of space that was ever allocated. This field is maintained only in "
2212 "nonthreading environments."
2214 "割り当てた空間の最高点 (\"highwater mark\")、 つまり、 これまでの中での最大の"
2215 "割り当て量。 このフィールドはスレッド化されていない環境でのみ収集される。"
2218 #: build/C/man3/mallinfo.3:92
2224 #: build/C/man3/mallinfo.3:95
2225 msgid "The total number of bytes in fastbin free blocks."
2226 msgstr "fastbin フリーブロックの総バイト数。"
2229 #: build/C/man3/mallinfo.3:95
2232 msgstr "I<uordblks>"
2235 #: build/C/man3/mallinfo.3:98
2236 msgid "The total number of bytes used by in-use allocations."
2237 msgstr "使用中の割り当てメモリーで使われているバイト数。"
2240 #: build/C/man3/mallinfo.3:98
2243 msgstr "I<fordblks>"
2246 #: build/C/man3/mallinfo.3:101
2247 msgid "The total number of bytes in free blocks."
2248 msgstr "フリーブロックの総バイト数。"
2251 #: build/C/man3/mallinfo.3:101
2254 msgstr "I<keepcost>"
2257 #. Available already in glibc 2.0, possibly earlier
2259 #: build/C/man3/mallinfo.3:110
2261 "The total amount of releasable free space at the top of the heap. This is "
2262 "the maximum number of bytes that could ideally (i.e., ignoring page "
2263 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2265 "ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は "
2266 "B<malloc_trim>(3) で理想的な場合に解放できる最大のバイト数である (理想的とい"
2267 "うのは、 ページ境界の制限などを無視した場合である。"
2270 #: build/C/man3/mallinfo.3:114
2272 "This function is not specified by POSIX or the C standards. A similar "
2273 "function exists on many System V derivatives, and was specified in the SVID."
2275 "この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステ"
2276 "ムに同様の関数が存在し、 SVID では同様の関数が規定されていた。 "
2278 #. FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2279 #. See the 24 Aug 2011 mail by Paul Pluzhnikov:
2280 #. "[patch] Fix mallinfo() to accumulate results for all arenas"
2281 #. on libc-alpha@sourceware.org
2283 #: build/C/man3/mallinfo.3:126
2285 "B<Information is returned for only the main memory allocation area.> "
2286 "Allocations in other arenas are excluded. See B<malloc_stats>(3) and "
2287 "B<malloc_info>(3) for alternatives that include information about other "
2290 "B<これらの情報はメインのメモリー割り当て領域に対するもののみである。> 他の領"
2291 "域の割り当ては対象にならない。 他の領域の情報も取得できる別の手段については "
2292 "B<malloc_stats>(3) や B<malloc_info>(3) を参照。"
2295 #: build/C/man3/mallinfo.3:134
2297 "The fields of the I<mallinfo> structure are typed as I<int>. However, "
2298 "because some internal bookkeeping values may be of type I<long>, the "
2299 "reported values may wrap around zero and thus be inaccurate."
2301 "I<mallinfo> 構造体の各フィールドは I<int> 型である。 しかし、 いくつかの内部"
2302 "管理用の値は I<long> 型の場合もあるので、 報告される値が一周してしまい、 不正"
2306 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2307 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2308 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:633
2309 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2310 #: build/C/man2/memfd_create.2:293
2316 #: build/C/man3/mallinfo.3:140
2318 "The program below employs B<mallinfo>() to retrieve memory allocation "
2319 "statistics before and after allocating and freeing some blocks of memory. "
2320 "The statistics are displayed on standard output."
2322 "以下のプログラムは B<mallinfo>() を利用して、 メモリーブロックの割り当て、解"
2323 "放のそれぞれ前後でメモリー割り当ての統計情報を取得する。 統計情報は標準出力に"
2327 #: build/C/man3/mallinfo.3:144
2329 "The first two command-line arguments specify the number and size of blocks "
2330 "to be allocated with B<malloc>(3)."
2332 "最初の 2 つのコマンドライン引き数は B<malloc>(3) で割り当てるブロック数とサイ"
2336 #: build/C/man3/mallinfo.3:158
2338 "The remaining three arguments specify which of the allocated blocks should "
2339 "be freed with B<free>(3). These three arguments are optional, and specify "
2340 "(in order): the step size to be used in the loop that frees blocks (the "
2341 "default is 1, meaning free all blocks in the range); the ordinal position of "
2342 "the first block to be freed (default 0, meaning the first allocated block); "
2343 "and a number one greater than the ordinal position of the last block to be "
2344 "freed (default is one greater than the maximum block number). If these "
2345 "three arguments are omitted, then the defaults cause all allocated blocks to "
2348 "残りの 3 つの引き数は、どの割り当てられたブロックを B<free>(3) で解放すべきか"
2349 "を指定する。 これらの 3 つの引き数の指定は任意で、 最初のものから順に以下の情"
2350 "報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップ"
2351 "サイズを指定する (デフォルト値は 1 で、 1 は指定した範囲のすべてのブロックを"
2352 "解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を"
2353 "指定する (デフォルト値は 0 で、 0 は先頭の割り当て済みブロックを意味する)。 "
2354 "3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定す"
2355 "る (デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つ"
2356 "の引き数が省略された場合、 デフォルトではすべての割り当てられたブロックが解放"
2360 #: build/C/man3/mallinfo.3:162
2362 "In the following example run of the program, 1000 allocations of 100 bytes "
2363 "are performed, and then every second allocated block is freed:"
2365 "以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当"
2366 "てたブロックの 2 つに 1 つを解放する。"
2369 #: build/C/man3/mallinfo.3:177
2372 "$ B<./a.out 1000 100 2>\n"
2373 "============== Before allocating blocks ==============\n"
2374 "Total non-mmapped bytes (arena): 0\n"
2375 "# of free chunks (ordblks): 1\n"
2376 "# of free fastbin blocks (smblks): 0\n"
2377 "# of mapped regions (hblks): 0\n"
2378 "Bytes in mapped regions (hblkhd): 0\n"
2379 "Max. total allocated space (usmblks): 0\n"
2380 "Free bytes held in fastbins (fsmblks): 0\n"
2381 "Total allocated space (uordblks): 0\n"
2382 "Total free space (fordblks): 0\n"
2383 "Topmost releasable block (keepcost): 0\n"
2385 "$ B<./a.out 1000 100 2>\n"
2386 "============== Before allocating blocks ==============\n"
2387 "Total non-mmapped bytes (arena): 0\n"
2388 "# of free chunks (ordblks): 1\n"
2389 "# of free fastbin blocks (smblks): 0\n"
2390 "# of mapped regions (hblks): 0\n"
2391 "Bytes in mapped regions (hblkhd): 0\n"
2392 "Max. total allocated space (usmblks): 0\n"
2393 "Free bytes held in fastbins (fsmblks): 0\n"
2394 "Total allocated space (uordblks): 0\n"
2395 "Total free space (fordblks): 0\n"
2396 "Topmost releasable block (keepcost): 0\n"
2399 #: build/C/man3/mallinfo.3:189
2402 "============== After allocating blocks ==============\n"
2403 "Total non-mmapped bytes (arena): 135168\n"
2404 "# of free chunks (ordblks): 1\n"
2405 "# of free fastbin blocks (smblks): 0\n"
2406 "# of mapped regions (hblks): 0\n"
2407 "Bytes in mapped regions (hblkhd): 0\n"
2408 "Max. total allocated space (usmblks): 0\n"
2409 "Free bytes held in fastbins (fsmblks): 0\n"
2410 "Total allocated space (uordblks): 104000\n"
2411 "Total free space (fordblks): 31168\n"
2412 "Topmost releasable block (keepcost): 31168\n"
2414 "============== After allocating blocks ==============\n"
2415 "Total non-mmapped bytes (arena): 135168\n"
2416 "# of free chunks (ordblks): 1\n"
2417 "# of free fastbin blocks (smblks): 0\n"
2418 "# of mapped regions (hblks): 0\n"
2419 "Bytes in mapped regions (hblkhd): 0\n"
2420 "Max. total allocated space (usmblks): 0\n"
2421 "Free bytes held in fastbins (fsmblks): 0\n"
2422 "Total allocated space (uordblks): 104000\n"
2423 "Total free space (fordblks): 31168\n"
2424 "Topmost releasable block (keepcost): 31168\n"
2427 #: build/C/man3/mallinfo.3:201
2430 "============== After freeing blocks ==============\n"
2431 "Total non-mmapped bytes (arena): 135168\n"
2432 "# of free chunks (ordblks): 501\n"
2433 "# of free fastbin blocks (smblks): 0\n"
2434 "# of mapped regions (hblks): 0\n"
2435 "Bytes in mapped regions (hblkhd): 0\n"
2436 "Max. total allocated space (usmblks): 0\n"
2437 "Free bytes held in fastbins (fsmblks): 0\n"
2438 "Total allocated space (uordblks): 52000\n"
2439 "Total free space (fordblks): 83168\n"
2440 "Topmost releasable block (keepcost): 31168\n"
2442 "============== After freeing blocks ==============\n"
2443 "Total non-mmapped bytes (arena): 135168\n"
2444 "# of free chunks (ordblks): 501\n"
2445 "# of free fastbin blocks (smblks): 0\n"
2446 "# of mapped regions (hblks): 0\n"
2447 "Bytes in mapped regions (hblkhd): 0\n"
2448 "Max. total allocated space (usmblks): 0\n"
2449 "Free bytes held in fastbins (fsmblks): 0\n"
2450 "Total allocated space (uordblks): 52000\n"
2451 "Total free space (fordblks): 83168\n"
2452 "Topmost releasable block (keepcost): 31168\n"
2455 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2456 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2457 #: build/C/man2/mmap.2:645 build/C/man2/mprotect.2:164
2459 msgid "Program source"
2463 #: build/C/man3/mallinfo.3:208
2466 "#include E<lt>malloc.hE<gt>\n"
2467 "#include \"tlpi_hdr.h\"\n"
2469 "#include E<lt>malloc.hE<gt>\n"
2470 "#include \"tlpi_hdr.h\"\n"
2473 #: build/C/man3/mallinfo.3:213
2477 "display_mallinfo(void)\n"
2479 " struct mallinfo mi;\n"
2482 "display_mallinfo(void)\n"
2484 " struct mallinfo mi;\n"
2487 #: build/C/man3/mallinfo.3:215
2489 msgid " mi = mallinfo();\n"
2490 msgstr " mi = mallinfo();\n"
2493 #: build/C/man3/mallinfo.3:227
2496 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
2497 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
2498 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
2499 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
2500 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
2501 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
2502 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2503 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
2504 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
2505 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
2508 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
2509 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
2510 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
2511 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
2512 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
2513 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
2514 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2515 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
2516 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
2517 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
2521 #: build/C/man3/mallinfo.3:235
2525 "main(int argc, char *argv[])\n"
2527 "#define MAX_ALLOCS 2000000\n"
2528 " char *alloc[MAX_ALLOCS];\n"
2529 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2530 " size_t blockSize;\n"
2533 "main(int argc, char *argv[])\n"
2535 "#define MAX_ALLOCS 2000000\n"
2536 " char *alloc[MAX_ALLOCS];\n"
2537 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2538 " size_t blockSize;\n"
2541 #: build/C/man3/mallinfo.3:239
2544 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2545 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2546 " \"[end-free]]]\\en\", argv[0]);\n"
2548 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2549 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2550 " \"[end-free]]]\\en\", argv[0]);\n"
2553 #: build/C/man3/mallinfo.3:245
2556 " numBlocks = atoi(argv[1]);\n"
2557 " blockSize = atoi(argv[2]);\n"
2558 " freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2559 " freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2560 " freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2562 " numBlocks = atoi(argv[1]);\n"
2563 " blockSize = atoi(argv[2]);\n"
2564 " freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2565 " freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2566 " freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2569 #: build/C/man3/mallinfo.3:248
2572 " printf(\"============== Before allocating blocks ==============\\en\");\n"
2573 " display_mallinfo();\n"
2575 " printf(\"============== Before allocating blocks ==============\\en\");\n"
2576 " display_mallinfo();\n"
2579 #: build/C/man3/mallinfo.3:252
2582 " for (j = 0; j E<lt> numBlocks; j++) {\n"
2583 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
2584 " fatal(\"Too many allocations\");\n"
2586 " for (j = 0; j E<lt> numBlocks; j++) {\n"
2587 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
2588 " fatal(\"Too many allocations\");\n"
2591 #: build/C/man3/mallinfo.3:257
2594 " alloc[j] = malloc(blockSize);\n"
2595 " if (alloc[j] == NULL)\n"
2596 " errExit(\"malloc\");\n"
2599 " alloc[j] = malloc(blockSize);\n"
2600 " if (alloc[j] == NULL)\n"
2601 " errExit(\"malloc\");\n"
2605 #: build/C/man3/mallinfo.3:260
2608 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2609 " display_mallinfo();\n"
2611 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2612 " display_mallinfo();\n"
2615 #: build/C/man3/mallinfo.3:263
2618 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2619 " free(alloc[j]);\n"
2621 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2622 " free(alloc[j]);\n"
2625 #: build/C/man3/mallinfo.3:266
2628 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2629 " display_mallinfo();\n"
2631 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2632 " display_mallinfo();\n"
2635 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2636 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2637 #: build/C/man2/mmap.2:714 build/C/man2/memfd_create.2:437
2638 #: build/C/man2/memfd_create.2:486
2641 " exit(EXIT_SUCCESS);\n"
2644 " exit(EXIT_SUCCESS);\n"
2648 #: build/C/man3/mallinfo.3:279
2650 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2651 "B<malloc_trim>(3), B<mallopt>(3)"
2653 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2654 "B<malloc_trim>(3), B<mallopt>(3)"
2657 #: build/C/man3/malloc_get_state.3:25
2659 msgid "MALLOC_GET_STATE"
2660 msgstr "MALLOC_GET_STATE"
2663 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2669 #: build/C/man3/malloc_get_state.3:28
2671 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2673 msgstr "malloc_get_state, malloc_set_state - malloc 実装の状態を保存/復元する"
2676 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2677 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2679 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2680 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2683 #: build/C/man3/malloc_get_state.3:33
2685 msgid "B<void* malloc_get_state(void);>\n"
2686 msgstr "B<void* malloc_get_state(void);>\n"
2689 #: build/C/man3/malloc_get_state.3:35
2691 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2692 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2695 #: build/C/man3/malloc_get_state.3:53
2697 "The B<malloc_get_state>() function records the current state of all "
2698 "B<malloc>(3) internal bookkeeping variables (but not the actual contents of "
2699 "the heap or the state of B<malloc_hook>(3) functions pointers). The state "
2700 "is recorded in a system-dependent opaque data structure dynamically "
2701 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2702 "as the function result. (It is the caller's responsibility to B<free>(3) "
2705 "B<malloc_get_state>() 関数は B<malloc>(3) 内部のすべての管理用変数を記録する "
2706 "(ただし、 ヒープの実際の内容と B<malloc_hook>(3) 関数ポインターの状態は記録さ"
2707 "れない)。 状態は B<malloc>(3) で動的に確保されたシステム依存の opaque な (内"
2708 "部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体"
2709 "へのポインターが返される (このメモリーは呼び出し元が責任をもって B<free>(3) "
2713 #: build/C/man3/malloc_get_state.3:61
2715 "The B<malloc_set_state>() function restores the state of all B<malloc>(3) "
2716 "internal bookkeeping variables to the values recorded in the opaque data "
2717 "structure pointed to by I<state>."
2719 "B<malloc_set_state>() 関数は、 B<malloc>(3) 内部のすべての管理用変数を "
2720 "I<state> が指す opaque なデータ構造体から復元する。"
2723 #: build/C/man3/malloc_get_state.3:68
2725 "On success, B<malloc_get_state>() returns a pointer to a newly allocated "
2726 "opaque data structure. On error (for example, memory could not be allocated "
2727 "for the data structure), B<malloc_get_state>() returns NULL."
2729 "成功すると、 B<malloc_get_state>() は新しく割り当てられたデータ構造体へのポイ"
2730 "ンターを返す。 エラーの場合 (例えば、データ構造体に必要なメモリーが割り当てら"
2731 "れなかったなど)、 B<malloc_get_state>() は NULL を返す。"
2733 #. if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2734 #. /* Must fail if the major version is too high. */
2735 #. if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2737 #: build/C/man3/malloc_get_state.3:86
2739 "On success, B<malloc_set_state>() returns 0. If the implementation detects "
2740 "that I<state> does not point to a correctly formed data structure, "
2741 "B<malloc_set_state>() returns -1. If the implementation detects that the "
2742 "version of the data structure referred to by I<state> is a more recent "
2743 "version than this implementation knows about, B<malloc_set_state>() returns "
2746 "成功すると、 B<malloc_set_state>() は 0 を返す。 実装が I<state> が正しく作成"
2747 "されたデータ構造体を指していないと検出した場合、 B<malloc_set_state>() は -1 "
2748 "を返す。 I<state> が参照するデータ構造体のバージョンがこの実装が認識するバー"
2749 "ジョンよりも新しいと実装が検出した場合、 B<malloc_set_state>() は -2 を返す。"
2752 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2753 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2754 msgid "These functions are GNU extensions."
2755 msgstr "これらの関数は GNU による拡張である。"
2758 #: build/C/man3/malloc_get_state.3:94
2760 "These functions are useful when using this B<malloc>(3) implementation as "
2761 "part of a shared library, and the heap contents are saved/restored via some "
2762 "other method. This technique is used by GNU Emacs to implement its \"dumping"
2765 "これらの関数が役に立つのは、 この B<malloc>(3) の実装が共有ライブラリの一部と"
2766 "して使用され、 ヒープの内容が何か他の方法で保存/復元される場合である。 この手"
2767 "法は GNU Emacs が「ダンプ」関数 (\"dumping\" function) を実装するのに使用され"
2770 #. i.e., calls __malloc_check_init()
2771 #. i.e., malloc checking is not already in use
2772 #. and the caller requested malloc checking
2774 #: build/C/man3/malloc_get_state.3:111
2776 "Hook function pointers are never saved or restored by these functions, with "
2777 "two exceptions: if malloc checking (see B<mallopt>(3)) was in use when "
2778 "B<malloc_get_state>() was called, then B<malloc_set_state>() resets malloc "
2779 "checking hooks if possible; if malloc checking was not in use in the "
2780 "recorded state, but the caller has requested malloc checking, then the hooks "
2783 "これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 "
2784 "つ例外がある。 B<malloc_get_state>() が呼び出された際に malloc チェック "
2785 "(B<mallopt>(3) 参照) が使用中の場合、 B<malloc_set_state>() は可能なら "
2786 "malloc チェックフックをリセットする。 また、 保存された状態の malloc チェック"
2787 "が使用中でないが、 呼び出し元が malloc チェックを要求していた場合、 フックは "
2791 #: build/C/man3/malloc_get_state.3:114
2792 msgid "B<malloc>(3), B<mallopt>(3)"
2793 msgstr "B<malloc>(3), B<mallopt>(3)"
2796 #: build/C/man3/malloc_hook.3:10
2799 msgstr "MALLOC_HOOK"
2802 #: build/C/man3/malloc_hook.3:10
2808 #: build/C/man3/malloc_hook.3:15
2810 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2811 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2813 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2814 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2817 #: build/C/man3/malloc_hook.3:20
2819 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2820 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2823 #: build/C/man3/malloc_hook.3:23
2825 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2826 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2829 #: build/C/man3/malloc_hook.3:26
2832 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2833 "B< const void *>I<caller>B<);>\n"
2835 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2836 "B< const void *>I<caller>B<);>\n"
2839 #: build/C/man3/malloc_hook.3:28
2841 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2842 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2845 #: build/C/man3/malloc_hook.3:30
2847 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2848 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2851 #: build/C/man3/malloc_hook.3:32
2853 msgid "B<void (*__after_morecore_hook)(void);>\n"
2854 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2857 #: build/C/man3/malloc_hook.3:43
2859 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2860 "B<realloc>(3), and B<free>(3) by specifying appropriate hook functions. "
2861 "You can use these hooks to help you debug programs that use dynamic memory "
2862 "allocation, for example."
2864 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2865 "B<malloc>(3), B<realloc>(3), B<free>(3) の動作を変更することができる。例え"
2866 "ば、動的にメモリー割り当てを行う プログラムのデバッグにこれらのフックを使うこ"
2870 #: build/C/man3/malloc_hook.3:50
2872 "The variable B<__malloc_initialize_hook> points at a function that is called "
2873 "once when the malloc implementation is initialized. This is a weak "
2874 "variable, so it can be overridden in the application with a definition like "
2877 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2878 "ばれる関数へのポインターである。 この変数は書き換え可能 (weak) であり、アプリ"
2879 "ケーション内で 以下のような定義で上書きできる:"
2882 #: build/C/man3/malloc_hook.3:53
2884 msgid " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2885 msgstr " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2888 #: build/C/man3/malloc_hook.3:58
2890 "Now the function I<my_init_hook>() can do the initialization of all hooks."
2892 "なお、関数 I<my_init_hook>() で全てのフックの初期化をすることができる。"
2895 #: build/C/man3/malloc_hook.3:74
2897 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2898 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2899 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2900 "except that they have a final argument I<caller> that gives the address of "
2901 "the caller of B<malloc>(3), etc."
2903 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2904 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2905 "B<free>(3) とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2906 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3) などの呼び"
2907 "出し元 (caller) のアドレスが格納される。"
2910 #: build/C/man3/malloc_hook.3:80
2912 "The variable B<__after_morecore_hook> points at a function that is called "
2913 "each time after B<sbrk>(2) was asked for more memory."
2915 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2) が呼ばれた"
2916 "後で毎回呼び出される関数へのポインターである。"
2918 #. https://bugzilla.redhat.com/show_bug.cgi?id=450187
2919 #. http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2921 #: build/C/man3/malloc_hook.3:89
2923 "The use of these hook functions is not safe in multithreaded programs, and "
2924 "they are now deprecated. Programmers should instead preempt calls to the "
2925 "relevant functions by defining and exporting functions such as \"malloc\" "
2928 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2929 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2930 "公開して、 関連する関数を呼び出すようにすべきである。"
2933 #: build/C/man3/malloc_hook.3:91
2934 msgid "Here is a short example of how to use these variables."
2935 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2938 #: build/C/man3/malloc_hook.3:95
2941 "#include E<lt>stdio.hE<gt>\n"
2942 "#include E<lt>malloc.hE<gt>\n"
2944 "#include E<lt>stdio.hE<gt>\n"
2945 "#include E<lt>malloc.hE<gt>\n"
2948 #: build/C/man3/malloc_hook.3:99
2951 "/* Prototypes for our hooks. */\n"
2952 "static void my_init_hook(void);\n"
2953 "static void *my_malloc_hook(size_t, const void *);\n"
2955 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2956 "static void my_init_hook(void);\n"
2957 "static void *my_malloc_hook(size_t, const void *);\n"
2960 #: build/C/man3/malloc_hook.3:102
2963 "/* Variables to save original hooks. */\n"
2964 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2966 "/* 元々のフックを保存するための変数 */\n"
2967 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2970 #: build/C/man3/malloc_hook.3:105
2973 "/* Override initializing hook from the C library. */\n"
2974 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2976 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2977 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2980 #: build/C/man3/malloc_hook.3:112
2984 "my_init_hook(void)\n"
2986 " old_malloc_hook = __malloc_hook;\n"
2987 " __malloc_hook = my_malloc_hook;\n"
2991 "my_init_hook(void)\n"
2993 " old_malloc_hook = __malloc_hook;\n"
2994 " __malloc_hook = my_malloc_hook;\n"
2998 #: build/C/man3/malloc_hook.3:117
3002 "my_malloc_hook(size_t size, const void *caller)\n"
3007 "my_malloc_hook(size_t size, const void *caller)\n"
3012 #: build/C/man3/malloc_hook.3:120
3015 " /* Restore all old hooks */\n"
3016 " __malloc_hook = old_malloc_hook;\n"
3018 " /* 元々のフックを全て戻す */\n"
3019 " __malloc_hook = old_malloc_hook;\n"
3022 #: build/C/man3/malloc_hook.3:123
3025 " /* Call recursively */\n"
3026 " result = malloc(size);\n"
3028 " /* malloc の再帰的呼び出し */\n"
3029 " result = malloc(size);\n"
3032 #: build/C/man3/malloc_hook.3:126
3035 " /* Save underlying hooks */\n"
3036 " old_malloc_hook = __malloc_hook;\n"
3038 " /* 現在設定されているフック (underlying hook) を保存する */\n"
3039 " old_malloc_hook = __malloc_hook;\n"
3042 #: build/C/man3/malloc_hook.3:130
3045 " /* printf() might call malloc(), so protect it too. */\n"
3046 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3047 " (unsigned int) size, caller, result);\n"
3049 " /* printf() は malloc() を呼び出す可能性があるので\n"
3050 " ここでもガードを行う (元々のフックのままにしておく) */\n"
3051 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3052 " (unsigned int) size, caller, result);\n"
3055 #: build/C/man3/malloc_hook.3:133
3058 " /* Restore our own hooks */\n"
3059 " __malloc_hook = my_malloc_hook;\n"
3061 " /* ユーザーが使おうとするフックを再設定する */\n"
3062 " __malloc_hook = my_malloc_hook;\n"
3065 #: build/C/man3/malloc_hook.3:136
3075 #: build/C/man3/malloc_hook.3:142
3076 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3077 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3080 #: build/C/man3/malloc_info.3:25
3083 msgstr "MALLOC_INFO"
3086 #: build/C/man3/malloc_info.3:28
3087 msgid "malloc_info - export malloc state to a stream"
3088 msgstr "malloc_info - malloc の状態をストリームに出力する"
3091 #: build/C/man3/malloc_info.3:33
3093 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3094 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3097 #: build/C/man3/malloc_info.3:44
3099 "The B<malloc_info>() function exports an XML string that describes the "
3100 "current state of the memory-allocation implementation in the caller. The "
3101 "string is printed on the file stream I<stream>. The exported string "
3102 "includes information about all arenas (see B<malloc>(3))."
3104 "B<malloc_info>() 関数は、 呼び出し元のメモリー割り当て実装の現在の状態を表す "
3105 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<stream> に出力され"
3106 "る。 出力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) "
3110 #: build/C/man3/malloc_info.3:48
3111 msgid "As currently implemented, I<options> must be zero."
3112 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3115 #: build/C/man3/malloc_info.3:55
3117 "On success, B<malloc_info>() returns 0; on error, it returns -1, with "
3118 "I<errno> set to indicate the cause."
3120 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3121 "I<errno> にエラーの原因を示す値を設定する。"
3124 #: build/C/man3/malloc_info.3:60
3125 msgid "I<options> was nonzero."
3126 msgstr "I<options> が 0 でなかった。"
3129 #: build/C/man3/malloc_info.3:63
3130 msgid "B<malloc_info>() was added to glibc in version 2.10."
3131 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3134 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3135 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3136 msgid "This function is a GNU extension."
3137 msgstr "この関数は GNU による拡張である。"
3140 #: build/C/man3/malloc_info.3:71
3142 "The memory-allocation information is provided as an XML string (rather than "
3143 "a C structure) because the information may change over time (according to "
3144 "changes in the underlying implementation). The output XML string includes a "
3147 "メモリー割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3148 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3149 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3152 #: build/C/man3/malloc_info.3:77
3154 "The B<open_memstream>(3) function can be used to send the output of "
3155 "B<malloc_info>() directly into a buffer in memory, rather than to a file."
3157 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3158 "なくメモリー内のバッファーに直接送ることができる。"
3161 #: build/C/man3/malloc_info.3:84
3163 "The B<malloc_info>() function is designed to address deficiencies in "
3164 "B<malloc_stats>(3) and B<mallinfo>(3)."
3166 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3170 #: build/C/man3/malloc_info.3:95
3172 "The program below takes up to four command-line arguments, of which the "
3173 "first three are mandatory. The first argument specifies the number of "
3174 "threads that the program should create. All of the threads, including the "
3175 "main thread, allocate the number of blocks of memory specified by the second "
3176 "argument. The third argument controls the size of the blocks to be "
3177 "allocated. The main thread creates blocks of this size, the second thread "
3178 "created by the program allocates blocks of twice this size, the third thread "
3179 "allocates blocks of three times this size, and so on."
3181 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3182 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3183 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリーブロックの割り当て"
3184 "を行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこ"
3185 "のサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこの"
3186 "サイズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイ"
3187 "ズのブロックを割り当て、 以下同様である。"
3190 #: build/C/man3/malloc_info.3:102
3192 "The program calls B<malloc_info>() twice to display the memory-allocation "
3193 "state. The first call takes place before any threads are created or memory "
3194 "allocated. The second call is performed after all threads have allocated "
3197 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリー割り当て状態を表示"
3198 "する。 最初の呼び出しはスレッドの生成もメモリーの割り当ても行われる前に実行さ"
3199 "れる。 2 回目の呼び出しは全てのスレッドがメモリー割り当てを行った後に実行され"
3203 #: build/C/man3/malloc_info.3:110
3205 "In the following example, the command-line arguments specify the creation of "
3206 "one additional thread, and both the main thread and the additional thread "
3207 "allocate 10000 blocks of memory. After the blocks of memory have been "
3208 "allocated, B<malloc_info>() shows the state of two allocation arenas."
3210 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3211 "レッドと追加のスレッドの両方が 10000 個のメモリーブロックを割り当てるように指"
3212 "定している。 メモリーブロックの割り当て後の B<malloc_info>() では、 2 つの割"
3216 #: build/C/man3/malloc_info.3:135
3219 "$ B<getconf GNU_LIBC_VERSION>\n"
3221 "$ B<./a.out 1 10000 100>\n"
3222 "============ Before allocating blocks ============\n"
3223 "E<lt>malloc version=\"1\"E<gt>\n"
3224 "E<lt>heap nr=\"0\"E<gt>\n"
3226 "E<lt>/sizesE<gt>\n"
3227 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3228 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3229 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3230 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3231 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3232 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3234 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3235 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3236 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3237 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3238 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3239 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3240 "E<lt>/mallocE<gt>\n"
3242 "$ B<getconf GNU_LIBC_VERSION>\n"
3244 "$ B<./a.out 1 10000 100>\n"
3245 "============ Before allocating blocks ============\n"
3246 "E<lt>malloc version=\"1\"E<gt>\n"
3247 "E<lt>heap nr=\"0\"E<gt>\n"
3249 "E<lt>/sizesE<gt>\n"
3250 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3251 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3252 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3253 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3254 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3255 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3257 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3258 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3259 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3260 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3261 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3262 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3263 "E<lt>/mallocE<gt>\n"
3266 #: build/C/man3/malloc_info.3:165
3269 "============ After allocating blocks ============\n"
3270 "E<lt>malloc version=\"1\"E<gt>\n"
3271 "E<lt>heap nr=\"0\"E<gt>\n"
3273 "E<lt>/sizesE<gt>\n"
3274 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3275 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3276 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3277 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3278 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3279 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3281 "E<lt>heap nr=\"1\"E<gt>\n"
3283 "E<lt>/sizesE<gt>\n"
3284 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3285 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3286 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3287 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3288 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3289 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3291 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3292 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3293 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3294 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3295 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3296 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3297 "E<lt>/mallocE<gt>\n"
3299 "============ After allocating blocks ============\n"
3300 "E<lt>malloc version=\"1\"E<gt>\n"
3301 "E<lt>heap nr=\"0\"E<gt>\n"
3303 "E<lt>/sizesE<gt>\n"
3304 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3305 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3306 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3307 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3308 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3309 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3311 "E<lt>heap nr=\"1\"E<gt>\n"
3313 "E<lt>/sizesE<gt>\n"
3314 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3315 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3316 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3317 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3318 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3319 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3321 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3322 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3323 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3324 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3325 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3326 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3327 "E<lt>/mallocE<gt>\n"
3330 #: build/C/man3/malloc_info.3:175
3333 "#include E<lt>unistd.hE<gt>\n"
3334 "#include E<lt>stdlib.hE<gt>\n"
3335 "#include E<lt>pthread.hE<gt>\n"
3336 "#include E<lt>malloc.hE<gt>\n"
3337 "#include E<lt>errno.hE<gt>\n"
3339 "#include E<lt>unistd.hE<gt>\n"
3340 "#include E<lt>stdlib.hE<gt>\n"
3341 "#include E<lt>pthread.hE<gt>\n"
3342 "#include E<lt>malloc.hE<gt>\n"
3343 "#include E<lt>errno.hE<gt>\n"
3346 #: build/C/man3/malloc_info.3:178
3349 "static size_t blockSize;\n"
3350 "static int numThreads, numBlocks;\n"
3352 "static size_t blockSize;\n"
3353 "static int numThreads, numBlocks;\n"
3356 #: build/C/man3/malloc_info.3:181 build/C/man2/memfd_create.2:368
3357 #: build/C/man2/memfd_create.2:450
3360 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3363 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3367 #: build/C/man3/malloc_info.3:187
3371 "thread_func(void *arg)\n"
3374 " int tn = (int) arg;\n"
3377 "thread_func(void *arg)\n"
3380 " int tn = (int) arg;\n"
3383 #: build/C/man3/malloc_info.3:190
3386 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3387 " the main thread) allocates a different amount of memory */\n"
3389 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3390 " the main thread) allocates a different amount of memory */\n"
3393 #: build/C/man3/malloc_info.3:194
3396 " for (j = 0; j E<lt> numBlocks; j++)\n"
3397 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
3398 " errExit(\"malloc-thread\");\n"
3400 " for (j = 0; j E<lt> numBlocks; j++)\n"
3401 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
3402 " errExit(\"malloc-thread\");\n"
3405 #: build/C/man3/malloc_info.3:198
3408 " sleep(100); /* Sleep until main thread terminates */\n"
3412 " sleep(100); /* Sleep until main thread terminates */\n"
3417 #: build/C/man3/malloc_info.3:204
3421 "main(int argc, char *argv[])\n"
3423 " int j, tn, sleepTime;\n"
3424 " pthread_t *thr;\n"
3427 "main(int argc, char *argv[])\n"
3429 " int j, tn, sleepTime;\n"
3430 " pthread_t *thr;\n"
3433 #: build/C/man3/malloc_info.3:211
3436 " if (argc E<lt> 4) {\n"
3437 " fprintf(stderr,\n"
3438 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3440 " exit(EXIT_FAILURE);\n"
3443 " if (argc E<lt> 4) {\n"
3444 " fprintf(stderr,\n"
3445 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3447 " exit(EXIT_FAILURE);\n"
3451 #: build/C/man3/malloc_info.3:216
3454 " numThreads = atoi(argv[1]);\n"
3455 " numBlocks = atoi(argv[2]);\n"
3456 " blockSize = atoi(argv[3]);\n"
3457 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3459 " numThreads = atoi(argv[1]);\n"
3460 " numBlocks = atoi(argv[2]);\n"
3461 " blockSize = atoi(argv[3]);\n"
3462 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3465 #: build/C/man3/malloc_info.3:220
3468 " thr = calloc(numThreads, sizeof(pthread_t));\n"
3469 " if (thr == NULL)\n"
3470 " errExit(\"calloc\");\n"
3472 " thr = calloc(numThreads, sizeof(pthread_t));\n"
3473 " if (thr == NULL)\n"
3474 " errExit(\"calloc\");\n"
3477 #: build/C/man3/malloc_info.3:223
3480 " printf(\"============ Before allocating blocks ============\\en\");\n"
3481 " malloc_info(0, stdout);\n"
3483 " printf(\"============ Before allocating blocks ============\\en\");\n"
3484 " malloc_info(0, stdout);\n"
3487 #: build/C/man3/malloc_info.3:225
3489 msgid " /* Create threads that allocate different amounts of memory */\n"
3490 msgstr " /* Create threads that allocate different amounts of memory */\n"
3493 #: build/C/man3/malloc_info.3:231
3496 " for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3497 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3499 " if (errno != 0)\n"
3500 " errExit(\"pthread_create\");\n"
3502 " for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3503 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3505 " if (errno != 0)\n"
3506 " errExit(\"pthread_create\");\n"
3509 #: build/C/man3/malloc_info.3:236
3512 " /* If we add a sleep interval after the start-up of each\n"
3513 " thread, the threads likely won\\(aqt contend for malloc\n"
3514 " mutexes, and therefore additional arenas won\\(aqt be\n"
3515 " allocated (see malloc(3)). */\n"
3517 " /* If we add a sleep interval after the start-up of each\n"
3518 " thread, the threads likely won\\(aqt contend for malloc\n"
3519 " mutexes, and therefore additional arenas won\\(aqt be\n"
3520 " allocated (see malloc(3)). */\n"
3523 #: build/C/man3/malloc_info.3:240
3526 " if (sleepTime E<gt> 0)\n"
3527 " sleep(sleepTime);\n"
3530 " if (sleepTime E<gt> 0)\n"
3531 " sleep(sleepTime);\n"
3535 #: build/C/man3/malloc_info.3:242
3537 msgid " /* The main thread also allocates some memory */\n"
3538 msgstr " /* The main thread also allocates some memory */\n"
3541 #: build/C/man3/malloc_info.3:246
3544 " for (j = 0; j E<lt> numBlocks; j++)\n"
3545 " if (malloc(blockSize) == NULL)\n"
3546 " errExit(\"malloc\");\n"
3548 " for (j = 0; j E<lt> numBlocks; j++)\n"
3549 " if (malloc(blockSize) == NULL)\n"
3550 " errExit(\"malloc\");\n"
3553 #: build/C/man3/malloc_info.3:249
3556 " sleep(2); /* Give all threads a chance to\n"
3557 " complete allocations */\n"
3559 " sleep(2); /* Give all threads a chance to\n"
3560 " complete allocations */\n"
3563 #: build/C/man3/malloc_info.3:252
3566 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
3567 " malloc_info(0, stdout);\n"
3569 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
3570 " malloc_info(0, stdout);\n"
3573 #: build/C/man3/malloc_info.3:262
3575 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3576 "B<open_memstream>(3)"
3578 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3579 "B<open_memstream>(3)"
3582 #: build/C/man3/malloc_stats.3:26
3584 msgid "MALLOC_STATS"
3585 msgstr "MALLOC_STATS"
3588 #: build/C/man3/malloc_stats.3:29
3589 msgid "malloc_stats - print memory allocation statistics"
3590 msgstr "malloc_stats - メモリー割り当ての統計を表示する"
3593 #: build/C/man3/malloc_stats.3:33
3594 msgid "B<void malloc_stats(void);>"
3595 msgstr "B<void malloc_stats(void);>"
3598 #. Available already in glibc 2.0, possibly earlier
3600 #: build/C/man3/malloc_stats.3:55
3602 "The B<malloc_stats>() function prints (on standard error) statistics about "
3603 "memory allocated by B<malloc>(3) and related functions. For each arena "
3604 "(allocation area), this function prints the total amount of memory allocated "
3605 "and the total number of bytes consumed by in-use allocations. (These two "
3606 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3607 "B<mallinfo>(3).) In addition, the function prints the sum of these two "
3608 "statistics for all arenas, and the maximum number of blocks and bytes that "
3609 "were ever simultaneously allocated using B<mmap>(2)."
3611 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3612 "リーに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3613 "て、 この関数は割り当てられているメモリーの総量と現在の割り当てが使用している"
3614 "総バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる "
3615 "I<arena> と I<uordblks> フィールドに対応している)。 また、この関数は、 すべて"
3616 "の領域のこれら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てら"
3617 "れたブロック数とバイト数の最大値を表示する。"
3620 #: build/C/man3/malloc_stats.3:61
3622 "More detailed information about memory allocations in the main arena can be "
3623 "obtained using B<mallinfo>(3)."
3625 "B<mallinfo>(3) を使用すると、 メイン領域のメモリー割り当てに関するより詳細な"
3629 #: build/C/man3/malloc_stats.3:67
3631 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3633 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3636 #: build/C/man3/malloc_trim.3:26
3639 msgstr "MALLOC_TRIM"
3642 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3648 #: build/C/man3/malloc_trim.3:29
3649 msgid "malloc_trim - release free memory from the top of the heap"
3650 msgstr "malloc_trim - ヒープの一番上から未使用メモリーを解放する"
3653 #: build/C/man3/malloc_trim.3:33
3654 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3655 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3658 #: build/C/man3/malloc_trim.3:40
3660 "The B<malloc_trim>() function attempts to release free memory at the top of "
3661 "the heap (by calling B<sbrk>(2) with a suitable argument)."
3663 "B<malloc_trim>() 関数は (適切な引き数で B<sbrk>(2) を呼び出して) ヒープの一番"
3667 #: build/C/man3/malloc_trim.3:51
3669 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3670 "the top of the heap. If this argument is 0, only the minimum amount of "
3671 "memory is maintained at the top of the heap (i.e., one page or less). A "
3672 "nonzero argument can be used to maintain some trailing space at the top of "
3673 "the heap in order to allow future allocations to be made without having to "
3674 "extend the heap with B<sbrk>(2)."
3676 "I<pad> 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定す"
3677 "る。 この引き数が 0 の場合、 ヒープの一番上の最小量のメモリーだけを維持でき"
3678 "る (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、 ヒープの一番上"
3679 "にある程度の量の未使用領域を残し、 将来の割り当てを B<sbrk>(2) でヒープを拡張"
3683 #: build/C/man3/malloc_trim.3:56
3685 "The B<malloc_trim>() function returns 1 if memory was actually released "
3686 "back to the system, or 0 if it was not possible to release any memory."
3688 "B<malloc_trim>() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を"
3689 "返し、 どのメモリーも解放できなかった場合は 0 を返す。"
3692 #. Available already in glibc 2.0, possibly earlier
3694 #: build/C/man3/malloc_trim.3:60
3695 msgid "No errors are defined."
3696 msgstr "エラーは定義されていない。"
3699 #: build/C/man3/malloc_trim.3:71
3701 "This function is automatically called by B<free>(3) in certain "
3702 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3705 "この関数は、 特定の状況では B<free>(3) により自動的に呼び出される。 "
3706 "B<mallopt>(3) の B<M_TOP_PAD> と B<M_TRIM_THRESHOLD> の議論を参照。"
3709 #: build/C/man3/malloc_trim.3:74
3711 "This function cannot release free memory located at places other than the "
3714 "この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはでき"
3717 #. malloc/malloc.c::mTRIm():
3718 #. return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3720 #: build/C/man3/malloc_trim.3:78
3721 msgid "This function releases only memory in the main arena."
3722 msgstr "この関数はメイン領域のメモリーだけを解放する。"
3725 #: build/C/man3/malloc_trim.3:82
3726 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3727 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3730 #: build/C/man3/malloc_usable_size.3:25
3732 msgid "MALLOC_USABLE_SIZE"
3733 msgstr "MALLOC_USABLE_SIZE"
3736 #: build/C/man3/malloc_usable_size.3:28
3737 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3739 "malloc_usable_size - ヒープから確保したメモリーブロックのサイズを取得する"
3742 #: build/C/man3/malloc_usable_size.3:32
3743 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3744 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3747 #: build/C/man3/malloc_usable_size.3:40
3749 "The B<malloc_usable_size>() function returns the number of usable bytes in "
3750 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3751 "B<malloc>(3) or a related function."
3753 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3754 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリーブロックへ"
3758 #: build/C/man3/malloc_usable_size.3:48
3760 "B<malloc_usable_size>() returns the number of usable bytes in the block of "
3761 "allocated memory pointed to by I<ptr>. If I<ptr> is NULL, 0 is returned."
3763 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリーブロックで使用可"
3764 "能なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3767 #: build/C/man3/malloc_usable_size.3:53
3768 msgid "The B<malloc_usable_size>() function is thread-safe."
3769 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3772 #: build/C/man3/malloc_usable_size.3:65
3774 "The value returned by B<malloc_usable_size>() may be greater than the "
3775 "requested size of the allocation because of alignment and minimum size "
3776 "constraints. Although the excess bytes can be overwritten by the "
3777 "application without ill effects, this is not good programming practice: the "
3778 "number of excess bytes in an allocation depends on the underlying "
3781 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3782 "がある。 これは、メモリーアラインメントと最小サイズの制約のためである。 この"
3783 "超過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行"
3784 "うのはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超"
3785 "過バイトの量は、内部の実装に依存する。"
3788 #: build/C/man3/malloc_usable_size.3:67
3789 msgid "The main use of this function is for debugging and introspection."
3790 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3793 #: build/C/man3/malloc_usable_size.3:69
3794 msgid "B<malloc>(3)"
3795 msgstr "B<malloc>(3)"
3798 #: build/C/man3/mallopt.3:26
3804 #: build/C/man3/mallopt.3:26 build/C/man2/shmop.2:41
3810 #: build/C/man3/mallopt.3:29
3811 msgid "mallopt - set memory allocation parameters"
3812 msgstr "mallopt - メモリー割り当てパラメーターを設定する"
3815 #: build/C/man3/mallopt.3:33
3816 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3817 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3820 #: build/C/man3/mallopt.3:44
3822 "The B<mallopt>() function adjusts parameters that control the behavior of "
3823 "the memory-allocation functions (see B<malloc>(3)). The I<param> argument "
3824 "specifies the parameter to be modified, and I<value> specifies the new value "
3825 "for that parameter."
3827 "B<mallopt>() 関数は、メモリー割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3828 "制御するパラメーターの調整を行う。\n"
3829 "I<param> 引き数で変更するパラメーターを指定し、\n"
3830 "I<value> 引き数でそのパラメーターの新しい値を指定する。"
3833 #: build/C/man3/mallopt.3:47
3834 msgid "The following values can be specified for I<param>:"
3835 msgstr "I<param> には以下の値を指定することができる。"
3838 #: build/C/man3/mallopt.3:47
3840 msgid "B<M_CHECK_ACTION>"
3841 msgstr "B<M_CHECK_ACTION>"
3844 #: build/C/man3/mallopt.3:53
3846 "Setting this parameter controls how glibc responds when various kinds of "
3847 "programming errors are detected (e.g., freeing the same pointer twice). The "
3848 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3849 "parameter determine the glibc behavior, as follows:"
3853 #: build/C/man3/mallopt.3:54
3859 #: build/C/man3/mallopt.3:64
3861 "If this bit is set, then print a one-line message on I<stderr> that provides "
3862 "details about the error. The message starts with the string \"***\\ glibc "
3863 "detected\\ ***\", followed by the program name, the name of the memory-"
3864 "allocation function in which the error was detected, a brief description of "
3865 "the error, and the memory address where the error was detected."
3869 #: build/C/man3/mallopt.3:64
3875 #: build/C/man3/mallopt.3:79
3877 "If this bit is set, then, after printing any error message specified by bit "
3878 "0, the program is terminated by calling B<abort>(3). In glibc versions "
3879 "since 2.4, if bit 0 is also set, then, between printing the error message "
3880 "and aborting, the program also prints a stack trace in the manner of "
3881 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3882 "proc/[pid]/maps> (see B<proc>(5))."
3886 #: build/C/man3/mallopt.3:79
3888 msgid "Bit 2 (since glibc 2.4)"
3889 msgstr "Bit 2 (glibc 2.4 以降)"
3892 #: build/C/man3/mallopt.3:86
3894 "This bit has an effect only if bit 0 is also set. If this bit is set, then "
3895 "the one-line message describing the error is simplified to contain just the "
3896 "name of the function where the error was detected and the brief description "
3901 #: build/C/man3/mallopt.3:91
3902 msgid "The remaining bits in I<value> are ignored."
3906 #: build/C/man3/mallopt.3:95
3908 "Combining the above details, the following numeric values are meaningful for "
3909 "B<M_CHECK_ACTION>:"
3913 #: build/C/man3/mallopt.3:96
3919 #: build/C/man3/mallopt.3:98
3920 msgid "Ignore error conditions; continue execution (with undefined results)."
3924 #: build/C/man3/mallopt.3:98
3930 #: build/C/man3/mallopt.3:100
3931 msgid "Print a detailed error message and continue execution."
3935 #: build/C/man3/mallopt.3:100
3941 #: build/C/man3/mallopt.3:102
3942 msgid "Abort the program."
3946 #: build/C/man3/mallopt.3:102
3952 #: build/C/man3/mallopt.3:105
3954 "Print detailed error message, stack trace, and memory mappings, and abort "
3959 #: build/C/man3/mallopt.3:105
3965 #: build/C/man3/mallopt.3:107
3966 msgid "Print a simple error message and continue execution."
3970 #: build/C/man3/mallopt.3:107
3976 #: build/C/man3/mallopt.3:110
3978 "Print simple error message, stack trace, and memory mappings, and abort the "
3983 #: build/C/man3/mallopt.3:116
3985 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3986 "3. In glibc version 2.3.3 and earlier, the default value is 1."
3990 #: build/C/man3/mallopt.3:121
3992 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3993 "crash may happen much later, and the true cause of the problem is then very "
3994 "hard to track down."
3998 #: build/C/man3/mallopt.3:121
4000 msgid "B<M_MMAP_MAX>"
4001 msgstr "B<M_MMAP_MAX>"
4003 #. The following text adapted from comments in the glibc source:
4005 #: build/C/man3/mallopt.3:131
4007 "This parameter specifies the maximum number of allocation requests that may "
4008 "be simultaneously serviced using B<mmap>(2). This parameter exists because "
4009 "some systems have a limited number of internal tables for use by B<mmap>(2), "
4010 "and using more than a few of them may degrade performance."
4014 #: build/C/man3/mallopt.3:138
4016 "The default value is 65,536, a value which has no special significance and "
4017 "which servers only as a safeguard. Setting this parameter to 0 disables the "
4018 "use of B<mmap>(2) for servicing large allocation requests."
4022 #: build/C/man3/mallopt.3:138
4024 msgid "B<M_MMAP_THRESHOLD>"
4025 msgstr "B<M_MMAP_THRESHOLD>"
4028 #: build/C/man3/mallopt.3:147
4030 "For allocations greater than or equal to the limit specified (in bytes) by "
4031 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
4032 "allocation functions employ B<mmap>(2) instead of increasing the program "
4033 "break using B<sbrk>(2)."
4037 #: build/C/man3/mallopt.3:167
4039 "Allocating memory using B<mmap>(2) has the significant advantage that the "
4040 "allocated memory blocks can always be independently released back to the "
4041 "system. (By contrast, the heap can be trimmed only if memory is freed at "
4042 "the top end.) On the other hand, there are some disadvantages to the use of "
4043 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
4044 "later allocations; memory may be wasted because B<mmap>(2) allocations must "
4045 "be page-aligned; and the kernel must perform the expensive task of zeroing "
4046 "out memory allocated via B<mmap>(2). Balancing these factors leads to a "
4047 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
4051 #: build/C/man3/mallopt.3:174
4053 "The lower limit for this parameter is 0. The upper limit is "
4054 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
4055 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
4059 #: build/C/man3/mallopt.3:192
4061 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default. The "
4062 "initial value of the threshold is 128*1024, but when blocks larger than the "
4063 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
4064 "are freed, the threshold is adjusted upward to the size of the freed block. "
4065 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
4066 "heap is also dynamically adjusted to be twice the dynamic mmap threshold. "
4067 "Dynamic adjustment of the mmap threshold is disabled if any of the "
4068 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
4069 "parameters is set."
4073 #: build/C/man3/mallopt.3:192
4075 msgid "B<M_MXFAST> (since glibc 2.3)"
4076 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
4078 #. The following text adapted from comments in the glibc sources:
4080 #: build/C/man3/mallopt.3:212
4082 "Set the upper limit for memory allocation requests that are satisfied using "
4083 "\"fastbins\". (The measurement unit for this parameter is bytes.) Fastbins "
4084 "are storage areas that hold deallocated blocks of memory of the same size "
4085 "without merging adjacent free blocks. Subsequent reallocation of blocks of "
4086 "the same size can be handled very quickly by allocating from the fastbin, "
4087 "although memory fragmentation and the overall memory footprint of the "
4088 "program can increase. The default value for this parameter is "
4089 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures). The range for "
4090 "this parameter is 0 to I<80*sizeof(size_t)/4>. Setting B<M_MXFAST> to 0 "
4091 "disables the use of fastbins."
4095 #: build/C/man3/mallopt.3:212
4097 msgid "B<M_PERTURB> (since glibc 2.4)"
4098 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4101 #: build/C/man3/mallopt.3:227
4103 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4104 "(other than allocations via B<calloc>(3)) are initialized to the complement "
4105 "of the value in the least significant byte of I<value>, and when allocated "
4106 "memory is released using B<free>(3), the freed bytes are set to the least "
4107 "significant byte of I<value>. This can be useful for detecting errors where "
4108 "programs incorrectly rely on allocated memory being initialized to zero, or "
4109 "reuse values in memory that has already been freed."
4113 #: build/C/man3/mallopt.3:227
4115 msgid "B<M_TOP_PAD>"
4116 msgstr "B<M_TOP_PAD>"
4119 #: build/C/man3/mallopt.3:234
4121 "This parameter defines the amount of padding to employ when calling "
4122 "B<sbrk>(2) to modify the program break. (The measurement unit for this "
4123 "parameter is bytes.) This parameter has an effect in the following "
4128 #: build/C/man3/mallopt.3:241
4130 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4131 "the B<sbrk>(2) request."
4135 #: build/C/man3/mallopt.3:247
4137 "When the heap is trimmed as a consequence of calling B<free>(3) (see the "
4138 "discussion of B<M_TRIM_THRESHOLD>) this much free space is preserved at the "
4143 #: build/C/man3/mallopt.3:251
4145 "In either case, the amount of padding is always rounded to a system page "
4150 #: build/C/man3/mallopt.3:258
4152 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4153 "system calls (when the parameter is set low) and wasting unused memory at "
4154 "the top of the heap (when the parameter is set high)."
4157 #. DEFAULT_TOP_PAD in glibc source
4159 #: build/C/man3/mallopt.3:261
4160 msgid "The default value for this parameter is 128*1024."
4164 #: build/C/man3/mallopt.3:261
4166 msgid "B<M_TRIM_THRESHOLD>"
4167 msgstr "B<M_TRIM_THRESHOLD>"
4170 #: build/C/man3/mallopt.3:277
4172 "When the amount of contiguous free memory at the top of the heap grows "
4173 "sufficiently large, B<free>(3) employs B<sbrk>(2) to release this memory "
4174 "back to the system. (This can be useful in programs that continue to "
4175 "execute for a long period after freeing a significant amount of memory.) "
4176 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4177 "this block of memory must reach before B<sbrk>(2) is used to trim the heap."
4181 #: build/C/man3/mallopt.3:282
4183 "The default value for this parameter is 128*1024. Setting "
4184 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4190 #. FIXME Do the arena parameters need to be documented?
4192 #. .BR M_ARENA_TEST " (since glibc 2.10)"
4194 #. .BR M_ARENA_MAX " (since glibc 2.10)"
4195 #. Environment variables
4196 #. MALLOC_ARENA_MAX_
4197 #. MALLOC_ARENA_TEST_
4198 #. http://udrepper.livejournal.com/20948.html describes some details
4199 #. of the MALLOC_ARENA_* environment variables.
4200 #. These macros aren't enabled in production releases until 2.15?
4201 #. (see glibc malloc/Makefile)
4203 #: build/C/man3/mallopt.3:305
4205 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4206 "of system calls (when the parameter is set low) and wasting unused memory "
4207 "at the top of the heap (when the parameter is set high)."
4211 #: build/C/man3/mallopt.3:305
4213 msgid "Environment variables"
4217 #: build/C/man3/mallopt.3:320
4219 "A number of environment variables can be defined to modify some of the same "
4220 "parameters as are controlled by B<mallopt>(). Using these variables has the "
4221 "advantage that the source code of the program need not be changed. To be "
4222 "effective, these variables must be defined before the first call to a memory-"
4223 "allocation function. (If the same parameters are adjusted via B<mallopt>(), "
4224 "then the B<mallopt>() settings take precedence.) For security reasons, "
4225 "these variables are ignored in set-user-ID and set-group-ID programs."
4229 #: build/C/man3/mallopt.3:323
4231 "The environment variables are as follows (note the trailing underscore at "
4232 "the end of the name of each variable):"
4236 #: build/C/man3/mallopt.3:323
4238 msgid "B<MALLOC_CHECK_>"
4239 msgstr "B<MALLOC_CHECK_>"
4241 #. On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4242 #. when MALLOC_CHECK_ was set.
4244 #: build/C/man3/mallopt.3:340
4246 "This environment variable controls the same parameter as B<mallopt>() "
4247 "B<M_CHECK_ACTION>. If this variable is set to a nonzero value, then a "
4248 "special implementation of the memory-allocation functions is used. (This is "
4249 "accomplished using the B<malloc_hook>(3) feature.) This implementation "
4250 "performs additional error checking, but is slower than the standard set of "
4251 "memory-allocation functions. (This implementation does not detect all "
4252 "possible errors; memory leaks can still occur.)"
4256 #: build/C/man3/mallopt.3:345
4258 "The value assigned to this environment variable should be a single digit, "
4259 "whose meaning is as described for B<M_CHECK_ACTION>. Any characters beyond "
4260 "the initial digit are ignored."
4264 #: build/C/man3/mallopt.3:354
4266 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4267 "for set-user-ID and set-group-ID programs. However, if the file I</etc/suid-"
4268 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4269 "also has an effect for set-user-ID and set-group-ID programs."
4273 #: build/C/man3/mallopt.3:354
4275 msgid "B<MALLOC_MMAP_MAX_>"
4276 msgstr "B<MALLOC_MMAP_MAX_>"
4279 #: build/C/man3/mallopt.3:359
4280 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_MAX>."
4284 #: build/C/man3/mallopt.3:359
4286 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4287 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4290 #: build/C/man3/mallopt.3:364
4291 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_THRESHOLD>."
4295 #: build/C/man3/mallopt.3:364
4297 msgid "B<MALLOC_PERTURB_>"
4298 msgstr "B<MALLOC_PERTURB_>"
4301 #: build/C/man3/mallopt.3:369
4302 msgid "Controls the same parameter as B<mallopt>() B<M_PERTURB>."
4306 #: build/C/man3/mallopt.3:369
4308 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4309 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4312 #: build/C/man3/mallopt.3:374
4313 msgid "Controls the same parameter as B<mallopt>() B<M_TRIM_THRESHOLD>."
4317 #: build/C/man3/mallopt.3:374
4319 msgid "B<MALLOC_TOP_PAD_>"
4320 msgstr "B<MALLOC_TOP_PAD_>"
4323 #: build/C/man3/mallopt.3:379
4324 msgid "Controls the same parameter as B<mallopt>() B<M_TOP_PAD>."
4328 #: build/C/man3/mallopt.3:384
4329 msgid "On success, B<mallopt>() returns 1. On error, it returns 0."
4330 msgstr "B<mallopt>() は成功すると 1 を返す。エラーの場合は 0 を返す。"
4333 #. Available already in glibc 2.0, possibly earlier
4335 #: build/C/man3/mallopt.3:392
4336 msgid "On error, I<errno> is I<not> set."
4337 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4341 #: build/C/man3/mallopt.3:406
4343 "This function is not specified by POSIX or the C standards. A similar "
4344 "function exists on many System V derivatives, but the range of values for "
4345 "I<param> varies across systems. The SVID defined options B<M_MXFAST>, "
4346 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4347 "implemented in glibc."
4351 #: build/C/man3/mallopt.3:410
4352 msgid "Specifying an invalid value for I<param> does not generate an error."
4355 #. FIXME . This looks buggy:
4356 #. setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4357 #. malloc requests are rounded up:
4358 #. (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4359 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4361 #: build/C/man3/mallopt.3:418
4363 "A calculation error within the glibc implementation means that a call of the "
4368 #: build/C/man3/mallopt.3:421
4370 msgid " mallopt(M_MXFAST, n)\n"
4371 msgstr " mallopt(M_MXFAST, n)\n"
4373 #. Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4375 #: build/C/man3/mallopt.3:433
4377 "does not result in fastbins being employed for all allocations of size up to "
4378 "I<n>. To ensure desired results, I<n> should be rounded up to the next "
4379 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4383 #. FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4385 #: build/C/man3/mallopt.3:454
4387 "If B<mallopt>() is used to set B<M_PERTURB>, then, as expected, the bytes "
4388 "of allocated memory are initialized to the complement of the byte in "
4389 "I<value>, and when that memory is freed, the bytes of the region are "
4390 "initialized to the byte specified in I<value>. However, there is an off-by-"
4391 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4392 "precisely the block of memory being freed by the call I<free(p)>, the block "
4393 "starting at I<p+sizeof(size_t)> is initialized."
4397 #: build/C/man3/mallopt.3:463
4399 "The program below demonstrates the use of B<M_CHECK_ACTION>. If the program "
4400 "is supplied with an (integer) command-line argument, then that argument is "
4401 "used to set the B<M_CHECK_ACTION> parameter. The program then allocates a "
4402 "block of memory, and frees it twice (an error)."
4406 #: build/C/man3/mallopt.3:467
4408 "The following shell session shows what happens when we run this program "
4409 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4413 #: build/C/man3/mallopt.3:487
4417 "main(): returned from first free() call\n"
4418 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4419 "======= Backtrace: =========\n"
4420 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4421 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4422 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4423 "\\&./a.out[0x80485db]\n"
4424 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4425 "\\&./a.out[0x8048471]\n"
4426 "======= Memory map: ========\n"
4427 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
4428 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
4429 "[some lines omitted]\n"
4430 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4431 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
4432 "Aborted (core dumped)\n"
4435 "main(): returned from first free() call\n"
4436 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4437 "======= Backtrace: =========\n"
4438 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4439 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4440 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4441 "\\&./a.out[0x80485db]\n"
4442 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4443 "\\&./a.out[0x8048471]\n"
4444 "======= Memory map: ========\n"
4445 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
4446 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
4447 "[some lines omitted]\n"
4448 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4449 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
4450 "Aborted (core dumped)\n"
4453 #: build/C/man3/mallopt.3:492
4455 "The following runs show the results when employing other values for "
4456 "B<M_CHECK_ACTION>:"
4460 #: build/C/man3/mallopt.3:505
4463 "$ B<./a.out 1> # Diagnose error and continue\n"
4464 "main(): returned from first free() call\n"
4465 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4466 "main(): returned from second free() call\n"
4467 "$ B<./a.out 2> # Abort without error message\n"
4468 "main(): returned from first free() call\n"
4469 "Aborted (core dumped)\n"
4470 "$ B<./a.out 0> # Ignore error and continue\n"
4471 "main(): returned from first free() call\n"
4472 "main(): returned from second free() call\n"
4474 "$ B<./a.out 1> # Diagnose error and continue\n"
4475 "main(): returned from first free() call\n"
4476 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4477 "main(): returned from second free() call\n"
4478 "$ B<./a.out 2> # Abort without error message\n"
4479 "main(): returned from first free() call\n"
4480 "Aborted (core dumped)\n"
4481 "$ B<./a.out 0> # Ignore error and continue\n"
4482 "main(): returned from first free() call\n"
4483 "main(): returned from second free() call\n"
4486 #: build/C/man3/mallopt.3:511
4488 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4489 "environment variable:"
4493 #: build/C/man3/mallopt.3:518
4496 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4497 "main(): returned from first free() call\n"
4498 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4499 "main(): returned from second free() call\n"
4501 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4502 "main(): returned from first free() call\n"
4503 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4504 "main(): returned from second free() call\n"
4507 #: build/C/man3/mallopt.3:526
4510 "#include E<lt>malloc.hE<gt>\n"
4511 "#include E<lt>stdio.hE<gt>\n"
4512 "#include E<lt>stdlib.hE<gt>\n"
4514 "#include E<lt>malloc.hE<gt>\n"
4515 "#include E<lt>stdio.hE<gt>\n"
4516 "#include E<lt>stdlib.hE<gt>\n"
4519 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4523 "main(int argc, char *argv[])\n"
4528 "main(int argc, char *argv[])\n"
4533 #: build/C/man3/mallopt.3:538
4536 " if (argc E<gt> 1) {\n"
4537 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4538 " fprintf(stderr, \"mallopt() failed\");\n"
4539 " exit(EXIT_FAILURE);\n"
4543 " if (argc E<gt> 1) {\n"
4544 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4545 " fprintf(stderr, \"mallopt() failed\");\n"
4546 " exit(EXIT_FAILURE);\n"
4551 #: build/C/man3/mallopt.3:544
4554 " p = malloc(1000);\n"
4555 " if (p == NULL) {\n"
4556 " fprintf(stderr, \"malloc() failed\");\n"
4557 " exit(EXIT_FAILURE);\n"
4560 " p = malloc(1000);\n"
4561 " if (p == NULL) {\n"
4562 " fprintf(stderr, \"malloc() failed\");\n"
4563 " exit(EXIT_FAILURE);\n"
4567 #: build/C/man3/mallopt.3:547
4571 " printf(\"main(): returned from first free() call\\en\");\n"
4574 " printf(\"main(): returned from first free() call\\en\");\n"
4577 #: build/C/man3/mallopt.3:550
4581 " printf(\"main(): returned from second free() call\\en\");\n"
4584 " printf(\"main(): returned from second free() call\\en\");\n"
4587 #: build/C/man3/mallopt.3:568
4589 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4590 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4591 "B<mtrace>(3), B<posix_memalign>(3)"
4593 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4594 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4595 "B<mtrace>(3), B<posix_memalign>(3)"
4598 #: build/C/man3/mcheck.3:25
4604 #: build/C/man3/mcheck.3:25
4610 #: build/C/man3/mcheck.3:28
4612 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4616 #: build/C/man3/mcheck.3:31
4618 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4619 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4622 #: build/C/man3/mcheck.3:33
4624 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4628 #: build/C/man3/mcheck.3:35
4630 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4634 #: build/C/man3/mcheck.3:37
4636 msgid "B<void mcheck_check_all(void);>\n"
4637 msgstr "B<void mcheck_check_all(void);>\n"
4640 #: build/C/man3/mcheck.3:39
4642 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4643 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4646 #: build/C/man3/mcheck.3:51
4648 "The B<mcheck>() function installs a set of debugging hooks for the "
4649 "B<malloc>(3) family of memory-allocation functions. These hooks cause "
4650 "certain consistency checks to be performed on the state of the heap. The "
4651 "checks can detect application errors such as freeing a block of memory more "
4652 "than once or corrupting the bookkeeping data structures that immediately "
4653 "precede a block of allocated memory."
4657 #: build/C/man3/mcheck.3:63
4659 "To be effective, the B<mcheck>() function must be called before the first "
4660 "call to B<malloc>(3) or a related function. In cases where this is "
4661 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4662 "implicit call to B<mcheck>() (with a NULL argument) before the first call "
4663 "to a memory-allocation function."
4667 #: build/C/man3/mcheck.3:71
4669 "The B<mcheck_pedantic>() function is similar to B<mcheck>(), but performs "
4670 "checks on all allocated blocks whenever one of the memory-allocation "
4671 "functions is called. This can be very slow!"
4675 #: build/C/man3/mcheck.3:78
4677 "The B<mcheck_check_all>() function causes an immediate check on all "
4678 "allocated blocks. This call is effective only if B<mcheck>() is called "
4683 #: build/C/man3/mcheck.3:91
4685 "If the system detects an inconsistency in the heap, the caller-supplied "
4686 "function pointed to by I<abortfunc> is invoked with a single argument "
4687 "argument, I<mstatus>, that indicates what type of inconsistency was "
4688 "detected. If I<abortfunc> is NULL, a default function prints an error "
4689 "message on I<stderr> and calls B<abort>(3)."
4693 #: build/C/man3/mcheck.3:103
4695 "The B<mprobe>() function performs a consistency check on the block of "
4696 "allocated memory pointed to by I<ptr>. The B<mcheck>() function should be "
4697 "called beforehand (otherwise B<mprobe>() returns B<MCHECK_DISABLED>)."
4701 #: build/C/man3/mcheck.3:111
4703 "The following list describes the values returned by B<mprobe>() or passed "
4704 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4708 #: build/C/man3/mcheck.3:111
4710 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4714 #: build/C/man3/mcheck.3:116
4716 "B<mcheck>() was not called before the first memory allocation function was "
4717 "called. Consistency checking is not possible."
4721 #: build/C/man3/mcheck.3:116
4723 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4727 #: build/C/man3/mcheck.3:119
4728 msgid "No inconsistency detected."
4732 #: build/C/man3/mcheck.3:119
4734 msgid "B<MCHECK_HEAD>"
4735 msgstr "B<MCHECK_HEAD>"
4738 #: build/C/man3/mcheck.3:122
4739 msgid "Memory preceding an allocated block was clobbered."
4743 #: build/C/man3/mcheck.3:122
4745 msgid "B<MCHECK_TAIL>"
4746 msgstr "B<MCHECK_TAIL>"
4749 #: build/C/man3/mcheck.3:125
4750 msgid "Memory following an allocated block was clobbered."
4754 #: build/C/man3/mcheck.3:125
4756 msgid "B<MCHECK_FREE>"
4757 msgstr "B<MCHECK_FREE>"
4760 #: build/C/man3/mcheck.3:129
4761 msgid "A block of memory was freed twice."
4765 #: build/C/man3/mcheck.3:134
4767 "B<mcheck>() and B<mcheck_pedantic>() return 0 on success, or -1 on error."
4771 #: build/C/man3/mcheck.3:145
4773 "The B<mcheck_pedantic>() and B<mcheck_check_all>() functions are available "
4774 "since glibc 2.2. The B<mcheck>() and B<mprobe>() functions are present "
4775 "since at least glibc 2.0"
4778 #. But is MALLOC_CHECK_ slower?
4780 #: build/C/man3/mcheck.3:159
4782 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4783 "environment variable (described in B<mallopt>(3)) cause the same kinds of "
4784 "errors to be detected. But, using B<MALLOC_CHECK_> does not require the "
4785 "application to be relinked."
4789 #: build/C/man3/mcheck.3:165
4791 "The program below calls B<mcheck>() with a NULL argument and then frees the "
4792 "same block of memory twice. The following shell session demonstrates what "
4793 "happens when running the program:"
4797 #: build/C/man3/mcheck.3:170
4805 #: build/C/man3/mcheck.3:174
4808 "About to free a second time\n"
4809 "block freed twice\n"
4810 "Aborted (core dumped)\n"
4814 #: build/C/man3/mcheck.3:182
4817 "#include E<lt>stdlib.hE<gt>\n"
4818 "#include E<lt>stdio.hE<gt>\n"
4819 "#include E<lt>mcheck.hE<gt>\n"
4821 "#include E<lt>stdlib.hE<gt>\n"
4822 "#include E<lt>stdio.hE<gt>\n"
4823 "#include E<lt>mcheck.hE<gt>\n"
4826 #: build/C/man3/mcheck.3:190
4829 " if (mcheck(NULL) != 0) {\n"
4830 " fprintf(stderr, \"mcheck() failed\\en\");\n"
4834 #: build/C/man3/mcheck.3:193
4837 " exit(EXIT_FAILURE);\n"
4840 " exit(EXIT_FAILURE);\n"
4844 #: build/C/man3/mcheck.3:195
4846 msgid " p = malloc(1000);\n"
4847 msgstr " p = malloc(1000);\n"
4850 #: build/C/man3/mcheck.3:200
4853 " fprintf(stderr, \"About to free\\en\");\n"
4855 " fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4860 #: build/C/man3/mcheck.3:208
4861 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4862 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4865 #: build/C/man2/mlock.2:26
4871 #: build/C/man2/mlock.2:26
4877 #: build/C/man2/mlock.2:29
4878 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4879 msgstr "mlock - メモリーのロックとロック解除を行う"
4882 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4883 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4885 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4886 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4889 #: build/C/man2/mlock.2:35
4892 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4893 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4895 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4896 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4899 #: build/C/man2/mlock.2:38
4902 "B<int mlockall(int >I<flags>B<);>\n"
4903 "B<int munlockall(void);>\n"
4905 "B<int mlockall(int >I<flags>B<);>\n"
4906 "B<int munlockall(void);>\n"
4909 #: build/C/man2/mlock.2:54
4911 "B<mlock>() and B<mlockall>() respectively lock part or all of the calling "
4912 "process's virtual address space into RAM, preventing that memory from being "
4913 "paged to the swap area. B<munlock>() and B<munlockall>() perform the "
4914 "converse operation, respectively unlocking part or all of the calling "
4915 "process's virtual address space, so that pages in the specified virtual "
4916 "address range may once more to be swapped out if required by the kernel "
4917 "memory manager. Memory locking and unlocking are performed in units of "
4920 "B<mlock>() と B<mlockall>() はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4921 "間の一部または全部を RAM 上にロックし、メモリーがスワップエリアにページングさ"
4922 "れるのを防ぐ。 B<munlock>() と B<munlockall>() は逆の操作で、それぞれ呼び出"
4923 "し元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定"
4924 "された仮想アドレス範囲のページは カーネルメモリーマネージャーから要求されれば"
4925 "スワップアウトするようになる。 メモリーのロックとロック解除はページ単位で行わ"
4929 #: build/C/man2/mlock.2:54
4931 msgid "mlock() and munlock()"
4932 msgstr "mlock() と munlock()"
4935 #: build/C/man2/mlock.2:64
4937 "B<mlock>() locks pages in the address range starting at I<addr> and "
4938 "continuing for I<len> bytes. All pages that contain a part of the specified "
4939 "address range are guaranteed to be resident in RAM when the call returns "
4940 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4942 "B<mlock>() は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4943 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4944 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4945 "れるまで RAM に残り続けることが保証される。"
4948 #: build/C/man2/mlock.2:73
4950 "B<munlock>() unlocks pages in the address range starting at I<addr> and "
4951 "continuing for I<len> bytes. After this call, all pages that contain a part "
4952 "of the specified memory range can be moved to external swap space again by "
4955 "B<munlock>() は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4956 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリー"
4957 "範囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4960 #: build/C/man2/mlock.2:73
4962 msgid "mlockall() and munlockall()"
4963 msgstr "mlockall() と munlockall()"
4966 #: build/C/man2/mlock.2:83
4968 "B<mlockall>() locks all pages mapped into the address space of the calling "
4969 "process. This includes the pages of the code, data and stack segment, as "
4970 "well as shared libraries, user space kernel data, shared memory, and memory-"
4971 "mapped files. All mapped pages are guaranteed to be resident in RAM when "
4972 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4975 "B<mlockall>() は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4976 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4977 "ラリ、カーネルのユーザー空間データ、 共有メモリー、メモリーマップされたファイ"
4978 "ルが含まれる。 システムコールが成功した場合には全てのマップされたページは "
4979 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4983 #: build/C/man2/mlock.2:88
4985 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4986 "following constants:"
4987 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4990 #: build/C/man2/mlock.2:88
4992 msgid "B<MCL_CURRENT>"
4993 msgstr "B<MCL_CURRENT>"
4996 #: build/C/man2/mlock.2:92
4998 "Lock all pages which are currently mapped into the address space of the "
5001 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
5004 #: build/C/man2/mlock.2:92
5006 msgid "B<MCL_FUTURE>"
5007 msgstr "B<MCL_FUTURE>"
5010 #: build/C/man2/mlock.2:99
5012 "Lock all pages which will become mapped into the address space of the "
5013 "process in the future. These could be for instance new pages required by a "
5014 "growing heap and stack as well as new memory-mapped files or shared memory "
5017 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
5018 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
5019 "くメモリーマップされたファイルや共有メモリー領域もロックされる。"
5022 #: build/C/man2/mlock.2:112
5024 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
5025 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
5026 "of locked bytes to exceed the permitted maximum (see below). In the same "
5027 "circumstances, stack growth may likewise fail: the kernel will deny stack "
5028 "expansion and deliver a B<SIGSEGV> signal to the process."
5030 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
5031 "B<sbrk>(2), B<malloc>(3)) は、ロックするバイト数が許可された最大値 (下記参"
5032 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
5033 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
5037 #: build/C/man2/mlock.2:116
5039 "B<munlockall>() unlocks all pages mapped into the address space of the "
5042 "B<munlockall>() は、呼び出し元プロセスのアドレス空間にマッピングされている "
5046 #: build/C/man2/mlock.2:122
5048 "On success these system calls return 0. On error, -1 is returned, I<errno> "
5049 "is set appropriately, and no changes are made to any locks in the address "
5050 "space of the process."
5052 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
5053 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
5057 #: build/C/man2/mlock.2:131
5059 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
5060 "resource limit, but tried to lock more memory than the limit permitted. "
5061 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
5063 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
5064 "つが、制限が許可している以上のメモリーをロックしようとした。 この制限は、プロ"
5065 "セスが特権 (B<CAP_IPC_LOCK>) を持っている場合は適用されない。"
5067 #. In the case of mlock(), this check is somewhat buggy: it doesn't
5068 #. take into account whether the to-be-locked range overlaps with
5069 #. already locked pages. Thus, suppose we allocate
5070 #. (num_physpages / 4 + 1) of memory, and lock those pages once using
5071 #. mlock(), and then lock the *same* page range a second time.
5072 #. In the case, the second mlock() call will fail, since the check
5073 #. calculates that the process is trying to lock (num_physpages / 2 + 2)
5074 #. pages, which of course is not true. (MTK, Nov 04, kernel 2.4.28)
5076 #: build/C/man2/mlock.2:143
5078 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
5081 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
5083 #. SVr4 documents an additional EAGAIN error code.
5085 #: build/C/man2/mlock.2:149
5087 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>) to "
5088 "perform the requested operation."
5090 "呼び出し側が特権を持っていないが、\n"
5091 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5094 #: build/C/man2/mlock.2:154
5095 msgid "For B<mlock>() and B<munlock>():"
5096 msgstr "B<mlock>() と B<munlock>() 用として:"
5099 #: build/C/man2/mlock.2:157
5100 msgid "Some or all of the specified address range could not be locked."
5101 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5104 #: build/C/man2/mlock.2:164
5106 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5107 "addition may have resulted in an overflow)."
5109 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5110 "(例えば、加算でオーバーフローが発生したなど)。"
5113 #: build/C/man2/mlock.2:169
5114 msgid "(Not on Linux) I<addr> was not a multiple of the page size."
5116 "(Linux ではこの意味で使われない) I<addr> がページサイズの倍数ではない。"
5119 #: build/C/man2/mlock.2:173
5121 "Some of the specified address range does not correspond to mapped pages in "
5122 "the address space of the process."
5124 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5128 #: build/C/man2/mlock.2:176
5129 msgid "For B<mlockall>():"
5130 msgstr "B<mlockall>() 用として:"
5133 #: build/C/man2/mlock.2:179
5134 msgid "Unknown I<flags> were specified."
5135 msgstr "未知の I<flags> が指定された。"
5138 #: build/C/man2/mlock.2:182
5139 msgid "For B<munlockall>():"
5140 msgstr "B<munlockall>() 用として:"
5143 #: build/C/man2/mlock.2:186
5145 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5147 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>) を持っていない。"
5150 #: build/C/man2/mlock.2:188
5151 msgid "POSIX.1-2001, SVr4."
5152 msgstr "POSIX.1-2001, SVr4."
5155 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:503 build/C/man2/msync.2:105
5157 msgid "AVAILABILITY"
5161 #: build/C/man2/mlock.2:200
5163 "On POSIX systems on which B<mlock>() and B<munlock>() are available, "
5164 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5165 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5166 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5168 "B<mlock>() と B<munlock>() が使用可能な POSIX システムでは "
5169 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5170 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5171 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5174 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5175 #. -1: unavailable, 0: ask using sysconf().
5176 #. glibc defines it to 1.
5178 #: build/C/man2/mlock.2:213
5180 "On POSIX systems on which B<mlockall>() and B<munlockall>() are available, "
5181 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5182 "than 0. (See also B<sysconf>(3).)"
5184 "B<mlockall>() と B<munlockall>() が利用可能な POSIX システムでは、 "
5185 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5186 "(B<sysconf>(3) も参照のこと)。"
5189 #: build/C/man2/mlock.2:231
5191 "Memory locking has two main applications: real-time algorithms and high-"
5192 "security data processing. Real-time applications require deterministic "
5193 "timing, and, like scheduling, paging is one major cause of unexpected "
5194 "program execution delays. Real-time applications will usually also switch "
5195 "to a real-time scheduler with B<sched_setscheduler>(2). Cryptographic "
5196 "security software often handles critical bytes like passwords or secret keys "
5197 "as data structures. As a result of paging, these secrets could be "
5198 "transferred onto a persistent swap store medium, where they might be "
5199 "accessible to the enemy long after the security software has erased the "
5200 "secrets in RAM and terminated. (But be aware that the suspend mode on "
5201 "laptops and some desktop computers will save a copy of the system's RAM to "
5202 "disk, regardless of memory locks.)"
5204 "メモリーのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5205 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5206 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5207 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5208 "いは B<sched_setscheduler>(2) でリアルタイムスケジューラに変更される。 暗号"
5209 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5210 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5211 "されるかもしれない。そして、セキュリティ ソフトウェアが RAM 上の秘密を削除し"
5212 "て終了したずっと後になっても、 このスワップされたデータには敵がアクセスできる"
5213 "可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サス"
5214 "ペンドモードはシステムの RAM の内容をメモリーのロックに関わらず ディスクに保"
5218 #: build/C/man2/mlock.2:244
5220 "Real-time processes that are using B<mlockall>() to prevent delays on page "
5221 "faults should reserve enough locked stack pages before entering the time-"
5222 "critical section, so that no page fault can be caused by function calls. "
5223 "This can be achieved by calling a function that allocates a sufficiently "
5224 "large automatic variable (an array) and writes to the memory occupied by "
5225 "this array in order to touch these stack pages. This way, enough pages will "
5226 "be mapped for the stack and can be locked into RAM. The dummy writes ensure "
5227 "that not even copy-on-write page faults can occur in the critical section."
5229 "リアルタイムプロセスが B<mlockall>() を使ってページフォールトによる遅延を防"
5230 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5231 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5232 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5233 "数 (の配列) を確保し、 これらのスタック用のページがメモリー上に確保されるよう"
5234 "にこの配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5235 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5236 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5237 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5240 #: build/C/man2/mlock.2:257
5242 "Memory locks are not inherited by a child created via B<fork>(2) and are "
5243 "automatically removed (unlocked) during an B<execve>(2) or when the process "
5244 "terminates. The B<mlockall>() B<MCL_FUTURE> setting is not inherited by a "
5245 "child created via B<fork>(2) and is cleared during an B<execve>(2)."
5247 "メモリーロックは B<fork>(2) で作成された子プロセスには継承されず、 "
5248 "B<execve>(2) が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5249 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5250 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5253 #: build/C/man2/mlock.2:261
5255 "The memory lock on an address range is automatically removed if the address "
5256 "range is unmapped via B<munmap>(2)."
5258 "あるアドレス範囲に対するメモリーロックは、そのアドレス範囲が B<munmap>(2) に"
5259 "よってアンマップされた場合は削除される。"
5262 #: build/C/man2/mlock.2:274
5264 "Memory locks do not stack, that is, pages which have been locked several "
5265 "times by calls to B<mlock>() or B<mlockall>() will be unlocked by a single "
5266 "call to B<munlock>() for the corresponding range or by B<munlockall>(). "
5267 "Pages which are mapped to several locations or by several processes stay "
5268 "locked into RAM as long as they are locked at least at one location or by at "
5269 "least one process."
5271 "メモリーのロックは累積しない。 すなわち複数回 B<mlock>() や B<mlockall>() "
5272 "を呼び出してロックされたページでも、 対応する範囲に対して B<munlock>() を 1 "
5273 "回呼び出したり B<munlockall>() を呼び出したりするだけでロック解除される。 複"
5274 "数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一"
5275 "つのプロセスでロックされている限りは RAM に残り続ける。"
5278 #: build/C/man2/mlock.2:285
5280 "Under Linux, B<mlock>() and B<munlock>() automatically round I<addr> down "
5281 "to the nearest page boundary. However, POSIX.1-2001 allows an "
5282 "implementation to require that I<addr> is page aligned, so portable "
5283 "applications should ensure this."
5285 "Linux では、 B<mlock>() と B<munlock>() は自動的に I<addr> を端数切り捨てに"
5286 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5287 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5288 "ケーションではきちんと境界に合わせた方が良い。"
5291 #: build/C/man2/mlock.2:298
5293 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5294 "many kilobytes of memory the process with ID I<PID> has locked using "
5295 "B<mlock>(), B<mlockall>(), and B<mmap>(2) B<MAP_LOCKED>."
5297 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5298 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5299 "ID が I<PID> のプロセスがロックしているメモリー量 (キロバイト単位) が\n"
5303 #: build/C/man2/mlock.2:298
5305 msgid "Limits and permissions"
5309 #: build/C/man2/mlock.2:305
5311 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>) "
5312 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5313 "defines a limit on how much memory the process may lock."
5315 "Linux 2.6.8 以前では、メモリーをロックするためには特権 (B<CAP_IPC_LOCK>) が"
5316 "必要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリーを"
5320 #: build/C/man2/mlock.2:311
5322 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5323 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5324 "instead defines a limit on how much memory an unprivileged process may lock."
5326 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリー量は無制限とな"
5327 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5328 "クできるメモリー量の制限を定義する。"
5331 #: build/C/man2/mlock.2:319
5333 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5334 "B<mlockall>() B<MCL_FUTURE> flag to be inherited across a B<fork>(2). This "
5335 "was rectified in kernel 2.4.18."
5337 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>() "
5338 "B<MCL_FUTURE> フラグが B<fork>(2) で継承されると言うバグがある。 これはカー"
5341 #. See the following LKML thread:
5342 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5343 #. "Rationale for RLIMIT_MEMLOCK"
5346 #: build/C/man2/mlock.2:336
5348 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5349 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5350 "example, setting its effective UID to a nonzero value), then subsequent "
5351 "memory allocations (e.g., B<mmap>(2), B<brk>(2)) will fail if the "
5352 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5354 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5355 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5356 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5357 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリー割り当て (例えば B<mmap>(2), "
5361 #: build/C/man2/mlock.2:343
5363 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5364 "B<capabilities>(7)"
5366 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5367 "B<capabilities>(7)"
5370 #: build/C/man2/mmap.2:40
5376 #: build/C/man2/mmap.2:43
5377 msgid "mmap, munmap - map or unmap files or devices into memory"
5378 msgstr "mmap, munmap - ファイルやデバイスをメモリーにマップ/アンマップする"
5381 #: build/C/man2/mmap.2:51
5384 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5385 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
5386 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5388 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5389 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
5390 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5393 #: build/C/man2/mmap.2:54
5394 msgid "See NOTES for information on feature test macro requirements."
5395 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5398 #: build/C/man2/mmap.2:63
5400 "B<mmap>() creates a new mapping in the virtual address space of the calling "
5401 "process. The starting address for the new mapping is specified in I<addr>. "
5402 "The I<length> argument specifies the length of the mapping."
5404 "B<mmap>() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5405 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5406 "は I<length> 引き数で指定される。"
5408 #. Before Linux 2.6.24, the address was rounded up to the next page
5409 #. boundary; since 2.6.24, it is rounded down!
5411 #: build/C/man2/mmap.2:77
5413 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5414 "the mapping; this is the most portable method of creating a new mapping. If "
5415 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5416 "the mapping; on Linux, the mapping will be created at a nearby page "
5417 "boundary. The address of the new mapping is returned as the result of the "
5420 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5421 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5422 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5423 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5424 "ングのアドレスは、呼び出しの返り値として返される。"
5427 #: build/C/man2/mmap.2:89
5429 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5430 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5431 "offset I<offset> in the file (or other object) referred to by the file "
5432 "descriptor I<fd>. I<offset> must be a multiple of the page size as returned "
5433 "by I<sysconf(_SC_PAGE_SIZE)>."
5435 "ファイルマッピングの内容は、 ファイルディスクリプター I<fd> で参照されるファ"
5436 "イル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5437 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5438 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5439 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5442 #: build/C/man2/mmap.2:97
5444 "The I<prot> argument describes the desired memory protection of the mapping "
5445 "(and must not conflict with the open mode of the file). It is either "
5446 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5448 "引き数 I<prot> には、マッピングのメモリー保護をどのように行なうかを指定する "
5449 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5450 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5453 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5455 msgid "B<PROT_EXEC>"
5456 msgstr "B<PROT_EXEC>"
5459 #: build/C/man2/mmap.2:100
5460 msgid "Pages may be executed."
5461 msgstr "ページは実行可能である。"
5464 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5466 msgid "B<PROT_READ>"
5467 msgstr "B<PROT_READ>"
5470 #: build/C/man2/mmap.2:103
5471 msgid "Pages may be read."
5472 msgstr "ページは読み込み可能である。"
5475 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5477 msgid "B<PROT_WRITE>"
5478 msgstr "B<PROT_WRITE>"
5481 #: build/C/man2/mmap.2:106
5482 msgid "Pages may be written."
5483 msgstr "ページに書き込み可能である。"
5486 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5488 msgid "B<PROT_NONE>"
5489 msgstr "B<PROT_NONE>"
5492 #: build/C/man2/mmap.2:109
5493 msgid "Pages may not be accessed."
5494 msgstr "ページにはアクセスできない。"
5497 #: build/C/man2/mmap.2:118
5499 "The I<flags> argument determines whether updates to the mapping are visible "
5500 "to other processes mapping the same region, and whether updates are carried "
5501 "through to the underlying file. This behavior is determined by including "
5502 "exactly one of the following values in I<flags>:"
5504 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5505 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5506 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5507 "I<flags> に含めることで指定する。"
5510 #: build/C/man2/mmap.2:118
5512 msgid "B<MAP_SHARED>"
5513 msgstr "B<MAP_SHARED>"
5516 #: build/C/man2/mmap.2:128
5518 "Share this mapping. Updates to the mapping are visible to other processes "
5519 "that map this file, and are carried through to the underlying file. The "
5520 "file may not actually be updated until B<msync>(2) or B<munmap>() is "
5523 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5524 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5525 "る。 ただし、ファイルの実際の更新は B<msync>(2) または B<munmap>() が呼ばれ"
5529 #: build/C/man2/mmap.2:128
5531 msgid "B<MAP_PRIVATE>"
5532 msgstr "B<MAP_PRIVATE>"
5535 #: build/C/man2/mmap.2:137
5537 "Create a private copy-on-write mapping. Updates to the mapping are not "
5538 "visible to other processes mapping the same file, and are not carried "
5539 "through to the underlying file. It is unspecified whether changes made to "
5540 "the file after the B<mmap>() call are visible in the mapped region."
5542 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5543 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5544 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>() の呼び出し後"
5545 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5549 #: build/C/man2/mmap.2:139
5550 msgid "Both of these flags are described in POSIX.1-2001."
5551 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5554 #: build/C/man2/mmap.2:142
5556 "In addition, zero or more of the following values can be ORed in I<flags>:"
5558 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5562 #: build/C/man2/mmap.2:142
5564 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5565 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5567 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5569 #: build/C/man2/mmap.2:158
5571 "Put the mapping into the first 2 Gigabytes of the process address space. "
5572 "This flag is supported only on x86-64, for 64-bit programs. It was added to "
5573 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5574 "as to improve context-switch performance on some early 64-bit processors. "
5575 "Modern x86-64 processors no longer have this performance problem, so use of "
5576 "this flag is not required on those systems. The B<MAP_32BIT> flag is "
5577 "ignored when B<MAP_FIXED> is set."
5579 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5580 "ラグがサポートされているのは x86-64 アーキテクチャー上の 64 ビットプログラム"
5581 "のみである。 このフラグが追加されたのは、スレッドのスタックをメモリーの先頭 "
5582 "2GB 以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにお"
5583 "ける コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5584 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5585 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5589 #: build/C/man2/mmap.2:158
5592 msgstr "B<MAP_ANON>"
5595 #: build/C/man2/mmap.2:163
5596 msgid "Synonym for B<MAP_ANONYMOUS>. Deprecated."
5597 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5600 #: build/C/man2/mmap.2:163
5602 msgid "B<MAP_ANONYMOUS>"
5603 msgstr "B<MAP_ANONYMOUS>"
5606 #: build/C/man2/mmap.2:185
5608 "The mapping is not backed by any file; its contents are initialized to "
5609 "zero. The I<fd> and I<offset> arguments are ignored; however, some "
5610 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>) "
5611 "is specified, and portable applications should ensure this. The use of "
5612 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5613 "only since kernel 2.4."
5615 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5616 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5617 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>) が指定された場合、 I<fd> を -1 にす"
5618 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5619 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5620 "以降の Linux でのみサポートされている。"
5623 #: build/C/man2/mmap.2:185
5625 msgid "B<MAP_DENYWRITE>"
5626 msgstr "B<MAP_DENYWRITE>"
5628 #. Introduced in 1.1.36, removed in 1.3.24.
5630 #: build/C/man2/mmap.2:193
5632 "This flag is ignored. (Long ago, it signaled that attempts to write to the "
5633 "underlying file should fail with B<ETXTBUSY>. But this was a source of "
5634 "denial-of-service attacks.)"
5636 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5637 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5638 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5641 #: build/C/man2/mmap.2:193
5643 msgid "B<MAP_EXECUTABLE>"
5644 msgstr "B<MAP_EXECUTABLE>"
5646 #. Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5647 #. (Long ago, it signaled that the underlying file is an executable.
5648 #. However, that information was not really used anywhere.)
5649 #. Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5652 #: build/C/man2/mmap.2:201
5653 msgid "This flag is ignored."
5654 msgstr "このフラグは無視される。"
5657 #: build/C/man2/mmap.2:201
5660 msgstr "B<MAP_FILE>"
5662 #. On some systems, this was required as the opposite of
5663 #. MAP_ANONYMOUS -- mtk, 1 May 2007
5665 #: build/C/man2/mmap.2:207
5666 msgid "Compatibility flag. Ignored."
5667 msgstr "互換性のためのフラグ。無視される。"
5670 #: build/C/man2/mmap.2:207
5672 msgid "B<MAP_FIXED>"
5673 msgstr "B<MAP_FIXED>"
5676 #: build/C/man2/mmap.2:225
5678 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5679 "address. I<addr> must be a multiple of the page size. If the memory region "
5680 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5681 "then the overlapped part of the existing mapping(s) will be discarded. If "
5682 "the specified address cannot be used, B<mmap>() will fail. Because "
5683 "requiring a fixed address for a mapping is less portable, the use of this "
5684 "option is discouraged."
5686 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5687 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5688 "ければならない。 I<addr> と I<len> で指定されたメモリー領域が既存のマッピング"
5689 "のページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定"
5690 "されたアドレスが使用できない場合、 B<mmap>() は失敗する。 マッピングに対して"
5691 "固定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこ"
5695 #: build/C/man2/mmap.2:225
5697 msgid "B<MAP_GROWSDOWN>"
5698 msgstr "B<MAP_GROWSDOWN>"
5701 #: build/C/man2/mmap.2:230
5703 "Used for stacks. Indicates to the kernel virtual memory system that the "
5704 "mapping should extend downward in memory."
5706 "スタック用に使用される。マッピングをメモリー内で逆向きに行うことを カーネル仮"
5707 "想メモリーシステムに指示する。 (訳注:マッピングは通常はメモリーアドレスが増"
5708 "加する向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5711 #: build/C/man2/mmap.2:230
5713 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5714 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5717 #: build/C/man2/mmap.2:236
5719 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5720 "I<Documentation/vm/hugetlbpage.txt> for further information."
5722 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5723 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5726 #: build/C/man2/mmap.2:236
5728 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5729 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5731 #. If set, the mapped pages will not be swapped out.
5733 #: build/C/man2/mmap.2:242
5735 "Lock the pages of the mapped region into memory in the manner of "
5736 "B<mlock>(2). This flag is ignored in older kernels."
5738 "マップされた領域のページを B<mlock>(2) の方法でメモリー内にロックする。 それ"
5739 "以前のカーネルでは、このフラグは無視される。"
5742 #: build/C/man2/mmap.2:242
5744 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5745 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5748 #: build/C/man2/mmap.2:257
5750 "Only meaningful in conjunction with B<MAP_POPULATE>. Don't perform read-"
5751 "ahead: create page tables entries only for pages that are already present in "
5752 "RAM. Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing. "
5753 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5756 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5757 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5758 "テーブルエントリーを作成する。 Linux 2.6.23 以降では、このフラグは "
5759 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5760 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5763 #: build/C/man2/mmap.2:257
5765 msgid "B<MAP_NORESERVE>"
5766 msgstr "B<MAP_NORESERVE>"
5769 #: build/C/man2/mmap.2:272
5771 "Do not reserve swap space for this mapping. When swap space is reserved, "
5772 "one has the guarantee that it is possible to modify the mapping. When swap "
5773 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5774 "memory is available. See also the discussion of the file I</proc/sys/vm/"
5775 "overcommit_memory> in B<proc>(5). In kernels before 2.6, this flag had "
5776 "effect only for private writable mappings."
5778 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5779 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5780 "合、物理メモリーに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることが"
5781 "ある。 B<proc>(5) の I</proc/sys/vm/overcommit_memory> ファイルについての議"
5782 "論も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プ"
5783 "ライベートマッピングについてのみ効果があった。"
5786 #: build/C/man2/mmap.2:272
5788 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5789 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5792 #: build/C/man2/mmap.2:279
5794 "Populate (prefault) page tables for a mapping. For a file mapping, this "
5795 "causes read-ahead on the file. Later accesses to the mapping will not be "
5796 "blocked by page faults. B<MAP_POPULATE> is supported for private mappings "
5797 "only since Linux 2.6.23."
5799 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5800 "は、これによりファイルが先読み (read-ahead) が行われる。この以後は、マッピン"
5801 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5802 "2.6.23 以降でのみプライベートマッピングについて B<MAP_POPULATE> がサポートさ"
5806 #: build/C/man2/mmap.2:279
5808 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5809 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5811 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5812 #. commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5813 #. http://thread.gmane.org/gmane.linux.kernel/720412
5814 #. "pthread_create() slow for many threads; also time to revisit 64b
5815 #. context switch optimization?"
5817 #: build/C/man2/mmap.2:292
5819 "Allocate the mapping at an address suitable for a process or thread stack. "
5820 "This flag is currently a no-op, but is used in the glibc threading "
5821 "implementation so that if some architectures require special treatment for "
5822 "stack allocations, support can later be transparently implemented for glibc."
5824 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5825 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5826 "これは、いくつかのアーキテクチャーではスタックの割り当てに関して特別な扱い が"
5827 "必要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5831 #: build/C/man2/mmap.2:292
5833 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5834 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5837 #: build/C/man2/mmap.2:302
5839 "Don't clear anonymous pages. This flag is intended to improve performance "
5840 "on embedded devices. This flag is honored only if the kernel was configured "
5841 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option. Because of the security "
5842 "implications, that option is normally enabled only on embedded devices (i."
5843 "e., devices where one has complete control of the contents of user memory)."
5845 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5847 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5848 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5850 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5851 "ユーザーメモリーの内容を完全に制御化におけるデバイス) においてのみ有効にされ"
5855 #: build/C/man2/mmap.2:310
5857 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001. "
5858 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5861 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5862 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5863 "B<MAP_ANON>) もサポートされている。"
5866 #: build/C/man2/mmap.2:317
5868 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5869 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5871 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5872 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5875 #: build/C/man2/mmap.2:323
5877 "Memory mapped by B<mmap>() is preserved across B<fork>(2), with the same "
5880 "B<mmap>() によってマップされたメモリーの属性は B<fork>(2) の際に継承され"
5884 #: build/C/man2/mmap.2:331
5886 "A file is mapped in multiples of the page size. For a file that is not a "
5887 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5888 "writes to that region are not written out to the file. The effect of "
5889 "changing the size of the underlying file of a mapping on the pages that "
5890 "correspond to added or removed regions of the file is unspecified."
5892 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5893 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5894 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5895 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5896 "マップされたページに対してどのような影響があるかは規定されていない。"
5899 #: build/C/man2/mmap.2:331
5905 #: build/C/man2/mmap.2:341
5907 "The B<munmap>() system call deletes the mappings for the specified address "
5908 "range, and causes further references to addresses within the range to "
5909 "generate invalid memory references. The region is also automatically "
5910 "unmapped when the process is terminated. On the other hand, closing the "
5911 "file descriptor does not unmap the region."
5913 "システムコール B<munmap>() は指定されたアドレス範囲のマップを消去し、 これ以"
5914 "降のその範囲内へのメモリー参照は不正となる。 この領域は、プロセスが終了したと"
5915 "きにも自動的にアンマップされる。 一方、ファイルディスクリプターをクローズして"
5919 #: build/C/man2/mmap.2:351
5921 "The address I<addr> must be a multiple of the page size. All pages "
5922 "containing a part of the indicated range are unmapped, and subsequent "
5923 "references to these pages will generate B<SIGSEGV>. It is not an error if "
5924 "the indicated range does not contain any mapped pages."
5926 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5927 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5928 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5929 "ていない場合でも エラーにならない。"
5932 #: build/C/man2/mmap.2:351
5934 msgid "Timestamps changes for file-backed mappings"
5935 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5938 #: build/C/man2/mmap.2:358
5940 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5941 "updated at any time between the B<mmap>() and the corresponding unmapping; "
5942 "the first reference to a mapped page will update the field if it has not "
5945 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5946 "I<st_atime> フィールドは、 B<mmap>() されてからアンマップ (unmap) されるまで"
5947 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5948 "ページへの最初の参照があった 際に更新される。"
5951 #: build/C/man2/mmap.2:375
5953 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5954 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5955 "before a subsequent B<msync>(2) with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5958 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5959 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5960 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5961 "B<msync>(2) が呼ばれる前までに更新される。"
5964 #: build/C/man2/mmap.2:392
5966 "On success, B<mmap>() returns a pointer to the mapped area. On error, the "
5967 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, and I<errno> "
5968 "is set appropriately. On success, B<munmap>() returns 0, on failure -1, "
5969 "and I<errno> is set (probably to B<EINVAL>)."
5971 "B<mmap>() は成功するとマップされた領域へのポインターを返す。 失敗すると値 "
5972 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>) を返し、 I<errno> がエラーの内容に"
5973 "したがってセットされる。 B<munmap>() は成功すると 0 を返す。失敗すると -1 を"
5974 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5977 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5978 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5979 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5980 #: build/C/man2/shmop.2:188
5986 #: build/C/man2/mmap.2:411
5988 "A file descriptor refers to a non-regular file. Or a file mapping was "
5989 "requested, but I<fd> is not open for reading. Or B<MAP_SHARED> was "
5990 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5991 "(B<O_RDWR>) mode. Or B<PROT_WRITE> is set, but the file is append-only."
5993 "以下のいずれかの場合。 ファイルディスクリプターの参照先が通常のファイルではな"
5994 "い (non-regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用に"
5995 "オープンされていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが "
5996 "I<fd> は読み書きモード (B<O_RDWR>) でオープンされていない、 B<PROT_WRITE> を"
5997 "セットしたが、ファイルは追加 (append) 専用である。"
6000 #: build/C/man2/mmap.2:415
6002 "The file has been locked, or too much memory has been locked (see "
6005 "ファイルがロックされている。またはロックされているメモリーが多すぎる "
6006 "(B<setrlimit>(2) を参照)。"
6009 #: build/C/man2/mmap.2:421
6011 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
6013 "I<fd> が有効なファイルディスクリプター (file descriptor) ではない (かつ "
6014 "B<MAP_ANONYMOUS> がセットされていない)。"
6017 #: build/C/man2/mmap.2:429
6019 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
6020 "not aligned on a page boundary)."
6022 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
6023 "ジ境界にアラインメントされていない)。"
6026 #: build/C/man2/mmap.2:434
6027 msgid "(since Linux 2.6.12) I<length> was 0."
6028 msgstr "(Linux 2.6.12 以降) I<length> が 0 であった。"
6031 #: build/C/man2/mmap.2:442
6033 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
6034 "both of these values."
6036 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
6040 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
6041 #: build/C/man2/shmget.2:221 build/C/man2/memfd_create.2:149
6046 #. [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
6048 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
6049 msgid "The system limit on the total number of open files has been reached."
6050 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
6053 #: build/C/man2/mmap.2:454
6055 "The underlying filesystem of the specified file does not support memory "
6058 "指定されたファイルが置かれているファイルシステムがメモリーマッピングをサポー"
6062 #: build/C/man2/mmap.2:458
6064 "No memory is available, or the process's maximum number of mappings would "
6065 "have been exceeded."
6067 "メモリーに空きがない、または処理中のプロセスのマッピング数が最大数を超過し"
6070 #. (Since 2.4.25 / 2.6.0.)
6072 #: build/C/man2/mmap.2:467
6074 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
6075 "file on a filesystem that was mounted no-exec."
6077 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
6078 "トされたファイルシステム上のファイルに マップ領域が対応している。"
6081 #: build/C/man2/mmap.2:477
6083 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
6086 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
6090 #: build/C/man2/mmap.2:477 build/C/man2/shmctl.2:348
6092 msgid "B<EOVERFLOW>"
6093 msgstr "B<EOVERFLOW>"
6096 #: build/C/man2/mmap.2:489
6098 "On 32-bit architecture together with the large file extension (i.e., using "
6099 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6100 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6102 "32 ビットアーキテクチャーで large file 拡張を使っている場合 (つまり 64 ビット"
6103 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6104 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6108 #: build/C/man2/mmap.2:491
6109 msgid "Use of a mapped region can result in these signals:"
6110 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6113 #: build/C/man2/mmap.2:491
6119 #: build/C/man2/mmap.2:494
6120 msgid "Attempted write into a region mapped as read-only."
6121 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6124 #: build/C/man2/mmap.2:494
6130 #: build/C/man2/mmap.2:499
6132 "Attempted access to a portion of the buffer that does not correspond to the "
6133 "file (for example, beyond the end of the file, including the case where "
6134 "another process has truncated the file)."
6136 "バッファーのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越"
6137 "えた部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれ"
6140 #. SVr4 documents additional error codes ENXIO and ENODEV.
6141 #. SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6143 #: build/C/man2/mmap.2:503
6144 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6145 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6147 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6148 #. -1: unavailable, 0: ask using sysconf().
6149 #. glibc defines it to 1.
6151 #: build/C/man2/mmap.2:517
6153 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>() are "
6154 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6155 "value greater than 0. (See also B<sysconf>(3).)"
6157 "B<mmap>(), B<msync>(2) B<munmap>() が利用可能な POSIX システムでは、 "
6158 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6159 "(B<sysconf>(3) も参照のこと)。"
6162 #: build/C/man2/mmap.2:530
6164 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6165 "B<PROT_READ>. It is architecture dependent whether B<PROT_READ> implies "
6166 "B<PROT_EXEC> or not. Portable programs should always set B<PROT_EXEC> if "
6167 "they intend to execute code in the new mapping."
6169 "(i386 などの) いくつかのアーキテクチャーでは、 B<PROT_WRITE> をセットすると、"
6170 "暗黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙"
6171 "のうちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャー依存である。 "
6172 "移植性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合"
6173 "は、常に B<PROT_EXEC> をセットすべきである。"
6176 #: build/C/man2/mmap.2:545
6178 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6179 "omit B<MAP_FIXED> from I<flags>. In this case, the system chooses the "
6180 "address for the mapping; the address is chosen so as not to conflict with "
6181 "any existing mapping, and will not be 0. If the B<MAP_FIXED> flag is "
6182 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6184 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6185 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6186 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6187 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6188 "I<addr> が 0 (NULL) の場合には、マップされるアドレスが 0 (NULL) になる。"
6191 #: build/C/man2/mmap.2:575
6193 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6194 "B<_SVID_SOURCE> is defined. (Requiring B<_GNU_SOURCE> also suffices, and "
6195 "requiring that macro specifically would have been more logical, since these "
6196 "flags are all Linux-specific.) The relevant flags are: B<MAP_32BIT>, "
6197 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6198 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6199 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6202 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6203 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6204 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6205 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6206 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6207 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6208 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6212 #: build/C/man2/mmap.2:575
6214 msgid "C library/kernel ABI differences"
6215 msgstr "C ライブラリとカーネル ABI の違い"
6217 #. Since around glibc 2.1/2.2, depending on the platform.
6219 #: build/C/man2/mmap.2:590
6221 "This page describes the interface provided by the glibc B<mmap>() wrapper "
6222 "function. Originally, this function invoked a system call of the same "
6223 "name. Since kernel 2.4, that system call has been superseded by "
6224 "B<mmap2>(2), and nowadays the glibc B<mmap>() wrapper function invokes "
6225 "B<mmap2>(2) with a suitably adjusted value for I<offset>."
6227 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6229 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6231 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6232 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6233 "B<mmap2>(2) を起動する。"
6236 #: build/C/man2/mmap.2:595
6238 "On Linux there are no guarantees like those suggested above under "
6239 "B<MAP_NORESERVE>. By default, any process can be killed at any moment when "
6240 "the system runs out of memory."
6242 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6243 "デフォルトでは、システムがメモリーを使い切った場合には、 どのプロセスがいつ強"
6244 "制終了されるか分からないからである。"
6247 #: build/C/man2/mmap.2:602
6249 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6250 "is specified as B<PROT_NONE>."
6252 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6253 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6256 #: build/C/man2/mmap.2:617
6258 "SUSv3 specifies that B<mmap>() should fail if I<length> is 0. However, in "
6259 "kernels before 2.6.12, B<mmap>() succeeded in this case: no mapping was "
6260 "created and the call returned I<addr>. Since kernel 2.6.12, B<mmap>() "
6261 "fails with the error B<EINVAL> for this case."
6263 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>() は失敗すると規定されている。"
6264 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>() は成功して"
6265 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6266 "では、 B<mmap>() はエラー B<EINVAL> で失敗する。"
6269 #: build/C/man2/mmap.2:633
6271 "POSIX specifies that the system shall always zero fill any partial page at "
6272 "the end of the object and that system will never write any modification of "
6273 "the object beyond its end. On Linux, when you write data to such partial "
6274 "page after the end of the object, the data stays in the page cache even "
6275 "after the file is closed and unmapped and even though the data is never "
6276 "written to the file itself, subsequent mappings may see the modified "
6277 "content. In some cases, this could be fixed by calling B<msync>(2) before "
6278 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6279 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6281 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6282 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6283 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6284 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6285 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6286 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6287 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6288 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6289 "共有メモリーインターフェースを使った場合)。"
6292 #: build/C/man2/mmap.2:645
6294 "The following program prints part of the file specified in its first command-"
6295 "line argument to standard output. The range of bytes to be printed is "
6296 "specified via offset and length values in the second and third command-line "
6297 "arguments. The program creates a memory mapping of the required pages of "
6298 "the file and then uses B<write>(2) to output the desired bytes."
6300 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6301 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6302 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6303 "必要なページのメモリー マッピングを作成し、 B<write>(2) を使って所望のバイト"
6307 #: build/C/man2/mmap.2:653
6310 "#include E<lt>sys/mman.hE<gt>\n"
6311 "#include E<lt>sys/stat.hE<gt>\n"
6312 "#include E<lt>fcntl.hE<gt>\n"
6313 "#include E<lt>stdio.hE<gt>\n"
6314 "#include E<lt>stdlib.hE<gt>\n"
6315 "#include E<lt>unistd.hE<gt>\n"
6317 "#include E<lt>sys/mman.hE<gt>\n"
6318 "#include E<lt>sys/stat.hE<gt>\n"
6319 "#include E<lt>fcntl.hE<gt>\n"
6320 "#include E<lt>stdio.hE<gt>\n"
6321 "#include E<lt>stdlib.hE<gt>\n"
6322 "#include E<lt>unistd.hE<gt>\n"
6325 #: build/C/man2/mmap.2:656 build/C/man2/mprotect.2:177
6328 "#define handle_error(msg) \\e\n"
6329 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6331 "#define handle_error(msg) \\e\n"
6332 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6335 #: build/C/man2/mmap.2:666
6339 "main(int argc, char *argv[])\n"
6343 " struct stat sb;\n"
6344 " off_t offset, pa_offset;\n"
6349 "main(int argc, char *argv[])\n"
6353 " struct stat sb;\n"
6354 " off_t offset, pa_offset;\n"
6359 #: build/C/man2/mmap.2:671
6362 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
6363 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6364 " exit(EXIT_FAILURE);\n"
6367 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
6368 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6369 " exit(EXIT_FAILURE);\n"
6373 #: build/C/man2/mmap.2:675
6376 " fd = open(argv[1], O_RDONLY);\n"
6378 " handle_error(\"open\");\n"
6380 " fd = open(argv[1], O_RDONLY);\n"
6382 " handle_error(\"open\");\n"
6385 #: build/C/man2/mmap.2:678
6388 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
6389 " handle_error(\"fstat\");\n"
6391 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
6392 " handle_error(\"fstat\");\n"
6395 #: build/C/man2/mmap.2:682
6398 " offset = atoi(argv[2]);\n"
6399 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6400 " /* offset for mmap() must be page aligned */\n"
6402 " offset = atoi(argv[2]);\n"
6403 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6404 " /* offset for mmap() must be page aligned */\n"
6407 #: build/C/man2/mmap.2:687
6410 " if (offset E<gt>= sb.st_size) {\n"
6411 " fprintf(stderr, \"offset is past end of file\\en\");\n"
6412 " exit(EXIT_FAILURE);\n"
6415 " if (offset E<gt>= sb.st_size) {\n"
6416 " fprintf(stderr, \"offset is past end of file\\en\");\n"
6417 " exit(EXIT_FAILURE);\n"
6421 #: build/C/man2/mmap.2:693
6424 " if (argc == 4) {\n"
6425 " length = atoi(argv[3]);\n"
6426 " if (offset + length E<gt> sb.st_size)\n"
6427 " length = sb.st_size - offset;\n"
6428 " /* Can\\(aqt display bytes past end of file */\n"
6430 " if (argc == 4) {\n"
6431 " length = atoi(argv[3]);\n"
6432 " if (offset + length E<gt> sb.st_size)\n"
6433 " length = sb.st_size - offset;\n"
6434 " /* Can\\(aqt display bytes past end of file */\n"
6437 #: build/C/man2/mmap.2:697
6440 " } else { /* No length arg ==E<gt> display to end of file */\n"
6441 " length = sb.st_size - offset;\n"
6444 " } else { /* No length arg ==E<gt> display to end of file */\n"
6445 " length = sb.st_size - offset;\n"
6449 #: build/C/man2/mmap.2:702
6452 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6453 " MAP_PRIVATE, fd, pa_offset);\n"
6454 " if (addr == MAP_FAILED)\n"
6455 " handle_error(\"mmap\");\n"
6457 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6458 " MAP_PRIVATE, fd, pa_offset);\n"
6459 " if (addr == MAP_FAILED)\n"
6460 " handle_error(\"mmap\");\n"
6463 #: build/C/man2/mmap.2:707
6466 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6467 " if (s != length) {\n"
6469 " handle_error(\"write\");\n"
6471 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6472 " if (s != length) {\n"
6474 " handle_error(\"write\");\n"
6477 #: build/C/man2/mmap.2:711
6480 " fprintf(stderr, \"partial write\");\n"
6481 " exit(EXIT_FAILURE);\n"
6484 " fprintf(stderr, \"partial write\");\n"
6485 " exit(EXIT_FAILURE);\n"
6489 #: build/C/man2/mmap.2:729
6491 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6492 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6493 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6494 "B<shm_overview>(7)"
6496 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6497 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6498 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6499 "B<shm_overview>(7)"
6502 #: build/C/man2/mmap.2:736
6504 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6505 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6507 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6511 #: build/C/man2/mmap.2:741 build/C/man2/msync.2:151
6512 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6513 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6516 #: build/C/man2/mmap2.2:29
6522 #: build/C/man2/mmap2.2:29
6528 #: build/C/man2/mmap2.2:32
6529 msgid "mmap2 - map files or devices into memory"
6530 msgstr "mmap2 - ファイルやデバイスをメモリーにマップする"
6533 #: build/C/man2/mmap2.2:38
6536 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6537 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6539 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6540 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6543 #: build/C/man2/mmap2.2:43
6545 "This is probably not the system call that you are interested in; instead, "
6546 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6549 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6550 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6555 #: build/C/man2/mmap2.2:54
6557 "The B<mmap2>() system call provides the same interface as B<mmap>(2), "
6558 "except that the final argument specifies the offset into the file in 4096-"
6559 "byte units (instead of bytes, as is done by B<mmap>(2)). This enables "
6560 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6563 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6565 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6567 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6568 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6573 #: build/C/man2/mmap2.2:61
6575 "On success, B<mmap2>() returns a pointer to the mapped area. On error, -1 "
6576 "is returned and I<errno> is set appropriately."
6578 "成功した場合、 B<mmap2>() はマップされた領域へのポインターを返す。 エラーの"
6579 "場合は -1 が返されて、 I<errno> が適切に設定される。"
6582 #: build/C/man2/mmap2.2:65
6583 msgid "Problem with getting the data from user space."
6584 msgstr "ユーザー空間からデータを取得するときに問題があった。"
6587 #: build/C/man2/mmap2.2:70
6589 "(Various platforms where the page size is not 4096 bytes.) I<offset\\ *\\ "
6590 "4096> is not a multiple of the system page size."
6592 "(ページサイズが 4096 バイトでないプラットフォームにおいて) I<offset\\ *\\ "
6593 "4096> がシステムのページサイズの倍数ではない。"
6596 #: build/C/man2/mmap2.2:74
6597 msgid "B<mmap2>() can also return any of the errors described in B<mmap>(2)."
6598 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6601 #: build/C/man2/mmap2.2:77
6602 msgid "B<mmap2>() is available since Linux 2.3.31."
6603 msgstr "B<mmap2>() は、Linux 2.3.31 以降で使用可能である。"
6606 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6607 msgid "This system call is Linux-specific."
6608 msgstr "このシステムコールは Linux 独自である。"
6611 #: build/C/man2/mmap2.2:86
6613 "On architectures where this system call is present, the glibc B<mmap>() "
6614 "wrapper function invokes this system call rather than the B<mmap>(2) system "
6617 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>() のラッ"
6618 "パー関数は、 B<mmap>(2) システムコールではなく、このシステムコール "
6619 "(B<mmap2>(2)) を起動する。"
6622 #: build/C/man2/mmap2.2:88
6623 msgid "This system call does not exist on x86-64."
6624 msgstr "このシステムコールは x86-64 には存在しない。"
6626 #. ia64 can have page sizes ranging from 4kB to 64kB.
6627 #. On cris, it looks like the unit might also be the page size,
6628 #. which is 8192 bytes. -- mtk, June 2007
6630 #: build/C/man2/mmap2.2:95
6632 "On ia64, the unit for I<offset> is actually the system page size, rather "
6635 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6639 #: build/C/man2/mmap2.2:101
6641 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6643 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6646 #: build/C/man2/mprotect.2:39
6652 #: build/C/man2/mprotect.2:39
6658 #: build/C/man2/mprotect.2:42
6659 msgid "mprotect - set protection on a region of memory"
6660 msgstr "mprotect - メモリー領域の保護を設定する"
6663 #: build/C/man2/mprotect.2:47
6665 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6666 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6669 #: build/C/man2/mprotect.2:55
6671 "B<mprotect>() changes protection for the calling process's memory page(s) "
6672 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6673 "+I<len>-1]. I<addr> must be aligned to a page boundary."
6675 "B<mprotect>() は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6676 "び出し元のプロセスのメモリーページのアクセス保護を変更する。 I<addr> はページ"
6680 #: build/C/man2/mprotect.2:60
6682 "If the calling process tries to access memory in a manner that violates the "
6683 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6685 "呼び出し元のプロセスがアクセス保護に違反するようなメモリーアクセスを 行おうと"
6686 "すると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6689 #: build/C/man2/mprotect.2:65
6691 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6694 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6695 "毎の論理和 (bitwize-or) で指定する:"
6698 #: build/C/man2/mprotect.2:68
6699 msgid "The memory cannot be accessed at all."
6700 msgstr "そのメモリーには全くアクセスできない。"
6703 #: build/C/man2/mprotect.2:71
6704 msgid "The memory can be read."
6705 msgstr "そのメモリーを読み取ることができる。"
6708 #: build/C/man2/mprotect.2:74
6709 msgid "The memory can be modified."
6710 msgstr "そのメモリーを変更できる。"
6713 #: build/C/man2/mprotect.2:77
6714 msgid "The memory can be executed."
6715 msgstr "そのメモリーは実行可能である。"
6718 #: build/C/man2/mprotect.2:84
6720 "On success, B<mprotect>() returns zero. On error, -1 is returned, and "
6721 "I<errno> is set appropriately."
6723 "成功した場合、 B<mprotect>() は 0 を返す。エラーの場合は -1 が返り、 "
6724 "I<errno> が適切に設定される。"
6727 #: build/C/man2/mprotect.2:94
6729 "The memory cannot be given the specified access. This can happen, for "
6730 "example, if you B<mmap>(2) a file to which you have read-only access, then "
6731 "ask B<mprotect>() to mark it B<PROT_WRITE>."
6733 "指定されたアクセスをメモリーに設定することができない。 これは、例えば ファイ"
6734 "ルを読み取り専用で B<mmap>(2) しており、その領域に対して B<mprotect>() を呼"
6735 "び出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6737 #. Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6739 #: build/C/man2/mprotect.2:99
6741 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6743 "I<addr> が有効なポインターでないか、 システムのページサイズの倍数でない。"
6746 #: build/C/man2/mprotect.2:102
6747 msgid "Internal kernel structures could not be allocated."
6748 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6751 #: build/C/man2/mprotect.2:112
6753 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6754 "address space of the process, or specify one or more pages that are not "
6755 "mapped. (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6758 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6759 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6760 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6763 #. SVr4 defines an additional error
6764 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6766 #: build/C/man2/mprotect.2:121
6768 "SVr4, POSIX.1-2001. POSIX says that the behavior of B<mprotect>() is "
6769 "unspecified if it is applied to a region of memory that was not obtained via "
6772 "SVr4, POSIX.1-2001. POSIX では、 B<mmap>(2) 経由で獲得していないメモリー領"
6773 "域に対して B<mprotect>() を行った場合の B<mprotect>() の動作は未定義である"
6777 #: build/C/man2/mprotect.2:128
6779 "On Linux it is always permissible to call B<mprotect>() on any address in a "
6780 "process's address space (except for the kernel vsyscall area). In "
6781 "particular it can be used to change existing code mappings to be writable."
6783 "Linux では、(カーネル vsyscall 領域以外の) 任意のプロセスアドレス空間に対し"
6784 "て B<mprotect>() を呼び出すことが、常に許されている。 これは特に既存のコード"
6785 "マッピングを書き込み可能にするために使われる。"
6788 #: build/C/man2/mprotect.2:138
6790 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6791 "architecture- and kernel version-dependent. On some hardware architectures "
6792 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6794 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャーと"
6795 "カーネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャーで"
6796 "は、 B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6799 #: build/C/man2/mprotect.2:147
6801 "POSIX.1-2001 says that an implementation may permit access other than that "
6802 "specified in I<prot>, but at a minimum can allow write access only if "
6803 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6806 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6807 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6808 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6812 #: build/C/man2/mprotect.2:153
6814 "The program below allocates four pages of memory, makes the third of these "
6815 "pages read-only, and then executes a loop that walks upward through the "
6816 "allocated region modifying bytes."
6818 "以下のプログラムは、メモリーページを 4つ確保し、そのうち 3番目のページを 読み"
6819 "込み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に"
6820 "向かって順番にバイト値を変更するループを実行する。"
6823 #: build/C/man2/mprotect.2:156
6825 "An example of what we might see when running the program is the following:"
6826 msgstr "プログラムを実行した場合の一例を以下に示す。"
6829 #: build/C/man2/mprotect.2:162
6833 "Start of region: 0x804c000\n"
6834 "Got SIGSEGV at address: 0x804e000\n"
6837 "Start of region: 0x804c000\n"
6838 "Got SIGSEGV at address: 0x804e000\n"
6841 #: build/C/man2/mprotect.2:174
6844 "#include E<lt>unistd.hE<gt>\n"
6845 "#include E<lt>signal.hE<gt>\n"
6846 "#include E<lt>stdio.hE<gt>\n"
6847 "#include E<lt>malloc.hE<gt>\n"
6848 "#include E<lt>stdlib.hE<gt>\n"
6849 "#include E<lt>errno.hE<gt>\n"
6850 "#include E<lt>sys/mman.hE<gt>\n"
6852 "#include E<lt>unistd.hE<gt>\n"
6853 "#include E<lt>signal.hE<gt>\n"
6854 "#include E<lt>stdio.hE<gt>\n"
6855 "#include E<lt>malloc.hE<gt>\n"
6856 "#include E<lt>stdlib.hE<gt>\n"
6857 "#include E<lt>errno.hE<gt>\n"
6858 "#include E<lt>sys/mman.hE<gt>\n"
6861 #: build/C/man2/mprotect.2:179
6863 msgid "static char *buffer;\n"
6864 msgstr "static char *buffer;\n"
6867 #: build/C/man2/mprotect.2:187
6871 "handler(int sig, siginfo_t *si, void *unused)\n"
6873 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6874 " (long) si-E<gt>si_addr);\n"
6875 " exit(EXIT_FAILURE);\n"
6879 "handler(int sig, siginfo_t *si, void *unused)\n"
6881 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6882 " (long) si-E<gt>si_addr);\n"
6883 " exit(EXIT_FAILURE);\n"
6887 #: build/C/man2/mprotect.2:194
6891 "main(int argc, char *argv[])\n"
6895 " struct sigaction sa;\n"
6902 " struct sigaction sa;\n"
6905 #: build/C/man2/mprotect.2:200
6908 " sa.sa_flags = SA_SIGINFO;\n"
6909 " sigemptyset(&sa.sa_mask);\n"
6910 " sa.sa_sigaction = handler;\n"
6911 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6912 " handle_error(\"sigaction\");\n"
6914 " sa.sa_flags = SA_SIGINFO;\n"
6915 " sigemptyset(&sa.sa_mask);\n"
6916 " sa.sa_sigaction = handler;\n"
6917 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6918 " handle_error(\"sigaction\");\n"
6921 #: build/C/man2/mprotect.2:204
6924 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
6925 " if (pagesize == -1)\n"
6926 " handle_error(\"sysconf\");\n"
6928 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
6929 " if (pagesize == -1)\n"
6930 " handle_error(\"sysconf\");\n"
6933 #: build/C/man2/mprotect.2:207
6936 " /* Allocate a buffer aligned on a page boundary;\n"
6937 " initial protection is PROT_READ | PROT_WRITE */\n"
6939 " /* Allocate a buffer aligned on a page boundary;\n"
6940 " initial protection is PROT_READ | PROT_WRITE */\n"
6943 #: build/C/man2/mprotect.2:211
6946 " buffer = memalign(pagesize, 4 * pagesize);\n"
6947 " if (buffer == NULL)\n"
6948 " handle_error(\"memalign\");\n"
6950 " buffer = memalign(pagesize, 4 * pagesize);\n"
6951 " if (buffer == NULL)\n"
6952 " handle_error(\"memalign\");\n"
6955 #: build/C/man2/mprotect.2:213
6957 msgid " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
6958 msgstr " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
6961 #: build/C/man2/mprotect.2:217
6964 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
6965 " PROT_READ) == -1)\n"
6966 " handle_error(\"mprotect\");\n"
6968 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
6969 " PROT_READ) == -1)\n"
6970 " handle_error(\"mprotect\");\n"
6973 #: build/C/man2/mprotect.2:220
6976 " for (p = buffer ; ; )\n"
6977 " *(p++) = \\(aqa\\(aq;\n"
6979 " for (p = buffer ; ; )\n"
6980 " *(p++) = \\(aqa\\(aq;\n"
6983 #: build/C/man2/mprotect.2:224
6986 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
6987 " exit(EXIT_SUCCESS);\n"
6990 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
6991 " exit(EXIT_SUCCESS);\n"
6995 #: build/C/man2/mprotect.2:228
6996 msgid "B<mmap>(2), B<sysconf>(3)"
6997 msgstr "B<mmap>(2), B<sysconf>(3)"
7000 #: build/C/man2/mremap.2:30
7006 #: build/C/man2/mremap.2:30
7012 #: build/C/man2/mremap.2:33
7013 msgid "mremap - remap a virtual memory address"
7014 msgstr "mremap - 仮想メモリーアドレスを再マッピングする"
7017 #: build/C/man2/mremap.2:36
7019 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
7020 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
7023 #: build/C/man2/mremap.2:41
7026 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7027 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7029 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7030 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7033 #: build/C/man2/mremap.2:47
7035 "B<mremap>() expands (or shrinks) an existing memory mapping, potentially "
7036 "moving it at the same time (controlled by the I<flags> argument and the "
7037 "available virtual address space)."
7039 "B<mremap>() は既存のメモリーマッピングの拡張 (または縮小) を行う。 同時に移"
7040 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
7044 #: build/C/man2/mremap.2:61
7046 "I<old_address> is the old address of the virtual memory block that you want "
7047 "to expand (or shrink). Note that I<old_address> has to be page aligned. "
7048 "I<old_size> is the old size of the virtual memory block. I<new_size> is the "
7049 "requested size of the virtual memory block after the resize. An optional "
7050 "fifth argument, I<new_address>, may be provided; see the description of "
7051 "B<MREMAP_FIXED> below."
7053 "I<old_address> は拡張 (または縮小) しようとする仮想メモリーブロック の元のア"
7054 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
7055 "すること。I<old_size> は元の仮想メモリーブロックの サイズである。 "
7056 "I<new_size> は要求する変更後の仮想メモリーブロックのサイズである。 5 番目の引"
7057 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
7061 #: build/C/man2/mremap.2:73
7063 "In Linux the memory is divided into pages. A user process has (one or) "
7064 "several linear virtual memory segments. Each virtual memory segment has one "
7065 "or more mappings to real memory pages (in the page table). Each virtual "
7066 "memory segment has its own protection (access rights), which may cause a "
7067 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
7068 "to a read-only segment). Accessing virtual memory outside of the segments "
7069 "will also cause a segmentation violation."
7071 "Linux ではメモリーはページに分割される。ユーザープロセスは (一つまたは) 複数"
7072 "のリニアな仮想メモリーセグメントを持つ。 それぞれの仮想メモリーセグメントは一"
7073 "つ以上の実メモリーページ にマッピングされている (マッピング情報はページテーブ"
7074 "ルで管理される)。 仮想メモリーセグメントにはセグメント毎の保護 (アクセス権) "
7075 "が設定されており、 メモリーが不正にアクセスされた場合 (例えば読み込み専用のセ"
7076 "グメントに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) "
7077 "を 引き起こす。また、セグメント外の仮想メモリーにアクセスした場合にも セグメ"
7081 #: build/C/man2/mremap.2:81
7083 "B<mremap>() uses the Linux page table scheme. B<mremap>() changes the "
7084 "mapping between virtual addresses and memory pages. This can be used to "
7085 "implement a very efficient B<realloc>(3)."
7087 "B<mremap>() は Linux のページテーブル方式を使用する。 B<mremap>() は仮想ア"
7088 "ドレスとメモリーページのマッピングを変更する。これは非常に効率的な "
7089 "B<realloc>(3) を実装するのに使用されている。"
7092 #: build/C/man2/mremap.2:83
7093 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7094 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7097 #: build/C/man2/mremap.2:83
7099 msgid "B<MREMAP_MAYMOVE>"
7100 msgstr "B<MREMAP_MAYMOVE>"
7103 #: build/C/man2/mremap.2:95
7105 "By default, if there is not sufficient space to expand a mapping at its "
7106 "current location, then B<mremap>() fails. If this flag is specified, then "
7107 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7108 "necessary. If the mapping is relocated, then absolute pointers into the old "
7109 "mapping location become invalid (offsets relative to the starting address of "
7110 "the mapping should be employed)."
7112 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7113 "B<mremap>() は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7114 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7115 "れると、古いマッピング位置への絶対ポインターは 無効になる (マッピングの開始ア"
7116 "ドレスからの相対オフセットは有効のままである)。"
7119 #: build/C/man2/mremap.2:95
7121 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7122 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7125 #: build/C/man2/mremap.2:117
7127 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2). "
7128 "If this flag is specified, then B<mremap>() accepts a fifth argument, I<void"
7129 "\\ *new_address>, which specifies a page-aligned address to which the "
7130 "mapping must be moved. Any previous mapping at the address range specified "
7131 "by I<new_address> and I<new_size> is unmapped. If B<MREMAP_FIXED> is "
7132 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7134 "このフラグは B<mmap>(2) の B<MAP_FIXED> フラグと似たような目的で用いられ"
7135 "る。 このフラグが指定されると、 B<mremap>() は 5 番目の引き数 I<void\\ "
7136 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7137 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7138 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7139 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7140 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7143 #: build/C/man2/mremap.2:127
7145 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7146 "(using B<mlock>(2) or similar), then this lock is maintained when the "
7147 "segment is resized and/or relocated. As a consequence, the amount of memory "
7148 "locked by the process may change."
7150 "I<old_address> と I<old_size> で指定されるメモリーセグメントが (B<mlock>(2) "
7151 "や同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置さ"
7152 "れたりした時にロックも維持される。 その結果、プロセスによってロックされるメモ"
7156 #: build/C/man2/mremap.2:135
7158 "On success B<mremap>() returns a pointer to the new virtual memory area. "
7159 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7160 "and I<errno> is set appropriately."
7162 "成功した場合は B<mremap>() は新しい仮想メモリー領域へのポインターを返す。 エ"
7163 "ラーの場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> "
7167 #: build/C/man2/mremap.2:142
7169 "The caller tried to expand a memory segment that is locked, but this was not "
7170 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7172 "呼び出し元がロックされているメモリーセグメントを拡張しようとしたが、 "
7173 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7176 #: build/C/man2/mremap.2:151
7178 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7179 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7180 "process. You can also get B<EFAULT> even if there exist mappings that cover "
7181 "the whole address space requested, but those mappings are of different types."
7183 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7184 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7185 "正な仮想メモリーアドレスである。 たとえ要求したアドレス空間全体を含むような"
7186 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7190 #: build/C/man2/mremap.2:179
7192 "An invalid argument was given. Possible causes are: I<old_address> was not "
7193 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7194 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7195 "was invalid; or the new address range specified by I<new_address> and "
7196 "I<new_size> overlapped the old address range specified by I<old_address> and "
7197 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7198 "B<MREMAP_MAYMOVE>."
7200 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7201 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7202 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7203 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7204 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7205 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7209 #: build/C/man2/mremap.2:185
7211 "The memory area cannot be expanded at the current virtual address, and the "
7212 "B<MREMAP_MAYMOVE> flag is not set in I<flags>. Or, there is not enough "
7213 "(virtual) memory available."
7215 "現在の仮想アドレスではメモリー領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7216 "I<flags> に設定されていない。 または十分な (仮想) メモリーが存在しない。"
7218 #. 4.2BSD had a (never actually implemented)
7220 #. call with completely different semantics.
7222 #: build/C/man2/mremap.2:191
7224 "This call is Linux-specific, and should not be used in programs intended to "
7227 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7231 #: build/C/man2/mremap.2:199
7233 "Prior to version 2.4, glibc did not expose the definition of "
7234 "B<MREMAP_FIXED>, and the prototype for B<mremap>() did not allow for the "
7235 "I<new_address> argument."
7237 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7238 "ず、 B<mremap>() のプロトタイプは I<new_address> 引き数を取らなかった。"
7241 #: build/C/man2/mremap.2:208
7243 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7244 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7246 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7247 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7250 #: build/C/man2/mremap.2:214
7252 "Your favorite text book on operating systems for more information on paged "
7253 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7254 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7257 "ページ分割されたメモリーについてもっと詳しく知りたいならば、あなたのお気に入"
7258 "りのオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7259 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7260 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7263 #: build/C/man2/msync.2:25
7269 #: build/C/man2/msync.2:25
7275 #: build/C/man2/msync.2:28
7276 msgid "msync - synchronize a file with a memory map"
7277 msgstr "msync - ファイルをマップしたメモリーと同期させる"
7280 #: build/C/man2/msync.2:32
7281 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7282 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7285 #: build/C/man2/msync.2:48
7287 "B<msync>() flushes changes made to the in-core copy of a file that was "
7288 "mapped into memory using B<mmap>(2) back to the filesystem. Without use of "
7289 "this call there is no guarantee that changes are written back before "
7290 "B<munmap>(2) is called. To be more precise, the part of the file that "
7291 "corresponds to the memory area starting at I<addr> and having length "
7292 "I<length> is updated."
7294 "B<msync>() は B<mmap>(2) を使ってメモリーにマップされたファイルの、 メモ"
7295 "リー上のコピーになされた変更をファイルシステムに反映させる。 この関数を使用し"
7296 "ないと、 B<munmap>(2) が呼び出されるまで変更が書き戻される保証はない。 より"
7297 "正確には、ファイルのうち I<addr> から始まり長さ I<length> のメモリー領域に対"
7301 #: build/C/man2/msync.2:68
7303 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7304 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>. B<MS_ASYNC> "
7305 "specifies that an update be scheduled, but the call returns immediately. "
7306 "B<MS_SYNC> asks for an update and waits for it to complete. "
7307 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7308 "they can be updated with the fresh values just written)."
7310 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7311 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7312 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7313 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7314 "た今書き込んだ新しい値でマッピングを更新することができるように) 同じファイル"
7315 "に対する他のマッピングを無効にすることを要求する。"
7318 #: build/C/man2/msync.2:73
7320 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
7323 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7327 #: build/C/man2/msync.2:74
7333 #: build/C/man2/msync.2:80
7335 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7336 "specified address range."
7338 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7342 #: build/C/man2/msync.2:93
7344 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7345 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7346 "B<MS_ASYNC> are set in I<flags>."
7348 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7349 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7350 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7353 #: build/C/man2/msync.2:96
7354 msgid "The indicated memory (or part of it) was not mapped."
7355 msgstr "指定されたメモリー (またはその一部) がマップされていない。"
7358 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7359 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7360 msgid "POSIX.1-2001."
7361 msgstr "POSIX.1-2001."
7364 #: build/C/man2/msync.2:105
7366 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7367 "B<ENOMEM>. In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7369 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7370 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7372 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7373 #. -1: unavailable, 0: ask using sysconf().
7374 #. glibc defines them to 1.
7376 #: build/C/man2/msync.2:120
7378 "On POSIX systems on which B<msync>() is available, both "
7379 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7380 "I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
7382 "B<msync>() が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7383 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7384 "定義される。 (B<sysconf>(3) を参照すること。 )"
7386 #. commit 204ec841fbea3e5138168edbc3a76d46747cc987
7388 #: build/C/man2/msync.2:147
7390 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7391 "I<flags>, and indeed failure to include one of these flags will cause "
7392 "B<msync>() to fail on some systems. However, Linux permits a call to "
7393 "B<msync>() that specifies neither of these flags, with semantics that are "
7394 "(currently) equivalent to specifying B<MS_ASYNC>. (Since Linux 2.6.19, "
7395 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7396 "and flushes them to storage as necessary.) Notwithstanding the Linux "
7397 "behavior, portable, future-proof applications should ensure that they "
7398 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7400 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7401 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7402 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7403 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7404 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7405 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7406 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7407 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7408 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7412 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7418 #: build/C/man3/mtrace.3:25
7424 #: build/C/man3/mtrace.3:25
7430 #: build/C/man3/mtrace.3:28
7431 msgid "mtrace, muntrace - malloc tracing"
7432 msgstr "mtrace, muntrace - malloc のトレース"
7435 #: build/C/man3/mtrace.3:30
7436 msgid "B<#include E<lt>mcheck.hE<gt>>"
7437 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7440 #: build/C/man3/mtrace.3:32
7441 msgid "B<void mtrace(void);>"
7442 msgstr "B<void mtrace(void);>"
7445 #: build/C/man3/mtrace.3:34
7446 msgid "B<void muntrace(void);>"
7447 msgstr "B<void muntrace(void);>"
7450 #: build/C/man3/mtrace.3:46
7452 "The B<mtrace>() function installs hook functions for the memory-allocation "
7453 "functions (B<malloc>(3), B<realloc>(3) B<memalign>(3), B<free>(3)). These "
7454 "hook functions record tracing information about memory allocation and "
7455 "deallocation. The tracing information can be used to discover memory leaks "
7456 "and attempts to free nonallocated memory in a program."
7460 #: build/C/man3/mtrace.3:57
7462 "The B<muntrace>() function disables the hook functions installed by "
7463 "B<mtrace>(), so that tracing information is no longer recorded for the "
7464 "memory-allocation functions. If no hook functions were successfully "
7465 "installed by B<mtrace>(), B<muntrace>() does nothing."
7469 #: build/C/man3/mtrace.3:65
7471 "When B<mtrace>() is called, it checks the value of the environment variable "
7472 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7473 "tracing information is to be recorded. If the pathname is successfully "
7474 "opened, it is truncated to zero length."
7478 #: build/C/man3/mtrace.3:78
7480 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7481 "not writable, then no hook functions are installed, and B<mtrace>() has no "
7482 "effect. In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7483 "ignored, and B<mtrace>() has no effect."
7487 #: build/C/man3/mtrace.3:86
7489 "In normal usage, B<mtrace>() is called once at the start of execution of a "
7490 "program, and B<muntrace>() is never called."
7494 #: build/C/man3/mtrace.3:96
7496 "The tracing output produced after a call to B<mtrace>() is textual, but not "
7497 "designed to be human readable. The GNU C library provides a Perl script, "
7498 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7499 "output. For best results, the traced program should be compiled with "
7500 "debugging enabled, so that line-number information is recorded in the "
7505 #: build/C/man3/mtrace.3:102
7507 "The tracing performed by B<mtrace>() incurs a performance penalty (if "
7508 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7512 #: build/C/man3/mtrace.3:108
7514 "The line-number information produced by B<mtrace>(1) is not always precise: "
7515 "the line number references may refer to the previous or following "
7516 "(nonblank) line of the source code."
7520 #: build/C/man3/mtrace.3:115
7522 "The shell session below demonstrates the use of the B<mtrace>() function "
7523 "and the B<mtrace>(1) command in a program that has memory leaks at two "
7524 "different locations. The demonstration uses the following program:"
7528 #: build/C/man3/mtrace.3:122
7531 "$ B<cat t_mtrace.c>\n"
7532 "#include E<lt>mcheck.hE<gt>\n"
7533 "#include E<lt>stdlib.hE<gt>\n"
7534 "#include E<lt>stdio.hE<gt>\n"
7536 "$ B<cat t_mtrace.c>\n"
7537 "#include E<lt>mcheck.hE<gt>\n"
7538 "#include E<lt>stdlib.hE<gt>\n"
7539 "#include E<lt>stdio.hE<gt>\n"
7542 #: build/C/man3/mtrace.3:127
7546 "main(int argc, char *argv[])\n"
7551 "main(int argc, char *argv[])\n"
7556 #: build/C/man3/mtrace.3:129
7558 msgid " mtrace();\n"
7559 msgstr " mtrace();\n"
7562 #: build/C/man3/mtrace.3:132
7565 " for (j = 0; j E<lt> 2; j++)\n"
7566 " malloc(100); /* Never freed--a memory leak */\n"
7568 " for (j = 0; j E<lt> 2; j++)\n"
7569 " malloc(100); /* Never freed--a memory leak */\n"
7572 #: build/C/man3/mtrace.3:136
7575 " calloc(16, 16); /* Never freed--a memory leak */\n"
7576 " exit(EXIT_SUCCESS);\n"
7579 " calloc(16, 16); /* Never freed--a memory leak */\n"
7580 " exit(EXIT_SUCCESS);\n"
7584 #: build/C/man3/mtrace.3:142
7586 "When we run the program as follows, we see that B<mtrace>() diagnosed "
7587 "memory leaks at two different locations in the program:"
7591 #: build/C/man3/mtrace.3:155
7594 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7595 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7597 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7598 "Memory not freed:\n"
7599 "-----------------\n"
7600 " Address Size Caller\n"
7601 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
7602 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
7603 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
7605 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7606 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7608 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7609 "Memory not freed:\n"
7610 "-----------------\n"
7611 " Address Size Caller\n"
7612 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
7613 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
7614 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
7617 #: build/C/man3/mtrace.3:167
7619 "The first two messages about unfreed memory correspond to the two "
7620 "B<malloc>(3) calls inside the I<for> loop. The final message corresponds "
7621 "to the call to B<calloc>(3) (which in turn calls B<malloc>(3))."
7625 #: build/C/man3/mtrace.3:172
7626 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7627 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7630 #: build/C/man2/posix_fadvise.2:28
7632 msgid "POSIX_FADVISE"
7633 msgstr "POSIX_FADVISE"
7636 #: build/C/man2/posix_fadvise.2:31
7637 msgid "posix_fadvise - predeclare an access pattern for file data"
7638 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7641 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7643 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7644 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7647 #: build/C/man2/posix_fadvise.2:37
7649 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7650 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7653 #: build/C/man2/posix_fadvise.2:46
7654 msgid "B<posix_fadvise>():"
7655 msgstr "B<posix_fadvise>():"
7658 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7659 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7660 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7663 #: build/C/man2/posix_fadvise.2:56
7665 "Programs can use B<posix_fadvise>() to announce an intention to access file "
7666 "data in a specific pattern in the future, thus allowing the kernel to "
7667 "perform appropriate optimizations."
7669 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7670 "めに B<posix_fadvise>() を使うことができる。 これにより、カーネルが適切な最"
7674 #: build/C/man2/posix_fadvise.2:63
7676 "The I<advice> applies to a (not necessarily existent) region starting at "
7677 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7678 "I<len> is 0) within the file referred to by I<fd>. The I<advice> is not "
7679 "binding; it merely constitutes an expectation on behalf of the application."
7681 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7683 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7684 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7686 "ションのために可能性を構成するだけである。"
7689 #: build/C/man2/posix_fadvise.2:65
7690 msgid "Permissible values for I<advice> include:"
7691 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7694 #: build/C/man2/posix_fadvise.2:65
7696 msgid "B<POSIX_FADV_NORMAL>"
7697 msgstr "B<POSIX_FADV_NORMAL>"
7700 #: build/C/man2/posix_fadvise.2:71
7702 "Indicates that the application has no advice to give about its access "
7703 "pattern for the specified data. If no advice is given for an open file, "
7704 "this is the default assumption."
7706 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7707 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7708 "合、 これがデフォルトで仮定される。"
7711 #: build/C/man2/posix_fadvise.2:71
7713 msgid "B<POSIX_FADV_SEQUENTIAL>"
7714 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7717 #: build/C/man2/posix_fadvise.2:75
7719 "The application expects to access the specified data sequentially (with "
7720 "lower offsets read before higher ones)."
7722 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7723 "小さなオフセットのデータを読むように) アクセスされることを期待する。"
7726 #: build/C/man2/posix_fadvise.2:75
7728 msgid "B<POSIX_FADV_RANDOM>"
7729 msgstr "B<POSIX_FADV_RANDOM>"
7732 #: build/C/man2/posix_fadvise.2:78
7733 msgid "The specified data will be accessed in random order."
7734 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7737 #: build/C/man2/posix_fadvise.2:78
7739 msgid "B<POSIX_FADV_NOREUSE>"
7740 msgstr "B<POSIX_FADV_NOREUSE>"
7743 #: build/C/man2/posix_fadvise.2:81
7744 msgid "The specified data will be accessed only once."
7745 msgstr "指定されたデータは 1 度しかアクセスされない。"
7748 #: build/C/man2/posix_fadvise.2:81
7750 msgid "B<POSIX_FADV_WILLNEED>"
7751 msgstr "B<POSIX_FADV_WILLNEED>"
7754 #: build/C/man2/posix_fadvise.2:84
7755 msgid "The specified data will be accessed in the near future."
7756 msgstr "指定されたデータは近い将来アクセスされる。"
7759 #: build/C/man2/posix_fadvise.2:84
7761 msgid "B<POSIX_FADV_DONTNEED>"
7762 msgstr "B<POSIX_FADV_DONTNEED>"
7765 #: build/C/man2/posix_fadvise.2:87
7766 msgid "The specified data will not be accessed in the near future."
7767 msgstr "指定されたデータは近い将来アクセスされない。"
7770 #: build/C/man2/posix_fadvise.2:90
7771 msgid "On success, zero is returned. On error, an error number is returned."
7772 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7775 #: build/C/man2/posix_fadvise.2:94
7776 msgid "The I<fd> argument was not a valid file descriptor."
7777 msgstr "I<fd> 引き数が有効なファイルディスクリプターでない。"
7780 #: build/C/man2/posix_fadvise.2:97
7781 msgid "An invalid value was specified for I<advice>."
7782 msgstr "無効な値が I<advice> に指定された。"
7784 #. commit 87ba81dba431232548ce29d5d224115d0c2355ac
7786 #: build/C/man2/posix_fadvise.2:107
7788 "The specified file descriptor refers to a pipe or FIFO. (B<ESPIPE> is the "
7789 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7790 "B<EINVAL> in this case.)"
7792 "指定されたファイルディスクリプターがパイプまたは FIFO を参照している "
7793 "(B<ESPIPE> は POSIX で規定されているエラーだが、 バージョン 2.16 より前のカー"
7794 "ネルでは、 この場合に B<EINVAL> を返していた。)"
7796 #. of fadvise64_64()
7798 #: build/C/man2/posix_fadvise.2:115
7800 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7801 "called B<fadvise64>(). Library support has been provided since glibc "
7802 "version 2.2, via the wrapper function B<posix_fadvise>()."
7804 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7805 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7806 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7807 "ラッパー関数は B<posix_fadvise>() という名前である。"
7809 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7811 #: build/C/man2/posix_fadvise.2:122
7813 "Since Linux 3.18, support for the underlying system call is optional, "
7814 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7817 "Linux 3.18 以降では、対応するシステムコールのサポートは任意となり、利用できる"
7818 "かはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされ"
7822 #: build/C/man2/posix_fadvise.2:131
7824 "POSIX.1-2001. Note that the type of the I<len> argument was changed from "
7825 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7827 "POSIX.1-2001. I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7828 "I<off_t> に変更された点に注意すること。"
7831 #: build/C/man2/posix_fadvise.2:137
7833 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7834 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7835 "B<POSIX_FADV_RANDOM> disables file readahead entirely. These changes affect "
7836 "the entire file, not just the specified region (but other open file handles "
7837 "to the same file are unaffected)."
7839 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7840 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7841 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7842 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7843 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7846 #: build/C/man2/posix_fadvise.2:144
7848 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7849 "into the page cache. The amount of data read may be decreased by the kernel "
7850 "depending on virtual memory load. (A few megabytes will usually be fully "
7851 "satisfied, and more is rarely useful.)"
7853 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7854 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリーの負荷に依ってカー"
7855 "ネルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより"
7859 #: build/C/man2/posix_fadvise.2:148
7861 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7862 "B<POSIX_FADV_WILLNEED>. This was probably a bug; since kernel 2.6.18, this "
7865 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7866 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7870 #: build/C/man2/posix_fadvise.2:156
7872 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7873 "specified region. This is useful, for example, while streaming large "
7874 "files. A program may periodically request the kernel to free cached data "
7875 "that has already been used, so that more useful cached pages are not "
7876 "discarded instead."
7878 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7879 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7880 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7881 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7882 "されたページが、 代わりに破棄されることはない。"
7885 #: build/C/man2/posix_fadvise.2:164
7887 "Requests to discard partial pages are ignored. It is preferable to preserve "
7888 "needed data than discard unneeded data. If the application requires that "
7889 "data be considered for discarding then I<offset> and I<len> must be page-"
7892 "ページの一部分の破棄要求は無視される。 不要なデータを破棄するよりも必要なデー"
7893 "タを保持する方がよい。 アプリケーションがデータを破棄した方がよいと思う場合"
7894 "は、 I<offset> と I<len> がページ境界に合っていなければならない。"
7897 #: build/C/man2/posix_fadvise.2:172
7899 "Pages that have not yet been written out will be unaffected, so if the "
7900 "application wishes to guarantee that pages will be released, it should call "
7901 "B<fsync>(2) or B<fdatasync>(2) first."
7903 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7904 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2) または "
7905 "B<fdatasync>(2) を呼ぶべきである。"
7908 #: build/C/man2/posix_fadvise.2:172
7910 msgid "Architecture-specific variants"
7911 msgstr "アーキテクチャー固有の派生バージョン"
7914 #: build/C/man2/posix_fadvise.2:189
7916 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7917 "of registers (see B<syscall>(2) for further detail). On such "
7918 "architectures, the call signature of B<posix_fadvise>() shown in the "
7919 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7920 "and I<offset> arguments. Therefore, these architectures define a version of "
7921 "the system call that orders the arguments suitably, but otherwise is "
7922 "otherwise exactly the same as B<posix_fadvise>()."
7924 "いくつかのアーキテクチャーでは、 64 ビットの引き数は適切なレジスターの組に割"
7925 "り当てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャーでは、 "
7926 "「書式」に書かれている B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 "
7927 "I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費されてし"
7928 "まう。 そのため、 これらのアーキテクチャーでは引き数が適切な順序になった別の"
7929 "システムコールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じで"
7933 #: build/C/man2/posix_fadvise.2:191
7934 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7936 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7939 #: build/C/man2/posix_fadvise.2:196
7942 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7943 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7945 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7946 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7949 #: build/C/man2/posix_fadvise.2:204
7951 "These architecture-specific details are generally hidden from applications "
7952 "by the glibc B<posix_fadvise>() wrapper function, which invokes the "
7953 "appropriate architecture-specific system call."
7955 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7956 "チャー固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適"
7957 "切なアーキテクチャー固有のシステムコールが呼び出される。"
7960 #: build/C/man2/posix_fadvise.2:209
7962 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7963 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7964 "through to the end of the file\"."
7966 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7967 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7970 #. FIXME . Write a posix_fadvise(3) page.
7972 #: build/C/man2/posix_fadvise.2:215
7974 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7975 "B<posix_madvise>(3)"
7977 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7978 "B<posix_madvise>(3)"
7981 #: build/C/man3/posix_fallocate.3:25
7983 msgid "POSIX_FALLOCATE"
7984 msgstr "POSIX_FALLOCATE"
7987 #: build/C/man3/posix_fallocate.3:28
7988 msgid "posix_fallocate - allocate file space"
7989 msgstr "posix_fallocate - ファイルのスペースを確保する"
7992 #: build/C/man3/posix_fallocate.3:33
7994 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7995 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7998 #: build/C/man3/posix_fallocate.3:42
7999 msgid "B<posix_fallocate>():"
8000 msgstr "B<posix_fallocate>():"
8003 #: build/C/man3/posix_fallocate.3:61
8005 "The function B<posix_fallocate>() ensures that disk space is allocated for "
8006 "the file referred to by the descriptor I<fd> for the bytes in the range "
8007 "starting at I<offset> and continuing for I<len> bytes. After a successful "
8008 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
8009 "range are guaranteed not to fail because of lack of disk space."
8011 "関数 B<posix_fallocate>() は、ディスクリプター I<fd> で参照されるファイルに"
8012 "対して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から"
8013 "始まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>() の呼び出しが"
8014 "成功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足"
8018 #: build/C/man3/posix_fallocate.3:66
8020 "If the size of the file is less than I<offset>+I<len>, then the file is "
8021 "increased to this size; otherwise the file size is left unchanged."
8023 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
8024 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
8027 #: build/C/man3/posix_fallocate.3:72
8029 "B<posix_fallocate>() returns zero on success, or an error number on "
8030 "failure. Note that I<errno> is not set."
8032 "B<posix_fallocate>() は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
8033 "す。 I<errno> が設定されない点に注意すること。"
8036 #: build/C/man3/posix_fallocate.3:81
8037 msgid "I<offset+len> exceeds the maximum file size."
8038 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
8041 #: build/C/man3/posix_fallocate.3:91
8042 msgid "I<fd> does not refer to a regular file."
8043 msgstr "I<fd> が通常のファイルとして参照されていない。"
8046 #: build/C/man3/posix_fallocate.3:100
8047 msgid "I<fd> refers to a pipe."
8048 msgstr "I<fd> がパイプを参照している。"
8051 #: build/C/man3/posix_fallocate.3:103
8052 msgid "B<posix_fallocate>() is available since glibc 2.1.94."
8053 msgstr "B<posix_fallocate>() は glibc 2.1.94 以降で利用可能である。"
8056 #: build/C/man3/posix_fallocate.3:108
8057 msgid "The B<posix_fallocate>() function is thread-safe."
8058 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
8061 #: build/C/man3/posix_fallocate.3:133
8063 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
8064 "if I<len> was 0, or I<offset> was less than 0. POSIX.1-2001 says that an "
8065 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
8066 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
8069 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
8070 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
8071 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
8072 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
8076 #: build/C/man3/posix_fallocate.3:138
8078 "In the glibc implementation, B<posix_fallocate>() is implemented using "
8081 "glibc の実装では、 B<posix_fallocate>() は B<fallocate>() を使って実装されて"
8085 #: build/C/man3/posix_fallocate.3:143
8086 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8087 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8090 #: build/C/man3/posix_memalign.3:29
8092 msgid "POSIX_MEMALIGN"
8093 msgstr "POSIX_MEMALIGN"
8096 #: build/C/man3/posix_memalign.3:29
8102 #: build/C/man3/posix_memalign.3:32
8104 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8107 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8111 #: build/C/man3/posix_memalign.3:35
8113 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8114 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8117 #: build/C/man3/posix_memalign.3:39
8120 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8121 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8122 "B<void *valloc(size_t >I<size>B<);>\n"
8124 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8125 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8126 "B<void *valloc(size_t >I<size>B<);>\n"
8129 #: build/C/man3/posix_memalign.3:44
8132 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8133 "B<void *pvalloc(size_t >I<size>B<);>\n"
8135 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8136 "B<void *pvalloc(size_t >I<size>B<);>\n"
8139 #: build/C/man3/posix_memalign.3:54
8141 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8144 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8148 #: build/C/man3/posix_memalign.3:57
8149 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8150 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8153 #: build/C/man3/posix_memalign.3:59
8154 msgid "B<valloc>():"
8155 msgstr "B<valloc>():"
8158 #: build/C/man3/posix_memalign.3:62
8160 msgid "Since glibc 2.12:"
8161 msgstr "glibc 2.12 以降:"
8164 #: build/C/man3/posix_memalign.3:69
8168 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8169 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8170 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8173 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8174 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8175 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8178 #: build/C/man3/posix_memalign.3:71
8180 msgid "Before glibc 2.12:"
8181 msgstr "glibc 2.12 より前:"
8184 #: build/C/man3/posix_memalign.3:75
8186 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8187 "_XOPEN_SOURCE_EXTENDED"
8189 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8190 "_XOPEN_SOURCE_EXTENDED"
8193 #: build/C/man3/posix_memalign.3:82
8195 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8196 "declaration of B<valloc>(); no feature test macros are required.)"
8198 "((非標準の) ヘッダーファイル I<E<lt>malloc.hE<gt>> も\n"
8199 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8203 #: build/C/man3/posix_memalign.3:104
8205 "The function B<posix_memalign>() allocates I<size> bytes and places the "
8206 "address of the allocated memory in I<*memptr>. The address of the allocated "
8207 "memory will be a multiple of I<alignment>, which must be a power of two and "
8208 "a multiple of I<sizeof(void\\ *)>. If I<size> is 0, then the value placed "
8209 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8210 "successfully passed to B<free>(3)."
8212 "関数 B<posix_memalign>() は、 I<size> バイトのメモリーを割り当て、割り当てら"
8213 "れたメモリーのアドレスを I<*memptr> に設定する。 割り当てられたメモリーのアド"
8214 "レスは I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗"
8215 "で、かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場"
8216 "合、 I<*memptr> には NULL か一意なポインター値が書かれる。 このポインター値"
8217 "は、後で B<free>(3) に問題なく渡すことができる。"
8219 #. The behavior of memalign() for size==0 is as for posix_memalign()
8220 #. but no standards govern this.
8222 #: build/C/man3/posix_memalign.3:115
8224 "The obsolete function B<memalign>() allocates I<size> bytes and returns a "
8225 "pointer to the allocated memory. The memory address will be a multiple of "
8226 "I<alignment>, which must be a power of two."
8228 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリーを割り当"
8230 "割り当てられたメモリーへのポインターを返す。 メモリーのアドレスは "
8232 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8235 #: build/C/man3/posix_memalign.3:124
8237 "The function B<aligned_alloc>() is the same as B<memalign>(), except for "
8238 "the added restriction that I<size> should be a multiple of I<alignment>."
8240 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8242 "の倍数でなければならないという追加の制限がある点が異なる。"
8245 #: build/C/man3/posix_memalign.3:133
8247 "The obsolete function B<valloc>() allocates I<size> bytes and returns a "
8248 "pointer to the allocated memory. The memory address will be a multiple of "
8249 "the page size. It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8251 "廃止された関数である B<valloc>() は I<size> バイトのメモリーを割り当て、割り"
8252 "当てられたメモリーへのポインターを返す。 メモリーのアドレスはページサイズの倍"
8253 "数になっているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と"
8257 #: build/C/man3/posix_memalign.3:140
8259 "The obsolete function B<pvalloc>() is similar to B<valloc>(), but rounds "
8260 "the size of the allocation up to the next multiple of the system page size."
8262 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8263 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8266 #: build/C/man3/posix_memalign.3:142
8267 msgid "For all of these functions, the memory is not zeroed."
8268 msgstr "これらの関数はいずれもメモリーのゼロクリアを行わない。"
8271 #: build/C/man3/posix_memalign.3:149
8273 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>() return a "
8274 "pointer to the allocated memory, or NULL if the request fails."
8276 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8278 "メモリーへのポインターを返す。 割り当てに失敗した場合は NULL を返す。"
8281 #: build/C/man3/posix_memalign.3:157
8283 "B<posix_memalign>() returns zero on success, or one of the error values "
8284 "listed in the next section on failure. The value of I<errno> is "
8285 "indeterminate after a call to B<posix_memalign>()."
8287 "B<posix_memalign>() は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8288 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8289 "I<errno> の値は不定である。"
8292 #: build/C/man3/posix_memalign.3:164
8294 "The I<alignment> argument was not a power of two, or was not a multiple of "
8295 "I<sizeof(void\\ *)>."
8297 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8301 #: build/C/man3/posix_memalign.3:167
8302 msgid "There was insufficient memory to fulfill the allocation request."
8303 msgstr "割り当て要求を満たすのに十分なメモリーがなかった。"
8306 #: build/C/man3/posix_memalign.3:174
8308 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>() have been "
8309 "available in all Linux libc libraries."
8311 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8312 "すべての Linux libc ライブラリで使用可能である。"
8315 #: build/C/man3/posix_memalign.3:178
8316 msgid "The function B<aligned_alloc>() was added to glibc in version 2.16."
8317 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8320 #: build/C/man3/posix_memalign.3:182
8321 msgid "The function B<posix_memalign>() is available since glibc 2.1.91."
8322 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8325 #: build/C/man3/posix_memalign.3:189
8327 "The function B<valloc>() appeared in 3.0BSD. It is documented as being "
8328 "obsolete in 4.3BSD, and as legacy in SUSv2. It does not appear in "
8331 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8333 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8336 #: build/C/man3/posix_memalign.3:193
8337 msgid "The function B<pvalloc>() is a GNU extension."
8338 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8341 #: build/C/man3/posix_memalign.3:197
8342 msgid "The function B<memalign>() appears in SunOS 4.1.3 but not in 4.4BSD."
8343 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8346 #: build/C/man3/posix_memalign.3:201
8347 msgid "The function B<posix_memalign>() comes from POSIX.1d."
8348 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8351 #: build/C/man3/posix_memalign.3:206
8352 msgid "The function B<aligned_alloc>() is specified in the C11 standard."
8353 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8356 #: build/C/man3/posix_memalign.3:206
8362 #: build/C/man3/posix_memalign.3:210
8364 "Everybody agrees that B<posix_memalign>() is declared in I<E<lt>stdlib."
8367 "B<posix_memalign>() の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8371 #: build/C/man3/posix_memalign.3:214
8373 "On some systems B<memalign>() is declared in I<E<lt>stdlib.hE<gt>> instead "
8374 "of I<E<lt>malloc.hE<gt>>."
8376 "いくつかのシステムでは、 B<memalign>() は I<E<lt>malloc.hE<gt>> ではなく "
8377 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8380 #: build/C/man3/posix_memalign.3:221
8382 "According to SUSv2, B<valloc>() is declared in I<E<lt>stdlib.hE<gt>>. "
8383 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8384 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8387 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8389 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8390 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8393 #: build/C/man3/posix_memalign.3:230
8395 "On many systems there are alignment restrictions, for example, on buffers "
8396 "used for direct block device I/O. POSIX specifies the I<pathconf(path,"
8397 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed. Now one can "
8398 "use B<posix_memalign>() to satisfy this requirement."
8400 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8401 "スに対するダイレクト I/O に使用するバッファーには アラインメントに関する制限"
8402 "がある。 POSIX では、どんなアラインメントが必要かを知るために "
8403 "I<pathconf(path,_PC_REC_XFER_ALIGN)> コールを規定している。ここで "
8404 "B<posix_memalign>() を使うと、この必要条件を満たすことができる。"
8407 #: build/C/man3/posix_memalign.3:239
8409 "B<posix_memalign>() verifies that I<alignment> matches the requirements "
8410 "detailed above. B<memalign>() may not check that the I<alignment> argument "
8413 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8414 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8417 #. Other systems allow passing the result of
8424 #: build/C/man3/posix_memalign.3:267
8426 "POSIX requires that memory obtained from B<posix_memalign>() can be freed "
8427 "using B<free>(3). Some systems provide no way to reclaim memory allocated "
8428 "with B<memalign>() or B<valloc>() (because one can pass to B<free>(3) "
8429 "only a pointer obtained from B<malloc>(3), while, for example, "
8430 "B<memalign>() would call B<malloc>(3) and then align the obtained value). "
8431 "The glibc implementation allows memory obtained from any of these functions "
8432 "to be reclaimed with B<free>(3)."
8434 "POSIX では B<posix_memalign>() によって獲得したメモリーは B<free>(3) を\n"
8435 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8436 "B<memalign>() やB<valloc>() で割り当てられたメモリーを再利用する手段が\n"
8437 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8438 "B<malloc>(3) から受け取ったポインターだけだが、例えば B<memalign>() は\n"
8439 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8440 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリーも\n"
8441 "B<free>(3) で再利用することができる。"
8444 #: build/C/man3/posix_memalign.3:272
8446 "The glibc B<malloc>(3) always returns 8-byte aligned memory addresses, so "
8447 "these functions are needed only if you require larger alignment values."
8449 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリーアドレス"
8451 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8456 #: build/C/man3/posix_memalign.3:277
8457 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8458 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8461 #: build/C/man2/readahead.2:28
8467 #: build/C/man2/readahead.2:28
8473 #: build/C/man2/readahead.2:31
8474 msgid "readahead - initiate file readahead into page cache"
8475 msgstr "readahead - 前もってファイルをページキャッシュに読み込む"
8478 #: build/C/man2/readahead.2:37
8480 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8481 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8484 #: build/C/man2/readahead.2:44
8486 "B<readahead>() initiates readahead on a file so that subsequent reads from "
8487 "that file will be satisfied from the cache, and not block on disk I/O "
8488 "(assuming the readahead was initiated early enough and that other activity "
8489 "on the system did not in the meantime flush pages from the cache)."
8491 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8492 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8493 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8494 "ページがフラッシュされない場合である)。"
8497 #: build/C/man2/readahead.2:66
8499 "The I<fd> argument is a file descriptor identifying the file which is to be "
8500 "read. The I<offset> argument specifies the starting point from which data "
8501 "is to be read and I<count> specifies the number of bytes to be read. I/O is "
8502 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8503 "page boundary and bytes are read up to the next page boundary greater than "
8504 "or equal to I<(offset+count)>. B<readahead>() does not read beyond the end "
8505 "of the file. The current file offset of the open file referred to by I<fd> "
8506 "is left unchanged."
8508 "I<fd> 引き数は読み込みを行うファイルを識別するファイルディスクリプターであ"
8509 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8510 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8511 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8512 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>() は"
8513 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8514 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8517 #: build/C/man2/readahead.2:72
8519 "On success, B<readahead>() returns 0; on failure, -1 is returned, with "
8520 "I<errno> set to indicate the cause of the error."
8522 "B<readahead>() は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8526 #: build/C/man2/readahead.2:77
8527 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8529 "I<fd> が有効なファイルディスクリプターでない、または 読み込み用にオープンされ"
8533 #: build/C/man2/readahead.2:83
8535 "I<fd> does not refer to a file type to which B<readahead>() can be applied."
8537 "I<fd> が参照しているファイルが、 B<readahead>() を行うことができないタイプの"
8541 #: build/C/man2/readahead.2:88
8543 "The B<readahead>() system call appeared in Linux 2.4.13; glibc support has "
8544 "been provided since version 2.3."
8546 "B<readahead>() システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8547 "は glibc バージョン 2.3 以降で行われている。"
8550 #: build/C/man2/readahead.2:93
8552 "The B<readahead>() system call is Linux-specific, and its use should be "
8553 "avoided in portable applications."
8555 "B<readahead>() システムコールは Linux 固有であり、移植を考慮したプログラムで"
8559 #: build/C/man2/readahead.2:98
8561 "On some 32-bit architectures, the calling signature for this system call "
8562 "differs, for the reasons described in B<syscall>(2)."
8564 "いくつかの 32 ビットアーキテクチャーでは、このシステムコールの呼び出しシグネ"
8565 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8568 #: build/C/man2/readahead.2:107
8570 "B<readahead>() attempts to schedule the reads in the background and return "
8571 "immediately. However, it may block while it reads the filesystem metadata "
8572 "needed to locate the requested blocks. This occurs frequently with ext[234] "
8573 "on large files using indirect blocks instead of extents, giving the "
8574 "appearance that the call blocks until the requested data has been read."
8576 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8577 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8578 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8579 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8580 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8584 #: build/C/man2/readahead.2:113
8585 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8587 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8590 #: build/C/man2/remap_file_pages.2:28
8592 msgid "REMAP_FILE_PAGES"
8593 msgstr "REMAP_FILE_PAGES"
8596 #: build/C/man2/remap_file_pages.2:31
8597 msgid "remap_file_pages - create a nonlinear file mapping"
8598 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8601 #: build/C/man2/remap_file_pages.2:35
8604 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
8605 "B<#include E<lt>sys/mman.hE<gt>>\n"
8607 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
8608 "B<#include E<lt>sys/mman.hE<gt>>\n"
8611 #: build/C/man2/remap_file_pages.2:38
8614 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8615 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8617 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8618 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8620 #. commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8621 #. http://lwn.net/Articles/597632/
8623 #: build/C/man2/remap_file_pages.2:47
8625 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8626 "eventually be replaced by a slower in-kernel emulation. Those few "
8627 "applications that use this system call should consider migrating to "
8630 "B<注意>: このシステムコールは (Linux 3.16 以降で) 非推奨となっており、 やがて"
8631 "より低速なカーネル内でのエミュレーションに置き換えられる予定である。 このシス"
8632 "テムコールを使用しているアプリケーションは少ないが、こうしたアプリケーション"
8633 "は代替手段への移行を検討すべきである。"
8636 #: build/C/man2/remap_file_pages.2:59
8638 "The B<remap_file_pages>() system call is used to create a nonlinear "
8639 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8640 "nonsequential order in memory. The advantage of using "
8641 "B<remap_file_pages>() over using repeated calls to B<mmap>(2) is that the "
8642 "former approach does not require the kernel to create additional VMA "
8643 "(Virtual Memory Area) data structures."
8645 "B<remap_file_pages>() システムコールは非線形なマッピング、 つまりファイルの"
8646 "ページがメモリー上で連続しない順番でマップされる マッピングを作成するために使"
8647 "われる。 B<remap_file_pages>() を使う方が B<mmap>(2) を繰り返して使うより優"
8648 "れている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモ"
8649 "リー領域) データ構造体を追加で作成する必要がないことである。"
8652 #: build/C/man2/remap_file_pages.2:61
8653 msgid "To create a nonlinear mapping we perform the following steps:"
8654 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8657 #: build/C/man2/remap_file_pages.2:61 build/C/man2/memfd_create.2:219
8663 #: build/C/man2/remap_file_pages.2:69
8665 "Use B<mmap>(2) to create a mapping (which is initially linear). This "
8666 "mapping must be created with the B<MAP_SHARED> flag."
8668 "B<mmap>(2) を使い、マッピングを作成する (このマッピングは最初は線形であ"
8669 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8673 #: build/C/man2/remap_file_pages.2:69 build/C/man2/memfd_create.2:225
8679 #: build/C/man2/remap_file_pages.2:77
8681 "Use one or more calls to B<remap_file_pages>() to rearrange the "
8682 "correspondence between the pages of the mapping and the pages of the file. "
8683 "It is possible to map the same page of a file into multiple locations within "
8684 "the mapped region."
8686 "B<remap_file_pages>() を 1 回以上呼び出して、 マッピングのページとファイルの"
8687 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8691 #: build/C/man2/remap_file_pages.2:88
8693 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8694 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8695 "system page size; I<size> is the length of the region in bytes."
8697 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8698 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8699 "る。 I<size> は領域の長さであり、単位はバイトである。"
8702 #: build/C/man2/remap_file_pages.2:106
8704 "The I<addr> argument serves two purposes. First, it identifies the mapping "
8705 "whose pages we want to rearrange. Thus, I<addr> must be an address that "
8706 "falls within a region previously mapped by a call to B<mmap>(2). Second, "
8707 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8708 "and I<size> will be placed."
8710 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8711 "成したいページの マッピングを識別することである。 よって I<addr> は "
8712 "B<mmap>(2) の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8713 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8714 "予定のアドレスを、 I<addr> によって指定することである。"
8716 #. This rounding is weird, and not consistent with the treatment of
8717 #. the analogous arguments for munmap()/mprotect() and for mlock().
8720 #: build/C/man2/remap_file_pages.2:120
8722 "The values specified in I<addr> and I<size> should be multiples of the "
8723 "system page size. If they are not, then the kernel rounds I<both> values "
8724 "I<down> to the nearest multiple of the page size."
8726 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8727 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8731 #: build/C/man2/remap_file_pages.2:124
8732 msgid "The I<prot> argument must be specified as 0."
8733 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8736 #: build/C/man2/remap_file_pages.2:132
8738 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8739 "other than B<MAP_NONBLOCK> are ignored."
8741 "I<flags> 引き数は B<mmap>(2) のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8745 #: build/C/man2/remap_file_pages.2:139
8747 "On success, B<remap_file_pages>() returns 0. On error, -1 is returned, and "
8748 "I<errno> is set appropriately."
8750 "成功した場合、 B<remap_file_pages>() は 0 を返す。 エラーの場合、-1 が返さ"
8751 "れ、 I<errno> が適切に設定される。"
8754 #: build/C/man2/remap_file_pages.2:147
8756 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8759 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8762 #. And possibly others from vma->vm_ops->populate()
8764 #: build/C/man2/remap_file_pages.2:156
8765 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8766 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8769 #: build/C/man2/remap_file_pages.2:161
8771 "The B<remap_file_pages>() system call appeared in Linux 2.5.46; glibc "
8772 "support was added in version 2.3.3."
8774 "B<remap_file_pages>() システムコールは Linux 2.5.46 で登場した。 glibc での"
8775 "サポートは glibc バージョン 2.3.3 で追加された。"
8778 #: build/C/man2/remap_file_pages.2:165
8779 msgid "The B<remap_file_pages>() system call is Linux-specific."
8780 msgstr "B<remap_file_pages>() システムコールは Linux 固有のものである。"
8782 #. commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8784 #: build/C/man2/remap_file_pages.2:176
8786 "Since Linux 2.6.23, B<remap_file_pages>() creates non-linear mappings only "
8787 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs. On filesystems "
8788 "with a backing store, B<remap_file_pages>() is not much more efficient than "
8789 "using B<mmap>(2) to adjust which parts of the file are mapped to which "
8792 "Linux 2.6.23 以降、 B<remap_file_pages>() は tmpfs, hugetlbfs, ramfs などのイ"
8793 "ンメモリーファイルシステム上にのみ非線形マッピングを作成する。 裏にデータスト"
8794 "アを持つファイルシステム上では、 B<remap_file_pages>() は、 ファイルのどの部"
8795 "分がどのアドレスにマッピングされているかの調整が、 B<mmap>(2) を使った場合ほ"
8799 #: build/C/man2/remap_file_pages.2:183
8801 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8804 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8808 #: build/C/man3/shm_open.3:26
8814 #: build/C/man3/shm_open.3:29
8816 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8818 "shm_open, shm_unlink - POSIX 共有メモリーオブジェクトの作成/オープン/削除を行"
8822 #: build/C/man3/shm_open.3:33
8823 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8824 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8827 #: build/C/man3/shm_open.3:35
8828 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8829 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8832 #: build/C/man3/shm_open.3:37
8834 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8836 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8839 #: build/C/man3/shm_open.3:39
8840 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8841 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8844 #: build/C/man3/shm_open.3:41
8845 msgid "Link with I<-lrt>."
8846 msgstr "I<-lrt> でリンクする。"
8849 #: build/C/man3/shm_open.3:53
8851 "B<shm_open>() creates and opens a new, or opens an existing, POSIX shared "
8852 "memory object. A POSIX shared memory object is in effect a handle which can "
8853 "be used by unrelated processes to B<mmap>(2) the same region of shared "
8854 "memory. The B<shm_unlink>() function performs the converse operation, "
8855 "removing an object previously created by B<shm_open>()."
8857 "B<shm_open>() は、POSIX 共有メモリーオブジェクトを新規に作成/オープンした"
8858 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリーオブ"
8859 "ジェクトは、実際には、関係のないプロセスが 共有メモリーの同じ領域を "
8860 "B<mmap>(2) するために使用することができる手段である。 B<shm_unlink>() は、"
8861 "逆の操作、つまり以前に B<shm_open>() で作成されたオブジェクトの削除を行う。"
8863 #. glibc allows the initial slash to be omitted, and makes
8864 #. multiple initial slashes equivalent to a single slash.
8865 #. This differs from the implementation of POSIX message queues.
8866 #. glibc allows subdirectory components in the name, in which
8867 #. case the subdirectory must exist under /dev/shm, and allow the
8868 #. required permissions if a user wants to create a shared memory
8869 #. object in that subdirectory.
8871 #: build/C/man3/shm_open.3:74
8873 "The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> "
8874 "specifies the shared memory object to be created or opened. For portable "
8875 "use, a shared memory object should be identified by a name of the form I</"
8876 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8877 "255) characters consisting of an initial slash, followed by one or more "
8878 "characters, none of which are slashes."
8880 "B<shm_open>() の動作は B<open>(2) とよく似ている。 I<name> で作成したりオー"
8881 "プンしたりする共有メモリーオブジェクトを指定する。 移植性を持たせるためには、"
8882 "共有メモリーオブジェクトは I</somename> という形式の名前で識別し、 その名前"
8883 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8884 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8887 #: build/C/man3/shm_open.3:81
8889 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8890 "or B<O_RDWR> and any of the other flags listed here:"
8892 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8893 "述べる他のフラグの論理和をとったもの を指定する。"
8896 #: build/C/man3/shm_open.3:81
8899 msgstr "B<O_RDONLY>"
8902 #: build/C/man3/shm_open.3:89
8904 "Open the object for read access. A shared memory object opened in this way "
8905 "can be B<mmap>(2)ed only for read (B<PROT_READ>) access."
8907 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8908 "された共有メモリーオブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8909 "B<mmap>(2) することができる。"
8912 #: build/C/man3/shm_open.3:89
8918 #: build/C/man3/shm_open.3:92
8919 msgid "Open the object for read-write access."
8920 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8923 #: build/C/man3/shm_open.3:92
8928 #. In truth it is actually the filesystem IDs on Linux, but these
8929 #. are nearly always the same as the effective IDs. (MTK, Jul 05)
8931 #: build/C/man3/shm_open.3:112
8933 "Create the shared memory object if it does not exist. The user and group "
8934 "ownership of the object are taken from the corresponding effective IDs of "
8935 "the calling process, and the object's permission bits are set according to "
8936 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8937 "file mode creation mask (see B<umask>(2)) are cleared for the new object. "
8938 "A set of macro constants which can be used to define I<mode> is listed in "
8939 "B<open>(2). (Symbolic definitions of these constants can be obtained by "
8940 "including I<E<lt>sys/stat.hE<gt>>.)"
8942 "存在しない場合、共有メモリーオブジェクトを作成する。 オブジェクトのユーザーと"
8943 "グループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェ"
8944 "クトの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファ"
8945 "イルモード作成マスク (B<umask>(2) 参照) に設定されている値は、新規オブジェク"
8946 "トに関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)"
8947 "は B<open>(2) に記載されている (これらの定数のシンボル定義は I<E<lt>sys/"
8948 "stat.hE<gt>> のインクルードにより得られる)。"
8951 #: build/C/man3/shm_open.3:118
8953 "A new shared memory object initially has zero length\\(emthe size of the "
8954 "object can be set using B<ftruncate>(2). The newly allocated bytes of a "
8955 "shared memory object are automatically initialized to 0."
8957 "新規に作成された共有メモリーオブジェクトは長さ 0 で初期化される。 オブジェク"
8958 "トの大きさは B<ftruncate>(2) を使って設定できる。 共有メモリーオブジェクトと"
8959 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8962 #: build/C/man3/shm_open.3:118
8968 #: build/C/man3/shm_open.3:127
8970 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8971 "I<name> already exists, return an error. The check for the existence of the "
8972 "object, and its creation if it does not exist, are performed atomically."
8974 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリーオブジェ"
8975 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8976 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8980 #: build/C/man3/shm_open.3:127
8986 #: build/C/man3/shm_open.3:130
8987 msgid "If the shared memory object already exists, truncate it to zero bytes."
8989 "共有メモリーオブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8993 #: build/C/man3/shm_open.3:133
8995 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8998 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
9001 #: build/C/man3/shm_open.3:144
9003 "On successful completion B<shm_open>() returns a new file descriptor "
9004 "referring to the shared memory object. This file descriptor is guaranteed "
9005 "to be the lowest-numbered file descriptor not previously opened within the "
9006 "process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file "
9009 "成功して完了した場合、 B<shm_open>() は共有メモリーオブジェクトを参照する新"
9010 "しいファイルディスクリプターを返す。 このファイルディスクリプターは、そのプロ"
9011 "セス内で過去にオープンされていない ファイルディスクリプターの中で最も小さな数"
9012 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2) を参照) が、この"
9013 "ファイルディスクリプターに設定される。"
9016 #: build/C/man3/shm_open.3:153
9018 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2) "
9019 "(for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) "
9020 "the file descriptor may be closed without affecting the memory mapping."
9022 "通常、これらのファイルディスクリプターは、この後続けて実行される "
9023 "B<ftruncate>(2) (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2) の呼"
9024 "び出しに使用される。 B<mmap>(2) を呼び出した後は、ファイルディスクリプターを"
9025 "クローズしてもよく、 クローズしてもメモリーマッピングに影響を与えることはな"
9029 #: build/C/man3/shm_open.3:171
9031 "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a "
9032 "shared memory object name, and, once all processes have unmapped the object, "
9033 "de-allocates and destroys the contents of the associated memory region. "
9034 "After a successful B<shm_unlink>(), attempts to B<shm_open>() an object "
9035 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
9036 "case a new, distinct object is created)."
9038 "B<shm_unlink>() の動作は B<unlink>(2) とよく似ている: 共有メモリーオブジェ"
9039 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
9040 "でオブジェクトの割り当てを解除し、 対応するメモリー領域の内容を破棄する。 "
9041 "B<shm_unlink>() が成功した後で、同じ I<name> を持つオブジェクトに対して "
9042 "B<shm_open>() を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
9043 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
9046 #: build/C/man3/shm_open.3:180
9048 "On success, B<shm_open>() returns a nonnegative file descriptor. On "
9049 "failure, B<shm_open>() returns -1. B<shm_unlink>() returns 0 on success, "
9052 "成功した場合、 B<shm_open>() は非負のファイルディスクリプターを返す。 失敗し"
9053 "た場合、 B<shm_open>() は -1 を返す。 B<shm_unlink>() は、成功した場合 0 "
9054 "を、エラーが起こった場合 -1 を返す。"
9057 #: build/C/man3/shm_open.3:187
9059 "On failure, I<errno> is set to indicate the cause of the error. Values "
9060 "which may appear in I<errno> include the following:"
9062 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
9066 #: build/C/man3/shm_open.3:192
9067 msgid "Permission to B<shm_unlink>() the shared memory object was denied."
9068 msgstr "共有メモリーオブジェクトを B<shm_unlink>() する権限がなかった。"
9071 #: build/C/man3/shm_open.3:202
9073 "Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or "
9074 "B<O_TRUNC> was specified and the caller does not have write permission on "
9077 "指定された I<mode> で I<name> を B<shm_open>() する権限がなかった。もしく"
9078 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
9082 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
9088 #: build/C/man3/shm_open.3:213
9090 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the "
9091 "shared memory object specified by I<name> already exists."
9093 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>() に指定されたが、 I<name> で指"
9094 "定された共有メモリーオブジェクトが既に存在した。"
9097 #: build/C/man3/shm_open.3:220
9098 msgid "The I<name> argument to B<shm_open>() was invalid."
9099 msgstr "B<shm_open>() に与えられた I<name> 引き数が不正であった。"
9102 #: build/C/man3/shm_open.3:220 build/C/man2/memfd_create.2:146
9108 #: build/C/man3/shm_open.3:223
9109 msgid "The process already has the maximum number of files open."
9110 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9113 #: build/C/man3/shm_open.3:223
9115 msgid "B<ENAMETOOLONG>"
9116 msgstr "B<ENAMETOOLONG>"
9119 #: build/C/man3/shm_open.3:229
9120 msgid "The length of I<name> exceeds B<PATH_MAX>."
9121 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9124 #: build/C/man3/shm_open.3:233
9126 "The limit on the total number of files open on the system has been reached."
9127 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9130 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9131 #: build/C/man2/shmget.2:225
9137 #: build/C/man3/shm_open.3:242
9139 "An attempt was made to B<shm_open>() a I<name> that did not exist, and "
9140 "B<O_CREAT> was not specified."
9142 "存在していない I<name> のオブジェクトを B<shm_open>() しようとしたが、 "
9143 "B<O_CREAT> が指定されていなかった。"
9146 #: build/C/man3/shm_open.3:249
9148 "An attempt was to made to B<shm_unlink>() a I<name> that does not exist."
9149 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>() しようとした。"
9152 #: build/C/man3/shm_open.3:251
9153 msgid "These functions are provided in glibc 2.2 and later."
9154 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9157 #: build/C/man3/shm_open.3:257
9159 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9160 "object is set to either the calling process's effective group ID or \"a "
9161 "system default group ID\"."
9163 "POSIX.1-2001 には、新規に作成される共有メモリーオブジェクトのグループ所有権"
9164 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9165 "ID」 のどちらかに設定される、と書かれている。"
9168 #: build/C/man3/shm_open.3:266
9170 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9171 "unspecified. On Linux, this will successfully truncate an existing shared "
9172 "memory object\\(emthis may not be so on other UNIX systems."
9174 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9175 "いる。Linux では、 既存の共有メモリーオブジェクトに対する切り詰め (truncate) "
9176 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9179 #: build/C/man3/shm_open.3:271
9181 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9182 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9184 "Linux 2.4 における POSIX 共有メモリーオブジェクトの実装は 専用のファイルシス"
9185 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9188 #: build/C/man3/shm_open.3:283
9190 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9191 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9192 "B<shm_overview>(7)"
9194 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9195 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9196 "B<shm_overview>(7)"
9199 #: build/C/man7/shm_overview.7:27
9201 msgid "SHM_OVERVIEW"
9202 msgstr "SHM_OVERVIEW"
9205 #: build/C/man7/shm_overview.7:27
9211 #: build/C/man7/shm_overview.7:30
9212 msgid "shm_overview - overview of POSIX shared memory"
9213 msgstr "shm_overview - POSIX 共有メモリーの概要"
9216 #: build/C/man7/shm_overview.7:33
9218 "The POSIX shared memory API allows processes to communicate information by "
9219 "sharing a region of memory."
9221 "POSIX 共有メモリー API を使用すると、メモリーのある領域を共有して、 プロセス"
9222 "間で情報をやり取りすることができる。"
9225 #: build/C/man7/shm_overview.7:35
9226 msgid "The interfaces employed in the API are:"
9227 msgstr "この API では以下のインターフェースが採用されている。"
9230 #: build/C/man7/shm_overview.7:35
9232 msgid "B<shm_open>(3)"
9233 msgstr "B<shm_open>(3)"
9236 #: build/C/man7/shm_overview.7:42
9238 "Create and open a new object, or open an existing object. This is analogous "
9239 "to B<open>(2). The call returns a file descriptor for use by the other "
9240 "interfaces listed below."
9242 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9243 "する。これは B<open>(2) と同じである。下記にある他のインターフェースで使用す"
9244 "る ファイルディスクリプターを返す。"
9247 #: build/C/man7/shm_overview.7:42
9249 msgid "B<ftruncate>(2)"
9250 msgstr "B<ftruncate>(2)"
9253 #: build/C/man7/shm_overview.7:46
9255 "Set the size of the shared memory object. (A newly created shared memory "
9256 "object has a length of zero.)"
9257 msgstr "共有メモリーオブジェクトの大きさを設定する。"
9260 #: build/C/man7/shm_overview.7:50
9262 "Map the shared memory object into the virtual address space of the calling "
9265 "呼び出したプロセスの仮想アドレス空間に共有メモリーオブジェクトを マップする。"
9268 #: build/C/man7/shm_overview.7:50
9270 msgid "B<munmap>(2)"
9271 msgstr "B<munmap>(2)"
9274 #: build/C/man7/shm_overview.7:54
9276 "Unmap the shared memory object from the virtual address space of the calling "
9279 "呼び出したプロセスの仮想アドレス空間から 共有メモリーオブジェクトをアンマップ"
9283 #: build/C/man7/shm_overview.7:54
9285 msgid "B<shm_unlink>(3)"
9286 msgstr "B<shm_unlink>(3)"
9289 #: build/C/man7/shm_overview.7:57
9290 msgid "Remove a shared memory object name."
9291 msgstr "共有メモリーオブジェクト名を削除する。"
9294 #: build/C/man7/shm_overview.7:57
9297 msgstr "B<close>(2)"
9300 #: build/C/man7/shm_overview.7:62
9302 "Close the file descriptor allocated by B<shm_open>(3) when it is no longer "
9305 "B<shm_open>(3) で割り当てられたファイルディスクリプターが不要になった際に、 "
9306 "そのファイルディスクリプターをクローズする。"
9309 #: build/C/man7/shm_overview.7:62
9312 msgstr "B<fstat>(2)"
9315 #: build/C/man7/shm_overview.7:76
9317 "Obtain a I<stat> structure that describes the shared memory object. Among "
9318 "the information returned by this call are the object's size (I<st_size>), "
9319 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9321 "その共有メモリーオブジェクトについての情報が入った I<stat> 構造体を取得す"
9322 "る。 このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許"
9323 "可属性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>) がある。"
9326 #: build/C/man7/shm_overview.7:76
9328 msgid "B<fchown>(2)"
9329 msgstr "B<fchown>(2)"
9332 #: build/C/man7/shm_overview.7:79
9333 msgid "To change the ownership of a shared memory object."
9334 msgstr "共有メモリーオブジェクトの所有権を変更する。"
9337 #: build/C/man7/shm_overview.7:79
9339 msgid "B<fchmod>(2)"
9340 msgstr "B<fchmod>(2)"
9343 #: build/C/man7/shm_overview.7:82
9344 msgid "To change the permissions of a shared memory object."
9345 msgstr "共有メモリーオブジェクトの許可属性を変更する。"
9348 #: build/C/man7/shm_overview.7:82
9354 #: build/C/man7/shm_overview.7:84
9355 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9356 msgstr "POSIX 共有メモリーは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9359 #: build/C/man7/shm_overview.7:84
9365 #: build/C/man7/shm_overview.7:89
9367 "POSIX shared memory objects have kernel persistence: a shared memory object "
9368 "will exist until the system is shut down, or until all processes have "
9369 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9371 "POSIX 共有メモリーオブジェクトはカーネル内で保持される。 共有メモリーオブジェ"
9372 "クトは、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトを"
9373 "アンマップし、 B<shm_unlink>(3) で削除されるまで、存在し続ける。"
9376 #: build/C/man7/shm_overview.7:89
9382 #: build/C/man7/shm_overview.7:94
9384 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9385 "to link against the real-time library, I<librt>."
9387 "POSIX 共有メモリー API を使用したプログラムは I<cc -lrt> でコンパイルし、リア"
9388 "ルタイムライブラリ I<librt> とリンクしなければならない。"
9391 #: build/C/man7/shm_overview.7:94
9393 msgid "Accessing shared memory objects via the filesystem"
9394 msgstr "ファイルシステム経由での共有メモリーオブジェクトへのアクセス"
9397 #: build/C/man7/shm_overview.7:101
9399 "On Linux, shared memory objects are created in a (I<tmpfs>) virtual "
9400 "filesystem, normally mounted under I</dev/shm>. Since kernel 2.6.19, Linux "
9401 "supports the use of access control lists (ACLs) to control the permissions "
9402 "of objects in the virtual filesystem."
9404 "Linux では、共有メモリーオブジェクトは通常 I</dev/shm> 以下にマウントされる仮"
9405 "想ファイルシステム (I<tmpfs>) 内に作成される。 カーネル 2.6.19 以降の Linux "
9406 "では、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御"
9407 "リスト (ACL; access control lists) を使うことができる。"
9410 #: build/C/man7/shm_overview.7:106
9412 "Typically, processes must synchronize their access to a shared memory "
9413 "object, using, for example, POSIX semaphores."
9415 "通常は、共有メモリーオブジェクトにアクセスするプロセスは、 POSIX セマフォなど"
9416 "を使ってプロセス間で同期をとらなければならない。"
9419 #: build/C/man7/shm_overview.7:114
9421 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9422 "memory API. POSIX shared memory provides a simpler, and better designed "
9423 "interface; on the other hand POSIX shared memory is somewhat less widely "
9424 "available (especially on older systems) than System V shared memory."
9426 "System V 共有メモリー (B<shmget>(2), B<shmop>(2) など) は古い共有メモリー "
9427 "API である。 POSIX 共有メモリーは、より簡単で、うまく設計されたインターフェー"
9428 "スを提供している。 一方で、POSIX 共有メモリーは System V 共有メモリーと比べる"
9429 "と 利用できるシステムが少ない (特に、古いシステムでは少ない)。"
9432 #: build/C/man7/shm_overview.7:127
9434 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9435 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9436 "B<shm_unlink>(3), B<sem_overview>(7)"
9438 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9439 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9440 "B<shm_unlink>(3), B<sem_overview>(7)"
9443 #: build/C/man2/shmctl.2:45
9449 #: build/C/man2/shmctl.2:45
9455 #: build/C/man2/shmctl.2:48
9456 msgid "shmctl - System V shared memory control"
9457 msgstr "shmctl - System V 共有メモリー (shared memory) を制御する"
9460 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9461 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9462 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9465 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9466 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9467 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9470 #: build/C/man2/shmctl.2:55
9472 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9474 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9477 #: build/C/man2/shmctl.2:62
9479 "B<shmctl>() performs the control operation specified by I<cmd> on the System"
9480 "\\ V shared memory segment whose identifier is given in I<shmid>."
9482 "B<shmctl>() は、識別子が I<shmid> の System\\ V 共有メモリーセグメントに対し"
9483 "て I<cmd> で指示した制御命令を実行する。"
9486 #: build/C/man2/shmctl.2:67
9488 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9489 "I<E<lt>sys/shm.hE<gt>> as follows:"
9491 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインターである。 この構造体は "
9492 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9495 #: build/C/man2/shmctl.2:81
9498 "struct shmid_ds {\n"
9499 " struct ipc_perm shm_perm; /* Ownership and permissions */\n"
9500 " size_t shm_segsz; /* Size of segment (bytes) */\n"
9501 " time_t shm_atime; /* Last attach time */\n"
9502 " time_t shm_dtime; /* Last detach time */\n"
9503 " time_t shm_ctime; /* Last change time */\n"
9504 " pid_t shm_cpid; /* PID of creator */\n"
9505 " pid_t shm_lpid; /* PID of last shmat(2)/shmdt(2) */\n"
9506 " shmatt_t shm_nattch; /* No. of current attaches */\n"
9510 "struct shmid_ds {\n"
9511 " struct ipc_perm shm_perm; /* 所有権と許可 */\n"
9512 " size_t shm_segsz; /* セグメントのサイズ (バイト) */\n"
9513 " time_t shm_atime; /* 最後の付加 (attach) の時刻 */\n"
9514 " time_t shm_dtime; /* 最後の分離 (detach) の時刻 */\n"
9515 " time_t shm_ctime; /* 最後に変更が行われた時刻 */\n"
9516 " pid_t shm_cpid; /* 作成者 (creator) の PID */\n"
9517 " pid_t shm_lpid; /* 最後の shmat(2)/shmdt(2) の PID */\n"
9518 " shmatt_t shm_nattch; /* 現在付加されている数 */\n"
9523 #: build/C/man2/shmctl.2:89
9525 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9526 "settable using B<IPC_SET>):"
9528 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9529 "B<IPC_SET> を使って設定可能である):"
9532 #: build/C/man2/shmctl.2:102
9535 "struct ipc_perm {\n"
9536 " key_t __key; /* Key supplied to shmget(2) */\n"
9537 " uid_t B<uid>; /* Effective UID of owner */\n"
9538 " gid_t B<gid>; /* Effective GID of owner */\n"
9539 " uid_t cuid; /* Effective UID of creator */\n"
9540 " gid_t cgid; /* Effective GID of creator */\n"
9541 " unsigned short B<mode>; /* B<Permissions> + SHM_DEST and\n"
9542 " SHM_LOCKED flags */\n"
9543 " unsigned short __seq; /* Sequence number */\n"
9546 "struct ipc_perm {\n"
9547 " key_t __key; /* shmget(2) に与えられるキー */\n"
9548 " uid_t B<uid>; /* 所有者の実効 UID */\n"
9549 " gid_t B<gid>; /* 所有者の実効 GID */\n"
9550 " uid_t cuid; /* 作成者の実効 UID */\n"
9551 " gid_t cgid; /* 作成者の実効 GID */\n"
9552 " unsigned short B<mode>; /* B<許可> + SHM_DEST と\n"
9553 " SHM_LOCKED フラグ */\n"
9554 " unsigned short __seq; /* シーケンス番号 */\n"
9558 #: build/C/man2/shmctl.2:108
9559 msgid "Valid values for I<cmd> are:"
9560 msgstr "I<cmd> として有効な値は以下の通り:"
9563 #: build/C/man2/shmctl.2:109
9566 msgstr "B<IPC_STAT>"
9569 #: build/C/man2/shmctl.2:118
9571 "Copy information from the kernel data structure associated with I<shmid> "
9572 "into the I<shmid_ds> structure pointed to by I<buf>. The caller must have "
9573 "read permission on the shared memory segment."
9575 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9576 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリーセグメントに対する "
9577 "読み込み許可を持たなければならない。"
9580 #: build/C/man2/shmctl.2:118
9586 #: build/C/man2/shmctl.2:136
9588 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9589 "I<buf> to the kernel data structure associated with this shared memory "
9590 "segment, updating also its I<shm_ctime> member. The following fields can be "
9591 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9592 "of) I<shm_perm.mode>. The effective UID of the calling process must match "
9593 "the owner (I<shm_perm.uid>) or creator (I<shm_perm.cuid>) of the shared "
9594 "memory segment, or the caller must be privileged."
9596 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9597 "有メモリーセグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9598 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9599 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9600 "セスの実効 UID が所有者 (I<shm_perm.uid>) または作成者 (I<shm_perm.cuid>) "
9601 "と一致するか、呼び出し元が特権を持たなければならない。"
9604 #: build/C/man2/shmctl.2:136
9607 msgstr "B<IPC_RMID>"
9610 #: build/C/man2/shmctl.2:149
9612 "Mark the segment to be destroyed. The segment will actually be destroyed "
9613 "only after the last process detaches it (i.e., when the I<shm_nattch> member "
9614 "of the associated structure I<shmid_ds> is zero). The caller must be the "
9615 "owner or creator of the segment, or be privileged. The I<buf> argument is "
9618 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9619 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9620 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9621 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9624 #: build/C/man2/shmctl.2:157
9626 "If a segment has been marked for destruction, then the (nonstandard) "
9627 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9628 "structure retrieved by B<IPC_STAT> will be set."
9630 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9631 "I<shm_perm.mode> フィールドの (標準ではない) B<SHM_DEST> フラグが設定され"
9632 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9635 #: build/C/man2/shmctl.2:160
9637 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9638 "its pages that were faulted in will remain in memory or swap."
9640 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9641 "なれば、フォールト (fault) されたページは メモリーかスワップ (swap) に残り続"
9645 #: build/C/man2/shmctl.2:165
9647 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9649 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9652 #: build/C/man2/shmctl.2:165
9654 msgid "B<IPC_INFO> (Linux-specific)"
9655 msgstr "B<IPC_INFO> (Linux 固有)"
9658 #: build/C/man2/shmctl.2:178
9660 "Return information about system-wide shared memory limits and parameters in "
9661 "the structure pointed to by I<buf>. This structure is of type I<shminfo> "
9662 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9663 "B<_GNU_SOURCE> feature test macro is defined:"
9665 "システム全体での共有メモリーの制限とパラメーターに関する情報を、 I<buf> が指"
9666 "す構造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必"
9667 "要である)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9668 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9671 #: build/C/man2/shmctl.2:192
9674 "struct shminfo {\n"
9675 " unsigned long shmmax; /* Maximum segment size */\n"
9676 " unsigned long shmmin; /* Minimum segment size;\n"
9678 " unsigned long shmmni; /* Maximum number of segments */\n"
9679 " unsigned long shmseg; /* Maximum number of segments\n"
9680 " that a process can attach;\n"
9681 " unused within kernel */\n"
9682 " unsigned long shmall; /* Maximum number of pages of\n"
9683 " shared memory, system-wide */\n"
9686 "struct shminfo {\n"
9687 " unsigned long shmmax; /* 最大セグメントサイズ */\n"
9688 " unsigned long shmmin; /* 最小セグメントサイズ。\n"
9690 " unsigned long shmmni; /* 最大セグメント数 */\n"
9691 " unsigned long shmseg; /* プロセスが付加できる\n"
9694 " unsigned long shmall; /* 共有メモリーの最大ページ数。\n"
9699 #: build/C/man2/shmctl.2:205
9701 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9702 "files of the same name; see B<proc>(5) for details."
9704 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9705 "で変更可能である。 詳しくは B<proc>(5) を参照。"
9708 #: build/C/man2/shmctl.2:205
9710 msgid "B<SHM_INFO> (Linux-specific)"
9711 msgstr "B<SHM_INFO> (Linux 固有)"
9714 #: build/C/man2/shmctl.2:216
9716 "Return a I<shm_info> structure whose fields contain information about system "
9717 "resources consumed by shared memory. This structure is defined in "
9718 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9720 "共有メモリーが消費しているシステム資源に関する情報を 格納した I<shm_info> 構"
9721 "造体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9722 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9725 #: build/C/man2/shmctl.2:233
9728 "struct shm_info {\n"
9729 " int used_ids; /* # of currently existing\n"
9731 " unsigned long shm_tot; /* Total number of shared\n"
9732 " memory pages */\n"
9733 " unsigned long shm_rss; /* # of resident shared\n"
9734 " memory pages */\n"
9735 " unsigned long shm_swp; /* # of swapped shared\n"
9736 " memory pages */\n"
9737 " unsigned long swap_attempts;\n"
9738 " /* Unused since Linux 2.4 */\n"
9739 " unsigned long swap_successes;\n"
9740 " /* Unused since Linux 2.4 */\n"
9743 "struct shm_info {\n"
9744 " int used_ids; /* 現在存在するセグメント数 */\n"
9745 " unsigned long shm_tot; /* 共有メモリーのページ総数 */\n"
9746 " unsigned long shm_rss; /* メモリー上にある (スワップされて\n"
9747 " いない) 共有メモリーページ数 */\n"
9748 " unsigned long shm_swp; /* スワップされている共有メモリー\n"
9750 " unsigned long swap_attempts;\n"
9751 " /* Linux 2.4 以降では未使用 */\n"
9752 " unsigned long swap_successes;\n"
9753 " /* Linux 2.4 以降では未使用 */\n"
9757 #: build/C/man2/shmctl.2:235
9759 msgid "B<SHM_STAT> (Linux-specific)"
9760 msgstr "B<SHM_STAT> (Linux 固有)"
9763 #: build/C/man2/shmctl.2:246
9765 "Return a I<shmid_ds> structure as for B<IPC_STAT>. However, the I<shmid> "
9766 "argument is not a segment identifier, but instead an index into the kernel's "
9767 "internal array that maintains information about all shared memory segments "
9770 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9771 "グメント識別子ではなく、システム上の全ての共有メモリー セグメントに関する情報"
9772 "を管理するカーネルの内部配列へのインデックス である。"
9775 #: build/C/man2/shmctl.2:249
9777 "The caller can prevent or allow swapping of a shared memory segment with the "
9778 "following I<cmd> values:"
9780 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリーセグメントが ス"
9781 "ワップされることを防止したり、許可したりできる:"
9784 #: build/C/man2/shmctl.2:250
9786 msgid "B<SHM_LOCK> (Linux-specific)"
9787 msgstr "B<SHM_LOCK> (Linux 固有)"
9790 #: build/C/man2/shmctl.2:262
9792 "Prevent swapping of the shared memory segment. The caller must fault in any "
9793 "pages that are required to be present after locking is enabled. If a "
9794 "segment has been locked, then the (nonstandard) B<SHM_LOCKED> flag of the "
9795 "I<shm_perm.mode> field in the associated data structure retrieved by "
9796 "B<IPC_STAT> will be set."
9798 "共有メモリーセグメントをスワップすることを防止する。 ロックが有効になった後、"
9799 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9800 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9801 "I<shm_perm.mode> フィールドの (標準的ではない) B<SHM_LOCKED> フラグが設定さ"
9802 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9805 #: build/C/man2/shmctl.2:262
9807 msgid "B<SHM_UNLOCK> (Linux-specific)"
9808 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9811 #: build/C/man2/shmctl.2:265
9812 msgid "Unlock the segment, allowing it to be swapped out."
9813 msgstr "セグメントのロックを解除し、スワップアウトすることを可能にする。"
9815 #. There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9816 #. be applied to a segment, regardless of ownership of the segment.
9817 #. This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9818 #. in 2.6.10. MTK, May 2005
9820 #: build/C/man2/shmctl.2:283
9822 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9823 "and B<SHM_UNLOCK>. Since kernel 2.6.10, an unprivileged process can employ "
9824 "these operations if its effective UID matches the owner or creator UID of "
9825 "the segment, and (for B<SHM_LOCK>) the amount of memory to be locked falls "
9826 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9828 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9829 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9830 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9831 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9832 "(B<SHM_LOCK> の場合には) ロックするメモリーの合計が B<RLIMIT_MEMLOCK> リソー"
9833 "ス上限 (B<setrlimit>(2) 参照) の範囲内に入っていることである。"
9836 #: build/C/man2/shmctl.2:301
9838 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9839 "highest used entry in the kernel's internal array recording information "
9840 "about all shared memory segments. (This information can be used with "
9841 "repeated B<SHM_STAT> operations to obtain information about all shared "
9842 "memory segments on the system.) A successful B<SHM_STAT> operation returns "
9843 "the identifier of the shared memory segment whose index was given in "
9844 "I<shmid>. Other operations return 0 on success."
9846 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリーセグメントに"
9847 "関する情報を 管理しているカーネルの内部配列の使用中エントリーのインデックス"
9848 "の うち最大値を返す (この情報は、システムの全ての共有メモリーセグメントに関す"
9849 "る情報を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用でき"
9850 "る)。 B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持"
9851 "つ共有メモリーセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9854 #: build/C/man2/shmctl.2:305
9855 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9856 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9859 #: build/C/man2/shmctl.2:314
9861 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9862 "read access for I<shmid>, and the calling process does not have the "
9863 "B<CAP_IPC_OWNER> capability."
9865 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9866 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9867 "ケーパビリティ (capability) を持っていない。"
9870 #: build/C/man2/shmctl.2:325
9872 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9873 "pointed to by I<buf> isn't accessible."
9875 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9879 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9885 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9886 msgid "I<shmid> points to a removed identifier."
9887 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9890 #: build/C/man2/shmctl.2:337
9892 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command. Or: "
9893 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9894 "to an array slot that is currently unused."
9896 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9897 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9901 #: build/C/man2/shmctl.2:348
9903 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9904 "be-locked segment would mean that the total bytes in locked shared memory "
9905 "segments would exceed the limit for the real user ID of the calling "
9906 "process. This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9907 "(see B<setrlimit>(2))."
9909 "(2.6.9 以降のカーネルにおいて) B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9910 "グメントのサイズ (ロックされる共有メモリーセグメントの合計バイト数) が、 呼び"
9911 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9912 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2) を参照)。"
9915 #: build/C/man2/shmctl.2:353
9917 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9918 "in the structure pointed to by I<buf>."
9920 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9924 #: build/C/man2/shmctl.2:365
9926 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9927 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9928 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9929 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9931 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9932 "作成者 (I<shm_perm.cuid>) でも所有者 (I<shm_perm.uid>) でもなく、プロセスが"
9933 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9936 #: build/C/man2/shmctl.2:377
9938 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9939 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9940 "capability). (Since Linux 2.6.9, this error can also occur if the "
9941 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9943 "または (2.6.9 より前のカーネルで) B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9944 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9945 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9946 "が特権を持たない場合にも、このエラーが起こる。)"
9948 #. SVr4 documents an additional error condition EMFILE.
9950 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9951 #: build/C/man2/shmop.2:231
9952 msgid "SVr4, POSIX.1-2001."
9953 msgstr "SVr4, POSIX.1-2001."
9955 #. Like Linux, the FreeBSD man pages still document
9956 #. the inclusion of these header files.
9958 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9960 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9961 "required on Linux or by any version of POSIX. However, some old "
9962 "implementations required the inclusion of these header files, and the SVID "
9963 "also documented their inclusion. Applications intended to be portable to "
9964 "such old systems may need to include these header files."
9966 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9967 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9968 "実装ではこれらのヘッダーファイルのインクルードが必要であり、 SVID でもこれら"
9969 "のインクルードをするように記載されている。このような古いシステムへの移植性を"
9970 "意図したアプリケーションではこれらのファイルをインクルードする必要があるかも"
9974 #: build/C/man2/shmctl.2:407
9976 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9977 "B<ipcs>(1) program to provide information on allocated resources. In the "
9978 "future, these may modified or moved to a I</proc> filesystem interface."
9980 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1) プログラムで割り当"
9981 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9982 "更されたり、 I</proc> ファイルシステムのインターフェースに移動されるかもしれ"
9986 #: build/C/man2/shmctl.2:415
9988 "Linux permits a process to attach (B<shmat>(2)) a shared memory segment "
9989 "that has already been marked for deletion using I<shmctl(IPC_RMID)>. This "
9990 "feature is not available on other UNIX implementations; portable "
9991 "applications should avoid relying on it."
9993 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9994 "メモリーセグメントを あるプロセスが付加 (attach) (B<shmat>(2)) することを許"
9995 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9996 "プリケーションではこれに依存しないようにすべきである。"
9999 #: build/C/man2/shmctl.2:428
10001 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
10002 "2.2 and have become I<long> under Linux 2.4. To take advantage of this, a "
10003 "recompilation under glibc-2.1.91 or later should suffice. (The kernel "
10004 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
10006 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
10007 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
10008 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
10009 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
10011 #. type: Plain text
10012 #: build/C/man2/shmctl.2:435
10014 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10017 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10018 "B<shm_overview>(7), B<svipc>(7)"
10021 #: build/C/man2/shmget.2:38
10027 #: build/C/man2/shmget.2:38
10030 msgstr "2015-01-10"
10032 #. type: Plain text
10033 #: build/C/man2/shmget.2:41
10034 msgid "shmget - allocates a System V shared memory segment"
10035 msgstr "shmget - System V 共有メモリーセグメントを割り当てる"
10037 #. type: Plain text
10038 #: build/C/man2/shmget.2:48
10039 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10040 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10042 #. type: Plain text
10043 #: build/C/man2/shmget.2:72
10045 "B<shmget>() returns the identifier of the System\\ V shared memory segment "
10046 "associated with the value of the argument I<key>. A new shared memory "
10047 "segment, with size equal to the value of I<size> rounded up to a multiple of "
10048 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
10049 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
10050 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
10052 "B<shmget>() は I<key> 引き数に対応する System\\ V 共有メモリーセグメントの識"
10053 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
10054 "共有メモリーセグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
10055 "場合、 新しい共有メモリーセグメントを作成する。 作成される共有メモリーセグメ"
10056 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
10059 #. type: Plain text
10060 #: build/C/man2/shmget.2:91
10062 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
10063 "segment already exists for I<key>, then B<shmget>() fails with I<errno> set "
10064 "to B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT "
10065 "| O_EXCL> for B<open>(2).)"
10067 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
10068 "応する共有メモリーセグメントが既に存在すると、 B<shmget>() は失敗し、 "
10069 "I<errno> に B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | "
10070 "O_EXCL> を指定した場合の動作と同じである)。"
10072 #. type: Plain text
10073 #: build/C/man2/shmget.2:95
10074 msgid "The value I<shmflg> is composed of:"
10075 msgstr "I<shmflg> は以下の内容から構成される:"
10078 #: build/C/man2/shmget.2:95
10080 msgid "B<IPC_CREAT>"
10081 msgstr "B<IPC_CREAT>"
10083 #. type: Plain text
10084 #: build/C/man2/shmget.2:102
10086 "Create a new segment. If this flag is not used, then B<shmget>() will find "
10087 "the segment associated with I<key> and check to see if the user has "
10088 "permission to access the segment."
10090 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>() "
10091 "は I<key> に対応するセグメントを探し、 ユーザーがそのセグメントにアクセスする"
10092 "許可があるかどうかをチェックする。"
10095 #: build/C/man2/shmget.2:102
10097 msgid "B<IPC_EXCL>"
10098 msgstr "B<IPC_EXCL>"
10100 #. type: Plain text
10101 #: build/C/man2/shmget.2:108
10103 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
10104 "segment. If the segment already exists, the call fails."
10106 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
10107 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
10110 #: build/C/man2/shmget.2:108
10112 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10113 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10115 #. type: Plain text
10116 #: build/C/man2/shmget.2:114
10118 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10119 "I<Documentation/vm/hugetlbpage.txt> for further information."
10121 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10122 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10125 #: build/C/man2/shmget.2:114
10127 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10128 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10130 #. As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10132 #. type: Plain text
10133 #: build/C/man2/shmget.2:133
10135 "This flag serves the same purpose as the B<mmap>(2) B<MAP_NORESERVE> flag. "
10136 "Do not reserve swap space for this segment. When swap space is reserved, "
10137 "one has the guarantee that it is possible to modify the segment. When swap "
10138 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10139 "memory is available. See also the discussion of the file I</proc/sys/vm/"
10140 "overcommit_memory> in B<proc>(5)."
10142 "このフラグは、 B<mmap>(2) の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10143 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10144 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10145 "行わなかった場合は、物理メモリーに空きが ないと書き込み時に B<SIGSEGV> を受け"
10146 "取る可能性がある。 B<proc>(5) にある I</proc/sys/vm/overcommit_memory> ファ"
10149 #. type: Plain text
10150 #: build/C/man2/shmget.2:143
10152 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10153 "specify the permissions granted to the owner, group, and others. These bits "
10154 "have the same format, and the same meaning, as the I<mode> argument of "
10155 "B<open>(2). Presently, execute permissions are not used by the system."
10157 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10158 "への許可を指定する。 これらのビットは B<open>(2) の I<mode> 引き数と同じ形式"
10159 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10161 #. type: Plain text
10162 #: build/C/man2/shmget.2:151
10164 "When a new shared memory segment is created, its contents are initialized to "
10165 "zero values, and its associated data structure, I<shmid_ds> (see "
10166 "B<shmctl>(2)), is initialized as follows:"
10168 "共有メモリーセグメントが新たに作成される際、 共有メモリーセグメントの内容は "
10169 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10172 #. type: Plain text
10173 #: build/C/man2/shmget.2:156
10175 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10178 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10181 #. type: Plain text
10182 #: build/C/man2/shmget.2:161
10184 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10185 "the calling process."
10187 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10190 #. type: Plain text
10191 #: build/C/man2/shmget.2:166
10193 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10194 "significant 9 bit of I<shmflg>."
10196 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10198 #. type: Plain text
10199 #: build/C/man2/shmget.2:170
10200 msgid "I<shm_segsz> is set to the value of I<size>."
10201 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10203 #. type: Plain text
10204 #: build/C/man2/shmget.2:177
10206 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10208 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10210 #. type: Plain text
10211 #: build/C/man2/shmget.2:180
10212 msgid "I<shm_ctime> is set to the current time."
10213 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10215 #. type: Plain text
10216 #: build/C/man2/shmget.2:183
10218 "If the shared memory segment already exists, the permissions are verified, "
10219 "and a check is made to see if it is marked for destruction."
10221 "共有メモリーセグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10222 "(destruction) マークがつけられていないかのチェックが行われる。"
10224 #. type: Plain text
10225 #: build/C/man2/shmget.2:188
10227 "On success, a valid shared memory identifier is returned. On error, -1 is "
10228 "returned, and I<errno> is set to indicate the error."
10230 "成功の場合、有効な共有メモリーセグメントの識別子が返される。 エラーの場合、 "
10231 "-1 が返り、 I<errno> にエラーを示す値が設定される。"
10233 #. type: Plain text
10234 #: build/C/man2/shmget.2:192
10235 msgid "On failure, I<errno> is set to one of the following:"
10236 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10238 #. type: Plain text
10239 #: build/C/man2/shmget.2:198
10241 "The user does not have permission to access the shared memory segment, and "
10242 "does not have the B<CAP_IPC_OWNER> capability."
10244 "ユーザーはその共有メモリーセグメントへのアクセス許可を持たず、 "
10245 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10247 #. type: Plain text
10248 #: build/C/man2/shmget.2:207
10250 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10251 "memory segment already exists for I<key>."
10253 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10254 "有メモリーセグメントはすでに存在する。"
10256 #. type: Plain text
10257 #: build/C/man2/shmget.2:215
10259 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10260 "greater than B<SHMMAX>."
10262 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10263 "B<SHMMAX> よりも大きかった。"
10265 #. type: Plain text
10266 #: build/C/man2/shmget.2:221
10268 "A segment for the given I<key> exists, but I<size> is greater than the size "
10271 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10274 #. type: Plain text
10275 #: build/C/man2/shmget.2:230
10277 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10279 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10282 #. type: Plain text
10283 #: build/C/man2/shmget.2:233
10284 msgid "No memory could be allocated for segment overhead."
10285 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリーがなかった。"
10287 #. type: Plain text
10288 #: build/C/man2/shmget.2:241
10290 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10291 "segment of the requested I<size> would cause the system to exceed the system-"
10292 "wide limit on shared memory (B<SHMALL>)."
10294 "システム全体の共有メモリーセグメント数の制限 (B<SHMMNI>) に達した、または要"
10295 "求された I<size> のセグメントの割り当てが システム全体の共有メモリーサイズの"
10296 "制限 (B<SHMALL>) を超過した。"
10298 #. type: Plain text
10299 #: build/C/man2/shmget.2:248
10301 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10302 "(did not have the B<CAP_IPC_LOCK> capability)."
10304 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10305 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10307 #. type: Plain text
10308 #: build/C/man2/shmget.2:256
10309 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10310 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10312 #. type: Plain text
10313 #: build/C/man2/shmget.2:280
10315 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special "
10316 "value is used for I<key>, the system call ignores all but the least "
10317 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10319 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10320 "使用された場合は、 B<shmget>() は I<shmflg> の下位 9 ビットを除いた全てを無"
10321 "視し、 新しい共有メモリーセグメントを作成する。"
10324 #: build/C/man2/shmget.2:280
10326 msgid "Shared memory limits"
10329 #. type: Plain text
10330 #: build/C/man2/shmget.2:284
10332 "The following limits on shared memory segment resources affect the "
10333 "B<shmget>() call:"
10335 "B<shmget>() コールに影響する共有メモリーセグメント資源の制限は以下の通りであ"
10339 #: build/C/man2/shmget.2:284
10344 #. type: Plain text
10345 #: build/C/man2/shmget.2:288
10347 "System-wide limit on the total amount of shared memory, measured in units of "
10348 "the system page size."
10350 "共有メモリーの全使用量のシステム全体での上限値。 システムページサイズが単位で"
10353 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10354 #. type: Plain text
10355 #: build/C/man2/shmget.2:294
10357 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10358 "shmall>. Since Linux 3.16, the default value for this limit is:"
10360 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10361 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10364 #. type: Plain text
10365 #: build/C/man2/shmget.2:296 build/C/man2/shmget.2:331
10367 msgid " ULONG_MAX - 2^24\n"
10368 msgstr " ULONG_MAX - 2^24\n"
10370 #. type: Plain text
10371 #: build/C/man2/shmget.2:307
10373 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10374 "systems) is to impose no limitation on allocations. This value, rather "
10375 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10376 "historical applications simply raised the existing limit without first "
10377 "checking its current value. Such applications would cause the value to "
10378 "overflow if the limit was set at B<ULONG_MAX>."
10380 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10381 "ステムにも 64 ビットシステムにも適したものになっている)。 B<ULONG_MAX> ではな"
10382 "く、この値が選ばれたのは、 古いアプリケーションが最初に現在の値を確認せずに既"
10383 "存の上限をそのまま増やしてしまっても問題が起こらないようなデフォルト値を選ん"
10384 "だからである。 このようなアプリケーションでは、 上限を B<ULONG_MAX> に設定す"
10385 "ると値がオーバーフローしてしまうことになる。"
10387 #. type: Plain text
10388 #: build/C/man2/shmget.2:310
10389 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10390 msgstr "Linux 2.4 から Linux 3.15 では、この上限のデフォルト値は以下であった。"
10392 #. type: Plain text
10393 #: build/C/man2/shmget.2:312
10395 msgid " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10396 msgstr " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10398 #. type: Plain text
10399 #: build/C/man2/shmget.2:320
10401 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10402 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10403 "GB as the limit on the total memory used by all shared memory segments."
10405 "B<SHMMAX> と B<SHMMNI> が変更されないとすると、 この式の結果に (バイト単位の"
10406 "値を得るために) ページサイズを掛け算すると、 全ての共有メモリーセグメントで使"
10407 "用される全メモリーの上限として、 8 GB という値が得られる。"
10410 #: build/C/man2/shmget.2:320
10415 #. type: Plain text
10416 #: build/C/man2/shmget.2:323
10417 msgid "Maximum size in bytes for a shared memory segment."
10418 msgstr "1 つの共有メモリーセグメントの最大サイズ (バイト数)。"
10420 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10421 #. type: Plain text
10422 #: build/C/man2/shmget.2:329
10424 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10425 "shmmax>. Since Linux 3.16, the default value for this limit is:"
10427 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10428 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10431 #. type: Plain text
10432 #: build/C/man2/shmget.2:340
10434 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10435 "systems) is to impose no limitation on allocations. See the description of "
10436 "B<SHMALL> for a discussion of why this default value (rather than "
10437 "B<ULONG_MAX>) is used."
10439 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10440 "ステムにも 64 ビットシステムにも適したものになっている)。 (B<ULONG_MAX> では"
10441 "なく) このデフォルト値が使われている理由については B<SHMALL> の説明を参照。"
10443 #. type: Plain text
10444 #: build/C/man2/shmget.2:343
10446 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10447 "0x2000000 (32MB)."
10449 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10452 #. type: Plain text
10453 #: build/C/man2/shmget.2:349
10455 "Because it is not possible to map just part of a shared memory segment, the "
10456 "amount of virtual memory places another limit on the maximum size of a "
10457 "usable segment: for example, on i386 the largest segments that can be mapped "
10458 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10460 "共有メモリーセグメントの一部分だけをマッピングすることはできないので、 使用可"
10461 "能なセグメントの最大サイズには仮想メモリーの総量という別の上限が適用される。 "
10462 "例えば、i386 ではマッピング可能な最大セグメントの大きさはおおよそ 2.8GB で、 "
10463 "x86_64 では上限はおおよそ 127TB である。"
10466 #: build/C/man2/shmget.2:349
10471 #. type: Plain text
10472 #: build/C/man2/shmget.2:355
10474 "Minimum size in bytes for a shared memory segment: implementation dependent "
10475 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10477 "共有メモリーセグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10478 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10481 #: build/C/man2/shmget.2:355
10486 #. type: Plain text
10487 #: build/C/man2/shmget.2:360
10489 "System-wide limit on the number of shared memory segments. In Linux 2.2, "
10490 "the default value for this limit was 128; since Linux 2.4, the default value "
10493 "システム全体の共有メモリーセグメント数の上限値。 この上限値のデフォルトは、 "
10494 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10496 #. Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10497 #. that we could create one more segment than SHMMNI -- MTK
10498 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
10499 #. type: Plain text
10500 #: build/C/man2/shmget.2:366
10502 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10504 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10507 #. type: Plain text
10508 #: build/C/man2/shmget.2:370
10510 "The implementation has no specific limits for the per-process maximum number "
10511 "of shared memory segments (B<SHMSEG>)."
10513 "プロセス当りの共有メモリーセグメントの個数の最大値 (B<SHMSEG>) に関する実装"
10516 #. type: Plain text
10517 #: build/C/man2/shmget.2:376
10519 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>() on a "
10520 "shared memory segment scheduled for deletion."
10522 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリーセグメント"
10523 "に対して B<shmget>() が行われると B<EIDRM> を返していた。"
10525 #. type: Plain text
10526 #: build/C/man2/shmget.2:382
10528 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10529 "more clearly show its function."
10531 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10532 "より明確にその機能を表しているだろう。"
10534 #. type: Plain text
10535 #: build/C/man2/shmget.2:391
10537 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10538 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10540 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10541 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10544 #: build/C/man2/shmop.2:41
10549 #. type: Plain text
10550 #: build/C/man2/shmop.2:44
10551 msgid "shmat, shmdt - System V shared memory operations"
10552 msgstr "shmat, shmdt - System V 共有メモリー (shared memory) の操作"
10554 #. type: Plain text
10555 #: build/C/man2/shmop.2:48
10558 "B<#include E<lt>sys/types.hE<gt>>\n"
10559 "B<#include E<lt>sys/shm.hE<gt>>\n"
10561 "B<#include E<lt>sys/types.hE<gt>>\n"
10562 "B<#include E<lt>sys/shm.hE<gt>>\n"
10564 #. type: Plain text
10565 #: build/C/man2/shmop.2:50
10567 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10568 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10570 #. type: Plain text
10571 #: build/C/man2/shmop.2:52
10573 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10574 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10577 #: build/C/man2/shmop.2:54
10582 #. type: Plain text
10583 #: build/C/man2/shmop.2:62
10585 "B<shmat>() attaches the System\\ V shared memory segment identified by "
10586 "I<shmid> to the address space of the calling process. The attaching address "
10587 "is specified by I<shmaddr> with one of the following criteria:"
10589 "B<shmat>() は I<shmid> で指定された System\\ V 共有メモリーセグメント "
10590 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10591 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10593 #. type: Plain text
10594 #: build/C/man2/shmop.2:68
10596 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10597 "which to attach the segment."
10599 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10600 "されていない) アドレスを選択する。"
10602 #. type: Plain text
10603 #: build/C/man2/shmop.2:80
10605 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10606 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10607 "multiple of B<SHMLBA>."
10609 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10610 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10613 #. type: Plain text
10614 #: build/C/man2/shmop.2:84
10616 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10619 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10622 #. type: Plain text
10623 #: build/C/man2/shmop.2:90
10625 "In addition to B<SHM_RND>, the following flags may be specified in the "
10626 "I<shmflg> bit-mask argument:"
10628 "B<SHM_RND> に加えて、以下のフラグを I<shmflg> ビットマスク引き数に指定でき"
10632 #: build/C/man2/shmop.2:90
10634 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10635 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10637 #. type: Plain text
10638 #: build/C/man2/shmop.2:94
10640 "Allow the contents of the segment to be executed. The caller must have "
10641 "execute permission on the segment."
10643 "セグメントの内容を実行できる。 呼び出し元はセグメントに対する実行許可を持って"
10647 #: build/C/man2/shmop.2:94
10649 msgid "B<SHM_RDONLY>"
10650 msgstr "B<SHM_RDONLY>"
10652 #. type: Plain text
10653 #: build/C/man2/shmop.2:102
10655 "Attach the segment for read-only access. The process must have read "
10656 "permission for the segment. If this flag is not specified, the segment is "
10657 "attached for read and write access, and the process must have read and write "
10658 "permission for the segment. There is no notion of a write-only shared "
10661 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10662 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10663 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10664 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリーセ"
10668 #: build/C/man2/shmop.2:102
10670 msgid "B<SHM_REMAP> (Linux-specific)"
10671 msgstr "B<SHM_REMAP> (Linux 固有)"
10673 #. type: Plain text
10674 #: build/C/man2/shmop.2:115
10676 "This flag specifies that the mapping of the segment should replace any "
10677 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10678 "size of the segment. (Normally, an B<EINVAL> error would result if a "
10679 "mapping already exists in this address range.) In this case, I<shmaddr> "
10680 "must not be NULL."
10682 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10683 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10684 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10685 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10687 #. type: Plain text
10688 #: build/C/man2/shmop.2:122
10690 "The B<brk>(2) value of the calling process is not altered by the attach. "
10691 "The segment will automatically be detached at process exit. The same "
10692 "segment may be attached as a read and as a read-write one, and more than "
10693 "once, in the process's address space."
10695 "呼び出したプロセスの B<brk>(2) の値は付加によって変化しない。 そのセグメント"
10696 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10697 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10700 #. type: Plain text
10701 #: build/C/man2/shmop.2:130
10703 "A successful B<shmat>() call updates the members of the I<shmid_ds> "
10704 "structure (see B<shmctl>(2)) associated with the shared memory segment as "
10707 "成功した B<shmat>() コールは共有メモリーセグメントに関連する I<shmid_ds> 構"
10708 "造体 (B<shmctl>(2) を参照) のメンバーを以下のように更新する:"
10710 #. type: Plain text
10711 #: build/C/man2/shmop.2:133
10712 msgid "I<shm_atime> is set to the current time."
10713 msgstr "I<shm_atime> には現在の時刻を設定する。"
10715 #. type: Plain text
10716 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10717 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10718 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10720 #. type: Plain text
10721 #: build/C/man2/shmop.2:140
10722 msgid "I<shm_nattch> is incremented by one."
10723 msgstr "I<shm_nattch> を 1 増加させる。"
10726 #: build/C/man2/shmop.2:140
10731 #. type: Plain text
10732 #: build/C/man2/shmop.2:151
10734 "B<shmdt>() detaches the shared memory segment located at the address "
10735 "specified by I<shmaddr> from the address space of the calling process. The "
10736 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10737 "the value returned by the attaching B<shmat>() call."
10739 "B<shmdt>() は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10740 "ドレスに配置された共有メモリーセグメントを分離 (detach) する。 分離する共有メ"
10741 "モリーセグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10742 "I<shmaddr> は、それを付加した時に B<shmat>() が返した値に等しくなければなら"
10745 #. type: Plain text
10746 #: build/C/man2/shmop.2:157
10748 "On a successful B<shmdt>() call, the system updates the members of the "
10749 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10751 "成功した B<shmdt>() コールはその共有メモリーセグメントに関連する "
10752 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10754 #. type: Plain text
10755 #: build/C/man2/shmop.2:160
10756 msgid "I<shm_dtime> is set to the current time."
10757 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10759 #. type: Plain text
10760 #: build/C/man2/shmop.2:168
10762 "I<shm_nattch> is decremented by one. If it becomes 0 and the segment is "
10763 "marked for deletion, the segment is deleted."
10765 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10768 #. type: Plain text
10769 #: build/C/man2/shmop.2:176
10771 "On success, B<shmat>() returns the address of the attached shared memory "
10772 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10773 "indicate the cause of the error."
10775 "B<shmat>() は、成功した場合、 付加された共有メモリーセグメントのアドレスを返"
10776 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10779 #. type: Plain text
10780 #: build/C/man2/shmop.2:182
10782 "On success, B<shmdt>() returns 0; on error -1 is returned, and I<errno> is "
10783 "set to indicate the cause of the error."
10785 "B<shmdt>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10788 #. type: Plain text
10789 #: build/C/man2/shmop.2:188
10790 msgid "When B<shmat>() fails, I<errno> is set to one of the following:"
10792 "B<shmat>() が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10794 #. type: Plain text
10795 #: build/C/man2/shmop.2:194
10797 "The calling process does not have the required permissions for the requested "
10798 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10800 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10801 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10803 #. type: Plain text
10804 #: build/C/man2/shmop.2:211
10806 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10807 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10808 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10810 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10811 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10812 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10813 "れているが、 I<shmaddr> が NULL であった。"
10815 #. type: Plain text
10816 #: build/C/man2/shmop.2:214
10817 msgid "Could not allocate memory for the descriptor or for the page tables."
10819 "ディスクリプター (descriptor) やページテーブルのためのメモリーを 割り当てるこ"
10822 #. type: Plain text
10823 #: build/C/man2/shmop.2:220
10824 msgid "When B<shmdt>() fails, I<errno> is set as follows:"
10825 msgstr "B<shmdt>() が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10827 #. The following since 2.6.17-rc1:
10828 #. type: Plain text
10829 #: build/C/man2/shmop.2:228
10831 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10832 "not aligned on a page boundary."
10834 "I<shmaddr> に付加された共有メモリーセグメントが存在しない。 もしくは、 "
10835 "I<shmaddr> がページ境界に合っていない。"
10837 #. type: Plain text
10838 #: build/C/man2/shmop.2:243
10840 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10841 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10842 "B<shmat>() from I<char\\ *> into I<void\\ *>."
10844 "SVID 3 で (たぶんそれより前だと思うが) I<shmaddr> 引き数の型は I<char\\ *> "
10845 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10848 #. type: Plain text
10849 #: build/C/man2/shmop.2:248
10851 "After a B<fork>(2), the child inherits the attached shared memory segments."
10853 "B<fork>(2) した後、子プロセスは付加された共有メモリーセグメントを継承する。"
10855 #. type: Plain text
10856 #: build/C/man2/shmop.2:252
10858 "After an B<execve>(2), all attached shared memory segments are detached from "
10861 "B<exec>(2) した後、全ての付加された共有メモリーセグメントはプロセスから分離"
10864 #. type: Plain text
10865 #: build/C/man2/shmop.2:256
10867 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10870 "B<exit>(2) において、全ての付加された共有メモリーセグメントはプロセスから分"
10873 #. type: Plain text
10874 #: build/C/man2/shmop.2:268
10876 "Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable "
10877 "way of attaching a shared memory segment. Be aware that the shared memory "
10878 "segment attached in this way may be attached at different addresses in "
10879 "different processes. Therefore, any pointers maintained within the shared "
10880 "memory must be made relative (typically to the starting address of the "
10881 "segment), rather than absolute."
10883 "共有メモリーセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> "
10884 "を NULL にして B<shmat>() を使用するのがよい。 このような方法で付加される共"
10885 "有メモリーセグメントは、 プロセスが異なれば別のアドレスに付加される、という点"
10886 "に注意すること。 よって共有メモリー内で管理されるポインターは、 絶対アドレス"
10887 "ではなく、 (一般的にはセグメントの開始アドレスからの) 相対アドレスで作成する"
10890 #. type: Plain text
10891 #: build/C/man2/shmop.2:273
10893 "On Linux, it is possible to attach a shared memory segment even if it is "
10894 "already marked to be deleted. However, POSIX.1-2001 does not specify this "
10895 "behavior and many other implementations do not support it."
10897 "Linux では共有メモリーセグメントに既に削除マークが付けられていても、 その共有"
10898 "メモリーセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような"
10899 "動作を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10901 #. type: Plain text
10902 #: build/C/man2/shmop.2:276
10903 msgid "The following system parameter affects B<shmat>():"
10904 msgstr "以下のシステムパラメーターは、 B<shmat>() に影響する:"
10907 #: build/C/man2/shmop.2:276
10912 #. type: Plain text
10913 #: build/C/man2/shmop.2:289
10915 "Segment low boundary address multiple. When explicitly specifying an attach "
10916 "address in a call to B<shmat>(), the caller should ensure that the address "
10917 "is a multiple of this value. This is necessary on some architectures, in "
10918 "order either to ensure good CPU cache performance or to ensure that "
10919 "different attaches of the same segment have consistent views within the CPU "
10920 "cache. B<SHMLBA> is normally some multiple of the system page size (on many "
10921 "Linux architectures, it is the same as the system page size)."
10923 "セグメントの下限アドレス倍数 (Segment low boundary address multiple)。 "
10924 "B<shmat>() の呼び出しにおいて付加するアドレスを明示的に指定する際、 呼び出し"
10925 "元は指定するアドレスがこの値の倍数になるように保証しなければならない。 これは"
10926 "いくつかのアーキテクチャーでは必要なことで、 CPU キャッシュの性能を保証するた"
10927 "めであったり、 同じセグメントの別の付与を CPU キャッシュ内部で一貫して扱える"
10928 "ようにするためだったりする。 B<SHMLBA> は通常はシステムページサイズの倍数であ"
10929 "る (Linux の多くのアーキテクチャーではシステムページサイズと同じである)。"
10931 #. type: Plain text
10932 #: build/C/man2/shmop.2:293
10934 "The implementation places no intrinsic per-process limit on the number of "
10935 "shared memory segments (B<SHMSEG>)."
10937 "現在の実装では、プロセスごとの 共有メモリーセグメントの最大数 (B<SHMSEG>) に"
10940 #. type: Plain text
10941 #: build/C/man2/shmop.2:301
10943 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10944 "B<shm_overview>(7), B<svipc>(7)"
10946 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10947 "B<shm_overview>(7), B<svipc>(7)"
10950 #: build/C/man2/subpage_prot.2:30
10952 msgid "SUBPAGE_PROT"
10953 msgstr "SUBPAGE_PROT"
10956 #: build/C/man2/subpage_prot.2:30
10959 msgstr "2012-07-13"
10961 #. type: Plain text
10962 #: build/C/man2/subpage_prot.2:33
10963 msgid "subpage_prot - define a subpage protection for an address range"
10966 #. type: Plain text
10967 #: build/C/man2/subpage_prot.2:37
10970 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10971 "B< uint32_t *>I<map>B<);>\n"
10973 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10974 "B< uint32_t *>I<map>B<);>\n"
10976 #. type: Plain text
10977 #: build/C/man2/subpage_prot.2:41
10978 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10980 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10983 #. type: Plain text
10984 #: build/C/man2/subpage_prot.2:47
10986 "The PowerPC-specific B<subpage_prot>() system call provides the facility to "
10987 "control the access permissions on individual 4kB subpages on systems "
10988 "configured with a page size of 64kB."
10991 #. type: Plain text
10992 #: build/C/man2/subpage_prot.2:54
10994 "The protection map is applied to the memory pages in the region starting at "
10995 "I<addr> and continuing for I<len> bytes. Both of these arguments must be "
10996 "aligned to a 64-kB boundary."
10999 #. type: Plain text
11000 #: build/C/man2/subpage_prot.2:66
11002 "The protection map is specified in the buffer pointed to by I<map>. The map "
11003 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
11004 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
11005 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
11006 "I<len>). Each 2-bit field in the protection map is either 0 to allow any "
11007 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
11010 #. type: Plain text
11011 #: build/C/man2/subpage_prot.2:71
11013 "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes "
11014 "specified below is returned."
11017 #. type: Plain text
11018 #: build/C/man2/subpage_prot.2:77
11019 msgid "The buffer referred to by I<map> is not accessible."
11022 #. type: Plain text
11023 #: build/C/man2/subpage_prot.2:87
11025 "The I<addr> or I<len> arguments are incorrect. Both of these arguments must "
11026 "be aligned to a multiple of the system page size, and they must not refer to "
11027 "a region outside of the address space of the process or to a region that "
11028 "consists of huge pages."
11031 #. type: Plain text
11032 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
11033 msgid "Out of memory."
11034 msgstr "メモリー不足である。"
11036 #. type: Plain text
11037 #: build/C/man2/subpage_prot.2:96
11039 "This system call is provided on the PowerPC architecture since Linux "
11040 "2.6.25. The system call is provided only if the kernel is configured with "
11041 "B<CONFIG_PPC_64K_PAGES>. No library support is provided."
11044 #. type: Plain text
11045 #: build/C/man2/subpage_prot.2:101
11047 "Glibc does not provide a wrapper for this system call; call it using "
11051 #. type: Plain text
11052 #: build/C/man2/subpage_prot.2:106
11054 "Normal page protections (at the 64-kB page level) also apply; the subpage "
11055 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
11056 "field won't allow writes to a page that is otherwise write-protected."
11060 #: build/C/man2/subpage_prot.2:106
11065 #. In the initial implementation, it was the case that:
11066 #. In fact the whole process is switched to use 4k hardware pages when the
11067 #. subpage_prot system call is used, but this could be improved in future
11068 #. to switch only the affected segments.
11069 #. But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
11070 #. the affected segment, not the whole process.
11071 #. type: Plain text
11072 #: build/C/man2/subpage_prot.2:128
11074 "This system call is provided to assist writing emulators that operate using "
11075 "64-kB pages on PowerPC systems. When emulating systems such as x86, which "
11076 "uses a smaller page size, the emulator can no longer use the memory-"
11077 "management unit (MMU) and normal system calls for controlling page "
11078 "protections. (The emulator could emulate the MMU by checking and possibly "
11079 "remapping the address for each memory access in software, but that is "
11080 "slow.) The idea is that the emulator supplies an array of protection masks "
11081 "to apply to a specified range of virtual addresses. These masks are applied "
11082 "at the level where hardware page-table entries (PTEs) are inserted into the "
11083 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
11084 "affected. Implicit in this is that the regions of the address space that "
11085 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
11086 "hardware pages (on machines with hardware 64-kB page support)."
11089 #. type: Plain text
11090 #: build/C/man2/subpage_prot.2:131
11091 msgid "B<mprotect>(2), B<syscall>(2)"
11092 msgstr "B<mprotect>(2), B<syscall>(2)"
11094 #. type: Plain text
11095 #: build/C/man2/subpage_prot.2:134
11096 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
11097 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
11100 #: build/C/man2/sync_file_range.2:30
11102 msgid "SYNC_FILE_RANGE"
11103 msgstr "SYNC_FILE_RANGE"
11106 #: build/C/man2/sync_file_range.2:30
11109 msgstr "2014-08-19"
11111 #. type: Plain text
11112 #: build/C/man2/sync_file_range.2:33
11113 msgid "sync_file_range - sync a file segment with disk"
11114 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
11116 #. type: Plain text
11117 #: build/C/man2/sync_file_range.2:37
11120 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
11121 "B<#include E<lt>fcntl.hE<gt>>\n"
11123 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
11124 "B<#include E<lt>fcntl.hE<gt>>\n"
11126 #. type: Plain text
11127 #: build/C/man2/sync_file_range.2:40
11130 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11131 "B< unsigned int >I<flags>B<);>\n"
11133 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11134 "B< unsigned int >I<flags>B<);>\n"
11136 #. type: Plain text
11137 #: build/C/man2/sync_file_range.2:47
11139 "B<sync_file_range>() permits fine control when synchronizing the open file "
11140 "referred to by the file descriptor I<fd> with disk."
11142 "B<sync_file_range>() を使うと、ファイルディスクリプター I<fd> で参照される"
11143 "オープンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能とな"
11146 #. type: Plain text
11147 #: build/C/man2/sync_file_range.2:61
11149 "I<offset> is the starting byte of the file range to be synchronized. "
11150 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11151 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11152 "are synchronized. Synchronization is in units of the system page size: "
11153 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11154 "rounded up to a page boundary."
11156 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11157 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11158 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11159 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11160 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11162 #. type: Plain text
11163 #: build/C/man2/sync_file_range.2:65
11164 msgid "The I<flags> bit-mask argument can include any of the following values:"
11165 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11168 #: build/C/man2/sync_file_range.2:65
11170 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11171 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11173 #. type: Plain text
11174 #: build/C/man2/sync_file_range.2:70
11176 "Wait upon write-out of all pages in the specified range that have already "
11177 "been submitted to the device driver for write-out before performing any "
11180 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11181 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11185 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11187 msgid "B<SYNC_FILE_RANGE_WRITE>"
11188 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11190 #. type: Plain text
11191 #: build/C/man2/sync_file_range.2:76
11193 "Initiate write-out of all dirty pages in the specified range which are not "
11194 "presently submitted write-out. Note that even this may block if you attempt "
11195 "to write more than request queue size."
11197 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11198 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11199 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11203 #: build/C/man2/sync_file_range.2:76
11205 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11206 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11208 #. type: Plain text
11209 #: build/C/man2/sync_file_range.2:80
11211 "Wait upon write-out of all pages in the range after performing any write."
11213 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11216 #. type: Plain text
11217 #: build/C/man2/sync_file_range.2:84
11218 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11219 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11222 #: build/C/man2/sync_file_range.2:84
11227 #. type: Plain text
11228 #: build/C/man2/sync_file_range.2:100
11230 "This system call is extremely dangerous and should not be used in portable "
11231 "programs. None of these operations writes out the file's metadata. "
11232 "Therefore, unless the application is strictly performing overwrites of "
11233 "already-instantiated disk blocks, there are no guarantees that the data will "
11234 "be available after a crash. There is no user interface to know if a write "
11235 "is purely an overwrite. On filesystems using copy-on-write semantics (e.g., "
11236 "I<btrfs>) an overwrite of existing allocated blocks is impossible. When "
11237 "writing into preallocated space, many filesystems also require calls into "
11238 "the block allocator, which this system call does not sync out to disk. This "
11239 "system call does not flush disk write caches and thus does not provide any "
11240 "data integrity on systems with volatile disk write caches."
11242 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11243 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11244 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11245 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11246 "みが上書きだけであるかを知るためのユーザーインターフェースは存在しない。 "
11247 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11248 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11249 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11250 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11251 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11252 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11253 "コールではデータの一貫性を確保できないことになる。"
11256 #: build/C/man2/sync_file_range.2:100
11258 msgid "Some details"
11261 #. type: Plain text
11262 #: build/C/man2/sync_file_range.2:108
11264 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11265 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11267 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11268 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11270 #. type: Plain text
11271 #: build/C/man2/sync_file_range.2:112
11272 msgid "Useful combinations of the I<flags> bits are:"
11273 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11276 #: build/C/man2/sync_file_range.2:112
11278 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11279 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11281 #. type: Plain text
11282 #: build/C/man2/sync_file_range.2:120
11284 "Ensures that all pages in the specified range which were dirty when "
11285 "B<sync_file_range>() was called are placed under write-out. This is a "
11286 "start-write-for-data-integrity operation."
11288 "指定された範囲内のページで、 B<sync_file_range>() が呼び出された際に dirty "
11289 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11290 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11293 #. type: Plain text
11294 #: build/C/man2/sync_file_range.2:127
11296 "Start write-out of all dirty pages in the specified range which are not "
11297 "presently under write-out. This is an asynchronous flush-to-disk "
11298 "operation. This is not suitable for data integrity operations."
11300 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11301 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk) 操作であ"
11302 "る。データ完全性確保が必要な操作としては適切ではない。"
11305 #: build/C/man2/sync_file_range.2:127
11307 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11308 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11310 #. type: Plain text
11311 #: build/C/man2/sync_file_range.2:134
11313 "Wait for completion of write-out of all pages in the specified range. This "
11314 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11315 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11316 "and obtain its result."
11318 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11319 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11320 "き、この操作の完了を待ち、結果を取得することができる。"
11323 #: build/C/man2/sync_file_range.2:134
11325 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11326 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11328 #. type: Plain text
11329 #: build/C/man2/sync_file_range.2:141
11331 "This is a write-for-data-integrity operation that will ensure that all pages "
11332 "in the specified range which were dirty when B<sync_file_range>() was "
11333 "called are committed to disk."
11335 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11336 "り、指定された範囲内の、 B<sync_file_range>() が呼ばれた時点で dirty な全て"
11337 "のページが ディスクに格納されることが保証される。"
11339 #. type: Plain text
11340 #: build/C/man2/sync_file_range.2:147
11342 "On success, B<sync_file_range>() returns 0; on failure -1 is returned and "
11343 "I<errno> is set to indicate the error."
11345 "成功の場合、 B<sync_file_range>() は 0 を返す。失敗の場合、-1 を返し、 "
11346 "I<errno> にエラーを示す値を設定する。"
11348 #. type: Plain text
11349 #: build/C/man2/sync_file_range.2:152
11350 msgid "I<fd> is not a valid file descriptor."
11351 msgstr "I<fd> が有効なファイルディスクリプターではない。"
11353 #. type: Plain text
11354 #: build/C/man2/sync_file_range.2:160
11356 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11358 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11361 #. type: Plain text
11362 #: build/C/man2/sync_file_range.2:163
11366 #. type: Plain text
11367 #: build/C/man2/sync_file_range.2:169
11368 msgid "Out of disk space."
11369 msgstr "ディスク領域不足である。"
11371 #. FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11372 #. (In user space at least) it isn't possible to obtain a file descriptor
11373 #. for a symbolic link.
11374 #. type: Plain text
11375 #: build/C/man2/sync_file_range.2:177
11377 "I<fd> refers to something other than a regular file, a block device, a "
11378 "directory, or a symbolic link."
11380 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11383 #. type: Plain text
11384 #: build/C/man2/sync_file_range.2:180
11385 msgid "B<sync_file_range>() appeared on Linux in kernel 2.6.17."
11386 msgstr "B<sync_file_range>() はカーネル 2.6.17 で Linux に登場した。"
11388 #. type: Plain text
11389 #: build/C/man2/sync_file_range.2:183
11391 "This system call is Linux-specific, and should be avoided in portable "
11394 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11398 #: build/C/man2/sync_file_range.2:184
11400 msgid "sync_file_range2()"
11401 msgstr "sync_file_range2()"
11403 #. See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11404 #. type: Plain text
11405 #: build/C/man2/sync_file_range.2:201
11407 "Some architectures (e.g., PowerPC, ARM) need 64-bit arguments to be aligned "
11408 "in a suitable pair of registers. On such architectures, the call signature "
11409 "of B<sync_file_range>() shown in the SYNOPSIS would force a register to be "
11410 "wasted as padding between the I<fd> and I<offset> arguments. (See "
11411 "B<syscall>(2) for details.) Therefore, these architectures define a "
11412 "different system call that orders the arguments suitably:"
11414 "いくつかのアーキテクチャー (例えば、 PowerPC や ARM) では、 64 ビットの引き数"
11415 "は適切なレジスターの組に割り当てる必要がある。 このようなアーキテクチャーで"
11416 "は、 「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 "
11417 "引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費"
11418 "されてしまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテク"
11419 "チャーでは引き数が適切な順序になった別のシステムコールが定義されている。"
11421 #. type: Plain text
11422 #: build/C/man2/sync_file_range.2:206
11425 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11426 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11428 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11429 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11431 #. type: Plain text
11432 #: build/C/man2/sync_file_range.2:211
11434 "The behavior of this system call is otherwise exactly the same as "
11435 "B<sync_file_range>()."
11437 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11438 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11439 "glibc では提供されていない。"
11441 #. type: Plain text
11442 #: build/C/man2/sync_file_range.2:222
11444 "A system call with this signature first appeared on the ARM architecture in "
11445 "Linux 2.6.20, with the name B<arm_sync_file_range>(). It was renamed in "
11446 "Linux 2.6.22, when the analogous system call was added for PowerPC. On "
11447 "architectures where glibc support is provided, glibc transparently wraps "
11448 "B<sync_file_range2>() under the name B<sync_file_range>()."
11450 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャーで\n"
11451 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11452 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11453 "システムコールの名前が変更された。\n"
11454 "glibc によるサポートが提供されているアーキテクチャーでは、\n"
11455 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11456 "B<sync_file_range2>() を適切に使用するようになっている。"
11458 #. type: Plain text
11459 #: build/C/man2/sync_file_range.2:227
11460 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11461 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11464 #: build/C/man2/memfd_create.2:21
11466 msgid "MEMFD_CREATE"
11467 msgstr "MEMFD_CREATE"
11469 #. type: Plain text
11470 #: build/C/man2/memfd_create.2:24
11471 msgid "memfd_create - create an anonymous file"
11472 msgstr "memfd_create - 無名ファイル (anonymous file) を作成する"
11474 #. type: Plain text
11475 #: build/C/man2/memfd_create.2:26
11476 msgid "B<#include E<lt>sys/memfd.hE<gt>>"
11477 msgstr "B<#include E<lt>sys/memfd.hE<gt>>"
11479 #. type: Plain text
11480 #: build/C/man2/memfd_create.2:28
11481 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11482 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11485 #. memfd uses VM_NORESERVE so each page is accounted on first access.
11486 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
11487 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
11488 #. those are accounted on "current" and "current->mm", that is, the
11489 #. process doing the first page access.
11490 #. type: Plain text
11491 #: build/C/man2/memfd_create.2:51
11493 "B<memfd_create>() creates an anonymous file and returns a file descriptor "
11494 "that refers to it. The file behaves like a regular file, and so can be "
11495 "modified, truncated, memory-mapped, and so on. However, unlike a regular "
11496 "file, it lives in RAM and has a volatile backing storage. Once all "
11497 "references to the file are dropped, it is automatically released. Anonymous "
11498 "memory is used for all backing pages of the file. Therefore, files created "
11499 "by B<memfd_create>() have the same semantics as other anonymous memory "
11500 "allocations such as those allocated using B<mmap>(2) with the "
11501 "B<MAP_ANONYMOUS> flag."
11503 "B<memfd_create>() は、 無名ファイル (anonymous file) を作成し、 そのファイル"
11504 "を参照するファイルディスクリプターを返す。 このファイルは通常のファイルと同様"
11505 "に振る舞い、 変更、切り詰め (truncate)、 メモリーマップなどを行うことができ"
11506 "る。 しかし、 通常のファイルとは違い、 このファイルは RAM 上に置かれ、 格納さ"
11507 "れるストレージは揮発性である。 このファイルへの参照がすべてなくなると、 ファ"
11508 "イルは自動的に解放される。 このファイルが置かれるページには無名メモリー "
11509 "(anonymous memory) が使用される。 したがって、 B<memfd_create>() で作成された"
11510 "フィアルは、 他の無名メモリーの割り当て (B<MAP_ANONYMOUS> フラグ付きの "
11511 "B<mmap>(2) を使って割り当てられた無名メモリーなど) と同じ動作をする。"
11513 #. type: Plain text
11514 #: build/C/man2/memfd_create.2:58
11516 "The initial size of the file is set to 0. Following the call, the file size "
11517 "should be set using B<ftruncate>(2). (Alternatively, the file may be "
11518 "populated by calls to B<write>(2) or similar.)"
11520 "ファイルの初期サイズは 0 に設定される。 呼び出しの後に、 B<ftruncate>(2) を"
11521 "使ってファイルサイズを設定すべきである (代わりに、 B<write>(2) や同様の関数を"
11522 "呼び出してファイルにデータを書き込むこともできる)。"
11524 #. type: Plain text
11525 #: build/C/man2/memfd_create.2:69
11527 "The name supplied in I<name> is used as a filename and will be displayed as "
11528 "the target of the corresponding symbolic link in the directory I</proc/self/"
11529 "fd/>. The displayed name is always prefixed with I<memfd:> and serves only "
11530 "for debugging purposes. Names do not affect the behavior of the file "
11531 "descriptor, and as such multiple files can have the same name without any "
11534 "I<name> に指定された名前はファイル名として使用され、 ディレクトリ I</proc/"
11535 "self/fd/> で対応するシンボリックリンクのリンク先として表示される。 表示される"
11536 "名前の前には常に I<memfd:> が付き、 この名前はデバッグ用途としてのみ機能す"
11537 "る。 名前はファイルディスクリプターの動作には影響せず、 複数のファイルが同じ"
11540 #. type: Plain text
11541 #: build/C/man2/memfd_create.2:74
11543 "The following values may be bitwise ORed in I<flags> to change the behaviour "
11544 "of B<memfd_create>():"
11546 "以下の値をビット論理和で I<flags> に指定して、 B<memfd_create>() の動作を変更"
11550 #: build/C/man2/memfd_create.2:74
11552 msgid "B<MFD_CLOEXEC>"
11553 msgstr "B<MFD_CLOEXEC>"
11555 #. type: Plain text
11556 #: build/C/man2/memfd_create.2:84
11558 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
11559 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
11562 "新しいファイルディスクリプターに close-on-exec (B<FD_CLOEXEC>) フラグをセット"
11563 "する。 これが有用な理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参"
11567 #: build/C/man2/memfd_create.2:84
11569 msgid "B<MFD_ALLOW_SEALING>"
11570 msgstr "B<MFD_ALLOW_SEALING>"
11572 #. FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
11573 #. Is it worth adding some text explaining this?
11574 #. type: Plain text
11575 #: build/C/man2/memfd_create.2:100
11577 "Allow sealing operations on this file. See the discussion of the "
11578 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
11579 "below. The initial set of seals is empty. If this flag is not set, the "
11580 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
11581 "be set on the file."
11583 "このファイルに対して sealing 操作を許可する。 B<fcntl>(2) の B<F_ADD_SEALS> "
11584 "と B<F_GET_SEALS> 操作の議論を参照。 下記の「注意」も参照。 初期の seal 集合"
11585 "は空となる。 このフラグを指定しなかった場合、 初期の seal 集合は "
11586 "B<F_SEAL_SEAL> となり、 これはこのファイルには他の seal をセットできないこと"
11589 #. type: Plain text
11590 #: build/C/man2/memfd_create.2:104
11591 msgid "Unused bits in I<flags> must be 0."
11592 msgstr "I<flags> の未使用のビットは 0 でなければならない。"
11594 #. type: Plain text
11595 #: build/C/man2/memfd_create.2:113
11597 "As its return value, B<memfd_create>() returns a new file descriptor that "
11598 "can be used to refer to the file. This file descriptor is opened for both "
11599 "reading and writing (B<O_RDWR>) and B<O_LARGEFILE> is set for the "
11602 "返り値として B<memfd_create>() は、 作成したファイルを参照するのに使用できる"
11603 "新しいファイルディスクリプターを返す。 このファイルディスクリプターは読み書き"
11604 "両用 (B<O_RDWR>) でオープンされ、 B<O_LARGEFILE> がこのファイルディスクリプ"
11607 #. type: Plain text
11608 #: build/C/man2/memfd_create.2:126
11610 "With respect to B<fork>(2) and B<execve>(2), the usual semantics apply for "
11611 "the file descriptor created by B<memfd_create>(). A copy of the file "
11612 "descriptor is inherited by the child produced by B<fork>(2) and refers to "
11613 "the same file. The file descriptor is preserved across B<execve>(2), unless "
11614 "the close-on-exec flag has been set."
11616 "B<fork>(2) と B<execve>(2) に関しては、 B<memfd_create>() で作成したファイル"
11617 "ディスクリプターについても通常の動作が適用される。 ファイルディスクリプターの"
11618 "コピーは B<fork>(2) で生成される子プロセスに継承され、 同じファイルを参照す"
11619 "る。 close-on-exec フラグがセットされていない限り、 B<execve>(2) の前後でファ"
11620 "イルディスクリプターは保持される。"
11622 #. type: Plain text
11623 #: build/C/man2/memfd_create.2:133
11625 "On success, B<memfd_create>() returns a new file descriptor. On error, -1 "
11626 "is returned and I<errno> is set to indicate the error."
11628 "成功の場合、 B<memfd_create>() は新しいファイルディスクリプターを返す。 エ"
11629 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11631 #. type: Plain text
11632 #: build/C/man2/memfd_create.2:139
11633 msgid "The address in I<name> points to invalid memory."
11634 msgstr "I<name> のアドレスが無効なメモリーを指している。"
11636 #. type: Plain text
11637 #: build/C/man2/memfd_create.2:146
11639 "An unsupported value was specified in one of the arguments: I<flags> "
11640 "included unknown bits, or I<name> was too long."
11642 "サポートされていない値がいずれかの引き数で指定された。 I<flags> に未知のビッ"
11643 "トが含まれていたか、 I<name> が長過ぎた。"
11645 #. type: Plain text
11646 #: build/C/man2/memfd_create.2:149
11647 msgid "The per-process limit on open file descriptors has been reached."
11649 "オープンされているファイルディスクリプターのプロセス単位の上限に達した。"
11651 #. type: Plain text
11652 #: build/C/man2/memfd_create.2:152
11654 "The system-wide limit on the total number of open files has been reached."
11655 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
11657 #. type: Plain text
11658 #: build/C/man2/memfd_create.2:155
11659 msgid "There was insufficient memory to create a new anonymous file."
11660 msgstr "新しい無名ファイルを作成するのに十分なメモリーがなかった。"
11662 #. FIXME . When glibc support appears, update the following sentence:
11663 #. type: Plain text
11664 #: build/C/man2/memfd_create.2:161
11666 "The B<memfd_create>() system call first appeared in Linux 3.17. Support in "
11667 "the GNU C library is pending."
11669 "B<memfd_create>() システムコールは Linux 3.17 で初めて登場した。 GNU C ライブ"
11672 #. type: Plain text
11673 #: build/C/man2/memfd_create.2:165
11674 msgid "The B<memfd_create>() system call is Linux-specific."
11675 msgstr "B<memfd_create>() システムコールは Linux 固有である。"
11677 #. See also http://lwn.net/Articles/593918/
11678 #. and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
11679 #. type: Plain text
11680 #: build/C/man2/memfd_create.2:178
11682 "The B<memfd_create>() system call provides a simple alternative to manually "
11683 "mounting a I<tmpfs> filesystem and creating and opening a file in that "
11684 "filesystem. The primary purpose of B<memfd_create>() is to create files "
11685 "and associated file descriptors that are used with the file-sealing APIs "
11686 "provided by B<fcntl>(2)."
11688 "B<memfd_create>() システムコールは、 手動で I<tmpfs> ファイルシステムをマウン"
11689 "トして、 そのファイルシステムにファイルをオープンするという操作の、 簡単な代"
11690 "替手段を提供している。 B<memfd_create>() の主な目的は、 B<fcntl>(2) が提供す"
11691 "る file-sealing API で使用できる、 ファイルとそれに関連付けられるファイルディ"
11692 "スクリプターを作成することである。"
11694 #. type: Plain text
11695 #: build/C/man2/memfd_create.2:192
11697 "The B<memfd_create>() system call also has uses without file sealing (which "
11698 "is why file-sealing is disabled, unless explicitly requested with the "
11699 "B<MFD_ALLOW_SEALING> flag). In particular, it can be used as an alternative "
11700 "to creating files in I<tmp> or as an alternative to using the B<open>(2) "
11701 "B<O_TMPFILE> in cases where there is no intention to actually link the "
11702 "resulting file into the filesystem."
11704 "B<memfd_create>() システムコールは、 file sealing なしでも用途がある (これが"
11705 "明示的に B<MFD_ALLOW_SEALING> フラグが要求されない限り、 file-sealing が無効"
11706 "になる理由である)。 特に、 ファイルシステムに実際にファイルを残す意図がない場"
11707 "合、 I<tmp> にファイルを作成したり B<open>(2) B<O_TMPFILE> を使ったりする際の"
11711 #: build/C/man2/memfd_create.2:192
11713 msgid "File sealing"
11714 msgstr "file sealing"
11716 #. type: Plain text
11717 #: build/C/man2/memfd_create.2:210
11719 "In the absence of file sealing, processes that communicate via shared memory "
11720 "must either trust each other, or take measures to deal with the possibility "
11721 "that an untrusted peer may manipulate the shared memory region in "
11722 "problematic ways. For example, an untrusted peer might modify the contents "
11723 "of the shared memory at any time, or shrink the shared memory region. The "
11724 "former possibility leaves the local process vulnerable to time-of-check-to-"
11725 "time-of-use race conditions (typically dealt with by copying data from the "
11726 "shared memory region before checking and using it). The latter possibility "
11727 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
11728 "made to access a now-nonexistent location in the shared memory region. "
11729 "(Dealing with this possibility necessitates the use of a handler for the "
11730 "B<SIGBUS> signal.)"
11732 "file sealing がない場合、 共有メモリー経由で通信するプロセスは、 互いに信頼す"
11733 "るか、 信頼していない相手が共有メモリー領域を問題がある方法で操作する可能性に"
11734 "対処するための対策を講じなければならない。\n"
11735 "例えば、 信頼していない相手は、 いつでも共有メモリーの内容を変更したり、 共有"
11736 "メモリー領域を縮小したりする可能性がある。 前者の場合は、 ローカルプロセスで"
11737 "は、 データの確認時点と使用時点の競合条件の問題が起こり得る (通常はこの問題へ"
11738 "の対処は共有メモリー領域からデータをこぴーしてからデータを確認、使用すること"
11739 "である)。 後者の場合は、 ローカルプロセスでは、 共有メモリー領域の存在しなく"
11740 "なった場所にアクセスしようとした際にシグナル B<SIGBUS> が発生する可能性があ"
11741 "る (この可能性に対処するにはシグナル B<SIGBUS> に対してハンドラーを使用する必"
11744 #. type: Plain text
11745 #: build/C/man2/memfd_create.2:216
11747 "Dealing with untrusted peers imposes extra complexity on code that employs "
11748 "shared memory. Memory sealing enables that extra complexity to be "
11749 "eliminated, by allowing a process to operate secure in the knowledge that "
11750 "its peer can't modify the shared memory in an undesired fashion."
11752 "信頼していない相手への対処により、 共有メモリーを利用するコードに余計な複雑性"
11753 "が増すことになる。 メモリー sealing により余計な複雑性をなくすことができる。 "
11754 "相手が望まない方法で共有メモリーを変更できないことを知っていることで、 プロセ"
11757 #. type: Plain text
11758 #: build/C/man2/memfd_create.2:218
11759 msgid "An example of the usage of the sealing mechanism is as follows:"
11760 msgstr "sealing 機構の使い方の例は以下のとおりである。"
11762 #. type: Plain text
11763 #: build/C/man2/memfd_create.2:225
11765 "The first process creates a I<tmpfs> file using B<memfd_create>(). The call "
11766 "yields a file descriptor used in subsequent steps."
11768 "最初のプロセスは B<memfd_create>() を使って I<tmpfs> ファイルを作成する。 "
11769 "B<memfd_create>() はこれ以降のステップで使用するファイルディスクリプターを返"
11772 #. type: Plain text
11773 #: build/C/man2/memfd_create.2:232
11775 "The first process sizes the file created in the previous step using "
11776 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
11777 "with the desired data."
11779 "最初のプロセスは B<ftruncate>(2) を使って直前のステップで作成したファイルのサ"
11780 "イズを変更し、 B<mmap>(2) を使ってそのファイルをマッピングし、 共有メモリーに"
11784 #: build/C/man2/memfd_create.2:232
11789 #. type: Plain text
11790 #: build/C/man2/memfd_create.2:242
11792 "The first process uses the B<fcntl>(2) B<F_ADD_SEALS> operation to place "
11793 "one or more seals on the file, in order to restrict further modifications on "
11794 "the file. (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
11795 "to first unmap the shared writable mapping created in the previous step.)"
11797 "最初のプロセスは、 このファイルに対する今後の変更を制限するために、 "
11798 "B<fcntl>(2) の B<F_ADD_SEALS> 操作を使って、 そのファイルに seal をいくつか設"
11799 "定する。 (seal B<F_SEAL_WRITE> を設定する場合、 直前のステップで作成した書き"
11800 "込み可能な共有マッピングをまずアンマップする必要が出てくる。)"
11803 #: build/C/man2/memfd_create.2:242
11808 #. type: Plain text
11809 #: build/C/man2/memfd_create.2:247
11811 "A second process obtains a file descriptor for the I<tmpfs> file and maps "
11812 "it. Among the possible ways in which this could happen are the following:"
11814 "二つ目のプロセスは I<tmpfs> ファイルのファイルディスクリプターを入手し、 その"
11815 "ファイルをマップする。 以下に示す方法を使用することができる。"
11817 #. type: Plain text
11818 #: build/C/man2/memfd_create.2:258
11820 "The process that called B<memfd_create>() could transfer the resulting file "
11821 "descriptor to the second process via a UNIX domain socket (see B<unix>(7) "
11822 "and B<cmsg>(3)). The second process then maps the file using B<mmap>(2)."
11824 "B<memfd_create>() を呼び出したプロセスは、 得られたファイルディスクリプターを"
11825 "二つ目のプロセスに UNIX ドメインソケット経由で渡すことができる (B<unix>(7) "
11826 "と B<cmsg>(3) を参照)。 それから、二つ目のプロセスは B<mmap>(2) を使ってファ"
11829 #. type: Plain text
11830 #: build/C/man2/memfd_create.2:266
11832 "The second process is created via B<fork>(2) and thus automatically "
11833 "inherits the file descriptor and mapping. (Note that in this case and the "
11834 "next, there is a natural trust relationship between the two processes, since "
11835 "they are running under the same user ID. Therefore, file sealing would not "
11836 "normally be necessary.)"
11838 "二つ目のプロセスを B<fork>(2) を使って作成する。 そうすると、 自動的にファイ"
11839 "ルディスクリプターとマッピングが継承される。 (この方法と次の方法では、 二つの"
11840 "プロセス間で自然な信頼関係が存在することになる。 なぜなら、 二つのプロセスは"
11841 "同じユーザー ID。 の元で実行されているからである。 したがって、 file sealing "
11844 #. type: Plain text
11845 #: build/C/man2/memfd_create.2:280
11847 "The second process opens the file I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>>, "
11848 "where I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
11849 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
11850 "returned by the call to B<memfd_create>() in that process. The second "
11851 "process then maps the file using B<mmap>(2)."
11853 "二つ目のプロセスは I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>> をオープンする。 "
11854 "I<E<lt>pidE<gt>> は最初のプロセス (B<memfd_create>() を呼び出したプロセス) "
11855 "の PID で、 I<E<lt>fdE<gt>> は最初のプロセスでの B<memfd_create>() の呼び出し"
11856 "で返されたファイルディスクリプター番号である。 それからこのファイルを "
11857 "B<mmap>(2) を使ってマッピングする。"
11860 #: build/C/man2/memfd_create.2:281
11865 #. type: Plain text
11866 #: build/C/man2/memfd_create.2:293
11868 "The second process uses the B<fcntl>(2) B<F_GET_SEALS> operation to "
11869 "retrieve the bit mask of seals that has been applied to the file. This bit "
11870 "mask can be inspected in order to determine what kinds of restrictions have "
11871 "been placed on file modifications. If desired, the second process can apply "
11872 "further seals to impose additional restrictions (so long as the "
11873 "B<F_SEAL_SEAL> seal has not yet been applied)."
11875 "二つ目のプロセスは B<fcntl>(2) の B<F_GET_SEALS> 操作を使って、 そのファイル"
11876 "に適用されている seal のビットマスクを取得する。 このビットマスクを調べて、 "
11877 "ファイルの変更に関してどのような制限が適用されているかを知ることができる。 "
11878 "(B<F_SEAL_SEAL> seal がそれまでに適用されていない限りは) 必要であれば、 二つ"
11879 "目のプロセスはさらに seal を設定して追加の制限をかけることができる。"
11881 #. type: Plain text
11882 #: build/C/man2/memfd_create.2:297
11884 "Below are shown two example programs that demonstrate the use of "
11885 "B<memfd_create>() and the file sealing API."
11887 "以下では B<memfd_create>() と file sealing API の使用例を示すサンプルプログラ"
11890 #. type: Plain text
11891 #: build/C/man2/memfd_create.2:312
11893 "The first program, I<t_memfd_create.c>, creates a I<tmpfs> file using "
11894 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
11895 "optionally places some seals on the file. The program accepts up to three "
11896 "command-line arguments, of which the first two are required. The first "
11897 "argument is the name to associate with the file, the second argument is the "
11898 "size to be set for the file, and the optional third is a string of "
11899 "characters that specify seals to be set on file."
11901 "最初のプログラム I<t_memfd_create.c> は、 B<memfd_create>() を使って "
11902 "I<tmpfs> ファイルを作成し、 そのファイルのサイズを設定し、 メモリーにマッピン"
11903 "グし、 要求された場合にはそのファイルに seal を設定する。 このプログラムは最"
11904 "大で 3 つのコマンドライン引き数を取り、 最初の 2 つは必須である。 最初の引き"
11905 "数はファイルに関連付けられる名前で、 2 番目の引き数はファイルに設定されるサイ"
11906 "ズである。 省略可能な 3 番目の引き数は、 このファイルに設定する seal を指定す"
11909 #. type: Plain text
11910 #: build/C/man2/memfd_create.2:318
11912 "The second program, I<t_get_seals.c>, can be used to open an existing file "
11913 "that was created via B<memfd_create>() and inspect the set of seals that "
11914 "have been applied to that file."
11916 "2 つめのプログラム I<t_get_seals.c> を使うと、 B<memfd_create>() を使って作成"
11917 "された既存のファイルをオープンし、 そのファイルに適用されている seal の集合を"
11920 #. type: Plain text
11921 #: build/C/man2/memfd_create.2:323
11923 "The following shell session demonstrates the use of these programs. First "
11924 "we create a I<tmpfs> file and set some seals on it:"
11926 "以下のシェルのセッションはこれらのプログラムの使用例を示したものである。 ま"
11927 "ず I<tmpfs> ファイルを作成し、そのファイルに seal をいくつか設定している。"
11929 #. type: Plain text
11930 #: build/C/man2/memfd_create.2:329
11933 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11935 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11937 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11939 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11941 #. type: Plain text
11942 #: build/C/man2/memfd_create.2:347
11944 "At this point, the I<t_memfd_create> program continues to run in the "
11945 "background. From another program, we can obtain a file descriptor for the "
11946 "file created by B<memfd_create>() by opening the I</proc/PID/fd> file that "
11947 "corresponds to the descriptor opened by B<memfd_create>(). Using that "
11948 "pathname, we inspect the content of the I</proc/PID/fd> symbolic link, and "
11949 "use our I<t_get_seals> program to view the seals that have been placed on "
11952 "この時点では、 I<t_memfd_create> プログラムはバックグラウンドで動作し続け"
11953 "る。 もう一つのプログラムから、 B<memfd_create>() がオープンしたディスクリプ"
11954 "ターに対応する I</proc/PID/fd> ファイルをオープンすることで、 "
11955 "B<memfd_create>() で作成されたファイルのファイルディスクリプターを取得でき"
11957 "そのパス名を使って、 I</proc/PID/fd> シンボリックリンクの内容を調査し、 "
11958 "I<t_get_seals> プログラムを使ってそのファイルに設定されている seal を見ること"
11961 #. type: Plain text
11962 #: build/C/man2/memfd_create.2:354
11965 "$ B<readlink /proc/11775/fd/3>\n"
11966 "/memfd:my_memfd_file (deleted)\n"
11967 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11968 "Existing seals: WRITE SHRINK\n"
11970 "$ B<readlink /proc/11775/fd/3>\n"
11971 "/memfd:my_memfd_file (deleted)\n"
11972 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11973 "Existing seals: WRITE SHRINK\n"
11976 #: build/C/man2/memfd_create.2:356
11978 msgid "Program source: t_memfd_create.c"
11979 msgstr "プログラムのソース: t_memfd_create.c"
11981 #. type: Plain text
11982 #: build/C/man2/memfd_create.2:365
11985 "#include E<lt>sys/memfd.hE<gt>\n"
11986 "#include E<lt>fcntl.hE<gt>\n"
11987 "#include E<lt>stdlib.hE<gt>\n"
11988 "#include E<lt>unistd.hE<gt>\n"
11989 "#include E<lt>string.hE<gt>\n"
11990 "#include E<lt>stdio.hE<gt>\n"
11992 "#include E<lt>sys/memfd.hE<gt>\n"
11993 "#include E<lt>fcntl.hE<gt>\n"
11994 "#include E<lt>stdlib.hE<gt>\n"
11995 "#include E<lt>unistd.hE<gt>\n"
11996 "#include E<lt>string.hE<gt>\n"
11997 "#include E<lt>stdio.hE<gt>\n"
11999 #. type: Plain text
12000 #: build/C/man2/memfd_create.2:377
12004 "main(int argc, char *argv[])\n"
12007 " unsigned int seals;\n"
12009 " char *name, *seals_arg;\n"
12013 "main(int argc, char *argv[])\n"
12016 " unsigned int seals;\n"
12018 " char *name, *seals_arg;\n"
12021 #. type: Plain text
12022 #: build/C/man2/memfd_create.2:388
12025 " if (argc E<lt> 3) {\n"
12026 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12027 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12028 " \"following characters:\\en\");\n"
12029 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12030 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12031 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12032 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12033 " exit(EXIT_FAILURE);\n"
12036 " if (argc E<lt> 3) {\n"
12037 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12038 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12039 " \"following characters:\\en\");\n"
12040 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12041 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12042 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12043 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12044 " exit(EXIT_FAILURE);\n"
12047 #. type: Plain text
12048 #: build/C/man2/memfd_create.2:392
12051 " name = argv[1];\n"
12052 " len = atoi(argv[2]);\n"
12053 " seals_arg = argv[3];\n"
12055 " name = argv[1];\n"
12056 " len = atoi(argv[2]);\n"
12057 " seals_arg = argv[3];\n"
12059 #. type: Plain text
12060 #: build/C/man2/memfd_create.2:395
12063 " /* Create an anonymous file in tmpfs; allow seals to be\n"
12064 " placed on the file */\n"
12066 " /* Create an anonymous file in tmpfs; allow seals to be\n"
12067 " placed on the file */\n"
12069 #. type: Plain text
12070 #: build/C/man2/memfd_create.2:399
12073 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12075 " errExit(\"memfd_create\");\n"
12077 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12079 " errExit(\"memfd_create\");\n"
12081 #. type: Plain text
12082 #: build/C/man2/memfd_create.2:401
12084 msgid " /* Size the file as specified on the command line */\n"
12085 msgstr " /* Size the file as specified on the command line */\n"
12087 #. type: Plain text
12088 #: build/C/man2/memfd_create.2:404
12091 " if (ftruncate(fd, len) == -1)\n"
12092 " errExit(\"truncate\");\n"
12094 " if (ftruncate(fd, len) == -1)\n"
12095 " errExit(\"truncate\");\n"
12097 #. type: Plain text
12098 #: build/C/man2/memfd_create.2:407
12101 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12102 " (long) getpid(), fd, (long) getpid(), fd);\n"
12104 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12105 " (long) getpid(), fd, (long) getpid(), fd);\n"
12107 #. type: Plain text
12108 #: build/C/man2/memfd_create.2:410
12111 " /* Code to map the file and populate the mapping with data\n"
12114 " /* Code to map the file and populate the mapping with data\n"
12117 #. type: Plain text
12118 #: build/C/man2/memfd_create.2:413
12121 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12122 " seals on the file */\n"
12124 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12125 " seals on the file */\n"
12127 #. type: Plain text
12128 #: build/C/man2/memfd_create.2:416
12131 " if (seals_arg != NULL) {\n"
12134 " if (seals_arg != NULL) {\n"
12137 #. type: Plain text
12138 #: build/C/man2/memfd_create.2:425
12141 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12142 " seals |= F_SEAL_GROW;\n"
12143 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12144 " seals |= F_SEAL_SHRINK;\n"
12145 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12146 " seals |= F_SEAL_WRITE;\n"
12147 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12148 " seals |= F_SEAL_SEAL;\n"
12150 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12151 " seals |= F_SEAL_GROW;\n"
12152 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12153 " seals |= F_SEAL_SHRINK;\n"
12154 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12155 " seals |= F_SEAL_WRITE;\n"
12156 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12157 " seals |= F_SEAL_SEAL;\n"
12159 #. type: Plain text
12160 #: build/C/man2/memfd_create.2:429
12163 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12164 " errExit(\"fcntl\");\n"
12167 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12168 " errExit(\"fcntl\");\n"
12171 #. type: Plain text
12172 #: build/C/man2/memfd_create.2:432
12175 " /* Keep running, so that the file created by memfd_create()\n"
12176 " continues to exist */\n"
12178 " /* Keep running, so that the file created by memfd_create()\n"
12179 " continues to exist */\n"
12181 #. type: Plain text
12182 #: build/C/man2/memfd_create.2:434
12184 msgid " pause();\n"
12185 msgstr " pause();\n"
12188 #: build/C/man2/memfd_create.2:438
12190 msgid "Program source: t_get_seals.c"
12191 msgstr "プログラムのソース: t_get_seals.c"
12193 #. type: Plain text
12194 #: build/C/man2/memfd_create.2:447
12197 "#include E<lt>sys/memfd.hE<gt>\n"
12198 "#include E<lt>fcntl.hE<gt>\n"
12199 "#include E<lt>unistd.hE<gt>\n"
12200 "#include E<lt>stdlib.hE<gt>\n"
12201 "#include E<lt>string.hE<gt>\n"
12202 "#include E<lt>stdio.hE<gt>\n"
12204 "#include E<lt>sys/memfd.hE<gt>\n"
12205 "#include E<lt>fcntl.hE<gt>\n"
12206 "#include E<lt>unistd.hE<gt>\n"
12207 "#include E<lt>stdlib.hE<gt>\n"
12208 "#include E<lt>string.hE<gt>\n"
12209 "#include E<lt>stdio.hE<gt>\n"
12211 #. type: Plain text
12212 #: build/C/man2/memfd_create.2:456
12216 "main(int argc, char *argv[])\n"
12219 " unsigned int seals;\n"
12222 "main(int argc, char *argv[])\n"
12225 " unsigned int seals;\n"
12227 #. type: Plain text
12228 #: build/C/man2/memfd_create.2:461
12231 " if (argc != 2) {\n"
12232 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12233 " exit(EXIT_FAILURE);\n"
12236 " if (argc != 2) {\n"
12237 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12238 " exit(EXIT_FAILURE);\n"
12241 #. type: Plain text
12242 #: build/C/man2/memfd_create.2:465
12245 " fd = open(argv[1], O_RDWR);\n"
12247 " errExit(\"open\");\n"
12249 " fd = open(argv[1], O_RDWR);\n"
12251 " errExit(\"open\");\n"
12253 #. type: Plain text
12254 #: build/C/man2/memfd_create.2:469
12257 " seals = fcntl(fd, F_GET_SEALS);\n"
12258 " if (seals == -1)\n"
12259 " errExit(\"fcntl\");\n"
12261 " seals = fcntl(fd, F_GET_SEALS);\n"
12262 " if (seals == -1)\n"
12263 " errExit(\"fcntl\");\n"
12265 #. type: Plain text
12266 #: build/C/man2/memfd_create.2:480
12269 " printf(\"Existing seals:\");\n"
12270 " if (seals & F_SEAL_SEAL)\n"
12271 " printf(\" SEAL\");\n"
12272 " if (seals & F_SEAL_GROW)\n"
12273 " printf(\" GROW\");\n"
12274 " if (seals & F_SEAL_WRITE)\n"
12275 " printf(\" WRITE\");\n"
12276 " if (seals & F_SEAL_SHRINK)\n"
12277 " printf(\" SHRINK\");\n"
12278 " printf(\"\\en\");\n"
12280 " printf(\"Existing seals:\");\n"
12281 " if (seals & F_SEAL_SEAL)\n"
12282 " printf(\" SEAL\");\n"
12283 " if (seals & F_SEAL_GROW)\n"
12284 " printf(\" GROW\");\n"
12285 " if (seals & F_SEAL_WRITE)\n"
12286 " printf(\" WRITE\");\n"
12287 " if (seals & F_SEAL_SHRINK)\n"
12288 " printf(\" SHRINK\");\n"
12289 " printf(\"\\en\");\n"
12291 #. type: Plain text
12292 #: build/C/man2/memfd_create.2:483
12295 " /* Code to map the file and access the contents of the\n"
12296 " resulting mapping omitted */\n"
12298 " /* Code to map the file and access the contents of the\n"
12299 " resulting mapping omitted */\n"
12301 #. type: Plain text
12302 #: build/C/man2/memfd_create.2:493
12303 msgid "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12304 msgstr "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12307 #: build/C/man2/s390_pci_mmio_write.2:25
12309 msgid "S390_PCI_MMIO_WRITE"
12310 msgstr "S390_PCI_MMIO_WRITE"
12313 #: build/C/man2/s390_pci_mmio_write.2:25
12316 msgstr "2015-01-15"
12318 #. type: Plain text
12319 #: build/C/man2/s390_pci_mmio_write.2:29
12321 "s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO "
12325 #. type: Plain text
12326 #: build/C/man2/s390_pci_mmio_write.2:32
12328 msgid "B<#include E<lt>asm/unistd.hE<gt>>\n"
12329 msgstr "B<#include E<lt>asm/unistd.hE<gt>>\n"
12331 #. type: Plain text
12332 #: build/C/man2/s390_pci_mmio_write.2:35
12335 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12336 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12338 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12339 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12341 #. type: Plain text
12342 #: build/C/man2/s390_pci_mmio_write.2:38
12345 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12346 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12348 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12349 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12351 #. type: Plain text
12352 #: build/C/man2/s390_pci_mmio_write.2:57
12354 "The B<s390_pci_mmio_write>() system call writes I<length> bytes of data "
12355 "from the user-space buffer I<user_buffer> to the PCI MMIO memory location "
12356 "specified by I<mmio_addr>. The B<s390_pci_mmio_read>() system call reads "
12357 "I<length> bytes of data from the PCI MMIO memory location specified by "
12358 "I<mmio_addr> to the user-space buffer I<user_buffer>."
12361 #. type: Plain text
12362 #: build/C/man2/s390_pci_mmio_write.2:68
12364 "These system calls must be used instead of the simple assignment or data-"
12365 "transfer operations that are used to access the PCI MMIO memory areas mapped "
12366 "to user space on the Linux System z platform. The address specified by "
12367 "I<mmio_addr> must belong to a PCI MMIO memory page mapping in the caller's "
12368 "address space, and the data being written or read must not cross a page "
12369 "boundary. The I<length> value cannot be greater than the system page size."
12372 #. type: Plain text
12373 #: build/C/man2/s390_pci_mmio_write.2:77
12375 "On success, B<s390_pci_mmio_write>() and B<s390_pci_mmio_read>() return "
12376 "0. On error, -1 is returned and I<errno> is set to one of the error codes "
12379 "成功すると、 B<s390_pci_mmio_write>() と B<s390_pci_mmio_read>() は 0 を返"
12380 "す。 エラーの場合、-1 を返し、 I<errno> に以下のリストにあるエラーコードのい"
12383 #. type: Plain text
12384 #: build/C/man2/s390_pci_mmio_write.2:83
12385 msgid "The address in I<mmio_addr> is invalid."
12388 #. type: Plain text
12389 #: build/C/man2/s390_pci_mmio_write.2:87
12391 "I<user_buffer> does not point to a valid location in the caller's address "
12395 #. type: Plain text
12396 #: build/C/man2/s390_pci_mmio_write.2:92
12397 msgid "Invalid I<length> argument."
12400 #. type: Plain text
12401 #: build/C/man2/s390_pci_mmio_write.2:95
12402 msgid "PCI support is not enabled."
12405 #. type: Plain text
12406 #: build/C/man2/s390_pci_mmio_write.2:98
12407 msgid "Insufficient memory."
12410 #. type: Plain text
12411 #: build/C/man2/s390_pci_mmio_write.2:100
12412 msgid "These system calls are available since Linux 3.19."
12413 msgstr "これらのシステムコールは Linux 3.19 以降で使用可能である。"
12415 #. type: Plain text
12416 #: build/C/man2/s390_pci_mmio_write.2:103
12418 "This Linux-specific system call is available only on the s390 architecture. "
12419 "The required PCI support is available beginning with System z EC12."
12422 #. type: Plain text
12423 #: build/C/man2/s390_pci_mmio_write.2:107
12425 "Glibc does not provide a wrapper for this system call, use B<syscall>(2) to "
12429 #. type: Plain text
12430 #: build/C/man2/s390_pci_mmio_write.2:109
12431 msgid "B<syscall>(2)"
12432 msgstr "B<syscall>(2)"
12434 #~ msgid "System-wide limit on the number of pages of shared memory."
12435 #~ msgstr "共有メモリーのページ数のシステム全体での上限値。"
12438 #~ "Segment low boundary address multiple. Must be page aligned. For the "
12439 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
12441 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
12442 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
12444 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
12446 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
12449 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
12450 #~ "2^20 (2,097,152)."
12452 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
12453 #~ "(2,097,152) になる。"
12456 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
12457 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
12460 #~ "共有メモリーセグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
12461 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
12465 #~ "System wide maximum number of shared memory segments: implementation "
12466 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
12467 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
12469 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
12470 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
12471 #~ "で参照したり、変更したりできる)。"
12474 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
12476 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
12480 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
12481 #~ "pair of registers. On this architecture, the call signature of "
12482 #~ "B<posix_fadvise>() is flawed, since it forces a register to be wasted as "
12483 #~ "padding between the I<fd> and I<len> arguments. Therefore, since Linux "
12484 #~ "2.6.14, ARM defines a different system call that orders the arguments "
12487 #~ "ARM アーキテクチャーでは、64 ビットの引き数は適切なレジスターの組に割り当"
12489 #~ "る必要がある。このアーキテクチャーでは、B<posix_fadvise>() の呼び出し方"
12491 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
12492 #~ "パディング (詰めもの) でレジスターが一つ消費されてしまうというものであ"
12494 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
12495 #~ "システムコールが定義されている。"
12498 #~ "The behavior of this system call is otherwise exactly the same as "
12499 #~ "B<posix_fadvise>(). No library support is provided for this system call "
12502 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
12503 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
12507 #~ "The I<mode> is not supported by the file system containing the file "
12508 #~ "referred to by I<fd>."
12510 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
12514 #~ "The function B<mtrace>() installs handlers for B<malloc>(3), "
12515 #~ "B<realloc>(3) and B<free>(3). The function B<muntrace>() disables "
12516 #~ "these handlers."
12518 #~ "関数 B<mtrace>() は、 B<malloc>(3), B<realloc>(3), B<free>(3) のハンド"
12519 #~ "ラーを組み込む。 関数 B<muntrace>() はこれらのハンドラーを解除する。"
12522 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
12523 #~ "B<mtrace>() writes its output. This file must be writable to the user "
12524 #~ "or B<mtrace>() will do nothing. If the file is not empty it will be "
12527 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>() が出力を書き出すファイルを指定す"
12528 #~ "る。 ユーザーが書き込み権限を持つファイルを指定しなければならない。 書き込"
12529 #~ "み権限がない場合、 B<mtrace>() は何もしない。 ファイルが空でない場合、"
12530 #~ "ファイルの元の内容を上書きする。"
12533 #~ "The output of B<mtrace>() will be ASCII but not in a friendly format. "
12534 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
12536 #~ "B<mtrace>() の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
12537 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
12541 #~ "This flag allocates and initializes to zero the disk space within the "
12542 #~ "range specified by I<offset> and I<len>. After a successful call, "
12543 #~ "subsequent writes into this range are guaranteed not to fail because of "
12544 #~ "lack of disk space. Preallocating zeroed blocks beyond the end of the "
12545 #~ "file is useful for optimizing append workloads. Preallocating blocks "
12546 #~ "does not change the file size (as reported by B<stat>(2)) even if it is "
12547 #~ "less than I<offset>+I<len>."
12549 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
12550 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
12551 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
12552 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
12553 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
12554 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
12555 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2) が返す) ファイルサイズ"