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-01-28 15:24+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
443 #| "This page is part of release 3.78 of the Linux I<man-pages> project. A "
444 #| "description of the project, information about reporting bugs, and the "
445 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
448 "This page is part of release 3.79 of the Linux I<man-pages> project. A "
449 "description of the project, information about reporting bugs, and the latest "
450 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
453 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
454 "である。プロジェクトの説明とバグ報告に関する情報は\n"
455 "http://www.kernel.org/doc/man-pages/ に書かれている。"
458 #: build/C/man3/alloca.3:43
464 #: build/C/man3/alloca.3:43
470 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
471 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
472 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
473 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
474 #: build/C/man3/posix_memalign.3:29
480 #: build/C/man3/alloca.3:46
481 msgid "alloca - allocate memory that is automatically freed"
482 msgstr "alloca - 自動的に解放されるメモリーを割り当てる"
485 #: build/C/man3/alloca.3:48
486 msgid "B<#include E<lt>alloca.hE<gt>>"
487 msgstr "B<#include E<lt>alloca.hE<gt>>"
490 #: build/C/man3/alloca.3:50
491 msgid "B<void *alloca(size_t >I<size>B<);>"
492 msgstr "B<void *alloca(size_t >I<size>B<);>"
495 #: build/C/man3/alloca.3:60
497 "The B<alloca>() function allocates I<size> bytes of space in the stack "
498 "frame of the caller. This temporary space is automatically freed when the "
499 "function that called B<alloca>() returns to its caller."
501 "B<alloca>() 関数は、 I<size> バイトの領域を呼出元のスタックフレームに割り付"
502 "ける。 この一時的な領域は、 B<alloca>() を呼び出した関数が呼出元に返るときに"
506 #: build/C/man3/alloca.3:65
508 "The B<alloca>() function returns a pointer to the beginning of the "
509 "allocated space. If the allocation causes stack overflow, program behavior "
512 "B<alloca>() 関数は、割り付けた領域の始まりを指すポインターを返す。 割り付け"
513 "によってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
517 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
518 #: build/C/man3/posix_fallocate.3:103
524 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
525 #: build/C/man3/posix_fallocate.3:104
527 msgid "Multithreading (see pthreads(7))"
528 msgstr "マルチスレッディング (pthreads(7) 参照)"
531 #: build/C/man3/alloca.3:70
532 msgid "The B<alloca>() function is thread-safe."
533 msgstr "B<alloca>() 関数はスレッドセーフである。"
536 #: build/C/man3/alloca.3:72
537 msgid "This function is not in POSIX.1-2001."
538 msgstr "この関数は POSIX.1-2001 にはない。"
541 #: build/C/man3/alloca.3:78
543 "There is evidence that the B<alloca>() function appeared in 32V, PWB, "
544 "PWB.2, 3BSD, and 4BSD. There is a man page for it in 4.3BSD. Linux uses "
547 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>() 関数が登場した証拠がある。 "
548 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
549 "は POSIX.1-2001 にはない。"
552 #: build/C/man3/alloca.3:93
554 "The B<alloca>() function is machine- and compiler-dependent. For certain "
555 "applications, its use can improve efficiency compared to the use of "
556 "B<malloc>(3) plus B<free>(3). In certain cases, it can also simplify "
557 "memory deallocation in applications that use B<longjmp>(3) or "
558 "B<siglongjmp>(3). Otherwise, its use is discouraged."
560 "B<alloca>() 関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
561 "は、この関数を使うと B<malloc>(3) と B<free>(3) を組み合わせて使った場合に"
562 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
563 "B<longjmp>(3) や B<siglongjmp>(3) を使うアプリケーションでのメモリーの開放"
564 "を簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
567 #: build/C/man3/alloca.3:102
569 "Because the space allocated by B<alloca>() is allocated within the stack "
570 "frame, that space is automatically freed if the function return is jumped "
571 "over by a call to B<longjmp>(3) or B<siglongjmp>(3)."
573 "B<alloca>() により割り当てられる空間はスタックフレームから割り当てらるの"
574 "で、 関数の戻り先が B<longjmp>(3) や B<siglongjmp>(3) の呼び出しによりジャ"
575 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
578 #: build/C/man3/alloca.3:107
579 msgid "Do not attempt to B<free>(3) space allocated by B<alloca>()!"
581 "B<alloca>() で割り当てられた空間を B<free>(3) しようとすることのないよう"
585 #: build/C/man3/alloca.3:107
587 msgid "Notes on the GNU version"
588 msgstr "GNU 版についての注意"
591 #: build/C/man3/alloca.3:129
593 "Normally, B<gcc>(1) translates calls to B<alloca>() with inlined code. "
594 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
595 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
596 "included. Otherwise, (without an -ansi or -std=c* option) the glibc version "
597 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
600 "通常 B<gcc>(1) は B<alloca>() の呼び出しをインラインコードに変換する。 I<-"
601 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
602 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
603 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
604 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
605 "インクルードするが、このファイルには以下の行が含まれており、"
608 #: build/C/man3/alloca.3:134
612 " #define alloca(size) __builtin_alloca (size)\n"
616 " #define alloca(size) __builtin_alloca (size)\n"
620 #: build/C/man3/alloca.3:137
621 msgid "with messy consequences if one has a private version of this function."
622 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
625 #: build/C/man3/alloca.3:141
627 "The fact that the code is inlined means that it is impossible to take the "
628 "address of this function, or to change its behavior by linking with a "
631 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
632 "のライブラリをリンクして動作を変更することはできない。"
635 #: build/C/man3/alloca.3:145
637 "The inlined code often consists of a single instruction adjusting the stack "
638 "pointer, and does not check for stack overflow. Thus, there is no NULL "
641 "通常このインラインコードはスタックポインターを移動する 1 つの命令 "
642 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
643 "よって NULL エラーが返されることはない。"
646 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
647 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
648 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:590 build/C/man3/mtrace.3:102
649 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
650 #: build/C/man2/shmget.2:376
656 #: build/C/man3/alloca.3:150
658 "There is no error indication if the stack frame cannot be extended. "
659 "(However, after a failed allocation, the program is likely to receive a "
660 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
662 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
663 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
664 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
667 #: build/C/man3/alloca.3:158
669 "On many systems B<alloca>() cannot be used inside the list of arguments of "
670 "a function call, because the stack space reserved by B<alloca>() would "
671 "appear on the stack in the middle of the space for the function arguments."
673 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>() が使え"
674 "ない。 これは、 B<alloca>() によって予約されるスタック領域が、 関数引き数に"
675 "使われるスタック領域の中に現れてしまうためである。"
678 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:378
679 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
680 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
681 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
682 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
683 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
684 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:715 build/C/man2/mmap2.2:95
685 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
686 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
687 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:138
688 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
689 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
690 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
691 #: build/C/man2/shmget.2:382 build/C/man2/shmop.2:293
692 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
693 #: build/C/man2/memfd_create.2:487 build/C/man2/s390_pci_mmio_write.2:107
699 #: build/C/man3/alloca.3:162
700 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
701 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
704 #: build/C/man2/cacheflush.2:25
710 #: build/C/man2/cacheflush.2:25
716 #: build/C/man2/cacheflush.2:28
717 msgid "cacheflush - flush contents of instruction and/or data cache"
718 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
721 #: build/C/man2/cacheflush.2:31
723 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
724 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
727 #: build/C/man2/cacheflush.2:33
729 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
730 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
733 #: build/C/man2/cacheflush.2:43
735 "B<cacheflush>() flushes the contents of the indicated cache(s) for the user "
736 "addresses in the range I<addr> to I<(addr+nbytes-1)>. I<cache> may be one "
739 "B<cacheflush>() は I<addr> から I<(addr+nbytes-1)> の範囲のユーザーアドレス"
740 "に対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれか"
744 #: build/C/man2/cacheflush.2:43
750 #: build/C/man2/cacheflush.2:46
751 msgid "Flush the instruction cache."
752 msgstr "命令 (instruction) キャッシュをフラッシュする。"
755 #: build/C/man2/cacheflush.2:46
761 #: build/C/man2/cacheflush.2:49
762 msgid "Write back to memory and invalidate the affected valid cache lines."
763 msgstr "変更があったキャッシュラインをメモリーに書き戻し、無効にする。"
766 #: build/C/man2/cacheflush.2:49
772 #: build/C/man2/cacheflush.2:53
773 msgid "Same as B<(ICACHE|DCACHE)>."
774 msgstr "B<(ICACHE|DCACHE)> と同じ。"
777 #: build/C/man2/cacheflush.2:59
779 "B<cacheflush>() returns 0 on success or -1 on error. If errors are "
780 "detected, I<errno> will indicate the error."
782 "B<cacheflush>() は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
783 "出された場合は I<errno> にエラーが指示される。"
786 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
787 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
788 #: build/C/man2/subpage_prot.2:72 build/C/man2/memfd_create.2:134
789 #: build/C/man2/s390_pci_mmio_write.2:78 build/C/man2/s390_pci_mmio_write.2:83
795 #: build/C/man2/cacheflush.2:67
797 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
800 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
804 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
805 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
806 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
807 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
808 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
809 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
810 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
811 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
812 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
813 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
814 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
815 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
816 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
817 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
818 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
819 #: build/C/man2/memfd_create.2:139 build/C/man2/s390_pci_mmio_write.2:87
825 #: build/C/man2/cacheflush.2:75
826 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
828 "I<cache> パラメーターが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
830 #. FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
831 #. but by now it is on a number of other architectures (but not i386).
832 #. Investigate the details and update this page.
833 #. Irix 6.5 appears to have a cacheflush() syscall -- mtk
835 #: build/C/man2/cacheflush.2:82
837 "This Linux-specific system call is available only on MIPS-based systems. It "
838 "should not be used in programs intended to be portable."
840 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
841 "植を意図したプログラムで使用すべきではない。"
844 #: build/C/man2/cacheflush.2:89
846 "The current implementation ignores the I<addr> and I<nbytes> arguments. "
847 "Therefore, the whole cache is always flushed."
849 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
853 #: build/C/man2/fallocate.2:11
859 #: build/C/man2/fallocate.2:11 build/C/man3/malloc_info.3:25
860 #: build/C/man2/mmap.2:40 build/C/man3/posix_fallocate.3:25
861 #: build/C/man3/shm_open.3:26 build/C/man2/memfd_create.2:21
867 #: build/C/man2/fallocate.2:14
868 msgid "fallocate - manipulate file space"
869 msgstr "fallocate - ファイル空間の操作"
872 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
875 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
876 "B<#include E<lt>fcntl.hE<gt>>\n"
878 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
879 "B<#include E<lt>fcntl.hE<gt>>\n"
882 #: build/C/man2/fallocate.2:21
884 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
885 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
888 #: build/C/man2/fallocate.2:27
890 "This is a nonportable, Linux-specific system call. For the portable, "
891 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
892 "B<posix_fallocate>(3)."
894 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
895 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
896 "で規定された方法である B<posix_fallocate>(3) を使うこと。"
899 #: build/C/man2/fallocate.2:37
901 "B<fallocate>() allows the caller to directly manipulate the allocated disk "
902 "space for the file referred to by I<fd> for the byte range starting at "
903 "I<offset> and continuing for I<len> bytes."
905 "B<fallocate>() を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
906 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
910 #: build/C/man2/fallocate.2:42
912 "The I<mode> argument determines the operation to be performed on the given "
913 "range. Details of the supported operations are given in the subsections "
916 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
917 "サポートされている操作の詳細は以下のサブセクションで説明する。"
920 #: build/C/man2/fallocate.2:42
922 msgid "Allocating disk space"
926 #: build/C/man2/fallocate.2:65
928 "The default operation (i.e., I<mode> is zero) of B<fallocate>() allocates "
929 "the disk space within the range specified by I<offset> and I<len>. The file "
930 "size (as reported by B<stat>(2)) will be changed if I<offset>+I<len> is "
931 "greater than the file size. Any subregion within the range specified by "
932 "I<offset> and I<len> that did not contain data before the call will be "
933 "initialized to zero. This default behavior closely resembles the behavior "
934 "of the B<posix_fallocate>(3) library function, and is intended as a method "
935 "of optimally implementing that function."
937 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
938 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
939 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
940 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
941 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
942 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
943 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
944 "適に実装する手段を提供することを目的としているからである。"
947 #: build/C/man2/fallocate.2:71
949 "After a successful call, subsequent writes into the range specified by "
950 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
954 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
955 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
958 #: build/C/man2/fallocate.2:82
960 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
961 "the call is similar, but the file size will not be changed even if I<offset>"
962 "+I<len> is greater than the file size. Preallocating zeroed blocks beyond "
963 "the end of the file in this manner is useful for optimizing append workloads."
965 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
967 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
968 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
969 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
973 #: build/C/man2/fallocate.2:86
975 "Because allocation is done in block size chunks, B<fallocate>() may "
976 "allocate a larger range of disk space than was specified."
978 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
980 "も大きなディスク領域を割り当てることがある。"
983 #: build/C/man2/fallocate.2:86
985 msgid "Deallocating file space"
986 msgstr "ファイル空間の割り当て解除"
989 #: build/C/man2/fallocate.2:101
991 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
992 "in I<mode> deallocates space (i.e., creates a hole) in the byte range "
993 "starting at I<offset> and continuing for I<len> bytes. Within the specified "
994 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
995 "removed from the file. After a successful call, subsequent reads from this "
996 "range will return zeroes."
998 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
999 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1000 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1001 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1002 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1006 #: build/C/man2/fallocate.2:112
1008 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
1009 "I<mode>; in other words, even when punching off the end of the file, the "
1010 "file size (as reported by B<stat>(2)) does not change."
1012 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
1013 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
1014 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
1017 #: build/C/man2/fallocate.2:117
1019 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1020 "support the operation, an error is returned. The operation is supported on "
1021 "at least the following filesystems:"
1023 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1024 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1025 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1028 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1029 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1030 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1031 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1032 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1033 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1034 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1035 #: build/C/man2/shmop.2:80 build/C/man2/memfd_create.2:248
1036 #: build/C/man2/memfd_create.2:258 build/C/man2/memfd_create.2:266
1042 #: build/C/man2/fallocate.2:119
1043 msgid "XFS (since Linux 2.6.38)"
1044 msgstr "XFS (Linux 2.6.38 以降)"
1046 #. commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1048 #: build/C/man2/fallocate.2:122
1049 msgid "ext4 (since Linux 3.0)"
1050 msgstr "ext4 (Linux 3.0 以降)"
1053 #: build/C/man2/fallocate.2:124
1054 msgid "Btrfs (since Linux 3.7)"
1055 msgstr "Btrfs (Linux 3.7 以降)"
1057 #. commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1059 #: build/C/man2/fallocate.2:127
1060 msgid "tmpfs (since Linux 3.5)"
1061 msgstr "tmpfs (Linux 3.5 以降)"
1064 #: build/C/man2/fallocate.2:127
1066 msgid "Collapsing file space"
1067 msgstr "ファイル空間の一部削除"
1069 #. commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1071 #: build/C/man2/fallocate.2:147
1073 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1074 "in I<mode> removes a byte range from a file, without leaving a hole. The "
1075 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1076 "bytes. At the completion of the operation, the contents of the file "
1077 "starting at the location I<offset+len> will be appended at the location "
1078 "I<offset>, and the file will be I<len> bytes smaller."
1080 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1081 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残さ"
1082 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1083 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1084 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1088 #: build/C/man2/fallocate.2:161
1090 "A filesystem may place limitations on the granularity of the operation, in "
1091 "order to ensure efficient implementation. Typically, I<offset> and I<len> "
1092 "must be a multiple of the filesystem logical block size, which varies "
1093 "according to the filesystem type and configuration. If a filesystem has "
1094 "such a requirement, B<fallocate>() will fail with the error B<EINVAL> if "
1095 "this requirement is violated."
1097 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1098 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1099 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1100 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1101 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1104 #: build/C/man2/fallocate.2:170
1106 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1107 "of file, an error is returned; instead, use B<ftruncate>(2) to truncate a "
1110 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1111 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1112 "B<ftruncate>(2) を使用すること。"
1115 #: build/C/man2/fallocate.2:175
1117 "No other flags may be specified in I<mode> in conjunction with "
1118 "B<FALLOC_FL_COLLAPSE_RANGE>."
1120 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1123 #. commit 9eb79482a97152930b113b51dff530aba9e28c8e
1124 #. commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1126 #: build/C/man2/fallocate.2:183
1128 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1129 "extent-based files) and XFS."
1131 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1132 "ファイル) と XFS でサポートされている。"
1135 #: build/C/man2/fallocate.2:183
1137 msgid "Zeroing file space"
1138 msgstr "ファイル空間のゼロ埋め"
1140 #. commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1142 #: build/C/man2/fallocate.2:199
1144 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14) in "
1145 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1146 "for I<len> bytes. Within the specified range, blocks are preallocated for "
1147 "the regions that span the holes in the file. After a successful call, "
1148 "subsequent reads from this range will return zeroes."
1150 "B<FALLOC_FL_ZERO_RANGE> フラグ (Linux 3.14 以降で利用可能) を I<mode> に指定"
1151 "すると、 I<offset> で始まる I<len> バイト範囲の空間をゼロ埋めする。 指定され"
1152 "た範囲の中では、ブロックは、そのファイル内のホールが広がる領域にあらかじめ割"
1153 "り当てられたものである。 呼び出しが成功すると、 これ以降のこの範囲からの読み"
1157 #: build/C/man2/fallocate.2:205
1159 "Zeroing is done within the filesystem preferably by converting the range "
1160 "into unwritten extents. This approach means that the specified range will "
1161 "not be physically zeroed out on the device (except for partial blocks at the "
1162 "either end of the range), and I/O is (otherwise) required only to update "
1165 "ゼロ埋めは、ファイルシステム内部では、指定された範囲を書き込みを伴わないエク"
1166 "ステントに変換する方法をできるだけ使って行われる。 この方法は、指定された範囲"
1167 "について物理的にゼロ埋めしたデータがデバイスに書き込まれるのではないことを意"
1168 "味する (例外は指定された範囲の端の部分的に使用しているブロックである)。 (これ"
1169 "以外で) I/O が必要なのはメタデータの更新だけである。"
1172 #: build/C/man2/fallocate.2:217
1174 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1175 "behavior of the call is similar, but the file size will not be changed even "
1176 "if I<offset>+I<len> is greater than the file size. This behavior is the "
1177 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1179 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に追加で指定された場合、 このシステム"
1180 "コールの動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合"
1181 "であってもファイルサイズは変更されない点が異なる。 この動作は "
1182 "B<FALLOC_FL_KEEP_SIZE> を指定してスペースを前もって割り当てた場合と同じであ"
1186 #: build/C/man2/fallocate.2:222
1188 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1189 "support the operation, an error is returned. The operation is supported on "
1190 "at least the following filesystems:"
1192 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1193 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1194 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1196 #. commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1198 #: build/C/man2/fallocate.2:225
1199 msgid "XFS (since Linux 3.14)"
1200 msgstr "XFS (Linux 3.14 以降)"
1202 #. commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1204 #: build/C/man2/fallocate.2:228
1205 msgid "ext4, for extent-based files (since Linux 3.14)"
1206 msgstr "ext4 のエクステントベースのファイル (Linux 3.14 以降)"
1209 #: build/C/man2/fallocate.2:235
1211 "On success, B<fallocate>() returns zero. On error, -1 is returned and "
1212 "I<errno> is set to indicate the error."
1214 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> "
1218 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1219 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1220 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1221 #: build/C/man2/sync_file_range.2:148
1227 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1228 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1230 "I<fd> が有効なファイルディスクリプターでないか、 書き込み用としてオープンされ"
1234 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1240 #: build/C/man2/fallocate.2:244
1241 msgid "I<offset>+I<len> exceeds the maximum file size."
1242 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1245 #: build/C/man2/fallocate.2:244
1251 #: build/C/man2/fallocate.2:247
1252 msgid "A signal was caught during execution."
1253 msgstr "実行中にシグナルが捕捉された。"
1256 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1257 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1258 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1261 #: build/C/man2/fallocate.2:269
1263 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1264 "plus I<len> reaches or passes the end of the file."
1266 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1267 "範囲がファイルの末尾かそれより先まで達している。"
1270 #: build/C/man2/fallocate.2:279
1272 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1273 "not a multiple of the filesystem block size."
1275 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1276 "がファイルシステムのブロックサイズの倍数ではない。"
1279 #: build/C/man2/fallocate.2:287
1281 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1282 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1284 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1285 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1287 #. There was a inconsistency in 3.15-rc1, that should be resolved so that all
1288 #. filesystems use this error for this case. (Tytso says ex4 will change.)
1289 #. http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1290 #. From: Michael Kerrisk (man-pages <mtk.manpages@...>
1291 #. Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1292 #. Newsgroups: gmane.linux.man, gmane.linux.file-systems
1293 #. Date: 2014-04-17 13:40:05 GMT
1295 #: build/C/man2/fallocate.2:304
1297 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1298 "file referred to by I<fd> is not a regular file."
1300 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1301 "I<fd> が参照しているファイルが通常のファイルではない。"
1304 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1305 #: build/C/man2/sync_file_range.2:160
1311 #: build/C/man2/fallocate.2:307
1312 msgid "An I/O error occurred while reading from or writing to a filesystem."
1313 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1316 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1317 #: build/C/man3/posix_fallocate.3:87 build/C/man2/s390_pci_mmio_write.2:92
1323 #: build/C/man2/fallocate.2:314
1325 "I<fd> does not refer to a regular file or a directory. (If I<fd> is a pipe "
1326 "or FIFO, a different error results.)"
1328 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1329 "を参照している場合、別のエラーが発生する)。"
1332 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1333 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1339 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1341 "There is not enough space left on the device containing the file referred to "
1343 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1346 #: build/C/man2/fallocate.2:323
1347 msgid "This kernel does not implement B<fallocate>()."
1348 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1351 #: build/C/man2/fallocate.2:323
1353 msgid "B<EOPNOTSUPP>"
1354 msgstr "B<EOPNOTSUPP>"
1357 #: build/C/man2/fallocate.2:332
1359 "The filesystem containing the file referred to by I<fd> does not support "
1360 "this operation; or the I<mode> is not supported by the filesystem containing "
1361 "the file referred to by I<fd>."
1363 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1364 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1365 "I<mode> をサポートしていない。"
1368 #: build/C/man2/fallocate.2:332 build/C/man2/fallocate.2:338
1369 #: build/C/man2/fallocate.2:351 build/C/man2/mlock.2:143
1370 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/mmap.2:467
1371 #: build/C/man2/shmctl.2:353 build/C/man2/shmget.2:241
1377 #: build/C/man2/fallocate.2:338
1378 msgid "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
1380 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1381 "(B<chattr>(1) 参照)。"
1384 #: build/C/man2/fallocate.2:351
1386 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1387 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1389 "I<mode> に B<FALLOC_FL_PUNCH_HOLE> か B<FALLOC_FL_COLLAPSE_RANGE> が指定され"
1390 "たが、 I<fd> が参照するファイルに追加のみ (append-only) の属性が付いている "
1391 "(B<chattr>(1) 参照)。"
1394 #: build/C/man2/fallocate.2:355 build/C/man2/mmap.2:471
1395 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
1396 msgstr "操作が file seal により禁止されている。 B<fcntl>(2) 参照。"
1399 #: build/C/man2/fallocate.2:355 build/C/man2/posix_fadvise.2:97
1400 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1406 #: build/C/man2/fallocate.2:359
1407 msgid "I<fd> refers to a pipe or FIFO."
1408 msgstr "I<fd> がパイプか FIFO を参照している。"
1411 #: build/C/man2/fallocate.2:359 build/C/man2/mmap.2:471
1417 #: build/C/man2/fallocate.2:367
1419 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1420 "I<fd> is currently being executed."
1422 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1426 #: build/C/man2/fallocate.2:367 build/C/man2/madvise.2:325
1427 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1428 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1429 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1430 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1431 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1432 #: build/C/man2/sync_file_range.2:177 build/C/man2/memfd_create.2:155
1433 #: build/C/man2/s390_pci_mmio_write.2:98
1438 #. See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1440 #: build/C/man2/fallocate.2:375
1442 "B<fallocate>() is available on Linux since kernel 2.6.23. Support is "
1443 "provided by glibc since version 2.10. The B<FALLOC_FL_*> flags are defined "
1444 "in glibc headers only since version 2.18."
1446 "B<fallocate>() はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1447 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダー"
1448 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1451 #: build/C/man2/fallocate.2:378
1452 msgid "B<fallocate>() is Linux-specific."
1453 msgstr "B<fallocate>() は Linux 固有である。"
1456 #: build/C/man2/fallocate.2:383
1458 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1460 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1463 #: build/C/man2/madvise.2:35
1469 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1475 #: build/C/man2/madvise.2:38
1476 msgid "madvise - give advice about use of memory"
1477 msgstr "madvise - メモリー利用に関するアドバイスを与える"
1480 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1481 #: build/C/man3/shm_open.3:31
1482 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1483 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1486 #: build/C/man2/madvise.2:42
1488 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1490 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1493 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1494 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1496 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1497 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1500 #: build/C/man2/madvise.2:50
1501 msgid "B<madvise>(): _BSD_SOURCE"
1502 msgstr "B<madvise>(): _BSD_SOURCE"
1505 #: build/C/man2/madvise.2:68
1507 "The B<madvise>() system call advises the kernel about how to handle paging "
1508 "input/output in the address range beginning at address I<addr> and with size "
1509 "I<length> bytes. It allows an application to tell the kernel how it expects "
1510 "to use some mapped or shared memory areas, so that the kernel can choose "
1511 "appropriate read-ahead and caching techniques. This call does not influence "
1512 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1513 "but may influence its performance. The kernel is free to ignore the advice."
1515 "B<madvise>() システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1516 "トのメモリーブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイ"
1517 "スする。 これを用いると、 アプリケーションからカーネルに、 マップされたメモ"
1518 "リーや共有メモリーをどのように扱ってほしいか伝えることができ、 カーネルはそれ"
1519 "に応じて先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリ"
1520 "ケーションの動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性"
1521 "能には影響しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任され"
1525 #: build/C/man2/madvise.2:72
1526 msgid "The advice is indicated in the I<advice> argument which can be"
1528 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1531 #: build/C/man2/madvise.2:72
1533 msgid "B<MADV_NORMAL>"
1534 msgstr "B<MADV_NORMAL>"
1537 #: build/C/man2/madvise.2:76
1538 msgid "No special treatment. This is the default."
1539 msgstr "特別な扱いは行わない。これがデフォルトである。"
1542 #: build/C/man2/madvise.2:76
1544 msgid "B<MADV_RANDOM>"
1545 msgstr "B<MADV_RANDOM>"
1548 #: build/C/man2/madvise.2:80
1550 "Expect page references in random order. (Hence, read ahead may be less "
1551 "useful than normally.)"
1553 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1557 #: build/C/man2/madvise.2:80
1559 msgid "B<MADV_SEQUENTIAL>"
1560 msgstr "B<MADV_SEQUENTIAL>"
1563 #: build/C/man2/madvise.2:85
1565 "Expect page references in sequential order. (Hence, pages in the given "
1566 "range can be aggressively read ahead, and may be freed soon after they are "
1569 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1570 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1574 #: build/C/man2/madvise.2:85
1576 msgid "B<MADV_WILLNEED>"
1577 msgstr "B<MADV_WILLNEED>"
1580 #: build/C/man2/madvise.2:89
1582 "Expect access in the near future. (Hence, it might be a good idea to read "
1583 "some pages ahead.)"
1585 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1589 #: build/C/man2/madvise.2:89
1591 msgid "B<MADV_DONTNEED>"
1592 msgstr "B<MADV_DONTNEED>"
1595 #: build/C/man2/madvise.2:100
1597 "Do not expect access in the near future. (For the time being, the "
1598 "application is finished with the given range, so the kernel can free "
1599 "resources associated with it.) Subsequent accesses of pages in this range "
1600 "will succeed, but will result either in reloading of the memory contents "
1601 "from the underlying mapped file (see B<mmap>(2)) or zero-fill-on-demand "
1602 "pages for mappings without an underlying file."
1604 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1605 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。) こ"
1606 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリーの内容を"
1607 "マップ元のファイルからロードし直すことになる (B<mmap>(2) を見よ) か、 または"
1608 "元ファイルがないマップページでは アクセスがあったときに 0 埋めが行われること"
1612 #: build/C/man2/madvise.2:100
1614 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1615 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1618 #. Databases want to use this feature to drop a section of their
1619 #. bufferpool (shared memory segments) - without writing back to
1620 #. disk/swap space. This feature is also useful for supporting
1621 #. hot-plug memory on UML.
1623 #: build/C/man2/madvise.2:113
1625 "Free up a given range of pages and its associated backing store. Currently, "
1626 "only shmfs/tmpfs supports this; other filesystems return with the error "
1629 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1630 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1634 #: build/C/man2/madvise.2:113
1636 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1637 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1639 #. See http://lwn.net/Articles/171941/
1640 #. [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1641 #. Currently, copy-on-write may change the physical address of
1642 #. a page even if the user requested that the page is pinned in
1643 #. memory (either by mlock or by get_user_pages). This happens
1644 #. if the process forks meanwhile, and the parent writes to that
1645 #. page. As a result, the page is orphaned: in case of
1646 #. get_user_pages, the application will never see any data hardware
1647 #. DMA's into this page after the COW. In case of mlock'd memory,
1648 #. the parent is not getting the realtime/security benefits of mlock.
1649 #. In particular, this affects the Infiniband modules which do DMA from
1650 #. and into user pages all the time.
1651 #. This patch adds madvise options to control whether memory range is
1652 #. inherited across fork. Useful e.g. for when hardware is doing DMA
1653 #. from/into these pages. Could also be useful to an application
1654 #. wanting to speed up its forks by cutting large areas out of
1656 #. SEE ALSO: http://lwn.net/Articles/171941/
1657 #. "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1659 #: build/C/man2/madvise.2:144
1661 "Do not make the pages in this range available to the child after a "
1662 "B<fork>(2). This is useful to prevent copy-on-write semantics from changing "
1663 "the physical location of a page(s) if the parent writes to it after a "
1664 "B<fork>(2). (Such page relocations cause problems for hardware that DMAs "
1665 "into the page(s).)"
1667 "B<fork>(2) が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1668 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2) "
1669 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1670 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1671 "を行うような場合に 問題を起こすことがある)。"
1674 #: build/C/man2/madvise.2:144
1676 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1677 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1680 #: build/C/man2/madvise.2:150
1682 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1683 "a mapping is inherited across B<fork>(2)."
1685 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1686 "B<fork>(2) の前後でマッピングは継承されるようになる。"
1689 #: build/C/man2/madvise.2:150
1691 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1692 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1695 #: build/C/man2/madvise.2:162
1697 "Poison a page and handle it like a hardware memory corruption. This "
1698 "operation is available only for privileged (B<CAP_SYS_ADMIN>) processes. "
1699 "This operation may result in the calling process receiving a B<SIGBUS> and "
1700 "the page being unmapped. This feature is intended for testing of memory "
1701 "error-handling code; it is available only if the kernel was configured with "
1702 "B<CONFIG_MEMORY_FAILURE>."
1704 "ページに毒入れを行い、ハードウェアメモリーの破損のようにそのページを取り扱"
1705 "う。 この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 こ"
1706 "の操作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマッ"
1707 "プされる。 この機能はメモリーのエラー処理コードをテストするためのものであ"
1708 "る。 カーネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能"
1712 #: build/C/man2/madvise.2:162
1714 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1715 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1718 #: build/C/man2/madvise.2:180
1720 "Soft offline the pages in the range specified by I<addr> and I<length>. The "
1721 "memory of each page in the specified range is preserved (i.e., when next "
1722 "accessed, the same content will be visible, but in a new physical page "
1723 "frame), and the original page is offlined (i.e., no longer used, and taken "
1724 "out of normal memory management). The effect of the B<MADV_SOFT_OFFLINE> "
1725 "operation is invisible to (i.e., does not change the semantics of) the "
1726 "calling process. This feature is intended for testing of memory error-"
1727 "handling code; it is available only if the kernel was configured with "
1728 "B<CONFIG_MEMORY_FAILURE>."
1730 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1731 "された範囲の各ページのメモリーの内容は保持され (すなわち、次にアクセスされた"
1732 "際に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオ"
1733 "フラインになる (すなわち、 そのフレームは使用される、通常のメモリー管理からは"
1734 "取り除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えな"
1735 "い (つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリーのエラー"
1736 "処理コードをテストすることを目的に作られた。 カーネルで "
1737 "B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1740 #: build/C/man2/madvise.2:180
1742 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1743 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1746 #: build/C/man2/madvise.2:205
1748 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1749 "I<addr> and I<length>. The kernel regularly scans those areas of user "
1750 "memory that have been marked as mergeable, looking for pages with identical "
1751 "content. These are replaced by a single write-protected page (which is "
1752 "automatically copied if a process later wants to update the content of the "
1753 "page). KSM merges only private anonymous pages (see B<mmap>(2)). The KSM "
1754 "feature is intended for applications that generate many instances of the "
1755 "same data (e.g., virtualization systems such as KVM). It can consume a lot "
1756 "of processing power; use with care. See the Linux kernel source file "
1757 "I<Documentation/vm/ksm.txt> for more details. The B<MADV_MERGEABLE> and "
1758 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1759 "configured with B<CONFIG_KSM>."
1761 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1762 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1763 "いたユーザーメモリーの領域を定期的にスキャンし、内容が全く同じページを探す。 "
1764 "内容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) "
1765 "がかかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよ"
1766 "うとした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名"
1767 "ページ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じ"
1768 "データのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システ"
1769 "ム) での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合"
1770 "があり、注意して使用すること。 詳細は Linux カーネルソースファイル "
1771 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1772 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1776 #: build/C/man2/madvise.2:205
1778 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1779 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1782 #: build/C/man2/madvise.2:214
1784 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1785 "address range; KSM unmerges whatever pages it had merged in the address "
1786 "range specified by I<addr> and I<length>."
1788 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1789 "果を取り消す。 KSM は、 I<addr> と I<length> で指定されたアドレス範囲の統合"
1790 "済みのすべてのページの統合解除を行う。"
1793 #: build/C/man2/madvise.2:214
1795 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1796 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1798 #. http://lwn.net/Articles/358904/
1799 #. https://lwn.net/Articles/423584/
1801 #: build/C/man2/madvise.2:243
1803 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1804 "I<addr> and I<length>. Currently, Transparent Huge Pages work only with "
1805 "private anonymous pages (see B<mmap>(2)). The kernel will regularly scan "
1806 "the areas marked as huge page candidates to replace them with huge pages. "
1807 "The kernel will also allocate huge pages directly when the region is "
1808 "naturally aligned to the huge page size (see B<posix_memalign>(2)). This "
1809 "feature is primarily aimed at applications that use large mappings of data "
1810 "and access large regions of that memory at a time (e.g., virtualization "
1811 "systems such as QEMU). It can very easily waste memory (e.g., a 2MB mapping "
1812 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1813 "one 4KB page). See the Linux kernel source file I<Documentation/vm/"
1814 "transhuge.txt> for more details. The B<MADV_HUGEPAGE> and "
1815 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1816 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1818 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1819 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1820 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1821 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1822 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1823 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1824 "マッピングを使用し、一度にそのメモリーの大きな範囲にアクセスするようなアプリ"
1825 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1826 "る。 この機能は非常に簡単にメモリーを浪費してしまう (例えば、1 バイトしかアク"
1827 "セスしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリーを使っ"
1828 "てしまう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1829 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1830 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1834 #: build/C/man2/madvise.2:243
1836 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1837 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1840 #: build/C/man2/madvise.2:250
1842 "Ensures that memory in the address range specified by I<addr> and I<length> "
1843 "will not be collapsed into huge pages."
1845 "I<addr> と I<length> で指定されたアドレス範囲のメモリーがヒュージページに組み"
1849 #: build/C/man2/madvise.2:250
1851 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1852 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1855 #: build/C/man2/madvise.2:264
1857 "Exclude from a core dump those pages in the range specified by I<addr> and "
1858 "I<length>. This is useful in applications that have large areas of memory "
1859 "that are known not to be useful in a core dump. The effect of "
1860 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1861 "proc/PID/coredump_filter> file (see B<core>(5))."
1863 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1864 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリー領域があ"
1865 "るアプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1866 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1870 #: build/C/man2/madvise.2:264
1872 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1873 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1876 #: build/C/man2/madvise.2:268
1877 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1878 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1881 #: build/C/man2/madvise.2:275
1883 "On success B<madvise>() returns zero. On error, it returns -1 and I<errno> "
1884 "is set appropriately."
1886 "B<madvise>() は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1890 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1891 #: build/C/man2/mremap.2:136
1897 #: build/C/man2/madvise.2:279
1898 msgid "A kernel resource was temporarily unavailable."
1899 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1902 #: build/C/man2/madvise.2:282
1903 msgid "The map exists, but the area maps something that isn't a file."
1904 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1907 #: build/C/man2/madvise.2:285
1908 msgid "This error can occur for the following reasons:"
1909 msgstr "このエラーは以下の理由で発生する。"
1914 #: build/C/man2/madvise.2:292
1915 msgid "The value I<len> is negative."
1916 msgstr "I<len> が負の値である。"
1919 #: build/C/man2/madvise.2:295
1920 msgid "I<addr> is not page-aligned."
1921 msgstr "I<addr> がページ境界ではない。"
1924 #: build/C/man2/madvise.2:298
1925 msgid "I<advice> is not a valid value"
1926 msgstr "I<advice> が有効な値でない。"
1929 #: build/C/man2/madvise.2:301
1931 "The application is attempting to release locked or shared pages (with "
1932 "B<MADV_DONTNEED>)."
1934 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1939 #: build/C/man2/madvise.2:309
1941 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1942 "kernel was not configured with B<CONFIG_KSM>."
1944 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1945 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1948 #: build/C/man2/madvise.2:316
1950 "(for B<MADV_WILLNEED>) Paging in this area would exceed the process's "
1951 "maximum resident set size."
1953 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1954 "(resident set size) の最大値を越えてしまう。"
1957 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1958 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1959 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1960 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1961 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1962 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1963 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1964 #: build/C/man2/sync_file_range.2:163 build/C/man2/memfd_create.2:152
1965 #: build/C/man2/s390_pci_mmio_write.2:95
1971 #: build/C/man2/madvise.2:321
1972 msgid "(for B<MADV_WILLNEED>) Not enough memory: paging in failed."
1973 msgstr "(B<MADV_WILLNEED> の場合) メモリーが足りず、ページングに失敗した。"
1976 #: build/C/man2/madvise.2:325
1978 "Addresses in the specified range are not currently mapped, or are outside "
1979 "the address space of the process."
1981 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1984 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1986 #: build/C/man2/madvise.2:332
1988 "Since Linux 3.18, support for this system call is optional, depending on the "
1989 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1991 "Linux 3.18 以降では、このシステムコールのサポートは任意となり、利用できるかは"
1992 "カーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされてい"
1995 #. FIXME . Write a posix_madvise(3) page.
1997 #: build/C/man2/madvise.2:345
1999 "POSIX.1b. POSIX.1-2001 describes B<posix_madvise>(3) with constants "
2000 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
2001 "to that described here. There is a similar B<posix_fadvise>(2) for file "
2004 "POSIX.1b. POSIX.1-2001 では、 B<posix_madvise>(3) を B<POSIX_MADV_NORMAL>, "
2005 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
2006 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2) という"
2010 #: build/C/man2/madvise.2:354
2012 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
2013 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
2015 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
2016 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
2019 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
2020 #: build/C/man2/shmget.2:370
2026 #: build/C/man2/madvise.2:363
2028 "The current Linux implementation (2.4.0) views this system call more as a "
2029 "command than as advice and hence may return an error when it cannot do what "
2030 "it usually would do in response to this advice. (See the ERRORS description "
2031 "above.) This is nonstandard behavior."
2033 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2034 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2035 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2041 #. function first appeared in 4.4BSD.
2043 #: build/C/man2/madvise.2:379
2045 "The Linux implementation requires that the address I<addr> be page-aligned, "
2046 "and allows I<length> to be zero. If there are some parts of the specified "
2047 "address range that are not mapped, the Linux version of B<madvise>() "
2048 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2049 "the system call, as it should)."
2051 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2052 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>() では、指定"
2053 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2054 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2058 #: build/C/man2/madvise.2:388
2060 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2061 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2063 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2064 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2067 #: build/C/man3/mallinfo.3:26
2073 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2079 #: build/C/man3/mallinfo.3:29
2080 msgid "mallinfo - obtain memory allocation information"
2081 msgstr "mallinfo - メモリー割り当て情報を取得する"
2084 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2085 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2086 #: build/C/man3/mallopt.3:31
2087 msgid "B<#include E<lt>malloc.hE<gt>>"
2088 msgstr "B<#include E<lt>malloc.hE<gt>>"
2091 #: build/C/man3/mallinfo.3:33
2092 msgid "B<struct mallinfo mallinfo(void);>"
2093 msgstr "B<struct mallinfo mallinfo(void);>"
2096 #: build/C/man3/mallinfo.3:41
2098 "The B<mallinfo>() function returns a copy of a structure containing "
2099 "information about memory allocations performed by B<malloc>(3) and related "
2100 "functions. This structure is defined as follows:"
2102 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリー\n"
2103 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2104 "この構造体は以下のように定義されている。"
2107 #: build/C/man3/mallinfo.3:56
2110 "struct mallinfo {\n"
2111 " int arena; /* Non-mmapped space allocated (bytes) */\n"
2112 " int ordblks; /* Number of free chunks */\n"
2113 " int smblks; /* Number of free fastbin blocks */\n"
2114 " int hblks; /* Number of mmapped regions */\n"
2115 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
2116 " int usmblks; /* Maximum total allocated space (bytes) */\n"
2117 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
2118 " int uordblks; /* Total allocated space (bytes) */\n"
2119 " int fordblks; /* Total free space (bytes) */\n"
2120 " int keepcost; /* Top-most, releasable space (bytes) */\n"
2123 "struct mallinfo {\n"
2124 " int arena; /* Non-mmapped space allocated (bytes) */\n"
2125 " int ordblks; /* Number of free chunks */\n"
2126 " int smblks; /* Number of free fastbin blocks */\n"
2127 " int hblks; /* Number of mmapped regions */\n"
2128 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
2129 " int usmblks; /* Maximum total allocated space (bytes) */\n"
2130 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
2131 " int uordblks; /* Total allocated space (bytes) */\n"
2132 " int fordblks; /* Total free space (bytes) */\n"
2133 " int keepcost; /* Top-most, releasable space (bytes) */\n"
2137 #: build/C/man3/mallinfo.3:62
2139 "The fields of the I<mallinfo> structure contain the following information:"
2140 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2143 #: build/C/man3/mallinfo.3:62
2149 #: build/C/man3/mallinfo.3:68
2151 "The total amount of memory allocated by means other than B<mmap>(2) (i.e., "
2152 "memory allocated on the heap). This figure includes both in-use blocks and "
2153 "blocks on the free list."
2155 "B<mmap>(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられ"
2156 "たメモリー) 。 この数字には使用中のブロックやフリーリスト上のブロックも含まれ"
2160 #: build/C/man3/mallinfo.3:68
2166 #: build/C/man3/mallinfo.3:71
2167 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2168 msgstr "通常の (つまり fastbin ではない) 未使用ブロック数。"
2171 #: build/C/man3/mallinfo.3:71
2177 #: build/C/man3/mallinfo.3:75
2178 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2179 msgstr "fastbin 未使用ブロック数 (B<mallopt>(3) 参照)。"
2182 #: build/C/man3/mallinfo.3:75
2188 #: build/C/man3/mallinfo.3:83
2190 "The number of blocks currently allocated using B<mmap>(2). (See the "
2191 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2193 "B<mmap>(2) を使って現在割り当てられているブロック数 (B<mallopt>(3) の "
2194 "B<M_MMAP_THRESHOLD> の議論を参照)。"
2197 #: build/C/man3/mallinfo.3:83
2203 #: build/C/man3/mallinfo.3:87
2204 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2205 msgstr "B<mmap>(2) を使って現在割り当てられているブロックのバイト数。"
2208 #: build/C/man3/mallinfo.3:87
2214 #: build/C/man3/mallinfo.3:92
2216 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2217 "of space that was ever allocated. This field is maintained only in "
2218 "nonthreading environments."
2220 "割り当てた空間の最高点 (\"highwater mark\")、 つまり、 これまでの中での最大の"
2221 "割り当て量。 このフィールドはスレッド化されていない環境でのみ収集される。"
2224 #: build/C/man3/mallinfo.3:92
2230 #: build/C/man3/mallinfo.3:95
2231 msgid "The total number of bytes in fastbin free blocks."
2232 msgstr "fastbin フリーブロックの総バイト数。"
2235 #: build/C/man3/mallinfo.3:95
2238 msgstr "I<uordblks>"
2241 #: build/C/man3/mallinfo.3:98
2242 msgid "The total number of bytes used by in-use allocations."
2243 msgstr "使用中の割り当てメモリーで使われているバイト数。"
2246 #: build/C/man3/mallinfo.3:98
2249 msgstr "I<fordblks>"
2252 #: build/C/man3/mallinfo.3:101
2253 msgid "The total number of bytes in free blocks."
2254 msgstr "フリーブロックの総バイト数。"
2257 #: build/C/man3/mallinfo.3:101
2260 msgstr "I<keepcost>"
2263 #. Available already in glibc 2.0, possibly earlier
2265 #: build/C/man3/mallinfo.3:110
2267 "The total amount of releasable free space at the top of the heap. This is "
2268 "the maximum number of bytes that could ideally (i.e., ignoring page "
2269 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2271 "ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は "
2272 "B<malloc_trim>(3) で理想的な場合に解放できる最大のバイト数である (理想的とい"
2273 "うのは、 ページ境界の制限などを無視した場合である。"
2276 #: build/C/man3/mallinfo.3:114
2278 "This function is not specified by POSIX or the C standards. A similar "
2279 "function exists on many System V derivatives, and was specified in the SVID."
2281 "この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステ"
2282 "ムに同様の関数が存在し、 SVID では同様の関数が規定されていた。 "
2284 #. FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2285 #. See the 24 Aug 2011 mail by Paul Pluzhnikov:
2286 #. "[patch] Fix mallinfo() to accumulate results for all arenas"
2287 #. on libc-alpha@sourceware.org
2289 #: build/C/man3/mallinfo.3:126
2291 "B<Information is returned for only the main memory allocation area.> "
2292 "Allocations in other arenas are excluded. See B<malloc_stats>(3) and "
2293 "B<malloc_info>(3) for alternatives that include information about other "
2296 "B<これらの情報はメインのメモリー割り当て領域に対するもののみである。> 他の領"
2297 "域の割り当ては対象にならない。 他の領域の情報も取得できる別の手段については "
2298 "B<malloc_stats>(3) や B<malloc_info>(3) を参照。"
2301 #: build/C/man3/mallinfo.3:134
2303 "The fields of the I<mallinfo> structure are typed as I<int>. However, "
2304 "because some internal bookkeeping values may be of type I<long>, the "
2305 "reported values may wrap around zero and thus be inaccurate."
2307 "I<mallinfo> 構造体の各フィールドは I<int> 型である。 しかし、 いくつかの内部"
2308 "管理用の値は I<long> 型の場合もあるので、 報告される値が一周してしまい、 不正"
2312 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2313 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2314 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:633
2315 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2316 #: build/C/man2/memfd_create.2:293
2322 #: build/C/man3/mallinfo.3:140
2324 "The program below employs B<mallinfo>() to retrieve memory allocation "
2325 "statistics before and after allocating and freeing some blocks of memory. "
2326 "The statistics are displayed on standard output."
2328 "以下のプログラムは B<mallinfo>() を利用して、 メモリーブロックの割り当て、解"
2329 "放のそれぞれ前後でメモリー割り当ての統計情報を取得する。 統計情報は標準出力に"
2333 #: build/C/man3/mallinfo.3:144
2335 "The first two command-line arguments specify the number and size of blocks "
2336 "to be allocated with B<malloc>(3)."
2338 "最初の 2 つのコマンドライン引き数は B<malloc>(3) で割り当てるブロック数とサイ"
2342 #: build/C/man3/mallinfo.3:158
2344 "The remaining three arguments specify which of the allocated blocks should "
2345 "be freed with B<free>(3). These three arguments are optional, and specify "
2346 "(in order): the step size to be used in the loop that frees blocks (the "
2347 "default is 1, meaning free all blocks in the range); the ordinal position of "
2348 "the first block to be freed (default 0, meaning the first allocated block); "
2349 "and a number one greater than the ordinal position of the last block to be "
2350 "freed (default is one greater than the maximum block number). If these "
2351 "three arguments are omitted, then the defaults cause all allocated blocks to "
2354 "残りの 3 つの引き数は、どの割り当てられたブロックを B<free>(3) で解放すべきか"
2355 "を指定する。 これらの 3 つの引き数の指定は任意で、 最初のものから順に以下の情"
2356 "報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップ"
2357 "サイズを指定する (デフォルト値は 1 で、 1 は指定した範囲のすべてのブロックを"
2358 "解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を"
2359 "指定する (デフォルト値は 0 で、 0 は先頭の割り当て済みブロックを意味する)。 "
2360 "3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定す"
2361 "る (デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つ"
2362 "の引き数が省略された場合、 デフォルトではすべての割り当てられたブロックが解放"
2366 #: build/C/man3/mallinfo.3:162
2368 "In the following example run of the program, 1000 allocations of 100 bytes "
2369 "are performed, and then every second allocated block is freed:"
2371 "以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当"
2372 "てたブロックの 2 つに 1 つを解放する。"
2375 #: build/C/man3/mallinfo.3:177
2378 "$ B<./a.out 1000 100 2>\n"
2379 "============== Before allocating blocks ==============\n"
2380 "Total non-mmapped bytes (arena): 0\n"
2381 "# of free chunks (ordblks): 1\n"
2382 "# of free fastbin blocks (smblks): 0\n"
2383 "# of mapped regions (hblks): 0\n"
2384 "Bytes in mapped regions (hblkhd): 0\n"
2385 "Max. total allocated space (usmblks): 0\n"
2386 "Free bytes held in fastbins (fsmblks): 0\n"
2387 "Total allocated space (uordblks): 0\n"
2388 "Total free space (fordblks): 0\n"
2389 "Topmost releasable block (keepcost): 0\n"
2391 "$ B<./a.out 1000 100 2>\n"
2392 "============== Before allocating blocks ==============\n"
2393 "Total non-mmapped bytes (arena): 0\n"
2394 "# of free chunks (ordblks): 1\n"
2395 "# of free fastbin blocks (smblks): 0\n"
2396 "# of mapped regions (hblks): 0\n"
2397 "Bytes in mapped regions (hblkhd): 0\n"
2398 "Max. total allocated space (usmblks): 0\n"
2399 "Free bytes held in fastbins (fsmblks): 0\n"
2400 "Total allocated space (uordblks): 0\n"
2401 "Total free space (fordblks): 0\n"
2402 "Topmost releasable block (keepcost): 0\n"
2405 #: build/C/man3/mallinfo.3:189
2408 "============== After allocating blocks ==============\n"
2409 "Total non-mmapped bytes (arena): 135168\n"
2410 "# of free chunks (ordblks): 1\n"
2411 "# of free fastbin blocks (smblks): 0\n"
2412 "# of mapped regions (hblks): 0\n"
2413 "Bytes in mapped regions (hblkhd): 0\n"
2414 "Max. total allocated space (usmblks): 0\n"
2415 "Free bytes held in fastbins (fsmblks): 0\n"
2416 "Total allocated space (uordblks): 104000\n"
2417 "Total free space (fordblks): 31168\n"
2418 "Topmost releasable block (keepcost): 31168\n"
2420 "============== After allocating blocks ==============\n"
2421 "Total non-mmapped bytes (arena): 135168\n"
2422 "# of free chunks (ordblks): 1\n"
2423 "# of free fastbin blocks (smblks): 0\n"
2424 "# of mapped regions (hblks): 0\n"
2425 "Bytes in mapped regions (hblkhd): 0\n"
2426 "Max. total allocated space (usmblks): 0\n"
2427 "Free bytes held in fastbins (fsmblks): 0\n"
2428 "Total allocated space (uordblks): 104000\n"
2429 "Total free space (fordblks): 31168\n"
2430 "Topmost releasable block (keepcost): 31168\n"
2433 #: build/C/man3/mallinfo.3:201
2436 "============== After freeing blocks ==============\n"
2437 "Total non-mmapped bytes (arena): 135168\n"
2438 "# of free chunks (ordblks): 501\n"
2439 "# of free fastbin blocks (smblks): 0\n"
2440 "# of mapped regions (hblks): 0\n"
2441 "Bytes in mapped regions (hblkhd): 0\n"
2442 "Max. total allocated space (usmblks): 0\n"
2443 "Free bytes held in fastbins (fsmblks): 0\n"
2444 "Total allocated space (uordblks): 52000\n"
2445 "Total free space (fordblks): 83168\n"
2446 "Topmost releasable block (keepcost): 31168\n"
2448 "============== After freeing blocks ==============\n"
2449 "Total non-mmapped bytes (arena): 135168\n"
2450 "# of free chunks (ordblks): 501\n"
2451 "# of free fastbin blocks (smblks): 0\n"
2452 "# of mapped regions (hblks): 0\n"
2453 "Bytes in mapped regions (hblkhd): 0\n"
2454 "Max. total allocated space (usmblks): 0\n"
2455 "Free bytes held in fastbins (fsmblks): 0\n"
2456 "Total allocated space (uordblks): 52000\n"
2457 "Total free space (fordblks): 83168\n"
2458 "Topmost releasable block (keepcost): 31168\n"
2461 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2462 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2463 #: build/C/man2/mmap.2:645 build/C/man2/mprotect.2:164
2465 msgid "Program source"
2469 #: build/C/man3/mallinfo.3:208
2472 "#include E<lt>malloc.hE<gt>\n"
2473 "#include \"tlpi_hdr.h\"\n"
2475 "#include E<lt>malloc.hE<gt>\n"
2476 "#include \"tlpi_hdr.h\"\n"
2479 #: build/C/man3/mallinfo.3:213
2483 "display_mallinfo(void)\n"
2485 " struct mallinfo mi;\n"
2488 "display_mallinfo(void)\n"
2490 " struct mallinfo mi;\n"
2493 #: build/C/man3/mallinfo.3:215
2495 msgid " mi = mallinfo();\n"
2496 msgstr " mi = mallinfo();\n"
2499 #: build/C/man3/mallinfo.3:227
2502 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
2503 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
2504 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
2505 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
2506 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
2507 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
2508 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2509 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
2510 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
2511 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
2514 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
2515 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
2516 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
2517 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
2518 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
2519 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
2520 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2521 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
2522 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
2523 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
2527 #: build/C/man3/mallinfo.3:235
2531 "main(int argc, char *argv[])\n"
2533 "#define MAX_ALLOCS 2000000\n"
2534 " char *alloc[MAX_ALLOCS];\n"
2535 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2536 " size_t blockSize;\n"
2539 "main(int argc, char *argv[])\n"
2541 "#define MAX_ALLOCS 2000000\n"
2542 " char *alloc[MAX_ALLOCS];\n"
2543 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2544 " size_t blockSize;\n"
2547 #: build/C/man3/mallinfo.3:239
2550 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2551 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2552 " \"[end-free]]]\\en\", argv[0]);\n"
2554 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2555 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2556 " \"[end-free]]]\\en\", argv[0]);\n"
2559 #: build/C/man3/mallinfo.3:245
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"
2568 " numBlocks = atoi(argv[1]);\n"
2569 " blockSize = atoi(argv[2]);\n"
2570 " freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2571 " freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2572 " freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2575 #: build/C/man3/mallinfo.3:248
2578 " printf(\"============== Before allocating blocks ==============\\en\");\n"
2579 " display_mallinfo();\n"
2581 " printf(\"============== Before allocating blocks ==============\\en\");\n"
2582 " display_mallinfo();\n"
2585 #: build/C/man3/mallinfo.3:252
2588 " for (j = 0; j E<lt> numBlocks; j++) {\n"
2589 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
2590 " fatal(\"Too many allocations\");\n"
2592 " for (j = 0; j E<lt> numBlocks; j++) {\n"
2593 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
2594 " fatal(\"Too many allocations\");\n"
2597 #: build/C/man3/mallinfo.3:257
2600 " alloc[j] = malloc(blockSize);\n"
2601 " if (alloc[j] == NULL)\n"
2602 " errExit(\"malloc\");\n"
2605 " alloc[j] = malloc(blockSize);\n"
2606 " if (alloc[j] == NULL)\n"
2607 " errExit(\"malloc\");\n"
2611 #: build/C/man3/mallinfo.3:260
2614 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2615 " display_mallinfo();\n"
2617 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2618 " display_mallinfo();\n"
2621 #: build/C/man3/mallinfo.3:263
2624 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2625 " free(alloc[j]);\n"
2627 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2628 " free(alloc[j]);\n"
2631 #: build/C/man3/mallinfo.3:266
2634 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2635 " display_mallinfo();\n"
2637 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2638 " display_mallinfo();\n"
2641 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2642 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2643 #: build/C/man2/mmap.2:714 build/C/man2/memfd_create.2:437
2644 #: build/C/man2/memfd_create.2:486
2647 " exit(EXIT_SUCCESS);\n"
2650 " exit(EXIT_SUCCESS);\n"
2654 #: build/C/man3/mallinfo.3:279
2656 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2657 "B<malloc_trim>(3), B<mallopt>(3)"
2659 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2660 "B<malloc_trim>(3), B<mallopt>(3)"
2663 #: build/C/man3/malloc_get_state.3:25
2665 msgid "MALLOC_GET_STATE"
2666 msgstr "MALLOC_GET_STATE"
2669 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2675 #: build/C/man3/malloc_get_state.3:28
2677 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2679 msgstr "malloc_get_state, malloc_set_state - malloc 実装の状態を保存/復元する"
2682 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2683 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2685 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2686 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2689 #: build/C/man3/malloc_get_state.3:33
2691 msgid "B<void* malloc_get_state(void);>\n"
2692 msgstr "B<void* malloc_get_state(void);>\n"
2695 #: build/C/man3/malloc_get_state.3:35
2697 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2698 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2701 #: build/C/man3/malloc_get_state.3:53
2703 "The B<malloc_get_state>() function records the current state of all "
2704 "B<malloc>(3) internal bookkeeping variables (but not the actual contents of "
2705 "the heap or the state of B<malloc_hook>(3) functions pointers). The state "
2706 "is recorded in a system-dependent opaque data structure dynamically "
2707 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2708 "as the function result. (It is the caller's responsibility to B<free>(3) "
2711 "B<malloc_get_state>() 関数は B<malloc>(3) 内部のすべての管理用変数を記録する "
2712 "(ただし、 ヒープの実際の内容と B<malloc_hook>(3) 関数ポインターの状態は記録さ"
2713 "れない)。 状態は B<malloc>(3) で動的に確保されたシステム依存の opaque な (内"
2714 "部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体"
2715 "へのポインターが返される (このメモリーは呼び出し元が責任をもって B<free>(3) "
2719 #: build/C/man3/malloc_get_state.3:61
2721 "The B<malloc_set_state>() function restores the state of all B<malloc>(3) "
2722 "internal bookkeeping variables to the values recorded in the opaque data "
2723 "structure pointed to by I<state>."
2725 "B<malloc_set_state>() 関数は、 B<malloc>(3) 内部のすべての管理用変数を "
2726 "I<state> が指す opaque なデータ構造体から復元する。"
2729 #: build/C/man3/malloc_get_state.3:68
2731 "On success, B<malloc_get_state>() returns a pointer to a newly allocated "
2732 "opaque data structure. On error (for example, memory could not be allocated "
2733 "for the data structure), B<malloc_get_state>() returns NULL."
2735 "成功すると、 B<malloc_get_state>() は新しく割り当てられたデータ構造体へのポイ"
2736 "ンターを返す。 エラーの場合 (例えば、データ構造体に必要なメモリーが割り当てら"
2737 "れなかったなど)、 B<malloc_get_state>() は NULL を返す。"
2739 #. if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2740 #. /* Must fail if the major version is too high. */
2741 #. if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2743 #: build/C/man3/malloc_get_state.3:86
2745 "On success, B<malloc_set_state>() returns 0. If the implementation detects "
2746 "that I<state> does not point to a correctly formed data structure, "
2747 "B<malloc_set_state>() returns -1. If the implementation detects that the "
2748 "version of the data structure referred to by I<state> is a more recent "
2749 "version than this implementation knows about, B<malloc_set_state>() returns "
2752 "成功すると、 B<malloc_set_state>() は 0 を返す。 実装が I<state> が正しく作成"
2753 "されたデータ構造体を指していないと検出した場合、 B<malloc_set_state>() は -1 "
2754 "を返す。 I<state> が参照するデータ構造体のバージョンがこの実装が認識するバー"
2755 "ジョンよりも新しいと実装が検出した場合、 B<malloc_set_state>() は -2 を返す。"
2758 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2759 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2760 msgid "These functions are GNU extensions."
2761 msgstr "これらの関数は GNU による拡張である。"
2764 #: build/C/man3/malloc_get_state.3:94
2766 "These functions are useful when using this B<malloc>(3) implementation as "
2767 "part of a shared library, and the heap contents are saved/restored via some "
2768 "other method. This technique is used by GNU Emacs to implement its \"dumping"
2771 "これらの関数が役に立つのは、 この B<malloc>(3) の実装が共有ライブラリの一部と"
2772 "して使用され、 ヒープの内容が何か他の方法で保存/復元される場合である。 この手"
2773 "法は GNU Emacs が「ダンプ」関数 (\"dumping\" function) を実装するのに使用され"
2776 #. i.e., calls __malloc_check_init()
2777 #. i.e., malloc checking is not already in use
2778 #. and the caller requested malloc checking
2780 #: build/C/man3/malloc_get_state.3:111
2782 "Hook function pointers are never saved or restored by these functions, with "
2783 "two exceptions: if malloc checking (see B<mallopt>(3)) was in use when "
2784 "B<malloc_get_state>() was called, then B<malloc_set_state>() resets malloc "
2785 "checking hooks if possible; if malloc checking was not in use in the "
2786 "recorded state, but the caller has requested malloc checking, then the hooks "
2789 "これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 "
2790 "つ例外がある。 B<malloc_get_state>() が呼び出された際に malloc チェック "
2791 "(B<mallopt>(3) 参照) が使用中の場合、 B<malloc_set_state>() は可能なら "
2792 "malloc チェックフックをリセットする。 また、 保存された状態の malloc チェック"
2793 "が使用中でないが、 呼び出し元が malloc チェックを要求していた場合、 フックは "
2797 #: build/C/man3/malloc_get_state.3:114
2798 msgid "B<malloc>(3), B<mallopt>(3)"
2799 msgstr "B<malloc>(3), B<mallopt>(3)"
2802 #: build/C/man3/malloc_hook.3:10
2805 msgstr "MALLOC_HOOK"
2808 #: build/C/man3/malloc_hook.3:10
2814 #: build/C/man3/malloc_hook.3:15
2816 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2817 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2819 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2820 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2823 #: build/C/man3/malloc_hook.3:20
2825 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2826 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2829 #: build/C/man3/malloc_hook.3:23
2831 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2832 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2835 #: build/C/man3/malloc_hook.3:26
2838 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2839 "B< const void *>I<caller>B<);>\n"
2841 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2842 "B< const void *>I<caller>B<);>\n"
2845 #: build/C/man3/malloc_hook.3:28
2847 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2848 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2851 #: build/C/man3/malloc_hook.3:30
2853 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2854 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2857 #: build/C/man3/malloc_hook.3:32
2859 msgid "B<void (*__after_morecore_hook)(void);>\n"
2860 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2863 #: build/C/man3/malloc_hook.3:43
2865 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2866 "B<realloc>(3), and B<free>(3) by specifying appropriate hook functions. "
2867 "You can use these hooks to help you debug programs that use dynamic memory "
2868 "allocation, for example."
2870 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2871 "B<malloc>(3), B<realloc>(3), B<free>(3) の動作を変更することができる。例え"
2872 "ば、動的にメモリー割り当てを行う プログラムのデバッグにこれらのフックを使うこ"
2876 #: build/C/man3/malloc_hook.3:50
2878 "The variable B<__malloc_initialize_hook> points at a function that is called "
2879 "once when the malloc implementation is initialized. This is a weak "
2880 "variable, so it can be overridden in the application with a definition like "
2883 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2884 "ばれる関数へのポインターである。 この変数は書き換え可能 (weak) であり、アプリ"
2885 "ケーション内で 以下のような定義で上書きできる:"
2888 #: build/C/man3/malloc_hook.3:53
2890 msgid " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2891 msgstr " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2894 #: build/C/man3/malloc_hook.3:58
2896 "Now the function I<my_init_hook>() can do the initialization of all hooks."
2898 "なお、関数 I<my_init_hook>() で全てのフックの初期化をすることができる。"
2901 #: build/C/man3/malloc_hook.3:74
2903 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2904 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2905 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2906 "except that they have a final argument I<caller> that gives the address of "
2907 "the caller of B<malloc>(3), etc."
2909 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2910 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2911 "B<free>(3) とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2912 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3) などの呼び"
2913 "出し元 (caller) のアドレスが格納される。"
2916 #: build/C/man3/malloc_hook.3:80
2918 "The variable B<__after_morecore_hook> points at a function that is called "
2919 "each time after B<sbrk>(2) was asked for more memory."
2921 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2) が呼ばれた"
2922 "後で毎回呼び出される関数へのポインターである。"
2924 #. https://bugzilla.redhat.com/show_bug.cgi?id=450187
2925 #. http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2927 #: build/C/man3/malloc_hook.3:89
2929 "The use of these hook functions is not safe in multithreaded programs, and "
2930 "they are now deprecated. Programmers should instead preempt calls to the "
2931 "relevant functions by defining and exporting functions such as \"malloc\" "
2934 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2935 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2936 "公開して、 関連する関数を呼び出すようにすべきである。"
2939 #: build/C/man3/malloc_hook.3:91
2940 msgid "Here is a short example of how to use these variables."
2941 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2944 #: build/C/man3/malloc_hook.3:95
2947 "#include E<lt>stdio.hE<gt>\n"
2948 "#include E<lt>malloc.hE<gt>\n"
2950 "#include E<lt>stdio.hE<gt>\n"
2951 "#include E<lt>malloc.hE<gt>\n"
2954 #: build/C/man3/malloc_hook.3:99
2957 "/* Prototypes for our hooks. */\n"
2958 "static void my_init_hook(void);\n"
2959 "static void *my_malloc_hook(size_t, const void *);\n"
2961 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2962 "static void my_init_hook(void);\n"
2963 "static void *my_malloc_hook(size_t, const void *);\n"
2966 #: build/C/man3/malloc_hook.3:102
2969 "/* Variables to save original hooks. */\n"
2970 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2972 "/* 元々のフックを保存するための変数 */\n"
2973 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2976 #: build/C/man3/malloc_hook.3:105
2979 "/* Override initializing hook from the C library. */\n"
2980 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2982 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2983 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2986 #: build/C/man3/malloc_hook.3:112
2990 "my_init_hook(void)\n"
2992 " old_malloc_hook = __malloc_hook;\n"
2993 " __malloc_hook = my_malloc_hook;\n"
2997 "my_init_hook(void)\n"
2999 " old_malloc_hook = __malloc_hook;\n"
3000 " __malloc_hook = my_malloc_hook;\n"
3004 #: build/C/man3/malloc_hook.3:117
3008 "my_malloc_hook(size_t size, const void *caller)\n"
3013 "my_malloc_hook(size_t size, const void *caller)\n"
3018 #: build/C/man3/malloc_hook.3:120
3021 " /* Restore all old hooks */\n"
3022 " __malloc_hook = old_malloc_hook;\n"
3024 " /* 元々のフックを全て戻す */\n"
3025 " __malloc_hook = old_malloc_hook;\n"
3028 #: build/C/man3/malloc_hook.3:123
3031 " /* Call recursively */\n"
3032 " result = malloc(size);\n"
3034 " /* malloc の再帰的呼び出し */\n"
3035 " result = malloc(size);\n"
3038 #: build/C/man3/malloc_hook.3:126
3041 " /* Save underlying hooks */\n"
3042 " old_malloc_hook = __malloc_hook;\n"
3044 " /* 現在設定されているフック (underlying hook) を保存する */\n"
3045 " old_malloc_hook = __malloc_hook;\n"
3048 #: build/C/man3/malloc_hook.3:130
3051 " /* printf() might call malloc(), so protect it too. */\n"
3052 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3053 " (unsigned int) size, caller, result);\n"
3055 " /* printf() は malloc() を呼び出す可能性があるので\n"
3056 " ここでもガードを行う (元々のフックのままにしておく) */\n"
3057 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3058 " (unsigned int) size, caller, result);\n"
3061 #: build/C/man3/malloc_hook.3:133
3064 " /* Restore our own hooks */\n"
3065 " __malloc_hook = my_malloc_hook;\n"
3067 " /* ユーザーが使おうとするフックを再設定する */\n"
3068 " __malloc_hook = my_malloc_hook;\n"
3071 #: build/C/man3/malloc_hook.3:136
3081 #: build/C/man3/malloc_hook.3:142
3082 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3083 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3086 #: build/C/man3/malloc_info.3:25
3089 msgstr "MALLOC_INFO"
3092 #: build/C/man3/malloc_info.3:28
3093 msgid "malloc_info - export malloc state to a stream"
3094 msgstr "malloc_info - malloc の状態をストリームに出力する"
3097 #: build/C/man3/malloc_info.3:33
3099 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3100 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3103 #: build/C/man3/malloc_info.3:44
3105 "The B<malloc_info>() function exports an XML string that describes the "
3106 "current state of the memory-allocation implementation in the caller. The "
3107 "string is printed on the file stream I<stream>. The exported string "
3108 "includes information about all arenas (see B<malloc>(3))."
3110 "B<malloc_info>() 関数は、 呼び出し元のメモリー割り当て実装の現在の状態を表す "
3111 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<stream> に出力され"
3112 "る。 出力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) "
3116 #: build/C/man3/malloc_info.3:48
3117 msgid "As currently implemented, I<options> must be zero."
3118 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3121 #: build/C/man3/malloc_info.3:55
3123 "On success, B<malloc_info>() returns 0; on error, it returns -1, with "
3124 "I<errno> set to indicate the cause."
3126 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3127 "I<errno> にエラーの原因を示す値を設定する。"
3130 #: build/C/man3/malloc_info.3:60
3131 msgid "I<options> was nonzero."
3132 msgstr "I<options> が 0 でなかった。"
3135 #: build/C/man3/malloc_info.3:63
3136 msgid "B<malloc_info>() was added to glibc in version 2.10."
3137 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3140 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3141 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3142 msgid "This function is a GNU extension."
3143 msgstr "この関数は GNU による拡張である。"
3146 #: build/C/man3/malloc_info.3:71
3148 "The memory-allocation information is provided as an XML string (rather than "
3149 "a C structure) because the information may change over time (according to "
3150 "changes in the underlying implementation). The output XML string includes a "
3153 "メモリー割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3154 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3155 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3158 #: build/C/man3/malloc_info.3:77
3160 "The B<open_memstream>(3) function can be used to send the output of "
3161 "B<malloc_info>() directly into a buffer in memory, rather than to a file."
3163 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3164 "なくメモリー内のバッファーに直接送ることができる。"
3167 #: build/C/man3/malloc_info.3:84
3169 "The B<malloc_info>() function is designed to address deficiencies in "
3170 "B<malloc_stats>(3) and B<mallinfo>(3)."
3172 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3176 #: build/C/man3/malloc_info.3:95
3178 "The program below takes up to four command-line arguments, of which the "
3179 "first three are mandatory. The first argument specifies the number of "
3180 "threads that the program should create. All of the threads, including the "
3181 "main thread, allocate the number of blocks of memory specified by the second "
3182 "argument. The third argument controls the size of the blocks to be "
3183 "allocated. The main thread creates blocks of this size, the second thread "
3184 "created by the program allocates blocks of twice this size, the third thread "
3185 "allocates blocks of three times this size, and so on."
3187 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3188 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3189 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリーブロックの割り当て"
3190 "を行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこ"
3191 "のサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこの"
3192 "サイズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイ"
3193 "ズのブロックを割り当て、 以下同様である。"
3196 #: build/C/man3/malloc_info.3:102
3198 "The program calls B<malloc_info>() twice to display the memory-allocation "
3199 "state. The first call takes place before any threads are created or memory "
3200 "allocated. The second call is performed after all threads have allocated "
3203 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリー割り当て状態を表示"
3204 "する。 最初の呼び出しはスレッドの生成もメモリーの割り当ても行われる前に実行さ"
3205 "れる。 2 回目の呼び出しは全てのスレッドがメモリー割り当てを行った後に実行され"
3209 #: build/C/man3/malloc_info.3:110
3211 "In the following example, the command-line arguments specify the creation of "
3212 "one additional thread, and both the main thread and the additional thread "
3213 "allocate 10000 blocks of memory. After the blocks of memory have been "
3214 "allocated, B<malloc_info>() shows the state of two allocation arenas."
3216 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3217 "レッドと追加のスレッドの両方が 10000 個のメモリーブロックを割り当てるように指"
3218 "定している。 メモリーブロックの割り当て後の B<malloc_info>() では、 2 つの割"
3222 #: build/C/man3/malloc_info.3:135
3225 "$ B<getconf GNU_LIBC_VERSION>\n"
3227 "$ B<./a.out 1 10000 100>\n"
3228 "============ Before allocating blocks ============\n"
3229 "E<lt>malloc version=\"1\"E<gt>\n"
3230 "E<lt>heap nr=\"0\"E<gt>\n"
3232 "E<lt>/sizesE<gt>\n"
3233 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3234 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3235 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3236 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3237 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3238 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3240 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3241 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3242 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3243 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3244 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3245 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3246 "E<lt>/mallocE<gt>\n"
3248 "$ B<getconf GNU_LIBC_VERSION>\n"
3250 "$ B<./a.out 1 10000 100>\n"
3251 "============ Before allocating blocks ============\n"
3252 "E<lt>malloc version=\"1\"E<gt>\n"
3253 "E<lt>heap nr=\"0\"E<gt>\n"
3255 "E<lt>/sizesE<gt>\n"
3256 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3257 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3258 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3259 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3260 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3261 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3263 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3264 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3265 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3266 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3267 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3268 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3269 "E<lt>/mallocE<gt>\n"
3272 #: build/C/man3/malloc_info.3:165
3275 "============ After allocating blocks ============\n"
3276 "E<lt>malloc version=\"1\"E<gt>\n"
3277 "E<lt>heap nr=\"0\"E<gt>\n"
3279 "E<lt>/sizesE<gt>\n"
3280 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3281 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3282 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3283 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3284 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3285 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3287 "E<lt>heap nr=\"1\"E<gt>\n"
3289 "E<lt>/sizesE<gt>\n"
3290 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3291 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3292 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3293 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3294 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3295 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3297 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3298 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3299 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3300 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3301 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3302 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3303 "E<lt>/mallocE<gt>\n"
3305 "============ After allocating blocks ============\n"
3306 "E<lt>malloc version=\"1\"E<gt>\n"
3307 "E<lt>heap nr=\"0\"E<gt>\n"
3309 "E<lt>/sizesE<gt>\n"
3310 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3311 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3312 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3313 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3314 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3315 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3317 "E<lt>heap nr=\"1\"E<gt>\n"
3319 "E<lt>/sizesE<gt>\n"
3320 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3321 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3322 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3323 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3324 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3325 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3327 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3328 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3329 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3330 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3331 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3332 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3333 "E<lt>/mallocE<gt>\n"
3336 #: build/C/man3/malloc_info.3:175
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"
3345 "#include E<lt>unistd.hE<gt>\n"
3346 "#include E<lt>stdlib.hE<gt>\n"
3347 "#include E<lt>pthread.hE<gt>\n"
3348 "#include E<lt>malloc.hE<gt>\n"
3349 "#include E<lt>errno.hE<gt>\n"
3352 #: build/C/man3/malloc_info.3:178
3355 "static size_t blockSize;\n"
3356 "static int numThreads, numBlocks;\n"
3358 "static size_t blockSize;\n"
3359 "static int numThreads, numBlocks;\n"
3362 #: build/C/man3/malloc_info.3:181 build/C/man2/memfd_create.2:368
3363 #: build/C/man2/memfd_create.2:450
3366 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3369 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3373 #: build/C/man3/malloc_info.3:187
3377 "thread_func(void *arg)\n"
3380 " int tn = (int) arg;\n"
3383 "thread_func(void *arg)\n"
3386 " int tn = (int) arg;\n"
3389 #: build/C/man3/malloc_info.3:190
3392 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3393 " the main thread) allocates a different amount of memory */\n"
3395 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3396 " the main thread) allocates a different amount of memory */\n"
3399 #: build/C/man3/malloc_info.3:194
3402 " for (j = 0; j E<lt> numBlocks; j++)\n"
3403 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
3404 " errExit(\"malloc-thread\");\n"
3406 " for (j = 0; j E<lt> numBlocks; j++)\n"
3407 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
3408 " errExit(\"malloc-thread\");\n"
3411 #: build/C/man3/malloc_info.3:198
3414 " sleep(100); /* Sleep until main thread terminates */\n"
3418 " sleep(100); /* Sleep until main thread terminates */\n"
3423 #: build/C/man3/malloc_info.3:204
3427 "main(int argc, char *argv[])\n"
3429 " int j, tn, sleepTime;\n"
3430 " pthread_t *thr;\n"
3433 "main(int argc, char *argv[])\n"
3435 " int j, tn, sleepTime;\n"
3436 " pthread_t *thr;\n"
3439 #: build/C/man3/malloc_info.3:211
3442 " if (argc E<lt> 4) {\n"
3443 " fprintf(stderr,\n"
3444 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3446 " exit(EXIT_FAILURE);\n"
3449 " if (argc E<lt> 4) {\n"
3450 " fprintf(stderr,\n"
3451 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3453 " exit(EXIT_FAILURE);\n"
3457 #: build/C/man3/malloc_info.3:216
3460 " numThreads = atoi(argv[1]);\n"
3461 " numBlocks = atoi(argv[2]);\n"
3462 " blockSize = atoi(argv[3]);\n"
3463 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3465 " numThreads = atoi(argv[1]);\n"
3466 " numBlocks = atoi(argv[2]);\n"
3467 " blockSize = atoi(argv[3]);\n"
3468 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3471 #: build/C/man3/malloc_info.3:220
3474 " thr = calloc(numThreads, sizeof(pthread_t));\n"
3475 " if (thr == NULL)\n"
3476 " errExit(\"calloc\");\n"
3478 " thr = calloc(numThreads, sizeof(pthread_t));\n"
3479 " if (thr == NULL)\n"
3480 " errExit(\"calloc\");\n"
3483 #: build/C/man3/malloc_info.3:223
3486 " printf(\"============ Before allocating blocks ============\\en\");\n"
3487 " malloc_info(0, stdout);\n"
3489 " printf(\"============ Before allocating blocks ============\\en\");\n"
3490 " malloc_info(0, stdout);\n"
3493 #: build/C/man3/malloc_info.3:225
3495 msgid " /* Create threads that allocate different amounts of memory */\n"
3496 msgstr " /* Create threads that allocate different amounts of memory */\n"
3499 #: build/C/man3/malloc_info.3:231
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"
3508 " for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3509 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3511 " if (errno != 0)\n"
3512 " errExit(\"pthread_create\");\n"
3515 #: build/C/man3/malloc_info.3:236
3518 " /* If we add a sleep interval after the start-up of each\n"
3519 " thread, the threads likely won\\(aqt contend for malloc\n"
3520 " mutexes, and therefore additional arenas won\\(aqt be\n"
3521 " allocated (see malloc(3)). */\n"
3523 " /* If we add a sleep interval after the start-up of each\n"
3524 " thread, the threads likely won\\(aqt contend for malloc\n"
3525 " mutexes, and therefore additional arenas won\\(aqt be\n"
3526 " allocated (see malloc(3)). */\n"
3529 #: build/C/man3/malloc_info.3:240
3532 " if (sleepTime E<gt> 0)\n"
3533 " sleep(sleepTime);\n"
3536 " if (sleepTime E<gt> 0)\n"
3537 " sleep(sleepTime);\n"
3541 #: build/C/man3/malloc_info.3:242
3543 msgid " /* The main thread also allocates some memory */\n"
3544 msgstr " /* The main thread also allocates some memory */\n"
3547 #: build/C/man3/malloc_info.3:246
3550 " for (j = 0; j E<lt> numBlocks; j++)\n"
3551 " if (malloc(blockSize) == NULL)\n"
3552 " errExit(\"malloc\");\n"
3554 " for (j = 0; j E<lt> numBlocks; j++)\n"
3555 " if (malloc(blockSize) == NULL)\n"
3556 " errExit(\"malloc\");\n"
3559 #: build/C/man3/malloc_info.3:249
3562 " sleep(2); /* Give all threads a chance to\n"
3563 " complete allocations */\n"
3565 " sleep(2); /* Give all threads a chance to\n"
3566 " complete allocations */\n"
3569 #: build/C/man3/malloc_info.3:252
3572 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
3573 " malloc_info(0, stdout);\n"
3575 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
3576 " malloc_info(0, stdout);\n"
3579 #: build/C/man3/malloc_info.3:262
3581 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3582 "B<open_memstream>(3)"
3584 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3585 "B<open_memstream>(3)"
3588 #: build/C/man3/malloc_stats.3:26
3590 msgid "MALLOC_STATS"
3591 msgstr "MALLOC_STATS"
3594 #: build/C/man3/malloc_stats.3:29
3595 msgid "malloc_stats - print memory allocation statistics"
3596 msgstr "malloc_stats - メモリー割り当ての統計を表示する"
3599 #: build/C/man3/malloc_stats.3:33
3600 msgid "B<void malloc_stats(void);>"
3601 msgstr "B<void malloc_stats(void);>"
3604 #. Available already in glibc 2.0, possibly earlier
3606 #: build/C/man3/malloc_stats.3:55
3608 "The B<malloc_stats>() function prints (on standard error) statistics about "
3609 "memory allocated by B<malloc>(3) and related functions. For each arena "
3610 "(allocation area), this function prints the total amount of memory allocated "
3611 "and the total number of bytes consumed by in-use allocations. (These two "
3612 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3613 "B<mallinfo>(3).) In addition, the function prints the sum of these two "
3614 "statistics for all arenas, and the maximum number of blocks and bytes that "
3615 "were ever simultaneously allocated using B<mmap>(2)."
3617 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3618 "リーに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3619 "て、 この関数は割り当てられているメモリーの総量と現在の割り当てが使用している"
3620 "総バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる "
3621 "I<arena> と I<uordblks> フィールドに対応している)。 また、この関数は、 すべて"
3622 "の領域のこれら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てら"
3623 "れたブロック数とバイト数の最大値を表示する。"
3626 #: build/C/man3/malloc_stats.3:61
3628 "More detailed information about memory allocations in the main arena can be "
3629 "obtained using B<mallinfo>(3)."
3631 "B<mallinfo>(3) を使用すると、 メイン領域のメモリー割り当てに関するより詳細な"
3635 #: build/C/man3/malloc_stats.3:67
3637 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3639 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3642 #: build/C/man3/malloc_trim.3:26
3645 msgstr "MALLOC_TRIM"
3648 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3654 #: build/C/man3/malloc_trim.3:29
3655 msgid "malloc_trim - release free memory from the top of the heap"
3656 msgstr "malloc_trim - ヒープの一番上から未使用メモリーを解放する"
3659 #: build/C/man3/malloc_trim.3:33
3660 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3661 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3664 #: build/C/man3/malloc_trim.3:40
3666 "The B<malloc_trim>() function attempts to release free memory at the top of "
3667 "the heap (by calling B<sbrk>(2) with a suitable argument)."
3669 "B<malloc_trim>() 関数は (適切な引き数で B<sbrk>(2) を呼び出して) ヒープの一番"
3673 #: build/C/man3/malloc_trim.3:51
3675 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3676 "the top of the heap. If this argument is 0, only the minimum amount of "
3677 "memory is maintained at the top of the heap (i.e., one page or less). A "
3678 "nonzero argument can be used to maintain some trailing space at the top of "
3679 "the heap in order to allow future allocations to be made without having to "
3680 "extend the heap with B<sbrk>(2)."
3682 "I<pad> 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定す"
3683 "る。 この引き数が 0 の場合、 ヒープの一番上の最小量のメモリーだけを維持でき"
3684 "る (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、 ヒープの一番上"
3685 "にある程度の量の未使用領域を残し、 将来の割り当てを B<sbrk>(2) でヒープを拡張"
3689 #: build/C/man3/malloc_trim.3:56
3691 "The B<malloc_trim>() function returns 1 if memory was actually released "
3692 "back to the system, or 0 if it was not possible to release any memory."
3694 "B<malloc_trim>() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を"
3695 "返し、 どのメモリーも解放できなかった場合は 0 を返す。"
3698 #. Available already in glibc 2.0, possibly earlier
3700 #: build/C/man3/malloc_trim.3:60
3701 msgid "No errors are defined."
3702 msgstr "エラーは定義されていない。"
3705 #: build/C/man3/malloc_trim.3:71
3707 "This function is automatically called by B<free>(3) in certain "
3708 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3711 "この関数は、 特定の状況では B<free>(3) により自動的に呼び出される。 "
3712 "B<mallopt>(3) の B<M_TOP_PAD> と B<M_TRIM_THRESHOLD> の議論を参照。"
3715 #: build/C/man3/malloc_trim.3:74
3717 "This function cannot release free memory located at places other than the "
3720 "この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはでき"
3723 #. malloc/malloc.c::mTRIm():
3724 #. return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3726 #: build/C/man3/malloc_trim.3:78
3727 msgid "This function releases only memory in the main arena."
3728 msgstr "この関数はメイン領域のメモリーだけを解放する。"
3731 #: build/C/man3/malloc_trim.3:82
3732 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3733 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3736 #: build/C/man3/malloc_usable_size.3:25
3738 msgid "MALLOC_USABLE_SIZE"
3739 msgstr "MALLOC_USABLE_SIZE"
3742 #: build/C/man3/malloc_usable_size.3:28
3743 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3745 "malloc_usable_size - ヒープから確保したメモリーブロックのサイズを取得する"
3748 #: build/C/man3/malloc_usable_size.3:32
3749 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3750 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3753 #: build/C/man3/malloc_usable_size.3:40
3755 "The B<malloc_usable_size>() function returns the number of usable bytes in "
3756 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3757 "B<malloc>(3) or a related function."
3759 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3760 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリーブロックへ"
3764 #: build/C/man3/malloc_usable_size.3:48
3766 "B<malloc_usable_size>() returns the number of usable bytes in the block of "
3767 "allocated memory pointed to by I<ptr>. If I<ptr> is NULL, 0 is returned."
3769 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリーブロックで使用可"
3770 "能なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3773 #: build/C/man3/malloc_usable_size.3:53
3774 msgid "The B<malloc_usable_size>() function is thread-safe."
3775 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3778 #: build/C/man3/malloc_usable_size.3:65
3780 "The value returned by B<malloc_usable_size>() may be greater than the "
3781 "requested size of the allocation because of alignment and minimum size "
3782 "constraints. Although the excess bytes can be overwritten by the "
3783 "application without ill effects, this is not good programming practice: the "
3784 "number of excess bytes in an allocation depends on the underlying "
3787 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3788 "がある。 これは、メモリーアラインメントと最小サイズの制約のためである。 この"
3789 "超過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行"
3790 "うのはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超"
3791 "過バイトの量は、内部の実装に依存する。"
3794 #: build/C/man3/malloc_usable_size.3:67
3795 msgid "The main use of this function is for debugging and introspection."
3796 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3799 #: build/C/man3/malloc_usable_size.3:69
3800 msgid "B<malloc>(3)"
3801 msgstr "B<malloc>(3)"
3804 #: build/C/man3/mallopt.3:26
3810 #: build/C/man3/mallopt.3:26 build/C/man2/shmop.2:41
3816 #: build/C/man3/mallopt.3:29
3817 msgid "mallopt - set memory allocation parameters"
3818 msgstr "mallopt - メモリー割り当てパラメーターを設定する"
3821 #: build/C/man3/mallopt.3:33
3822 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3823 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3826 #: build/C/man3/mallopt.3:44
3828 "The B<mallopt>() function adjusts parameters that control the behavior of "
3829 "the memory-allocation functions (see B<malloc>(3)). The I<param> argument "
3830 "specifies the parameter to be modified, and I<value> specifies the new value "
3831 "for that parameter."
3833 "B<mallopt>() 関数は、メモリー割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3834 "制御するパラメーターの調整を行う。\n"
3835 "I<param> 引き数で変更するパラメーターを指定し、\n"
3836 "I<value> 引き数でそのパラメーターの新しい値を指定する。"
3839 #: build/C/man3/mallopt.3:47
3840 msgid "The following values can be specified for I<param>:"
3841 msgstr "I<param> には以下の値を指定することができる。"
3844 #: build/C/man3/mallopt.3:47
3846 msgid "B<M_CHECK_ACTION>"
3847 msgstr "B<M_CHECK_ACTION>"
3850 #: build/C/man3/mallopt.3:53
3852 "Setting this parameter controls how glibc responds when various kinds of "
3853 "programming errors are detected (e.g., freeing the same pointer twice). The "
3854 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3855 "parameter determine the glibc behavior, as follows:"
3859 #: build/C/man3/mallopt.3:54
3865 #: build/C/man3/mallopt.3:64
3867 "If this bit is set, then print a one-line message on I<stderr> that provides "
3868 "details about the error. The message starts with the string \"***\\ glibc "
3869 "detected\\ ***\", followed by the program name, the name of the memory-"
3870 "allocation function in which the error was detected, a brief description of "
3871 "the error, and the memory address where the error was detected."
3875 #: build/C/man3/mallopt.3:64
3881 #: build/C/man3/mallopt.3:79
3883 "If this bit is set, then, after printing any error message specified by bit "
3884 "0, the program is terminated by calling B<abort>(3). In glibc versions "
3885 "since 2.4, if bit 0 is also set, then, between printing the error message "
3886 "and aborting, the program also prints a stack trace in the manner of "
3887 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3888 "proc/[pid]/maps> (see B<proc>(5))."
3892 #: build/C/man3/mallopt.3:79
3894 msgid "Bit 2 (since glibc 2.4)"
3895 msgstr "Bit 2 (glibc 2.4 以降)"
3898 #: build/C/man3/mallopt.3:86
3900 "This bit has an effect only if bit 0 is also set. If this bit is set, then "
3901 "the one-line message describing the error is simplified to contain just the "
3902 "name of the function where the error was detected and the brief description "
3907 #: build/C/man3/mallopt.3:91
3908 msgid "The remaining bits in I<value> are ignored."
3912 #: build/C/man3/mallopt.3:95
3914 "Combining the above details, the following numeric values are meaningful for "
3915 "B<M_CHECK_ACTION>:"
3919 #: build/C/man3/mallopt.3:96
3925 #: build/C/man3/mallopt.3:98
3926 msgid "Ignore error conditions; continue execution (with undefined results)."
3930 #: build/C/man3/mallopt.3:98
3936 #: build/C/man3/mallopt.3:100
3937 msgid "Print a detailed error message and continue execution."
3941 #: build/C/man3/mallopt.3:100
3947 #: build/C/man3/mallopt.3:102
3948 msgid "Abort the program."
3952 #: build/C/man3/mallopt.3:102
3958 #: build/C/man3/mallopt.3:105
3960 "Print detailed error message, stack trace, and memory mappings, and abort "
3965 #: build/C/man3/mallopt.3:105
3971 #: build/C/man3/mallopt.3:107
3972 msgid "Print a simple error message and continue execution."
3976 #: build/C/man3/mallopt.3:107
3982 #: build/C/man3/mallopt.3:110
3984 "Print simple error message, stack trace, and memory mappings, and abort the "
3989 #: build/C/man3/mallopt.3:116
3991 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3992 "3. In glibc version 2.3.3 and earlier, the default value is 1."
3996 #: build/C/man3/mallopt.3:121
3998 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3999 "crash may happen much later, and the true cause of the problem is then very "
4000 "hard to track down."
4004 #: build/C/man3/mallopt.3:121
4006 msgid "B<M_MMAP_MAX>"
4007 msgstr "B<M_MMAP_MAX>"
4009 #. The following text adapted from comments in the glibc source:
4011 #: build/C/man3/mallopt.3:131
4013 "This parameter specifies the maximum number of allocation requests that may "
4014 "be simultaneously serviced using B<mmap>(2). This parameter exists because "
4015 "some systems have a limited number of internal tables for use by B<mmap>(2), "
4016 "and using more than a few of them may degrade performance."
4020 #: build/C/man3/mallopt.3:138
4022 "The default value is 65,536, a value which has no special significance and "
4023 "which servers only as a safeguard. Setting this parameter to 0 disables the "
4024 "use of B<mmap>(2) for servicing large allocation requests."
4028 #: build/C/man3/mallopt.3:138
4030 msgid "B<M_MMAP_THRESHOLD>"
4031 msgstr "B<M_MMAP_THRESHOLD>"
4034 #: build/C/man3/mallopt.3:147
4036 "For allocations greater than or equal to the limit specified (in bytes) by "
4037 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
4038 "allocation functions employ B<mmap>(2) instead of increasing the program "
4039 "break using B<sbrk>(2)."
4043 #: build/C/man3/mallopt.3:167
4045 "Allocating memory using B<mmap>(2) has the significant advantage that the "
4046 "allocated memory blocks can always be independently released back to the "
4047 "system. (By contrast, the heap can be trimmed only if memory is freed at "
4048 "the top end.) On the other hand, there are some disadvantages to the use of "
4049 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
4050 "later allocations; memory may be wasted because B<mmap>(2) allocations must "
4051 "be page-aligned; and the kernel must perform the expensive task of zeroing "
4052 "out memory allocated via B<mmap>(2). Balancing these factors leads to a "
4053 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
4057 #: build/C/man3/mallopt.3:174
4059 "The lower limit for this parameter is 0. The upper limit is "
4060 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
4061 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
4065 #: build/C/man3/mallopt.3:192
4067 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default. The "
4068 "initial value of the threshold is 128*1024, but when blocks larger than the "
4069 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
4070 "are freed, the threshold is adjusted upward to the size of the freed block. "
4071 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
4072 "heap is also dynamically adjusted to be twice the dynamic mmap threshold. "
4073 "Dynamic adjustment of the mmap threshold is disabled if any of the "
4074 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
4075 "parameters is set."
4079 #: build/C/man3/mallopt.3:192
4081 msgid "B<M_MXFAST> (since glibc 2.3)"
4082 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
4084 #. The following text adapted from comments in the glibc sources:
4086 #: build/C/man3/mallopt.3:212
4088 "Set the upper limit for memory allocation requests that are satisfied using "
4089 "\"fastbins\". (The measurement unit for this parameter is bytes.) Fastbins "
4090 "are storage areas that hold deallocated blocks of memory of the same size "
4091 "without merging adjacent free blocks. Subsequent reallocation of blocks of "
4092 "the same size can be handled very quickly by allocating from the fastbin, "
4093 "although memory fragmentation and the overall memory footprint of the "
4094 "program can increase. The default value for this parameter is "
4095 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures). The range for "
4096 "this parameter is 0 to I<80*sizeof(size_t)/4>. Setting B<M_MXFAST> to 0 "
4097 "disables the use of fastbins."
4101 #: build/C/man3/mallopt.3:212
4103 msgid "B<M_PERTURB> (since glibc 2.4)"
4104 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4107 #: build/C/man3/mallopt.3:227
4109 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4110 "(other than allocations via B<calloc>(3)) are initialized to the complement "
4111 "of the value in the least significant byte of I<value>, and when allocated "
4112 "memory is released using B<free>(3), the freed bytes are set to the least "
4113 "significant byte of I<value>. This can be useful for detecting errors where "
4114 "programs incorrectly rely on allocated memory being initialized to zero, or "
4115 "reuse values in memory that has already been freed."
4119 #: build/C/man3/mallopt.3:227
4121 msgid "B<M_TOP_PAD>"
4122 msgstr "B<M_TOP_PAD>"
4125 #: build/C/man3/mallopt.3:234
4127 "This parameter defines the amount of padding to employ when calling "
4128 "B<sbrk>(2) to modify the program break. (The measurement unit for this "
4129 "parameter is bytes.) This parameter has an effect in the following "
4134 #: build/C/man3/mallopt.3:241
4136 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4137 "the B<sbrk>(2) request."
4141 #: build/C/man3/mallopt.3:247
4143 "When the heap is trimmed as a consequence of calling B<free>(3) (see the "
4144 "discussion of B<M_TRIM_THRESHOLD>) this much free space is preserved at the "
4149 #: build/C/man3/mallopt.3:251
4151 "In either case, the amount of padding is always rounded to a system page "
4156 #: build/C/man3/mallopt.3:258
4158 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4159 "system calls (when the parameter is set low) and wasting unused memory at "
4160 "the top of the heap (when the parameter is set high)."
4163 #. DEFAULT_TOP_PAD in glibc source
4165 #: build/C/man3/mallopt.3:261
4166 msgid "The default value for this parameter is 128*1024."
4170 #: build/C/man3/mallopt.3:261
4172 msgid "B<M_TRIM_THRESHOLD>"
4173 msgstr "B<M_TRIM_THRESHOLD>"
4176 #: build/C/man3/mallopt.3:277
4178 "When the amount of contiguous free memory at the top of the heap grows "
4179 "sufficiently large, B<free>(3) employs B<sbrk>(2) to release this memory "
4180 "back to the system. (This can be useful in programs that continue to "
4181 "execute for a long period after freeing a significant amount of memory.) "
4182 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4183 "this block of memory must reach before B<sbrk>(2) is used to trim the heap."
4187 #: build/C/man3/mallopt.3:282
4189 "The default value for this parameter is 128*1024. Setting "
4190 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4196 #. FIXME Do the arena parameters need to be documented?
4198 #. .BR M_ARENA_TEST " (since glibc 2.10)"
4200 #. .BR M_ARENA_MAX " (since glibc 2.10)"
4201 #. Environment variables
4202 #. MALLOC_ARENA_MAX_
4203 #. MALLOC_ARENA_TEST_
4204 #. http://udrepper.livejournal.com/20948.html describes some details
4205 #. of the MALLOC_ARENA_* environment variables.
4206 #. These macros aren't enabled in production releases until 2.15?
4207 #. (see glibc malloc/Makefile)
4209 #: build/C/man3/mallopt.3:305
4211 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4212 "of system calls (when the parameter is set low) and wasting unused memory "
4213 "at the top of the heap (when the parameter is set high)."
4217 #: build/C/man3/mallopt.3:305
4219 msgid "Environment variables"
4223 #: build/C/man3/mallopt.3:320
4225 "A number of environment variables can be defined to modify some of the same "
4226 "parameters as are controlled by B<mallopt>(). Using these variables has the "
4227 "advantage that the source code of the program need not be changed. To be "
4228 "effective, these variables must be defined before the first call to a memory-"
4229 "allocation function. (If the same parameters are adjusted via B<mallopt>(), "
4230 "then the B<mallopt>() settings take precedence.) For security reasons, "
4231 "these variables are ignored in set-user-ID and set-group-ID programs."
4235 #: build/C/man3/mallopt.3:323
4237 "The environment variables are as follows (note the trailing underscore at "
4238 "the end of the name of each variable):"
4242 #: build/C/man3/mallopt.3:323
4244 msgid "B<MALLOC_CHECK_>"
4245 msgstr "B<MALLOC_CHECK_>"
4247 #. On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4248 #. when MALLOC_CHECK_ was set.
4250 #: build/C/man3/mallopt.3:340
4252 "This environment variable controls the same parameter as B<mallopt>() "
4253 "B<M_CHECK_ACTION>. If this variable is set to a nonzero value, then a "
4254 "special implementation of the memory-allocation functions is used. (This is "
4255 "accomplished using the B<malloc_hook>(3) feature.) This implementation "
4256 "performs additional error checking, but is slower than the standard set of "
4257 "memory-allocation functions. (This implementation does not detect all "
4258 "possible errors; memory leaks can still occur.)"
4262 #: build/C/man3/mallopt.3:345
4264 "The value assigned to this environment variable should be a single digit, "
4265 "whose meaning is as described for B<M_CHECK_ACTION>. Any characters beyond "
4266 "the initial digit are ignored."
4270 #: build/C/man3/mallopt.3:354
4272 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4273 "for set-user-ID and set-group-ID programs. However, if the file I</etc/suid-"
4274 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4275 "also has an effect for set-user-ID and set-group-ID programs."
4279 #: build/C/man3/mallopt.3:354
4281 msgid "B<MALLOC_MMAP_MAX_>"
4282 msgstr "B<MALLOC_MMAP_MAX_>"
4285 #: build/C/man3/mallopt.3:359
4286 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_MAX>."
4290 #: build/C/man3/mallopt.3:359
4292 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4293 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4296 #: build/C/man3/mallopt.3:364
4297 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_THRESHOLD>."
4301 #: build/C/man3/mallopt.3:364
4303 msgid "B<MALLOC_PERTURB_>"
4304 msgstr "B<MALLOC_PERTURB_>"
4307 #: build/C/man3/mallopt.3:369
4308 msgid "Controls the same parameter as B<mallopt>() B<M_PERTURB>."
4312 #: build/C/man3/mallopt.3:369
4314 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4315 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4318 #: build/C/man3/mallopt.3:374
4319 msgid "Controls the same parameter as B<mallopt>() B<M_TRIM_THRESHOLD>."
4323 #: build/C/man3/mallopt.3:374
4325 msgid "B<MALLOC_TOP_PAD_>"
4326 msgstr "B<MALLOC_TOP_PAD_>"
4329 #: build/C/man3/mallopt.3:379
4330 msgid "Controls the same parameter as B<mallopt>() B<M_TOP_PAD>."
4334 #: build/C/man3/mallopt.3:384
4335 msgid "On success, B<mallopt>() returns 1. On error, it returns 0."
4336 msgstr "B<mallopt>() は成功すると 1 を返す。エラーの場合は 0 を返す。"
4339 #. Available already in glibc 2.0, possibly earlier
4341 #: build/C/man3/mallopt.3:392
4342 msgid "On error, I<errno> is I<not> set."
4343 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4347 #: build/C/man3/mallopt.3:406
4349 "This function is not specified by POSIX or the C standards. A similar "
4350 "function exists on many System V derivatives, but the range of values for "
4351 "I<param> varies across systems. The SVID defined options B<M_MXFAST>, "
4352 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4353 "implemented in glibc."
4357 #: build/C/man3/mallopt.3:410
4358 msgid "Specifying an invalid value for I<param> does not generate an error."
4361 #. FIXME . This looks buggy:
4362 #. setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4363 #. malloc requests are rounded up:
4364 #. (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4365 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4367 #: build/C/man3/mallopt.3:418
4369 "A calculation error within the glibc implementation means that a call of the "
4374 #: build/C/man3/mallopt.3:421
4376 msgid " mallopt(M_MXFAST, n)\n"
4377 msgstr " mallopt(M_MXFAST, n)\n"
4379 #. Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4381 #: build/C/man3/mallopt.3:433
4383 "does not result in fastbins being employed for all allocations of size up to "
4384 "I<n>. To ensure desired results, I<n> should be rounded up to the next "
4385 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4389 #. FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4391 #: build/C/man3/mallopt.3:454
4393 "If B<mallopt>() is used to set B<M_PERTURB>, then, as expected, the bytes "
4394 "of allocated memory are initialized to the complement of the byte in "
4395 "I<value>, and when that memory is freed, the bytes of the region are "
4396 "initialized to the byte specified in I<value>. However, there is an off-by-"
4397 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4398 "precisely the block of memory being freed by the call I<free(p)>, the block "
4399 "starting at I<p+sizeof(size_t)> is initialized."
4403 #: build/C/man3/mallopt.3:463
4405 "The program below demonstrates the use of B<M_CHECK_ACTION>. If the program "
4406 "is supplied with an (integer) command-line argument, then that argument is "
4407 "used to set the B<M_CHECK_ACTION> parameter. The program then allocates a "
4408 "block of memory, and frees it twice (an error)."
4412 #: build/C/man3/mallopt.3:467
4414 "The following shell session shows what happens when we run this program "
4415 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4419 #: build/C/man3/mallopt.3:487
4423 "main(): returned from first free() call\n"
4424 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4425 "======= Backtrace: =========\n"
4426 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4427 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4428 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4429 "\\&./a.out[0x80485db]\n"
4430 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4431 "\\&./a.out[0x8048471]\n"
4432 "======= Memory map: ========\n"
4433 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
4434 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
4435 "[some lines omitted]\n"
4436 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4437 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
4438 "Aborted (core dumped)\n"
4441 "main(): returned from first free() call\n"
4442 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4443 "======= Backtrace: =========\n"
4444 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4445 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4446 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4447 "\\&./a.out[0x80485db]\n"
4448 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4449 "\\&./a.out[0x8048471]\n"
4450 "======= Memory map: ========\n"
4451 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
4452 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
4453 "[some lines omitted]\n"
4454 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4455 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
4456 "Aborted (core dumped)\n"
4459 #: build/C/man3/mallopt.3:492
4461 "The following runs show the results when employing other values for "
4462 "B<M_CHECK_ACTION>:"
4466 #: build/C/man3/mallopt.3:505
4469 "$ B<./a.out 1> # Diagnose error and continue\n"
4470 "main(): returned from first free() call\n"
4471 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4472 "main(): returned from second free() call\n"
4473 "$ B<./a.out 2> # Abort without error message\n"
4474 "main(): returned from first free() call\n"
4475 "Aborted (core dumped)\n"
4476 "$ B<./a.out 0> # Ignore error and continue\n"
4477 "main(): returned from first free() call\n"
4478 "main(): returned from second free() call\n"
4480 "$ B<./a.out 1> # Diagnose error and continue\n"
4481 "main(): returned from first free() call\n"
4482 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4483 "main(): returned from second free() call\n"
4484 "$ B<./a.out 2> # Abort without error message\n"
4485 "main(): returned from first free() call\n"
4486 "Aborted (core dumped)\n"
4487 "$ B<./a.out 0> # Ignore error and continue\n"
4488 "main(): returned from first free() call\n"
4489 "main(): returned from second free() call\n"
4492 #: build/C/man3/mallopt.3:511
4494 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4495 "environment variable:"
4499 #: build/C/man3/mallopt.3:518
4502 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4503 "main(): returned from first free() call\n"
4504 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4505 "main(): returned from second free() call\n"
4507 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4508 "main(): returned from first free() call\n"
4509 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4510 "main(): returned from second free() call\n"
4513 #: build/C/man3/mallopt.3:526
4516 "#include E<lt>malloc.hE<gt>\n"
4517 "#include E<lt>stdio.hE<gt>\n"
4518 "#include E<lt>stdlib.hE<gt>\n"
4520 "#include E<lt>malloc.hE<gt>\n"
4521 "#include E<lt>stdio.hE<gt>\n"
4522 "#include E<lt>stdlib.hE<gt>\n"
4525 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4529 "main(int argc, char *argv[])\n"
4534 "main(int argc, char *argv[])\n"
4539 #: build/C/man3/mallopt.3:538
4542 " if (argc E<gt> 1) {\n"
4543 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4544 " fprintf(stderr, \"mallopt() failed\");\n"
4545 " exit(EXIT_FAILURE);\n"
4549 " if (argc E<gt> 1) {\n"
4550 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4551 " fprintf(stderr, \"mallopt() failed\");\n"
4552 " exit(EXIT_FAILURE);\n"
4557 #: build/C/man3/mallopt.3:544
4560 " p = malloc(1000);\n"
4561 " if (p == NULL) {\n"
4562 " fprintf(stderr, \"malloc() failed\");\n"
4563 " exit(EXIT_FAILURE);\n"
4566 " p = malloc(1000);\n"
4567 " if (p == NULL) {\n"
4568 " fprintf(stderr, \"malloc() failed\");\n"
4569 " exit(EXIT_FAILURE);\n"
4573 #: build/C/man3/mallopt.3:547
4577 " printf(\"main(): returned from first free() call\\en\");\n"
4580 " printf(\"main(): returned from first free() call\\en\");\n"
4583 #: build/C/man3/mallopt.3:550
4587 " printf(\"main(): returned from second free() call\\en\");\n"
4590 " printf(\"main(): returned from second free() call\\en\");\n"
4593 #: build/C/man3/mallopt.3:568
4595 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4596 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4597 "B<mtrace>(3), B<posix_memalign>(3)"
4599 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4600 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4601 "B<mtrace>(3), B<posix_memalign>(3)"
4604 #: build/C/man3/mcheck.3:25
4610 #: build/C/man3/mcheck.3:25
4616 #: build/C/man3/mcheck.3:28
4618 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4622 #: build/C/man3/mcheck.3:31
4624 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4625 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4628 #: build/C/man3/mcheck.3:33
4630 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4634 #: build/C/man3/mcheck.3:35
4636 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4640 #: build/C/man3/mcheck.3:37
4642 msgid "B<void mcheck_check_all(void);>\n"
4643 msgstr "B<void mcheck_check_all(void);>\n"
4646 #: build/C/man3/mcheck.3:39
4648 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4649 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4652 #: build/C/man3/mcheck.3:51
4654 "The B<mcheck>() function installs a set of debugging hooks for the "
4655 "B<malloc>(3) family of memory-allocation functions. These hooks cause "
4656 "certain consistency checks to be performed on the state of the heap. The "
4657 "checks can detect application errors such as freeing a block of memory more "
4658 "than once or corrupting the bookkeeping data structures that immediately "
4659 "precede a block of allocated memory."
4663 #: build/C/man3/mcheck.3:63
4665 "To be effective, the B<mcheck>() function must be called before the first "
4666 "call to B<malloc>(3) or a related function. In cases where this is "
4667 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4668 "implicit call to B<mcheck>() (with a NULL argument) before the first call "
4669 "to a memory-allocation function."
4673 #: build/C/man3/mcheck.3:71
4675 "The B<mcheck_pedantic>() function is similar to B<mcheck>(), but performs "
4676 "checks on all allocated blocks whenever one of the memory-allocation "
4677 "functions is called. This can be very slow!"
4681 #: build/C/man3/mcheck.3:78
4683 "The B<mcheck_check_all>() function causes an immediate check on all "
4684 "allocated blocks. This call is effective only if B<mcheck>() is called "
4689 #: build/C/man3/mcheck.3:91
4691 "If the system detects an inconsistency in the heap, the caller-supplied "
4692 "function pointed to by I<abortfunc> is invoked with a single argument "
4693 "argument, I<mstatus>, that indicates what type of inconsistency was "
4694 "detected. If I<abortfunc> is NULL, a default function prints an error "
4695 "message on I<stderr> and calls B<abort>(3)."
4699 #: build/C/man3/mcheck.3:103
4701 "The B<mprobe>() function performs a consistency check on the block of "
4702 "allocated memory pointed to by I<ptr>. The B<mcheck>() function should be "
4703 "called beforehand (otherwise B<mprobe>() returns B<MCHECK_DISABLED>)."
4707 #: build/C/man3/mcheck.3:111
4709 "The following list describes the values returned by B<mprobe>() or passed "
4710 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4714 #: build/C/man3/mcheck.3:111
4716 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4720 #: build/C/man3/mcheck.3:116
4722 "B<mcheck>() was not called before the first memory allocation function was "
4723 "called. Consistency checking is not possible."
4727 #: build/C/man3/mcheck.3:116
4729 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4733 #: build/C/man3/mcheck.3:119
4734 msgid "No inconsistency detected."
4738 #: build/C/man3/mcheck.3:119
4740 msgid "B<MCHECK_HEAD>"
4741 msgstr "B<MCHECK_HEAD>"
4744 #: build/C/man3/mcheck.3:122
4745 msgid "Memory preceding an allocated block was clobbered."
4749 #: build/C/man3/mcheck.3:122
4751 msgid "B<MCHECK_TAIL>"
4752 msgstr "B<MCHECK_TAIL>"
4755 #: build/C/man3/mcheck.3:125
4756 msgid "Memory following an allocated block was clobbered."
4760 #: build/C/man3/mcheck.3:125
4762 msgid "B<MCHECK_FREE>"
4763 msgstr "B<MCHECK_FREE>"
4766 #: build/C/man3/mcheck.3:129
4767 msgid "A block of memory was freed twice."
4771 #: build/C/man3/mcheck.3:134
4773 "B<mcheck>() and B<mcheck_pedantic>() return 0 on success, or -1 on error."
4777 #: build/C/man3/mcheck.3:145
4779 "The B<mcheck_pedantic>() and B<mcheck_check_all>() functions are available "
4780 "since glibc 2.2. The B<mcheck>() and B<mprobe>() functions are present "
4781 "since at least glibc 2.0"
4784 #. But is MALLOC_CHECK_ slower?
4786 #: build/C/man3/mcheck.3:159
4788 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4789 "environment variable (described in B<mallopt>(3)) cause the same kinds of "
4790 "errors to be detected. But, using B<MALLOC_CHECK_> does not require the "
4791 "application to be relinked."
4795 #: build/C/man3/mcheck.3:165
4797 "The program below calls B<mcheck>() with a NULL argument and then frees the "
4798 "same block of memory twice. The following shell session demonstrates what "
4799 "happens when running the program:"
4803 #: build/C/man3/mcheck.3:170
4811 #: build/C/man3/mcheck.3:174
4814 "About to free a second time\n"
4815 "block freed twice\n"
4816 "Aborted (core dumped)\n"
4820 #: build/C/man3/mcheck.3:182
4823 "#include E<lt>stdlib.hE<gt>\n"
4824 "#include E<lt>stdio.hE<gt>\n"
4825 "#include E<lt>mcheck.hE<gt>\n"
4827 "#include E<lt>stdlib.hE<gt>\n"
4828 "#include E<lt>stdio.hE<gt>\n"
4829 "#include E<lt>mcheck.hE<gt>\n"
4832 #: build/C/man3/mcheck.3:190
4835 " if (mcheck(NULL) != 0) {\n"
4836 " fprintf(stderr, \"mcheck() failed\\en\");\n"
4840 #: build/C/man3/mcheck.3:193
4843 " exit(EXIT_FAILURE);\n"
4846 " exit(EXIT_FAILURE);\n"
4850 #: build/C/man3/mcheck.3:195
4852 msgid " p = malloc(1000);\n"
4853 msgstr " p = malloc(1000);\n"
4856 #: build/C/man3/mcheck.3:200
4859 " fprintf(stderr, \"About to free\\en\");\n"
4861 " fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4866 #: build/C/man3/mcheck.3:208
4867 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4868 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4871 #: build/C/man2/mlock.2:26
4877 #: build/C/man2/mlock.2:26
4883 #: build/C/man2/mlock.2:29
4884 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4885 msgstr "mlock - メモリーのロックとロック解除を行う"
4888 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4889 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4891 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4892 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4895 #: build/C/man2/mlock.2:35
4898 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4899 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4901 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4902 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4905 #: build/C/man2/mlock.2:38
4908 "B<int mlockall(int >I<flags>B<);>\n"
4909 "B<int munlockall(void);>\n"
4911 "B<int mlockall(int >I<flags>B<);>\n"
4912 "B<int munlockall(void);>\n"
4915 #: build/C/man2/mlock.2:54
4917 "B<mlock>() and B<mlockall>() respectively lock part or all of the calling "
4918 "process's virtual address space into RAM, preventing that memory from being "
4919 "paged to the swap area. B<munlock>() and B<munlockall>() perform the "
4920 "converse operation, respectively unlocking part or all of the calling "
4921 "process's virtual address space, so that pages in the specified virtual "
4922 "address range may once more to be swapped out if required by the kernel "
4923 "memory manager. Memory locking and unlocking are performed in units of "
4926 "B<mlock>() と B<mlockall>() はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4927 "間の一部または全部を RAM 上にロックし、メモリーがスワップエリアにページングさ"
4928 "れるのを防ぐ。 B<munlock>() と B<munlockall>() は逆の操作で、それぞれ呼び出"
4929 "し元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定"
4930 "された仮想アドレス範囲のページは カーネルメモリーマネージャーから要求されれば"
4931 "スワップアウトするようになる。 メモリーのロックとロック解除はページ単位で行わ"
4935 #: build/C/man2/mlock.2:54
4937 msgid "mlock() and munlock()"
4938 msgstr "mlock() と munlock()"
4941 #: build/C/man2/mlock.2:64
4943 "B<mlock>() locks pages in the address range starting at I<addr> and "
4944 "continuing for I<len> bytes. All pages that contain a part of the specified "
4945 "address range are guaranteed to be resident in RAM when the call returns "
4946 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4948 "B<mlock>() は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4949 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4950 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4951 "れるまで RAM に残り続けることが保証される。"
4954 #: build/C/man2/mlock.2:73
4956 "B<munlock>() unlocks pages in the address range starting at I<addr> and "
4957 "continuing for I<len> bytes. After this call, all pages that contain a part "
4958 "of the specified memory range can be moved to external swap space again by "
4961 "B<munlock>() は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4962 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリー"
4963 "範囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4966 #: build/C/man2/mlock.2:73
4968 msgid "mlockall() and munlockall()"
4969 msgstr "mlockall() と munlockall()"
4972 #: build/C/man2/mlock.2:83
4974 "B<mlockall>() locks all pages mapped into the address space of the calling "
4975 "process. This includes the pages of the code, data and stack segment, as "
4976 "well as shared libraries, user space kernel data, shared memory, and memory-"
4977 "mapped files. All mapped pages are guaranteed to be resident in RAM when "
4978 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4981 "B<mlockall>() は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4982 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4983 "ラリ、カーネルのユーザー空間データ、 共有メモリー、メモリーマップされたファイ"
4984 "ルが含まれる。 システムコールが成功した場合には全てのマップされたページは "
4985 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4989 #: build/C/man2/mlock.2:88
4991 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4992 "following constants:"
4993 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4996 #: build/C/man2/mlock.2:88
4998 msgid "B<MCL_CURRENT>"
4999 msgstr "B<MCL_CURRENT>"
5002 #: build/C/man2/mlock.2:92
5004 "Lock all pages which are currently mapped into the address space of the "
5007 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
5010 #: build/C/man2/mlock.2:92
5012 msgid "B<MCL_FUTURE>"
5013 msgstr "B<MCL_FUTURE>"
5016 #: build/C/man2/mlock.2:99
5018 "Lock all pages which will become mapped into the address space of the "
5019 "process in the future. These could be for instance new pages required by a "
5020 "growing heap and stack as well as new memory-mapped files or shared memory "
5023 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
5024 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
5025 "くメモリーマップされたファイルや共有メモリー領域もロックされる。"
5028 #: build/C/man2/mlock.2:112
5030 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
5031 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
5032 "of locked bytes to exceed the permitted maximum (see below). In the same "
5033 "circumstances, stack growth may likewise fail: the kernel will deny stack "
5034 "expansion and deliver a B<SIGSEGV> signal to the process."
5036 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
5037 "B<sbrk>(2), B<malloc>(3)) は、ロックするバイト数が許可された最大値 (下記参"
5038 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
5039 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
5043 #: build/C/man2/mlock.2:116
5045 "B<munlockall>() unlocks all pages mapped into the address space of the "
5048 "B<munlockall>() は、呼び出し元プロセスのアドレス空間にマッピングされている "
5052 #: build/C/man2/mlock.2:122
5054 "On success these system calls return 0. On error, -1 is returned, I<errno> "
5055 "is set appropriately, and no changes are made to any locks in the address "
5056 "space of the process."
5058 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
5059 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
5063 #: build/C/man2/mlock.2:131
5065 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
5066 "resource limit, but tried to lock more memory than the limit permitted. "
5067 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
5069 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
5070 "つが、制限が許可している以上のメモリーをロックしようとした。 この制限は、プロ"
5071 "セスが特権 (B<CAP_IPC_LOCK>) を持っている場合は適用されない。"
5073 #. In the case of mlock(), this check is somewhat buggy: it doesn't
5074 #. take into account whether the to-be-locked range overlaps with
5075 #. already locked pages. Thus, suppose we allocate
5076 #. (num_physpages / 4 + 1) of memory, and lock those pages once using
5077 #. mlock(), and then lock the *same* page range a second time.
5078 #. In the case, the second mlock() call will fail, since the check
5079 #. calculates that the process is trying to lock (num_physpages / 2 + 2)
5080 #. pages, which of course is not true. (MTK, Nov 04, kernel 2.4.28)
5082 #: build/C/man2/mlock.2:143
5084 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
5087 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
5089 #. SVr4 documents an additional EAGAIN error code.
5091 #: build/C/man2/mlock.2:149
5093 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>) to "
5094 "perform the requested operation."
5096 "呼び出し側が特権を持っていないが、\n"
5097 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5100 #: build/C/man2/mlock.2:154
5101 msgid "For B<mlock>() and B<munlock>():"
5102 msgstr "B<mlock>() と B<munlock>() 用として:"
5105 #: build/C/man2/mlock.2:157
5106 msgid "Some or all of the specified address range could not be locked."
5107 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5110 #: build/C/man2/mlock.2:164
5112 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5113 "addition may have resulted in an overflow)."
5115 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5116 "(例えば、加算でオーバーフローが発生したなど)。"
5119 #: build/C/man2/mlock.2:169
5120 msgid "(Not on Linux) I<addr> was not a multiple of the page size."
5122 "(Linux ではこの意味で使われない) I<addr> がページサイズの倍数ではない。"
5125 #: build/C/man2/mlock.2:173
5127 "Some of the specified address range does not correspond to mapped pages in "
5128 "the address space of the process."
5130 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5134 #: build/C/man2/mlock.2:176
5135 msgid "For B<mlockall>():"
5136 msgstr "B<mlockall>() 用として:"
5139 #: build/C/man2/mlock.2:179
5140 msgid "Unknown I<flags> were specified."
5141 msgstr "未知の I<flags> が指定された。"
5144 #: build/C/man2/mlock.2:182
5145 msgid "For B<munlockall>():"
5146 msgstr "B<munlockall>() 用として:"
5149 #: build/C/man2/mlock.2:186
5151 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5153 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>) を持っていない。"
5156 #: build/C/man2/mlock.2:188
5157 msgid "POSIX.1-2001, SVr4."
5158 msgstr "POSIX.1-2001, SVr4."
5161 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:503 build/C/man2/msync.2:105
5163 msgid "AVAILABILITY"
5167 #: build/C/man2/mlock.2:200
5169 "On POSIX systems on which B<mlock>() and B<munlock>() are available, "
5170 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5171 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5172 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5174 "B<mlock>() と B<munlock>() が使用可能な POSIX システムでは "
5175 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5176 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5177 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5180 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5181 #. -1: unavailable, 0: ask using sysconf().
5182 #. glibc defines it to 1.
5184 #: build/C/man2/mlock.2:213
5186 "On POSIX systems on which B<mlockall>() and B<munlockall>() are available, "
5187 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5188 "than 0. (See also B<sysconf>(3).)"
5190 "B<mlockall>() と B<munlockall>() が利用可能な POSIX システムでは、 "
5191 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5192 "(B<sysconf>(3) も参照のこと)。"
5195 #: build/C/man2/mlock.2:231
5197 "Memory locking has two main applications: real-time algorithms and high-"
5198 "security data processing. Real-time applications require deterministic "
5199 "timing, and, like scheduling, paging is one major cause of unexpected "
5200 "program execution delays. Real-time applications will usually also switch "
5201 "to a real-time scheduler with B<sched_setscheduler>(2). Cryptographic "
5202 "security software often handles critical bytes like passwords or secret keys "
5203 "as data structures. As a result of paging, these secrets could be "
5204 "transferred onto a persistent swap store medium, where they might be "
5205 "accessible to the enemy long after the security software has erased the "
5206 "secrets in RAM and terminated. (But be aware that the suspend mode on "
5207 "laptops and some desktop computers will save a copy of the system's RAM to "
5208 "disk, regardless of memory locks.)"
5210 "メモリーのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5211 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5212 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5213 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5214 "いは B<sched_setscheduler>(2) でリアルタイムスケジューラに変更される。 暗号"
5215 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5216 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5217 "されるかもしれない。そして、セキュリティ ソフトウェアが RAM 上の秘密を削除し"
5218 "て終了したずっと後になっても、 このスワップされたデータには敵がアクセスできる"
5219 "可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サス"
5220 "ペンドモードはシステムの RAM の内容をメモリーのロックに関わらず ディスクに保"
5224 #: build/C/man2/mlock.2:244
5226 "Real-time processes that are using B<mlockall>() to prevent delays on page "
5227 "faults should reserve enough locked stack pages before entering the time-"
5228 "critical section, so that no page fault can be caused by function calls. "
5229 "This can be achieved by calling a function that allocates a sufficiently "
5230 "large automatic variable (an array) and writes to the memory occupied by "
5231 "this array in order to touch these stack pages. This way, enough pages will "
5232 "be mapped for the stack and can be locked into RAM. The dummy writes ensure "
5233 "that not even copy-on-write page faults can occur in the critical section."
5235 "リアルタイムプロセスが B<mlockall>() を使ってページフォールトによる遅延を防"
5236 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5237 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5238 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5239 "数 (の配列) を確保し、 これらのスタック用のページがメモリー上に確保されるよう"
5240 "にこの配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5241 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5242 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5243 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5246 #: build/C/man2/mlock.2:257
5248 "Memory locks are not inherited by a child created via B<fork>(2) and are "
5249 "automatically removed (unlocked) during an B<execve>(2) or when the process "
5250 "terminates. The B<mlockall>() B<MCL_FUTURE> setting is not inherited by a "
5251 "child created via B<fork>(2) and is cleared during an B<execve>(2)."
5253 "メモリーロックは B<fork>(2) で作成された子プロセスには継承されず、 "
5254 "B<execve>(2) が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5255 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5256 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5259 #: build/C/man2/mlock.2:261
5261 "The memory lock on an address range is automatically removed if the address "
5262 "range is unmapped via B<munmap>(2)."
5264 "あるアドレス範囲に対するメモリーロックは、そのアドレス範囲が B<munmap>(2) に"
5265 "よってアンマップされた場合は削除される。"
5268 #: build/C/man2/mlock.2:274
5270 "Memory locks do not stack, that is, pages which have been locked several "
5271 "times by calls to B<mlock>() or B<mlockall>() will be unlocked by a single "
5272 "call to B<munlock>() for the corresponding range or by B<munlockall>(). "
5273 "Pages which are mapped to several locations or by several processes stay "
5274 "locked into RAM as long as they are locked at least at one location or by at "
5275 "least one process."
5277 "メモリーのロックは累積しない。 すなわち複数回 B<mlock>() や B<mlockall>() "
5278 "を呼び出してロックされたページでも、 対応する範囲に対して B<munlock>() を 1 "
5279 "回呼び出したり B<munlockall>() を呼び出したりするだけでロック解除される。 複"
5280 "数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一"
5281 "つのプロセスでロックされている限りは RAM に残り続ける。"
5284 #: build/C/man2/mlock.2:285
5286 "Under Linux, B<mlock>() and B<munlock>() automatically round I<addr> down "
5287 "to the nearest page boundary. However, POSIX.1-2001 allows an "
5288 "implementation to require that I<addr> is page aligned, so portable "
5289 "applications should ensure this."
5291 "Linux では、 B<mlock>() と B<munlock>() は自動的に I<addr> を端数切り捨てに"
5292 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5293 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5294 "ケーションではきちんと境界に合わせた方が良い。"
5297 #: build/C/man2/mlock.2:298
5299 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5300 "many kilobytes of memory the process with ID I<PID> has locked using "
5301 "B<mlock>(), B<mlockall>(), and B<mmap>(2) B<MAP_LOCKED>."
5303 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5304 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5305 "ID が I<PID> のプロセスがロックしているメモリー量 (キロバイト単位) が\n"
5309 #: build/C/man2/mlock.2:298
5311 msgid "Limits and permissions"
5315 #: build/C/man2/mlock.2:305
5317 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>) "
5318 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5319 "defines a limit on how much memory the process may lock."
5321 "Linux 2.6.8 以前では、メモリーをロックするためには特権 (B<CAP_IPC_LOCK>) が"
5322 "必要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリーを"
5326 #: build/C/man2/mlock.2:311
5328 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5329 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5330 "instead defines a limit on how much memory an unprivileged process may lock."
5332 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリー量は無制限とな"
5333 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5334 "クできるメモリー量の制限を定義する。"
5337 #: build/C/man2/mlock.2:319
5339 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5340 "B<mlockall>() B<MCL_FUTURE> flag to be inherited across a B<fork>(2). This "
5341 "was rectified in kernel 2.4.18."
5343 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>() "
5344 "B<MCL_FUTURE> フラグが B<fork>(2) で継承されると言うバグがある。 これはカー"
5347 #. See the following LKML thread:
5348 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5349 #. "Rationale for RLIMIT_MEMLOCK"
5352 #: build/C/man2/mlock.2:336
5354 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5355 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5356 "example, setting its effective UID to a nonzero value), then subsequent "
5357 "memory allocations (e.g., B<mmap>(2), B<brk>(2)) will fail if the "
5358 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5360 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5361 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5362 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5363 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリー割り当て (例えば B<mmap>(2), "
5367 #: build/C/man2/mlock.2:343
5369 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5370 "B<capabilities>(7)"
5372 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5373 "B<capabilities>(7)"
5376 #: build/C/man2/mmap.2:40
5382 #: build/C/man2/mmap.2:43
5383 msgid "mmap, munmap - map or unmap files or devices into memory"
5384 msgstr "mmap, munmap - ファイルやデバイスをメモリーにマップ/アンマップする"
5387 #: build/C/man2/mmap.2:51
5390 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5391 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
5392 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5394 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5395 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
5396 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5399 #: build/C/man2/mmap.2:54
5400 msgid "See NOTES for information on feature test macro requirements."
5401 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5404 #: build/C/man2/mmap.2:63
5406 "B<mmap>() creates a new mapping in the virtual address space of the calling "
5407 "process. The starting address for the new mapping is specified in I<addr>. "
5408 "The I<length> argument specifies the length of the mapping."
5410 "B<mmap>() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5411 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5412 "は I<length> 引き数で指定される。"
5414 #. Before Linux 2.6.24, the address was rounded up to the next page
5415 #. boundary; since 2.6.24, it is rounded down!
5417 #: build/C/man2/mmap.2:77
5419 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5420 "the mapping; this is the most portable method of creating a new mapping. If "
5421 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5422 "the mapping; on Linux, the mapping will be created at a nearby page "
5423 "boundary. The address of the new mapping is returned as the result of the "
5426 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5427 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5428 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5429 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5430 "ングのアドレスは、呼び出しの返り値として返される。"
5433 #: build/C/man2/mmap.2:89
5435 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5436 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5437 "offset I<offset> in the file (or other object) referred to by the file "
5438 "descriptor I<fd>. I<offset> must be a multiple of the page size as returned "
5439 "by I<sysconf(_SC_PAGE_SIZE)>."
5441 "ファイルマッピングの内容は、 ファイルディスクリプター I<fd> で参照されるファ"
5442 "イル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5443 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5444 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5445 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5448 #: build/C/man2/mmap.2:97
5450 "The I<prot> argument describes the desired memory protection of the mapping "
5451 "(and must not conflict with the open mode of the file). It is either "
5452 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5454 "引き数 I<prot> には、マッピングのメモリー保護をどのように行なうかを指定する "
5455 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5456 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5459 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5461 msgid "B<PROT_EXEC>"
5462 msgstr "B<PROT_EXEC>"
5465 #: build/C/man2/mmap.2:100
5466 msgid "Pages may be executed."
5467 msgstr "ページは実行可能である。"
5470 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5472 msgid "B<PROT_READ>"
5473 msgstr "B<PROT_READ>"
5476 #: build/C/man2/mmap.2:103
5477 msgid "Pages may be read."
5478 msgstr "ページは読み込み可能である。"
5481 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5483 msgid "B<PROT_WRITE>"
5484 msgstr "B<PROT_WRITE>"
5487 #: build/C/man2/mmap.2:106
5488 msgid "Pages may be written."
5489 msgstr "ページに書き込み可能である。"
5492 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5494 msgid "B<PROT_NONE>"
5495 msgstr "B<PROT_NONE>"
5498 #: build/C/man2/mmap.2:109
5499 msgid "Pages may not be accessed."
5500 msgstr "ページにはアクセスできない。"
5503 #: build/C/man2/mmap.2:118
5505 "The I<flags> argument determines whether updates to the mapping are visible "
5506 "to other processes mapping the same region, and whether updates are carried "
5507 "through to the underlying file. This behavior is determined by including "
5508 "exactly one of the following values in I<flags>:"
5510 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5511 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5512 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5513 "I<flags> に含めることで指定する。"
5516 #: build/C/man2/mmap.2:118
5518 msgid "B<MAP_SHARED>"
5519 msgstr "B<MAP_SHARED>"
5522 #: build/C/man2/mmap.2:128
5524 "Share this mapping. Updates to the mapping are visible to other processes "
5525 "that map this file, and are carried through to the underlying file. The "
5526 "file may not actually be updated until B<msync>(2) or B<munmap>() is "
5529 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5530 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5531 "る。 ただし、ファイルの実際の更新は B<msync>(2) または B<munmap>() が呼ばれ"
5535 #: build/C/man2/mmap.2:128
5537 msgid "B<MAP_PRIVATE>"
5538 msgstr "B<MAP_PRIVATE>"
5541 #: build/C/man2/mmap.2:137
5543 "Create a private copy-on-write mapping. Updates to the mapping are not "
5544 "visible to other processes mapping the same file, and are not carried "
5545 "through to the underlying file. It is unspecified whether changes made to "
5546 "the file after the B<mmap>() call are visible in the mapped region."
5548 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5549 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5550 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>() の呼び出し後"
5551 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5555 #: build/C/man2/mmap.2:139
5556 msgid "Both of these flags are described in POSIX.1-2001."
5557 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5560 #: build/C/man2/mmap.2:142
5562 "In addition, zero or more of the following values can be ORed in I<flags>:"
5564 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5568 #: build/C/man2/mmap.2:142
5570 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5571 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5573 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5575 #: build/C/man2/mmap.2:158
5577 "Put the mapping into the first 2 Gigabytes of the process address space. "
5578 "This flag is supported only on x86-64, for 64-bit programs. It was added to "
5579 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5580 "as to improve context-switch performance on some early 64-bit processors. "
5581 "Modern x86-64 processors no longer have this performance problem, so use of "
5582 "this flag is not required on those systems. The B<MAP_32BIT> flag is "
5583 "ignored when B<MAP_FIXED> is set."
5585 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5586 "ラグがサポートされているのは x86-64 アーキテクチャー上の 64 ビットプログラム"
5587 "のみである。 このフラグが追加されたのは、スレッドのスタックをメモリーの先頭 "
5588 "2GB 以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにお"
5589 "ける コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5590 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5591 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5595 #: build/C/man2/mmap.2:158
5598 msgstr "B<MAP_ANON>"
5601 #: build/C/man2/mmap.2:163
5602 msgid "Synonym for B<MAP_ANONYMOUS>. Deprecated."
5603 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5606 #: build/C/man2/mmap.2:163
5608 msgid "B<MAP_ANONYMOUS>"
5609 msgstr "B<MAP_ANONYMOUS>"
5612 #: build/C/man2/mmap.2:185
5614 "The mapping is not backed by any file; its contents are initialized to "
5615 "zero. The I<fd> and I<offset> arguments are ignored; however, some "
5616 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>) "
5617 "is specified, and portable applications should ensure this. The use of "
5618 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5619 "only since kernel 2.4."
5621 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5622 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5623 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>) が指定された場合、 I<fd> を -1 にす"
5624 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5625 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5626 "以降の Linux でのみサポートされている。"
5629 #: build/C/man2/mmap.2:185
5631 msgid "B<MAP_DENYWRITE>"
5632 msgstr "B<MAP_DENYWRITE>"
5634 #. Introduced in 1.1.36, removed in 1.3.24.
5636 #: build/C/man2/mmap.2:193
5638 "This flag is ignored. (Long ago, it signaled that attempts to write to the "
5639 "underlying file should fail with B<ETXTBUSY>. But this was a source of "
5640 "denial-of-service attacks.)"
5642 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5643 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5644 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5647 #: build/C/man2/mmap.2:193
5649 msgid "B<MAP_EXECUTABLE>"
5650 msgstr "B<MAP_EXECUTABLE>"
5652 #. Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5653 #. (Long ago, it signaled that the underlying file is an executable.
5654 #. However, that information was not really used anywhere.)
5655 #. Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5658 #: build/C/man2/mmap.2:201
5659 msgid "This flag is ignored."
5660 msgstr "このフラグは無視される。"
5663 #: build/C/man2/mmap.2:201
5666 msgstr "B<MAP_FILE>"
5668 #. On some systems, this was required as the opposite of
5669 #. MAP_ANONYMOUS -- mtk, 1 May 2007
5671 #: build/C/man2/mmap.2:207
5672 msgid "Compatibility flag. Ignored."
5673 msgstr "互換性のためのフラグ。無視される。"
5676 #: build/C/man2/mmap.2:207
5678 msgid "B<MAP_FIXED>"
5679 msgstr "B<MAP_FIXED>"
5682 #: build/C/man2/mmap.2:225
5684 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5685 "address. I<addr> must be a multiple of the page size. If the memory region "
5686 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5687 "then the overlapped part of the existing mapping(s) will be discarded. If "
5688 "the specified address cannot be used, B<mmap>() will fail. Because "
5689 "requiring a fixed address for a mapping is less portable, the use of this "
5690 "option is discouraged."
5692 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5693 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5694 "ければならない。 I<addr> と I<len> で指定されたメモリー領域が既存のマッピング"
5695 "のページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定"
5696 "されたアドレスが使用できない場合、 B<mmap>() は失敗する。 マッピングに対して"
5697 "固定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこ"
5701 #: build/C/man2/mmap.2:225
5703 msgid "B<MAP_GROWSDOWN>"
5704 msgstr "B<MAP_GROWSDOWN>"
5707 #: build/C/man2/mmap.2:230
5709 "Used for stacks. Indicates to the kernel virtual memory system that the "
5710 "mapping should extend downward in memory."
5712 "スタック用に使用される。マッピングをメモリー内で逆向きに行うことを カーネル仮"
5713 "想メモリーシステムに指示する。 (訳注:マッピングは通常はメモリーアドレスが増"
5714 "加する向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5717 #: build/C/man2/mmap.2:230
5719 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5720 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5723 #: build/C/man2/mmap.2:236
5725 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5726 "I<Documentation/vm/hugetlbpage.txt> for further information."
5728 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5729 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5732 #: build/C/man2/mmap.2:236
5734 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5735 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5737 #. If set, the mapped pages will not be swapped out.
5739 #: build/C/man2/mmap.2:242
5741 "Lock the pages of the mapped region into memory in the manner of "
5742 "B<mlock>(2). This flag is ignored in older kernels."
5744 "マップされた領域のページを B<mlock>(2) の方法でメモリー内にロックする。 それ"
5745 "以前のカーネルでは、このフラグは無視される。"
5748 #: build/C/man2/mmap.2:242
5750 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5751 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5754 #: build/C/man2/mmap.2:257
5756 "Only meaningful in conjunction with B<MAP_POPULATE>. Don't perform read-"
5757 "ahead: create page tables entries only for pages that are already present in "
5758 "RAM. Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing. "
5759 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5762 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5763 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5764 "テーブルエントリーを作成する。 Linux 2.6.23 以降では、このフラグは "
5765 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5766 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5769 #: build/C/man2/mmap.2:257
5771 msgid "B<MAP_NORESERVE>"
5772 msgstr "B<MAP_NORESERVE>"
5775 #: build/C/man2/mmap.2:272
5777 "Do not reserve swap space for this mapping. When swap space is reserved, "
5778 "one has the guarantee that it is possible to modify the mapping. When swap "
5779 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5780 "memory is available. See also the discussion of the file I</proc/sys/vm/"
5781 "overcommit_memory> in B<proc>(5). In kernels before 2.6, this flag had "
5782 "effect only for private writable mappings."
5784 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5785 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5786 "合、物理メモリーに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることが"
5787 "ある。 B<proc>(5) の I</proc/sys/vm/overcommit_memory> ファイルについての議"
5788 "論も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プ"
5789 "ライベートマッピングについてのみ効果があった。"
5792 #: build/C/man2/mmap.2:272
5794 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5795 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5798 #: build/C/man2/mmap.2:279
5800 "Populate (prefault) page tables for a mapping. For a file mapping, this "
5801 "causes read-ahead on the file. Later accesses to the mapping will not be "
5802 "blocked by page faults. B<MAP_POPULATE> is supported for private mappings "
5803 "only since Linux 2.6.23."
5805 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5806 "は、これによりファイルが先読み (read-ahead) が行われる。この以後は、マッピン"
5807 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5808 "2.6.23 以降でのみプライベートマッピングについて B<MAP_POPULATE> がサポートさ"
5812 #: build/C/man2/mmap.2:279
5814 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5815 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5817 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5818 #. commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5819 #. http://thread.gmane.org/gmane.linux.kernel/720412
5820 #. "pthread_create() slow for many threads; also time to revisit 64b
5821 #. context switch optimization?"
5823 #: build/C/man2/mmap.2:292
5825 "Allocate the mapping at an address suitable for a process or thread stack. "
5826 "This flag is currently a no-op, but is used in the glibc threading "
5827 "implementation so that if some architectures require special treatment for "
5828 "stack allocations, support can later be transparently implemented for glibc."
5830 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5831 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5832 "これは、いくつかのアーキテクチャーではスタックの割り当てに関して特別な扱い が"
5833 "必要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5837 #: build/C/man2/mmap.2:292
5839 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5840 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5843 #: build/C/man2/mmap.2:302
5845 "Don't clear anonymous pages. This flag is intended to improve performance "
5846 "on embedded devices. This flag is honored only if the kernel was configured "
5847 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option. Because of the security "
5848 "implications, that option is normally enabled only on embedded devices (i."
5849 "e., devices where one has complete control of the contents of user memory)."
5851 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5853 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5854 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5856 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5857 "ユーザーメモリーの内容を完全に制御化におけるデバイス) においてのみ有効にされ"
5861 #: build/C/man2/mmap.2:310
5863 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001. "
5864 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5867 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5868 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5869 "B<MAP_ANON>) もサポートされている。"
5872 #: build/C/man2/mmap.2:317
5874 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5875 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5877 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5878 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5881 #: build/C/man2/mmap.2:323
5883 "Memory mapped by B<mmap>() is preserved across B<fork>(2), with the same "
5886 "B<mmap>() によってマップされたメモリーの属性は B<fork>(2) の際に継承され"
5890 #: build/C/man2/mmap.2:331
5892 "A file is mapped in multiples of the page size. For a file that is not a "
5893 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5894 "writes to that region are not written out to the file. The effect of "
5895 "changing the size of the underlying file of a mapping on the pages that "
5896 "correspond to added or removed regions of the file is unspecified."
5898 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5899 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5900 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5901 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5902 "マップされたページに対してどのような影響があるかは規定されていない。"
5905 #: build/C/man2/mmap.2:331
5911 #: build/C/man2/mmap.2:341
5913 "The B<munmap>() system call deletes the mappings for the specified address "
5914 "range, and causes further references to addresses within the range to "
5915 "generate invalid memory references. The region is also automatically "
5916 "unmapped when the process is terminated. On the other hand, closing the "
5917 "file descriptor does not unmap the region."
5919 "システムコール B<munmap>() は指定されたアドレス範囲のマップを消去し、 これ以"
5920 "降のその範囲内へのメモリー参照は不正となる。 この領域は、プロセスが終了したと"
5921 "きにも自動的にアンマップされる。 一方、ファイルディスクリプターをクローズして"
5925 #: build/C/man2/mmap.2:351
5927 "The address I<addr> must be a multiple of the page size. All pages "
5928 "containing a part of the indicated range are unmapped, and subsequent "
5929 "references to these pages will generate B<SIGSEGV>. It is not an error if "
5930 "the indicated range does not contain any mapped pages."
5932 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5933 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5934 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5935 "ていない場合でも エラーにならない。"
5938 #: build/C/man2/mmap.2:351
5940 msgid "Timestamps changes for file-backed mappings"
5941 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5944 #: build/C/man2/mmap.2:358
5946 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5947 "updated at any time between the B<mmap>() and the corresponding unmapping; "
5948 "the first reference to a mapped page will update the field if it has not "
5951 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5952 "I<st_atime> フィールドは、 B<mmap>() されてからアンマップ (unmap) されるまで"
5953 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5954 "ページへの最初の参照があった 際に更新される。"
5957 #: build/C/man2/mmap.2:375
5959 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5960 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5961 "before a subsequent B<msync>(2) with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5964 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5965 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5966 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5967 "B<msync>(2) が呼ばれる前までに更新される。"
5970 #: build/C/man2/mmap.2:392
5972 "On success, B<mmap>() returns a pointer to the mapped area. On error, the "
5973 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, and I<errno> "
5974 "is set appropriately. On success, B<munmap>() returns 0, on failure -1, "
5975 "and I<errno> is set (probably to B<EINVAL>)."
5977 "B<mmap>() は成功するとマップされた領域へのポインターを返す。 失敗すると値 "
5978 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>) を返し、 I<errno> がエラーの内容に"
5979 "したがってセットされる。 B<munmap>() は成功すると 0 を返す。失敗すると -1 を"
5980 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5983 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5984 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5985 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5986 #: build/C/man2/shmop.2:188
5992 #: build/C/man2/mmap.2:411
5994 "A file descriptor refers to a non-regular file. Or a file mapping was "
5995 "requested, but I<fd> is not open for reading. Or B<MAP_SHARED> was "
5996 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5997 "(B<O_RDWR>) mode. Or B<PROT_WRITE> is set, but the file is append-only."
5999 "以下のいずれかの場合。 ファイルディスクリプターの参照先が通常のファイルではな"
6000 "い (non-regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用に"
6001 "オープンされていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが "
6002 "I<fd> は読み書きモード (B<O_RDWR>) でオープンされていない、 B<PROT_WRITE> を"
6003 "セットしたが、ファイルは追加 (append) 専用である。"
6006 #: build/C/man2/mmap.2:415
6008 "The file has been locked, or too much memory has been locked (see "
6011 "ファイルがロックされている。またはロックされているメモリーが多すぎる "
6012 "(B<setrlimit>(2) を参照)。"
6015 #: build/C/man2/mmap.2:421
6017 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
6019 "I<fd> が有効なファイルディスクリプター (file descriptor) ではない (かつ "
6020 "B<MAP_ANONYMOUS> がセットされていない)。"
6023 #: build/C/man2/mmap.2:429
6025 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
6026 "not aligned on a page boundary)."
6028 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
6029 "ジ境界にアラインメントされていない)。"
6032 #: build/C/man2/mmap.2:434
6033 msgid "(since Linux 2.6.12) I<length> was 0."
6034 msgstr "(Linux 2.6.12 以降) I<length> が 0 であった。"
6037 #: build/C/man2/mmap.2:442
6039 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
6040 "both of these values."
6042 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
6046 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
6047 #: build/C/man2/shmget.2:221 build/C/man2/memfd_create.2:149
6052 #. [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
6054 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
6055 msgid "The system limit on the total number of open files has been reached."
6056 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
6059 #: build/C/man2/mmap.2:454
6061 "The underlying filesystem of the specified file does not support memory "
6064 "指定されたファイルが置かれているファイルシステムがメモリーマッピングをサポー"
6068 #: build/C/man2/mmap.2:458
6070 "No memory is available, or the process's maximum number of mappings would "
6071 "have been exceeded."
6073 "メモリーに空きがない、または処理中のプロセスのマッピング数が最大数を超過し"
6076 #. (Since 2.4.25 / 2.6.0.)
6078 #: build/C/man2/mmap.2:467
6080 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
6081 "file on a filesystem that was mounted no-exec."
6083 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
6084 "トされたファイルシステム上のファイルに マップ領域が対応している。"
6087 #: build/C/man2/mmap.2:477
6089 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
6092 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
6096 #: build/C/man2/mmap.2:477 build/C/man2/shmctl.2:348
6098 msgid "B<EOVERFLOW>"
6099 msgstr "B<EOVERFLOW>"
6102 #: build/C/man2/mmap.2:489
6104 "On 32-bit architecture together with the large file extension (i.e., using "
6105 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6106 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6108 "32 ビットアーキテクチャーで large file 拡張を使っている場合 (つまり 64 ビット"
6109 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6110 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6114 #: build/C/man2/mmap.2:491
6115 msgid "Use of a mapped region can result in these signals:"
6116 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6119 #: build/C/man2/mmap.2:491
6125 #: build/C/man2/mmap.2:494
6126 msgid "Attempted write into a region mapped as read-only."
6127 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6130 #: build/C/man2/mmap.2:494
6136 #: build/C/man2/mmap.2:499
6138 "Attempted access to a portion of the buffer that does not correspond to the "
6139 "file (for example, beyond the end of the file, including the case where "
6140 "another process has truncated the file)."
6142 "バッファーのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越"
6143 "えた部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれ"
6146 #. SVr4 documents additional error codes ENXIO and ENODEV.
6147 #. SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6149 #: build/C/man2/mmap.2:503
6150 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6151 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6153 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6154 #. -1: unavailable, 0: ask using sysconf().
6155 #. glibc defines it to 1.
6157 #: build/C/man2/mmap.2:517
6159 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>() are "
6160 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6161 "value greater than 0. (See also B<sysconf>(3).)"
6163 "B<mmap>(), B<msync>(2) B<munmap>() が利用可能な POSIX システムでは、 "
6164 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6165 "(B<sysconf>(3) も参照のこと)。"
6168 #: build/C/man2/mmap.2:530
6170 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6171 "B<PROT_READ>. It is architecture dependent whether B<PROT_READ> implies "
6172 "B<PROT_EXEC> or not. Portable programs should always set B<PROT_EXEC> if "
6173 "they intend to execute code in the new mapping."
6175 "(i386 などの) いくつかのアーキテクチャーでは、 B<PROT_WRITE> をセットすると、"
6176 "暗黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙"
6177 "のうちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャー依存である。 "
6178 "移植性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合"
6179 "は、常に B<PROT_EXEC> をセットすべきである。"
6182 #: build/C/man2/mmap.2:545
6184 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6185 "omit B<MAP_FIXED> from I<flags>. In this case, the system chooses the "
6186 "address for the mapping; the address is chosen so as not to conflict with "
6187 "any existing mapping, and will not be 0. If the B<MAP_FIXED> flag is "
6188 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6190 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6191 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6192 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6193 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6194 "I<addr> が 0 (NULL) の場合には、マップされるアドレスが 0 (NULL) になる。"
6197 #: build/C/man2/mmap.2:575
6199 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6200 "B<_SVID_SOURCE> is defined. (Requiring B<_GNU_SOURCE> also suffices, and "
6201 "requiring that macro specifically would have been more logical, since these "
6202 "flags are all Linux-specific.) The relevant flags are: B<MAP_32BIT>, "
6203 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6204 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6205 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6208 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6209 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6210 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6211 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6212 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6213 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6214 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6218 #: build/C/man2/mmap.2:575
6220 msgid "C library/kernel ABI differences"
6221 msgstr "C ライブラリとカーネル ABI の違い"
6223 #. Since around glibc 2.1/2.2, depending on the platform.
6225 #: build/C/man2/mmap.2:590
6227 "This page describes the interface provided by the glibc B<mmap>() wrapper "
6228 "function. Originally, this function invoked a system call of the same "
6229 "name. Since kernel 2.4, that system call has been superseded by "
6230 "B<mmap2>(2), and nowadays the glibc B<mmap>() wrapper function invokes "
6231 "B<mmap2>(2) with a suitably adjusted value for I<offset>."
6233 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6235 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6237 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6238 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6239 "B<mmap2>(2) を起動する。"
6242 #: build/C/man2/mmap.2:595
6244 "On Linux there are no guarantees like those suggested above under "
6245 "B<MAP_NORESERVE>. By default, any process can be killed at any moment when "
6246 "the system runs out of memory."
6248 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6249 "デフォルトでは、システムがメモリーを使い切った場合には、 どのプロセスがいつ強"
6250 "制終了されるか分からないからである。"
6253 #: build/C/man2/mmap.2:602
6255 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6256 "is specified as B<PROT_NONE>."
6258 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6259 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6262 #: build/C/man2/mmap.2:617
6264 "SUSv3 specifies that B<mmap>() should fail if I<length> is 0. However, in "
6265 "kernels before 2.6.12, B<mmap>() succeeded in this case: no mapping was "
6266 "created and the call returned I<addr>. Since kernel 2.6.12, B<mmap>() "
6267 "fails with the error B<EINVAL> for this case."
6269 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>() は失敗すると規定されている。"
6270 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>() は成功して"
6271 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6272 "では、 B<mmap>() はエラー B<EINVAL> で失敗する。"
6275 #: build/C/man2/mmap.2:633
6277 "POSIX specifies that the system shall always zero fill any partial page at "
6278 "the end of the object and that system will never write any modification of "
6279 "the object beyond its end. On Linux, when you write data to such partial "
6280 "page after the end of the object, the data stays in the page cache even "
6281 "after the file is closed and unmapped and even though the data is never "
6282 "written to the file itself, subsequent mappings may see the modified "
6283 "content. In some cases, this could be fixed by calling B<msync>(2) before "
6284 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6285 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6287 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6288 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6289 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6290 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6291 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6292 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6293 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6294 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6295 "共有メモリーインターフェースを使った場合)。"
6298 #: build/C/man2/mmap.2:645
6300 "The following program prints part of the file specified in its first command-"
6301 "line argument to standard output. The range of bytes to be printed is "
6302 "specified via offset and length values in the second and third command-line "
6303 "arguments. The program creates a memory mapping of the required pages of "
6304 "the file and then uses B<write>(2) to output the desired bytes."
6306 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6307 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6308 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6309 "必要なページのメモリー マッピングを作成し、 B<write>(2) を使って所望のバイト"
6313 #: build/C/man2/mmap.2:653
6316 "#include E<lt>sys/mman.hE<gt>\n"
6317 "#include E<lt>sys/stat.hE<gt>\n"
6318 "#include E<lt>fcntl.hE<gt>\n"
6319 "#include E<lt>stdio.hE<gt>\n"
6320 "#include E<lt>stdlib.hE<gt>\n"
6321 "#include E<lt>unistd.hE<gt>\n"
6323 "#include E<lt>sys/mman.hE<gt>\n"
6324 "#include E<lt>sys/stat.hE<gt>\n"
6325 "#include E<lt>fcntl.hE<gt>\n"
6326 "#include E<lt>stdio.hE<gt>\n"
6327 "#include E<lt>stdlib.hE<gt>\n"
6328 "#include E<lt>unistd.hE<gt>\n"
6331 #: build/C/man2/mmap.2:656 build/C/man2/mprotect.2:177
6334 "#define handle_error(msg) \\e\n"
6335 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6337 "#define handle_error(msg) \\e\n"
6338 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6341 #: build/C/man2/mmap.2:666
6345 "main(int argc, char *argv[])\n"
6349 " struct stat sb;\n"
6350 " off_t offset, pa_offset;\n"
6355 "main(int argc, char *argv[])\n"
6359 " struct stat sb;\n"
6360 " off_t offset, pa_offset;\n"
6365 #: build/C/man2/mmap.2:671
6368 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
6369 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6370 " exit(EXIT_FAILURE);\n"
6373 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
6374 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6375 " exit(EXIT_FAILURE);\n"
6379 #: build/C/man2/mmap.2:675
6382 " fd = open(argv[1], O_RDONLY);\n"
6384 " handle_error(\"open\");\n"
6386 " fd = open(argv[1], O_RDONLY);\n"
6388 " handle_error(\"open\");\n"
6391 #: build/C/man2/mmap.2:678
6394 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
6395 " handle_error(\"fstat\");\n"
6397 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
6398 " handle_error(\"fstat\");\n"
6401 #: build/C/man2/mmap.2:682
6404 " offset = atoi(argv[2]);\n"
6405 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6406 " /* offset for mmap() must be page aligned */\n"
6408 " offset = atoi(argv[2]);\n"
6409 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6410 " /* offset for mmap() must be page aligned */\n"
6413 #: build/C/man2/mmap.2:687
6416 " if (offset E<gt>= sb.st_size) {\n"
6417 " fprintf(stderr, \"offset is past end of file\\en\");\n"
6418 " exit(EXIT_FAILURE);\n"
6421 " if (offset E<gt>= sb.st_size) {\n"
6422 " fprintf(stderr, \"offset is past end of file\\en\");\n"
6423 " exit(EXIT_FAILURE);\n"
6427 #: build/C/man2/mmap.2:693
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"
6436 " if (argc == 4) {\n"
6437 " length = atoi(argv[3]);\n"
6438 " if (offset + length E<gt> sb.st_size)\n"
6439 " length = sb.st_size - offset;\n"
6440 " /* Can\\(aqt display bytes past end of file */\n"
6443 #: build/C/man2/mmap.2:697
6446 " } else { /* No length arg ==E<gt> display to end of file */\n"
6447 " length = sb.st_size - offset;\n"
6450 " } else { /* No length arg ==E<gt> display to end of file */\n"
6451 " length = sb.st_size - offset;\n"
6455 #: build/C/man2/mmap.2:702
6458 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6459 " MAP_PRIVATE, fd, pa_offset);\n"
6460 " if (addr == MAP_FAILED)\n"
6461 " handle_error(\"mmap\");\n"
6463 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6464 " MAP_PRIVATE, fd, pa_offset);\n"
6465 " if (addr == MAP_FAILED)\n"
6466 " handle_error(\"mmap\");\n"
6469 #: build/C/man2/mmap.2:707
6472 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6473 " if (s != length) {\n"
6475 " handle_error(\"write\");\n"
6477 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6478 " if (s != length) {\n"
6480 " handle_error(\"write\");\n"
6483 #: build/C/man2/mmap.2:711
6486 " fprintf(stderr, \"partial write\");\n"
6487 " exit(EXIT_FAILURE);\n"
6490 " fprintf(stderr, \"partial write\");\n"
6491 " exit(EXIT_FAILURE);\n"
6495 #: build/C/man2/mmap.2:729
6497 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6498 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6499 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6500 "B<shm_overview>(7)"
6502 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6503 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6504 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6505 "B<shm_overview>(7)"
6508 #: build/C/man2/mmap.2:736
6510 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6511 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6513 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6517 #: build/C/man2/mmap.2:741 build/C/man2/msync.2:151
6518 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6519 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6522 #: build/C/man2/mmap2.2:29
6528 #: build/C/man2/mmap2.2:29
6534 #: build/C/man2/mmap2.2:32
6535 msgid "mmap2 - map files or devices into memory"
6536 msgstr "mmap2 - ファイルやデバイスをメモリーにマップする"
6539 #: build/C/man2/mmap2.2:38
6542 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6543 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6545 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6546 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6549 #: build/C/man2/mmap2.2:43
6551 "This is probably not the system call that you are interested in; instead, "
6552 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6555 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6556 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6561 #: build/C/man2/mmap2.2:54
6563 "The B<mmap2>() system call provides the same interface as B<mmap>(2), "
6564 "except that the final argument specifies the offset into the file in 4096-"
6565 "byte units (instead of bytes, as is done by B<mmap>(2)). This enables "
6566 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6569 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6571 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6573 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6574 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6579 #: build/C/man2/mmap2.2:61
6581 "On success, B<mmap2>() returns a pointer to the mapped area. On error, -1 "
6582 "is returned and I<errno> is set appropriately."
6584 "成功した場合、 B<mmap2>() はマップされた領域へのポインターを返す。 エラーの"
6585 "場合は -1 が返されて、 I<errno> が適切に設定される。"
6588 #: build/C/man2/mmap2.2:65
6589 msgid "Problem with getting the data from user space."
6590 msgstr "ユーザー空間からデータを取得するときに問題があった。"
6593 #: build/C/man2/mmap2.2:70
6595 "(Various platforms where the page size is not 4096 bytes.) I<offset\\ *\\ "
6596 "4096> is not a multiple of the system page size."
6598 "(ページサイズが 4096 バイトでないプラットフォームにおいて) I<offset\\ *\\ "
6599 "4096> がシステムのページサイズの倍数ではない。"
6602 #: build/C/man2/mmap2.2:74
6603 msgid "B<mmap2>() can also return any of the errors described in B<mmap>(2)."
6604 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6607 #: build/C/man2/mmap2.2:77
6608 msgid "B<mmap2>() is available since Linux 2.3.31."
6609 msgstr "B<mmap2>() は、Linux 2.3.31 以降で使用可能である。"
6612 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6613 msgid "This system call is Linux-specific."
6614 msgstr "このシステムコールは Linux 独自である。"
6617 #: build/C/man2/mmap2.2:86
6619 "On architectures where this system call is present, the glibc B<mmap>() "
6620 "wrapper function invokes this system call rather than the B<mmap>(2) system "
6623 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>() のラッ"
6624 "パー関数は、 B<mmap>(2) システムコールではなく、このシステムコール "
6625 "(B<mmap2>(2)) を起動する。"
6628 #: build/C/man2/mmap2.2:88
6629 msgid "This system call does not exist on x86-64."
6630 msgstr "このシステムコールは x86-64 には存在しない。"
6632 #. ia64 can have page sizes ranging from 4kB to 64kB.
6633 #. On cris, it looks like the unit might also be the page size,
6634 #. which is 8192 bytes. -- mtk, June 2007
6636 #: build/C/man2/mmap2.2:95
6638 "On ia64, the unit for I<offset> is actually the system page size, rather "
6641 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6645 #: build/C/man2/mmap2.2:101
6647 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6649 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6652 #: build/C/man2/mprotect.2:39
6658 #: build/C/man2/mprotect.2:39
6664 #: build/C/man2/mprotect.2:42
6665 msgid "mprotect - set protection on a region of memory"
6666 msgstr "mprotect - メモリー領域の保護を設定する"
6669 #: build/C/man2/mprotect.2:47
6671 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6672 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6675 #: build/C/man2/mprotect.2:55
6677 "B<mprotect>() changes protection for the calling process's memory page(s) "
6678 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6679 "+I<len>-1]. I<addr> must be aligned to a page boundary."
6681 "B<mprotect>() は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6682 "び出し元のプロセスのメモリーページのアクセス保護を変更する。 I<addr> はページ"
6686 #: build/C/man2/mprotect.2:60
6688 "If the calling process tries to access memory in a manner that violates the "
6689 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6691 "呼び出し元のプロセスがアクセス保護に違反するようなメモリーアクセスを 行おうと"
6692 "すると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6695 #: build/C/man2/mprotect.2:65
6697 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6700 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6701 "毎の論理和 (bitwize-or) で指定する:"
6704 #: build/C/man2/mprotect.2:68
6705 msgid "The memory cannot be accessed at all."
6706 msgstr "そのメモリーには全くアクセスできない。"
6709 #: build/C/man2/mprotect.2:71
6710 msgid "The memory can be read."
6711 msgstr "そのメモリーを読み取ることができる。"
6714 #: build/C/man2/mprotect.2:74
6715 msgid "The memory can be modified."
6716 msgstr "そのメモリーを変更できる。"
6719 #: build/C/man2/mprotect.2:77
6720 msgid "The memory can be executed."
6721 msgstr "そのメモリーは実行可能である。"
6724 #: build/C/man2/mprotect.2:84
6726 "On success, B<mprotect>() returns zero. On error, -1 is returned, and "
6727 "I<errno> is set appropriately."
6729 "成功した場合、 B<mprotect>() は 0 を返す。エラーの場合は -1 が返り、 "
6730 "I<errno> が適切に設定される。"
6733 #: build/C/man2/mprotect.2:94
6735 "The memory cannot be given the specified access. This can happen, for "
6736 "example, if you B<mmap>(2) a file to which you have read-only access, then "
6737 "ask B<mprotect>() to mark it B<PROT_WRITE>."
6739 "指定されたアクセスをメモリーに設定することができない。 これは、例えば ファイ"
6740 "ルを読み取り専用で B<mmap>(2) しており、その領域に対して B<mprotect>() を呼"
6741 "び出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6743 #. Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6745 #: build/C/man2/mprotect.2:99
6747 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6749 "I<addr> が有効なポインターでないか、 システムのページサイズの倍数でない。"
6752 #: build/C/man2/mprotect.2:102
6753 msgid "Internal kernel structures could not be allocated."
6754 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6757 #: build/C/man2/mprotect.2:112
6759 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6760 "address space of the process, or specify one or more pages that are not "
6761 "mapped. (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6764 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6765 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6766 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6769 #. SVr4 defines an additional error
6770 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6772 #: build/C/man2/mprotect.2:121
6774 "SVr4, POSIX.1-2001. POSIX says that the behavior of B<mprotect>() is "
6775 "unspecified if it is applied to a region of memory that was not obtained via "
6778 "SVr4, POSIX.1-2001. POSIX では、 B<mmap>(2) 経由で獲得していないメモリー領"
6779 "域に対して B<mprotect>() を行った場合の B<mprotect>() の動作は未定義である"
6783 #: build/C/man2/mprotect.2:128
6785 "On Linux it is always permissible to call B<mprotect>() on any address in a "
6786 "process's address space (except for the kernel vsyscall area). In "
6787 "particular it can be used to change existing code mappings to be writable."
6789 "Linux では、(カーネル vsyscall 領域以外の) 任意のプロセスアドレス空間に対し"
6790 "て B<mprotect>() を呼び出すことが、常に許されている。 これは特に既存のコード"
6791 "マッピングを書き込み可能にするために使われる。"
6794 #: build/C/man2/mprotect.2:138
6796 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6797 "architecture- and kernel version-dependent. On some hardware architectures "
6798 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6800 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャーと"
6801 "カーネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャーで"
6802 "は、 B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6805 #: build/C/man2/mprotect.2:147
6807 "POSIX.1-2001 says that an implementation may permit access other than that "
6808 "specified in I<prot>, but at a minimum can allow write access only if "
6809 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6812 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6813 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6814 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6818 #: build/C/man2/mprotect.2:153
6820 "The program below allocates four pages of memory, makes the third of these "
6821 "pages read-only, and then executes a loop that walks upward through the "
6822 "allocated region modifying bytes."
6824 "以下のプログラムは、メモリーページを 4つ確保し、そのうち 3番目のページを 読み"
6825 "込み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に"
6826 "向かって順番にバイト値を変更するループを実行する。"
6829 #: build/C/man2/mprotect.2:156
6831 "An example of what we might see when running the program is the following:"
6832 msgstr "プログラムを実行した場合の一例を以下に示す。"
6835 #: build/C/man2/mprotect.2:162
6839 "Start of region: 0x804c000\n"
6840 "Got SIGSEGV at address: 0x804e000\n"
6843 "Start of region: 0x804c000\n"
6844 "Got SIGSEGV at address: 0x804e000\n"
6847 #: build/C/man2/mprotect.2:174
6850 "#include E<lt>unistd.hE<gt>\n"
6851 "#include E<lt>signal.hE<gt>\n"
6852 "#include E<lt>stdio.hE<gt>\n"
6853 "#include E<lt>malloc.hE<gt>\n"
6854 "#include E<lt>stdlib.hE<gt>\n"
6855 "#include E<lt>errno.hE<gt>\n"
6856 "#include E<lt>sys/mman.hE<gt>\n"
6858 "#include E<lt>unistd.hE<gt>\n"
6859 "#include E<lt>signal.hE<gt>\n"
6860 "#include E<lt>stdio.hE<gt>\n"
6861 "#include E<lt>malloc.hE<gt>\n"
6862 "#include E<lt>stdlib.hE<gt>\n"
6863 "#include E<lt>errno.hE<gt>\n"
6864 "#include E<lt>sys/mman.hE<gt>\n"
6867 #: build/C/man2/mprotect.2:179
6869 msgid "static char *buffer;\n"
6870 msgstr "static char *buffer;\n"
6873 #: build/C/man2/mprotect.2:187
6877 "handler(int sig, siginfo_t *si, void *unused)\n"
6879 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6880 " (long) si-E<gt>si_addr);\n"
6881 " exit(EXIT_FAILURE);\n"
6885 "handler(int sig, siginfo_t *si, void *unused)\n"
6887 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6888 " (long) si-E<gt>si_addr);\n"
6889 " exit(EXIT_FAILURE);\n"
6893 #: build/C/man2/mprotect.2:194
6897 "main(int argc, char *argv[])\n"
6901 " struct sigaction sa;\n"
6908 " struct sigaction sa;\n"
6911 #: build/C/man2/mprotect.2:200
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"
6920 " sa.sa_flags = SA_SIGINFO;\n"
6921 " sigemptyset(&sa.sa_mask);\n"
6922 " sa.sa_sigaction = handler;\n"
6923 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6924 " handle_error(\"sigaction\");\n"
6927 #: build/C/man2/mprotect.2:204
6930 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
6931 " if (pagesize == -1)\n"
6932 " handle_error(\"sysconf\");\n"
6934 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
6935 " if (pagesize == -1)\n"
6936 " handle_error(\"sysconf\");\n"
6939 #: build/C/man2/mprotect.2:207
6942 " /* Allocate a buffer aligned on a page boundary;\n"
6943 " initial protection is PROT_READ | PROT_WRITE */\n"
6945 " /* Allocate a buffer aligned on a page boundary;\n"
6946 " initial protection is PROT_READ | PROT_WRITE */\n"
6949 #: build/C/man2/mprotect.2:211
6952 " buffer = memalign(pagesize, 4 * pagesize);\n"
6953 " if (buffer == NULL)\n"
6954 " handle_error(\"memalign\");\n"
6956 " buffer = memalign(pagesize, 4 * pagesize);\n"
6957 " if (buffer == NULL)\n"
6958 " handle_error(\"memalign\");\n"
6961 #: build/C/man2/mprotect.2:213
6963 msgid " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
6964 msgstr " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
6967 #: build/C/man2/mprotect.2:217
6970 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
6971 " PROT_READ) == -1)\n"
6972 " handle_error(\"mprotect\");\n"
6974 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
6975 " PROT_READ) == -1)\n"
6976 " handle_error(\"mprotect\");\n"
6979 #: build/C/man2/mprotect.2:220
6982 " for (p = buffer ; ; )\n"
6983 " *(p++) = \\(aqa\\(aq;\n"
6985 " for (p = buffer ; ; )\n"
6986 " *(p++) = \\(aqa\\(aq;\n"
6989 #: build/C/man2/mprotect.2:224
6992 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
6993 " exit(EXIT_SUCCESS);\n"
6996 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
6997 " exit(EXIT_SUCCESS);\n"
7001 #: build/C/man2/mprotect.2:228
7002 msgid "B<mmap>(2), B<sysconf>(3)"
7003 msgstr "B<mmap>(2), B<sysconf>(3)"
7006 #: build/C/man2/mremap.2:30
7012 #: build/C/man2/mremap.2:30
7018 #: build/C/man2/mremap.2:33
7019 msgid "mremap - remap a virtual memory address"
7020 msgstr "mremap - 仮想メモリーアドレスを再マッピングする"
7023 #: build/C/man2/mremap.2:36
7025 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
7026 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
7029 #: build/C/man2/mremap.2:41
7032 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7033 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7035 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7036 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7039 #: build/C/man2/mremap.2:47
7041 "B<mremap>() expands (or shrinks) an existing memory mapping, potentially "
7042 "moving it at the same time (controlled by the I<flags> argument and the "
7043 "available virtual address space)."
7045 "B<mremap>() は既存のメモリーマッピングの拡張 (または縮小) を行う。 同時に移"
7046 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
7050 #: build/C/man2/mremap.2:61
7052 "I<old_address> is the old address of the virtual memory block that you want "
7053 "to expand (or shrink). Note that I<old_address> has to be page aligned. "
7054 "I<old_size> is the old size of the virtual memory block. I<new_size> is the "
7055 "requested size of the virtual memory block after the resize. An optional "
7056 "fifth argument, I<new_address>, may be provided; see the description of "
7057 "B<MREMAP_FIXED> below."
7059 "I<old_address> は拡張 (または縮小) しようとする仮想メモリーブロック の元のア"
7060 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
7061 "すること。I<old_size> は元の仮想メモリーブロックの サイズである。 "
7062 "I<new_size> は要求する変更後の仮想メモリーブロックのサイズである。 5 番目の引"
7063 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
7067 #: build/C/man2/mremap.2:73
7069 "In Linux the memory is divided into pages. A user process has (one or) "
7070 "several linear virtual memory segments. Each virtual memory segment has one "
7071 "or more mappings to real memory pages (in the page table). Each virtual "
7072 "memory segment has its own protection (access rights), which may cause a "
7073 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
7074 "to a read-only segment). Accessing virtual memory outside of the segments "
7075 "will also cause a segmentation violation."
7077 "Linux ではメモリーはページに分割される。ユーザープロセスは (一つまたは) 複数"
7078 "のリニアな仮想メモリーセグメントを持つ。 それぞれの仮想メモリーセグメントは一"
7079 "つ以上の実メモリーページ にマッピングされている (マッピング情報はページテーブ"
7080 "ルで管理される)。 仮想メモリーセグメントにはセグメント毎の保護 (アクセス権) "
7081 "が設定されており、 メモリーが不正にアクセスされた場合 (例えば読み込み専用のセ"
7082 "グメントに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) "
7083 "を 引き起こす。また、セグメント外の仮想メモリーにアクセスした場合にも セグメ"
7087 #: build/C/man2/mremap.2:81
7089 "B<mremap>() uses the Linux page table scheme. B<mremap>() changes the "
7090 "mapping between virtual addresses and memory pages. This can be used to "
7091 "implement a very efficient B<realloc>(3)."
7093 "B<mremap>() は Linux のページテーブル方式を使用する。 B<mremap>() は仮想ア"
7094 "ドレスとメモリーページのマッピングを変更する。これは非常に効率的な "
7095 "B<realloc>(3) を実装するのに使用されている。"
7098 #: build/C/man2/mremap.2:83
7099 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7100 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7103 #: build/C/man2/mremap.2:83
7105 msgid "B<MREMAP_MAYMOVE>"
7106 msgstr "B<MREMAP_MAYMOVE>"
7109 #: build/C/man2/mremap.2:95
7111 "By default, if there is not sufficient space to expand a mapping at its "
7112 "current location, then B<mremap>() fails. If this flag is specified, then "
7113 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7114 "necessary. If the mapping is relocated, then absolute pointers into the old "
7115 "mapping location become invalid (offsets relative to the starting address of "
7116 "the mapping should be employed)."
7118 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7119 "B<mremap>() は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7120 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7121 "れると、古いマッピング位置への絶対ポインターは 無効になる (マッピングの開始ア"
7122 "ドレスからの相対オフセットは有効のままである)。"
7125 #: build/C/man2/mremap.2:95
7127 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7128 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7131 #: build/C/man2/mremap.2:117
7133 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2). "
7134 "If this flag is specified, then B<mremap>() accepts a fifth argument, I<void"
7135 "\\ *new_address>, which specifies a page-aligned address to which the "
7136 "mapping must be moved. Any previous mapping at the address range specified "
7137 "by I<new_address> and I<new_size> is unmapped. If B<MREMAP_FIXED> is "
7138 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7140 "このフラグは B<mmap>(2) の B<MAP_FIXED> フラグと似たような目的で用いられ"
7141 "る。 このフラグが指定されると、 B<mremap>() は 5 番目の引き数 I<void\\ "
7142 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7143 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7144 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7145 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7146 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7149 #: build/C/man2/mremap.2:127
7151 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7152 "(using B<mlock>(2) or similar), then this lock is maintained when the "
7153 "segment is resized and/or relocated. As a consequence, the amount of memory "
7154 "locked by the process may change."
7156 "I<old_address> と I<old_size> で指定されるメモリーセグメントが (B<mlock>(2) "
7157 "や同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置さ"
7158 "れたりした時にロックも維持される。 その結果、プロセスによってロックされるメモ"
7162 #: build/C/man2/mremap.2:135
7164 "On success B<mremap>() returns a pointer to the new virtual memory area. "
7165 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7166 "and I<errno> is set appropriately."
7168 "成功した場合は B<mremap>() は新しい仮想メモリー領域へのポインターを返す。 エ"
7169 "ラーの場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> "
7173 #: build/C/man2/mremap.2:142
7175 "The caller tried to expand a memory segment that is locked, but this was not "
7176 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7178 "呼び出し元がロックされているメモリーセグメントを拡張しようとしたが、 "
7179 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7182 #: build/C/man2/mremap.2:151
7184 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7185 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7186 "process. You can also get B<EFAULT> even if there exist mappings that cover "
7187 "the whole address space requested, but those mappings are of different types."
7189 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7190 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7191 "正な仮想メモリーアドレスである。 たとえ要求したアドレス空間全体を含むような"
7192 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7196 #: build/C/man2/mremap.2:179
7198 "An invalid argument was given. Possible causes are: I<old_address> was not "
7199 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7200 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7201 "was invalid; or the new address range specified by I<new_address> and "
7202 "I<new_size> overlapped the old address range specified by I<old_address> and "
7203 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7204 "B<MREMAP_MAYMOVE>."
7206 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7207 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7208 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7209 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7210 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7211 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7215 #: build/C/man2/mremap.2:185
7217 "The memory area cannot be expanded at the current virtual address, and the "
7218 "B<MREMAP_MAYMOVE> flag is not set in I<flags>. Or, there is not enough "
7219 "(virtual) memory available."
7221 "現在の仮想アドレスではメモリー領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7222 "I<flags> に設定されていない。 または十分な (仮想) メモリーが存在しない。"
7224 #. 4.2BSD had a (never actually implemented)
7226 #. call with completely different semantics.
7228 #: build/C/man2/mremap.2:191
7230 "This call is Linux-specific, and should not be used in programs intended to "
7233 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7237 #: build/C/man2/mremap.2:199
7239 "Prior to version 2.4, glibc did not expose the definition of "
7240 "B<MREMAP_FIXED>, and the prototype for B<mremap>() did not allow for the "
7241 "I<new_address> argument."
7243 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7244 "ず、 B<mremap>() のプロトタイプは I<new_address> 引き数を取らなかった。"
7247 #: build/C/man2/mremap.2:208
7249 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7250 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7252 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7253 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7256 #: build/C/man2/mremap.2:214
7258 "Your favorite text book on operating systems for more information on paged "
7259 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7260 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7263 "ページ分割されたメモリーについてもっと詳しく知りたいならば、あなたのお気に入"
7264 "りのオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7265 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7266 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7269 #: build/C/man2/msync.2:25
7275 #: build/C/man2/msync.2:25
7281 #: build/C/man2/msync.2:28
7282 msgid "msync - synchronize a file with a memory map"
7283 msgstr "msync - ファイルをマップしたメモリーと同期させる"
7286 #: build/C/man2/msync.2:32
7287 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7288 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7291 #: build/C/man2/msync.2:48
7293 "B<msync>() flushes changes made to the in-core copy of a file that was "
7294 "mapped into memory using B<mmap>(2) back to the filesystem. Without use of "
7295 "this call there is no guarantee that changes are written back before "
7296 "B<munmap>(2) is called. To be more precise, the part of the file that "
7297 "corresponds to the memory area starting at I<addr> and having length "
7298 "I<length> is updated."
7300 "B<msync>() は B<mmap>(2) を使ってメモリーにマップされたファイルの、 メモ"
7301 "リー上のコピーになされた変更をファイルシステムに反映させる。 この関数を使用し"
7302 "ないと、 B<munmap>(2) が呼び出されるまで変更が書き戻される保証はない。 より"
7303 "正確には、ファイルのうち I<addr> から始まり長さ I<length> のメモリー領域に対"
7307 #: build/C/man2/msync.2:68
7309 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7310 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>. B<MS_ASYNC> "
7311 "specifies that an update be scheduled, but the call returns immediately. "
7312 "B<MS_SYNC> asks for an update and waits for it to complete. "
7313 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7314 "they can be updated with the fresh values just written)."
7316 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7317 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7318 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7319 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7320 "た今書き込んだ新しい値でマッピングを更新することができるように) 同じファイル"
7321 "に対する他のマッピングを無効にすることを要求する。"
7324 #: build/C/man2/msync.2:73
7326 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
7329 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7333 #: build/C/man2/msync.2:74
7339 #: build/C/man2/msync.2:80
7341 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7342 "specified address range."
7344 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7348 #: build/C/man2/msync.2:93
7350 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7351 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7352 "B<MS_ASYNC> are set in I<flags>."
7354 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7355 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7356 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7359 #: build/C/man2/msync.2:96
7360 msgid "The indicated memory (or part of it) was not mapped."
7361 msgstr "指定されたメモリー (またはその一部) がマップされていない。"
7364 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7365 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7366 msgid "POSIX.1-2001."
7367 msgstr "POSIX.1-2001."
7370 #: build/C/man2/msync.2:105
7372 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7373 "B<ENOMEM>. In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7375 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7376 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7378 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7379 #. -1: unavailable, 0: ask using sysconf().
7380 #. glibc defines them to 1.
7382 #: build/C/man2/msync.2:120
7384 "On POSIX systems on which B<msync>() is available, both "
7385 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7386 "I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
7388 "B<msync>() が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7389 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7390 "定義される。 (B<sysconf>(3) を参照すること。 )"
7392 #. commit 204ec841fbea3e5138168edbc3a76d46747cc987
7394 #: build/C/man2/msync.2:147
7396 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7397 "I<flags>, and indeed failure to include one of these flags will cause "
7398 "B<msync>() to fail on some systems. However, Linux permits a call to "
7399 "B<msync>() that specifies neither of these flags, with semantics that are "
7400 "(currently) equivalent to specifying B<MS_ASYNC>. (Since Linux 2.6.19, "
7401 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7402 "and flushes them to storage as necessary.) Notwithstanding the Linux "
7403 "behavior, portable, future-proof applications should ensure that they "
7404 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7406 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7407 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7408 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7409 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7410 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7411 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7412 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7413 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7414 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7418 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7424 #: build/C/man3/mtrace.3:25
7430 #: build/C/man3/mtrace.3:25
7436 #: build/C/man3/mtrace.3:28
7437 msgid "mtrace, muntrace - malloc tracing"
7438 msgstr "mtrace, muntrace - malloc のトレース"
7441 #: build/C/man3/mtrace.3:30
7442 msgid "B<#include E<lt>mcheck.hE<gt>>"
7443 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7446 #: build/C/man3/mtrace.3:32
7447 msgid "B<void mtrace(void);>"
7448 msgstr "B<void mtrace(void);>"
7451 #: build/C/man3/mtrace.3:34
7452 msgid "B<void muntrace(void);>"
7453 msgstr "B<void muntrace(void);>"
7456 #: build/C/man3/mtrace.3:46
7458 "The B<mtrace>() function installs hook functions for the memory-allocation "
7459 "functions (B<malloc>(3), B<realloc>(3) B<memalign>(3), B<free>(3)). These "
7460 "hook functions record tracing information about memory allocation and "
7461 "deallocation. The tracing information can be used to discover memory leaks "
7462 "and attempts to free nonallocated memory in a program."
7466 #: build/C/man3/mtrace.3:57
7468 "The B<muntrace>() function disables the hook functions installed by "
7469 "B<mtrace>(), so that tracing information is no longer recorded for the "
7470 "memory-allocation functions. If no hook functions were successfully "
7471 "installed by B<mtrace>(), B<muntrace>() does nothing."
7475 #: build/C/man3/mtrace.3:65
7477 "When B<mtrace>() is called, it checks the value of the environment variable "
7478 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7479 "tracing information is to be recorded. If the pathname is successfully "
7480 "opened, it is truncated to zero length."
7484 #: build/C/man3/mtrace.3:78
7486 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7487 "not writable, then no hook functions are installed, and B<mtrace>() has no "
7488 "effect. In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7489 "ignored, and B<mtrace>() has no effect."
7493 #: build/C/man3/mtrace.3:86
7495 "In normal usage, B<mtrace>() is called once at the start of execution of a "
7496 "program, and B<muntrace>() is never called."
7500 #: build/C/man3/mtrace.3:96
7502 "The tracing output produced after a call to B<mtrace>() is textual, but not "
7503 "designed to be human readable. The GNU C library provides a Perl script, "
7504 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7505 "output. For best results, the traced program should be compiled with "
7506 "debugging enabled, so that line-number information is recorded in the "
7511 #: build/C/man3/mtrace.3:102
7513 "The tracing performed by B<mtrace>() incurs a performance penalty (if "
7514 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7518 #: build/C/man3/mtrace.3:108
7520 "The line-number information produced by B<mtrace>(1) is not always precise: "
7521 "the line number references may refer to the previous or following "
7522 "(nonblank) line of the source code."
7526 #: build/C/man3/mtrace.3:115
7528 "The shell session below demonstrates the use of the B<mtrace>() function "
7529 "and the B<mtrace>(1) command in a program that has memory leaks at two "
7530 "different locations. The demonstration uses the following program:"
7534 #: build/C/man3/mtrace.3:122
7537 "$ B<cat t_mtrace.c>\n"
7538 "#include E<lt>mcheck.hE<gt>\n"
7539 "#include E<lt>stdlib.hE<gt>\n"
7540 "#include E<lt>stdio.hE<gt>\n"
7542 "$ B<cat t_mtrace.c>\n"
7543 "#include E<lt>mcheck.hE<gt>\n"
7544 "#include E<lt>stdlib.hE<gt>\n"
7545 "#include E<lt>stdio.hE<gt>\n"
7548 #: build/C/man3/mtrace.3:127
7552 "main(int argc, char *argv[])\n"
7557 "main(int argc, char *argv[])\n"
7562 #: build/C/man3/mtrace.3:129
7564 msgid " mtrace();\n"
7565 msgstr " mtrace();\n"
7568 #: build/C/man3/mtrace.3:132
7571 " for (j = 0; j E<lt> 2; j++)\n"
7572 " malloc(100); /* Never freed--a memory leak */\n"
7574 " for (j = 0; j E<lt> 2; j++)\n"
7575 " malloc(100); /* Never freed--a memory leak */\n"
7578 #: build/C/man3/mtrace.3:136
7581 " calloc(16, 16); /* Never freed--a memory leak */\n"
7582 " exit(EXIT_SUCCESS);\n"
7585 " calloc(16, 16); /* Never freed--a memory leak */\n"
7586 " exit(EXIT_SUCCESS);\n"
7590 #: build/C/man3/mtrace.3:142
7592 "When we run the program as follows, we see that B<mtrace>() diagnosed "
7593 "memory leaks at two different locations in the program:"
7597 #: build/C/man3/mtrace.3:155
7600 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7601 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7603 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7604 "Memory not freed:\n"
7605 "-----------------\n"
7606 " Address Size Caller\n"
7607 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
7608 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
7609 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
7611 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7612 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7614 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7615 "Memory not freed:\n"
7616 "-----------------\n"
7617 " Address Size Caller\n"
7618 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
7619 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
7620 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
7623 #: build/C/man3/mtrace.3:167
7625 "The first two messages about unfreed memory correspond to the two "
7626 "B<malloc>(3) calls inside the I<for> loop. The final message corresponds "
7627 "to the call to B<calloc>(3) (which in turn calls B<malloc>(3))."
7631 #: build/C/man3/mtrace.3:172
7632 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7633 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7636 #: build/C/man2/posix_fadvise.2:28
7638 msgid "POSIX_FADVISE"
7639 msgstr "POSIX_FADVISE"
7642 #: build/C/man2/posix_fadvise.2:31
7643 msgid "posix_fadvise - predeclare an access pattern for file data"
7644 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7647 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7649 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7650 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7653 #: build/C/man2/posix_fadvise.2:37
7655 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7656 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7659 #: build/C/man2/posix_fadvise.2:46
7660 msgid "B<posix_fadvise>():"
7661 msgstr "B<posix_fadvise>():"
7664 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7665 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7666 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7669 #: build/C/man2/posix_fadvise.2:56
7671 "Programs can use B<posix_fadvise>() to announce an intention to access file "
7672 "data in a specific pattern in the future, thus allowing the kernel to "
7673 "perform appropriate optimizations."
7675 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7676 "めに B<posix_fadvise>() を使うことができる。 これにより、カーネルが適切な最"
7680 #: build/C/man2/posix_fadvise.2:63
7682 "The I<advice> applies to a (not necessarily existent) region starting at "
7683 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7684 "I<len> is 0) within the file referred to by I<fd>. The I<advice> is not "
7685 "binding; it merely constitutes an expectation on behalf of the application."
7687 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7689 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7690 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7692 "ションのために可能性を構成するだけである。"
7695 #: build/C/man2/posix_fadvise.2:65
7696 msgid "Permissible values for I<advice> include:"
7697 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7700 #: build/C/man2/posix_fadvise.2:65
7702 msgid "B<POSIX_FADV_NORMAL>"
7703 msgstr "B<POSIX_FADV_NORMAL>"
7706 #: build/C/man2/posix_fadvise.2:71
7708 "Indicates that the application has no advice to give about its access "
7709 "pattern for the specified data. If no advice is given for an open file, "
7710 "this is the default assumption."
7712 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7713 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7714 "合、 これがデフォルトで仮定される。"
7717 #: build/C/man2/posix_fadvise.2:71
7719 msgid "B<POSIX_FADV_SEQUENTIAL>"
7720 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7723 #: build/C/man2/posix_fadvise.2:75
7725 "The application expects to access the specified data sequentially (with "
7726 "lower offsets read before higher ones)."
7728 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7729 "小さなオフセットのデータを読むように) アクセスされることを期待する。"
7732 #: build/C/man2/posix_fadvise.2:75
7734 msgid "B<POSIX_FADV_RANDOM>"
7735 msgstr "B<POSIX_FADV_RANDOM>"
7738 #: build/C/man2/posix_fadvise.2:78
7739 msgid "The specified data will be accessed in random order."
7740 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7743 #: build/C/man2/posix_fadvise.2:78
7745 msgid "B<POSIX_FADV_NOREUSE>"
7746 msgstr "B<POSIX_FADV_NOREUSE>"
7749 #: build/C/man2/posix_fadvise.2:81
7750 msgid "The specified data will be accessed only once."
7751 msgstr "指定されたデータは 1 度しかアクセスされない。"
7754 #: build/C/man2/posix_fadvise.2:81
7756 msgid "B<POSIX_FADV_WILLNEED>"
7757 msgstr "B<POSIX_FADV_WILLNEED>"
7760 #: build/C/man2/posix_fadvise.2:84
7761 msgid "The specified data will be accessed in the near future."
7762 msgstr "指定されたデータは近い将来アクセスされる。"
7765 #: build/C/man2/posix_fadvise.2:84
7767 msgid "B<POSIX_FADV_DONTNEED>"
7768 msgstr "B<POSIX_FADV_DONTNEED>"
7771 #: build/C/man2/posix_fadvise.2:87
7772 msgid "The specified data will not be accessed in the near future."
7773 msgstr "指定されたデータは近い将来アクセスされない。"
7776 #: build/C/man2/posix_fadvise.2:90
7777 msgid "On success, zero is returned. On error, an error number is returned."
7778 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7781 #: build/C/man2/posix_fadvise.2:94
7782 msgid "The I<fd> argument was not a valid file descriptor."
7783 msgstr "I<fd> 引き数が有効なファイルディスクリプターでない。"
7786 #: build/C/man2/posix_fadvise.2:97
7787 msgid "An invalid value was specified for I<advice>."
7788 msgstr "無効な値が I<advice> に指定された。"
7790 #. commit 87ba81dba431232548ce29d5d224115d0c2355ac
7792 #: build/C/man2/posix_fadvise.2:107
7794 "The specified file descriptor refers to a pipe or FIFO. (B<ESPIPE> is the "
7795 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7796 "B<EINVAL> in this case.)"
7798 "指定されたファイルディスクリプターがパイプまたは FIFO を参照している "
7799 "(B<ESPIPE> は POSIX で規定されているエラーだが、 バージョン 2.16 より前のカー"
7800 "ネルでは、 この場合に B<EINVAL> を返していた。)"
7802 #. of fadvise64_64()
7804 #: build/C/man2/posix_fadvise.2:115
7806 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7807 "called B<fadvise64>(). Library support has been provided since glibc "
7808 "version 2.2, via the wrapper function B<posix_fadvise>()."
7810 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7811 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7812 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7813 "ラッパー関数は B<posix_fadvise>() という名前である。"
7815 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7817 #: build/C/man2/posix_fadvise.2:122
7819 "Since Linux 3.18, support for the underlying system call is optional, "
7820 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7823 "Linux 3.18 以降では、対応するシステムコールのサポートは任意となり、利用できる"
7824 "かはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされ"
7828 #: build/C/man2/posix_fadvise.2:131
7830 "POSIX.1-2001. Note that the type of the I<len> argument was changed from "
7831 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7833 "POSIX.1-2001. I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7834 "I<off_t> に変更された点に注意すること。"
7837 #: build/C/man2/posix_fadvise.2:137
7839 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7840 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7841 "B<POSIX_FADV_RANDOM> disables file readahead entirely. These changes affect "
7842 "the entire file, not just the specified region (but other open file handles "
7843 "to the same file are unaffected)."
7845 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7846 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7847 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7848 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7849 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7852 #: build/C/man2/posix_fadvise.2:144
7854 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7855 "into the page cache. The amount of data read may be decreased by the kernel "
7856 "depending on virtual memory load. (A few megabytes will usually be fully "
7857 "satisfied, and more is rarely useful.)"
7859 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7860 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリーの負荷に依ってカー"
7861 "ネルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより"
7865 #: build/C/man2/posix_fadvise.2:148
7867 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7868 "B<POSIX_FADV_WILLNEED>. This was probably a bug; since kernel 2.6.18, this "
7871 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7872 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7876 #: build/C/man2/posix_fadvise.2:156
7878 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7879 "specified region. This is useful, for example, while streaming large "
7880 "files. A program may periodically request the kernel to free cached data "
7881 "that has already been used, so that more useful cached pages are not "
7882 "discarded instead."
7884 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7885 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7886 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7887 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7888 "されたページが、 代わりに破棄されることはない。"
7891 #: build/C/man2/posix_fadvise.2:164
7893 "Requests to discard partial pages are ignored. It is preferable to preserve "
7894 "needed data than discard unneeded data. If the application requires that "
7895 "data be considered for discarding then I<offset> and I<len> must be page-"
7898 "ページの一部分の破棄要求は無視される。 不要なデータを破棄するよりも必要なデー"
7899 "タを保持する方がよい。 アプリケーションがデータを破棄した方がよいと思う場合"
7900 "は、 I<offset> と I<len> がページ境界に合っていなければならない。"
7903 #: build/C/man2/posix_fadvise.2:172
7905 "Pages that have not yet been written out will be unaffected, so if the "
7906 "application wishes to guarantee that pages will be released, it should call "
7907 "B<fsync>(2) or B<fdatasync>(2) first."
7909 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7910 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2) または "
7911 "B<fdatasync>(2) を呼ぶべきである。"
7914 #: build/C/man2/posix_fadvise.2:172
7916 msgid "Architecture-specific variants"
7917 msgstr "アーキテクチャー固有の派生バージョン"
7920 #: build/C/man2/posix_fadvise.2:189
7922 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7923 "of registers (see B<syscall>(2) for further detail). On such "
7924 "architectures, the call signature of B<posix_fadvise>() shown in the "
7925 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7926 "and I<offset> arguments. Therefore, these architectures define a version of "
7927 "the system call that orders the arguments suitably, but otherwise is "
7928 "otherwise exactly the same as B<posix_fadvise>()."
7930 "いくつかのアーキテクチャーでは、 64 ビットの引き数は適切なレジスターの組に割"
7931 "り当てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャーでは、 "
7932 "「書式」に書かれている B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 "
7933 "I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費されてし"
7934 "まう。 そのため、 これらのアーキテクチャーでは引き数が適切な順序になった別の"
7935 "システムコールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じで"
7939 #: build/C/man2/posix_fadvise.2:191
7940 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7942 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7945 #: build/C/man2/posix_fadvise.2:196
7948 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7949 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7951 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7952 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7955 #: build/C/man2/posix_fadvise.2:204
7957 "These architecture-specific details are generally hidden from applications "
7958 "by the glibc B<posix_fadvise>() wrapper function, which invokes the "
7959 "appropriate architecture-specific system call."
7961 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7962 "チャー固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適"
7963 "切なアーキテクチャー固有のシステムコールが呼び出される。"
7966 #: build/C/man2/posix_fadvise.2:209
7968 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7969 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7970 "through to the end of the file\"."
7972 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7973 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7976 #. FIXME . Write a posix_fadvise(3) page.
7978 #: build/C/man2/posix_fadvise.2:215
7980 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7981 "B<posix_madvise>(3)"
7983 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7984 "B<posix_madvise>(3)"
7987 #: build/C/man3/posix_fallocate.3:25
7989 msgid "POSIX_FALLOCATE"
7990 msgstr "POSIX_FALLOCATE"
7993 #: build/C/man3/posix_fallocate.3:28
7994 msgid "posix_fallocate - allocate file space"
7995 msgstr "posix_fallocate - ファイルのスペースを確保する"
7998 #: build/C/man3/posix_fallocate.3:33
8000 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
8001 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
8004 #: build/C/man3/posix_fallocate.3:42
8005 msgid "B<posix_fallocate>():"
8006 msgstr "B<posix_fallocate>():"
8009 #: build/C/man3/posix_fallocate.3:61
8011 "The function B<posix_fallocate>() ensures that disk space is allocated for "
8012 "the file referred to by the descriptor I<fd> for the bytes in the range "
8013 "starting at I<offset> and continuing for I<len> bytes. After a successful "
8014 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
8015 "range are guaranteed not to fail because of lack of disk space."
8017 "関数 B<posix_fallocate>() は、ディスクリプター I<fd> で参照されるファイルに"
8018 "対して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から"
8019 "始まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>() の呼び出しが"
8020 "成功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足"
8024 #: build/C/man3/posix_fallocate.3:66
8026 "If the size of the file is less than I<offset>+I<len>, then the file is "
8027 "increased to this size; otherwise the file size is left unchanged."
8029 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
8030 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
8033 #: build/C/man3/posix_fallocate.3:72
8035 "B<posix_fallocate>() returns zero on success, or an error number on "
8036 "failure. Note that I<errno> is not set."
8038 "B<posix_fallocate>() は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
8039 "す。 I<errno> が設定されない点に注意すること。"
8042 #: build/C/man3/posix_fallocate.3:81
8043 msgid "I<offset+len> exceeds the maximum file size."
8044 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
8047 #: build/C/man3/posix_fallocate.3:91
8048 msgid "I<fd> does not refer to a regular file."
8049 msgstr "I<fd> が通常のファイルとして参照されていない。"
8052 #: build/C/man3/posix_fallocate.3:100
8053 msgid "I<fd> refers to a pipe."
8054 msgstr "I<fd> がパイプを参照している。"
8057 #: build/C/man3/posix_fallocate.3:103
8058 msgid "B<posix_fallocate>() is available since glibc 2.1.94."
8059 msgstr "B<posix_fallocate>() は glibc 2.1.94 以降で利用可能である。"
8062 #: build/C/man3/posix_fallocate.3:108
8063 msgid "The B<posix_fallocate>() function is thread-safe."
8064 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
8067 #: build/C/man3/posix_fallocate.3:133
8069 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
8070 "if I<len> was 0, or I<offset> was less than 0. POSIX.1-2001 says that an "
8071 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
8072 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
8075 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
8076 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
8077 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
8078 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
8082 #: build/C/man3/posix_fallocate.3:138
8084 "In the glibc implementation, B<posix_fallocate>() is implemented using "
8087 "glibc の実装では、 B<posix_fallocate>() は B<fallocate>() を使って実装されて"
8091 #: build/C/man3/posix_fallocate.3:143
8092 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8093 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8096 #: build/C/man3/posix_memalign.3:29
8098 msgid "POSIX_MEMALIGN"
8099 msgstr "POSIX_MEMALIGN"
8102 #: build/C/man3/posix_memalign.3:29
8108 #: build/C/man3/posix_memalign.3:32
8110 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8113 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8117 #: build/C/man3/posix_memalign.3:35
8119 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8120 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8123 #: build/C/man3/posix_memalign.3:39
8126 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8127 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8128 "B<void *valloc(size_t >I<size>B<);>\n"
8130 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8131 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8132 "B<void *valloc(size_t >I<size>B<);>\n"
8135 #: build/C/man3/posix_memalign.3:44
8138 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8139 "B<void *pvalloc(size_t >I<size>B<);>\n"
8141 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8142 "B<void *pvalloc(size_t >I<size>B<);>\n"
8145 #: build/C/man3/posix_memalign.3:54
8147 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8150 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8154 #: build/C/man3/posix_memalign.3:57
8155 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8156 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8159 #: build/C/man3/posix_memalign.3:59
8160 msgid "B<valloc>():"
8161 msgstr "B<valloc>():"
8164 #: build/C/man3/posix_memalign.3:62
8166 msgid "Since glibc 2.12:"
8167 msgstr "glibc 2.12 以降:"
8170 #: build/C/man3/posix_memalign.3:69
8174 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8175 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8176 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8179 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8180 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8181 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8184 #: build/C/man3/posix_memalign.3:71
8186 msgid "Before glibc 2.12:"
8187 msgstr "glibc 2.12 より前:"
8190 #: build/C/man3/posix_memalign.3:75
8192 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8193 "_XOPEN_SOURCE_EXTENDED"
8195 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8196 "_XOPEN_SOURCE_EXTENDED"
8199 #: build/C/man3/posix_memalign.3:82
8201 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8202 "declaration of B<valloc>(); no feature test macros are required.)"
8204 "((非標準の) ヘッダーファイル I<E<lt>malloc.hE<gt>> も\n"
8205 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8209 #: build/C/man3/posix_memalign.3:104
8211 "The function B<posix_memalign>() allocates I<size> bytes and places the "
8212 "address of the allocated memory in I<*memptr>. The address of the allocated "
8213 "memory will be a multiple of I<alignment>, which must be a power of two and "
8214 "a multiple of I<sizeof(void\\ *)>. If I<size> is 0, then the value placed "
8215 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8216 "successfully passed to B<free>(3)."
8218 "関数 B<posix_memalign>() は、 I<size> バイトのメモリーを割り当て、割り当てら"
8219 "れたメモリーのアドレスを I<*memptr> に設定する。 割り当てられたメモリーのアド"
8220 "レスは I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗"
8221 "で、かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場"
8222 "合、 I<*memptr> には NULL か一意なポインター値が書かれる。 このポインター値"
8223 "は、後で B<free>(3) に問題なく渡すことができる。"
8225 #. The behavior of memalign() for size==0 is as for posix_memalign()
8226 #. but no standards govern this.
8228 #: build/C/man3/posix_memalign.3:115
8230 "The obsolete function B<memalign>() allocates I<size> bytes and returns a "
8231 "pointer to the allocated memory. The memory address will be a multiple of "
8232 "I<alignment>, which must be a power of two."
8234 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリーを割り当"
8236 "割り当てられたメモリーへのポインターを返す。 メモリーのアドレスは "
8238 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8241 #: build/C/man3/posix_memalign.3:124
8243 "The function B<aligned_alloc>() is the same as B<memalign>(), except for "
8244 "the added restriction that I<size> should be a multiple of I<alignment>."
8246 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8248 "の倍数でなければならないという追加の制限がある点が異なる。"
8251 #: build/C/man3/posix_memalign.3:133
8253 "The obsolete function B<valloc>() allocates I<size> bytes and returns a "
8254 "pointer to the allocated memory. The memory address will be a multiple of "
8255 "the page size. It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8257 "廃止された関数である B<valloc>() は I<size> バイトのメモリーを割り当て、割り"
8258 "当てられたメモリーへのポインターを返す。 メモリーのアドレスはページサイズの倍"
8259 "数になっているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と"
8263 #: build/C/man3/posix_memalign.3:140
8265 "The obsolete function B<pvalloc>() is similar to B<valloc>(), but rounds "
8266 "the size of the allocation up to the next multiple of the system page size."
8268 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8269 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8272 #: build/C/man3/posix_memalign.3:142
8273 msgid "For all of these functions, the memory is not zeroed."
8274 msgstr "これらの関数はいずれもメモリーのゼロクリアを行わない。"
8277 #: build/C/man3/posix_memalign.3:149
8279 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>() return a "
8280 "pointer to the allocated memory, or NULL if the request fails."
8282 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8284 "メモリーへのポインターを返す。 割り当てに失敗した場合は NULL を返す。"
8287 #: build/C/man3/posix_memalign.3:157
8289 "B<posix_memalign>() returns zero on success, or one of the error values "
8290 "listed in the next section on failure. The value of I<errno> is "
8291 "indeterminate after a call to B<posix_memalign>()."
8293 "B<posix_memalign>() は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8294 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8295 "I<errno> の値は不定である。"
8298 #: build/C/man3/posix_memalign.3:164
8300 "The I<alignment> argument was not a power of two, or was not a multiple of "
8301 "I<sizeof(void\\ *)>."
8303 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8307 #: build/C/man3/posix_memalign.3:167
8308 msgid "There was insufficient memory to fulfill the allocation request."
8309 msgstr "割り当て要求を満たすのに十分なメモリーがなかった。"
8312 #: build/C/man3/posix_memalign.3:174
8314 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>() have been "
8315 "available in all Linux libc libraries."
8317 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8318 "すべての Linux libc ライブラリで使用可能である。"
8321 #: build/C/man3/posix_memalign.3:178
8322 msgid "The function B<aligned_alloc>() was added to glibc in version 2.16."
8323 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8326 #: build/C/man3/posix_memalign.3:182
8327 msgid "The function B<posix_memalign>() is available since glibc 2.1.91."
8328 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8331 #: build/C/man3/posix_memalign.3:189
8333 "The function B<valloc>() appeared in 3.0BSD. It is documented as being "
8334 "obsolete in 4.3BSD, and as legacy in SUSv2. It does not appear in "
8337 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8339 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8342 #: build/C/man3/posix_memalign.3:193
8343 msgid "The function B<pvalloc>() is a GNU extension."
8344 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8347 #: build/C/man3/posix_memalign.3:197
8348 msgid "The function B<memalign>() appears in SunOS 4.1.3 but not in 4.4BSD."
8349 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8352 #: build/C/man3/posix_memalign.3:201
8353 msgid "The function B<posix_memalign>() comes from POSIX.1d."
8354 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8357 #: build/C/man3/posix_memalign.3:206
8358 msgid "The function B<aligned_alloc>() is specified in the C11 standard."
8359 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8362 #: build/C/man3/posix_memalign.3:206
8368 #: build/C/man3/posix_memalign.3:210
8370 "Everybody agrees that B<posix_memalign>() is declared in I<E<lt>stdlib."
8373 "B<posix_memalign>() の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8377 #: build/C/man3/posix_memalign.3:214
8379 "On some systems B<memalign>() is declared in I<E<lt>stdlib.hE<gt>> instead "
8380 "of I<E<lt>malloc.hE<gt>>."
8382 "いくつかのシステムでは、 B<memalign>() は I<E<lt>malloc.hE<gt>> ではなく "
8383 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8386 #: build/C/man3/posix_memalign.3:221
8388 "According to SUSv2, B<valloc>() is declared in I<E<lt>stdlib.hE<gt>>. "
8389 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8390 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8393 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8395 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8396 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8399 #: build/C/man3/posix_memalign.3:230
8401 "On many systems there are alignment restrictions, for example, on buffers "
8402 "used for direct block device I/O. POSIX specifies the I<pathconf(path,"
8403 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed. Now one can "
8404 "use B<posix_memalign>() to satisfy this requirement."
8406 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8407 "スに対するダイレクト I/O に使用するバッファーには アラインメントに関する制限"
8408 "がある。 POSIX では、どんなアラインメントが必要かを知るために "
8409 "I<pathconf(path,_PC_REC_XFER_ALIGN)> コールを規定している。ここで "
8410 "B<posix_memalign>() を使うと、この必要条件を満たすことができる。"
8413 #: build/C/man3/posix_memalign.3:239
8415 "B<posix_memalign>() verifies that I<alignment> matches the requirements "
8416 "detailed above. B<memalign>() may not check that the I<alignment> argument "
8419 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8420 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8423 #. Other systems allow passing the result of
8430 #: build/C/man3/posix_memalign.3:267
8432 "POSIX requires that memory obtained from B<posix_memalign>() can be freed "
8433 "using B<free>(3). Some systems provide no way to reclaim memory allocated "
8434 "with B<memalign>() or B<valloc>() (because one can pass to B<free>(3) "
8435 "only a pointer obtained from B<malloc>(3), while, for example, "
8436 "B<memalign>() would call B<malloc>(3) and then align the obtained value). "
8437 "The glibc implementation allows memory obtained from any of these functions "
8438 "to be reclaimed with B<free>(3)."
8440 "POSIX では B<posix_memalign>() によって獲得したメモリーは B<free>(3) を\n"
8441 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8442 "B<memalign>() やB<valloc>() で割り当てられたメモリーを再利用する手段が\n"
8443 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8444 "B<malloc>(3) から受け取ったポインターだけだが、例えば B<memalign>() は\n"
8445 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8446 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリーも\n"
8447 "B<free>(3) で再利用することができる。"
8450 #: build/C/man3/posix_memalign.3:272
8452 "The glibc B<malloc>(3) always returns 8-byte aligned memory addresses, so "
8453 "these functions are needed only if you require larger alignment values."
8455 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリーアドレス"
8457 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8462 #: build/C/man3/posix_memalign.3:277
8463 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8464 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8467 #: build/C/man2/readahead.2:28
8473 #: build/C/man2/readahead.2:28
8479 #: build/C/man2/readahead.2:31
8480 msgid "readahead - initiate file readahead into page cache"
8481 msgstr "readahead - 前もってファイルをページキャッシュに読み込む"
8484 #: build/C/man2/readahead.2:37
8486 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8487 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8490 #: build/C/man2/readahead.2:44
8492 "B<readahead>() initiates readahead on a file so that subsequent reads from "
8493 "that file will be satisfied from the cache, and not block on disk I/O "
8494 "(assuming the readahead was initiated early enough and that other activity "
8495 "on the system did not in the meantime flush pages from the cache)."
8497 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8498 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8499 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8500 "ページがフラッシュされない場合である)。"
8503 #: build/C/man2/readahead.2:66
8505 "The I<fd> argument is a file descriptor identifying the file which is to be "
8506 "read. The I<offset> argument specifies the starting point from which data "
8507 "is to be read and I<count> specifies the number of bytes to be read. I/O is "
8508 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8509 "page boundary and bytes are read up to the next page boundary greater than "
8510 "or equal to I<(offset+count)>. B<readahead>() does not read beyond the end "
8511 "of the file. The current file offset of the open file referred to by I<fd> "
8512 "is left unchanged."
8514 "I<fd> 引き数は読み込みを行うファイルを識別するファイルディスクリプターであ"
8515 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8516 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8517 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8518 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>() は"
8519 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8520 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8523 #: build/C/man2/readahead.2:72
8525 "On success, B<readahead>() returns 0; on failure, -1 is returned, with "
8526 "I<errno> set to indicate the cause of the error."
8528 "B<readahead>() は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8532 #: build/C/man2/readahead.2:77
8533 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8535 "I<fd> が有効なファイルディスクリプターでない、または 読み込み用にオープンされ"
8539 #: build/C/man2/readahead.2:83
8541 "I<fd> does not refer to a file type to which B<readahead>() can be applied."
8543 "I<fd> が参照しているファイルが、 B<readahead>() を行うことができないタイプの"
8547 #: build/C/man2/readahead.2:88
8549 "The B<readahead>() system call appeared in Linux 2.4.13; glibc support has "
8550 "been provided since version 2.3."
8552 "B<readahead>() システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8553 "は glibc バージョン 2.3 以降で行われている。"
8556 #: build/C/man2/readahead.2:93
8558 "The B<readahead>() system call is Linux-specific, and its use should be "
8559 "avoided in portable applications."
8561 "B<readahead>() システムコールは Linux 固有であり、移植を考慮したプログラムで"
8565 #: build/C/man2/readahead.2:98
8567 "On some 32-bit architectures, the calling signature for this system call "
8568 "differs, for the reasons described in B<syscall>(2)."
8570 "いくつかの 32 ビットアーキテクチャーでは、このシステムコールの呼び出しシグネ"
8571 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8574 #: build/C/man2/readahead.2:107
8576 "B<readahead>() attempts to schedule the reads in the background and return "
8577 "immediately. However, it may block while it reads the filesystem metadata "
8578 "needed to locate the requested blocks. This occurs frequently with ext[234] "
8579 "on large files using indirect blocks instead of extents, giving the "
8580 "appearance that the call blocks until the requested data has been read."
8582 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8583 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8584 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8585 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8586 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8590 #: build/C/man2/readahead.2:113
8591 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8593 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8596 #: build/C/man2/remap_file_pages.2:28
8598 msgid "REMAP_FILE_PAGES"
8599 msgstr "REMAP_FILE_PAGES"
8602 #: build/C/man2/remap_file_pages.2:31
8603 msgid "remap_file_pages - create a nonlinear file mapping"
8604 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8607 #: build/C/man2/remap_file_pages.2:35
8610 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
8611 "B<#include E<lt>sys/mman.hE<gt>>\n"
8613 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
8614 "B<#include E<lt>sys/mman.hE<gt>>\n"
8617 #: build/C/man2/remap_file_pages.2:38
8620 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8621 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8623 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8624 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8626 #. commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8627 #. http://lwn.net/Articles/597632/
8629 #: build/C/man2/remap_file_pages.2:47
8631 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8632 "eventually be replaced by a slower in-kernel emulation. Those few "
8633 "applications that use this system call should consider migrating to "
8636 "B<注意>: このシステムコールは (Linux 3.16 以降で) 非推奨となっており、 やがて"
8637 "より低速なカーネル内でのエミュレーションに置き換えられる予定である。 このシス"
8638 "テムコールを使用しているアプリケーションは少ないが、こうしたアプリケーション"
8639 "は代替手段への移行を検討すべきである。"
8642 #: build/C/man2/remap_file_pages.2:59
8644 "The B<remap_file_pages>() system call is used to create a nonlinear "
8645 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8646 "nonsequential order in memory. The advantage of using "
8647 "B<remap_file_pages>() over using repeated calls to B<mmap>(2) is that the "
8648 "former approach does not require the kernel to create additional VMA "
8649 "(Virtual Memory Area) data structures."
8651 "B<remap_file_pages>() システムコールは非線形なマッピング、 つまりファイルの"
8652 "ページがメモリー上で連続しない順番でマップされる マッピングを作成するために使"
8653 "われる。 B<remap_file_pages>() を使う方が B<mmap>(2) を繰り返して使うより優"
8654 "れている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモ"
8655 "リー領域) データ構造体を追加で作成する必要がないことである。"
8658 #: build/C/man2/remap_file_pages.2:61
8659 msgid "To create a nonlinear mapping we perform the following steps:"
8660 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8663 #: build/C/man2/remap_file_pages.2:61 build/C/man2/memfd_create.2:219
8669 #: build/C/man2/remap_file_pages.2:69
8671 "Use B<mmap>(2) to create a mapping (which is initially linear). This "
8672 "mapping must be created with the B<MAP_SHARED> flag."
8674 "B<mmap>(2) を使い、マッピングを作成する (このマッピングは最初は線形であ"
8675 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8679 #: build/C/man2/remap_file_pages.2:69 build/C/man2/memfd_create.2:225
8685 #: build/C/man2/remap_file_pages.2:77
8687 "Use one or more calls to B<remap_file_pages>() to rearrange the "
8688 "correspondence between the pages of the mapping and the pages of the file. "
8689 "It is possible to map the same page of a file into multiple locations within "
8690 "the mapped region."
8692 "B<remap_file_pages>() を 1 回以上呼び出して、 マッピングのページとファイルの"
8693 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8697 #: build/C/man2/remap_file_pages.2:88
8699 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8700 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8701 "system page size; I<size> is the length of the region in bytes."
8703 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8704 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8705 "る。 I<size> は領域の長さであり、単位はバイトである。"
8708 #: build/C/man2/remap_file_pages.2:106
8710 "The I<addr> argument serves two purposes. First, it identifies the mapping "
8711 "whose pages we want to rearrange. Thus, I<addr> must be an address that "
8712 "falls within a region previously mapped by a call to B<mmap>(2). Second, "
8713 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8714 "and I<size> will be placed."
8716 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8717 "成したいページの マッピングを識別することである。 よって I<addr> は "
8718 "B<mmap>(2) の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8719 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8720 "予定のアドレスを、 I<addr> によって指定することである。"
8722 #. This rounding is weird, and not consistent with the treatment of
8723 #. the analogous arguments for munmap()/mprotect() and for mlock().
8726 #: build/C/man2/remap_file_pages.2:120
8728 "The values specified in I<addr> and I<size> should be multiples of the "
8729 "system page size. If they are not, then the kernel rounds I<both> values "
8730 "I<down> to the nearest multiple of the page size."
8732 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8733 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8737 #: build/C/man2/remap_file_pages.2:124
8738 msgid "The I<prot> argument must be specified as 0."
8739 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8742 #: build/C/man2/remap_file_pages.2:132
8744 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8745 "other than B<MAP_NONBLOCK> are ignored."
8747 "I<flags> 引き数は B<mmap>(2) のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8751 #: build/C/man2/remap_file_pages.2:139
8753 "On success, B<remap_file_pages>() returns 0. On error, -1 is returned, and "
8754 "I<errno> is set appropriately."
8756 "成功した場合、 B<remap_file_pages>() は 0 を返す。 エラーの場合、-1 が返さ"
8757 "れ、 I<errno> が適切に設定される。"
8760 #: build/C/man2/remap_file_pages.2:147
8762 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8765 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8768 #. And possibly others from vma->vm_ops->populate()
8770 #: build/C/man2/remap_file_pages.2:156
8771 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8772 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8775 #: build/C/man2/remap_file_pages.2:161
8777 "The B<remap_file_pages>() system call appeared in Linux 2.5.46; glibc "
8778 "support was added in version 2.3.3."
8780 "B<remap_file_pages>() システムコールは Linux 2.5.46 で登場した。 glibc での"
8781 "サポートは glibc バージョン 2.3.3 で追加された。"
8784 #: build/C/man2/remap_file_pages.2:165
8785 msgid "The B<remap_file_pages>() system call is Linux-specific."
8786 msgstr "B<remap_file_pages>() システムコールは Linux 固有のものである。"
8788 #. commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8790 #: build/C/man2/remap_file_pages.2:176
8792 "Since Linux 2.6.23, B<remap_file_pages>() creates non-linear mappings only "
8793 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs. On filesystems "
8794 "with a backing store, B<remap_file_pages>() is not much more efficient than "
8795 "using B<mmap>(2) to adjust which parts of the file are mapped to which "
8798 "Linux 2.6.23 以降、 B<remap_file_pages>() は tmpfs, hugetlbfs, ramfs などのイ"
8799 "ンメモリーファイルシステム上にのみ非線形マッピングを作成する。 裏にデータスト"
8800 "アを持つファイルシステム上では、 B<remap_file_pages>() は、 ファイルのどの部"
8801 "分がどのアドレスにマッピングされているかの調整が、 B<mmap>(2) を使った場合ほ"
8805 #: build/C/man2/remap_file_pages.2:183
8807 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8810 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8814 #: build/C/man3/shm_open.3:26
8820 #: build/C/man3/shm_open.3:29
8822 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8824 "shm_open, shm_unlink - POSIX 共有メモリーオブジェクトの作成/オープン/削除を行"
8828 #: build/C/man3/shm_open.3:33
8829 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8830 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8833 #: build/C/man3/shm_open.3:35
8834 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8835 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8838 #: build/C/man3/shm_open.3:37
8840 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8842 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8845 #: build/C/man3/shm_open.3:39
8846 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8847 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8850 #: build/C/man3/shm_open.3:41
8851 msgid "Link with I<-lrt>."
8852 msgstr "I<-lrt> でリンクする。"
8855 #: build/C/man3/shm_open.3:53
8857 "B<shm_open>() creates and opens a new, or opens an existing, POSIX shared "
8858 "memory object. A POSIX shared memory object is in effect a handle which can "
8859 "be used by unrelated processes to B<mmap>(2) the same region of shared "
8860 "memory. The B<shm_unlink>() function performs the converse operation, "
8861 "removing an object previously created by B<shm_open>()."
8863 "B<shm_open>() は、POSIX 共有メモリーオブジェクトを新規に作成/オープンした"
8864 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリーオブ"
8865 "ジェクトは、実際には、関係のないプロセスが 共有メモリーの同じ領域を "
8866 "B<mmap>(2) するために使用することができる手段である。 B<shm_unlink>() は、"
8867 "逆の操作、つまり以前に B<shm_open>() で作成されたオブジェクトの削除を行う。"
8869 #. glibc allows the initial slash to be omitted, and makes
8870 #. multiple initial slashes equivalent to a single slash.
8871 #. This differs from the implementation of POSIX message queues.
8872 #. glibc allows subdirectory components in the name, in which
8873 #. case the subdirectory must exist under /dev/shm, and allow the
8874 #. required permissions if a user wants to create a shared memory
8875 #. object in that subdirectory.
8877 #: build/C/man3/shm_open.3:74
8879 "The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> "
8880 "specifies the shared memory object to be created or opened. For portable "
8881 "use, a shared memory object should be identified by a name of the form I</"
8882 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8883 "255) characters consisting of an initial slash, followed by one or more "
8884 "characters, none of which are slashes."
8886 "B<shm_open>() の動作は B<open>(2) とよく似ている。 I<name> で作成したりオー"
8887 "プンしたりする共有メモリーオブジェクトを指定する。 移植性を持たせるためには、"
8888 "共有メモリーオブジェクトは I</somename> という形式の名前で識別し、 その名前"
8889 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8890 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8893 #: build/C/man3/shm_open.3:81
8895 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8896 "or B<O_RDWR> and any of the other flags listed here:"
8898 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8899 "述べる他のフラグの論理和をとったもの を指定する。"
8902 #: build/C/man3/shm_open.3:81
8905 msgstr "B<O_RDONLY>"
8908 #: build/C/man3/shm_open.3:89
8910 "Open the object for read access. A shared memory object opened in this way "
8911 "can be B<mmap>(2)ed only for read (B<PROT_READ>) access."
8913 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8914 "された共有メモリーオブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8915 "B<mmap>(2) することができる。"
8918 #: build/C/man3/shm_open.3:89
8924 #: build/C/man3/shm_open.3:92
8925 msgid "Open the object for read-write access."
8926 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8929 #: build/C/man3/shm_open.3:92
8934 #. In truth it is actually the filesystem IDs on Linux, but these
8935 #. are nearly always the same as the effective IDs. (MTK, Jul 05)
8937 #: build/C/man3/shm_open.3:112
8939 "Create the shared memory object if it does not exist. The user and group "
8940 "ownership of the object are taken from the corresponding effective IDs of "
8941 "the calling process, and the object's permission bits are set according to "
8942 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8943 "file mode creation mask (see B<umask>(2)) are cleared for the new object. "
8944 "A set of macro constants which can be used to define I<mode> is listed in "
8945 "B<open>(2). (Symbolic definitions of these constants can be obtained by "
8946 "including I<E<lt>sys/stat.hE<gt>>.)"
8948 "存在しない場合、共有メモリーオブジェクトを作成する。 オブジェクトのユーザーと"
8949 "グループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェ"
8950 "クトの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファ"
8951 "イルモード作成マスク (B<umask>(2) 参照) に設定されている値は、新規オブジェク"
8952 "トに関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)"
8953 "は B<open>(2) に記載されている (これらの定数のシンボル定義は I<E<lt>sys/"
8954 "stat.hE<gt>> のインクルードにより得られる)。"
8957 #: build/C/man3/shm_open.3:118
8959 "A new shared memory object initially has zero length\\(emthe size of the "
8960 "object can be set using B<ftruncate>(2). The newly allocated bytes of a "
8961 "shared memory object are automatically initialized to 0."
8963 "新規に作成された共有メモリーオブジェクトは長さ 0 で初期化される。 オブジェク"
8964 "トの大きさは B<ftruncate>(2) を使って設定できる。 共有メモリーオブジェクトと"
8965 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8968 #: build/C/man3/shm_open.3:118
8974 #: build/C/man3/shm_open.3:127
8976 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8977 "I<name> already exists, return an error. The check for the existence of the "
8978 "object, and its creation if it does not exist, are performed atomically."
8980 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリーオブジェ"
8981 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8982 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8986 #: build/C/man3/shm_open.3:127
8992 #: build/C/man3/shm_open.3:130
8993 msgid "If the shared memory object already exists, truncate it to zero bytes."
8995 "共有メモリーオブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8999 #: build/C/man3/shm_open.3:133
9001 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
9004 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
9007 #: build/C/man3/shm_open.3:144
9009 "On successful completion B<shm_open>() returns a new file descriptor "
9010 "referring to the shared memory object. This file descriptor is guaranteed "
9011 "to be the lowest-numbered file descriptor not previously opened within the "
9012 "process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file "
9015 "成功して完了した場合、 B<shm_open>() は共有メモリーオブジェクトを参照する新"
9016 "しいファイルディスクリプターを返す。 このファイルディスクリプターは、そのプロ"
9017 "セス内で過去にオープンされていない ファイルディスクリプターの中で最も小さな数"
9018 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2) を参照) が、この"
9019 "ファイルディスクリプターに設定される。"
9022 #: build/C/man3/shm_open.3:153
9024 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2) "
9025 "(for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) "
9026 "the file descriptor may be closed without affecting the memory mapping."
9028 "通常、これらのファイルディスクリプターは、この後続けて実行される "
9029 "B<ftruncate>(2) (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2) の呼"
9030 "び出しに使用される。 B<mmap>(2) を呼び出した後は、ファイルディスクリプターを"
9031 "クローズしてもよく、 クローズしてもメモリーマッピングに影響を与えることはな"
9035 #: build/C/man3/shm_open.3:171
9037 "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a "
9038 "shared memory object name, and, once all processes have unmapped the object, "
9039 "de-allocates and destroys the contents of the associated memory region. "
9040 "After a successful B<shm_unlink>(), attempts to B<shm_open>() an object "
9041 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
9042 "case a new, distinct object is created)."
9044 "B<shm_unlink>() の動作は B<unlink>(2) とよく似ている: 共有メモリーオブジェ"
9045 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
9046 "でオブジェクトの割り当てを解除し、 対応するメモリー領域の内容を破棄する。 "
9047 "B<shm_unlink>() が成功した後で、同じ I<name> を持つオブジェクトに対して "
9048 "B<shm_open>() を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
9049 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
9052 #: build/C/man3/shm_open.3:180
9054 "On success, B<shm_open>() returns a nonnegative file descriptor. On "
9055 "failure, B<shm_open>() returns -1. B<shm_unlink>() returns 0 on success, "
9058 "成功した場合、 B<shm_open>() は非負のファイルディスクリプターを返す。 失敗し"
9059 "た場合、 B<shm_open>() は -1 を返す。 B<shm_unlink>() は、成功した場合 0 "
9060 "を、エラーが起こった場合 -1 を返す。"
9063 #: build/C/man3/shm_open.3:187
9065 "On failure, I<errno> is set to indicate the cause of the error. Values "
9066 "which may appear in I<errno> include the following:"
9068 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
9072 #: build/C/man3/shm_open.3:192
9073 msgid "Permission to B<shm_unlink>() the shared memory object was denied."
9074 msgstr "共有メモリーオブジェクトを B<shm_unlink>() する権限がなかった。"
9077 #: build/C/man3/shm_open.3:202
9079 "Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or "
9080 "B<O_TRUNC> was specified and the caller does not have write permission on "
9083 "指定された I<mode> で I<name> を B<shm_open>() する権限がなかった。もしく"
9084 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
9088 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
9094 #: build/C/man3/shm_open.3:213
9096 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the "
9097 "shared memory object specified by I<name> already exists."
9099 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>() に指定されたが、 I<name> で指"
9100 "定された共有メモリーオブジェクトが既に存在した。"
9103 #: build/C/man3/shm_open.3:220
9104 msgid "The I<name> argument to B<shm_open>() was invalid."
9105 msgstr "B<shm_open>() に与えられた I<name> 引き数が不正であった。"
9108 #: build/C/man3/shm_open.3:220 build/C/man2/memfd_create.2:146
9114 #: build/C/man3/shm_open.3:223
9115 msgid "The process already has the maximum number of files open."
9116 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9119 #: build/C/man3/shm_open.3:223
9121 msgid "B<ENAMETOOLONG>"
9122 msgstr "B<ENAMETOOLONG>"
9125 #: build/C/man3/shm_open.3:229
9126 msgid "The length of I<name> exceeds B<PATH_MAX>."
9127 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9130 #: build/C/man3/shm_open.3:233
9132 "The limit on the total number of files open on the system has been reached."
9133 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9136 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9137 #: build/C/man2/shmget.2:225
9143 #: build/C/man3/shm_open.3:242
9145 "An attempt was made to B<shm_open>() a I<name> that did not exist, and "
9146 "B<O_CREAT> was not specified."
9148 "存在していない I<name> のオブジェクトを B<shm_open>() しようとしたが、 "
9149 "B<O_CREAT> が指定されていなかった。"
9152 #: build/C/man3/shm_open.3:249
9154 "An attempt was to made to B<shm_unlink>() a I<name> that does not exist."
9155 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>() しようとした。"
9158 #: build/C/man3/shm_open.3:251
9159 msgid "These functions are provided in glibc 2.2 and later."
9160 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9163 #: build/C/man3/shm_open.3:257
9165 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9166 "object is set to either the calling process's effective group ID or \"a "
9167 "system default group ID\"."
9169 "POSIX.1-2001 には、新規に作成される共有メモリーオブジェクトのグループ所有権"
9170 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9171 "ID」 のどちらかに設定される、と書かれている。"
9174 #: build/C/man3/shm_open.3:266
9176 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9177 "unspecified. On Linux, this will successfully truncate an existing shared "
9178 "memory object\\(emthis may not be so on other UNIX systems."
9180 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9181 "いる。Linux では、 既存の共有メモリーオブジェクトに対する切り詰め (truncate) "
9182 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9185 #: build/C/man3/shm_open.3:271
9187 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9188 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9190 "Linux 2.4 における POSIX 共有メモリーオブジェクトの実装は 専用のファイルシス"
9191 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9194 #: build/C/man3/shm_open.3:283
9196 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9197 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9198 "B<shm_overview>(7)"
9200 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9201 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9202 "B<shm_overview>(7)"
9205 #: build/C/man7/shm_overview.7:27
9207 msgid "SHM_OVERVIEW"
9208 msgstr "SHM_OVERVIEW"
9211 #: build/C/man7/shm_overview.7:27
9217 #: build/C/man7/shm_overview.7:30
9218 msgid "shm_overview - overview of POSIX shared memory"
9219 msgstr "shm_overview - POSIX 共有メモリーの概要"
9222 #: build/C/man7/shm_overview.7:33
9224 "The POSIX shared memory API allows processes to communicate information by "
9225 "sharing a region of memory."
9227 "POSIX 共有メモリー API を使用すると、メモリーのある領域を共有して、 プロセス"
9228 "間で情報をやり取りすることができる。"
9231 #: build/C/man7/shm_overview.7:35
9232 msgid "The interfaces employed in the API are:"
9233 msgstr "この API では以下のインターフェースが採用されている。"
9236 #: build/C/man7/shm_overview.7:35
9238 msgid "B<shm_open>(3)"
9239 msgstr "B<shm_open>(3)"
9242 #: build/C/man7/shm_overview.7:42
9244 "Create and open a new object, or open an existing object. This is analogous "
9245 "to B<open>(2). The call returns a file descriptor for use by the other "
9246 "interfaces listed below."
9248 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9249 "する。これは B<open>(2) と同じである。下記にある他のインターフェースで使用す"
9250 "る ファイルディスクリプターを返す。"
9253 #: build/C/man7/shm_overview.7:42
9255 msgid "B<ftruncate>(2)"
9256 msgstr "B<ftruncate>(2)"
9259 #: build/C/man7/shm_overview.7:46
9261 "Set the size of the shared memory object. (A newly created shared memory "
9262 "object has a length of zero.)"
9263 msgstr "共有メモリーオブジェクトの大きさを設定する。"
9266 #: build/C/man7/shm_overview.7:50
9268 "Map the shared memory object into the virtual address space of the calling "
9271 "呼び出したプロセスの仮想アドレス空間に共有メモリーオブジェクトを マップする。"
9274 #: build/C/man7/shm_overview.7:50
9276 msgid "B<munmap>(2)"
9277 msgstr "B<munmap>(2)"
9280 #: build/C/man7/shm_overview.7:54
9282 "Unmap the shared memory object from the virtual address space of the calling "
9285 "呼び出したプロセスの仮想アドレス空間から 共有メモリーオブジェクトをアンマップ"
9289 #: build/C/man7/shm_overview.7:54
9291 msgid "B<shm_unlink>(3)"
9292 msgstr "B<shm_unlink>(3)"
9295 #: build/C/man7/shm_overview.7:57
9296 msgid "Remove a shared memory object name."
9297 msgstr "共有メモリーオブジェクト名を削除する。"
9300 #: build/C/man7/shm_overview.7:57
9303 msgstr "B<close>(2)"
9306 #: build/C/man7/shm_overview.7:62
9308 "Close the file descriptor allocated by B<shm_open>(3) when it is no longer "
9311 "B<shm_open>(3) で割り当てられたファイルディスクリプターが不要になった際に、 "
9312 "そのファイルディスクリプターをクローズする。"
9315 #: build/C/man7/shm_overview.7:62
9318 msgstr "B<fstat>(2)"
9321 #: build/C/man7/shm_overview.7:76
9323 "Obtain a I<stat> structure that describes the shared memory object. Among "
9324 "the information returned by this call are the object's size (I<st_size>), "
9325 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9327 "その共有メモリーオブジェクトについての情報が入った I<stat> 構造体を取得す"
9328 "る。 このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許"
9329 "可属性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>) がある。"
9332 #: build/C/man7/shm_overview.7:76
9334 msgid "B<fchown>(2)"
9335 msgstr "B<fchown>(2)"
9338 #: build/C/man7/shm_overview.7:79
9339 msgid "To change the ownership of a shared memory object."
9340 msgstr "共有メモリーオブジェクトの所有権を変更する。"
9343 #: build/C/man7/shm_overview.7:79
9345 msgid "B<fchmod>(2)"
9346 msgstr "B<fchmod>(2)"
9349 #: build/C/man7/shm_overview.7:82
9350 msgid "To change the permissions of a shared memory object."
9351 msgstr "共有メモリーオブジェクトの許可属性を変更する。"
9354 #: build/C/man7/shm_overview.7:82
9360 #: build/C/man7/shm_overview.7:84
9361 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9362 msgstr "POSIX 共有メモリーは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9365 #: build/C/man7/shm_overview.7:84
9371 #: build/C/man7/shm_overview.7:89
9373 "POSIX shared memory objects have kernel persistence: a shared memory object "
9374 "will exist until the system is shut down, or until all processes have "
9375 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9377 "POSIX 共有メモリーオブジェクトはカーネル内で保持される。 共有メモリーオブジェ"
9378 "クトは、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトを"
9379 "アンマップし、 B<shm_unlink>(3) で削除されるまで、存在し続ける。"
9382 #: build/C/man7/shm_overview.7:89
9388 #: build/C/man7/shm_overview.7:94
9390 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9391 "to link against the real-time library, I<librt>."
9393 "POSIX 共有メモリー API を使用したプログラムは I<cc -lrt> でコンパイルし、リア"
9394 "ルタイムライブラリ I<librt> とリンクしなければならない。"
9397 #: build/C/man7/shm_overview.7:94
9399 msgid "Accessing shared memory objects via the filesystem"
9400 msgstr "ファイルシステム経由での共有メモリーオブジェクトへのアクセス"
9403 #: build/C/man7/shm_overview.7:101
9405 "On Linux, shared memory objects are created in a (I<tmpfs>) virtual "
9406 "filesystem, normally mounted under I</dev/shm>. Since kernel 2.6.19, Linux "
9407 "supports the use of access control lists (ACLs) to control the permissions "
9408 "of objects in the virtual filesystem."
9410 "Linux では、共有メモリーオブジェクトは通常 I</dev/shm> 以下にマウントされる仮"
9411 "想ファイルシステム (I<tmpfs>) 内に作成される。 カーネル 2.6.19 以降の Linux "
9412 "では、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御"
9413 "リスト (ACL; access control lists) を使うことができる。"
9416 #: build/C/man7/shm_overview.7:106
9418 "Typically, processes must synchronize their access to a shared memory "
9419 "object, using, for example, POSIX semaphores."
9421 "通常は、共有メモリーオブジェクトにアクセスするプロセスは、 POSIX セマフォなど"
9422 "を使ってプロセス間で同期をとらなければならない。"
9425 #: build/C/man7/shm_overview.7:114
9427 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9428 "memory API. POSIX shared memory provides a simpler, and better designed "
9429 "interface; on the other hand POSIX shared memory is somewhat less widely "
9430 "available (especially on older systems) than System V shared memory."
9432 "System V 共有メモリー (B<shmget>(2), B<shmop>(2) など) は古い共有メモリー "
9433 "API である。 POSIX 共有メモリーは、より簡単で、うまく設計されたインターフェー"
9434 "スを提供している。 一方で、POSIX 共有メモリーは System V 共有メモリーと比べる"
9435 "と 利用できるシステムが少ない (特に、古いシステムでは少ない)。"
9438 #: build/C/man7/shm_overview.7:127
9440 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9441 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9442 "B<shm_unlink>(3), B<sem_overview>(7)"
9444 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9445 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9446 "B<shm_unlink>(3), B<sem_overview>(7)"
9449 #: build/C/man2/shmctl.2:45
9455 #: build/C/man2/shmctl.2:45
9461 #: build/C/man2/shmctl.2:48
9462 msgid "shmctl - System V shared memory control"
9463 msgstr "shmctl - System V 共有メモリー (shared memory) を制御する"
9466 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9467 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9468 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9471 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9472 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9473 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9476 #: build/C/man2/shmctl.2:55
9478 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9480 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9483 #: build/C/man2/shmctl.2:62
9485 "B<shmctl>() performs the control operation specified by I<cmd> on the System"
9486 "\\ V shared memory segment whose identifier is given in I<shmid>."
9488 "B<shmctl>() は、識別子が I<shmid> の System\\ V 共有メモリーセグメントに対し"
9489 "て I<cmd> で指示した制御命令を実行する。"
9492 #: build/C/man2/shmctl.2:67
9494 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9495 "I<E<lt>sys/shm.hE<gt>> as follows:"
9497 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインターである。 この構造体は "
9498 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9501 #: build/C/man2/shmctl.2:81
9504 "struct shmid_ds {\n"
9505 " struct ipc_perm shm_perm; /* Ownership and permissions */\n"
9506 " size_t shm_segsz; /* Size of segment (bytes) */\n"
9507 " time_t shm_atime; /* Last attach time */\n"
9508 " time_t shm_dtime; /* Last detach time */\n"
9509 " time_t shm_ctime; /* Last change time */\n"
9510 " pid_t shm_cpid; /* PID of creator */\n"
9511 " pid_t shm_lpid; /* PID of last shmat(2)/shmdt(2) */\n"
9512 " shmatt_t shm_nattch; /* No. of current attaches */\n"
9516 "struct shmid_ds {\n"
9517 " struct ipc_perm shm_perm; /* 所有権と許可 */\n"
9518 " size_t shm_segsz; /* セグメントのサイズ (バイト) */\n"
9519 " time_t shm_atime; /* 最後の付加 (attach) の時刻 */\n"
9520 " time_t shm_dtime; /* 最後の分離 (detach) の時刻 */\n"
9521 " time_t shm_ctime; /* 最後に変更が行われた時刻 */\n"
9522 " pid_t shm_cpid; /* 作成者 (creator) の PID */\n"
9523 " pid_t shm_lpid; /* 最後の shmat(2)/shmdt(2) の PID */\n"
9524 " shmatt_t shm_nattch; /* 現在付加されている数 */\n"
9529 #: build/C/man2/shmctl.2:89
9531 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9532 "settable using B<IPC_SET>):"
9534 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9535 "B<IPC_SET> を使って設定可能である):"
9538 #: build/C/man2/shmctl.2:102
9541 "struct ipc_perm {\n"
9542 " key_t __key; /* Key supplied to shmget(2) */\n"
9543 " uid_t B<uid>; /* Effective UID of owner */\n"
9544 " gid_t B<gid>; /* Effective GID of owner */\n"
9545 " uid_t cuid; /* Effective UID of creator */\n"
9546 " gid_t cgid; /* Effective GID of creator */\n"
9547 " unsigned short B<mode>; /* B<Permissions> + SHM_DEST and\n"
9548 " SHM_LOCKED flags */\n"
9549 " unsigned short __seq; /* Sequence number */\n"
9552 "struct ipc_perm {\n"
9553 " key_t __key; /* shmget(2) に与えられるキー */\n"
9554 " uid_t B<uid>; /* 所有者の実効 UID */\n"
9555 " gid_t B<gid>; /* 所有者の実効 GID */\n"
9556 " uid_t cuid; /* 作成者の実効 UID */\n"
9557 " gid_t cgid; /* 作成者の実効 GID */\n"
9558 " unsigned short B<mode>; /* B<許可> + SHM_DEST と\n"
9559 " SHM_LOCKED フラグ */\n"
9560 " unsigned short __seq; /* シーケンス番号 */\n"
9564 #: build/C/man2/shmctl.2:108
9565 msgid "Valid values for I<cmd> are:"
9566 msgstr "I<cmd> として有効な値は以下の通り:"
9569 #: build/C/man2/shmctl.2:109
9572 msgstr "B<IPC_STAT>"
9575 #: build/C/man2/shmctl.2:118
9577 "Copy information from the kernel data structure associated with I<shmid> "
9578 "into the I<shmid_ds> structure pointed to by I<buf>. The caller must have "
9579 "read permission on the shared memory segment."
9581 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9582 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリーセグメントに対する "
9583 "読み込み許可を持たなければならない。"
9586 #: build/C/man2/shmctl.2:118
9592 #: build/C/man2/shmctl.2:136
9594 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9595 "I<buf> to the kernel data structure associated with this shared memory "
9596 "segment, updating also its I<shm_ctime> member. The following fields can be "
9597 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9598 "of) I<shm_perm.mode>. The effective UID of the calling process must match "
9599 "the owner (I<shm_perm.uid>) or creator (I<shm_perm.cuid>) of the shared "
9600 "memory segment, or the caller must be privileged."
9602 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9603 "有メモリーセグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9604 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9605 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9606 "セスの実効 UID が所有者 (I<shm_perm.uid>) または作成者 (I<shm_perm.cuid>) "
9607 "と一致するか、呼び出し元が特権を持たなければならない。"
9610 #: build/C/man2/shmctl.2:136
9613 msgstr "B<IPC_RMID>"
9616 #: build/C/man2/shmctl.2:149
9619 #| "Mark the segment to be destroyed. The segment will only actually be "
9620 #| "destroyed after the last process detaches it (i.e., when the "
9621 #| "I<shm_nattch> member of the associated structure I<shmid_ds> is zero). "
9622 #| "The caller must be the owner or creator of the segment, or be "
9623 #| "privileged. The I<buf> argument is ignored."
9625 "Mark the segment to be destroyed. The segment will actually be destroyed "
9626 "only after the last process detaches it (i.e., when the I<shm_nattch> member "
9627 "of the associated structure I<shmid_ds> is zero). The caller must be the "
9628 "owner or creator of the segment, or be privileged. The I<buf> argument is "
9631 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9632 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9633 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9634 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9637 #: build/C/man2/shmctl.2:157
9639 "If a segment has been marked for destruction, then the (nonstandard) "
9640 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9641 "structure retrieved by B<IPC_STAT> will be set."
9643 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9644 "I<shm_perm.mode> フィールドの (標準ではない) B<SHM_DEST> フラグが設定され"
9645 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9648 #: build/C/man2/shmctl.2:160
9650 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9651 "its pages that were faulted in will remain in memory or swap."
9653 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9654 "なれば、フォールト (fault) されたページは メモリーかスワップ (swap) に残り続"
9658 #: build/C/man2/shmctl.2:165
9660 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9662 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9665 #: build/C/man2/shmctl.2:165
9667 msgid "B<IPC_INFO> (Linux-specific)"
9668 msgstr "B<IPC_INFO> (Linux 固有)"
9671 #: build/C/man2/shmctl.2:178
9673 "Return information about system-wide shared memory limits and parameters in "
9674 "the structure pointed to by I<buf>. This structure is of type I<shminfo> "
9675 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9676 "B<_GNU_SOURCE> feature test macro is defined:"
9678 "システム全体での共有メモリーの制限とパラメーターに関する情報を、 I<buf> が指"
9679 "す構造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必"
9680 "要である)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9681 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9684 #: build/C/man2/shmctl.2:192
9687 "struct shminfo {\n"
9688 " unsigned long shmmax; /* Maximum segment size */\n"
9689 " unsigned long shmmin; /* Minimum segment size;\n"
9691 " unsigned long shmmni; /* Maximum number of segments */\n"
9692 " unsigned long shmseg; /* Maximum number of segments\n"
9693 " that a process can attach;\n"
9694 " unused within kernel */\n"
9695 " unsigned long shmall; /* Maximum number of pages of\n"
9696 " shared memory, system-wide */\n"
9699 "struct shminfo {\n"
9700 " unsigned long shmmax; /* 最大セグメントサイズ */\n"
9701 " unsigned long shmmin; /* 最小セグメントサイズ。\n"
9703 " unsigned long shmmni; /* 最大セグメント数 */\n"
9704 " unsigned long shmseg; /* プロセスが付加できる\n"
9707 " unsigned long shmall; /* 共有メモリーの最大ページ数。\n"
9712 #: build/C/man2/shmctl.2:205
9714 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9715 "files of the same name; see B<proc>(5) for details."
9717 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9718 "で変更可能である。 詳しくは B<proc>(5) を参照。"
9721 #: build/C/man2/shmctl.2:205
9723 msgid "B<SHM_INFO> (Linux-specific)"
9724 msgstr "B<SHM_INFO> (Linux 固有)"
9727 #: build/C/man2/shmctl.2:216
9729 "Return a I<shm_info> structure whose fields contain information about system "
9730 "resources consumed by shared memory. This structure is defined in "
9731 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9733 "共有メモリーが消費しているシステム資源に関する情報を 格納した I<shm_info> 構"
9734 "造体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9735 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9738 #: build/C/man2/shmctl.2:233
9741 "struct shm_info {\n"
9742 " int used_ids; /* # of currently existing\n"
9744 " unsigned long shm_tot; /* Total number of shared\n"
9745 " memory pages */\n"
9746 " unsigned long shm_rss; /* # of resident shared\n"
9747 " memory pages */\n"
9748 " unsigned long shm_swp; /* # of swapped shared\n"
9749 " memory pages */\n"
9750 " unsigned long swap_attempts;\n"
9751 " /* Unused since Linux 2.4 */\n"
9752 " unsigned long swap_successes;\n"
9753 " /* Unused since Linux 2.4 */\n"
9756 "struct shm_info {\n"
9757 " int used_ids; /* 現在存在するセグメント数 */\n"
9758 " unsigned long shm_tot; /* 共有メモリーのページ総数 */\n"
9759 " unsigned long shm_rss; /* メモリー上にある (スワップされて\n"
9760 " いない) 共有メモリーページ数 */\n"
9761 " unsigned long shm_swp; /* スワップされている共有メモリー\n"
9763 " unsigned long swap_attempts;\n"
9764 " /* Linux 2.4 以降では未使用 */\n"
9765 " unsigned long swap_successes;\n"
9766 " /* Linux 2.4 以降では未使用 */\n"
9770 #: build/C/man2/shmctl.2:235
9772 msgid "B<SHM_STAT> (Linux-specific)"
9773 msgstr "B<SHM_STAT> (Linux 固有)"
9776 #: build/C/man2/shmctl.2:246
9778 "Return a I<shmid_ds> structure as for B<IPC_STAT>. However, the I<shmid> "
9779 "argument is not a segment identifier, but instead an index into the kernel's "
9780 "internal array that maintains information about all shared memory segments "
9783 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9784 "グメント識別子ではなく、システム上の全ての共有メモリー セグメントに関する情報"
9785 "を管理するカーネルの内部配列へのインデックス である。"
9788 #: build/C/man2/shmctl.2:249
9790 "The caller can prevent or allow swapping of a shared memory segment with the "
9791 "following I<cmd> values:"
9793 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリーセグメントが ス"
9794 "ワップされることを防止したり、許可したりできる:"
9797 #: build/C/man2/shmctl.2:250
9799 msgid "B<SHM_LOCK> (Linux-specific)"
9800 msgstr "B<SHM_LOCK> (Linux 固有)"
9803 #: build/C/man2/shmctl.2:262
9805 "Prevent swapping of the shared memory segment. The caller must fault in any "
9806 "pages that are required to be present after locking is enabled. If a "
9807 "segment has been locked, then the (nonstandard) B<SHM_LOCKED> flag of the "
9808 "I<shm_perm.mode> field in the associated data structure retrieved by "
9809 "B<IPC_STAT> will be set."
9811 "共有メモリーセグメントをスワップすることを防止する。 ロックが有効になった後、"
9812 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9813 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9814 "I<shm_perm.mode> フィールドの (標準的ではない) B<SHM_LOCKED> フラグが設定さ"
9815 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9818 #: build/C/man2/shmctl.2:262
9820 msgid "B<SHM_UNLOCK> (Linux-specific)"
9821 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9824 #: build/C/man2/shmctl.2:265
9825 msgid "Unlock the segment, allowing it to be swapped out."
9826 msgstr "セグメントのロックを解除し、スワップアウトすることを可能にする。"
9828 #. There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9829 #. be applied to a segment, regardless of ownership of the segment.
9830 #. This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9831 #. in 2.6.10. MTK, May 2005
9833 #: build/C/man2/shmctl.2:283
9835 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9836 "and B<SHM_UNLOCK>. Since kernel 2.6.10, an unprivileged process can employ "
9837 "these operations if its effective UID matches the owner or creator UID of "
9838 "the segment, and (for B<SHM_LOCK>) the amount of memory to be locked falls "
9839 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9841 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9842 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9843 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9844 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9845 "(B<SHM_LOCK> の場合には) ロックするメモリーの合計が B<RLIMIT_MEMLOCK> リソー"
9846 "ス上限 (B<setrlimit>(2) 参照) の範囲内に入っていることである。"
9849 #: build/C/man2/shmctl.2:301
9851 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9852 "highest used entry in the kernel's internal array recording information "
9853 "about all shared memory segments. (This information can be used with "
9854 "repeated B<SHM_STAT> operations to obtain information about all shared "
9855 "memory segments on the system.) A successful B<SHM_STAT> operation returns "
9856 "the identifier of the shared memory segment whose index was given in "
9857 "I<shmid>. Other operations return 0 on success."
9859 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリーセグメントに"
9860 "関する情報を 管理しているカーネルの内部配列の使用中エントリーのインデックス"
9861 "の うち最大値を返す (この情報は、システムの全ての共有メモリーセグメントに関す"
9862 "る情報を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用でき"
9863 "る)。 B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持"
9864 "つ共有メモリーセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9867 #: build/C/man2/shmctl.2:305
9868 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9869 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9872 #: build/C/man2/shmctl.2:314
9874 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9875 "read access for I<shmid>, and the calling process does not have the "
9876 "B<CAP_IPC_OWNER> capability."
9878 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9879 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9880 "ケーパビリティ (capability) を持っていない。"
9883 #: build/C/man2/shmctl.2:325
9885 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9886 "pointed to by I<buf> isn't accessible."
9888 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9892 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9898 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9899 msgid "I<shmid> points to a removed identifier."
9900 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9903 #: build/C/man2/shmctl.2:337
9905 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command. Or: "
9906 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9907 "to an array slot that is currently unused."
9909 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9910 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9914 #: build/C/man2/shmctl.2:348
9916 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9917 "be-locked segment would mean that the total bytes in locked shared memory "
9918 "segments would exceed the limit for the real user ID of the calling "
9919 "process. This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9920 "(see B<setrlimit>(2))."
9922 "(2.6.9 以降のカーネルにおいて) B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9923 "グメントのサイズ (ロックされる共有メモリーセグメントの合計バイト数) が、 呼び"
9924 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9925 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2) を参照)。"
9928 #: build/C/man2/shmctl.2:353
9930 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9931 "in the structure pointed to by I<buf>."
9933 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9937 #: build/C/man2/shmctl.2:365
9939 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9940 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9941 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9942 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9944 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9945 "作成者 (I<shm_perm.cuid>) でも所有者 (I<shm_perm.uid>) でもなく、プロセスが"
9946 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9949 #: build/C/man2/shmctl.2:377
9951 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9952 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9953 "capability). (Since Linux 2.6.9, this error can also occur if the "
9954 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9956 "または (2.6.9 より前のカーネルで) B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9957 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9958 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9959 "が特権を持たない場合にも、このエラーが起こる。)"
9961 #. SVr4 documents an additional error condition EMFILE.
9963 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9964 #: build/C/man2/shmop.2:231
9965 msgid "SVr4, POSIX.1-2001."
9966 msgstr "SVr4, POSIX.1-2001."
9968 #. Like Linux, the FreeBSD man pages still document
9969 #. the inclusion of these header files.
9971 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9973 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9974 "required on Linux or by any version of POSIX. However, some old "
9975 "implementations required the inclusion of these header files, and the SVID "
9976 "also documented their inclusion. Applications intended to be portable to "
9977 "such old systems may need to include these header files."
9979 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9980 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9981 "実装ではこれらのヘッダーファイルのインクルードが必要であり、 SVID でもこれら"
9982 "のインクルードをするように記載されている。このような古いシステムへの移植性を"
9983 "意図したアプリケーションではこれらのファイルをインクルードする必要があるかも"
9987 #: build/C/man2/shmctl.2:407
9989 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9990 "B<ipcs>(1) program to provide information on allocated resources. In the "
9991 "future, these may modified or moved to a I</proc> filesystem interface."
9993 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1) プログラムで割り当"
9994 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9995 "更されたり、 I</proc> ファイルシステムのインターフェースに移動されるかもしれ"
9999 #: build/C/man2/shmctl.2:415
10001 "Linux permits a process to attach (B<shmat>(2)) a shared memory segment "
10002 "that has already been marked for deletion using I<shmctl(IPC_RMID)>. This "
10003 "feature is not available on other UNIX implementations; portable "
10004 "applications should avoid relying on it."
10006 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
10007 "メモリーセグメントを あるプロセスが付加 (attach) (B<shmat>(2)) することを許"
10008 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
10009 "プリケーションではこれに依存しないようにすべきである。"
10011 #. type: Plain text
10012 #: build/C/man2/shmctl.2:428
10014 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
10015 "2.2 and have become I<long> under Linux 2.4. To take advantage of this, a "
10016 "recompilation under glibc-2.1.91 or later should suffice. (The kernel "
10017 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
10019 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
10020 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
10021 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
10022 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
10024 #. type: Plain text
10025 #: build/C/man2/shmctl.2:435
10027 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10030 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10031 "B<shm_overview>(7), B<svipc>(7)"
10034 #: build/C/man2/shmget.2:38
10040 #: build/C/man2/shmget.2:38
10043 msgstr "2015-01-10"
10045 #. type: Plain text
10046 #: build/C/man2/shmget.2:41
10047 msgid "shmget - allocates a System V shared memory segment"
10048 msgstr "shmget - System V 共有メモリーセグメントを割り当てる"
10050 #. type: Plain text
10051 #: build/C/man2/shmget.2:48
10052 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10053 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10055 #. type: Plain text
10056 #: build/C/man2/shmget.2:72
10058 "B<shmget>() returns the identifier of the System\\ V shared memory segment "
10059 "associated with the value of the argument I<key>. A new shared memory "
10060 "segment, with size equal to the value of I<size> rounded up to a multiple of "
10061 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
10062 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
10063 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
10065 "B<shmget>() は I<key> 引き数に対応する System\\ V 共有メモリーセグメントの識"
10066 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
10067 "共有メモリーセグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
10068 "場合、 新しい共有メモリーセグメントを作成する。 作成される共有メモリーセグメ"
10069 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
10072 #. type: Plain text
10073 #: build/C/man2/shmget.2:91
10075 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
10076 "segment already exists for I<key>, then B<shmget>() fails with I<errno> set "
10077 "to B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT "
10078 "| O_EXCL> for B<open>(2).)"
10080 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
10081 "応する共有メモリーセグメントが既に存在すると、 B<shmget>() は失敗し、 "
10082 "I<errno> に B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | "
10083 "O_EXCL> を指定した場合の動作と同じである)。"
10085 #. type: Plain text
10086 #: build/C/man2/shmget.2:95
10087 msgid "The value I<shmflg> is composed of:"
10088 msgstr "I<shmflg> は以下の内容から構成される:"
10091 #: build/C/man2/shmget.2:95
10093 msgid "B<IPC_CREAT>"
10094 msgstr "B<IPC_CREAT>"
10096 #. type: Plain text
10097 #: build/C/man2/shmget.2:102
10099 "Create a new segment. If this flag is not used, then B<shmget>() will find "
10100 "the segment associated with I<key> and check to see if the user has "
10101 "permission to access the segment."
10103 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>() "
10104 "は I<key> に対応するセグメントを探し、 ユーザーがそのセグメントにアクセスする"
10105 "許可があるかどうかをチェックする。"
10108 #: build/C/man2/shmget.2:102
10110 msgid "B<IPC_EXCL>"
10111 msgstr "B<IPC_EXCL>"
10113 #. type: Plain text
10114 #: build/C/man2/shmget.2:108
10116 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
10117 "segment. If the segment already exists, the call fails."
10119 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
10120 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
10123 #: build/C/man2/shmget.2:108
10125 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10126 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10128 #. type: Plain text
10129 #: build/C/man2/shmget.2:114
10131 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10132 "I<Documentation/vm/hugetlbpage.txt> for further information."
10134 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10135 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10138 #: build/C/man2/shmget.2:114
10140 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10141 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10143 #. As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10145 #. type: Plain text
10146 #: build/C/man2/shmget.2:133
10148 "This flag serves the same purpose as the B<mmap>(2) B<MAP_NORESERVE> flag. "
10149 "Do not reserve swap space for this segment. When swap space is reserved, "
10150 "one has the guarantee that it is possible to modify the segment. When swap "
10151 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10152 "memory is available. See also the discussion of the file I</proc/sys/vm/"
10153 "overcommit_memory> in B<proc>(5)."
10155 "このフラグは、 B<mmap>(2) の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10156 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10157 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10158 "行わなかった場合は、物理メモリーに空きが ないと書き込み時に B<SIGSEGV> を受け"
10159 "取る可能性がある。 B<proc>(5) にある I</proc/sys/vm/overcommit_memory> ファ"
10162 #. type: Plain text
10163 #: build/C/man2/shmget.2:143
10165 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10166 "specify the permissions granted to the owner, group, and others. These bits "
10167 "have the same format, and the same meaning, as the I<mode> argument of "
10168 "B<open>(2). Presently, execute permissions are not used by the system."
10170 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10171 "への許可を指定する。 これらのビットは B<open>(2) の I<mode> 引き数と同じ形式"
10172 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10174 #. type: Plain text
10175 #: build/C/man2/shmget.2:151
10177 "When a new shared memory segment is created, its contents are initialized to "
10178 "zero values, and its associated data structure, I<shmid_ds> (see "
10179 "B<shmctl>(2)), is initialized as follows:"
10181 "共有メモリーセグメントが新たに作成される際、 共有メモリーセグメントの内容は "
10182 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10185 #. type: Plain text
10186 #: build/C/man2/shmget.2:156
10188 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10191 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10194 #. type: Plain text
10195 #: build/C/man2/shmget.2:161
10197 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10198 "the calling process."
10200 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10203 #. type: Plain text
10204 #: build/C/man2/shmget.2:166
10206 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10207 "significant 9 bit of I<shmflg>."
10209 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10211 #. type: Plain text
10212 #: build/C/man2/shmget.2:170
10213 msgid "I<shm_segsz> is set to the value of I<size>."
10214 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10216 #. type: Plain text
10217 #: build/C/man2/shmget.2:177
10219 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10221 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10223 #. type: Plain text
10224 #: build/C/man2/shmget.2:180
10225 msgid "I<shm_ctime> is set to the current time."
10226 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10228 #. type: Plain text
10229 #: build/C/man2/shmget.2:183
10231 "If the shared memory segment already exists, the permissions are verified, "
10232 "and a check is made to see if it is marked for destruction."
10234 "共有メモリーセグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10235 "(destruction) マークがつけられていないかのチェックが行われる。"
10237 #. type: Plain text
10238 #: build/C/man2/shmget.2:188
10240 "On success, a valid shared memory identifier is returned. On error, -1 is "
10241 "returned, and I<errno> is set to indicate the error."
10243 "成功の場合、有効な共有メモリーセグメントの識別子が返される。 エラーの場合、 "
10244 "-1 が返り、 I<errno> にエラーを示す値が設定される。"
10246 #. type: Plain text
10247 #: build/C/man2/shmget.2:192
10248 msgid "On failure, I<errno> is set to one of the following:"
10249 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10251 #. type: Plain text
10252 #: build/C/man2/shmget.2:198
10254 "The user does not have permission to access the shared memory segment, and "
10255 "does not have the B<CAP_IPC_OWNER> capability."
10257 "ユーザーはその共有メモリーセグメントへのアクセス許可を持たず、 "
10258 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10260 #. type: Plain text
10261 #: build/C/man2/shmget.2:207
10263 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10264 "memory segment already exists for I<key>."
10266 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10267 "有メモリーセグメントはすでに存在する。"
10269 #. type: Plain text
10270 #: build/C/man2/shmget.2:215
10272 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10273 "greater than B<SHMMAX>."
10275 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10276 "B<SHMMAX> よりも大きかった。"
10278 #. type: Plain text
10279 #: build/C/man2/shmget.2:221
10281 "A segment for the given I<key> exists, but I<size> is greater than the size "
10284 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10287 #. type: Plain text
10288 #: build/C/man2/shmget.2:230
10290 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10292 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10295 #. type: Plain text
10296 #: build/C/man2/shmget.2:233
10297 msgid "No memory could be allocated for segment overhead."
10298 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリーがなかった。"
10300 #. type: Plain text
10301 #: build/C/man2/shmget.2:241
10303 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10304 "segment of the requested I<size> would cause the system to exceed the system-"
10305 "wide limit on shared memory (B<SHMALL>)."
10307 "システム全体の共有メモリーセグメント数の制限 (B<SHMMNI>) に達した、または要"
10308 "求された I<size> のセグメントの割り当てが システム全体の共有メモリーサイズの"
10309 "制限 (B<SHMALL>) を超過した。"
10311 #. type: Plain text
10312 #: build/C/man2/shmget.2:248
10314 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10315 "(did not have the B<CAP_IPC_LOCK> capability)."
10317 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10318 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10320 #. type: Plain text
10321 #: build/C/man2/shmget.2:256
10322 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10323 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10325 #. type: Plain text
10326 #: build/C/man2/shmget.2:280
10328 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special "
10329 "value is used for I<key>, the system call ignores all but the least "
10330 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10332 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10333 "使用された場合は、 B<shmget>() は I<shmflg> の下位 9 ビットを除いた全てを無"
10334 "視し、 新しい共有メモリーセグメントを作成する。"
10337 #: build/C/man2/shmget.2:280
10339 msgid "Shared memory limits"
10342 #. type: Plain text
10343 #: build/C/man2/shmget.2:284
10345 "The following limits on shared memory segment resources affect the "
10346 "B<shmget>() call:"
10348 "B<shmget>() コールに影響する共有メモリーセグメント資源の制限は以下の通りであ"
10352 #: build/C/man2/shmget.2:284
10357 #. type: Plain text
10358 #: build/C/man2/shmget.2:288
10360 "System-wide limit on the total amount of shared memory, measured in units of "
10361 "the system page size."
10363 "共有メモリーの全使用量のシステム全体での上限値。 システムページサイズが単位で"
10366 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10367 #. type: Plain text
10368 #: build/C/man2/shmget.2:294
10370 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10371 "shmall>. Since Linux 3.16, the default value for this limit is:"
10373 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10374 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10377 #. type: Plain text
10378 #: build/C/man2/shmget.2:296 build/C/man2/shmget.2:331
10380 msgid " ULONG_MAX - 2^24\n"
10381 msgstr " ULONG_MAX - 2^24\n"
10383 #. type: Plain text
10384 #: build/C/man2/shmget.2:307
10386 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10387 "systems) is to impose no limitation on allocations. This value, rather "
10388 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10389 "historical applications simply raised the existing limit without first "
10390 "checking its current value. Such applications would cause the value to "
10391 "overflow if the limit was set at B<ULONG_MAX>."
10393 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10394 "ステムにも 64 ビットシステムにも適したものになっている)。 B<ULONG_MAX> ではな"
10395 "く、この値が選ばれたのは、 古いアプリケーションが最初に現在の値を確認せずに既"
10396 "存の上限をそのまま増やしてしまっても問題が起こらないようなデフォルト値を選ん"
10397 "だからである。 このようなアプリケーションでは、 上限を B<ULONG_MAX> に設定す"
10398 "ると値がオーバーフローしてしまうことになる。"
10400 #. type: Plain text
10401 #: build/C/man2/shmget.2:310
10402 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10403 msgstr "Linux 2.4 から Linux 3.15 では、この上限のデフォルト値は以下であった。"
10405 #. type: Plain text
10406 #: build/C/man2/shmget.2:312
10408 msgid " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10409 msgstr " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10411 #. type: Plain text
10412 #: build/C/man2/shmget.2:320
10414 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10415 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10416 "GB as the limit on the total memory used by all shared memory segments."
10418 "B<SHMMAX> と B<SHMMNI> が変更されないとすると、 この式の結果に (バイト単位の"
10419 "値を得るために) ページサイズを掛け算すると、 全ての共有メモリーセグメントで使"
10420 "用される全メモリーの上限として、 8 GB という値が得られる。"
10423 #: build/C/man2/shmget.2:320
10428 #. type: Plain text
10429 #: build/C/man2/shmget.2:323
10430 msgid "Maximum size in bytes for a shared memory segment."
10431 msgstr "1 つの共有メモリーセグメントの最大サイズ (バイト数)。"
10433 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10434 #. type: Plain text
10435 #: build/C/man2/shmget.2:329
10437 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10438 "shmmax>. Since Linux 3.16, the default value for this limit is:"
10440 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10441 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10444 #. type: Plain text
10445 #: build/C/man2/shmget.2:340
10447 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10448 "systems) is to impose no limitation on allocations. See the description of "
10449 "B<SHMALL> for a discussion of why this default value (rather than "
10450 "B<ULONG_MAX>) is used."
10452 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10453 "ステムにも 64 ビットシステムにも適したものになっている)。 (B<ULONG_MAX> では"
10454 "なく) このデフォルト値が使われている理由については B<SHMALL> の説明を参照。"
10456 #. type: Plain text
10457 #: build/C/man2/shmget.2:343
10459 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10460 "0x2000000 (32MB)."
10462 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10465 #. type: Plain text
10466 #: build/C/man2/shmget.2:349
10468 "Because it is not possible to map just part of a shared memory segment, the "
10469 "amount of virtual memory places another limit on the maximum size of a "
10470 "usable segment: for example, on i386 the largest segments that can be mapped "
10471 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10473 "共有メモリーセグメントの一部分だけをマッピングすることはできないので、 使用可"
10474 "能なセグメントの最大サイズには仮想メモリーの総量という別の上限が適用される。 "
10475 "例えば、i386 ではマッピング可能な最大セグメントの大きさはおおよそ 2.8GB で、 "
10476 "x86_64 では上限はおおよそ 127TB である。"
10479 #: build/C/man2/shmget.2:349
10484 #. type: Plain text
10485 #: build/C/man2/shmget.2:355
10487 "Minimum size in bytes for a shared memory segment: implementation dependent "
10488 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10490 "共有メモリーセグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10491 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10494 #: build/C/man2/shmget.2:355
10499 #. type: Plain text
10500 #: build/C/man2/shmget.2:360
10502 "System-wide limit on the number of shared memory segments. In Linux 2.2, "
10503 "the default value for this limit was 128; since Linux 2.4, the default value "
10506 "システム全体の共有メモリーセグメント数の上限値。 この上限値のデフォルトは、 "
10507 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10509 #. Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10510 #. that we could create one more segment than SHMMNI -- MTK
10511 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
10512 #. type: Plain text
10513 #: build/C/man2/shmget.2:366
10515 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10517 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10520 #. type: Plain text
10521 #: build/C/man2/shmget.2:370
10523 "The implementation has no specific limits for the per-process maximum number "
10524 "of shared memory segments (B<SHMSEG>)."
10526 "プロセス当りの共有メモリーセグメントの個数の最大値 (B<SHMSEG>) に関する実装"
10529 #. type: Plain text
10530 #: build/C/man2/shmget.2:376
10532 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>() on a "
10533 "shared memory segment scheduled for deletion."
10535 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリーセグメント"
10536 "に対して B<shmget>() が行われると B<EIDRM> を返していた。"
10538 #. type: Plain text
10539 #: build/C/man2/shmget.2:382
10541 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10542 "more clearly show its function."
10544 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10545 "より明確にその機能を表しているだろう。"
10547 #. type: Plain text
10548 #: build/C/man2/shmget.2:391
10550 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10551 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10553 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10554 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10557 #: build/C/man2/shmop.2:41
10562 #. type: Plain text
10563 #: build/C/man2/shmop.2:44
10564 msgid "shmat, shmdt - System V shared memory operations"
10565 msgstr "shmat, shmdt - System V 共有メモリー (shared memory) の操作"
10567 #. type: Plain text
10568 #: build/C/man2/shmop.2:48
10571 "B<#include E<lt>sys/types.hE<gt>>\n"
10572 "B<#include E<lt>sys/shm.hE<gt>>\n"
10574 "B<#include E<lt>sys/types.hE<gt>>\n"
10575 "B<#include E<lt>sys/shm.hE<gt>>\n"
10577 #. type: Plain text
10578 #: build/C/man2/shmop.2:50
10580 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10581 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10583 #. type: Plain text
10584 #: build/C/man2/shmop.2:52
10586 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10587 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10590 #: build/C/man2/shmop.2:54
10595 #. type: Plain text
10596 #: build/C/man2/shmop.2:62
10598 "B<shmat>() attaches the System\\ V shared memory segment identified by "
10599 "I<shmid> to the address space of the calling process. The attaching address "
10600 "is specified by I<shmaddr> with one of the following criteria:"
10602 "B<shmat>() は I<shmid> で指定された System\\ V 共有メモリーセグメント "
10603 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10604 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10606 #. type: Plain text
10607 #: build/C/man2/shmop.2:68
10609 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10610 "which to attach the segment."
10612 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10613 "されていない) アドレスを選択する。"
10615 #. type: Plain text
10616 #: build/C/man2/shmop.2:80
10618 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10619 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10620 "multiple of B<SHMLBA>."
10622 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10623 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10626 #. type: Plain text
10627 #: build/C/man2/shmop.2:84
10629 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10632 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10635 #. type: Plain text
10636 #: build/C/man2/shmop.2:90
10638 "In addition to B<SHM_RND>, the following flags may be specified in the "
10639 "I<shmflg> bit-mask argument:"
10641 "B<SHM_RND> に加えて、以下のフラグを I<shmflg> ビットマスク引き数に指定でき"
10645 #: build/C/man2/shmop.2:90
10647 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10648 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10650 #. type: Plain text
10651 #: build/C/man2/shmop.2:94
10653 "Allow the contents of the segment to be executed. The caller must have "
10654 "execute permission on the segment."
10656 "セグメントの内容を実行できる。 呼び出し元はセグメントに対する実行許可を持って"
10660 #: build/C/man2/shmop.2:94
10662 msgid "B<SHM_RDONLY>"
10663 msgstr "B<SHM_RDONLY>"
10665 #. type: Plain text
10666 #: build/C/man2/shmop.2:102
10668 "Attach the segment for read-only access. The process must have read "
10669 "permission for the segment. If this flag is not specified, the segment is "
10670 "attached for read and write access, and the process must have read and write "
10671 "permission for the segment. There is no notion of a write-only shared "
10674 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10675 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10676 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10677 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリーセ"
10681 #: build/C/man2/shmop.2:102
10683 msgid "B<SHM_REMAP> (Linux-specific)"
10684 msgstr "B<SHM_REMAP> (Linux 固有)"
10686 #. type: Plain text
10687 #: build/C/man2/shmop.2:115
10689 "This flag specifies that the mapping of the segment should replace any "
10690 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10691 "size of the segment. (Normally, an B<EINVAL> error would result if a "
10692 "mapping already exists in this address range.) In this case, I<shmaddr> "
10693 "must not be NULL."
10695 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10696 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10697 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10698 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10700 #. type: Plain text
10701 #: build/C/man2/shmop.2:122
10703 "The B<brk>(2) value of the calling process is not altered by the attach. "
10704 "The segment will automatically be detached at process exit. The same "
10705 "segment may be attached as a read and as a read-write one, and more than "
10706 "once, in the process's address space."
10708 "呼び出したプロセスの B<brk>(2) の値は付加によって変化しない。 そのセグメント"
10709 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10710 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10713 #. type: Plain text
10714 #: build/C/man2/shmop.2:130
10716 "A successful B<shmat>() call updates the members of the I<shmid_ds> "
10717 "structure (see B<shmctl>(2)) associated with the shared memory segment as "
10720 "成功した B<shmat>() コールは共有メモリーセグメントに関連する I<shmid_ds> 構"
10721 "造体 (B<shmctl>(2) を参照) のメンバーを以下のように更新する:"
10723 #. type: Plain text
10724 #: build/C/man2/shmop.2:133
10725 msgid "I<shm_atime> is set to the current time."
10726 msgstr "I<shm_atime> には現在の時刻を設定する。"
10728 #. type: Plain text
10729 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10730 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10731 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10733 #. type: Plain text
10734 #: build/C/man2/shmop.2:140
10735 msgid "I<shm_nattch> is incremented by one."
10736 msgstr "I<shm_nattch> を 1 増加させる。"
10739 #: build/C/man2/shmop.2:140
10744 #. type: Plain text
10745 #: build/C/man2/shmop.2:151
10747 "B<shmdt>() detaches the shared memory segment located at the address "
10748 "specified by I<shmaddr> from the address space of the calling process. The "
10749 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10750 "the value returned by the attaching B<shmat>() call."
10752 "B<shmdt>() は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10753 "ドレスに配置された共有メモリーセグメントを分離 (detach) する。 分離する共有メ"
10754 "モリーセグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10755 "I<shmaddr> は、それを付加した時に B<shmat>() が返した値に等しくなければなら"
10758 #. type: Plain text
10759 #: build/C/man2/shmop.2:157
10761 "On a successful B<shmdt>() call, the system updates the members of the "
10762 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10764 "成功した B<shmdt>() コールはその共有メモリーセグメントに関連する "
10765 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10767 #. type: Plain text
10768 #: build/C/man2/shmop.2:160
10769 msgid "I<shm_dtime> is set to the current time."
10770 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10772 #. type: Plain text
10773 #: build/C/man2/shmop.2:168
10775 "I<shm_nattch> is decremented by one. If it becomes 0 and the segment is "
10776 "marked for deletion, the segment is deleted."
10778 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10781 #. type: Plain text
10782 #: build/C/man2/shmop.2:176
10784 "On success, B<shmat>() returns the address of the attached shared memory "
10785 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10786 "indicate the cause of the error."
10788 "B<shmat>() は、成功した場合、 付加された共有メモリーセグメントのアドレスを返"
10789 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10792 #. type: Plain text
10793 #: build/C/man2/shmop.2:182
10795 "On success, B<shmdt>() returns 0; on error -1 is returned, and I<errno> is "
10796 "set to indicate the cause of the error."
10798 "B<shmdt>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10801 #. type: Plain text
10802 #: build/C/man2/shmop.2:188
10803 msgid "When B<shmat>() fails, I<errno> is set to one of the following:"
10805 "B<shmat>() が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10807 #. type: Plain text
10808 #: build/C/man2/shmop.2:194
10810 "The calling process does not have the required permissions for the requested "
10811 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10813 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10814 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10816 #. type: Plain text
10817 #: build/C/man2/shmop.2:211
10819 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10820 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10821 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10823 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10824 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10825 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10826 "れているが、 I<shmaddr> が NULL であった。"
10828 #. type: Plain text
10829 #: build/C/man2/shmop.2:214
10830 msgid "Could not allocate memory for the descriptor or for the page tables."
10832 "ディスクリプター (descriptor) やページテーブルのためのメモリーを 割り当てるこ"
10835 #. type: Plain text
10836 #: build/C/man2/shmop.2:220
10837 msgid "When B<shmdt>() fails, I<errno> is set as follows:"
10838 msgstr "B<shmdt>() が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10840 #. The following since 2.6.17-rc1:
10841 #. type: Plain text
10842 #: build/C/man2/shmop.2:228
10844 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10845 "not aligned on a page boundary."
10847 "I<shmaddr> に付加された共有メモリーセグメントが存在しない。 もしくは、 "
10848 "I<shmaddr> がページ境界に合っていない。"
10850 #. type: Plain text
10851 #: build/C/man2/shmop.2:243
10853 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10854 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10855 "B<shmat>() from I<char\\ *> into I<void\\ *>."
10857 "SVID 3 で (たぶんそれより前だと思うが) I<shmaddr> 引き数の型は I<char\\ *> "
10858 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10861 #. type: Plain text
10862 #: build/C/man2/shmop.2:248
10864 "After a B<fork>(2), the child inherits the attached shared memory segments."
10866 "B<fork>(2) した後、子プロセスは付加された共有メモリーセグメントを継承する。"
10868 #. type: Plain text
10869 #: build/C/man2/shmop.2:252
10871 "After an B<execve>(2), all attached shared memory segments are detached from "
10874 "B<exec>(2) した後、全ての付加された共有メモリーセグメントはプロセスから分離"
10877 #. type: Plain text
10878 #: build/C/man2/shmop.2:256
10880 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10883 "B<exit>(2) において、全ての付加された共有メモリーセグメントはプロセスから分"
10886 #. type: Plain text
10887 #: build/C/man2/shmop.2:268
10889 "Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable "
10890 "way of attaching a shared memory segment. Be aware that the shared memory "
10891 "segment attached in this way may be attached at different addresses in "
10892 "different processes. Therefore, any pointers maintained within the shared "
10893 "memory must be made relative (typically to the starting address of the "
10894 "segment), rather than absolute."
10896 "共有メモリーセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> "
10897 "を NULL にして B<shmat>() を使用するのがよい。 このような方法で付加される共"
10898 "有メモリーセグメントは、 プロセスが異なれば別のアドレスに付加される、という点"
10899 "に注意すること。 よって共有メモリー内で管理されるポインターは、 絶対アドレス"
10900 "ではなく、 (一般的にはセグメントの開始アドレスからの) 相対アドレスで作成する"
10903 #. type: Plain text
10904 #: build/C/man2/shmop.2:273
10906 "On Linux, it is possible to attach a shared memory segment even if it is "
10907 "already marked to be deleted. However, POSIX.1-2001 does not specify this "
10908 "behavior and many other implementations do not support it."
10910 "Linux では共有メモリーセグメントに既に削除マークが付けられていても、 その共有"
10911 "メモリーセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような"
10912 "動作を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10914 #. type: Plain text
10915 #: build/C/man2/shmop.2:276
10916 msgid "The following system parameter affects B<shmat>():"
10917 msgstr "以下のシステムパラメーターは、 B<shmat>() に影響する:"
10920 #: build/C/man2/shmop.2:276
10925 #. type: Plain text
10926 #: build/C/man2/shmop.2:289
10928 "Segment low boundary address multiple. When explicitly specifying an attach "
10929 "address in a call to B<shmat>(), the caller should ensure that the address "
10930 "is a multiple of this value. This is necessary on some architectures, in "
10931 "order either to ensure good CPU cache performance or to ensure that "
10932 "different attaches of the same segment have consistent views within the CPU "
10933 "cache. B<SHMLBA> is normally some multiple of the system page size (on many "
10934 "Linux architectures, it is the same as the system page size)."
10936 "セグメントの下限アドレス倍数 (Segment low boundary address multiple)。 "
10937 "B<shmat>() の呼び出しにおいて付加するアドレスを明示的に指定する際、 呼び出し"
10938 "元は指定するアドレスがこの値の倍数になるように保証しなければならない。 これは"
10939 "いくつかのアーキテクチャーでは必要なことで、 CPU キャッシュの性能を保証するた"
10940 "めであったり、 同じセグメントの別の付与を CPU キャッシュ内部で一貫して扱える"
10941 "ようにするためだったりする。 B<SHMLBA> は通常はシステムページサイズの倍数であ"
10942 "る (Linux の多くのアーキテクチャーではシステムページサイズと同じである)。"
10944 #. type: Plain text
10945 #: build/C/man2/shmop.2:293
10947 "The implementation places no intrinsic per-process limit on the number of "
10948 "shared memory segments (B<SHMSEG>)."
10950 "現在の実装では、プロセスごとの 共有メモリーセグメントの最大数 (B<SHMSEG>) に"
10953 #. type: Plain text
10954 #: build/C/man2/shmop.2:301
10956 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10957 "B<shm_overview>(7), B<svipc>(7)"
10959 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10960 "B<shm_overview>(7), B<svipc>(7)"
10963 #: build/C/man2/subpage_prot.2:30
10965 msgid "SUBPAGE_PROT"
10966 msgstr "SUBPAGE_PROT"
10969 #: build/C/man2/subpage_prot.2:30
10972 msgstr "2012-07-13"
10974 #. type: Plain text
10975 #: build/C/man2/subpage_prot.2:33
10976 msgid "subpage_prot - define a subpage protection for an address range"
10979 #. type: Plain text
10980 #: build/C/man2/subpage_prot.2:37
10983 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10984 "B< uint32_t *>I<map>B<);>\n"
10986 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10987 "B< uint32_t *>I<map>B<);>\n"
10989 #. type: Plain text
10990 #: build/C/man2/subpage_prot.2:41
10991 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10993 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10996 #. type: Plain text
10997 #: build/C/man2/subpage_prot.2:47
10999 "The PowerPC-specific B<subpage_prot>() system call provides the facility to "
11000 "control the access permissions on individual 4kB subpages on systems "
11001 "configured with a page size of 64kB."
11004 #. type: Plain text
11005 #: build/C/man2/subpage_prot.2:54
11007 "The protection map is applied to the memory pages in the region starting at "
11008 "I<addr> and continuing for I<len> bytes. Both of these arguments must be "
11009 "aligned to a 64-kB boundary."
11012 #. type: Plain text
11013 #: build/C/man2/subpage_prot.2:66
11015 "The protection map is specified in the buffer pointed to by I<map>. The map "
11016 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
11017 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
11018 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
11019 "I<len>). Each 2-bit field in the protection map is either 0 to allow any "
11020 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
11023 #. type: Plain text
11024 #: build/C/man2/subpage_prot.2:71
11026 "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes "
11027 "specified below is returned."
11030 #. type: Plain text
11031 #: build/C/man2/subpage_prot.2:77
11032 msgid "The buffer referred to by I<map> is not accessible."
11035 #. type: Plain text
11036 #: build/C/man2/subpage_prot.2:87
11038 "The I<addr> or I<len> arguments are incorrect. Both of these arguments must "
11039 "be aligned to a multiple of the system page size, and they must not refer to "
11040 "a region outside of the address space of the process or to a region that "
11041 "consists of huge pages."
11044 #. type: Plain text
11045 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
11046 msgid "Out of memory."
11047 msgstr "メモリー不足である。"
11049 #. type: Plain text
11050 #: build/C/man2/subpage_prot.2:96
11052 "This system call is provided on the PowerPC architecture since Linux "
11053 "2.6.25. The system call is provided only if the kernel is configured with "
11054 "B<CONFIG_PPC_64K_PAGES>. No library support is provided."
11057 #. type: Plain text
11058 #: build/C/man2/subpage_prot.2:101
11060 "Glibc does not provide a wrapper for this system call; call it using "
11064 #. type: Plain text
11065 #: build/C/man2/subpage_prot.2:106
11067 "Normal page protections (at the 64-kB page level) also apply; the subpage "
11068 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
11069 "field won't allow writes to a page that is otherwise write-protected."
11073 #: build/C/man2/subpage_prot.2:106
11078 #. In the initial implementation, it was the case that:
11079 #. In fact the whole process is switched to use 4k hardware pages when the
11080 #. subpage_prot system call is used, but this could be improved in future
11081 #. to switch only the affected segments.
11082 #. But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
11083 #. the affected segment, not the whole process.
11084 #. type: Plain text
11085 #: build/C/man2/subpage_prot.2:128
11087 "This system call is provided to assist writing emulators that operate using "
11088 "64-kB pages on PowerPC systems. When emulating systems such as x86, which "
11089 "uses a smaller page size, the emulator can no longer use the memory-"
11090 "management unit (MMU) and normal system calls for controlling page "
11091 "protections. (The emulator could emulate the MMU by checking and possibly "
11092 "remapping the address for each memory access in software, but that is "
11093 "slow.) The idea is that the emulator supplies an array of protection masks "
11094 "to apply to a specified range of virtual addresses. These masks are applied "
11095 "at the level where hardware page-table entries (PTEs) are inserted into the "
11096 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
11097 "affected. Implicit in this is that the regions of the address space that "
11098 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
11099 "hardware pages (on machines with hardware 64-kB page support)."
11102 #. type: Plain text
11103 #: build/C/man2/subpage_prot.2:131
11104 msgid "B<mprotect>(2), B<syscall>(2)"
11105 msgstr "B<mprotect>(2), B<syscall>(2)"
11107 #. type: Plain text
11108 #: build/C/man2/subpage_prot.2:134
11109 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
11110 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
11113 #: build/C/man2/sync_file_range.2:30
11115 msgid "SYNC_FILE_RANGE"
11116 msgstr "SYNC_FILE_RANGE"
11119 #: build/C/man2/sync_file_range.2:30
11122 msgstr "2014-08-19"
11124 #. type: Plain text
11125 #: build/C/man2/sync_file_range.2:33
11126 msgid "sync_file_range - sync a file segment with disk"
11127 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
11129 #. type: Plain text
11130 #: build/C/man2/sync_file_range.2:37
11133 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
11134 "B<#include E<lt>fcntl.hE<gt>>\n"
11136 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
11137 "B<#include E<lt>fcntl.hE<gt>>\n"
11139 #. type: Plain text
11140 #: build/C/man2/sync_file_range.2:40
11143 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11144 "B< unsigned int >I<flags>B<);>\n"
11146 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11147 "B< unsigned int >I<flags>B<);>\n"
11149 #. type: Plain text
11150 #: build/C/man2/sync_file_range.2:47
11152 "B<sync_file_range>() permits fine control when synchronizing the open file "
11153 "referred to by the file descriptor I<fd> with disk."
11155 "B<sync_file_range>() を使うと、ファイルディスクリプター I<fd> で参照される"
11156 "オープンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能とな"
11159 #. type: Plain text
11160 #: build/C/man2/sync_file_range.2:61
11162 "I<offset> is the starting byte of the file range to be synchronized. "
11163 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11164 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11165 "are synchronized. Synchronization is in units of the system page size: "
11166 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11167 "rounded up to a page boundary."
11169 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11170 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11171 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11172 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11173 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11175 #. type: Plain text
11176 #: build/C/man2/sync_file_range.2:65
11177 msgid "The I<flags> bit-mask argument can include any of the following values:"
11178 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11181 #: build/C/man2/sync_file_range.2:65
11183 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11184 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11186 #. type: Plain text
11187 #: build/C/man2/sync_file_range.2:70
11189 "Wait upon write-out of all pages in the specified range that have already "
11190 "been submitted to the device driver for write-out before performing any "
11193 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11194 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11198 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11200 msgid "B<SYNC_FILE_RANGE_WRITE>"
11201 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11203 #. type: Plain text
11204 #: build/C/man2/sync_file_range.2:76
11206 "Initiate write-out of all dirty pages in the specified range which are not "
11207 "presently submitted write-out. Note that even this may block if you attempt "
11208 "to write more than request queue size."
11210 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11211 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11212 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11216 #: build/C/man2/sync_file_range.2:76
11218 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11219 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11221 #. type: Plain text
11222 #: build/C/man2/sync_file_range.2:80
11224 "Wait upon write-out of all pages in the range after performing any write."
11226 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11229 #. type: Plain text
11230 #: build/C/man2/sync_file_range.2:84
11231 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11232 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11235 #: build/C/man2/sync_file_range.2:84
11240 #. type: Plain text
11241 #: build/C/man2/sync_file_range.2:100
11243 "This system call is extremely dangerous and should not be used in portable "
11244 "programs. None of these operations writes out the file's metadata. "
11245 "Therefore, unless the application is strictly performing overwrites of "
11246 "already-instantiated disk blocks, there are no guarantees that the data will "
11247 "be available after a crash. There is no user interface to know if a write "
11248 "is purely an overwrite. On filesystems using copy-on-write semantics (e.g., "
11249 "I<btrfs>) an overwrite of existing allocated blocks is impossible. When "
11250 "writing into preallocated space, many filesystems also require calls into "
11251 "the block allocator, which this system call does not sync out to disk. This "
11252 "system call does not flush disk write caches and thus does not provide any "
11253 "data integrity on systems with volatile disk write caches."
11255 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11256 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11257 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11258 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11259 "みが上書きだけであるかを知るためのユーザーインターフェースは存在しない。 "
11260 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11261 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11262 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11263 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11264 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11265 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11266 "コールではデータの一貫性を確保できないことになる。"
11269 #: build/C/man2/sync_file_range.2:100
11271 msgid "Some details"
11274 #. type: Plain text
11275 #: build/C/man2/sync_file_range.2:108
11277 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11278 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11280 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11281 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11283 #. type: Plain text
11284 #: build/C/man2/sync_file_range.2:112
11285 msgid "Useful combinations of the I<flags> bits are:"
11286 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11289 #: build/C/man2/sync_file_range.2:112
11291 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11292 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11294 #. type: Plain text
11295 #: build/C/man2/sync_file_range.2:120
11297 "Ensures that all pages in the specified range which were dirty when "
11298 "B<sync_file_range>() was called are placed under write-out. This is a "
11299 "start-write-for-data-integrity operation."
11301 "指定された範囲内のページで、 B<sync_file_range>() が呼び出された際に dirty "
11302 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11303 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11306 #. type: Plain text
11307 #: build/C/man2/sync_file_range.2:127
11309 "Start write-out of all dirty pages in the specified range which are not "
11310 "presently under write-out. This is an asynchronous flush-to-disk "
11311 "operation. This is not suitable for data integrity operations."
11313 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11314 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk) 操作であ"
11315 "る。データ完全性確保が必要な操作としては適切ではない。"
11318 #: build/C/man2/sync_file_range.2:127
11320 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11321 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11323 #. type: Plain text
11324 #: build/C/man2/sync_file_range.2:134
11326 "Wait for completion of write-out of all pages in the specified range. This "
11327 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11328 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11329 "and obtain its result."
11331 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11332 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11333 "き、この操作の完了を待ち、結果を取得することができる。"
11336 #: build/C/man2/sync_file_range.2:134
11338 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11339 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11341 #. type: Plain text
11342 #: build/C/man2/sync_file_range.2:141
11344 "This is a write-for-data-integrity operation that will ensure that all pages "
11345 "in the specified range which were dirty when B<sync_file_range>() was "
11346 "called are committed to disk."
11348 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11349 "り、指定された範囲内の、 B<sync_file_range>() が呼ばれた時点で dirty な全て"
11350 "のページが ディスクに格納されることが保証される。"
11352 #. type: Plain text
11353 #: build/C/man2/sync_file_range.2:147
11355 "On success, B<sync_file_range>() returns 0; on failure -1 is returned and "
11356 "I<errno> is set to indicate the error."
11358 "成功の場合、 B<sync_file_range>() は 0 を返す。失敗の場合、-1 を返し、 "
11359 "I<errno> にエラーを示す値を設定する。"
11361 #. type: Plain text
11362 #: build/C/man2/sync_file_range.2:152
11363 msgid "I<fd> is not a valid file descriptor."
11364 msgstr "I<fd> が有効なファイルディスクリプターではない。"
11366 #. type: Plain text
11367 #: build/C/man2/sync_file_range.2:160
11369 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11371 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11374 #. type: Plain text
11375 #: build/C/man2/sync_file_range.2:163
11379 #. type: Plain text
11380 #: build/C/man2/sync_file_range.2:169
11381 msgid "Out of disk space."
11382 msgstr "ディスク領域不足である。"
11384 #. FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11385 #. (In user space at least) it isn't possible to obtain a file descriptor
11386 #. for a symbolic link.
11387 #. type: Plain text
11388 #: build/C/man2/sync_file_range.2:177
11390 "I<fd> refers to something other than a regular file, a block device, a "
11391 "directory, or a symbolic link."
11393 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11396 #. type: Plain text
11397 #: build/C/man2/sync_file_range.2:180
11398 msgid "B<sync_file_range>() appeared on Linux in kernel 2.6.17."
11399 msgstr "B<sync_file_range>() はカーネル 2.6.17 で Linux に登場した。"
11401 #. type: Plain text
11402 #: build/C/man2/sync_file_range.2:183
11404 "This system call is Linux-specific, and should be avoided in portable "
11407 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11411 #: build/C/man2/sync_file_range.2:184
11413 msgid "sync_file_range2()"
11414 msgstr "sync_file_range2()"
11416 #. See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11417 #. type: Plain text
11418 #: build/C/man2/sync_file_range.2:201
11420 "Some architectures (e.g., PowerPC, ARM) need 64-bit arguments to be aligned "
11421 "in a suitable pair of registers. On such architectures, the call signature "
11422 "of B<sync_file_range>() shown in the SYNOPSIS would force a register to be "
11423 "wasted as padding between the I<fd> and I<offset> arguments. (See "
11424 "B<syscall>(2) for details.) Therefore, these architectures define a "
11425 "different system call that orders the arguments suitably:"
11427 "いくつかのアーキテクチャー (例えば、 PowerPC や ARM) では、 64 ビットの引き数"
11428 "は適切なレジスターの組に割り当てる必要がある。 このようなアーキテクチャーで"
11429 "は、 「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 "
11430 "引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費"
11431 "されてしまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテク"
11432 "チャーでは引き数が適切な順序になった別のシステムコールが定義されている。"
11434 #. type: Plain text
11435 #: build/C/man2/sync_file_range.2:206
11438 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11439 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11441 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11442 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11444 #. type: Plain text
11445 #: build/C/man2/sync_file_range.2:211
11447 "The behavior of this system call is otherwise exactly the same as "
11448 "B<sync_file_range>()."
11450 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11451 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11452 "glibc では提供されていない。"
11454 #. type: Plain text
11455 #: build/C/man2/sync_file_range.2:222
11457 "A system call with this signature first appeared on the ARM architecture in "
11458 "Linux 2.6.20, with the name B<arm_sync_file_range>(). It was renamed in "
11459 "Linux 2.6.22, when the analogous system call was added for PowerPC. On "
11460 "architectures where glibc support is provided, glibc transparently wraps "
11461 "B<sync_file_range2>() under the name B<sync_file_range>()."
11463 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャーで\n"
11464 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11465 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11466 "システムコールの名前が変更された。\n"
11467 "glibc によるサポートが提供されているアーキテクチャーでは、\n"
11468 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11469 "B<sync_file_range2>() を適切に使用するようになっている。"
11471 #. type: Plain text
11472 #: build/C/man2/sync_file_range.2:227
11473 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11474 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11477 #: build/C/man2/memfd_create.2:21
11479 msgid "MEMFD_CREATE"
11480 msgstr "MEMFD_CREATE"
11482 #. type: Plain text
11483 #: build/C/man2/memfd_create.2:24
11484 msgid "memfd_create - create an anonymous file"
11485 msgstr "memfd_create - 無名ファイル (anonymous file) を作成する"
11487 #. type: Plain text
11488 #: build/C/man2/memfd_create.2:26
11489 msgid "B<#include E<lt>sys/memfd.hE<gt>>"
11490 msgstr "B<#include E<lt>sys/memfd.hE<gt>>"
11492 #. type: Plain text
11493 #: build/C/man2/memfd_create.2:28
11494 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11495 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11498 #. memfd uses VM_NORESERVE so each page is accounted on first access.
11499 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
11500 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
11501 #. those are accounted on "current" and "current->mm", that is, the
11502 #. process doing the first page access.
11503 #. type: Plain text
11504 #: build/C/man2/memfd_create.2:51
11506 "B<memfd_create>() creates an anonymous file and returns a file descriptor "
11507 "that refers to it. The file behaves like a regular file, and so can be "
11508 "modified, truncated, memory-mapped, and so on. However, unlike a regular "
11509 "file, it lives in RAM and has a volatile backing storage. Once all "
11510 "references to the file are dropped, it is automatically released. Anonymous "
11511 "memory is used for all backing pages of the file. Therefore, files created "
11512 "by B<memfd_create>() have the same semantics as other anonymous memory "
11513 "allocations such as those allocated using B<mmap>(2) with the "
11514 "B<MAP_ANONYMOUS> flag."
11516 "B<memfd_create>() は、 無名ファイル (anonymous file) を作成し、 そのファイル"
11517 "を参照するファイルディスクリプターを返す。 このファイルは通常のファイルと同様"
11518 "に振る舞い、 変更、切り詰め (truncate)、 メモリーマップなどを行うことができ"
11519 "る。 しかし、 通常のファイルとは違い、 このファイルは RAM 上に置かれ、 格納さ"
11520 "れるストレージは揮発性である。 このファイルへの参照がすべてなくなると、 ファ"
11521 "イルは自動的に解放される。 このファイルが置かれるページには無名メモリー "
11522 "(anonymous memory) が使用される。 したがって、 B<memfd_create>() で作成された"
11523 "フィアルは、 他の無名メモリーの割り当て (B<MAP_ANONYMOUS> フラグ付きの "
11524 "B<mmap>(2) を使って割り当てられた無名メモリーなど) と同じ動作をする。"
11526 #. type: Plain text
11527 #: build/C/man2/memfd_create.2:58
11529 "The initial size of the file is set to 0. Following the call, the file size "
11530 "should be set using B<ftruncate>(2). (Alternatively, the file may be "
11531 "populated by calls to B<write>(2) or similar.)"
11533 "ファイルの初期サイズは 0 に設定される。 呼び出しの後に、 B<ftruncate>(2) を"
11534 "使ってファイルサイズを設定すべきである (代わりに、 B<write>(2) や同様の関数を"
11535 "呼び出してファイルにデータを書き込むこともできる)。"
11537 #. type: Plain text
11538 #: build/C/man2/memfd_create.2:69
11540 "The name supplied in I<name> is used as a filename and will be displayed as "
11541 "the target of the corresponding symbolic link in the directory I</proc/self/"
11542 "fd/>. The displayed name is always prefixed with I<memfd:> and serves only "
11543 "for debugging purposes. Names do not affect the behavior of the file "
11544 "descriptor, and as such multiple files can have the same name without any "
11547 "I<name> に指定された名前はファイル名として使用され、 ディレクトリ I</proc/"
11548 "self/fd/> で対応するシンボリックリンクのリンク先として表示される。 表示される"
11549 "名前の前には常に I<memfd:> が付き、 この名前はデバッグ用途としてのみ機能す"
11550 "る。 名前はファイルディスクリプターの動作には影響せず、 複数のファイルが同じ"
11553 #. type: Plain text
11554 #: build/C/man2/memfd_create.2:74
11556 "The following values may be bitwise ORed in I<flags> to change the behaviour "
11557 "of B<memfd_create>():"
11559 "以下の値をビット論理和で I<flags> に指定して、 B<memfd_create>() の動作を変更"
11563 #: build/C/man2/memfd_create.2:74
11565 msgid "B<MFD_CLOEXEC>"
11566 msgstr "B<MFD_CLOEXEC>"
11568 #. type: Plain text
11569 #: build/C/man2/memfd_create.2:84
11571 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
11572 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
11575 "新しいファイルディスクリプターに close-on-exec (B<FD_CLOEXEC>) フラグをセット"
11576 "する。 これが有用な理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参"
11580 #: build/C/man2/memfd_create.2:84
11582 msgid "B<MFD_ALLOW_SEALING>"
11583 msgstr "B<MFD_ALLOW_SEALING>"
11585 #. FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
11586 #. Is it worth adding some text explaining this?
11587 #. type: Plain text
11588 #: build/C/man2/memfd_create.2:100
11590 "Allow sealing operations on this file. See the discussion of the "
11591 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
11592 "below. The initial set of seals is empty. If this flag is not set, the "
11593 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
11594 "be set on the file."
11596 "このファイルに対して sealing 操作を許可する。 B<fcntl>(2) の B<F_ADD_SEALS> "
11597 "と B<F_GET_SEALS> 操作の議論を参照。 下記の「注意」も参照。 初期の seal 集合"
11598 "は空となる。 このフラグを指定しなかった場合、 初期の seal 集合は "
11599 "B<F_SEAL_SEAL> となり、 これはこのファイルには他の seal をセットできないこと"
11602 #. type: Plain text
11603 #: build/C/man2/memfd_create.2:104
11604 msgid "Unused bits in I<flags> must be 0."
11605 msgstr "I<flags> の未使用のビットは 0 でなければならない。"
11607 #. type: Plain text
11608 #: build/C/man2/memfd_create.2:113
11610 "As its return value, B<memfd_create>() returns a new file descriptor that "
11611 "can be used to refer to the file. This file descriptor is opened for both "
11612 "reading and writing (B<O_RDWR>) and B<O_LARGEFILE> is set for the "
11615 "返り値として B<memfd_create>() は、 作成したファイルを参照するのに使用できる"
11616 "新しいファイルディスクリプターを返す。 このファイルディスクリプターは読み書き"
11617 "両用 (B<O_RDWR>) でオープンされ、 B<O_LARGEFILE> がこのファイルディスクリプ"
11620 #. type: Plain text
11621 #: build/C/man2/memfd_create.2:126
11623 "With respect to B<fork>(2) and B<execve>(2), the usual semantics apply for "
11624 "the file descriptor created by B<memfd_create>(). A copy of the file "
11625 "descriptor is inherited by the child produced by B<fork>(2) and refers to "
11626 "the same file. The file descriptor is preserved across B<execve>(2), unless "
11627 "the close-on-exec flag has been set."
11629 "B<fork>(2) と B<execve>(2) に関しては、 B<memfd_create>() で作成したファイル"
11630 "ディスクリプターについても通常の動作が適用される。 ファイルディスクリプターの"
11631 "コピーは B<fork>(2) で生成される子プロセスに継承され、 同じファイルを参照す"
11632 "る。 close-on-exec フラグがセットされていない限り、 B<execve>(2) の前後でファ"
11633 "イルディスクリプターは保持される。"
11635 #. type: Plain text
11636 #: build/C/man2/memfd_create.2:133
11638 "On success, B<memfd_create>() returns a new file descriptor. On error, -1 "
11639 "is returned and I<errno> is set to indicate the error."
11641 "成功の場合、 B<memfd_create>() は新しいファイルディスクリプターを返す。 エ"
11642 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11644 #. type: Plain text
11645 #: build/C/man2/memfd_create.2:139
11646 msgid "The address in I<name> points to invalid memory."
11647 msgstr "I<name> のアドレスが無効なメモリーを指している。"
11649 #. type: Plain text
11650 #: build/C/man2/memfd_create.2:146
11652 "An unsupported value was specified in one of the arguments: I<flags> "
11653 "included unknown bits, or I<name> was too long."
11655 "サポートされていない値がいずれかの引き数で指定された。 I<flags> に未知のビッ"
11656 "トが含まれていたか、 I<name> が長過ぎた。"
11658 #. type: Plain text
11659 #: build/C/man2/memfd_create.2:149
11660 msgid "The per-process limit on open file descriptors has been reached."
11662 "オープンされているファイルディスクリプターのプロセス単位の上限に達した。"
11664 #. type: Plain text
11665 #: build/C/man2/memfd_create.2:152
11667 "The system-wide limit on the total number of open files has been reached."
11668 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
11670 #. type: Plain text
11671 #: build/C/man2/memfd_create.2:155
11672 msgid "There was insufficient memory to create a new anonymous file."
11673 msgstr "新しい無名ファイルを作成するのに十分なメモリーがなかった。"
11675 #. FIXME . When glibc support appears, update the following sentence:
11676 #. type: Plain text
11677 #: build/C/man2/memfd_create.2:161
11679 "The B<memfd_create>() system call first appeared in Linux 3.17. Support in "
11680 "the GNU C library is pending."
11682 "B<memfd_create>() システムコールは Linux 3.17 で初めて登場した。 GNU C ライブ"
11685 #. type: Plain text
11686 #: build/C/man2/memfd_create.2:165
11687 msgid "The B<memfd_create>() system call is Linux-specific."
11688 msgstr "B<memfd_create>() システムコールは Linux 固有である。"
11690 #. See also http://lwn.net/Articles/593918/
11691 #. and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
11692 #. type: Plain text
11693 #: build/C/man2/memfd_create.2:178
11695 "The B<memfd_create>() system call provides a simple alternative to manually "
11696 "mounting a I<tmpfs> filesystem and creating and opening a file in that "
11697 "filesystem. The primary purpose of B<memfd_create>() is to create files "
11698 "and associated file descriptors that are used with the file-sealing APIs "
11699 "provided by B<fcntl>(2)."
11701 "B<memfd_create>() システムコールは、 手動で I<tmpfs> ファイルシステムをマウン"
11702 "トして、 そのファイルシステムにファイルをオープンするという操作の、 簡単な代"
11703 "替手段を提供している。 B<memfd_create>() の主な目的は、 B<fcntl>(2) が提供す"
11704 "る file-sealing API で使用できる、 ファイルとそれに関連付けられるファイルディ"
11705 "スクリプターを作成することである。"
11707 #. type: Plain text
11708 #: build/C/man2/memfd_create.2:192
11710 "The B<memfd_create>() system call also has uses without file sealing (which "
11711 "is why file-sealing is disabled, unless explicitly requested with the "
11712 "B<MFD_ALLOW_SEALING> flag). In particular, it can be used as an alternative "
11713 "to creating files in I<tmp> or as an alternative to using the B<open>(2) "
11714 "B<O_TMPFILE> in cases where there is no intention to actually link the "
11715 "resulting file into the filesystem."
11717 "B<memfd_create>() システムコールは、 file sealing なしでも用途がある (これが"
11718 "明示的に B<MFD_ALLOW_SEALING> フラグが要求されない限り、 file-sealing が無効"
11719 "になる理由である)。 特に、 ファイルシステムに実際にファイルを残す意図がない場"
11720 "合、 I<tmp> にファイルを作成したり B<open>(2) B<O_TMPFILE> を使ったりする際の"
11724 #: build/C/man2/memfd_create.2:192
11726 msgid "File sealing"
11727 msgstr "file sealing"
11729 #. type: Plain text
11730 #: build/C/man2/memfd_create.2:210
11732 "In the absence of file sealing, processes that communicate via shared memory "
11733 "must either trust each other, or take measures to deal with the possibility "
11734 "that an untrusted peer may manipulate the shared memory region in "
11735 "problematic ways. For example, an untrusted peer might modify the contents "
11736 "of the shared memory at any time, or shrink the shared memory region. The "
11737 "former possibility leaves the local process vulnerable to time-of-check-to-"
11738 "time-of-use race conditions (typically dealt with by copying data from the "
11739 "shared memory region before checking and using it). The latter possibility "
11740 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
11741 "made to access a now-nonexistent location in the shared memory region. "
11742 "(Dealing with this possibility necessitates the use of a handler for the "
11743 "B<SIGBUS> signal.)"
11745 "file sealing がない場合、 共有メモリー経由で通信するプロセスは、 互いに信頼す"
11746 "るか、 信頼していない相手が共有メモリー領域を問題がある方法で操作する可能性に"
11747 "対処するための対策を講じなければならない。\n"
11748 "例えば、 信頼していない相手は、 いつでも共有メモリーの内容を変更したり、 共有"
11749 "メモリー領域を縮小したりする可能性がある。 前者の場合は、 ローカルプロセスで"
11750 "は、 データの確認時点と使用時点の競合条件の問題が起こり得る (通常はこの問題へ"
11751 "の対処は共有メモリー領域からデータをこぴーしてからデータを確認、使用すること"
11752 "である)。 後者の場合は、 ローカルプロセスでは、 共有メモリー領域の存在しなく"
11753 "なった場所にアクセスしようとした際にシグナル B<SIGBUS> が発生する可能性があ"
11754 "る (この可能性に対処するにはシグナル B<SIGBUS> に対してハンドラーを使用する必"
11757 #. type: Plain text
11758 #: build/C/man2/memfd_create.2:216
11760 "Dealing with untrusted peers imposes extra complexity on code that employs "
11761 "shared memory. Memory sealing enables that extra complexity to be "
11762 "eliminated, by allowing a process to operate secure in the knowledge that "
11763 "its peer can't modify the shared memory in an undesired fashion."
11765 "信頼していない相手への対処により、 共有メモリーを利用するコードに余計な複雑性"
11766 "が増すことになる。 メモリー sealing により余計な複雑性をなくすことができる。 "
11767 "相手が望まない方法で共有メモリーを変更できないことを知っていることで、 プロセ"
11770 #. type: Plain text
11771 #: build/C/man2/memfd_create.2:218
11772 msgid "An example of the usage of the sealing mechanism is as follows:"
11773 msgstr "sealing 機構の使い方の例は以下のとおりである。"
11775 #. type: Plain text
11776 #: build/C/man2/memfd_create.2:225
11778 "The first process creates a I<tmpfs> file using B<memfd_create>(). The call "
11779 "yields a file descriptor used in subsequent steps."
11781 "最初のプロセスは B<memfd_create>() を使って I<tmpfs> ファイルを作成する。 "
11782 "B<memfd_create>() はこれ以降のステップで使用するファイルディスクリプターを返"
11785 #. type: Plain text
11786 #: build/C/man2/memfd_create.2:232
11788 "The first process sizes the file created in the previous step using "
11789 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
11790 "with the desired data."
11792 "最初のプロセスは B<ftruncate>(2) を使って直前のステップで作成したファイルのサ"
11793 "イズを変更し、 B<mmap>(2) を使ってそのファイルをマッピングし、 共有メモリーに"
11797 #: build/C/man2/memfd_create.2:232
11802 #. type: Plain text
11803 #: build/C/man2/memfd_create.2:242
11805 "The first process uses the B<fcntl>(2) B<F_ADD_SEALS> operation to place "
11806 "one or more seals on the file, in order to restrict further modifications on "
11807 "the file. (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
11808 "to first unmap the shared writable mapping created in the previous step.)"
11810 "最初のプロセスは、 このファイルに対する今後の変更を制限するために、 "
11811 "B<fcntl>(2) の B<F_ADD_SEALS> 操作を使って、 そのファイルに seal をいくつか設"
11812 "定する。 (seal B<F_SEAL_WRITE> を設定する場合、 直前のステップで作成した書き"
11813 "込み可能な共有マッピングをまずアンマップする必要が出てくる。)"
11816 #: build/C/man2/memfd_create.2:242
11821 #. type: Plain text
11822 #: build/C/man2/memfd_create.2:247
11824 "A second process obtains a file descriptor for the I<tmpfs> file and maps "
11825 "it. Among the possible ways in which this could happen are the following:"
11827 "二つ目のプロセスは I<tmpfs> ファイルのファイルディスクリプターを入手し、 その"
11828 "ファイルをマップする。 以下に示す方法を使用することができる。"
11830 #. type: Plain text
11831 #: build/C/man2/memfd_create.2:258
11833 "The process that called B<memfd_create>() could transfer the resulting file "
11834 "descriptor to the second process via a UNIX domain socket (see B<unix>(7) "
11835 "and B<cmsg>(3)). The second process then maps the file using B<mmap>(2)."
11837 "B<memfd_create>() を呼び出したプロセスは、 得られたファイルディスクリプターを"
11838 "二つ目のプロセスに UNIX ドメインソケット経由で渡すことができる (B<unix>(7) "
11839 "と B<cmsg>(3) を参照)。 それから、二つ目のプロセスは B<mmap>(2) を使ってファ"
11842 #. type: Plain text
11843 #: build/C/man2/memfd_create.2:266
11845 "The second process is created via B<fork>(2) and thus automatically "
11846 "inherits the file descriptor and mapping. (Note that in this case and the "
11847 "next, there is a natural trust relationship between the two processes, since "
11848 "they are running under the same user ID. Therefore, file sealing would not "
11849 "normally be necessary.)"
11851 "二つ目のプロセスを B<fork>(2) を使って作成する。 そうすると、 自動的にファイ"
11852 "ルディスクリプターとマッピングが継承される。 (この方法と次の方法では、 二つの"
11853 "プロセス間で自然な信頼関係が存在することになる。 なぜなら、 二つのプロセスは"
11854 "同じユーザー ID。 の元で実行されているからである。 したがって、 file sealing "
11857 #. type: Plain text
11858 #: build/C/man2/memfd_create.2:280
11860 "The second process opens the file I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>>, "
11861 "where I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
11862 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
11863 "returned by the call to B<memfd_create>() in that process. The second "
11864 "process then maps the file using B<mmap>(2)."
11866 "二つ目のプロセスは I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>> をオープンする。 "
11867 "I<E<lt>pidE<gt>> は最初のプロセス (B<memfd_create>() を呼び出したプロセス) "
11868 "の PID で、 I<E<lt>fdE<gt>> は最初のプロセスでの B<memfd_create>() の呼び出し"
11869 "で返されたファイルディスクリプター番号である。 それからこのファイルを "
11870 "B<mmap>(2) を使ってマッピングする。"
11873 #: build/C/man2/memfd_create.2:281
11878 #. type: Plain text
11879 #: build/C/man2/memfd_create.2:293
11881 "The second process uses the B<fcntl>(2) B<F_GET_SEALS> operation to "
11882 "retrieve the bit mask of seals that has been applied to the file. This bit "
11883 "mask can be inspected in order to determine what kinds of restrictions have "
11884 "been placed on file modifications. If desired, the second process can apply "
11885 "further seals to impose additional restrictions (so long as the "
11886 "B<F_SEAL_SEAL> seal has not yet been applied)."
11888 "二つ目のプロセスは B<fcntl>(2) の B<F_GET_SEALS> 操作を使って、 そのファイル"
11889 "に適用されている seal のビットマスクを取得する。 このビットマスクを調べて、 "
11890 "ファイルの変更に関してどのような制限が適用されているかを知ることができる。 "
11891 "(B<F_SEAL_SEAL> seal がそれまでに適用されていない限りは) 必要であれば、 二つ"
11892 "目のプロセスはさらに seal を設定して追加の制限をかけることができる。"
11894 #. type: Plain text
11895 #: build/C/man2/memfd_create.2:297
11897 "Below are shown two example programs that demonstrate the use of "
11898 "B<memfd_create>() and the file sealing API."
11900 "以下では B<memfd_create>() と file sealing API の使用例を示すサンプルプログラ"
11903 #. type: Plain text
11904 #: build/C/man2/memfd_create.2:312
11906 "The first program, I<t_memfd_create.c>, creates a I<tmpfs> file using "
11907 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
11908 "optionally places some seals on the file. The program accepts up to three "
11909 "command-line arguments, of which the first two are required. The first "
11910 "argument is the name to associate with the file, the second argument is the "
11911 "size to be set for the file, and the optional third is a string of "
11912 "characters that specify seals to be set on file."
11914 "最初のプログラム I<t_memfd_create.c> は、 B<memfd_create>() を使って "
11915 "I<tmpfs> ファイルを作成し、 そのファイルのサイズを設定し、 メモリーにマッピン"
11916 "グし、 要求された場合にはそのファイルに seal を設定する。 このプログラムは最"
11917 "大で 3 つのコマンドライン引き数を取り、 最初の 2 つは必須である。 最初の引き"
11918 "数はファイルに関連付けられる名前で、 2 番目の引き数はファイルに設定されるサイ"
11919 "ズである。 省略可能な 3 番目の引き数は、 このファイルに設定する seal を指定す"
11922 #. type: Plain text
11923 #: build/C/man2/memfd_create.2:318
11925 "The second program, I<t_get_seals.c>, can be used to open an existing file "
11926 "that was created via B<memfd_create>() and inspect the set of seals that "
11927 "have been applied to that file."
11929 "2 つめのプログラム I<t_get_seals.c> を使うと、 B<memfd_create>() を使って作成"
11930 "された既存のファイルをオープンし、 そのファイルに適用されている seal の集合を"
11933 #. type: Plain text
11934 #: build/C/man2/memfd_create.2:323
11936 "The following shell session demonstrates the use of these programs. First "
11937 "we create a I<tmpfs> file and set some seals on it:"
11939 "以下のシェルのセッションはこれらのプログラムの使用例を示したものである。 ま"
11940 "ず I<tmpfs> ファイルを作成し、そのファイルに seal をいくつか設定している。"
11942 #. type: Plain text
11943 #: build/C/man2/memfd_create.2:329
11946 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11948 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11950 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11952 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11954 #. type: Plain text
11955 #: build/C/man2/memfd_create.2:347
11957 "At this point, the I<t_memfd_create> program continues to run in the "
11958 "background. From another program, we can obtain a file descriptor for the "
11959 "file created by B<memfd_create>() by opening the I</proc/PID/fd> file that "
11960 "corresponds to the descriptor opened by B<memfd_create>(). Using that "
11961 "pathname, we inspect the content of the I</proc/PID/fd> symbolic link, and "
11962 "use our I<t_get_seals> program to view the seals that have been placed on "
11965 "この時点では、 I<t_memfd_create> プログラムはバックグラウンドで動作し続け"
11966 "る。 もう一つのプログラムから、 B<memfd_create>() がオープンしたディスクリプ"
11967 "ターに対応する I</proc/PID/fd> ファイルをオープンすることで、 "
11968 "B<memfd_create>() で作成されたファイルのファイルディスクリプターを取得でき"
11970 "そのパス名を使って、 I</proc/PID/fd> シンボリックリンクの内容を調査し、 "
11971 "I<t_get_seals> プログラムを使ってそのファイルに設定されている seal を見ること"
11974 #. type: Plain text
11975 #: build/C/man2/memfd_create.2:354
11978 "$ B<readlink /proc/11775/fd/3>\n"
11979 "/memfd:my_memfd_file (deleted)\n"
11980 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11981 "Existing seals: WRITE SHRINK\n"
11983 "$ B<readlink /proc/11775/fd/3>\n"
11984 "/memfd:my_memfd_file (deleted)\n"
11985 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11986 "Existing seals: WRITE SHRINK\n"
11989 #: build/C/man2/memfd_create.2:356
11991 msgid "Program source: t_memfd_create.c"
11992 msgstr "プログラムのソース: t_memfd_create.c"
11994 #. type: Plain text
11995 #: build/C/man2/memfd_create.2:365
11998 "#include E<lt>sys/memfd.hE<gt>\n"
11999 "#include E<lt>fcntl.hE<gt>\n"
12000 "#include E<lt>stdlib.hE<gt>\n"
12001 "#include E<lt>unistd.hE<gt>\n"
12002 "#include E<lt>string.hE<gt>\n"
12003 "#include E<lt>stdio.hE<gt>\n"
12005 "#include E<lt>sys/memfd.hE<gt>\n"
12006 "#include E<lt>fcntl.hE<gt>\n"
12007 "#include E<lt>stdlib.hE<gt>\n"
12008 "#include E<lt>unistd.hE<gt>\n"
12009 "#include E<lt>string.hE<gt>\n"
12010 "#include E<lt>stdio.hE<gt>\n"
12012 #. type: Plain text
12013 #: build/C/man2/memfd_create.2:377
12017 "main(int argc, char *argv[])\n"
12020 " unsigned int seals;\n"
12022 " char *name, *seals_arg;\n"
12026 "main(int argc, char *argv[])\n"
12029 " unsigned int seals;\n"
12031 " char *name, *seals_arg;\n"
12034 #. type: Plain text
12035 #: build/C/man2/memfd_create.2:388
12038 " if (argc E<lt> 3) {\n"
12039 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12040 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12041 " \"following characters:\\en\");\n"
12042 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12043 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12044 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12045 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12046 " exit(EXIT_FAILURE);\n"
12049 " if (argc E<lt> 3) {\n"
12050 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12051 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12052 " \"following characters:\\en\");\n"
12053 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12054 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12055 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12056 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12057 " exit(EXIT_FAILURE);\n"
12060 #. type: Plain text
12061 #: build/C/man2/memfd_create.2:392
12064 " name = argv[1];\n"
12065 " len = atoi(argv[2]);\n"
12066 " seals_arg = argv[3];\n"
12068 " name = argv[1];\n"
12069 " len = atoi(argv[2]);\n"
12070 " seals_arg = argv[3];\n"
12072 #. type: Plain text
12073 #: build/C/man2/memfd_create.2:395
12076 " /* Create an anonymous file in tmpfs; allow seals to be\n"
12077 " placed on the file */\n"
12079 " /* Create an anonymous file in tmpfs; allow seals to be\n"
12080 " placed on the file */\n"
12082 #. type: Plain text
12083 #: build/C/man2/memfd_create.2:399
12086 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12088 " errExit(\"memfd_create\");\n"
12090 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12092 " errExit(\"memfd_create\");\n"
12094 #. type: Plain text
12095 #: build/C/man2/memfd_create.2:401
12097 msgid " /* Size the file as specified on the command line */\n"
12098 msgstr " /* Size the file as specified on the command line */\n"
12100 #. type: Plain text
12101 #: build/C/man2/memfd_create.2:404
12104 " if (ftruncate(fd, len) == -1)\n"
12105 " errExit(\"truncate\");\n"
12107 " if (ftruncate(fd, len) == -1)\n"
12108 " errExit(\"truncate\");\n"
12110 #. type: Plain text
12111 #: build/C/man2/memfd_create.2:407
12114 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12115 " (long) getpid(), fd, (long) getpid(), fd);\n"
12117 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12118 " (long) getpid(), fd, (long) getpid(), fd);\n"
12120 #. type: Plain text
12121 #: build/C/man2/memfd_create.2:410
12124 " /* Code to map the file and populate the mapping with data\n"
12127 " /* Code to map the file and populate the mapping with data\n"
12130 #. type: Plain text
12131 #: build/C/man2/memfd_create.2:413
12134 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12135 " seals on the file */\n"
12137 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12138 " seals on the file */\n"
12140 #. type: Plain text
12141 #: build/C/man2/memfd_create.2:416
12144 " if (seals_arg != NULL) {\n"
12147 " if (seals_arg != NULL) {\n"
12150 #. type: Plain text
12151 #: build/C/man2/memfd_create.2:425
12154 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12155 " seals |= F_SEAL_GROW;\n"
12156 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12157 " seals |= F_SEAL_SHRINK;\n"
12158 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12159 " seals |= F_SEAL_WRITE;\n"
12160 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12161 " seals |= F_SEAL_SEAL;\n"
12163 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12164 " seals |= F_SEAL_GROW;\n"
12165 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12166 " seals |= F_SEAL_SHRINK;\n"
12167 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12168 " seals |= F_SEAL_WRITE;\n"
12169 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12170 " seals |= F_SEAL_SEAL;\n"
12172 #. type: Plain text
12173 #: build/C/man2/memfd_create.2:429
12176 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12177 " errExit(\"fcntl\");\n"
12180 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12181 " errExit(\"fcntl\");\n"
12184 #. type: Plain text
12185 #: build/C/man2/memfd_create.2:432
12188 " /* Keep running, so that the file created by memfd_create()\n"
12189 " continues to exist */\n"
12191 " /* Keep running, so that the file created by memfd_create()\n"
12192 " continues to exist */\n"
12194 #. type: Plain text
12195 #: build/C/man2/memfd_create.2:434
12197 msgid " pause();\n"
12198 msgstr " pause();\n"
12201 #: build/C/man2/memfd_create.2:438
12203 msgid "Program source: t_get_seals.c"
12204 msgstr "プログラムのソース: t_get_seals.c"
12206 #. type: Plain text
12207 #: build/C/man2/memfd_create.2:447
12210 "#include E<lt>sys/memfd.hE<gt>\n"
12211 "#include E<lt>fcntl.hE<gt>\n"
12212 "#include E<lt>unistd.hE<gt>\n"
12213 "#include E<lt>stdlib.hE<gt>\n"
12214 "#include E<lt>string.hE<gt>\n"
12215 "#include E<lt>stdio.hE<gt>\n"
12217 "#include E<lt>sys/memfd.hE<gt>\n"
12218 "#include E<lt>fcntl.hE<gt>\n"
12219 "#include E<lt>unistd.hE<gt>\n"
12220 "#include E<lt>stdlib.hE<gt>\n"
12221 "#include E<lt>string.hE<gt>\n"
12222 "#include E<lt>stdio.hE<gt>\n"
12224 #. type: Plain text
12225 #: build/C/man2/memfd_create.2:456
12229 "main(int argc, char *argv[])\n"
12232 " unsigned int seals;\n"
12235 "main(int argc, char *argv[])\n"
12238 " unsigned int seals;\n"
12240 #. type: Plain text
12241 #: build/C/man2/memfd_create.2:461
12244 " if (argc != 2) {\n"
12245 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12246 " exit(EXIT_FAILURE);\n"
12249 " if (argc != 2) {\n"
12250 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12251 " exit(EXIT_FAILURE);\n"
12254 #. type: Plain text
12255 #: build/C/man2/memfd_create.2:465
12258 " fd = open(argv[1], O_RDWR);\n"
12260 " errExit(\"open\");\n"
12262 " fd = open(argv[1], O_RDWR);\n"
12264 " errExit(\"open\");\n"
12266 #. type: Plain text
12267 #: build/C/man2/memfd_create.2:469
12270 " seals = fcntl(fd, F_GET_SEALS);\n"
12271 " if (seals == -1)\n"
12272 " errExit(\"fcntl\");\n"
12274 " seals = fcntl(fd, F_GET_SEALS);\n"
12275 " if (seals == -1)\n"
12276 " errExit(\"fcntl\");\n"
12278 #. type: Plain text
12279 #: build/C/man2/memfd_create.2:480
12282 " printf(\"Existing seals:\");\n"
12283 " if (seals & F_SEAL_SEAL)\n"
12284 " printf(\" SEAL\");\n"
12285 " if (seals & F_SEAL_GROW)\n"
12286 " printf(\" GROW\");\n"
12287 " if (seals & F_SEAL_WRITE)\n"
12288 " printf(\" WRITE\");\n"
12289 " if (seals & F_SEAL_SHRINK)\n"
12290 " printf(\" SHRINK\");\n"
12291 " printf(\"\\en\");\n"
12293 " printf(\"Existing seals:\");\n"
12294 " if (seals & F_SEAL_SEAL)\n"
12295 " printf(\" SEAL\");\n"
12296 " if (seals & F_SEAL_GROW)\n"
12297 " printf(\" GROW\");\n"
12298 " if (seals & F_SEAL_WRITE)\n"
12299 " printf(\" WRITE\");\n"
12300 " if (seals & F_SEAL_SHRINK)\n"
12301 " printf(\" SHRINK\");\n"
12302 " printf(\"\\en\");\n"
12304 #. type: Plain text
12305 #: build/C/man2/memfd_create.2:483
12308 " /* Code to map the file and access the contents of the\n"
12309 " resulting mapping omitted */\n"
12311 " /* Code to map the file and access the contents of the\n"
12312 " resulting mapping omitted */\n"
12314 #. type: Plain text
12315 #: build/C/man2/memfd_create.2:493
12316 msgid "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12317 msgstr "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12320 #: build/C/man2/s390_pci_mmio_write.2:25
12322 msgid "S390_PCI_MMIO_WRITE"
12323 msgstr "S390_PCI_MMIO_WRITE"
12326 #: build/C/man2/s390_pci_mmio_write.2:25
12329 msgstr "2015-01-15"
12331 #. type: Plain text
12332 #: build/C/man2/s390_pci_mmio_write.2:29
12334 "s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO "
12338 #. type: Plain text
12339 #: build/C/man2/s390_pci_mmio_write.2:32
12341 msgid "B<#include E<lt>asm/unistd.hE<gt>>\n"
12342 msgstr "B<#include E<lt>asm/unistd.hE<gt>>\n"
12344 #. type: Plain text
12345 #: build/C/man2/s390_pci_mmio_write.2:35
12348 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12349 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12351 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12352 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12354 #. type: Plain text
12355 #: build/C/man2/s390_pci_mmio_write.2:38
12358 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12359 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12361 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12362 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12364 #. type: Plain text
12365 #: build/C/man2/s390_pci_mmio_write.2:57
12367 "The B<s390_pci_mmio_write>() system call writes I<length> bytes of data "
12368 "from the user-space buffer I<user_buffer> to the PCI MMIO memory location "
12369 "specified by I<mmio_addr>. The B<s390_pci_mmio_read>() system call reads "
12370 "I<length> bytes of data from the PCI MMIO memory location specified by "
12371 "I<mmio_addr> to the user-space buffer I<user_buffer>."
12374 #. type: Plain text
12375 #: build/C/man2/s390_pci_mmio_write.2:68
12377 "These system calls must be used instead of the simple assignment or data-"
12378 "transfer operations that are used to access the PCI MMIO memory areas mapped "
12379 "to user space on the Linux System z platform. The address specified by "
12380 "I<mmio_addr> must belong to a PCI MMIO memory page mapping in the caller's "
12381 "address space, and the data being written or read must not cross a page "
12382 "boundary. The I<length> value cannot be greater than the system page size."
12385 #. type: Plain text
12386 #: build/C/man2/s390_pci_mmio_write.2:77
12388 "On success, B<s390_pci_mmio_write>() and B<s390_pci_mmio_read>() return "
12389 "0. On error, -1 is returned and I<errno> is set to one of the error codes "
12392 "成功すると、 B<s390_pci_mmio_write>() と B<s390_pci_mmio_read>() は 0 を返"
12393 "す。 エラーの場合、-1 を返し、 I<errno> に以下のリストにあるエラーコードのい"
12396 #. type: Plain text
12397 #: build/C/man2/s390_pci_mmio_write.2:83
12398 msgid "The address in I<mmio_addr> is invalid."
12401 #. type: Plain text
12402 #: build/C/man2/s390_pci_mmio_write.2:87
12404 "I<user_buffer> does not point to a valid location in the caller's address "
12408 #. type: Plain text
12409 #: build/C/man2/s390_pci_mmio_write.2:92
12410 msgid "Invalid I<length> argument."
12413 #. type: Plain text
12414 #: build/C/man2/s390_pci_mmio_write.2:95
12415 msgid "PCI support is not enabled."
12418 #. type: Plain text
12419 #: build/C/man2/s390_pci_mmio_write.2:98
12420 msgid "Insufficient memory."
12423 #. type: Plain text
12424 #: build/C/man2/s390_pci_mmio_write.2:100
12425 msgid "These system calls are available since Linux 3.19."
12426 msgstr "これらのシステムコールは Linux 3.19 以降で使用可能である。"
12428 #. type: Plain text
12429 #: build/C/man2/s390_pci_mmio_write.2:103
12431 "This Linux-specific system call is available only on the s390 architecture. "
12432 "The required PCI support is available beginning with System z EC12."
12435 #. type: Plain text
12436 #: build/C/man2/s390_pci_mmio_write.2:107
12438 "Glibc does not provide a wrapper for this system call, use B<syscall>(2) to "
12442 #. type: Plain text
12443 #: build/C/man2/s390_pci_mmio_write.2:109
12444 msgid "B<syscall>(2)"
12445 msgstr "B<syscall>(2)"
12447 #~ msgid "System-wide limit on the number of pages of shared memory."
12448 #~ msgstr "共有メモリーのページ数のシステム全体での上限値。"
12451 #~ "Segment low boundary address multiple. Must be page aligned. For the "
12452 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
12454 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
12455 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
12457 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
12459 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
12462 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
12463 #~ "2^20 (2,097,152)."
12465 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
12466 #~ "(2,097,152) になる。"
12469 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
12470 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
12473 #~ "共有メモリーセグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
12474 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
12478 #~ "System wide maximum number of shared memory segments: implementation "
12479 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
12480 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
12482 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
12483 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
12484 #~ "で参照したり、変更したりできる)。"
12487 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
12489 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
12493 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
12494 #~ "pair of registers. On this architecture, the call signature of "
12495 #~ "B<posix_fadvise>() is flawed, since it forces a register to be wasted as "
12496 #~ "padding between the I<fd> and I<len> arguments. Therefore, since Linux "
12497 #~ "2.6.14, ARM defines a different system call that orders the arguments "
12500 #~ "ARM アーキテクチャーでは、64 ビットの引き数は適切なレジスターの組に割り当"
12502 #~ "る必要がある。このアーキテクチャーでは、B<posix_fadvise>() の呼び出し方"
12504 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
12505 #~ "パディング (詰めもの) でレジスターが一つ消費されてしまうというものであ"
12507 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
12508 #~ "システムコールが定義されている。"
12511 #~ "The behavior of this system call is otherwise exactly the same as "
12512 #~ "B<posix_fadvise>(). No library support is provided for this system call "
12515 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
12516 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
12520 #~ "The I<mode> is not supported by the file system containing the file "
12521 #~ "referred to by I<fd>."
12523 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
12527 #~ "The function B<mtrace>() installs handlers for B<malloc>(3), "
12528 #~ "B<realloc>(3) and B<free>(3). The function B<muntrace>() disables "
12529 #~ "these handlers."
12531 #~ "関数 B<mtrace>() は、 B<malloc>(3), B<realloc>(3), B<free>(3) のハンド"
12532 #~ "ラーを組み込む。 関数 B<muntrace>() はこれらのハンドラーを解除する。"
12535 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
12536 #~ "B<mtrace>() writes its output. This file must be writable to the user "
12537 #~ "or B<mtrace>() will do nothing. If the file is not empty it will be "
12540 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>() が出力を書き出すファイルを指定す"
12541 #~ "る。 ユーザーが書き込み権限を持つファイルを指定しなければならない。 書き込"
12542 #~ "み権限がない場合、 B<mtrace>() は何もしない。 ファイルが空でない場合、"
12543 #~ "ファイルの元の内容を上書きする。"
12546 #~ "The output of B<mtrace>() will be ASCII but not in a friendly format. "
12547 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
12549 #~ "B<mtrace>() の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
12550 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
12554 #~ "This flag allocates and initializes to zero the disk space within the "
12555 #~ "range specified by I<offset> and I<len>. After a successful call, "
12556 #~ "subsequent writes into this range are guaranteed not to fail because of "
12557 #~ "lack of disk space. Preallocating zeroed blocks beyond the end of the "
12558 #~ "file is useful for optimizing append workloads. Preallocating blocks "
12559 #~ "does not change the file size (as reported by B<stat>(2)) even if it is "
12560 #~ "less than I<offset>+I<len>."
12562 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
12563 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
12564 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
12565 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
12566 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
12567 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
12568 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2) が返す) ファイルサイズ"