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-01-23 22:24+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:20+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man2/alloc_hugepages.2:25
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
25 #: build/C/man2/alloc_hugepages.2:25
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:39 build/C/man2/mremap.2:30 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
40 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
41 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
42 #: build/C/man2/memfd_create.2:21
48 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
49 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
50 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
51 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
52 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
53 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
54 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
55 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:39
56 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
57 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
58 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
59 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
60 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
61 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
62 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
63 #: build/C/man2/memfd_create.2:21 build/C/man2/s390_pci_mmio_write.2:25
65 msgid "Linux Programmer's Manual"
66 msgstr "Linux Programmer's Manual"
69 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
70 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
71 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
72 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
73 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
74 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
75 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
76 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:40
77 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
78 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
79 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
80 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
81 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
82 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
83 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
84 #: build/C/man2/memfd_create.2:22 build/C/man2/s390_pci_mmio_write.2:26
90 #: build/C/man2/alloc_hugepages.2:28
91 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
93 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
96 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
97 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
98 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
99 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
100 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
101 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
102 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
103 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:42
104 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
105 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
106 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
107 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
108 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
109 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
110 #: build/C/man2/memfd_create.2:24 build/C/man2/s390_pci_mmio_write.2:29
115 #. asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
116 #. unsigned long len, int prot, int flag);
118 #: build/C/man2/alloc_hugepages.2:34
121 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
122 "B< int >I<prot>B<, int >I<flag>B<);>\n"
124 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
125 "B< int >I<prot>B<, int >I<flag>B<);>\n"
127 #. asmlinkage int sys_free_hugepages(unsigned long addr);
129 #: build/C/man2/alloc_hugepages.2:37
131 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
132 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
135 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
136 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
137 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
138 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
139 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
140 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
141 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
142 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:48
143 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
144 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
145 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
146 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
147 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
148 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
149 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
150 #: build/C/man2/memfd_create.2:28 build/C/man2/s390_pci_mmio_write.2:39
156 #: build/C/man2/alloc_hugepages.2:49
158 "The system calls B<alloc_hugepages>() and B<free_hugepages>() were "
159 "introduced in Linux 2.5.36 and removed again in 2.5.54. They existed only "
160 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>). In Linux 2.4.20, "
161 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
163 "システムコール B<alloc_hugepages>() と B<free_hugepages>() は Linux 2.5.36 "
164 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
165 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
166 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
170 #: build/C/man2/alloc_hugepages.2:57
172 "On i386 the memory management hardware knows about ordinary pages (4 KiB) "
173 "and huge pages (2 or 4 MiB). Similarly ia64 knows about huge pages of "
174 "several sizes. These system calls serve to map huge pages into the "
175 "process's memory or to free them again. Huge pages are locked into memory, "
176 "and are not swapped."
178 "i386 では、メモリー管理ハードウェアは通常のページ (4 KiB) と 大きなサイズの"
179 "ページ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様"
180 "に、ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシス"
181 "テムコールは、ヒュージページをプロセスのメモリーにマップしたり、 再び解放した"
182 "りする。 ヒュージページはメモリー内にロックされ、スワップされない。"
185 #: build/C/man2/alloc_hugepages.2:66
187 "The I<key> argument is an identifier. When zero the pages are private, and "
188 "not inherited by children. When positive the pages are shared with other "
189 "applications using the same I<key>, and inherited by child processes."
191 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
192 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
196 #: build/C/man2/alloc_hugepages.2:81
198 "The I<addr> argument of B<free_hugepages>() tells which page is being "
199 "freed: it was the return value of a call to B<alloc_hugepages>(). (The "
200 "memory is first actually freed when all users have released it.) The "
201 "I<addr> argument of B<alloc_hugepages>() is a hint, that the kernel may or "
202 "may not follow. Addresses must be properly aligned."
204 "B<free_hugepages>() の I<addr> 引き数は、どのページを解放するかを指定する: "
205 "I<addr> は B<alloc_hugepages>() の呼び出しの返り値である (全てのユーザーがメ"
206 "モリーを解放したときに、 そのメモリーは初めて実際に解放される)。 "
207 "B<alloc_hugepages>() の I<addr> 引き数はヒントであり、カーネルはそれに従うか"
208 "もしれないし、 従わないかもしれない。 アドレスは正しく配置されなければならな"
212 #: build/C/man2/alloc_hugepages.2:86
214 "The I<len> argument is the length of the required segment. It must be a "
215 "multiple of the huge page size."
217 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
221 #: build/C/man2/alloc_hugepages.2:94
223 "The I<prot> argument specifies the memory protection of the segment. It is "
224 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
226 "I<prot> 引き数はセグメントのメモリー保護を指定する。 これは B<PROT_READ>, "
227 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
230 #: build/C/man2/alloc_hugepages.2:109
232 "The I<flag> argument is ignored, unless I<key> is positive. In that case, "
233 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
234 "none with the given key existed. If this flag is not set, then B<ENOENT> is "
235 "returned when no segment with the given key exists."
237 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
238 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
239 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
240 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
244 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
245 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:228
246 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
247 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
248 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
249 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
250 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:77
251 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
252 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
253 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
254 #: build/C/man2/remap_file_pages.2:132 build/C/man3/shm_open.3:171
255 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:183
256 #: build/C/man2/shmop.2:168 build/C/man2/subpage_prot.2:66
257 #: build/C/man2/sync_file_range.2:141 build/C/man2/memfd_create.2:126
258 #: build/C/man2/s390_pci_mmio_write.2:68
264 #: build/C/man2/alloc_hugepages.2:118
266 "On success, B<alloc_hugepages>() returns the allocated virtual address, and "
267 "B<free_hugepages>() returns zero. On error, -1 is returned, and I<errno> "
268 "is set appropriately."
270 "成功した場合、 B<alloc_hugepages>() は割り当てられた仮想アドレスを返し、 "
271 "B<free_hugepages>() は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
275 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
276 #: build/C/man2/fallocate.2:235 build/C/man2/madvise.2:275
277 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
278 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
279 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:84
280 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
281 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
282 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
283 #: build/C/man2/remap_file_pages.2:139 build/C/man3/shm_open.3:180
284 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:188
285 #: build/C/man2/shmop.2:182 build/C/man2/subpage_prot.2:71
286 #: build/C/man2/sync_file_range.2:147 build/C/man2/memfd_create.2:133
287 #: build/C/man2/s390_pci_mmio_write.2:77
293 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:319
299 #: build/C/man2/alloc_hugepages.2:122
300 msgid "The system call is not supported on this kernel."
301 msgstr "このシステムコールはカーネルでサポートされていない。"
304 #: build/C/man2/alloc_hugepages.2:122
310 #: build/C/man2/alloc_hugepages.2:126
312 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages. This can "
313 "be read and written."
315 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
319 #: build/C/man2/alloc_hugepages.2:130
321 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
322 "their size in the three variables HugePages_Total, HugePages_Free, "
325 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
326 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
330 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
331 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:375
332 #: build/C/man2/madvise.2:332 build/C/man3/mallinfo.3:110
333 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
334 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
335 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:53
336 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
337 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:499 build/C/man2/mmap2.2:77
338 #: build/C/man2/mprotect.2:112 build/C/man2/mremap.2:185
339 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
340 #: build/C/man2/posix_fadvise.2:122 build/C/man3/posix_fallocate.3:108
341 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
342 #: build/C/man2/remap_file_pages.2:161 build/C/man3/shm_open.3:251
343 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:377
344 #: build/C/man2/shmget.2:248 build/C/man2/shmop.2:228
345 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
346 #: build/C/man2/memfd_create.2:161 build/C/man2/s390_pci_mmio_write.2:100
348 msgid "CONFORMING TO"
352 #: build/C/man2/alloc_hugepages.2:133
354 "These calls are specific to Linux on Intel processors, and should not be "
355 "used in programs intended to be portable."
357 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
361 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:78
362 #: build/C/man2/madvise.2:354 build/C/man3/malloc_get_state.3:88
363 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
364 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
365 #: build/C/man3/malloc_usable_size.3:55 build/C/man3/mcheck.3:147
366 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:517 build/C/man2/mmap2.2:79
367 #: build/C/man2/mprotect.2:121 build/C/man2/mremap.2:191
368 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:80
369 #: build/C/man2/posix_fadvise.2:131 build/C/man3/posix_fallocate.3:133
370 #: build/C/man3/posix_memalign.3:221 build/C/man2/readahead.2:93
371 #: build/C/man2/remap_file_pages.2:165 build/C/man3/shm_open.3:257
372 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:382
373 #: build/C/man2/shmget.2:256 build/C/man2/shmop.2:243
374 #: build/C/man2/subpage_prot.2:98 build/C/man2/sync_file_range.2:183
375 #: build/C/man2/memfd_create.2:165 build/C/man2/s390_pci_mmio_write.2:103
381 #: build/C/man2/alloc_hugepages.2:141
383 "These system calls are gone; they existed only in Linux 2.5.36 through to "
384 "2.5.54. Now the hugetlbfs filesystem can be used instead. Memory backed by "
385 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2) to "
386 "map files in this virtual filesystem."
388 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
389 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
390 "がサポートしている場合) ヒュージページを持つメモリーは、 B<mmap>(2) を使って"
391 "この仮想ファイルシステムでファイルをマップすることで取得できる。"
394 #: build/C/man2/alloc_hugepages.2:145
396 "The maximal number of huge pages can be specified using the B<hugepages=> "
399 "ヒュージページの最大数は、 B<hugepages=> 起動パラメーターを使って指定できる。"
402 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
403 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:383
404 #: build/C/man2/madvise.2:388 build/C/man3/mallinfo.3:279
405 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
406 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
407 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:69
408 #: build/C/man3/mallopt.3:568 build/C/man3/mcheck.3:208
409 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:741 build/C/man2/mmap2.2:101
410 #: build/C/man2/mprotect.2:228 build/C/man2/mremap.2:214
411 #: build/C/man2/msync.2:151 build/C/man3/mtrace.3:172
412 #: build/C/man2/posix_fadvise.2:215 build/C/man3/posix_fallocate.3:143
413 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
414 #: build/C/man2/remap_file_pages.2:183 build/C/man3/shm_open.3:283
415 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
416 #: build/C/man2/shmget.2:391 build/C/man2/shmop.2:301
417 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:227
418 #: build/C/man2/memfd_create.2:493 build/C/man2/s390_pci_mmio_write.2:109
424 #: build/C/man2/alloc_hugepages.2:158 build/C/man3/alloca.3:170
425 #: build/C/man2/cacheflush.2:97 build/C/man2/fallocate.2:391
426 #: build/C/man2/madvise.2:396 build/C/man3/mallinfo.3:287
427 #: build/C/man3/malloc_get_state.3:122 build/C/man3/malloc_hook.3:150
428 #: build/C/man3/malloc_info.3:270 build/C/man3/malloc_stats.3:75
429 #: build/C/man3/malloc_trim.3:90 build/C/man3/malloc_usable_size.3:77
430 #: build/C/man3/mallopt.3:576 build/C/man3/mcheck.3:216
431 #: build/C/man2/mlock.2:351 build/C/man2/mmap.2:749 build/C/man2/mmap2.2:109
432 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:222
433 #: build/C/man2/msync.2:159 build/C/man3/mtrace.3:180
434 #: build/C/man2/posix_fadvise.2:223 build/C/man3/posix_fallocate.3:151
435 #: build/C/man3/posix_memalign.3:285 build/C/man2/readahead.2:121
436 #: build/C/man2/remap_file_pages.2:191 build/C/man3/shm_open.3:291
437 #: build/C/man7/shm_overview.7:135 build/C/man2/shmctl.2:443
438 #: build/C/man2/shmget.2:399 build/C/man2/shmop.2:309
439 #: build/C/man2/subpage_prot.2:142 build/C/man2/sync_file_range.2:235
440 #: build/C/man2/memfd_create.2:501 build/C/man2/s390_pci_mmio_write.2:117
442 "This page is part of release 3.78 of the Linux I<man-pages> project. A "
443 "description of the project, information about reporting bugs, and the latest "
444 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
447 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
448 "である。プロジェクトの説明とバグ報告に関する情報は\n"
449 "http://www.kernel.org/doc/man-pages/ に書かれている。"
452 #: build/C/man3/alloca.3:43
458 #: build/C/man3/alloca.3:43
464 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
465 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
466 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
467 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
468 #: build/C/man3/posix_memalign.3:29
474 #: build/C/man3/alloca.3:46
475 msgid "alloca - allocate memory that is automatically freed"
476 msgstr "alloca - 自動的に解放されるメモリーを割り当てる"
479 #: build/C/man3/alloca.3:48
480 msgid "B<#include E<lt>alloca.hE<gt>>"
481 msgstr "B<#include E<lt>alloca.hE<gt>>"
484 #: build/C/man3/alloca.3:50
485 msgid "B<void *alloca(size_t >I<size>B<);>"
486 msgstr "B<void *alloca(size_t >I<size>B<);>"
489 #: build/C/man3/alloca.3:60
491 "The B<alloca>() function allocates I<size> bytes of space in the stack "
492 "frame of the caller. This temporary space is automatically freed when the "
493 "function that called B<alloca>() returns to its caller."
495 "B<alloca>() 関数は、 I<size> バイトの領域を呼出元のスタックフレームに割り付"
496 "ける。 この一時的な領域は、 B<alloca>() を呼び出した関数が呼出元に返るときに"
500 #: build/C/man3/alloca.3:65
502 "The B<alloca>() function returns a pointer to the beginning of the "
503 "allocated space. If the allocation causes stack overflow, program behavior "
506 "B<alloca>() 関数は、割り付けた領域の始まりを指すポインターを返す。 割り付け"
507 "によってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
511 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
512 #: build/C/man3/posix_fallocate.3:103
518 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
519 #: build/C/man3/posix_fallocate.3:104
521 msgid "Multithreading (see pthreads(7))"
522 msgstr "マルチスレッディング (pthreads(7) 参照)"
525 #: build/C/man3/alloca.3:70
526 msgid "The B<alloca>() function is thread-safe."
527 msgstr "B<alloca>() 関数はスレッドセーフである。"
530 #: build/C/man3/alloca.3:72
531 msgid "This function is not in POSIX.1-2001."
532 msgstr "この関数は POSIX.1-2001 にはない。"
535 #: build/C/man3/alloca.3:78
537 "There is evidence that the B<alloca>() function appeared in 32V, PWB, "
538 "PWB.2, 3BSD, and 4BSD. There is a man page for it in 4.3BSD. Linux uses "
541 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>() 関数が登場した証拠がある。 "
542 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
543 "は POSIX.1-2001 にはない。"
546 #: build/C/man3/alloca.3:93
548 "The B<alloca>() function is machine- and compiler-dependent. For certain "
549 "applications, its use can improve efficiency compared to the use of "
550 "B<malloc>(3) plus B<free>(3). In certain cases, it can also simplify "
551 "memory deallocation in applications that use B<longjmp>(3) or "
552 "B<siglongjmp>(3). Otherwise, its use is discouraged."
554 "B<alloca>() 関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
555 "は、この関数を使うと B<malloc>(3) と B<free>(3) を組み合わせて使った場合に"
556 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
557 "B<longjmp>(3) や B<siglongjmp>(3) を使うアプリケーションでのメモリーの開放"
558 "を簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
561 #: build/C/man3/alloca.3:102
563 "Because the space allocated by B<alloca>() is allocated within the stack "
564 "frame, that space is automatically freed if the function return is jumped "
565 "over by a call to B<longjmp>(3) or B<siglongjmp>(3)."
567 "B<alloca>() により割り当てられる空間はスタックフレームから割り当てらるの"
568 "で、 関数の戻り先が B<longjmp>(3) や B<siglongjmp>(3) の呼び出しによりジャ"
569 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
572 #: build/C/man3/alloca.3:107
573 msgid "Do not attempt to B<free>(3) space allocated by B<alloca>()!"
575 "B<alloca>() で割り当てられた空間を B<free>(3) しようとすることのないよう"
579 #: build/C/man3/alloca.3:107
581 msgid "Notes on the GNU version"
582 msgstr "GNU 版についての注意"
585 #: build/C/man3/alloca.3:129
587 "Normally, B<gcc>(1) translates calls to B<alloca>() with inlined code. "
588 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
589 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
590 "included. Otherwise, (without an -ansi or -std=c* option) the glibc version "
591 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
594 "通常 B<gcc>(1) は B<alloca>() の呼び出しをインラインコードに変換する。 I<-"
595 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
596 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
597 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
598 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
599 "インクルードするが、このファイルには以下の行が含まれており、"
602 #: build/C/man3/alloca.3:134
606 " #define alloca(size) __builtin_alloca (size)\n"
610 " #define alloca(size) __builtin_alloca (size)\n"
614 #: build/C/man3/alloca.3:137
615 msgid "with messy consequences if one has a private version of this function."
616 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
619 #: build/C/man3/alloca.3:141
621 "The fact that the code is inlined means that it is impossible to take the "
622 "address of this function, or to change its behavior by linking with a "
625 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
626 "のライブラリをリンクして動作を変更することはできない。"
629 #: build/C/man3/alloca.3:145
631 "The inlined code often consists of a single instruction adjusting the stack "
632 "pointer, and does not check for stack overflow. Thus, there is no NULL "
635 "通常このインラインコードはスタックポインターを移動する 1 つの命令 "
636 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
637 "よって NULL エラーが返されることはない。"
640 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
641 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
642 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:590 build/C/man3/mtrace.3:102
643 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
644 #: build/C/man2/shmget.2:376
650 #: build/C/man3/alloca.3:150
652 "There is no error indication if the stack frame cannot be extended. "
653 "(However, after a failed allocation, the program is likely to receive a "
654 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
656 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
657 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
658 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
661 #: build/C/man3/alloca.3:158
663 "On many systems B<alloca>() cannot be used inside the list of arguments of "
664 "a function call, because the stack space reserved by B<alloca>() would "
665 "appear on the stack in the middle of the space for the function arguments."
667 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>() が使え"
668 "ない。 これは、 B<alloca>() によって予約されるスタック領域が、 関数引き数に"
669 "使われるスタック領域の中に現れてしまうためである。"
672 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:378
673 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
674 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
675 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
676 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
677 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
678 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:715 build/C/man2/mmap2.2:95
679 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
680 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
681 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:138
682 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
683 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
684 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
685 #: build/C/man2/shmget.2:382 build/C/man2/shmop.2:293
686 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
687 #: build/C/man2/memfd_create.2:487 build/C/man2/s390_pci_mmio_write.2:107
693 #: build/C/man3/alloca.3:162
694 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
695 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
698 #: build/C/man2/cacheflush.2:25
704 #: build/C/man2/cacheflush.2:25
710 #: build/C/man2/cacheflush.2:28
711 msgid "cacheflush - flush contents of instruction and/or data cache"
712 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
715 #: build/C/man2/cacheflush.2:31
717 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
718 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
721 #: build/C/man2/cacheflush.2:33
723 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
724 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
727 #: build/C/man2/cacheflush.2:43
729 "B<cacheflush>() flushes the contents of the indicated cache(s) for the user "
730 "addresses in the range I<addr> to I<(addr+nbytes-1)>. I<cache> may be one "
733 "B<cacheflush>() は I<addr> から I<(addr+nbytes-1)> の範囲のユーザーアドレス"
734 "に対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれか"
738 #: build/C/man2/cacheflush.2:43
744 #: build/C/man2/cacheflush.2:46
745 msgid "Flush the instruction cache."
746 msgstr "命令 (instruction) キャッシュをフラッシュする。"
749 #: build/C/man2/cacheflush.2:46
755 #: build/C/man2/cacheflush.2:49
756 msgid "Write back to memory and invalidate the affected valid cache lines."
757 msgstr "変更があったキャッシュラインをメモリーに書き戻し、無効にする。"
760 #: build/C/man2/cacheflush.2:49
766 #: build/C/man2/cacheflush.2:53
767 msgid "Same as B<(ICACHE|DCACHE)>."
768 msgstr "B<(ICACHE|DCACHE)> と同じ。"
771 #: build/C/man2/cacheflush.2:59
773 "B<cacheflush>() returns 0 on success or -1 on error. If errors are "
774 "detected, I<errno> will indicate the error."
776 "B<cacheflush>() は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
777 "出された場合は I<errno> にエラーが指示される。"
780 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
781 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
782 #: build/C/man2/subpage_prot.2:72 build/C/man2/memfd_create.2:134
783 #: build/C/man2/s390_pci_mmio_write.2:78 build/C/man2/s390_pci_mmio_write.2:83
789 #: build/C/man2/cacheflush.2:67
791 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
794 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
798 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
799 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
800 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
801 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
802 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
803 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
804 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
805 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
806 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
807 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
808 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
809 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
810 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
811 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
812 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
813 #: build/C/man2/memfd_create.2:139 build/C/man2/s390_pci_mmio_write.2:87
819 #: build/C/man2/cacheflush.2:75
820 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
822 "I<cache> パラメーターが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
824 #. FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
825 #. but by now it is on a number of other architectures (but not i386).
826 #. Investigate the details and update this page.
827 #. Irix 6.5 appears to have a cacheflush() syscall -- mtk
829 #: build/C/man2/cacheflush.2:82
831 "This Linux-specific system call is available only on MIPS-based systems. It "
832 "should not be used in programs intended to be portable."
834 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
835 "植を意図したプログラムで使用すべきではない。"
838 #: build/C/man2/cacheflush.2:89
840 "The current implementation ignores the I<addr> and I<nbytes> arguments. "
841 "Therefore, the whole cache is always flushed."
843 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
847 #: build/C/man2/fallocate.2:11
853 #: build/C/man2/fallocate.2:11 build/C/man3/malloc_info.3:25
854 #: build/C/man2/mmap.2:40 build/C/man3/posix_fallocate.3:25
855 #: build/C/man3/shm_open.3:26 build/C/man2/memfd_create.2:21
861 #: build/C/man2/fallocate.2:14
862 msgid "fallocate - manipulate file space"
863 msgstr "fallocate - ファイル空間の操作"
866 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
869 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
870 "B<#include E<lt>fcntl.hE<gt>>\n"
872 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
873 "B<#include E<lt>fcntl.hE<gt>>\n"
876 #: build/C/man2/fallocate.2:21
878 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
879 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
882 #: build/C/man2/fallocate.2:27
884 "This is a nonportable, Linux-specific system call. For the portable, "
885 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
886 "B<posix_fallocate>(3)."
888 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
889 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
890 "で規定された方法である B<posix_fallocate>(3) を使うこと。"
893 #: build/C/man2/fallocate.2:37
895 "B<fallocate>() allows the caller to directly manipulate the allocated disk "
896 "space for the file referred to by I<fd> for the byte range starting at "
897 "I<offset> and continuing for I<len> bytes."
899 "B<fallocate>() を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
900 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
904 #: build/C/man2/fallocate.2:42
906 "The I<mode> argument determines the operation to be performed on the given "
907 "range. Details of the supported operations are given in the subsections "
910 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
911 "サポートされている操作の詳細は以下のサブセクションで説明する。"
914 #: build/C/man2/fallocate.2:42
916 msgid "Allocating disk space"
920 #: build/C/man2/fallocate.2:65
922 "The default operation (i.e., I<mode> is zero) of B<fallocate>() allocates "
923 "the disk space within the range specified by I<offset> and I<len>. The file "
924 "size (as reported by B<stat>(2)) will be changed if I<offset>+I<len> is "
925 "greater than the file size. Any subregion within the range specified by "
926 "I<offset> and I<len> that did not contain data before the call will be "
927 "initialized to zero. This default behavior closely resembles the behavior "
928 "of the B<posix_fallocate>(3) library function, and is intended as a method "
929 "of optimally implementing that function."
931 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
932 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
933 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
934 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
935 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
936 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
937 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
938 "適に実装する手段を提供することを目的としているからである。"
941 #: build/C/man2/fallocate.2:71
943 "After a successful call, subsequent writes into the range specified by "
944 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
948 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
949 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
952 #: build/C/man2/fallocate.2:82
954 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
955 "the call is similar, but the file size will not be changed even if I<offset>"
956 "+I<len> is greater than the file size. Preallocating zeroed blocks beyond "
957 "the end of the file in this manner is useful for optimizing append workloads."
959 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
961 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
962 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
963 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
967 #: build/C/man2/fallocate.2:86
969 "Because allocation is done in block size chunks, B<fallocate>() may "
970 "allocate a larger range of disk space than was specified."
972 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
974 "も大きなディスク領域を割り当てることがある。"
977 #: build/C/man2/fallocate.2:86
979 msgid "Deallocating file space"
980 msgstr "ファイル空間の割り当て解除"
983 #: build/C/man2/fallocate.2:101
985 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
986 "in I<mode> deallocates space (i.e., creates a hole) in the byte range "
987 "starting at I<offset> and continuing for I<len> bytes. Within the specified "
988 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
989 "removed from the file. After a successful call, subsequent reads from this "
990 "range will return zeroes."
992 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
993 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
994 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
995 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
996 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1000 #: build/C/man2/fallocate.2:112
1002 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
1003 "I<mode>; in other words, even when punching off the end of the file, the "
1004 "file size (as reported by B<stat>(2)) does not change."
1006 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
1007 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
1008 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
1011 #: build/C/man2/fallocate.2:117
1013 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1014 "support the operation, an error is returned. The operation is supported on "
1015 "at least the following filesystems:"
1017 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1018 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1019 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1022 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1023 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1024 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1025 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1026 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1027 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1028 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1029 #: build/C/man2/shmop.2:80 build/C/man2/memfd_create.2:248
1030 #: build/C/man2/memfd_create.2:258 build/C/man2/memfd_create.2:266
1036 #: build/C/man2/fallocate.2:119
1037 msgid "XFS (since Linux 2.6.38)"
1038 msgstr "XFS (Linux 2.6.38 以降)"
1040 #. commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1042 #: build/C/man2/fallocate.2:122
1043 msgid "ext4 (since Linux 3.0)"
1044 msgstr "ext4 (Linux 3.0 以降)"
1047 #: build/C/man2/fallocate.2:124
1048 msgid "Btrfs (since Linux 3.7)"
1049 msgstr "Btrfs (Linux 3.7 以降)"
1051 #. commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1053 #: build/C/man2/fallocate.2:127
1054 msgid "tmpfs (since Linux 3.5)"
1055 msgstr "tmpfs (Linux 3.5 以降)"
1058 #: build/C/man2/fallocate.2:127
1060 msgid "Collapsing file space"
1061 msgstr "ファイル空間の一部削除"
1063 #. commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1065 #: build/C/man2/fallocate.2:147
1067 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1068 "in I<mode> removes a byte range from a file, without leaving a hole. The "
1069 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1070 "bytes. At the completion of the operation, the contents of the file "
1071 "starting at the location I<offset+len> will be appended at the location "
1072 "I<offset>, and the file will be I<len> bytes smaller."
1074 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1075 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残さ"
1076 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1077 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1078 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1082 #: build/C/man2/fallocate.2:161
1084 "A filesystem may place limitations on the granularity of the operation, in "
1085 "order to ensure efficient implementation. Typically, I<offset> and I<len> "
1086 "must be a multiple of the filesystem logical block size, which varies "
1087 "according to the filesystem type and configuration. If a filesystem has "
1088 "such a requirement, B<fallocate>() will fail with the error B<EINVAL> if "
1089 "this requirement is violated."
1091 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1092 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1093 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1094 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1095 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1098 #: build/C/man2/fallocate.2:170
1100 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1101 "of file, an error is returned; instead, use B<ftruncate>(2) to truncate a "
1104 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1105 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1106 "B<ftruncate>(2) を使用すること。"
1109 #: build/C/man2/fallocate.2:175
1111 "No other flags may be specified in I<mode> in conjunction with "
1112 "B<FALLOC_FL_COLLAPSE_RANGE>."
1114 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1117 #. commit 9eb79482a97152930b113b51dff530aba9e28c8e
1118 #. commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1120 #: build/C/man2/fallocate.2:183
1122 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1123 "extent-based files) and XFS."
1125 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1126 "ファイル) と XFS でサポートされている。"
1129 #: build/C/man2/fallocate.2:183
1131 msgid "Zeroing file space"
1132 msgstr "ファイル空間のゼロ埋め"
1134 #. commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1136 #: build/C/man2/fallocate.2:199
1138 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14) in "
1139 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1140 "for I<len> bytes. Within the specified range, blocks are preallocated for "
1141 "the regions that span the holes in the file. After a successful call, "
1142 "subsequent reads from this range will return zeroes."
1144 "B<FALLOC_FL_ZERO_RANGE> フラグ (Linux 3.14 以降で利用可能) を I<mode> に指定"
1145 "すると、 I<offset> で始まる I<len> バイト範囲の空間をゼロ埋めする。 指定され"
1146 "た範囲の中では、ブロックは、そのファイル内のホールが広がる領域にあらかじめ割"
1147 "り当てられたものである。 呼び出しが成功すると、 これ以降のこの範囲からの読み"
1151 #: build/C/man2/fallocate.2:205
1153 "Zeroing is done within the filesystem preferably by converting the range "
1154 "into unwritten extents. This approach means that the specified range will "
1155 "not be physically zeroed out on the device (except for partial blocks at the "
1156 "either end of the range), and I/O is (otherwise) required only to update "
1159 "ゼロ埋めは、ファイルシステム内部では、指定された範囲を書き込みを伴わないエク"
1160 "ステントに変換する方法をできるだけ使って行われる。 この方法は、指定された範囲"
1161 "について物理的にゼロ埋めしたデータがデバイスに書き込まれるのではないことを意"
1162 "味する (例外は指定された範囲の端の部分的に使用しているブロックである)。 (これ"
1163 "以外で) I/O が必要なのはメタデータの更新だけである。"
1166 #: build/C/man2/fallocate.2:217
1168 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1169 "behavior of the call is similar, but the file size will not be changed even "
1170 "if I<offset>+I<len> is greater than the file size. This behavior is the "
1171 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1173 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に追加で指定された場合、 このシステム"
1174 "コールの動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合"
1175 "であってもファイルサイズは変更されない点が異なる。 この動作は "
1176 "B<FALLOC_FL_KEEP_SIZE> を指定してスペースを前もって割り当てた場合と同じであ"
1180 #: build/C/man2/fallocate.2:222
1182 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1183 "support the operation, an error is returned. The operation is supported on "
1184 "at least the following filesystems:"
1186 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1187 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1188 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1190 #. commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1192 #: build/C/man2/fallocate.2:225
1193 msgid "XFS (since Linux 3.14)"
1194 msgstr "XFS (Linux 3.14 以降)"
1196 #. commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1198 #: build/C/man2/fallocate.2:228
1199 msgid "ext4, for extent-based files (since Linux 3.14)"
1200 msgstr "ext4 のエクステントベースのファイル (Linux 3.14 以降)"
1203 #: build/C/man2/fallocate.2:235
1205 "On success, B<fallocate>() returns zero. On error, -1 is returned and "
1206 "I<errno> is set to indicate the error."
1208 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> "
1212 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1213 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1214 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1215 #: build/C/man2/sync_file_range.2:148
1221 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1222 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1224 "I<fd> が有効なファイルディスクリプターでないか、 書き込み用としてオープンされ"
1228 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1234 #: build/C/man2/fallocate.2:244
1235 msgid "I<offset>+I<len> exceeds the maximum file size."
1236 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1239 #: build/C/man2/fallocate.2:244
1245 #: build/C/man2/fallocate.2:247
1246 msgid "A signal was caught during execution."
1247 msgstr "実行中にシグナルが捕捉された。"
1250 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1251 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1252 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1255 #: build/C/man2/fallocate.2:269
1257 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1258 "plus I<len> reaches or passes the end of the file."
1260 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1261 "範囲がファイルの末尾かそれより先まで達している。"
1264 #: build/C/man2/fallocate.2:279
1266 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1267 "not a multiple of the filesystem block size."
1269 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1270 "がファイルシステムのブロックサイズの倍数ではない。"
1273 #: build/C/man2/fallocate.2:287
1275 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1276 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1278 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1279 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1281 #. There was a inconsistency in 3.15-rc1, that should be resolved so that all
1282 #. filesystems use this error for this case. (Tytso says ex4 will change.)
1283 #. http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1284 #. From: Michael Kerrisk (man-pages <mtk.manpages@...>
1285 #. Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1286 #. Newsgroups: gmane.linux.man, gmane.linux.file-systems
1287 #. Date: 2014-04-17 13:40:05 GMT
1289 #: build/C/man2/fallocate.2:304
1291 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1292 "file referred to by I<fd> is not a regular file."
1294 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1295 "I<fd> が参照しているファイルが通常のファイルではない。"
1298 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1299 #: build/C/man2/sync_file_range.2:160
1305 #: build/C/man2/fallocate.2:307
1306 msgid "An I/O error occurred while reading from or writing to a filesystem."
1307 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1310 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1311 #: build/C/man3/posix_fallocate.3:87 build/C/man2/s390_pci_mmio_write.2:92
1317 #: build/C/man2/fallocate.2:314
1319 "I<fd> does not refer to a regular file or a directory. (If I<fd> is a pipe "
1320 "or FIFO, a different error results.)"
1322 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1323 "を参照している場合、別のエラーが発生する)。"
1326 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1327 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1333 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1335 "There is not enough space left on the device containing the file referred to "
1337 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1340 #: build/C/man2/fallocate.2:323
1341 msgid "This kernel does not implement B<fallocate>()."
1342 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1345 #: build/C/man2/fallocate.2:323
1347 msgid "B<EOPNOTSUPP>"
1348 msgstr "B<EOPNOTSUPP>"
1351 #: build/C/man2/fallocate.2:332
1353 "The filesystem containing the file referred to by I<fd> does not support "
1354 "this operation; or the I<mode> is not supported by the filesystem containing "
1355 "the file referred to by I<fd>."
1357 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1358 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1359 "I<mode> をサポートしていない。"
1362 #: build/C/man2/fallocate.2:332 build/C/man2/fallocate.2:338
1363 #: build/C/man2/fallocate.2:351 build/C/man2/mlock.2:143
1364 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/mmap.2:467
1365 #: build/C/man2/shmctl.2:353 build/C/man2/shmget.2:241
1371 #: build/C/man2/fallocate.2:338
1372 msgid "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
1374 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1375 "(B<chattr>(1) 参照)。"
1378 #: build/C/man2/fallocate.2:351
1380 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1381 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1383 "I<mode> に B<FALLOC_FL_PUNCH_HOLE> か B<FALLOC_FL_COLLAPSE_RANGE> が指定され"
1384 "たが、 I<fd> が参照するファイルに追加のみ (append-only) の属性が付いている "
1385 "(B<chattr>(1) 参照)。"
1388 #: build/C/man2/fallocate.2:355 build/C/man2/mmap.2:471
1389 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
1390 msgstr "操作が file seal により禁止されている。 B<fcntl>(2) 参照。"
1393 #: build/C/man2/fallocate.2:355 build/C/man2/posix_fadvise.2:97
1394 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1400 #: build/C/man2/fallocate.2:359
1401 msgid "I<fd> refers to a pipe or FIFO."
1402 msgstr "I<fd> がパイプか FIFO を参照している。"
1405 #: build/C/man2/fallocate.2:359 build/C/man2/mmap.2:471
1411 #: build/C/man2/fallocate.2:367
1413 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1414 "I<fd> is currently being executed."
1416 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1420 #: build/C/man2/fallocate.2:367 build/C/man2/madvise.2:325
1421 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1422 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1423 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1424 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1425 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1426 #: build/C/man2/sync_file_range.2:177 build/C/man2/memfd_create.2:155
1427 #: build/C/man2/s390_pci_mmio_write.2:98
1432 #. See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1434 #: build/C/man2/fallocate.2:375
1436 "B<fallocate>() is available on Linux since kernel 2.6.23. Support is "
1437 "provided by glibc since version 2.10. The B<FALLOC_FL_*> flags are defined "
1438 "in glibc headers only since version 2.18."
1440 "B<fallocate>() はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1441 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダー"
1442 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1445 #: build/C/man2/fallocate.2:378
1446 msgid "B<fallocate>() is Linux-specific."
1447 msgstr "B<fallocate>() は Linux 固有である。"
1450 #: build/C/man2/fallocate.2:383
1452 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1454 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1457 #: build/C/man2/madvise.2:35
1463 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1469 #: build/C/man2/madvise.2:38
1470 msgid "madvise - give advice about use of memory"
1471 msgstr "madvise - メモリー利用に関するアドバイスを与える"
1474 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1475 #: build/C/man3/shm_open.3:31
1476 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1477 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1480 #: build/C/man2/madvise.2:42
1482 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1484 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1487 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1488 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1490 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1491 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1494 #: build/C/man2/madvise.2:50
1495 msgid "B<madvise>(): _BSD_SOURCE"
1496 msgstr "B<madvise>(): _BSD_SOURCE"
1499 #: build/C/man2/madvise.2:68
1501 "The B<madvise>() system call advises the kernel about how to handle paging "
1502 "input/output in the address range beginning at address I<addr> and with size "
1503 "I<length> bytes. It allows an application to tell the kernel how it expects "
1504 "to use some mapped or shared memory areas, so that the kernel can choose "
1505 "appropriate read-ahead and caching techniques. This call does not influence "
1506 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1507 "but may influence its performance. The kernel is free to ignore the advice."
1509 "B<madvise>() システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1510 "トのメモリーブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイ"
1511 "スする。 これを用いると、 アプリケーションからカーネルに、 マップされたメモ"
1512 "リーや共有メモリーをどのように扱ってほしいか伝えることができ、 カーネルはそれ"
1513 "に応じて先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリ"
1514 "ケーションの動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性"
1515 "能には影響しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任され"
1519 #: build/C/man2/madvise.2:72
1520 msgid "The advice is indicated in the I<advice> argument which can be"
1522 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1525 #: build/C/man2/madvise.2:72
1527 msgid "B<MADV_NORMAL>"
1528 msgstr "B<MADV_NORMAL>"
1531 #: build/C/man2/madvise.2:76
1532 msgid "No special treatment. This is the default."
1533 msgstr "特別な扱いは行わない。これがデフォルトである。"
1536 #: build/C/man2/madvise.2:76
1538 msgid "B<MADV_RANDOM>"
1539 msgstr "B<MADV_RANDOM>"
1542 #: build/C/man2/madvise.2:80
1544 "Expect page references in random order. (Hence, read ahead may be less "
1545 "useful than normally.)"
1547 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1551 #: build/C/man2/madvise.2:80
1553 msgid "B<MADV_SEQUENTIAL>"
1554 msgstr "B<MADV_SEQUENTIAL>"
1557 #: build/C/man2/madvise.2:85
1559 "Expect page references in sequential order. (Hence, pages in the given "
1560 "range can be aggressively read ahead, and may be freed soon after they are "
1563 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1564 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1568 #: build/C/man2/madvise.2:85
1570 msgid "B<MADV_WILLNEED>"
1571 msgstr "B<MADV_WILLNEED>"
1574 #: build/C/man2/madvise.2:89
1576 "Expect access in the near future. (Hence, it might be a good idea to read "
1577 "some pages ahead.)"
1579 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1583 #: build/C/man2/madvise.2:89
1585 msgid "B<MADV_DONTNEED>"
1586 msgstr "B<MADV_DONTNEED>"
1589 #: build/C/man2/madvise.2:100
1591 "Do not expect access in the near future. (For the time being, the "
1592 "application is finished with the given range, so the kernel can free "
1593 "resources associated with it.) Subsequent accesses of pages in this range "
1594 "will succeed, but will result either in reloading of the memory contents "
1595 "from the underlying mapped file (see B<mmap>(2)) or zero-fill-on-demand "
1596 "pages for mappings without an underlying file."
1598 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1599 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。) こ"
1600 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリーの内容を"
1601 "マップ元のファイルからロードし直すことになる (B<mmap>(2) を見よ) か、 または"
1602 "元ファイルがないマップページでは アクセスがあったときに 0 埋めが行われること"
1606 #: build/C/man2/madvise.2:100
1608 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1609 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1612 #. Databases want to use this feature to drop a section of their
1613 #. bufferpool (shared memory segments) - without writing back to
1614 #. disk/swap space. This feature is also useful for supporting
1615 #. hot-plug memory on UML.
1617 #: build/C/man2/madvise.2:113
1619 "Free up a given range of pages and its associated backing store. Currently, "
1620 "only shmfs/tmpfs supports this; other filesystems return with the error "
1623 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1624 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1628 #: build/C/man2/madvise.2:113
1630 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1631 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1633 #. See http://lwn.net/Articles/171941/
1634 #. [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1635 #. Currently, copy-on-write may change the physical address of
1636 #. a page even if the user requested that the page is pinned in
1637 #. memory (either by mlock or by get_user_pages). This happens
1638 #. if the process forks meanwhile, and the parent writes to that
1639 #. page. As a result, the page is orphaned: in case of
1640 #. get_user_pages, the application will never see any data hardware
1641 #. DMA's into this page after the COW. In case of mlock'd memory,
1642 #. the parent is not getting the realtime/security benefits of mlock.
1643 #. In particular, this affects the Infiniband modules which do DMA from
1644 #. and into user pages all the time.
1645 #. This patch adds madvise options to control whether memory range is
1646 #. inherited across fork. Useful e.g. for when hardware is doing DMA
1647 #. from/into these pages. Could also be useful to an application
1648 #. wanting to speed up its forks by cutting large areas out of
1650 #. SEE ALSO: http://lwn.net/Articles/171941/
1651 #. "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1653 #: build/C/man2/madvise.2:144
1655 "Do not make the pages in this range available to the child after a "
1656 "B<fork>(2). This is useful to prevent copy-on-write semantics from changing "
1657 "the physical location of a page(s) if the parent writes to it after a "
1658 "B<fork>(2). (Such page relocations cause problems for hardware that DMAs "
1659 "into the page(s).)"
1661 "B<fork>(2) が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1662 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2) "
1663 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1664 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1665 "を行うような場合に 問題を起こすことがある)。"
1668 #: build/C/man2/madvise.2:144
1670 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1671 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1674 #: build/C/man2/madvise.2:150
1676 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1677 "a mapping is inherited across B<fork>(2)."
1679 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1680 "B<fork>(2) の前後でマッピングは継承されるようになる。"
1683 #: build/C/man2/madvise.2:150
1685 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1686 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1689 #: build/C/man2/madvise.2:162
1691 "Poison a page and handle it like a hardware memory corruption. This "
1692 "operation is available only for privileged (B<CAP_SYS_ADMIN>) processes. "
1693 "This operation may result in the calling process receiving a B<SIGBUS> and "
1694 "the page being unmapped. This feature is intended for testing of memory "
1695 "error-handling code; it is available only if the kernel was configured with "
1696 "B<CONFIG_MEMORY_FAILURE>."
1698 "ページに毒入れを行い、ハードウェアメモリーの破損のようにそのページを取り扱"
1699 "う。 この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 こ"
1700 "の操作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマッ"
1701 "プされる。 この機能はメモリーのエラー処理コードをテストするためのものであ"
1702 "る。 カーネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能"
1706 #: build/C/man2/madvise.2:162
1708 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1709 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1712 #: build/C/man2/madvise.2:180
1714 "Soft offline the pages in the range specified by I<addr> and I<length>. The "
1715 "memory of each page in the specified range is preserved (i.e., when next "
1716 "accessed, the same content will be visible, but in a new physical page "
1717 "frame), and the original page is offlined (i.e., no longer used, and taken "
1718 "out of normal memory management). The effect of the B<MADV_SOFT_OFFLINE> "
1719 "operation is invisible to (i.e., does not change the semantics of) the "
1720 "calling process. This feature is intended for testing of memory error-"
1721 "handling code; it is available only if the kernel was configured with "
1722 "B<CONFIG_MEMORY_FAILURE>."
1724 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1725 "された範囲の各ページのメモリーの内容は保持され (すなわち、次にアクセスされた"
1726 "際に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオ"
1727 "フラインになる (すなわち、 そのフレームは使用される、通常のメモリー管理からは"
1728 "取り除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えな"
1729 "い (つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリーのエラー"
1730 "処理コードをテストすることを目的に作られた。 カーネルで "
1731 "B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1734 #: build/C/man2/madvise.2:180
1736 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1737 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1740 #: build/C/man2/madvise.2:205
1742 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1743 "I<addr> and I<length>. The kernel regularly scans those areas of user "
1744 "memory that have been marked as mergeable, looking for pages with identical "
1745 "content. These are replaced by a single write-protected page (which is "
1746 "automatically copied if a process later wants to update the content of the "
1747 "page). KSM merges only private anonymous pages (see B<mmap>(2)). The KSM "
1748 "feature is intended for applications that generate many instances of the "
1749 "same data (e.g., virtualization systems such as KVM). It can consume a lot "
1750 "of processing power; use with care. See the Linux kernel source file "
1751 "I<Documentation/vm/ksm.txt> for more details. The B<MADV_MERGEABLE> and "
1752 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1753 "configured with B<CONFIG_KSM>."
1755 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1756 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1757 "いたユーザーメモリーの領域を定期的にスキャンし、内容が全く同じページを探す。 "
1758 "内容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) "
1759 "がかかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよ"
1760 "うとした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名"
1761 "ページ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じ"
1762 "データのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システ"
1763 "ム) での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合"
1764 "があり、注意して使用すること。 詳細は Linux カーネルソースファイル "
1765 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1766 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1770 #: build/C/man2/madvise.2:205
1772 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1773 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1776 #: build/C/man2/madvise.2:214
1778 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1779 "address range; KSM unmerges whatever pages it had merged in the address "
1780 "range specified by I<addr> and I<length>."
1782 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1783 "果を取り消す。 KSM は、 I<addr> と I<length> で指定されたアドレス範囲の統合"
1784 "済みのすべてのページの統合解除を行う。"
1787 #: build/C/man2/madvise.2:214
1789 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1790 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1792 #. http://lwn.net/Articles/358904/
1793 #. https://lwn.net/Articles/423584/
1795 #: build/C/man2/madvise.2:243
1797 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1798 "I<addr> and I<length>. Currently, Transparent Huge Pages work only with "
1799 "private anonymous pages (see B<mmap>(2)). The kernel will regularly scan "
1800 "the areas marked as huge page candidates to replace them with huge pages. "
1801 "The kernel will also allocate huge pages directly when the region is "
1802 "naturally aligned to the huge page size (see B<posix_memalign>(2)). This "
1803 "feature is primarily aimed at applications that use large mappings of data "
1804 "and access large regions of that memory at a time (e.g., virtualization "
1805 "systems such as QEMU). It can very easily waste memory (e.g., a 2MB mapping "
1806 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1807 "one 4KB page). See the Linux kernel source file I<Documentation/vm/"
1808 "transhuge.txt> for more details. The B<MADV_HUGEPAGE> and "
1809 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1810 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1812 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1813 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1814 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1815 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1816 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1817 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1818 "マッピングを使用し、一度にそのメモリーの大きな範囲にアクセスするようなアプリ"
1819 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1820 "る。 この機能は非常に簡単にメモリーを浪費してしまう (例えば、1 バイトしかアク"
1821 "セスしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリーを使っ"
1822 "てしまう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1823 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1824 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1828 #: build/C/man2/madvise.2:243
1830 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1831 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1834 #: build/C/man2/madvise.2:250
1836 "Ensures that memory in the address range specified by I<addr> and I<length> "
1837 "will not be collapsed into huge pages."
1839 "I<addr> と I<length> で指定されたアドレス範囲のメモリーがヒュージページに組み"
1843 #: build/C/man2/madvise.2:250
1845 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1846 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1849 #: build/C/man2/madvise.2:264
1851 "Exclude from a core dump those pages in the range specified by I<addr> and "
1852 "I<length>. This is useful in applications that have large areas of memory "
1853 "that are known not to be useful in a core dump. The effect of "
1854 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1855 "proc/PID/coredump_filter> file (see B<core>(5))."
1857 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1858 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリー領域があ"
1859 "るアプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1860 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1864 #: build/C/man2/madvise.2:264
1866 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1867 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1870 #: build/C/man2/madvise.2:268
1871 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1872 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1875 #: build/C/man2/madvise.2:275
1877 "On success B<madvise>() returns zero. On error, it returns -1 and I<errno> "
1878 "is set appropriately."
1880 "B<madvise>() は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1884 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1885 #: build/C/man2/mremap.2:136
1891 #: build/C/man2/madvise.2:279
1892 msgid "A kernel resource was temporarily unavailable."
1893 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1896 #: build/C/man2/madvise.2:282
1897 msgid "The map exists, but the area maps something that isn't a file."
1898 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1901 #: build/C/man2/madvise.2:285
1902 msgid "This error can occur for the following reasons:"
1903 msgstr "このエラーは以下の理由で発生する。"
1908 #: build/C/man2/madvise.2:292
1909 msgid "The value I<len> is negative."
1910 msgstr "I<len> が負の値である。"
1913 #: build/C/man2/madvise.2:295
1914 msgid "I<addr> is not page-aligned."
1915 msgstr "I<addr> がページ境界ではない。"
1918 #: build/C/man2/madvise.2:298
1919 msgid "I<advice> is not a valid value"
1920 msgstr "I<advice> が有効な値でない。"
1923 #: build/C/man2/madvise.2:301
1925 "The application is attempting to release locked or shared pages (with "
1926 "B<MADV_DONTNEED>)."
1928 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1933 #: build/C/man2/madvise.2:309
1935 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1936 "kernel was not configured with B<CONFIG_KSM>."
1938 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1939 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1942 #: build/C/man2/madvise.2:316
1944 "(for B<MADV_WILLNEED>) Paging in this area would exceed the process's "
1945 "maximum resident set size."
1947 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1948 "(resident set size) の最大値を越えてしまう。"
1951 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1952 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1953 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1954 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1955 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1956 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1957 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1958 #: build/C/man2/sync_file_range.2:163 build/C/man2/memfd_create.2:152
1959 #: build/C/man2/s390_pci_mmio_write.2:95
1965 #: build/C/man2/madvise.2:321
1966 msgid "(for B<MADV_WILLNEED>) Not enough memory: paging in failed."
1967 msgstr "(B<MADV_WILLNEED> の場合) メモリーが足りず、ページングに失敗した。"
1970 #: build/C/man2/madvise.2:325
1972 "Addresses in the specified range are not currently mapped, or are outside "
1973 "the address space of the process."
1975 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1978 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1980 #: build/C/man2/madvise.2:332
1982 "Since Linux 3.18, support for this system call is optional, depending on the "
1983 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1985 "Linux 3.18 以降では、このシステムコールのサポートは任意となり、利用できるかは"
1986 "カーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされてい"
1989 #. FIXME . Write a posix_madvise(3) page.
1991 #: build/C/man2/madvise.2:345
1993 "POSIX.1b. POSIX.1-2001 describes B<posix_madvise>(3) with constants "
1994 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1995 "to that described here. There is a similar B<posix_fadvise>(2) for file "
1998 "POSIX.1b. POSIX.1-2001 では、 B<posix_madvise>(3) を B<POSIX_MADV_NORMAL>, "
1999 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
2000 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2) という"
2004 #: build/C/man2/madvise.2:354
2006 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
2007 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
2009 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
2010 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
2013 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
2014 #: build/C/man2/shmget.2:370
2020 #: build/C/man2/madvise.2:363
2022 "The current Linux implementation (2.4.0) views this system call more as a "
2023 "command than as advice and hence may return an error when it cannot do what "
2024 "it usually would do in response to this advice. (See the ERRORS description "
2025 "above.) This is nonstandard behavior."
2027 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2028 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2029 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2035 #. function first appeared in 4.4BSD.
2037 #: build/C/man2/madvise.2:379
2039 "The Linux implementation requires that the address I<addr> be page-aligned, "
2040 "and allows I<length> to be zero. If there are some parts of the specified "
2041 "address range that are not mapped, the Linux version of B<madvise>() "
2042 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2043 "the system call, as it should)."
2045 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2046 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>() では、指定"
2047 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2048 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2052 #: build/C/man2/madvise.2:388
2054 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2055 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2057 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2058 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2061 #: build/C/man3/mallinfo.3:26
2067 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2073 #: build/C/man3/mallinfo.3:29
2074 msgid "mallinfo - obtain memory allocation information"
2075 msgstr "mallinfo - メモリー割り当て情報を取得する"
2078 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2079 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2080 #: build/C/man3/mallopt.3:31
2081 msgid "B<#include E<lt>malloc.hE<gt>>"
2082 msgstr "B<#include E<lt>malloc.hE<gt>>"
2085 #: build/C/man3/mallinfo.3:33
2086 msgid "B<struct mallinfo mallinfo(void);>"
2087 msgstr "B<struct mallinfo mallinfo(void);>"
2090 #: build/C/man3/mallinfo.3:41
2092 "The B<mallinfo>() function returns a copy of a structure containing "
2093 "information about memory allocations performed by B<malloc>(3) and related "
2094 "functions. This structure is defined as follows:"
2096 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリー\n"
2097 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2098 "この構造体は以下のように定義されている。"
2101 #: build/C/man3/mallinfo.3:56
2104 "struct mallinfo {\n"
2105 " int arena; /* Non-mmapped space allocated (bytes) */\n"
2106 " int ordblks; /* Number of free chunks */\n"
2107 " int smblks; /* Number of free fastbin blocks */\n"
2108 " int hblks; /* Number of mmapped regions */\n"
2109 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
2110 " int usmblks; /* Maximum total allocated space (bytes) */\n"
2111 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
2112 " int uordblks; /* Total allocated space (bytes) */\n"
2113 " int fordblks; /* Total free space (bytes) */\n"
2114 " int keepcost; /* Top-most, releasable space (bytes) */\n"
2117 "struct mallinfo {\n"
2118 " int arena; /* Non-mmapped space allocated (bytes) */\n"
2119 " int ordblks; /* Number of free chunks */\n"
2120 " int smblks; /* Number of free fastbin blocks */\n"
2121 " int hblks; /* Number of mmapped regions */\n"
2122 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
2123 " int usmblks; /* Maximum total allocated space (bytes) */\n"
2124 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
2125 " int uordblks; /* Total allocated space (bytes) */\n"
2126 " int fordblks; /* Total free space (bytes) */\n"
2127 " int keepcost; /* Top-most, releasable space (bytes) */\n"
2131 #: build/C/man3/mallinfo.3:62
2133 "The fields of the I<mallinfo> structure contain the following information:"
2134 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2137 #: build/C/man3/mallinfo.3:62
2143 #: build/C/man3/mallinfo.3:68
2145 "The total amount of memory allocated by means other than B<mmap>(2) (i.e., "
2146 "memory allocated on the heap). This figure includes both in-use blocks and "
2147 "blocks on the free list."
2151 #: build/C/man3/mallinfo.3:68
2157 #: build/C/man3/mallinfo.3:71
2158 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2162 #: build/C/man3/mallinfo.3:71
2168 #: build/C/man3/mallinfo.3:75
2169 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2173 #: build/C/man3/mallinfo.3:75
2179 #: build/C/man3/mallinfo.3:83
2181 "The number of blocks currently allocated using B<mmap>(2). (See the "
2182 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2186 #: build/C/man3/mallinfo.3:83
2192 #: build/C/man3/mallinfo.3:87
2193 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2197 #: build/C/man3/mallinfo.3:87
2203 #: build/C/man3/mallinfo.3:92
2205 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2206 "of space that was ever allocated. This field is maintained only in "
2207 "nonthreading environments."
2211 #: build/C/man3/mallinfo.3:92
2217 #: build/C/man3/mallinfo.3:95
2218 msgid "The total number of bytes in fastbin free blocks."
2222 #: build/C/man3/mallinfo.3:95
2225 msgstr "I<uordblks>"
2228 #: build/C/man3/mallinfo.3:98
2229 msgid "The total number of bytes used by in-use allocations."
2233 #: build/C/man3/mallinfo.3:98
2236 msgstr "I<fordblks>"
2239 #: build/C/man3/mallinfo.3:101
2240 msgid "The total number of bytes in free blocks."
2244 #: build/C/man3/mallinfo.3:101
2247 msgstr "I<keepcost>"
2250 #. Available already in glibc 2.0, possibly earlier
2252 #: build/C/man3/mallinfo.3:110
2254 "The total amount of releasable free space at the top of the heap. This is "
2255 "the maximum number of bytes that could ideally (i.e., ignoring page "
2256 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2260 #: build/C/man3/mallinfo.3:114
2262 "This function is not specified by POSIX or the C standards. A similar "
2263 "function exists on many System V derivatives, and was specified in the SVID."
2266 #. FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2267 #. See the 24 Aug 2011 mail by Paul Pluzhnikov:
2268 #. "[patch] Fix mallinfo() to accumulate results for all arenas"
2269 #. on libc-alpha@sourceware.org
2271 #: build/C/man3/mallinfo.3:126
2273 "B<Information is returned for only the main memory allocation area.> "
2274 "Allocations in other arenas are excluded. See B<malloc_stats>(3) and "
2275 "B<malloc_info>(3) for alternatives that include information about other "
2280 #: build/C/man3/mallinfo.3:134
2282 "The fields of the I<mallinfo> structure are typed as I<int>. However, "
2283 "because some internal bookkeeping values may be of type I<long>, the "
2284 "reported values may wrap around zero and thus be inaccurate."
2288 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2289 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2290 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:633
2291 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2292 #: build/C/man2/memfd_create.2:293
2298 #: build/C/man3/mallinfo.3:140
2300 "The program below employs B<mallinfo>() to retrieve memory allocation "
2301 "statistics before and after allocating and freeing some blocks of memory. "
2302 "The statistics are displayed on standard output."
2306 #: build/C/man3/mallinfo.3:144
2308 "The first two command-line arguments specify the number and size of blocks "
2309 "to be allocated with B<malloc>(3)."
2313 #: build/C/man3/mallinfo.3:158
2315 "The remaining three arguments specify which of the allocated blocks should "
2316 "be freed with B<free>(3). These three arguments are optional, and specify "
2317 "(in order): the step size to be used in the loop that frees blocks (the "
2318 "default is 1, meaning free all blocks in the range); the ordinal position of "
2319 "the first block to be freed (default 0, meaning the first allocated block); "
2320 "and a number one greater than the ordinal position of the last block to be "
2321 "freed (default is one greater than the maximum block number). If these "
2322 "three arguments are omitted, then the defaults cause all allocated blocks to "
2327 #: build/C/man3/mallinfo.3:162
2329 "In the following example run of the program, 1000 allocations of 100 bytes "
2330 "are performed, and then every second allocated block is freed:"
2334 #: build/C/man3/mallinfo.3:177
2337 "$ B<./a.out 1000 100 2>\n"
2338 "============== Before allocating blocks ==============\n"
2339 "Total non-mmapped bytes (arena): 0\n"
2340 "# of free chunks (ordblks): 1\n"
2341 "# of free fastbin blocks (smblks): 0\n"
2342 "# of mapped regions (hblks): 0\n"
2343 "Bytes in mapped regions (hblkhd): 0\n"
2344 "Max. total allocated space (usmblks): 0\n"
2345 "Free bytes held in fastbins (fsmblks): 0\n"
2346 "Total allocated space (uordblks): 0\n"
2347 "Total free space (fordblks): 0\n"
2348 "Topmost releasable block (keepcost): 0\n"
2350 "$ B<./a.out 1000 100 2>\n"
2351 "============== Before allocating blocks ==============\n"
2352 "Total non-mmapped bytes (arena): 0\n"
2353 "# of free chunks (ordblks): 1\n"
2354 "# of free fastbin blocks (smblks): 0\n"
2355 "# of mapped regions (hblks): 0\n"
2356 "Bytes in mapped regions (hblkhd): 0\n"
2357 "Max. total allocated space (usmblks): 0\n"
2358 "Free bytes held in fastbins (fsmblks): 0\n"
2359 "Total allocated space (uordblks): 0\n"
2360 "Total free space (fordblks): 0\n"
2361 "Topmost releasable block (keepcost): 0\n"
2364 #: build/C/man3/mallinfo.3:189
2367 "============== After allocating blocks ==============\n"
2368 "Total non-mmapped bytes (arena): 135168\n"
2369 "# of free chunks (ordblks): 1\n"
2370 "# of free fastbin blocks (smblks): 0\n"
2371 "# of mapped regions (hblks): 0\n"
2372 "Bytes in mapped regions (hblkhd): 0\n"
2373 "Max. total allocated space (usmblks): 0\n"
2374 "Free bytes held in fastbins (fsmblks): 0\n"
2375 "Total allocated space (uordblks): 104000\n"
2376 "Total free space (fordblks): 31168\n"
2377 "Topmost releasable block (keepcost): 31168\n"
2379 "============== After allocating blocks ==============\n"
2380 "Total non-mmapped bytes (arena): 135168\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): 104000\n"
2388 "Total free space (fordblks): 31168\n"
2389 "Topmost releasable block (keepcost): 31168\n"
2392 #: build/C/man3/mallinfo.3:201
2395 "============== After freeing blocks ==============\n"
2396 "Total non-mmapped bytes (arena): 135168\n"
2397 "# of free chunks (ordblks): 501\n"
2398 "# of free fastbin blocks (smblks): 0\n"
2399 "# of mapped regions (hblks): 0\n"
2400 "Bytes in mapped regions (hblkhd): 0\n"
2401 "Max. total allocated space (usmblks): 0\n"
2402 "Free bytes held in fastbins (fsmblks): 0\n"
2403 "Total allocated space (uordblks): 52000\n"
2404 "Total free space (fordblks): 83168\n"
2405 "Topmost releasable block (keepcost): 31168\n"
2407 "============== After freeing blocks ==============\n"
2408 "Total non-mmapped bytes (arena): 135168\n"
2409 "# of free chunks (ordblks): 501\n"
2410 "# of free fastbin blocks (smblks): 0\n"
2411 "# of mapped regions (hblks): 0\n"
2412 "Bytes in mapped regions (hblkhd): 0\n"
2413 "Max. total allocated space (usmblks): 0\n"
2414 "Free bytes held in fastbins (fsmblks): 0\n"
2415 "Total allocated space (uordblks): 52000\n"
2416 "Total free space (fordblks): 83168\n"
2417 "Topmost releasable block (keepcost): 31168\n"
2420 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2421 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2422 #: build/C/man2/mmap.2:645 build/C/man2/mprotect.2:164
2424 msgid "Program source"
2428 #: build/C/man3/mallinfo.3:208
2431 "#include E<lt>malloc.hE<gt>\n"
2432 "#include \"tlpi_hdr.h\"\n"
2434 "#include E<lt>malloc.hE<gt>\n"
2435 "#include \"tlpi_hdr.h\"\n"
2438 #: build/C/man3/mallinfo.3:213
2442 "display_mallinfo(void)\n"
2444 " struct mallinfo mi;\n"
2447 "display_mallinfo(void)\n"
2449 " struct mallinfo mi;\n"
2452 #: build/C/man3/mallinfo.3:215
2454 msgid " mi = mallinfo();\n"
2455 msgstr " mi = mallinfo();\n"
2458 #: build/C/man3/mallinfo.3:227
2461 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
2462 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
2463 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
2464 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
2465 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
2466 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
2467 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2468 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
2469 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
2470 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
2473 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
2474 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
2475 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
2476 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
2477 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
2478 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
2479 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2480 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
2481 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
2482 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
2486 #: build/C/man3/mallinfo.3:235
2490 "main(int argc, char *argv[])\n"
2492 "#define MAX_ALLOCS 2000000\n"
2493 " char *alloc[MAX_ALLOCS];\n"
2494 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2495 " size_t blockSize;\n"
2498 "main(int argc, char *argv[])\n"
2500 "#define MAX_ALLOCS 2000000\n"
2501 " char *alloc[MAX_ALLOCS];\n"
2502 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2503 " size_t blockSize;\n"
2506 #: build/C/man3/mallinfo.3:239
2509 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2510 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2511 " \"[end-free]]]\\en\", argv[0]);\n"
2513 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2514 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2515 " \"[end-free]]]\\en\", argv[0]);\n"
2518 #: build/C/man3/mallinfo.3:245
2521 " numBlocks = atoi(argv[1]);\n"
2522 " blockSize = atoi(argv[2]);\n"
2523 " freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2524 " freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2525 " freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2527 " numBlocks = atoi(argv[1]);\n"
2528 " blockSize = atoi(argv[2]);\n"
2529 " freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2530 " freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2531 " freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2534 #: build/C/man3/mallinfo.3:248
2537 " printf(\"============== Before allocating blocks ==============\\en\");\n"
2538 " display_mallinfo();\n"
2540 " printf(\"============== Before allocating blocks ==============\\en\");\n"
2541 " display_mallinfo();\n"
2544 #: build/C/man3/mallinfo.3:252
2547 " for (j = 0; j E<lt> numBlocks; j++) {\n"
2548 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
2549 " fatal(\"Too many allocations\");\n"
2551 " for (j = 0; j E<lt> numBlocks; j++) {\n"
2552 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
2553 " fatal(\"Too many allocations\");\n"
2556 #: build/C/man3/mallinfo.3:257
2559 " alloc[j] = malloc(blockSize);\n"
2560 " if (alloc[j] == NULL)\n"
2561 " errExit(\"malloc\");\n"
2564 " alloc[j] = malloc(blockSize);\n"
2565 " if (alloc[j] == NULL)\n"
2566 " errExit(\"malloc\");\n"
2570 #: build/C/man3/mallinfo.3:260
2573 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2574 " display_mallinfo();\n"
2576 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2577 " display_mallinfo();\n"
2580 #: build/C/man3/mallinfo.3:263
2583 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2584 " free(alloc[j]);\n"
2586 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2587 " free(alloc[j]);\n"
2590 #: build/C/man3/mallinfo.3:266
2593 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2594 " display_mallinfo();\n"
2596 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2597 " display_mallinfo();\n"
2600 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2601 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2602 #: build/C/man2/mmap.2:714 build/C/man2/memfd_create.2:437
2603 #: build/C/man2/memfd_create.2:486
2606 " exit(EXIT_SUCCESS);\n"
2609 " exit(EXIT_SUCCESS);\n"
2613 #: build/C/man3/mallinfo.3:279
2615 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2616 "B<malloc_trim>(3), B<mallopt>(3)"
2618 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2619 "B<malloc_trim>(3), B<mallopt>(3)"
2622 #: build/C/man3/malloc_get_state.3:25
2624 msgid "MALLOC_GET_STATE"
2625 msgstr "MALLOC_GET_STATE"
2628 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2634 #: build/C/man3/malloc_get_state.3:28
2636 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2641 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2642 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2644 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2645 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2648 #: build/C/man3/malloc_get_state.3:33
2650 msgid "B<void* malloc_get_state(void);>\n"
2651 msgstr "B<void* malloc_get_state(void);>\n"
2654 #: build/C/man3/malloc_get_state.3:35
2656 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2657 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2660 #: build/C/man3/malloc_get_state.3:53
2662 "The B<malloc_get_state>() function records the current state of all "
2663 "B<malloc>(3) internal bookkeeping variables (but not the actual contents of "
2664 "the heap or the state of B<malloc_hook>(3) functions pointers). The state "
2665 "is recorded in a system-dependent opaque data structure dynamically "
2666 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2667 "as the function result. (It is the caller's responsibility to B<free>(3) "
2672 #: build/C/man3/malloc_get_state.3:61
2674 "The B<malloc_set_state>() function restores the state of all B<malloc>(3) "
2675 "internal bookkeeping variables to the values recorded in the opaque data "
2676 "structure pointed to by I<state>."
2680 #: build/C/man3/malloc_get_state.3:68
2682 "On success, B<malloc_get_state>() returns a pointer to a newly allocated "
2683 "opaque data structure. On error (for example, memory could not be allocated "
2684 "for the data structure), B<malloc_get_state>() returns NULL."
2687 #. if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2688 #. /* Must fail if the major version is too high. */
2689 #. if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2691 #: build/C/man3/malloc_get_state.3:86
2693 "On success, B<malloc_set_state>() returns 0. If the implementation detects "
2694 "that I<state> does not point to a correctly formed data structure, "
2695 "B<malloc_set_state>() returns -1. If the implementation detects that the "
2696 "version of the data structure referred to by I<state> is a more recent "
2697 "version than this implementation knows about, B<malloc_set_state>() returns "
2702 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2703 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2704 msgid "These functions are GNU extensions."
2705 msgstr "これらの関数は GNU による拡張である。"
2708 #: build/C/man3/malloc_get_state.3:94
2710 "These functions are useful when using this B<malloc>(3) implementation as "
2711 "part of a shared library, and the heap contents are saved/restored via some "
2712 "other method. This technique is used by GNU Emacs to implement its \"dumping"
2716 #. i.e., calls __malloc_check_init()
2717 #. i.e., malloc checking is not already in use
2718 #. and the caller requested malloc checking
2720 #: build/C/man3/malloc_get_state.3:111
2722 "Hook function pointers are never saved or restored by these functions, with "
2723 "two exceptions: if malloc checking (see B<mallopt>(3)) was in use when "
2724 "B<malloc_get_state>() was called, then B<malloc_set_state>() resets malloc "
2725 "checking hooks if possible; if malloc checking was not in use in the "
2726 "recorded state, but the caller has requested malloc checking, then the hooks "
2731 #: build/C/man3/malloc_get_state.3:114
2732 msgid "B<malloc>(3), B<mallopt>(3)"
2733 msgstr "B<malloc>(3), B<mallopt>(3)"
2736 #: build/C/man3/malloc_hook.3:10
2739 msgstr "MALLOC_HOOK"
2742 #: build/C/man3/malloc_hook.3:10
2748 #: build/C/man3/malloc_hook.3:15
2750 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2751 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2753 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2754 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2757 #: build/C/man3/malloc_hook.3:20
2759 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2760 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2763 #: build/C/man3/malloc_hook.3:23
2765 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2766 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2769 #: build/C/man3/malloc_hook.3:26
2772 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2773 "B< const void *>I<caller>B<);>\n"
2775 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2776 "B< const void *>I<caller>B<);>\n"
2779 #: build/C/man3/malloc_hook.3:28
2781 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2782 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2785 #: build/C/man3/malloc_hook.3:30
2787 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2788 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2791 #: build/C/man3/malloc_hook.3:32
2793 msgid "B<void (*__after_morecore_hook)(void);>\n"
2794 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2797 #: build/C/man3/malloc_hook.3:43
2799 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2800 "B<realloc>(3), and B<free>(3) by specifying appropriate hook functions. "
2801 "You can use these hooks to help you debug programs that use dynamic memory "
2802 "allocation, for example."
2804 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2805 "B<malloc>(3), B<realloc>(3), B<free>(3) の動作を変更することができる。例え"
2806 "ば、動的にメモリー割り当てを行う プログラムのデバッグにこれらのフックを使うこ"
2810 #: build/C/man3/malloc_hook.3:50
2812 "The variable B<__malloc_initialize_hook> points at a function that is called "
2813 "once when the malloc implementation is initialized. This is a weak "
2814 "variable, so it can be overridden in the application with a definition like "
2817 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2818 "ばれる関数へのポインターである。 この変数は書き換え可能 (weak) であり、アプリ"
2819 "ケーション内で 以下のような定義で上書きできる:"
2822 #: build/C/man3/malloc_hook.3:53
2824 msgid " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2825 msgstr " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2828 #: build/C/man3/malloc_hook.3:58
2830 "Now the function I<my_init_hook>() can do the initialization of all hooks."
2832 "なお、関数 I<my_init_hook>() で全てのフックの初期化をすることができる。"
2835 #: build/C/man3/malloc_hook.3:74
2837 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2838 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2839 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2840 "except that they have a final argument I<caller> that gives the address of "
2841 "the caller of B<malloc>(3), etc."
2843 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2844 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2845 "B<free>(3) とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2846 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3) などの呼び"
2847 "出し元 (caller) のアドレスが格納される。"
2850 #: build/C/man3/malloc_hook.3:80
2852 "The variable B<__after_morecore_hook> points at a function that is called "
2853 "each time after B<sbrk>(2) was asked for more memory."
2855 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2) が呼ばれた"
2856 "後で毎回呼び出される関数へのポインターである。"
2858 #. https://bugzilla.redhat.com/show_bug.cgi?id=450187
2859 #. http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2861 #: build/C/man3/malloc_hook.3:89
2863 "The use of these hook functions is not safe in multithreaded programs, and "
2864 "they are now deprecated. Programmers should instead preempt calls to the "
2865 "relevant functions by defining and exporting functions such as \"malloc\" "
2868 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2869 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2870 "公開して、 関連する関数を呼び出すようにすべきである。"
2873 #: build/C/man3/malloc_hook.3:91
2874 msgid "Here is a short example of how to use these variables."
2875 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2878 #: build/C/man3/malloc_hook.3:95
2881 "#include E<lt>stdio.hE<gt>\n"
2882 "#include E<lt>malloc.hE<gt>\n"
2884 "#include E<lt>stdio.hE<gt>\n"
2885 "#include E<lt>malloc.hE<gt>\n"
2888 #: build/C/man3/malloc_hook.3:99
2891 "/* Prototypes for our hooks. */\n"
2892 "static void my_init_hook(void);\n"
2893 "static void *my_malloc_hook(size_t, const void *);\n"
2895 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2896 "static void my_init_hook(void);\n"
2897 "static void *my_malloc_hook(size_t, const void *);\n"
2900 #: build/C/man3/malloc_hook.3:102
2903 "/* Variables to save original hooks. */\n"
2904 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2906 "/* 元々のフックを保存するための変数 */\n"
2907 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2910 #: build/C/man3/malloc_hook.3:105
2913 "/* Override initializing hook from the C library. */\n"
2914 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2916 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2917 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2920 #: build/C/man3/malloc_hook.3:112
2924 "my_init_hook(void)\n"
2926 " old_malloc_hook = __malloc_hook;\n"
2927 " __malloc_hook = my_malloc_hook;\n"
2931 "my_init_hook(void)\n"
2933 " old_malloc_hook = __malloc_hook;\n"
2934 " __malloc_hook = my_malloc_hook;\n"
2938 #: build/C/man3/malloc_hook.3:117
2942 "my_malloc_hook(size_t size, const void *caller)\n"
2947 "my_malloc_hook(size_t size, const void *caller)\n"
2952 #: build/C/man3/malloc_hook.3:120
2955 " /* Restore all old hooks */\n"
2956 " __malloc_hook = old_malloc_hook;\n"
2958 " /* 元々のフックを全て戻す */\n"
2959 " __malloc_hook = old_malloc_hook;\n"
2962 #: build/C/man3/malloc_hook.3:123
2965 " /* Call recursively */\n"
2966 " result = malloc(size);\n"
2968 " /* malloc の再帰的呼び出し */\n"
2969 " result = malloc(size);\n"
2972 #: build/C/man3/malloc_hook.3:126
2975 " /* Save underlying hooks */\n"
2976 " old_malloc_hook = __malloc_hook;\n"
2978 " /* 現在設定されているフック (underlying hook) を保存する */\n"
2979 " old_malloc_hook = __malloc_hook;\n"
2982 #: build/C/man3/malloc_hook.3:130
2985 " /* printf() might call malloc(), so protect it too. */\n"
2986 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2987 " (unsigned int) size, caller, result);\n"
2989 " /* printf() は malloc() を呼び出す可能性があるので\n"
2990 " ここでもガードを行う (元々のフックのままにしておく) */\n"
2991 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2992 " (unsigned int) size, caller, result);\n"
2995 #: build/C/man3/malloc_hook.3:133
2998 " /* Restore our own hooks */\n"
2999 " __malloc_hook = my_malloc_hook;\n"
3001 " /* ユーザーが使おうとするフックを再設定する */\n"
3002 " __malloc_hook = my_malloc_hook;\n"
3005 #: build/C/man3/malloc_hook.3:136
3015 #: build/C/man3/malloc_hook.3:142
3016 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3017 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3020 #: build/C/man3/malloc_info.3:25
3023 msgstr "MALLOC_INFO"
3026 #: build/C/man3/malloc_info.3:28
3027 msgid "malloc_info - export malloc state to a stream"
3028 msgstr "malloc_info - malloc の状態をストリームに出力する"
3031 #: build/C/man3/malloc_info.3:33
3033 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3034 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3037 #: build/C/man3/malloc_info.3:44
3039 "The B<malloc_info>() function exports an XML string that describes the "
3040 "current state of the memory-allocation implementation in the caller. The "
3041 "string is printed on the file stream I<stream>. The exported string "
3042 "includes information about all arenas (see B<malloc>(3))."
3044 "B<malloc_info>() 関数は、 呼び出し元のメモリー割り当て実装の現在の状態を表す "
3045 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<stream> に出力され"
3046 "る。 出力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) "
3050 #: build/C/man3/malloc_info.3:48
3051 msgid "As currently implemented, I<options> must be zero."
3052 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3055 #: build/C/man3/malloc_info.3:55
3057 "On success, B<malloc_info>() returns 0; on error, it returns -1, with "
3058 "I<errno> set to indicate the cause."
3060 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3061 "I<errno> にエラーの原因を示す値を設定する。"
3064 #: build/C/man3/malloc_info.3:60
3065 msgid "I<options> was nonzero."
3066 msgstr "I<options> が 0 でなかった。"
3069 #: build/C/man3/malloc_info.3:63
3070 msgid "B<malloc_info>() was added to glibc in version 2.10."
3071 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3074 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3075 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3076 msgid "This function is a GNU extension."
3077 msgstr "この関数は GNU による拡張である。"
3080 #: build/C/man3/malloc_info.3:71
3082 "The memory-allocation information is provided as an XML string (rather than "
3083 "a C structure) because the information may change over time (according to "
3084 "changes in the underlying implementation). The output XML string includes a "
3087 "メモリー割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3088 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3089 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3092 #: build/C/man3/malloc_info.3:77
3094 "The B<open_memstream>(3) function can be used to send the output of "
3095 "B<malloc_info>() directly into a buffer in memory, rather than to a file."
3097 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3098 "なくメモリー内のバッファーに直接送ることができる。"
3101 #: build/C/man3/malloc_info.3:84
3103 "The B<malloc_info>() function is designed to address deficiencies in "
3104 "B<malloc_stats>(3) and B<mallinfo>(3)."
3106 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3110 #: build/C/man3/malloc_info.3:95
3112 "The program below takes up to four command-line arguments, of which the "
3113 "first three are mandatory. The first argument specifies the number of "
3114 "threads that the program should create. All of the threads, including the "
3115 "main thread, allocate the number of blocks of memory specified by the second "
3116 "argument. The third argument controls the size of the blocks to be "
3117 "allocated. The main thread creates blocks of this size, the second thread "
3118 "created by the program allocates blocks of twice this size, the third thread "
3119 "allocates blocks of three times this size, and so on."
3121 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3122 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3123 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリーブロックの割り当て"
3124 "を行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこ"
3125 "のサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこの"
3126 "サイズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイ"
3127 "ズのブロックを割り当て、 以下同様である。"
3130 #: build/C/man3/malloc_info.3:102
3132 "The program calls B<malloc_info>() twice to display the memory-allocation "
3133 "state. The first call takes place before any threads are created or memory "
3134 "allocated. The second call is performed after all threads have allocated "
3137 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリー割り当て状態を表示"
3138 "する。 最初の呼び出しはスレッドの生成もメモリーの割り当ても行われる前に実行さ"
3139 "れる。 2 回目の呼び出しは全てのスレッドがメモリー割り当てを行った後に実行され"
3143 #: build/C/man3/malloc_info.3:110
3145 "In the following example, the command-line arguments specify the creation of "
3146 "one additional thread, and both the main thread and the additional thread "
3147 "allocate 10000 blocks of memory. After the blocks of memory have been "
3148 "allocated, B<malloc_info>() shows the state of two allocation arenas."
3150 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3151 "レッドと追加のスレッドの両方が 10000 個のメモリーブロックを割り当てるように指"
3152 "定している。 メモリーブロックの割り当て後の B<malloc_info>() では、 2 つの割"
3156 #: build/C/man3/malloc_info.3:135
3159 "$ B<getconf GNU_LIBC_VERSION>\n"
3161 "$ B<./a.out 1 10000 100>\n"
3162 "============ Before allocating blocks ============\n"
3163 "E<lt>malloc version=\"1\"E<gt>\n"
3164 "E<lt>heap nr=\"0\"E<gt>\n"
3166 "E<lt>/sizesE<gt>\n"
3167 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3168 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3169 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3170 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3171 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3172 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3174 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3175 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3176 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3177 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3178 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3179 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3180 "E<lt>/mallocE<gt>\n"
3182 "$ B<getconf GNU_LIBC_VERSION>\n"
3184 "$ B<./a.out 1 10000 100>\n"
3185 "============ Before allocating blocks ============\n"
3186 "E<lt>malloc version=\"1\"E<gt>\n"
3187 "E<lt>heap nr=\"0\"E<gt>\n"
3189 "E<lt>/sizesE<gt>\n"
3190 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3191 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3192 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3193 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3194 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3195 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3197 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3198 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3199 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3200 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3201 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3202 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3203 "E<lt>/mallocE<gt>\n"
3206 #: build/C/man3/malloc_info.3:165
3209 "============ After allocating blocks ============\n"
3210 "E<lt>malloc version=\"1\"E<gt>\n"
3211 "E<lt>heap nr=\"0\"E<gt>\n"
3213 "E<lt>/sizesE<gt>\n"
3214 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3215 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3216 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3217 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3218 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3219 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3221 "E<lt>heap nr=\"1\"E<gt>\n"
3223 "E<lt>/sizesE<gt>\n"
3224 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3225 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3226 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3227 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3228 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3229 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3231 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3232 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3233 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3234 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3235 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3236 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3237 "E<lt>/mallocE<gt>\n"
3239 "============ After allocating blocks ============\n"
3240 "E<lt>malloc version=\"1\"E<gt>\n"
3241 "E<lt>heap nr=\"0\"E<gt>\n"
3243 "E<lt>/sizesE<gt>\n"
3244 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3245 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3246 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3247 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3248 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3249 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3251 "E<lt>heap nr=\"1\"E<gt>\n"
3253 "E<lt>/sizesE<gt>\n"
3254 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3255 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3256 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3257 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3258 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3259 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3261 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3262 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3263 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3264 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3265 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3266 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3267 "E<lt>/mallocE<gt>\n"
3270 #: build/C/man3/malloc_info.3:175
3273 "#include E<lt>unistd.hE<gt>\n"
3274 "#include E<lt>stdlib.hE<gt>\n"
3275 "#include E<lt>pthread.hE<gt>\n"
3276 "#include E<lt>malloc.hE<gt>\n"
3277 "#include E<lt>errno.hE<gt>\n"
3279 "#include E<lt>unistd.hE<gt>\n"
3280 "#include E<lt>stdlib.hE<gt>\n"
3281 "#include E<lt>pthread.hE<gt>\n"
3282 "#include E<lt>malloc.hE<gt>\n"
3283 "#include E<lt>errno.hE<gt>\n"
3286 #: build/C/man3/malloc_info.3:178
3289 "static size_t blockSize;\n"
3290 "static int numThreads, numBlocks;\n"
3292 "static size_t blockSize;\n"
3293 "static int numThreads, numBlocks;\n"
3296 #: build/C/man3/malloc_info.3:181 build/C/man2/memfd_create.2:368
3297 #: build/C/man2/memfd_create.2:450
3300 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3303 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3307 #: build/C/man3/malloc_info.3:187
3311 "thread_func(void *arg)\n"
3314 " int tn = (int) arg;\n"
3317 "thread_func(void *arg)\n"
3320 " int tn = (int) arg;\n"
3323 #: build/C/man3/malloc_info.3:190
3326 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3327 " the main thread) allocates a different amount of memory */\n"
3329 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3330 " the main thread) allocates a different amount of memory */\n"
3333 #: build/C/man3/malloc_info.3:194
3336 " for (j = 0; j E<lt> numBlocks; j++)\n"
3337 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
3338 " errExit(\"malloc-thread\");\n"
3340 " for (j = 0; j E<lt> numBlocks; j++)\n"
3341 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
3342 " errExit(\"malloc-thread\");\n"
3345 #: build/C/man3/malloc_info.3:198
3348 " sleep(100); /* Sleep until main thread terminates */\n"
3352 " sleep(100); /* Sleep until main thread terminates */\n"
3357 #: build/C/man3/malloc_info.3:204
3361 "main(int argc, char *argv[])\n"
3363 " int j, tn, sleepTime;\n"
3364 " pthread_t *thr;\n"
3367 "main(int argc, char *argv[])\n"
3369 " int j, tn, sleepTime;\n"
3370 " pthread_t *thr;\n"
3373 #: build/C/man3/malloc_info.3:211
3376 " if (argc E<lt> 4) {\n"
3377 " fprintf(stderr,\n"
3378 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3380 " exit(EXIT_FAILURE);\n"
3383 " if (argc E<lt> 4) {\n"
3384 " fprintf(stderr,\n"
3385 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3387 " exit(EXIT_FAILURE);\n"
3391 #: build/C/man3/malloc_info.3:216
3394 " numThreads = atoi(argv[1]);\n"
3395 " numBlocks = atoi(argv[2]);\n"
3396 " blockSize = atoi(argv[3]);\n"
3397 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3399 " numThreads = atoi(argv[1]);\n"
3400 " numBlocks = atoi(argv[2]);\n"
3401 " blockSize = atoi(argv[3]);\n"
3402 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3405 #: build/C/man3/malloc_info.3:220
3408 " thr = calloc(numThreads, sizeof(pthread_t));\n"
3409 " if (thr == NULL)\n"
3410 " errExit(\"calloc\");\n"
3412 " thr = calloc(numThreads, sizeof(pthread_t));\n"
3413 " if (thr == NULL)\n"
3414 " errExit(\"calloc\");\n"
3417 #: build/C/man3/malloc_info.3:223
3420 " printf(\"============ Before allocating blocks ============\\en\");\n"
3421 " malloc_info(0, stdout);\n"
3423 " printf(\"============ Before allocating blocks ============\\en\");\n"
3424 " malloc_info(0, stdout);\n"
3427 #: build/C/man3/malloc_info.3:225
3429 msgid " /* Create threads that allocate different amounts of memory */\n"
3430 msgstr " /* Create threads that allocate different amounts of memory */\n"
3433 #: build/C/man3/malloc_info.3:231
3436 " for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3437 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3439 " if (errno != 0)\n"
3440 " errExit(\"pthread_create\");\n"
3442 " for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3443 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3445 " if (errno != 0)\n"
3446 " errExit(\"pthread_create\");\n"
3449 #: build/C/man3/malloc_info.3:236
3452 " /* If we add a sleep interval after the start-up of each\n"
3453 " thread, the threads likely won\\(aqt contend for malloc\n"
3454 " mutexes, and therefore additional arenas won\\(aqt be\n"
3455 " allocated (see malloc(3)). */\n"
3457 " /* If we add a sleep interval after the start-up of each\n"
3458 " thread, the threads likely won\\(aqt contend for malloc\n"
3459 " mutexes, and therefore additional arenas won\\(aqt be\n"
3460 " allocated (see malloc(3)). */\n"
3463 #: build/C/man3/malloc_info.3:240
3466 " if (sleepTime E<gt> 0)\n"
3467 " sleep(sleepTime);\n"
3470 " if (sleepTime E<gt> 0)\n"
3471 " sleep(sleepTime);\n"
3475 #: build/C/man3/malloc_info.3:242
3477 msgid " /* The main thread also allocates some memory */\n"
3478 msgstr " /* The main thread also allocates some memory */\n"
3481 #: build/C/man3/malloc_info.3:246
3484 " for (j = 0; j E<lt> numBlocks; j++)\n"
3485 " if (malloc(blockSize) == NULL)\n"
3486 " errExit(\"malloc\");\n"
3488 " for (j = 0; j E<lt> numBlocks; j++)\n"
3489 " if (malloc(blockSize) == NULL)\n"
3490 " errExit(\"malloc\");\n"
3493 #: build/C/man3/malloc_info.3:249
3496 " sleep(2); /* Give all threads a chance to\n"
3497 " complete allocations */\n"
3499 " sleep(2); /* Give all threads a chance to\n"
3500 " complete allocations */\n"
3503 #: build/C/man3/malloc_info.3:252
3506 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
3507 " malloc_info(0, stdout);\n"
3509 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
3510 " malloc_info(0, stdout);\n"
3513 #: build/C/man3/malloc_info.3:262
3515 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3516 "B<open_memstream>(3)"
3518 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3519 "B<open_memstream>(3)"
3522 #: build/C/man3/malloc_stats.3:26
3524 msgid "MALLOC_STATS"
3525 msgstr "MALLOC_STATS"
3528 #: build/C/man3/malloc_stats.3:29
3529 msgid "malloc_stats - print memory allocation statistics"
3530 msgstr "malloc_stats - メモリー割り当ての統計を表示する"
3533 #: build/C/man3/malloc_stats.3:33
3534 msgid "B<void malloc_stats(void);>"
3535 msgstr "B<void malloc_stats(void);>"
3538 #. Available already in glibc 2.0, possibly earlier
3540 #: build/C/man3/malloc_stats.3:55
3542 "The B<malloc_stats>() function prints (on standard error) statistics about "
3543 "memory allocated by B<malloc>(3) and related functions. For each arena "
3544 "(allocation area), this function prints the total amount of memory allocated "
3545 "and the total number of bytes consumed by in-use allocations. (These two "
3546 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3547 "B<mallinfo>(3).) In addition, the function prints the sum of these two "
3548 "statistics for all arenas, and the maximum number of blocks and bytes that "
3549 "were ever simultaneously allocated using B<mmap>(2)."
3551 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3552 "リーに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3553 "て、 この関数は割り当てられているメモリーの総量と現在の割り当てが使用している"
3554 "総バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる "
3555 "I<arena> と I<uordblks> フィールドに対応している)。 また、この関数は、 すべて"
3556 "の領域のこれら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てら"
3557 "れたブロック数とバイト数の最大値を表示する。"
3560 #: build/C/man3/malloc_stats.3:61
3562 "More detailed information about memory allocations in the main arena can be "
3563 "obtained using B<mallinfo>(3)."
3565 "B<mallinfo>(3) を使用すると、 メイン領域のメモリー割り当てに関するより詳細な"
3569 #: build/C/man3/malloc_stats.3:67
3571 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3573 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3576 #: build/C/man3/malloc_trim.3:26
3579 msgstr "MALLOC_TRIM"
3582 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3588 #: build/C/man3/malloc_trim.3:29
3589 msgid "malloc_trim - release free memory from the top of the heap"
3593 #: build/C/man3/malloc_trim.3:33
3594 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3595 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3598 #: build/C/man3/malloc_trim.3:40
3600 "The B<malloc_trim>() function attempts to release free memory at the top of "
3601 "the heap (by calling B<sbrk>(2) with a suitable argument)."
3605 #: build/C/man3/malloc_trim.3:51
3607 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3608 "the top of the heap. If this argument is 0, only the minimum amount of "
3609 "memory is maintained at the top of the heap (i.e., one page or less). A "
3610 "nonzero argument can be used to maintain some trailing space at the top of "
3611 "the heap in order to allow future allocations to be made without having to "
3612 "extend the heap with B<sbrk>(2)."
3616 #: build/C/man3/malloc_trim.3:56
3618 "The B<malloc_trim>() function returns 1 if memory was actually released "
3619 "back to the system, or 0 if it was not possible to release any memory."
3623 #. Available already in glibc 2.0, possibly earlier
3625 #: build/C/man3/malloc_trim.3:60
3626 msgid "No errors are defined."
3630 #: build/C/man3/malloc_trim.3:71
3632 "This function is automatically called by B<free>(3) in certain "
3633 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3638 #: build/C/man3/malloc_trim.3:74
3640 "This function cannot release free memory located at places other than the "
3644 #. malloc/malloc.c::mTRIm():
3645 #. return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3647 #: build/C/man3/malloc_trim.3:78
3648 msgid "This function releases only memory in the main arena."
3652 #: build/C/man3/malloc_trim.3:82
3653 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3654 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3657 #: build/C/man3/malloc_usable_size.3:25
3659 msgid "MALLOC_USABLE_SIZE"
3660 msgstr "MALLOC_USABLE_SIZE"
3663 #: build/C/man3/malloc_usable_size.3:28
3664 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3666 "malloc_usable_size - ヒープから確保したメモリーブロックのサイズを取得する"
3669 #: build/C/man3/malloc_usable_size.3:32
3670 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3671 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3674 #: build/C/man3/malloc_usable_size.3:40
3676 "The B<malloc_usable_size>() function returns the number of usable bytes in "
3677 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3678 "B<malloc>(3) or a related function."
3680 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3681 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリーブロックへ"
3685 #: build/C/man3/malloc_usable_size.3:48
3687 "B<malloc_usable_size>() returns the number of usable bytes in the block of "
3688 "allocated memory pointed to by I<ptr>. If I<ptr> is NULL, 0 is returned."
3690 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリーブロックで使用可"
3691 "能なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3694 #: build/C/man3/malloc_usable_size.3:53
3695 msgid "The B<malloc_usable_size>() function is thread-safe."
3696 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3699 #: build/C/man3/malloc_usable_size.3:65
3701 "The value returned by B<malloc_usable_size>() may be greater than the "
3702 "requested size of the allocation because of alignment and minimum size "
3703 "constraints. Although the excess bytes can be overwritten by the "
3704 "application without ill effects, this is not good programming practice: the "
3705 "number of excess bytes in an allocation depends on the underlying "
3708 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3709 "がある。 これは、メモリーアラインメントと最小サイズの制約のためである。 この"
3710 "超過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行"
3711 "うのはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超"
3712 "過バイトの量は、内部の実装に依存する。"
3715 #: build/C/man3/malloc_usable_size.3:67
3716 msgid "The main use of this function is for debugging and introspection."
3717 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3720 #: build/C/man3/malloc_usable_size.3:69
3721 msgid "B<malloc>(3)"
3722 msgstr "B<malloc>(3)"
3725 #: build/C/man3/mallopt.3:26
3731 #: build/C/man3/mallopt.3:26 build/C/man2/shmop.2:41
3737 #: build/C/man3/mallopt.3:29
3738 msgid "mallopt - set memory allocation parameters"
3739 msgstr "mallopt - メモリー割り当てパラメーターを設定する"
3742 #: build/C/man3/mallopt.3:33
3743 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3744 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3747 #: build/C/man3/mallopt.3:44
3749 "The B<mallopt>() function adjusts parameters that control the behavior of "
3750 "the memory-allocation functions (see B<malloc>(3)). The I<param> argument "
3751 "specifies the parameter to be modified, and I<value> specifies the new value "
3752 "for that parameter."
3754 "B<mallopt>() 関数は、メモリー割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3755 "制御するパラメーターの調整を行う。\n"
3756 "I<param> 引き数で変更するパラメーターを指定し、\n"
3757 "I<value> 引き数でそのパラメーターの新しい値を指定する。"
3760 #: build/C/man3/mallopt.3:47
3761 msgid "The following values can be specified for I<param>:"
3762 msgstr "I<param> には以下の値を指定することができる。"
3765 #: build/C/man3/mallopt.3:47
3767 msgid "B<M_CHECK_ACTION>"
3768 msgstr "B<M_CHECK_ACTION>"
3771 #: build/C/man3/mallopt.3:53
3773 "Setting this parameter controls how glibc responds when various kinds of "
3774 "programming errors are detected (e.g., freeing the same pointer twice). The "
3775 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3776 "parameter determine the glibc behavior, as follows:"
3780 #: build/C/man3/mallopt.3:54
3786 #: build/C/man3/mallopt.3:64
3788 "If this bit is set, then print a one-line message on I<stderr> that provides "
3789 "details about the error. The message starts with the string \"***\\ glibc "
3790 "detected\\ ***\", followed by the program name, the name of the memory-"
3791 "allocation function in which the error was detected, a brief description of "
3792 "the error, and the memory address where the error was detected."
3796 #: build/C/man3/mallopt.3:64
3802 #: build/C/man3/mallopt.3:79
3804 "If this bit is set, then, after printing any error message specified by bit "
3805 "0, the program is terminated by calling B<abort>(3). In glibc versions "
3806 "since 2.4, if bit 0 is also set, then, between printing the error message "
3807 "and aborting, the program also prints a stack trace in the manner of "
3808 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3809 "proc/[pid]/maps> (see B<proc>(5))."
3813 #: build/C/man3/mallopt.3:79
3815 msgid "Bit 2 (since glibc 2.4)"
3816 msgstr "Bit 2 (glibc 2.4 以降)"
3819 #: build/C/man3/mallopt.3:86
3821 "This bit has an effect only if bit 0 is also set. If this bit is set, then "
3822 "the one-line message describing the error is simplified to contain just the "
3823 "name of the function where the error was detected and the brief description "
3828 #: build/C/man3/mallopt.3:91
3829 msgid "The remaining bits in I<value> are ignored."
3833 #: build/C/man3/mallopt.3:95
3835 "Combining the above details, the following numeric values are meaningful for "
3836 "B<M_CHECK_ACTION>:"
3840 #: build/C/man3/mallopt.3:96
3846 #: build/C/man3/mallopt.3:98
3847 msgid "Ignore error conditions; continue execution (with undefined results)."
3851 #: build/C/man3/mallopt.3:98
3857 #: build/C/man3/mallopt.3:100
3858 msgid "Print a detailed error message and continue execution."
3862 #: build/C/man3/mallopt.3:100
3868 #: build/C/man3/mallopt.3:102
3869 msgid "Abort the program."
3873 #: build/C/man3/mallopt.3:102
3879 #: build/C/man3/mallopt.3:105
3881 "Print detailed error message, stack trace, and memory mappings, and abort "
3886 #: build/C/man3/mallopt.3:105
3892 #: build/C/man3/mallopt.3:107
3893 msgid "Print a simple error message and continue execution."
3897 #: build/C/man3/mallopt.3:107
3903 #: build/C/man3/mallopt.3:110
3905 "Print simple error message, stack trace, and memory mappings, and abort the "
3910 #: build/C/man3/mallopt.3:116
3912 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3913 "3. In glibc version 2.3.3 and earlier, the default value is 1."
3917 #: build/C/man3/mallopt.3:121
3919 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3920 "crash may happen much later, and the true cause of the problem is then very "
3921 "hard to track down."
3925 #: build/C/man3/mallopt.3:121
3927 msgid "B<M_MMAP_MAX>"
3928 msgstr "B<M_MMAP_MAX>"
3930 #. The following text adapted from comments in the glibc source:
3932 #: build/C/man3/mallopt.3:131
3934 "This parameter specifies the maximum number of allocation requests that may "
3935 "be simultaneously serviced using B<mmap>(2). This parameter exists because "
3936 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3937 "and using more than a few of them may degrade performance."
3941 #: build/C/man3/mallopt.3:138
3943 "The default value is 65,536, a value which has no special significance and "
3944 "which servers only as a safeguard. Setting this parameter to 0 disables the "
3945 "use of B<mmap>(2) for servicing large allocation requests."
3949 #: build/C/man3/mallopt.3:138
3951 msgid "B<M_MMAP_THRESHOLD>"
3952 msgstr "B<M_MMAP_THRESHOLD>"
3955 #: build/C/man3/mallopt.3:147
3957 "For allocations greater than or equal to the limit specified (in bytes) by "
3958 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3959 "allocation functions employ B<mmap>(2) instead of increasing the program "
3960 "break using B<sbrk>(2)."
3964 #: build/C/man3/mallopt.3:167
3966 "Allocating memory using B<mmap>(2) has the significant advantage that the "
3967 "allocated memory blocks can always be independently released back to the "
3968 "system. (By contrast, the heap can be trimmed only if memory is freed at "
3969 "the top end.) On the other hand, there are some disadvantages to the use of "
3970 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3971 "later allocations; memory may be wasted because B<mmap>(2) allocations must "
3972 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3973 "out memory allocated via B<mmap>(2). Balancing these factors leads to a "
3974 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3978 #: build/C/man3/mallopt.3:174
3980 "The lower limit for this parameter is 0. The upper limit is "
3981 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3982 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3986 #: build/C/man3/mallopt.3:192
3988 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default. The "
3989 "initial value of the threshold is 128*1024, but when blocks larger than the "
3990 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3991 "are freed, the threshold is adjusted upward to the size of the freed block. "
3992 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3993 "heap is also dynamically adjusted to be twice the dynamic mmap threshold. "
3994 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3995 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3996 "parameters is set."
4000 #: build/C/man3/mallopt.3:192
4002 msgid "B<M_MXFAST> (since glibc 2.3)"
4003 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
4005 #. The following text adapted from comments in the glibc sources:
4007 #: build/C/man3/mallopt.3:212
4009 "Set the upper limit for memory allocation requests that are satisfied using "
4010 "\"fastbins\". (The measurement unit for this parameter is bytes.) Fastbins "
4011 "are storage areas that hold deallocated blocks of memory of the same size "
4012 "without merging adjacent free blocks. Subsequent reallocation of blocks of "
4013 "the same size can be handled very quickly by allocating from the fastbin, "
4014 "although memory fragmentation and the overall memory footprint of the "
4015 "program can increase. The default value for this parameter is "
4016 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures). The range for "
4017 "this parameter is 0 to I<80*sizeof(size_t)/4>. Setting B<M_MXFAST> to 0 "
4018 "disables the use of fastbins."
4022 #: build/C/man3/mallopt.3:212
4024 msgid "B<M_PERTURB> (since glibc 2.4)"
4025 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4028 #: build/C/man3/mallopt.3:227
4030 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4031 "(other than allocations via B<calloc>(3)) are initialized to the complement "
4032 "of the value in the least significant byte of I<value>, and when allocated "
4033 "memory is released using B<free>(3), the freed bytes are set to the least "
4034 "significant byte of I<value>. This can be useful for detecting errors where "
4035 "programs incorrectly rely on allocated memory being initialized to zero, or "
4036 "reuse values in memory that has already been freed."
4040 #: build/C/man3/mallopt.3:227
4042 msgid "B<M_TOP_PAD>"
4043 msgstr "B<M_TOP_PAD>"
4046 #: build/C/man3/mallopt.3:234
4048 "This parameter defines the amount of padding to employ when calling "
4049 "B<sbrk>(2) to modify the program break. (The measurement unit for this "
4050 "parameter is bytes.) This parameter has an effect in the following "
4055 #: build/C/man3/mallopt.3:241
4057 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4058 "the B<sbrk>(2) request."
4062 #: build/C/man3/mallopt.3:247
4064 "When the heap is trimmed as a consequence of calling B<free>(3) (see the "
4065 "discussion of B<M_TRIM_THRESHOLD>) this much free space is preserved at the "
4070 #: build/C/man3/mallopt.3:251
4072 "In either case, the amount of padding is always rounded to a system page "
4077 #: build/C/man3/mallopt.3:258
4079 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4080 "system calls (when the parameter is set low) and wasting unused memory at "
4081 "the top of the heap (when the parameter is set high)."
4084 #. DEFAULT_TOP_PAD in glibc source
4086 #: build/C/man3/mallopt.3:261
4087 msgid "The default value for this parameter is 128*1024."
4091 #: build/C/man3/mallopt.3:261
4093 msgid "B<M_TRIM_THRESHOLD>"
4094 msgstr "B<M_TRIM_THRESHOLD>"
4097 #: build/C/man3/mallopt.3:277
4099 "When the amount of contiguous free memory at the top of the heap grows "
4100 "sufficiently large, B<free>(3) employs B<sbrk>(2) to release this memory "
4101 "back to the system. (This can be useful in programs that continue to "
4102 "execute for a long period after freeing a significant amount of memory.) "
4103 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4104 "this block of memory must reach before B<sbrk>(2) is used to trim the heap."
4108 #: build/C/man3/mallopt.3:282
4110 "The default value for this parameter is 128*1024. Setting "
4111 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4117 #. FIXME Do the arena parameters need to be documented?
4119 #. .BR M_ARENA_TEST " (since glibc 2.10)"
4121 #. .BR M_ARENA_MAX " (since glibc 2.10)"
4122 #. Environment variables
4123 #. MALLOC_ARENA_MAX_
4124 #. MALLOC_ARENA_TEST_
4125 #. http://udrepper.livejournal.com/20948.html describes some details
4126 #. of the MALLOC_ARENA_* environment variables.
4127 #. These macros aren't enabled in production releases until 2.15?
4128 #. (see glibc malloc/Makefile)
4130 #: build/C/man3/mallopt.3:305
4132 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4133 "of system calls (when the parameter is set low) and wasting unused memory "
4134 "at the top of the heap (when the parameter is set high)."
4138 #: build/C/man3/mallopt.3:305
4140 msgid "Environment variables"
4144 #: build/C/man3/mallopt.3:320
4146 "A number of environment variables can be defined to modify some of the same "
4147 "parameters as are controlled by B<mallopt>(). Using these variables has the "
4148 "advantage that the source code of the program need not be changed. To be "
4149 "effective, these variables must be defined before the first call to a memory-"
4150 "allocation function. (If the same parameters are adjusted via B<mallopt>(), "
4151 "then the B<mallopt>() settings take precedence.) For security reasons, "
4152 "these variables are ignored in set-user-ID and set-group-ID programs."
4156 #: build/C/man3/mallopt.3:323
4158 "The environment variables are as follows (note the trailing underscore at "
4159 "the end of the name of each variable):"
4163 #: build/C/man3/mallopt.3:323
4165 msgid "B<MALLOC_CHECK_>"
4166 msgstr "B<MALLOC_CHECK_>"
4168 #. On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4169 #. when MALLOC_CHECK_ was set.
4171 #: build/C/man3/mallopt.3:340
4173 "This environment variable controls the same parameter as B<mallopt>() "
4174 "B<M_CHECK_ACTION>. If this variable is set to a nonzero value, then a "
4175 "special implementation of the memory-allocation functions is used. (This is "
4176 "accomplished using the B<malloc_hook>(3) feature.) This implementation "
4177 "performs additional error checking, but is slower than the standard set of "
4178 "memory-allocation functions. (This implementation does not detect all "
4179 "possible errors; memory leaks can still occur.)"
4183 #: build/C/man3/mallopt.3:345
4185 "The value assigned to this environment variable should be a single digit, "
4186 "whose meaning is as described for B<M_CHECK_ACTION>. Any characters beyond "
4187 "the initial digit are ignored."
4191 #: build/C/man3/mallopt.3:354
4193 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4194 "for set-user-ID and set-group-ID programs. However, if the file I</etc/suid-"
4195 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4196 "also has an effect for set-user-ID and set-group-ID programs."
4200 #: build/C/man3/mallopt.3:354
4202 msgid "B<MALLOC_MMAP_MAX_>"
4203 msgstr "B<MALLOC_MMAP_MAX_>"
4206 #: build/C/man3/mallopt.3:359
4207 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_MAX>."
4211 #: build/C/man3/mallopt.3:359
4213 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4214 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4217 #: build/C/man3/mallopt.3:364
4218 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_THRESHOLD>."
4222 #: build/C/man3/mallopt.3:364
4224 msgid "B<MALLOC_PERTURB_>"
4225 msgstr "B<MALLOC_PERTURB_>"
4228 #: build/C/man3/mallopt.3:369
4229 msgid "Controls the same parameter as B<mallopt>() B<M_PERTURB>."
4233 #: build/C/man3/mallopt.3:369
4235 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4236 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4239 #: build/C/man3/mallopt.3:374
4240 msgid "Controls the same parameter as B<mallopt>() B<M_TRIM_THRESHOLD>."
4244 #: build/C/man3/mallopt.3:374
4246 msgid "B<MALLOC_TOP_PAD_>"
4247 msgstr "B<MALLOC_TOP_PAD_>"
4250 #: build/C/man3/mallopt.3:379
4251 msgid "Controls the same parameter as B<mallopt>() B<M_TOP_PAD>."
4255 #: build/C/man3/mallopt.3:384
4256 msgid "On success, B<mallopt>() returns 1. On error, it returns 0."
4257 msgstr "B<mallopt>() は成功すると 1 を返す。エラーの場合は 0 を返す。"
4260 #. Available already in glibc 2.0, possibly earlier
4262 #: build/C/man3/mallopt.3:392
4263 msgid "On error, I<errno> is I<not> set."
4264 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4268 #: build/C/man3/mallopt.3:406
4270 "This function is not specified by POSIX or the C standards. A similar "
4271 "function exists on many System V derivatives, but the range of values for "
4272 "I<param> varies across systems. The SVID defined options B<M_MXFAST>, "
4273 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4274 "implemented in glibc."
4278 #: build/C/man3/mallopt.3:410
4279 msgid "Specifying an invalid value for I<param> does not generate an error."
4282 #. FIXME . This looks buggy:
4283 #. setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4284 #. malloc requests are rounded up:
4285 #. (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4286 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4288 #: build/C/man3/mallopt.3:418
4290 "A calculation error within the glibc implementation means that a call of the "
4295 #: build/C/man3/mallopt.3:421
4297 msgid " mallopt(M_MXFAST, n)\n"
4298 msgstr " mallopt(M_MXFAST, n)\n"
4300 #. Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4302 #: build/C/man3/mallopt.3:433
4304 "does not result in fastbins being employed for all allocations of size up to "
4305 "I<n>. To ensure desired results, I<n> should be rounded up to the next "
4306 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4310 #. FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4312 #: build/C/man3/mallopt.3:454
4314 "If B<mallopt>() is used to set B<M_PERTURB>, then, as expected, the bytes "
4315 "of allocated memory are initialized to the complement of the byte in "
4316 "I<value>, and when that memory is freed, the bytes of the region are "
4317 "initialized to the byte specified in I<value>. However, there is an off-by-"
4318 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4319 "precisely the block of memory being freed by the call I<free(p)>, the block "
4320 "starting at I<p+sizeof(size_t)> is initialized."
4324 #: build/C/man3/mallopt.3:463
4326 "The program below demonstrates the use of B<M_CHECK_ACTION>. If the program "
4327 "is supplied with an (integer) command-line argument, then that argument is "
4328 "used to set the B<M_CHECK_ACTION> parameter. The program then allocates a "
4329 "block of memory, and frees it twice (an error)."
4333 #: build/C/man3/mallopt.3:467
4335 "The following shell session shows what happens when we run this program "
4336 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4340 #: build/C/man3/mallopt.3:487
4344 "main(): returned from first free() call\n"
4345 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4346 "======= Backtrace: =========\n"
4347 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4348 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4349 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4350 "\\&./a.out[0x80485db]\n"
4351 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4352 "\\&./a.out[0x8048471]\n"
4353 "======= Memory map: ========\n"
4354 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
4355 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
4356 "[some lines omitted]\n"
4357 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4358 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
4359 "Aborted (core dumped)\n"
4362 "main(): returned from first free() call\n"
4363 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4364 "======= Backtrace: =========\n"
4365 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4366 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4367 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4368 "\\&./a.out[0x80485db]\n"
4369 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4370 "\\&./a.out[0x8048471]\n"
4371 "======= Memory map: ========\n"
4372 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
4373 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
4374 "[some lines omitted]\n"
4375 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4376 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
4377 "Aborted (core dumped)\n"
4380 #: build/C/man3/mallopt.3:492
4382 "The following runs show the results when employing other values for "
4383 "B<M_CHECK_ACTION>:"
4387 #: build/C/man3/mallopt.3:505
4390 "$ B<./a.out 1> # Diagnose error and continue\n"
4391 "main(): returned from first free() call\n"
4392 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4393 "main(): returned from second free() call\n"
4394 "$ B<./a.out 2> # Abort without error message\n"
4395 "main(): returned from first free() call\n"
4396 "Aborted (core dumped)\n"
4397 "$ B<./a.out 0> # Ignore error and continue\n"
4398 "main(): returned from first free() call\n"
4399 "main(): returned from second free() call\n"
4401 "$ B<./a.out 1> # Diagnose error and continue\n"
4402 "main(): returned from first free() call\n"
4403 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4404 "main(): returned from second free() call\n"
4405 "$ B<./a.out 2> # Abort without error message\n"
4406 "main(): returned from first free() call\n"
4407 "Aborted (core dumped)\n"
4408 "$ B<./a.out 0> # Ignore error and continue\n"
4409 "main(): returned from first free() call\n"
4410 "main(): returned from second free() call\n"
4413 #: build/C/man3/mallopt.3:511
4415 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4416 "environment variable:"
4420 #: build/C/man3/mallopt.3:518
4423 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4424 "main(): returned from first free() call\n"
4425 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4426 "main(): returned from second free() call\n"
4428 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4429 "main(): returned from first free() call\n"
4430 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4431 "main(): returned from second free() call\n"
4434 #: build/C/man3/mallopt.3:526
4437 "#include E<lt>malloc.hE<gt>\n"
4438 "#include E<lt>stdio.hE<gt>\n"
4439 "#include E<lt>stdlib.hE<gt>\n"
4441 "#include E<lt>malloc.hE<gt>\n"
4442 "#include E<lt>stdio.hE<gt>\n"
4443 "#include E<lt>stdlib.hE<gt>\n"
4446 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4450 "main(int argc, char *argv[])\n"
4455 "main(int argc, char *argv[])\n"
4460 #: build/C/man3/mallopt.3:538
4463 " if (argc E<gt> 1) {\n"
4464 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4465 " fprintf(stderr, \"mallopt() failed\");\n"
4466 " exit(EXIT_FAILURE);\n"
4470 " if (argc E<gt> 1) {\n"
4471 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4472 " fprintf(stderr, \"mallopt() failed\");\n"
4473 " exit(EXIT_FAILURE);\n"
4478 #: build/C/man3/mallopt.3:544
4481 " p = malloc(1000);\n"
4482 " if (p == NULL) {\n"
4483 " fprintf(stderr, \"malloc() failed\");\n"
4484 " exit(EXIT_FAILURE);\n"
4487 " p = malloc(1000);\n"
4488 " if (p == NULL) {\n"
4489 " fprintf(stderr, \"malloc() failed\");\n"
4490 " exit(EXIT_FAILURE);\n"
4494 #: build/C/man3/mallopt.3:547
4498 " printf(\"main(): returned from first free() call\\en\");\n"
4501 " printf(\"main(): returned from first free() call\\en\");\n"
4504 #: build/C/man3/mallopt.3:550
4508 " printf(\"main(): returned from second free() call\\en\");\n"
4511 " printf(\"main(): returned from second free() call\\en\");\n"
4514 #: build/C/man3/mallopt.3:568
4516 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4517 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4518 "B<mtrace>(3), B<posix_memalign>(3)"
4520 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4521 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4522 "B<mtrace>(3), B<posix_memalign>(3)"
4525 #: build/C/man3/mcheck.3:25
4531 #: build/C/man3/mcheck.3:25
4537 #: build/C/man3/mcheck.3:28
4539 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4543 #: build/C/man3/mcheck.3:31
4545 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4546 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4549 #: build/C/man3/mcheck.3:33
4551 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4555 #: build/C/man3/mcheck.3:35
4557 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4561 #: build/C/man3/mcheck.3:37
4563 msgid "B<void mcheck_check_all(void);>\n"
4564 msgstr "B<void mcheck_check_all(void);>\n"
4567 #: build/C/man3/mcheck.3:39
4569 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4570 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4573 #: build/C/man3/mcheck.3:51
4575 "The B<mcheck>() function installs a set of debugging hooks for the "
4576 "B<malloc>(3) family of memory-allocation functions. These hooks cause "
4577 "certain consistency checks to be performed on the state of the heap. The "
4578 "checks can detect application errors such as freeing a block of memory more "
4579 "than once or corrupting the bookkeeping data structures that immediately "
4580 "precede a block of allocated memory."
4584 #: build/C/man3/mcheck.3:63
4586 "To be effective, the B<mcheck>() function must be called before the first "
4587 "call to B<malloc>(3) or a related function. In cases where this is "
4588 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4589 "implicit call to B<mcheck>() (with a NULL argument) before the first call "
4590 "to a memory-allocation function."
4594 #: build/C/man3/mcheck.3:71
4596 "The B<mcheck_pedantic>() function is similar to B<mcheck>(), but performs "
4597 "checks on all allocated blocks whenever one of the memory-allocation "
4598 "functions is called. This can be very slow!"
4602 #: build/C/man3/mcheck.3:78
4604 "The B<mcheck_check_all>() function causes an immediate check on all "
4605 "allocated blocks. This call is effective only if B<mcheck>() is called "
4610 #: build/C/man3/mcheck.3:91
4612 "If the system detects an inconsistency in the heap, the caller-supplied "
4613 "function pointed to by I<abortfunc> is invoked with a single argument "
4614 "argument, I<mstatus>, that indicates what type of inconsistency was "
4615 "detected. If I<abortfunc> is NULL, a default function prints an error "
4616 "message on I<stderr> and calls B<abort>(3)."
4620 #: build/C/man3/mcheck.3:103
4622 "The B<mprobe>() function performs a consistency check on the block of "
4623 "allocated memory pointed to by I<ptr>. The B<mcheck>() function should be "
4624 "called beforehand (otherwise B<mprobe>() returns B<MCHECK_DISABLED>)."
4628 #: build/C/man3/mcheck.3:111
4630 "The following list describes the values returned by B<mprobe>() or passed "
4631 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4635 #: build/C/man3/mcheck.3:111
4637 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4641 #: build/C/man3/mcheck.3:116
4643 "B<mcheck>() was not called before the first memory allocation function was "
4644 "called. Consistency checking is not possible."
4648 #: build/C/man3/mcheck.3:116
4650 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4654 #: build/C/man3/mcheck.3:119
4655 msgid "No inconsistency detected."
4659 #: build/C/man3/mcheck.3:119
4661 msgid "B<MCHECK_HEAD>"
4662 msgstr "B<MCHECK_HEAD>"
4665 #: build/C/man3/mcheck.3:122
4666 msgid "Memory preceding an allocated block was clobbered."
4670 #: build/C/man3/mcheck.3:122
4672 msgid "B<MCHECK_TAIL>"
4673 msgstr "B<MCHECK_TAIL>"
4676 #: build/C/man3/mcheck.3:125
4677 msgid "Memory following an allocated block was clobbered."
4681 #: build/C/man3/mcheck.3:125
4683 msgid "B<MCHECK_FREE>"
4684 msgstr "B<MCHECK_FREE>"
4687 #: build/C/man3/mcheck.3:129
4688 msgid "A block of memory was freed twice."
4692 #: build/C/man3/mcheck.3:134
4694 "B<mcheck>() and B<mcheck_pedantic>() return 0 on success, or -1 on error."
4698 #: build/C/man3/mcheck.3:145
4700 "The B<mcheck_pedantic>() and B<mcheck_check_all>() functions are available "
4701 "since glibc 2.2. The B<mcheck>() and B<mprobe>() functions are present "
4702 "since at least glibc 2.0"
4705 #. But is MALLOC_CHECK_ slower?
4707 #: build/C/man3/mcheck.3:159
4709 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4710 "environment variable (described in B<mallopt>(3)) cause the same kinds of "
4711 "errors to be detected. But, using B<MALLOC_CHECK_> does not require the "
4712 "application to be relinked."
4716 #: build/C/man3/mcheck.3:165
4718 "The program below calls B<mcheck>() with a NULL argument and then frees the "
4719 "same block of memory twice. The following shell session demonstrates what "
4720 "happens when running the program:"
4724 #: build/C/man3/mcheck.3:170
4732 #: build/C/man3/mcheck.3:174
4735 "About to free a second time\n"
4736 "block freed twice\n"
4737 "Aborted (core dumped)\n"
4741 #: build/C/man3/mcheck.3:182
4744 "#include E<lt>stdlib.hE<gt>\n"
4745 "#include E<lt>stdio.hE<gt>\n"
4746 "#include E<lt>mcheck.hE<gt>\n"
4748 "#include E<lt>stdlib.hE<gt>\n"
4749 "#include E<lt>stdio.hE<gt>\n"
4750 "#include E<lt>mcheck.hE<gt>\n"
4753 #: build/C/man3/mcheck.3:190
4756 " if (mcheck(NULL) != 0) {\n"
4757 " fprintf(stderr, \"mcheck() failed\\en\");\n"
4761 #: build/C/man3/mcheck.3:193
4764 " exit(EXIT_FAILURE);\n"
4767 " exit(EXIT_FAILURE);\n"
4771 #: build/C/man3/mcheck.3:195
4773 msgid " p = malloc(1000);\n"
4774 msgstr " p = malloc(1000);\n"
4777 #: build/C/man3/mcheck.3:200
4780 " fprintf(stderr, \"About to free\\en\");\n"
4782 " fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4787 #: build/C/man3/mcheck.3:208
4788 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4789 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4792 #: build/C/man2/mlock.2:26
4798 #: build/C/man2/mlock.2:26
4804 #: build/C/man2/mlock.2:29
4805 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4806 msgstr "mlock - メモリーのロックとロック解除を行う"
4809 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4810 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4812 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4813 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4816 #: build/C/man2/mlock.2:35
4819 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4820 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4822 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4823 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4826 #: build/C/man2/mlock.2:38
4829 "B<int mlockall(int >I<flags>B<);>\n"
4830 "B<int munlockall(void);>\n"
4832 "B<int mlockall(int >I<flags>B<);>\n"
4833 "B<int munlockall(void);>\n"
4836 #: build/C/man2/mlock.2:54
4838 "B<mlock>() and B<mlockall>() respectively lock part or all of the calling "
4839 "process's virtual address space into RAM, preventing that memory from being "
4840 "paged to the swap area. B<munlock>() and B<munlockall>() perform the "
4841 "converse operation, respectively unlocking part or all of the calling "
4842 "process's virtual address space, so that pages in the specified virtual "
4843 "address range may once more to be swapped out if required by the kernel "
4844 "memory manager. Memory locking and unlocking are performed in units of "
4847 "B<mlock>() と B<mlockall>() はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4848 "間の一部または全部を RAM 上にロックし、メモリーがスワップエリアにページングさ"
4849 "れるのを防ぐ。 B<munlock>() と B<munlockall>() は逆の操作で、それぞれ呼び出"
4850 "し元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定"
4851 "された仮想アドレス範囲のページは カーネルメモリーマネージャーから要求されれば"
4852 "スワップアウトするようになる。 メモリーのロックとロック解除はページ単位で行わ"
4856 #: build/C/man2/mlock.2:54
4858 msgid "mlock() and munlock()"
4859 msgstr "mlock() と munlock()"
4862 #: build/C/man2/mlock.2:64
4864 "B<mlock>() locks pages in the address range starting at I<addr> and "
4865 "continuing for I<len> bytes. All pages that contain a part of the specified "
4866 "address range are guaranteed to be resident in RAM when the call returns "
4867 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4869 "B<mlock>() は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4870 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4871 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4872 "れるまで RAM に残り続けることが保証される。"
4875 #: build/C/man2/mlock.2:73
4877 "B<munlock>() unlocks pages in the address range starting at I<addr> and "
4878 "continuing for I<len> bytes. After this call, all pages that contain a part "
4879 "of the specified memory range can be moved to external swap space again by "
4882 "B<munlock>() は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4883 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリー"
4884 "範囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4887 #: build/C/man2/mlock.2:73
4889 msgid "mlockall() and munlockall()"
4890 msgstr "mlockall() と munlockall()"
4893 #: build/C/man2/mlock.2:83
4895 "B<mlockall>() locks all pages mapped into the address space of the calling "
4896 "process. This includes the pages of the code, data and stack segment, as "
4897 "well as shared libraries, user space kernel data, shared memory, and memory-"
4898 "mapped files. All mapped pages are guaranteed to be resident in RAM when "
4899 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4902 "B<mlockall>() は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4903 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4904 "ラリ、カーネルのユーザー空間データ、 共有メモリー、メモリーマップされたファイ"
4905 "ルが含まれる。 システムコールが成功した場合には全てのマップされたページは "
4906 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4910 #: build/C/man2/mlock.2:88
4912 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4913 "following constants:"
4914 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4917 #: build/C/man2/mlock.2:88
4919 msgid "B<MCL_CURRENT>"
4920 msgstr "B<MCL_CURRENT>"
4923 #: build/C/man2/mlock.2:92
4925 "Lock all pages which are currently mapped into the address space of the "
4928 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4931 #: build/C/man2/mlock.2:92
4933 msgid "B<MCL_FUTURE>"
4934 msgstr "B<MCL_FUTURE>"
4937 #: build/C/man2/mlock.2:99
4939 "Lock all pages which will become mapped into the address space of the "
4940 "process in the future. These could be for instance new pages required by a "
4941 "growing heap and stack as well as new memory-mapped files or shared memory "
4944 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4945 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4946 "くメモリーマップされたファイルや共有メモリー領域もロックされる。"
4949 #: build/C/man2/mlock.2:112
4951 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4952 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4953 "of locked bytes to exceed the permitted maximum (see below). In the same "
4954 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4955 "expansion and deliver a B<SIGSEGV> signal to the process."
4957 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4958 "B<sbrk>(2), B<malloc>(3)) は、ロックするバイト数が許可された最大値 (下記参"
4959 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4960 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4964 #: build/C/man2/mlock.2:116
4966 "B<munlockall>() unlocks all pages mapped into the address space of the "
4969 "B<munlockall>() は、呼び出し元プロセスのアドレス空間にマッピングされている "
4973 #: build/C/man2/mlock.2:122
4975 "On success these system calls return 0. On error, -1 is returned, I<errno> "
4976 "is set appropriately, and no changes are made to any locks in the address "
4977 "space of the process."
4979 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4980 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4984 #: build/C/man2/mlock.2:131
4986 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4987 "resource limit, but tried to lock more memory than the limit permitted. "
4988 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4990 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4991 "つが、制限が許可している以上のメモリーをロックしようとした。 この制限は、プロ"
4992 "セスが特権 (B<CAP_IPC_LOCK>) を持っている場合は適用されない。"
4994 #. In the case of mlock(), this check is somewhat buggy: it doesn't
4995 #. take into account whether the to-be-locked range overlaps with
4996 #. already locked pages. Thus, suppose we allocate
4997 #. (num_physpages / 4 + 1) of memory, and lock those pages once using
4998 #. mlock(), and then lock the *same* page range a second time.
4999 #. In the case, the second mlock() call will fail, since the check
5000 #. calculates that the process is trying to lock (num_physpages / 2 + 2)
5001 #. pages, which of course is not true. (MTK, Nov 04, kernel 2.4.28)
5003 #: build/C/man2/mlock.2:143
5005 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
5008 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
5010 #. SVr4 documents an additional EAGAIN error code.
5012 #: build/C/man2/mlock.2:149
5014 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>) to "
5015 "perform the requested operation."
5017 "呼び出し側が特権を持っていないが、\n"
5018 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5021 #: build/C/man2/mlock.2:154
5022 msgid "For B<mlock>() and B<munlock>():"
5023 msgstr "B<mlock>() と B<munlock>() 用として:"
5026 #: build/C/man2/mlock.2:157
5027 msgid "Some or all of the specified address range could not be locked."
5028 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5031 #: build/C/man2/mlock.2:164
5033 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5034 "addition may have resulted in an overflow)."
5036 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5037 "(例えば、加算でオーバーフローが発生したなど)。"
5040 #: build/C/man2/mlock.2:169
5041 msgid "(Not on Linux) I<addr> was not a multiple of the page size."
5043 "(Linux ではこの意味で使われない) I<addr> がページサイズの倍数ではない。"
5046 #: build/C/man2/mlock.2:173
5048 "Some of the specified address range does not correspond to mapped pages in "
5049 "the address space of the process."
5051 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5055 #: build/C/man2/mlock.2:176
5056 msgid "For B<mlockall>():"
5057 msgstr "B<mlockall>() 用として:"
5060 #: build/C/man2/mlock.2:179
5061 msgid "Unknown I<flags> were specified."
5062 msgstr "未知の I<flags> が指定された。"
5065 #: build/C/man2/mlock.2:182
5066 msgid "For B<munlockall>():"
5067 msgstr "B<munlockall>() 用として:"
5070 #: build/C/man2/mlock.2:186
5072 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5074 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>) を持っていない。"
5077 #: build/C/man2/mlock.2:188
5078 msgid "POSIX.1-2001, SVr4."
5079 msgstr "POSIX.1-2001, SVr4."
5082 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:503 build/C/man2/msync.2:105
5084 msgid "AVAILABILITY"
5088 #: build/C/man2/mlock.2:200
5090 "On POSIX systems on which B<mlock>() and B<munlock>() are available, "
5091 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5092 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5093 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5095 "B<mlock>() と B<munlock>() が使用可能な POSIX システムでは "
5096 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5097 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5098 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5101 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5102 #. -1: unavailable, 0: ask using sysconf().
5103 #. glibc defines it to 1.
5105 #: build/C/man2/mlock.2:213
5107 "On POSIX systems on which B<mlockall>() and B<munlockall>() are available, "
5108 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5109 "than 0. (See also B<sysconf>(3).)"
5111 "B<mlockall>() と B<munlockall>() が利用可能な POSIX システムでは、 "
5112 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5113 "(B<sysconf>(3) も参照のこと)。"
5116 #: build/C/man2/mlock.2:231
5118 "Memory locking has two main applications: real-time algorithms and high-"
5119 "security data processing. Real-time applications require deterministic "
5120 "timing, and, like scheduling, paging is one major cause of unexpected "
5121 "program execution delays. Real-time applications will usually also switch "
5122 "to a real-time scheduler with B<sched_setscheduler>(2). Cryptographic "
5123 "security software often handles critical bytes like passwords or secret keys "
5124 "as data structures. As a result of paging, these secrets could be "
5125 "transferred onto a persistent swap store medium, where they might be "
5126 "accessible to the enemy long after the security software has erased the "
5127 "secrets in RAM and terminated. (But be aware that the suspend mode on "
5128 "laptops and some desktop computers will save a copy of the system's RAM to "
5129 "disk, regardless of memory locks.)"
5131 "メモリーのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5132 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5133 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5134 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5135 "いは B<sched_setscheduler>(2) でリアルタイムスケジューラに変更される。 暗号"
5136 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5137 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5138 "されるかもしれない。そして、セキュリティ ソフトウェアが RAM 上の秘密を削除し"
5139 "て終了したずっと後になっても、 このスワップされたデータには敵がアクセスできる"
5140 "可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サス"
5141 "ペンドモードはシステムの RAM の内容をメモリーのロックに関わらず ディスクに保"
5145 #: build/C/man2/mlock.2:244
5147 "Real-time processes that are using B<mlockall>() to prevent delays on page "
5148 "faults should reserve enough locked stack pages before entering the time-"
5149 "critical section, so that no page fault can be caused by function calls. "
5150 "This can be achieved by calling a function that allocates a sufficiently "
5151 "large automatic variable (an array) and writes to the memory occupied by "
5152 "this array in order to touch these stack pages. This way, enough pages will "
5153 "be mapped for the stack and can be locked into RAM. The dummy writes ensure "
5154 "that not even copy-on-write page faults can occur in the critical section."
5156 "リアルタイムプロセスが B<mlockall>() を使ってページフォールトによる遅延を防"
5157 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5158 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5159 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5160 "数 (の配列) を確保し、 これらのスタック用のページがメモリー上に確保されるよう"
5161 "にこの配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5162 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5163 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5164 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5167 #: build/C/man2/mlock.2:257
5169 "Memory locks are not inherited by a child created via B<fork>(2) and are "
5170 "automatically removed (unlocked) during an B<execve>(2) or when the process "
5171 "terminates. The B<mlockall>() B<MCL_FUTURE> setting is not inherited by a "
5172 "child created via B<fork>(2) and is cleared during an B<execve>(2)."
5174 "メモリーロックは B<fork>(2) で作成された子プロセスには継承されず、 "
5175 "B<execve>(2) が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5176 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5177 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5180 #: build/C/man2/mlock.2:261
5182 "The memory lock on an address range is automatically removed if the address "
5183 "range is unmapped via B<munmap>(2)."
5185 "あるアドレス範囲に対するメモリーロックは、そのアドレス範囲が B<munmap>(2) に"
5186 "よってアンマップされた場合は削除される。"
5189 #: build/C/man2/mlock.2:274
5191 "Memory locks do not stack, that is, pages which have been locked several "
5192 "times by calls to B<mlock>() or B<mlockall>() will be unlocked by a single "
5193 "call to B<munlock>() for the corresponding range or by B<munlockall>(). "
5194 "Pages which are mapped to several locations or by several processes stay "
5195 "locked into RAM as long as they are locked at least at one location or by at "
5196 "least one process."
5198 "メモリーのロックは累積しない。 すなわち複数回 B<mlock>() や B<mlockall>() "
5199 "を呼び出してロックされたページでも、 対応する範囲に対して B<munlock>() を 1 "
5200 "回呼び出したり B<munlockall>() を呼び出したりするだけでロック解除される。 複"
5201 "数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一"
5202 "つのプロセスでロックされている限りは RAM に残り続ける。"
5205 #: build/C/man2/mlock.2:285
5207 "Under Linux, B<mlock>() and B<munlock>() automatically round I<addr> down "
5208 "to the nearest page boundary. However, POSIX.1-2001 allows an "
5209 "implementation to require that I<addr> is page aligned, so portable "
5210 "applications should ensure this."
5212 "Linux では、 B<mlock>() と B<munlock>() は自動的に I<addr> を端数切り捨てに"
5213 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5214 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5215 "ケーションではきちんと境界に合わせた方が良い。"
5218 #: build/C/man2/mlock.2:298
5220 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5221 "many kilobytes of memory the process with ID I<PID> has locked using "
5222 "B<mlock>(), B<mlockall>(), and B<mmap>(2) B<MAP_LOCKED>."
5224 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5225 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5226 "ID が I<PID> のプロセスがロックしているメモリー量 (キロバイト単位) が\n"
5230 #: build/C/man2/mlock.2:298
5232 msgid "Limits and permissions"
5236 #: build/C/man2/mlock.2:305
5238 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>) "
5239 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5240 "defines a limit on how much memory the process may lock."
5242 "Linux 2.6.8 以前では、メモリーをロックするためには特権 (B<CAP_IPC_LOCK>) が"
5243 "必要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリーを"
5247 #: build/C/man2/mlock.2:311
5249 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5250 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5251 "instead defines a limit on how much memory an unprivileged process may lock."
5253 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリー量は無制限とな"
5254 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5255 "クできるメモリー量の制限を定義する。"
5258 #: build/C/man2/mlock.2:319
5260 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5261 "B<mlockall>() B<MCL_FUTURE> flag to be inherited across a B<fork>(2). This "
5262 "was rectified in kernel 2.4.18."
5264 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>() "
5265 "B<MCL_FUTURE> フラグが B<fork>(2) で継承されると言うバグがある。 これはカー"
5268 #. See the following LKML thread:
5269 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5270 #. "Rationale for RLIMIT_MEMLOCK"
5273 #: build/C/man2/mlock.2:336
5275 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5276 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5277 "example, setting its effective UID to a nonzero value), then subsequent "
5278 "memory allocations (e.g., B<mmap>(2), B<brk>(2)) will fail if the "
5279 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5281 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5282 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5283 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5284 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリー割り当て (例えば B<mmap>(2), "
5288 #: build/C/man2/mlock.2:343
5290 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5291 "B<capabilities>(7)"
5293 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5294 "B<capabilities>(7)"
5297 #: build/C/man2/mmap.2:40
5303 #: build/C/man2/mmap.2:43
5304 msgid "mmap, munmap - map or unmap files or devices into memory"
5305 msgstr "mmap, munmap - ファイルやデバイスをメモリーにマップ/アンマップする"
5308 #: build/C/man2/mmap.2:51
5311 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5312 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
5313 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5315 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5316 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
5317 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5320 #: build/C/man2/mmap.2:54
5321 msgid "See NOTES for information on feature test macro requirements."
5322 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5325 #: build/C/man2/mmap.2:63
5327 "B<mmap>() creates a new mapping in the virtual address space of the calling "
5328 "process. The starting address for the new mapping is specified in I<addr>. "
5329 "The I<length> argument specifies the length of the mapping."
5331 "B<mmap>() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5332 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5333 "は I<length> 引き数で指定される。"
5335 #. Before Linux 2.6.24, the address was rounded up to the next page
5336 #. boundary; since 2.6.24, it is rounded down!
5338 #: build/C/man2/mmap.2:77
5340 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5341 "the mapping; this is the most portable method of creating a new mapping. If "
5342 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5343 "the mapping; on Linux, the mapping will be created at a nearby page "
5344 "boundary. The address of the new mapping is returned as the result of the "
5347 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5348 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5349 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5350 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5351 "ングのアドレスは、呼び出しの返り値として返される。"
5354 #: build/C/man2/mmap.2:89
5356 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5357 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5358 "offset I<offset> in the file (or other object) referred to by the file "
5359 "descriptor I<fd>. I<offset> must be a multiple of the page size as returned "
5360 "by I<sysconf(_SC_PAGE_SIZE)>."
5362 "ファイルマッピングの内容は、 ファイルディスクリプター I<fd> で参照されるファ"
5363 "イル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5364 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5365 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5366 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5369 #: build/C/man2/mmap.2:97
5371 "The I<prot> argument describes the desired memory protection of the mapping "
5372 "(and must not conflict with the open mode of the file). It is either "
5373 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5375 "引き数 I<prot> には、マッピングのメモリー保護をどのように行なうかを指定する "
5376 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5377 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5380 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5382 msgid "B<PROT_EXEC>"
5383 msgstr "B<PROT_EXEC>"
5386 #: build/C/man2/mmap.2:100
5387 msgid "Pages may be executed."
5388 msgstr "ページは実行可能である。"
5391 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5393 msgid "B<PROT_READ>"
5394 msgstr "B<PROT_READ>"
5397 #: build/C/man2/mmap.2:103
5398 msgid "Pages may be read."
5399 msgstr "ページは読み込み可能である。"
5402 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5404 msgid "B<PROT_WRITE>"
5405 msgstr "B<PROT_WRITE>"
5408 #: build/C/man2/mmap.2:106
5409 msgid "Pages may be written."
5410 msgstr "ページに書き込み可能である。"
5413 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5415 msgid "B<PROT_NONE>"
5416 msgstr "B<PROT_NONE>"
5419 #: build/C/man2/mmap.2:109
5420 msgid "Pages may not be accessed."
5421 msgstr "ページにはアクセスできない。"
5424 #: build/C/man2/mmap.2:118
5426 "The I<flags> argument determines whether updates to the mapping are visible "
5427 "to other processes mapping the same region, and whether updates are carried "
5428 "through to the underlying file. This behavior is determined by including "
5429 "exactly one of the following values in I<flags>:"
5431 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5432 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5433 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5434 "I<flags> に含めることで指定する。"
5437 #: build/C/man2/mmap.2:118
5439 msgid "B<MAP_SHARED>"
5440 msgstr "B<MAP_SHARED>"
5443 #: build/C/man2/mmap.2:128
5445 "Share this mapping. Updates to the mapping are visible to other processes "
5446 "that map this file, and are carried through to the underlying file. The "
5447 "file may not actually be updated until B<msync>(2) or B<munmap>() is "
5450 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5451 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5452 "る。 ただし、ファイルの実際の更新は B<msync>(2) または B<munmap>() が呼ばれ"
5456 #: build/C/man2/mmap.2:128
5458 msgid "B<MAP_PRIVATE>"
5459 msgstr "B<MAP_PRIVATE>"
5462 #: build/C/man2/mmap.2:137
5464 "Create a private copy-on-write mapping. Updates to the mapping are not "
5465 "visible to other processes mapping the same file, and are not carried "
5466 "through to the underlying file. It is unspecified whether changes made to "
5467 "the file after the B<mmap>() call are visible in the mapped region."
5469 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5470 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5471 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>() の呼び出し後"
5472 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5476 #: build/C/man2/mmap.2:139
5477 msgid "Both of these flags are described in POSIX.1-2001."
5478 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5481 #: build/C/man2/mmap.2:142
5483 "In addition, zero or more of the following values can be ORed in I<flags>:"
5485 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5489 #: build/C/man2/mmap.2:142
5491 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5492 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5494 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5496 #: build/C/man2/mmap.2:158
5498 "Put the mapping into the first 2 Gigabytes of the process address space. "
5499 "This flag is supported only on x86-64, for 64-bit programs. It was added to "
5500 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5501 "as to improve context-switch performance on some early 64-bit processors. "
5502 "Modern x86-64 processors no longer have this performance problem, so use of "
5503 "this flag is not required on those systems. The B<MAP_32BIT> flag is "
5504 "ignored when B<MAP_FIXED> is set."
5506 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5507 "ラグがサポートされているのは x86-64 アーキテクチャー上の 64 ビットプログラム"
5508 "のみである。 このフラグが追加されたのは、スレッドのスタックをメモリーの先頭 "
5509 "2GB 以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにお"
5510 "ける コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5511 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5512 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5516 #: build/C/man2/mmap.2:158
5519 msgstr "B<MAP_ANON>"
5522 #: build/C/man2/mmap.2:163
5523 msgid "Synonym for B<MAP_ANONYMOUS>. Deprecated."
5524 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5527 #: build/C/man2/mmap.2:163
5529 msgid "B<MAP_ANONYMOUS>"
5530 msgstr "B<MAP_ANONYMOUS>"
5533 #: build/C/man2/mmap.2:185
5535 "The mapping is not backed by any file; its contents are initialized to "
5536 "zero. The I<fd> and I<offset> arguments are ignored; however, some "
5537 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>) "
5538 "is specified, and portable applications should ensure this. The use of "
5539 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5540 "only since kernel 2.4."
5542 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5543 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5544 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>) が指定された場合、 I<fd> を -1 にす"
5545 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5546 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5547 "以降の Linux でのみサポートされている。"
5550 #: build/C/man2/mmap.2:185
5552 msgid "B<MAP_DENYWRITE>"
5553 msgstr "B<MAP_DENYWRITE>"
5555 #. Introduced in 1.1.36, removed in 1.3.24.
5557 #: build/C/man2/mmap.2:193
5559 "This flag is ignored. (Long ago, it signaled that attempts to write to the "
5560 "underlying file should fail with B<ETXTBUSY>. But this was a source of "
5561 "denial-of-service attacks.)"
5563 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5564 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5565 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5568 #: build/C/man2/mmap.2:193
5570 msgid "B<MAP_EXECUTABLE>"
5571 msgstr "B<MAP_EXECUTABLE>"
5573 #. Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5574 #. (Long ago, it signaled that the underlying file is an executable.
5575 #. However, that information was not really used anywhere.)
5576 #. Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5579 #: build/C/man2/mmap.2:201
5580 msgid "This flag is ignored."
5581 msgstr "このフラグは無視される。"
5584 #: build/C/man2/mmap.2:201
5587 msgstr "B<MAP_FILE>"
5589 #. On some systems, this was required as the opposite of
5590 #. MAP_ANONYMOUS -- mtk, 1 May 2007
5592 #: build/C/man2/mmap.2:207
5593 msgid "Compatibility flag. Ignored."
5594 msgstr "互換性のためのフラグ。無視される。"
5597 #: build/C/man2/mmap.2:207
5599 msgid "B<MAP_FIXED>"
5600 msgstr "B<MAP_FIXED>"
5603 #: build/C/man2/mmap.2:225
5605 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5606 "address. I<addr> must be a multiple of the page size. If the memory region "
5607 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5608 "then the overlapped part of the existing mapping(s) will be discarded. If "
5609 "the specified address cannot be used, B<mmap>() will fail. Because "
5610 "requiring a fixed address for a mapping is less portable, the use of this "
5611 "option is discouraged."
5613 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5614 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5615 "ければならない。 I<addr> と I<len> で指定されたメモリー領域が既存のマッピング"
5616 "のページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定"
5617 "されたアドレスが使用できない場合、 B<mmap>() は失敗する。 マッピングに対して"
5618 "固定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこ"
5622 #: build/C/man2/mmap.2:225
5624 msgid "B<MAP_GROWSDOWN>"
5625 msgstr "B<MAP_GROWSDOWN>"
5628 #: build/C/man2/mmap.2:230
5630 "Used for stacks. Indicates to the kernel virtual memory system that the "
5631 "mapping should extend downward in memory."
5633 "スタック用に使用される。マッピングをメモリー内で逆向きに行うことを カーネル仮"
5634 "想メモリーシステムに指示する。 (訳注:マッピングは通常はメモリーアドレスが増"
5635 "加する向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5638 #: build/C/man2/mmap.2:230
5640 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5641 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5644 #: build/C/man2/mmap.2:236
5646 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5647 "I<Documentation/vm/hugetlbpage.txt> for further information."
5649 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5650 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5653 #: build/C/man2/mmap.2:236
5655 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5656 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5658 #. If set, the mapped pages will not be swapped out.
5660 #: build/C/man2/mmap.2:242
5662 "Lock the pages of the mapped region into memory in the manner of "
5663 "B<mlock>(2). This flag is ignored in older kernels."
5665 "マップされた領域のページを B<mlock>(2) の方法でメモリー内にロックする。 それ"
5666 "以前のカーネルでは、このフラグは無視される。"
5669 #: build/C/man2/mmap.2:242
5671 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5672 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5675 #: build/C/man2/mmap.2:257
5677 "Only meaningful in conjunction with B<MAP_POPULATE>. Don't perform read-"
5678 "ahead: create page tables entries only for pages that are already present in "
5679 "RAM. Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing. "
5680 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5683 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5684 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5685 "テーブルエントリーを作成する。 Linux 2.6.23 以降では、このフラグは "
5686 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5687 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5690 #: build/C/man2/mmap.2:257
5692 msgid "B<MAP_NORESERVE>"
5693 msgstr "B<MAP_NORESERVE>"
5696 #: build/C/man2/mmap.2:272
5698 "Do not reserve swap space for this mapping. When swap space is reserved, "
5699 "one has the guarantee that it is possible to modify the mapping. When swap "
5700 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5701 "memory is available. See also the discussion of the file I</proc/sys/vm/"
5702 "overcommit_memory> in B<proc>(5). In kernels before 2.6, this flag had "
5703 "effect only for private writable mappings."
5705 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5706 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5707 "合、物理メモリーに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることが"
5708 "ある。 B<proc>(5) の I</proc/sys/vm/overcommit_memory> ファイルについての議"
5709 "論も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プ"
5710 "ライベートマッピングについてのみ効果があった。"
5713 #: build/C/man2/mmap.2:272
5715 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5716 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5719 #: build/C/man2/mmap.2:279
5721 "Populate (prefault) page tables for a mapping. For a file mapping, this "
5722 "causes read-ahead on the file. Later accesses to the mapping will not be "
5723 "blocked by page faults. B<MAP_POPULATE> is supported for private mappings "
5724 "only since Linux 2.6.23."
5726 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5727 "は、これによりファイルが先読み (read-ahead) が行われる。この以後は、マッピン"
5728 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5729 "2.6.23 以降でのみプライベートマッピングについて B<MAP_POPULATE> がサポートさ"
5733 #: build/C/man2/mmap.2:279
5735 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5736 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5738 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5739 #. commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5740 #. http://thread.gmane.org/gmane.linux.kernel/720412
5741 #. "pthread_create() slow for many threads; also time to revisit 64b
5742 #. context switch optimization?"
5744 #: build/C/man2/mmap.2:292
5746 "Allocate the mapping at an address suitable for a process or thread stack. "
5747 "This flag is currently a no-op, but is used in the glibc threading "
5748 "implementation so that if some architectures require special treatment for "
5749 "stack allocations, support can later be transparently implemented for glibc."
5751 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5752 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5753 "これは、いくつかのアーキテクチャーではスタックの割り当てに関して特別な扱い が"
5754 "必要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5758 #: build/C/man2/mmap.2:292
5760 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5761 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5764 #: build/C/man2/mmap.2:302
5766 "Don't clear anonymous pages. This flag is intended to improve performance "
5767 "on embedded devices. This flag is honored only if the kernel was configured "
5768 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option. Because of the security "
5769 "implications, that option is normally enabled only on embedded devices (i."
5770 "e., devices where one has complete control of the contents of user memory)."
5772 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5774 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5775 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5777 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5778 "ユーザーメモリーの内容を完全に制御化におけるデバイス) においてのみ有効にされ"
5782 #: build/C/man2/mmap.2:310
5784 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001. "
5785 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5788 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5789 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5790 "B<MAP_ANON>) もサポートされている。"
5793 #: build/C/man2/mmap.2:317
5795 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5796 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5798 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5799 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5802 #: build/C/man2/mmap.2:323
5804 "Memory mapped by B<mmap>() is preserved across B<fork>(2), with the same "
5807 "B<mmap>() によってマップされたメモリーの属性は B<fork>(2) の際に継承され"
5811 #: build/C/man2/mmap.2:331
5813 "A file is mapped in multiples of the page size. For a file that is not a "
5814 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5815 "writes to that region are not written out to the file. The effect of "
5816 "changing the size of the underlying file of a mapping on the pages that "
5817 "correspond to added or removed regions of the file is unspecified."
5819 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5820 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5821 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5822 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5823 "マップされたページに対してどのような影響があるかは規定されていない。"
5826 #: build/C/man2/mmap.2:331
5832 #: build/C/man2/mmap.2:341
5834 "The B<munmap>() system call deletes the mappings for the specified address "
5835 "range, and causes further references to addresses within the range to "
5836 "generate invalid memory references. The region is also automatically "
5837 "unmapped when the process is terminated. On the other hand, closing the "
5838 "file descriptor does not unmap the region."
5840 "システムコール B<munmap>() は指定されたアドレス範囲のマップを消去し、 これ以"
5841 "降のその範囲内へのメモリー参照は不正となる。 この領域は、プロセスが終了したと"
5842 "きにも自動的にアンマップされる。 一方、ファイルディスクリプターをクローズして"
5846 #: build/C/man2/mmap.2:351
5848 "The address I<addr> must be a multiple of the page size. All pages "
5849 "containing a part of the indicated range are unmapped, and subsequent "
5850 "references to these pages will generate B<SIGSEGV>. It is not an error if "
5851 "the indicated range does not contain any mapped pages."
5853 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5854 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5855 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5856 "ていない場合でも エラーにならない。"
5859 #: build/C/man2/mmap.2:351
5861 msgid "Timestamps changes for file-backed mappings"
5862 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5865 #: build/C/man2/mmap.2:358
5867 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5868 "updated at any time between the B<mmap>() and the corresponding unmapping; "
5869 "the first reference to a mapped page will update the field if it has not "
5872 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5873 "I<st_atime> フィールドは、 B<mmap>() されてからアンマップ (unmap) されるまで"
5874 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5875 "ページへの最初の参照があった 際に更新される。"
5878 #: build/C/man2/mmap.2:375
5880 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5881 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5882 "before a subsequent B<msync>(2) with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5885 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5886 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5887 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5888 "B<msync>(2) が呼ばれる前までに更新される。"
5891 #: build/C/man2/mmap.2:392
5893 "On success, B<mmap>() returns a pointer to the mapped area. On error, the "
5894 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, and I<errno> "
5895 "is set appropriately. On success, B<munmap>() returns 0, on failure -1, "
5896 "and I<errno> is set (probably to B<EINVAL>)."
5898 "B<mmap>() は成功するとマップされた領域へのポインターを返す。 失敗すると値 "
5899 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>) を返し、 I<errno> がエラーの内容に"
5900 "したがってセットされる。 B<munmap>() は成功すると 0 を返す。失敗すると -1 を"
5901 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5904 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5905 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5906 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5907 #: build/C/man2/shmop.2:188
5913 #: build/C/man2/mmap.2:411
5915 "A file descriptor refers to a non-regular file. Or a file mapping was "
5916 "requested, but I<fd> is not open for reading. Or B<MAP_SHARED> was "
5917 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5918 "(B<O_RDWR>) mode. Or B<PROT_WRITE> is set, but the file is append-only."
5920 "以下のいずれかの場合。 ファイルディスクリプターの参照先が通常のファイルではな"
5921 "い (non-regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用に"
5922 "オープンされていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが "
5923 "I<fd> は読み書きモード (B<O_RDWR>) でオープンされていない、 B<PROT_WRITE> を"
5924 "セットしたが、ファイルは追加 (append) 専用である。"
5927 #: build/C/man2/mmap.2:415
5929 "The file has been locked, or too much memory has been locked (see "
5932 "ファイルがロックされている。またはロックされているメモリーが多すぎる "
5933 "(B<setrlimit>(2) を参照)。"
5936 #: build/C/man2/mmap.2:421
5938 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5940 "I<fd> が有効なファイルディスクリプター (file descriptor) ではない (かつ "
5941 "B<MAP_ANONYMOUS> がセットされていない)。"
5944 #: build/C/man2/mmap.2:429
5946 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5947 "not aligned on a page boundary)."
5949 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5950 "ジ境界にアラインメントされていない)。"
5953 #: build/C/man2/mmap.2:434
5954 msgid "(since Linux 2.6.12) I<length> was 0."
5955 msgstr "(Linux 2.6.12 以降) I<length> が 0 であった。"
5958 #: build/C/man2/mmap.2:442
5960 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5961 "both of these values."
5963 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5967 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5968 #: build/C/man2/shmget.2:221 build/C/man2/memfd_create.2:149
5973 #. [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5975 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5976 msgid "The system limit on the total number of open files has been reached."
5977 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5980 #: build/C/man2/mmap.2:454
5982 "The underlying filesystem of the specified file does not support memory "
5985 "指定されたファイルが置かれているファイルシステムがメモリーマッピングをサポー"
5989 #: build/C/man2/mmap.2:458
5991 "No memory is available, or the process's maximum number of mappings would "
5992 "have been exceeded."
5994 "メモリーに空きがない、または処理中のプロセスのマッピング数が最大数を超過し"
5997 #. (Since 2.4.25 / 2.6.0.)
5999 #: build/C/man2/mmap.2:467
6001 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
6002 "file on a filesystem that was mounted no-exec."
6004 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
6005 "トされたファイルシステム上のファイルに マップ領域が対応している。"
6008 #: build/C/man2/mmap.2:477
6010 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
6013 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
6017 #: build/C/man2/mmap.2:477 build/C/man2/shmctl.2:348
6019 msgid "B<EOVERFLOW>"
6020 msgstr "B<EOVERFLOW>"
6023 #: build/C/man2/mmap.2:489
6025 "On 32-bit architecture together with the large file extension (i.e., using "
6026 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6027 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6029 "32 ビットアーキテクチャーで large file 拡張を使っている場合 (つまり 64 ビット"
6030 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6031 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6035 #: build/C/man2/mmap.2:491
6036 msgid "Use of a mapped region can result in these signals:"
6037 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6040 #: build/C/man2/mmap.2:491
6046 #: build/C/man2/mmap.2:494
6047 msgid "Attempted write into a region mapped as read-only."
6048 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6051 #: build/C/man2/mmap.2:494
6057 #: build/C/man2/mmap.2:499
6059 "Attempted access to a portion of the buffer that does not correspond to the "
6060 "file (for example, beyond the end of the file, including the case where "
6061 "another process has truncated the file)."
6063 "バッファーのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越"
6064 "えた部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれ"
6067 #. SVr4 documents additional error codes ENXIO and ENODEV.
6068 #. SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6070 #: build/C/man2/mmap.2:503
6071 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6072 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6074 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6075 #. -1: unavailable, 0: ask using sysconf().
6076 #. glibc defines it to 1.
6078 #: build/C/man2/mmap.2:517
6080 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>() are "
6081 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6082 "value greater than 0. (See also B<sysconf>(3).)"
6084 "B<mmap>(), B<msync>(2) B<munmap>() が利用可能な POSIX システムでは、 "
6085 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6086 "(B<sysconf>(3) も参照のこと)。"
6089 #: build/C/man2/mmap.2:530
6091 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6092 "B<PROT_READ>. It is architecture dependent whether B<PROT_READ> implies "
6093 "B<PROT_EXEC> or not. Portable programs should always set B<PROT_EXEC> if "
6094 "they intend to execute code in the new mapping."
6096 "(i386 などの) いくつかのアーキテクチャーでは、 B<PROT_WRITE> をセットすると、"
6097 "暗黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙"
6098 "のうちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャー依存である。 "
6099 "移植性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合"
6100 "は、常に B<PROT_EXEC> をセットすべきである。"
6103 #: build/C/man2/mmap.2:545
6105 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6106 "omit B<MAP_FIXED> from I<flags>. In this case, the system chooses the "
6107 "address for the mapping; the address is chosen so as not to conflict with "
6108 "any existing mapping, and will not be 0. If the B<MAP_FIXED> flag is "
6109 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6111 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6112 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6113 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6114 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6115 "I<addr> が 0 (NULL) の場合には、マップされるアドレスが 0 (NULL) になる。"
6118 #: build/C/man2/mmap.2:575
6120 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6121 "B<_SVID_SOURCE> is defined. (Requiring B<_GNU_SOURCE> also suffices, and "
6122 "requiring that macro specifically would have been more logical, since these "
6123 "flags are all Linux-specific.) The relevant flags are: B<MAP_32BIT>, "
6124 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6125 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6126 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6129 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6130 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6131 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6132 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6133 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6134 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6135 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6139 #: build/C/man2/mmap.2:575
6141 msgid "C library/kernel ABI differences"
6142 msgstr "C ライブラリとカーネル ABI の違い"
6144 #. Since around glibc 2.1/2.2, depending on the platform.
6146 #: build/C/man2/mmap.2:590
6148 "This page describes the interface provided by the glibc B<mmap>() wrapper "
6149 "function. Originally, this function invoked a system call of the same "
6150 "name. Since kernel 2.4, that system call has been superseded by "
6151 "B<mmap2>(2), and nowadays the glibc B<mmap>() wrapper function invokes "
6152 "B<mmap2>(2) with a suitably adjusted value for I<offset>."
6154 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6156 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6158 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6159 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6160 "B<mmap2>(2) を起動する。"
6163 #: build/C/man2/mmap.2:595
6165 "On Linux there are no guarantees like those suggested above under "
6166 "B<MAP_NORESERVE>. By default, any process can be killed at any moment when "
6167 "the system runs out of memory."
6169 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6170 "デフォルトでは、システムがメモリーを使い切った場合には、 どのプロセスがいつ強"
6171 "制終了されるか分からないからである。"
6174 #: build/C/man2/mmap.2:602
6176 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6177 "is specified as B<PROT_NONE>."
6179 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6180 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6183 #: build/C/man2/mmap.2:617
6185 "SUSv3 specifies that B<mmap>() should fail if I<length> is 0. However, in "
6186 "kernels before 2.6.12, B<mmap>() succeeded in this case: no mapping was "
6187 "created and the call returned I<addr>. Since kernel 2.6.12, B<mmap>() "
6188 "fails with the error B<EINVAL> for this case."
6190 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>() は失敗すると規定されている。"
6191 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>() は成功して"
6192 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6193 "では、 B<mmap>() はエラー B<EINVAL> で失敗する。"
6196 #: build/C/man2/mmap.2:633
6198 "POSIX specifies that the system shall always zero fill any partial page at "
6199 "the end of the object and that system will never write any modification of "
6200 "the object beyond its end. On Linux, when you write data to such partial "
6201 "page after the end of the object, the data stays in the page cache even "
6202 "after the file is closed and unmapped and even though the data is never "
6203 "written to the file itself, subsequent mappings may see the modified "
6204 "content. In some cases, this could be fixed by calling B<msync>(2) before "
6205 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6206 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6208 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6209 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6210 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6211 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6212 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6213 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6214 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6215 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6216 "共有メモリーインターフェースを使った場合)。"
6219 #: build/C/man2/mmap.2:645
6221 "The following program prints part of the file specified in its first command-"
6222 "line argument to standard output. The range of bytes to be printed is "
6223 "specified via offset and length values in the second and third command-line "
6224 "arguments. The program creates a memory mapping of the required pages of "
6225 "the file and then uses B<write>(2) to output the desired bytes."
6227 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6228 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6229 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6230 "必要なページのメモリー マッピングを作成し、 B<write>(2) を使って所望のバイト"
6234 #: build/C/man2/mmap.2:653
6237 "#include E<lt>sys/mman.hE<gt>\n"
6238 "#include E<lt>sys/stat.hE<gt>\n"
6239 "#include E<lt>fcntl.hE<gt>\n"
6240 "#include E<lt>stdio.hE<gt>\n"
6241 "#include E<lt>stdlib.hE<gt>\n"
6242 "#include E<lt>unistd.hE<gt>\n"
6244 "#include E<lt>sys/mman.hE<gt>\n"
6245 "#include E<lt>sys/stat.hE<gt>\n"
6246 "#include E<lt>fcntl.hE<gt>\n"
6247 "#include E<lt>stdio.hE<gt>\n"
6248 "#include E<lt>stdlib.hE<gt>\n"
6249 "#include E<lt>unistd.hE<gt>\n"
6252 #: build/C/man2/mmap.2:656 build/C/man2/mprotect.2:177
6255 "#define handle_error(msg) \\e\n"
6256 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6258 "#define handle_error(msg) \\e\n"
6259 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6262 #: build/C/man2/mmap.2:666
6266 "main(int argc, char *argv[])\n"
6270 " struct stat sb;\n"
6271 " off_t offset, pa_offset;\n"
6276 "main(int argc, char *argv[])\n"
6280 " struct stat sb;\n"
6281 " off_t offset, pa_offset;\n"
6286 #: build/C/man2/mmap.2:671
6289 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
6290 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6291 " exit(EXIT_FAILURE);\n"
6294 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
6295 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6296 " exit(EXIT_FAILURE);\n"
6300 #: build/C/man2/mmap.2:675
6303 " fd = open(argv[1], O_RDONLY);\n"
6305 " handle_error(\"open\");\n"
6307 " fd = open(argv[1], O_RDONLY);\n"
6309 " handle_error(\"open\");\n"
6312 #: build/C/man2/mmap.2:678
6315 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
6316 " handle_error(\"fstat\");\n"
6318 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
6319 " handle_error(\"fstat\");\n"
6322 #: build/C/man2/mmap.2:682
6325 " offset = atoi(argv[2]);\n"
6326 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6327 " /* offset for mmap() must be page aligned */\n"
6329 " offset = atoi(argv[2]);\n"
6330 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6331 " /* offset for mmap() must be page aligned */\n"
6334 #: build/C/man2/mmap.2:687
6337 " if (offset E<gt>= sb.st_size) {\n"
6338 " fprintf(stderr, \"offset is past end of file\\en\");\n"
6339 " exit(EXIT_FAILURE);\n"
6342 " if (offset E<gt>= sb.st_size) {\n"
6343 " fprintf(stderr, \"offset is past end of file\\en\");\n"
6344 " exit(EXIT_FAILURE);\n"
6348 #: build/C/man2/mmap.2:693
6351 " if (argc == 4) {\n"
6352 " length = atoi(argv[3]);\n"
6353 " if (offset + length E<gt> sb.st_size)\n"
6354 " length = sb.st_size - offset;\n"
6355 " /* Can\\(aqt display bytes past end of file */\n"
6357 " if (argc == 4) {\n"
6358 " length = atoi(argv[3]);\n"
6359 " if (offset + length E<gt> sb.st_size)\n"
6360 " length = sb.st_size - offset;\n"
6361 " /* Can\\(aqt display bytes past end of file */\n"
6364 #: build/C/man2/mmap.2:697
6367 " } else { /* No length arg ==E<gt> display to end of file */\n"
6368 " length = sb.st_size - offset;\n"
6371 " } else { /* No length arg ==E<gt> display to end of file */\n"
6372 " length = sb.st_size - offset;\n"
6376 #: build/C/man2/mmap.2:702
6379 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6380 " MAP_PRIVATE, fd, pa_offset);\n"
6381 " if (addr == MAP_FAILED)\n"
6382 " handle_error(\"mmap\");\n"
6384 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6385 " MAP_PRIVATE, fd, pa_offset);\n"
6386 " if (addr == MAP_FAILED)\n"
6387 " handle_error(\"mmap\");\n"
6390 #: build/C/man2/mmap.2:707
6393 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6394 " if (s != length) {\n"
6396 " handle_error(\"write\");\n"
6398 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6399 " if (s != length) {\n"
6401 " handle_error(\"write\");\n"
6404 #: build/C/man2/mmap.2:711
6407 " fprintf(stderr, \"partial write\");\n"
6408 " exit(EXIT_FAILURE);\n"
6411 " fprintf(stderr, \"partial write\");\n"
6412 " exit(EXIT_FAILURE);\n"
6416 #: build/C/man2/mmap.2:729
6418 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6419 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6420 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6421 "B<shm_overview>(7)"
6423 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6424 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6425 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6426 "B<shm_overview>(7)"
6429 #: build/C/man2/mmap.2:736
6431 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6432 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6434 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6438 #: build/C/man2/mmap.2:741 build/C/man2/msync.2:151
6439 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6440 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6443 #: build/C/man2/mmap2.2:29
6449 #: build/C/man2/mmap2.2:29
6455 #: build/C/man2/mmap2.2:32
6456 msgid "mmap2 - map files or devices into memory"
6457 msgstr "mmap2 - ファイルやデバイスをメモリーにマップする"
6460 #: build/C/man2/mmap2.2:38
6463 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6464 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6466 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6467 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6470 #: build/C/man2/mmap2.2:43
6472 "This is probably not the system call that you are interested in; instead, "
6473 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6476 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6477 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6482 #: build/C/man2/mmap2.2:54
6484 "The B<mmap2>() system call provides the same interface as B<mmap>(2), "
6485 "except that the final argument specifies the offset into the file in 4096-"
6486 "byte units (instead of bytes, as is done by B<mmap>(2)). This enables "
6487 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6490 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6492 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6494 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6495 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6500 #: build/C/man2/mmap2.2:61
6502 "On success, B<mmap2>() returns a pointer to the mapped area. On error, -1 "
6503 "is returned and I<errno> is set appropriately."
6505 "成功した場合、 B<mmap2>() はマップされた領域へのポインターを返す。 エラーの"
6506 "場合は -1 が返されて、 I<errno> が適切に設定される。"
6509 #: build/C/man2/mmap2.2:65
6510 msgid "Problem with getting the data from user space."
6511 msgstr "ユーザー空間からデータを取得するときに問題があった。"
6514 #: build/C/man2/mmap2.2:70
6516 "(Various platforms where the page size is not 4096 bytes.) I<offset\\ *\\ "
6517 "4096> is not a multiple of the system page size."
6519 "(ページサイズが 4096 バイトでないプラットフォームにおいて) I<offset\\ *\\ "
6520 "4096> がシステムのページサイズの倍数ではない。"
6523 #: build/C/man2/mmap2.2:74
6524 msgid "B<mmap2>() can also return any of the errors described in B<mmap>(2)."
6525 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6528 #: build/C/man2/mmap2.2:77
6529 msgid "B<mmap2>() is available since Linux 2.3.31."
6530 msgstr "B<mmap2>() は、Linux 2.3.31 以降で使用可能である。"
6533 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6534 msgid "This system call is Linux-specific."
6535 msgstr "このシステムコールは Linux 独自である。"
6538 #: build/C/man2/mmap2.2:86
6540 "On architectures where this system call is present, the glibc B<mmap>() "
6541 "wrapper function invokes this system call rather than the B<mmap>(2) system "
6544 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>() のラッ"
6545 "パー関数は、 B<mmap>(2) システムコールではなく、このシステムコール "
6546 "(B<mmap2>(2)) を起動する。"
6549 #: build/C/man2/mmap2.2:88
6550 msgid "This system call does not exist on x86-64."
6551 msgstr "このシステムコールは x86-64 には存在しない。"
6553 #. ia64 can have page sizes ranging from 4kB to 64kB.
6554 #. On cris, it looks like the unit might also be the page size,
6555 #. which is 8192 bytes. -- mtk, June 2007
6557 #: build/C/man2/mmap2.2:95
6559 "On ia64, the unit for I<offset> is actually the system page size, rather "
6562 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6566 #: build/C/man2/mmap2.2:101
6568 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6570 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6573 #: build/C/man2/mprotect.2:39
6579 #: build/C/man2/mprotect.2:39
6585 #: build/C/man2/mprotect.2:42
6586 msgid "mprotect - set protection on a region of memory"
6587 msgstr "mprotect - メモリー領域の保護を設定する"
6590 #: build/C/man2/mprotect.2:47
6592 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6593 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6596 #: build/C/man2/mprotect.2:55
6598 "B<mprotect>() changes protection for the calling process's memory page(s) "
6599 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6600 "+I<len>-1]. I<addr> must be aligned to a page boundary."
6602 "B<mprotect>() は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6603 "び出し元のプロセスのメモリーページのアクセス保護を変更する。 I<addr> はページ"
6607 #: build/C/man2/mprotect.2:60
6609 "If the calling process tries to access memory in a manner that violates the "
6610 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6612 "呼び出し元のプロセスがアクセス保護に違反するようなメモリーアクセスを 行おうと"
6613 "すると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6616 #: build/C/man2/mprotect.2:65
6618 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6621 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6622 "毎の論理和 (bitwize-or) で指定する:"
6625 #: build/C/man2/mprotect.2:68
6626 msgid "The memory cannot be accessed at all."
6627 msgstr "そのメモリーには全くアクセスできない。"
6630 #: build/C/man2/mprotect.2:71
6631 msgid "The memory can be read."
6632 msgstr "そのメモリーを読み取ることができる。"
6635 #: build/C/man2/mprotect.2:74
6636 msgid "The memory can be modified."
6637 msgstr "そのメモリーを変更できる。"
6640 #: build/C/man2/mprotect.2:77
6641 msgid "The memory can be executed."
6642 msgstr "そのメモリーは実行可能である。"
6645 #: build/C/man2/mprotect.2:84
6647 "On success, B<mprotect>() returns zero. On error, -1 is returned, and "
6648 "I<errno> is set appropriately."
6650 "成功した場合、 B<mprotect>() は 0 を返す。エラーの場合は -1 が返り、 "
6651 "I<errno> が適切に設定される。"
6654 #: build/C/man2/mprotect.2:94
6656 "The memory cannot be given the specified access. This can happen, for "
6657 "example, if you B<mmap>(2) a file to which you have read-only access, then "
6658 "ask B<mprotect>() to mark it B<PROT_WRITE>."
6660 "指定されたアクセスをメモリーに設定することができない。 これは、例えば ファイ"
6661 "ルを読み取り専用で B<mmap>(2) しており、その領域に対して B<mprotect>() を呼"
6662 "び出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6664 #. Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6666 #: build/C/man2/mprotect.2:99
6668 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6670 "I<addr> が有効なポインターでないか、 システムのページサイズの倍数でない。"
6673 #: build/C/man2/mprotect.2:102
6674 msgid "Internal kernel structures could not be allocated."
6675 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6678 #: build/C/man2/mprotect.2:112
6680 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6681 "address space of the process, or specify one or more pages that are not "
6682 "mapped. (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6685 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6686 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6687 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6690 #. SVr4 defines an additional error
6691 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6693 #: build/C/man2/mprotect.2:121
6695 "SVr4, POSIX.1-2001. POSIX says that the behavior of B<mprotect>() is "
6696 "unspecified if it is applied to a region of memory that was not obtained via "
6699 "SVr4, POSIX.1-2001. POSIX では、 B<mmap>(2) 経由で獲得していないメモリー領"
6700 "域に対して B<mprotect>() を行った場合の B<mprotect>() の動作は未定義である"
6704 #: build/C/man2/mprotect.2:128
6706 "On Linux it is always permissible to call B<mprotect>() on any address in a "
6707 "process's address space (except for the kernel vsyscall area). In "
6708 "particular it can be used to change existing code mappings to be writable."
6710 "Linux では、(カーネル vsyscall 領域以外の) 任意のプロセスアドレス空間に対し"
6711 "て B<mprotect>() を呼び出すことが、常に許されている。 これは特に既存のコード"
6712 "マッピングを書き込み可能にするために使われる。"
6715 #: build/C/man2/mprotect.2:138
6717 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6718 "architecture- and kernel version-dependent. On some hardware architectures "
6719 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6721 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャーと"
6722 "カーネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャーで"
6723 "は、 B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6726 #: build/C/man2/mprotect.2:147
6728 "POSIX.1-2001 says that an implementation may permit access other than that "
6729 "specified in I<prot>, but at a minimum can allow write access only if "
6730 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6733 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6734 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6735 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6739 #: build/C/man2/mprotect.2:153
6741 "The program below allocates four pages of memory, makes the third of these "
6742 "pages read-only, and then executes a loop that walks upward through the "
6743 "allocated region modifying bytes."
6745 "以下のプログラムは、メモリーページを 4つ確保し、そのうち 3番目のページを 読み"
6746 "込み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に"
6747 "向かって順番にバイト値を変更するループを実行する。"
6750 #: build/C/man2/mprotect.2:156
6752 "An example of what we might see when running the program is the following:"
6753 msgstr "プログラムを実行した場合の一例を以下に示す。"
6756 #: build/C/man2/mprotect.2:162
6760 "Start of region: 0x804c000\n"
6761 "Got SIGSEGV at address: 0x804e000\n"
6764 "Start of region: 0x804c000\n"
6765 "Got SIGSEGV at address: 0x804e000\n"
6768 #: build/C/man2/mprotect.2:174
6771 "#include E<lt>unistd.hE<gt>\n"
6772 "#include E<lt>signal.hE<gt>\n"
6773 "#include E<lt>stdio.hE<gt>\n"
6774 "#include E<lt>malloc.hE<gt>\n"
6775 "#include E<lt>stdlib.hE<gt>\n"
6776 "#include E<lt>errno.hE<gt>\n"
6777 "#include E<lt>sys/mman.hE<gt>\n"
6779 "#include E<lt>unistd.hE<gt>\n"
6780 "#include E<lt>signal.hE<gt>\n"
6781 "#include E<lt>stdio.hE<gt>\n"
6782 "#include E<lt>malloc.hE<gt>\n"
6783 "#include E<lt>stdlib.hE<gt>\n"
6784 "#include E<lt>errno.hE<gt>\n"
6785 "#include E<lt>sys/mman.hE<gt>\n"
6788 #: build/C/man2/mprotect.2:179
6790 msgid "static char *buffer;\n"
6791 msgstr "static char *buffer;\n"
6794 #: build/C/man2/mprotect.2:187
6798 "handler(int sig, siginfo_t *si, void *unused)\n"
6800 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6801 " (long) si-E<gt>si_addr);\n"
6802 " exit(EXIT_FAILURE);\n"
6806 "handler(int sig, siginfo_t *si, void *unused)\n"
6808 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6809 " (long) si-E<gt>si_addr);\n"
6810 " exit(EXIT_FAILURE);\n"
6814 #: build/C/man2/mprotect.2:194
6818 "main(int argc, char *argv[])\n"
6822 " struct sigaction sa;\n"
6829 " struct sigaction sa;\n"
6832 #: build/C/man2/mprotect.2:200
6835 " sa.sa_flags = SA_SIGINFO;\n"
6836 " sigemptyset(&sa.sa_mask);\n"
6837 " sa.sa_sigaction = handler;\n"
6838 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6839 " handle_error(\"sigaction\");\n"
6841 " sa.sa_flags = SA_SIGINFO;\n"
6842 " sigemptyset(&sa.sa_mask);\n"
6843 " sa.sa_sigaction = handler;\n"
6844 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6845 " handle_error(\"sigaction\");\n"
6848 #: build/C/man2/mprotect.2:204
6851 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
6852 " if (pagesize == -1)\n"
6853 " handle_error(\"sysconf\");\n"
6855 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
6856 " if (pagesize == -1)\n"
6857 " handle_error(\"sysconf\");\n"
6860 #: build/C/man2/mprotect.2:207
6863 " /* Allocate a buffer aligned on a page boundary;\n"
6864 " initial protection is PROT_READ | PROT_WRITE */\n"
6866 " /* Allocate a buffer aligned on a page boundary;\n"
6867 " initial protection is PROT_READ | PROT_WRITE */\n"
6870 #: build/C/man2/mprotect.2:211
6873 " buffer = memalign(pagesize, 4 * pagesize);\n"
6874 " if (buffer == NULL)\n"
6875 " handle_error(\"memalign\");\n"
6877 " buffer = memalign(pagesize, 4 * pagesize);\n"
6878 " if (buffer == NULL)\n"
6879 " handle_error(\"memalign\");\n"
6882 #: build/C/man2/mprotect.2:213
6884 msgid " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
6885 msgstr " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
6888 #: build/C/man2/mprotect.2:217
6891 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
6892 " PROT_READ) == -1)\n"
6893 " handle_error(\"mprotect\");\n"
6895 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
6896 " PROT_READ) == -1)\n"
6897 " handle_error(\"mprotect\");\n"
6900 #: build/C/man2/mprotect.2:220
6903 " for (p = buffer ; ; )\n"
6904 " *(p++) = \\(aqa\\(aq;\n"
6906 " for (p = buffer ; ; )\n"
6907 " *(p++) = \\(aqa\\(aq;\n"
6910 #: build/C/man2/mprotect.2:224
6913 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
6914 " exit(EXIT_SUCCESS);\n"
6917 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
6918 " exit(EXIT_SUCCESS);\n"
6922 #: build/C/man2/mprotect.2:228
6923 msgid "B<mmap>(2), B<sysconf>(3)"
6924 msgstr "B<mmap>(2), B<sysconf>(3)"
6927 #: build/C/man2/mremap.2:30
6933 #: build/C/man2/mremap.2:30
6939 #: build/C/man2/mremap.2:33
6940 msgid "mremap - remap a virtual memory address"
6941 msgstr "mremap - 仮想メモリーアドレスを再マッピングする"
6944 #: build/C/man2/mremap.2:36
6946 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
6947 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
6950 #: build/C/man2/mremap.2:41
6953 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6954 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6956 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6957 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6960 #: build/C/man2/mremap.2:47
6962 "B<mremap>() expands (or shrinks) an existing memory mapping, potentially "
6963 "moving it at the same time (controlled by the I<flags> argument and the "
6964 "available virtual address space)."
6966 "B<mremap>() は既存のメモリーマッピングの拡張 (または縮小) を行う。 同時に移"
6967 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6971 #: build/C/man2/mremap.2:61
6973 "I<old_address> is the old address of the virtual memory block that you want "
6974 "to expand (or shrink). Note that I<old_address> has to be page aligned. "
6975 "I<old_size> is the old size of the virtual memory block. I<new_size> is the "
6976 "requested size of the virtual memory block after the resize. An optional "
6977 "fifth argument, I<new_address>, may be provided; see the description of "
6978 "B<MREMAP_FIXED> below."
6980 "I<old_address> は拡張 (または縮小) しようとする仮想メモリーブロック の元のア"
6981 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6982 "すること。I<old_size> は元の仮想メモリーブロックの サイズである。 "
6983 "I<new_size> は要求する変更後の仮想メモリーブロックのサイズである。 5 番目の引"
6984 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6988 #: build/C/man2/mremap.2:73
6990 "In Linux the memory is divided into pages. A user process has (one or) "
6991 "several linear virtual memory segments. Each virtual memory segment has one "
6992 "or more mappings to real memory pages (in the page table). Each virtual "
6993 "memory segment has its own protection (access rights), which may cause a "
6994 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6995 "to a read-only segment). Accessing virtual memory outside of the segments "
6996 "will also cause a segmentation violation."
6998 "Linux ではメモリーはページに分割される。ユーザープロセスは (一つまたは) 複数"
6999 "のリニアな仮想メモリーセグメントを持つ。 それぞれの仮想メモリーセグメントは一"
7000 "つ以上の実メモリーページ にマッピングされている (マッピング情報はページテーブ"
7001 "ルで管理される)。 仮想メモリーセグメントにはセグメント毎の保護 (アクセス権) "
7002 "が設定されており、 メモリーが不正にアクセスされた場合 (例えば読み込み専用のセ"
7003 "グメントに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) "
7004 "を 引き起こす。また、セグメント外の仮想メモリーにアクセスした場合にも セグメ"
7008 #: build/C/man2/mremap.2:81
7010 "B<mremap>() uses the Linux page table scheme. B<mremap>() changes the "
7011 "mapping between virtual addresses and memory pages. This can be used to "
7012 "implement a very efficient B<realloc>(3)."
7014 "B<mremap>() は Linux のページテーブル方式を使用する。 B<mremap>() は仮想ア"
7015 "ドレスとメモリーページのマッピングを変更する。これは非常に効率的な "
7016 "B<realloc>(3) を実装するのに使用されている。"
7019 #: build/C/man2/mremap.2:83
7020 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7021 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7024 #: build/C/man2/mremap.2:83
7026 msgid "B<MREMAP_MAYMOVE>"
7027 msgstr "B<MREMAP_MAYMOVE>"
7030 #: build/C/man2/mremap.2:95
7032 "By default, if there is not sufficient space to expand a mapping at its "
7033 "current location, then B<mremap>() fails. If this flag is specified, then "
7034 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7035 "necessary. If the mapping is relocated, then absolute pointers into the old "
7036 "mapping location become invalid (offsets relative to the starting address of "
7037 "the mapping should be employed)."
7039 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7040 "B<mremap>() は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7041 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7042 "れると、古いマッピング位置への絶対ポインターは 無効になる (マッピングの開始ア"
7043 "ドレスからの相対オフセットは有効のままである)。"
7046 #: build/C/man2/mremap.2:95
7048 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7049 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7052 #: build/C/man2/mremap.2:117
7054 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2). "
7055 "If this flag is specified, then B<mremap>() accepts a fifth argument, I<void"
7056 "\\ *new_address>, which specifies a page-aligned address to which the "
7057 "mapping must be moved. Any previous mapping at the address range specified "
7058 "by I<new_address> and I<new_size> is unmapped. If B<MREMAP_FIXED> is "
7059 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7061 "このフラグは B<mmap>(2) の B<MAP_FIXED> フラグと似たような目的で用いられ"
7062 "る。 このフラグが指定されると、 B<mremap>() は 5 番目の引き数 I<void\\ "
7063 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7064 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7065 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7066 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7067 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7070 #: build/C/man2/mremap.2:127
7072 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7073 "(using B<mlock>(2) or similar), then this lock is maintained when the "
7074 "segment is resized and/or relocated. As a consequence, the amount of memory "
7075 "locked by the process may change."
7077 "I<old_address> と I<old_size> で指定されるメモリーセグメントが (B<mlock>(2) "
7078 "や同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置さ"
7079 "れたりした時にロックも維持される。 その結果、プロセスによってロックされるメモ"
7083 #: build/C/man2/mremap.2:135
7085 "On success B<mremap>() returns a pointer to the new virtual memory area. "
7086 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7087 "and I<errno> is set appropriately."
7089 "成功した場合は B<mremap>() は新しい仮想メモリー領域へのポインターを返す。 エ"
7090 "ラーの場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> "
7094 #: build/C/man2/mremap.2:142
7096 "The caller tried to expand a memory segment that is locked, but this was not "
7097 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7099 "呼び出し元がロックされているメモリーセグメントを拡張しようとしたが、 "
7100 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7103 #: build/C/man2/mremap.2:151
7105 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7106 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7107 "process. You can also get B<EFAULT> even if there exist mappings that cover "
7108 "the whole address space requested, but those mappings are of different types."
7110 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7111 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7112 "正な仮想メモリーアドレスである。 たとえ要求したアドレス空間全体を含むような"
7113 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7117 #: build/C/man2/mremap.2:179
7119 "An invalid argument was given. Possible causes are: I<old_address> was not "
7120 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7121 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7122 "was invalid; or the new address range specified by I<new_address> and "
7123 "I<new_size> overlapped the old address range specified by I<old_address> and "
7124 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7125 "B<MREMAP_MAYMOVE>."
7127 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7128 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7129 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7130 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7131 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7132 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7136 #: build/C/man2/mremap.2:185
7138 "The memory area cannot be expanded at the current virtual address, and the "
7139 "B<MREMAP_MAYMOVE> flag is not set in I<flags>. Or, there is not enough "
7140 "(virtual) memory available."
7142 "現在の仮想アドレスではメモリー領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7143 "I<flags> に設定されていない。 または十分な (仮想) メモリーが存在しない。"
7145 #. 4.2BSD had a (never actually implemented)
7147 #. call with completely different semantics.
7149 #: build/C/man2/mremap.2:191
7151 "This call is Linux-specific, and should not be used in programs intended to "
7154 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7158 #: build/C/man2/mremap.2:199
7160 "Prior to version 2.4, glibc did not expose the definition of "
7161 "B<MREMAP_FIXED>, and the prototype for B<mremap>() did not allow for the "
7162 "I<new_address> argument."
7164 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7165 "ず、 B<mremap>() のプロトタイプは I<new_address> 引き数を取らなかった。"
7168 #: build/C/man2/mremap.2:208
7170 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7171 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7173 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7174 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7177 #: build/C/man2/mremap.2:214
7179 "Your favorite text book on operating systems for more information on paged "
7180 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7181 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7184 "ページ分割されたメモリーについてもっと詳しく知りたいならば、あなたのお気に入"
7185 "りのオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7186 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7187 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7190 #: build/C/man2/msync.2:25
7196 #: build/C/man2/msync.2:25
7202 #: build/C/man2/msync.2:28
7203 msgid "msync - synchronize a file with a memory map"
7204 msgstr "msync - ファイルをマップしたメモリーと同期させる"
7207 #: build/C/man2/msync.2:32
7208 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7209 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7212 #: build/C/man2/msync.2:48
7214 "B<msync>() flushes changes made to the in-core copy of a file that was "
7215 "mapped into memory using B<mmap>(2) back to the filesystem. Without use of "
7216 "this call there is no guarantee that changes are written back before "
7217 "B<munmap>(2) is called. To be more precise, the part of the file that "
7218 "corresponds to the memory area starting at I<addr> and having length "
7219 "I<length> is updated."
7221 "B<msync>() は B<mmap>(2) を使ってメモリーにマップされたファイルの、 メモ"
7222 "リー上のコピーになされた変更をファイルシステムに反映させる。 この関数を使用し"
7223 "ないと、 B<munmap>(2) が呼び出されるまで変更が書き戻される保証はない。 より"
7224 "正確には、ファイルのうち I<addr> から始まり長さ I<length> のメモリー領域に対"
7228 #: build/C/man2/msync.2:68
7230 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7231 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>. B<MS_ASYNC> "
7232 "specifies that an update be scheduled, but the call returns immediately. "
7233 "B<MS_SYNC> asks for an update and waits for it to complete. "
7234 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7235 "they can be updated with the fresh values just written)."
7237 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7238 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7239 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7240 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7241 "た今書き込んだ新しい値でマッピングを更新することができるように) 同じファイル"
7242 "に対する他のマッピングを無効にすることを要求する。"
7245 #: build/C/man2/msync.2:73
7247 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
7250 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7254 #: build/C/man2/msync.2:74
7260 #: build/C/man2/msync.2:80
7262 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7263 "specified address range."
7265 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7269 #: build/C/man2/msync.2:93
7271 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7272 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7273 "B<MS_ASYNC> are set in I<flags>."
7275 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7276 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7277 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7280 #: build/C/man2/msync.2:96
7281 msgid "The indicated memory (or part of it) was not mapped."
7282 msgstr "指定されたメモリー (またはその一部) がマップされていない。"
7285 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7286 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7287 msgid "POSIX.1-2001."
7288 msgstr "POSIX.1-2001."
7291 #: build/C/man2/msync.2:105
7293 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7294 "B<ENOMEM>. In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7296 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7297 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7299 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7300 #. -1: unavailable, 0: ask using sysconf().
7301 #. glibc defines them to 1.
7303 #: build/C/man2/msync.2:120
7305 "On POSIX systems on which B<msync>() is available, both "
7306 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7307 "I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
7309 "B<msync>() が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7310 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7311 "定義される。 (B<sysconf>(3) を参照すること。 )"
7313 #. commit 204ec841fbea3e5138168edbc3a76d46747cc987
7315 #: build/C/man2/msync.2:147
7317 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7318 "I<flags>, and indeed failure to include one of these flags will cause "
7319 "B<msync>() to fail on some systems. However, Linux permits a call to "
7320 "B<msync>() that specifies neither of these flags, with semantics that are "
7321 "(currently) equivalent to specifying B<MS_ASYNC>. (Since Linux 2.6.19, "
7322 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7323 "and flushes them to storage as necessary.) Notwithstanding the Linux "
7324 "behavior, portable, future-proof applications should ensure that they "
7325 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7327 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7328 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7329 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7330 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7331 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7332 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7333 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7334 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7335 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7339 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7345 #: build/C/man3/mtrace.3:25
7351 #: build/C/man3/mtrace.3:25
7357 #: build/C/man3/mtrace.3:28
7358 msgid "mtrace, muntrace - malloc tracing"
7359 msgstr "mtrace, muntrace - malloc のトレース"
7362 #: build/C/man3/mtrace.3:30
7363 msgid "B<#include E<lt>mcheck.hE<gt>>"
7364 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7367 #: build/C/man3/mtrace.3:32
7368 msgid "B<void mtrace(void);>"
7369 msgstr "B<void mtrace(void);>"
7372 #: build/C/man3/mtrace.3:34
7373 msgid "B<void muntrace(void);>"
7374 msgstr "B<void muntrace(void);>"
7377 #: build/C/man3/mtrace.3:46
7379 "The B<mtrace>() function installs hook functions for the memory-allocation "
7380 "functions (B<malloc>(3), B<realloc>(3) B<memalign>(3), B<free>(3)). These "
7381 "hook functions record tracing information about memory allocation and "
7382 "deallocation. The tracing information can be used to discover memory leaks "
7383 "and attempts to free nonallocated memory in a program."
7387 #: build/C/man3/mtrace.3:57
7389 "The B<muntrace>() function disables the hook functions installed by "
7390 "B<mtrace>(), so that tracing information is no longer recorded for the "
7391 "memory-allocation functions. If no hook functions were successfully "
7392 "installed by B<mtrace>(), B<muntrace>() does nothing."
7396 #: build/C/man3/mtrace.3:65
7398 "When B<mtrace>() is called, it checks the value of the environment variable "
7399 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7400 "tracing information is to be recorded. If the pathname is successfully "
7401 "opened, it is truncated to zero length."
7405 #: build/C/man3/mtrace.3:78
7407 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7408 "not writable, then no hook functions are installed, and B<mtrace>() has no "
7409 "effect. In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7410 "ignored, and B<mtrace>() has no effect."
7414 #: build/C/man3/mtrace.3:86
7416 "In normal usage, B<mtrace>() is called once at the start of execution of a "
7417 "program, and B<muntrace>() is never called."
7421 #: build/C/man3/mtrace.3:96
7423 "The tracing output produced after a call to B<mtrace>() is textual, but not "
7424 "designed to be human readable. The GNU C library provides a Perl script, "
7425 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7426 "output. For best results, the traced program should be compiled with "
7427 "debugging enabled, so that line-number information is recorded in the "
7432 #: build/C/man3/mtrace.3:102
7434 "The tracing performed by B<mtrace>() incurs a performance penalty (if "
7435 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7439 #: build/C/man3/mtrace.3:108
7441 "The line-number information produced by B<mtrace>(1) is not always precise: "
7442 "the line number references may refer to the previous or following "
7443 "(nonblank) line of the source code."
7447 #: build/C/man3/mtrace.3:115
7449 "The shell session below demonstrates the use of the B<mtrace>() function "
7450 "and the B<mtrace>(1) command in a program that has memory leaks at two "
7451 "different locations. The demonstration uses the following program:"
7455 #: build/C/man3/mtrace.3:122
7458 "$ B<cat t_mtrace.c>\n"
7459 "#include E<lt>mcheck.hE<gt>\n"
7460 "#include E<lt>stdlib.hE<gt>\n"
7461 "#include E<lt>stdio.hE<gt>\n"
7463 "$ B<cat t_mtrace.c>\n"
7464 "#include E<lt>mcheck.hE<gt>\n"
7465 "#include E<lt>stdlib.hE<gt>\n"
7466 "#include E<lt>stdio.hE<gt>\n"
7469 #: build/C/man3/mtrace.3:127
7473 "main(int argc, char *argv[])\n"
7478 "main(int argc, char *argv[])\n"
7483 #: build/C/man3/mtrace.3:129
7485 msgid " mtrace();\n"
7486 msgstr " mtrace();\n"
7489 #: build/C/man3/mtrace.3:132
7492 " for (j = 0; j E<lt> 2; j++)\n"
7493 " malloc(100); /* Never freed--a memory leak */\n"
7495 " for (j = 0; j E<lt> 2; j++)\n"
7496 " malloc(100); /* Never freed--a memory leak */\n"
7499 #: build/C/man3/mtrace.3:136
7502 " calloc(16, 16); /* Never freed--a memory leak */\n"
7503 " exit(EXIT_SUCCESS);\n"
7506 " calloc(16, 16); /* Never freed--a memory leak */\n"
7507 " exit(EXIT_SUCCESS);\n"
7511 #: build/C/man3/mtrace.3:142
7513 "When we run the program as follows, we see that B<mtrace>() diagnosed "
7514 "memory leaks at two different locations in the program:"
7518 #: build/C/man3/mtrace.3:155
7521 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7522 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7524 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7525 "Memory not freed:\n"
7526 "-----------------\n"
7527 " Address Size Caller\n"
7528 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
7529 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
7530 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
7532 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7533 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7535 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7536 "Memory not freed:\n"
7537 "-----------------\n"
7538 " Address Size Caller\n"
7539 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
7540 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
7541 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
7544 #: build/C/man3/mtrace.3:167
7546 "The first two messages about unfreed memory correspond to the two "
7547 "B<malloc>(3) calls inside the I<for> loop. The final message corresponds "
7548 "to the call to B<calloc>(3) (which in turn calls B<malloc>(3))."
7552 #: build/C/man3/mtrace.3:172
7553 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7554 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7557 #: build/C/man2/posix_fadvise.2:28
7559 msgid "POSIX_FADVISE"
7560 msgstr "POSIX_FADVISE"
7563 #: build/C/man2/posix_fadvise.2:31
7564 msgid "posix_fadvise - predeclare an access pattern for file data"
7565 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7568 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7570 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7571 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7574 #: build/C/man2/posix_fadvise.2:37
7576 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7577 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7580 #: build/C/man2/posix_fadvise.2:46
7581 msgid "B<posix_fadvise>():"
7582 msgstr "B<posix_fadvise>():"
7585 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7586 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7587 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7590 #: build/C/man2/posix_fadvise.2:56
7592 "Programs can use B<posix_fadvise>() to announce an intention to access file "
7593 "data in a specific pattern in the future, thus allowing the kernel to "
7594 "perform appropriate optimizations."
7596 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7597 "めに B<posix_fadvise>() を使うことができる。 これにより、カーネルが適切な最"
7601 #: build/C/man2/posix_fadvise.2:63
7603 "The I<advice> applies to a (not necessarily existent) region starting at "
7604 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7605 "I<len> is 0) within the file referred to by I<fd>. The I<advice> is not "
7606 "binding; it merely constitutes an expectation on behalf of the application."
7608 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7610 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7611 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7613 "ションのために可能性を構成するだけである。"
7616 #: build/C/man2/posix_fadvise.2:65
7617 msgid "Permissible values for I<advice> include:"
7618 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7621 #: build/C/man2/posix_fadvise.2:65
7623 msgid "B<POSIX_FADV_NORMAL>"
7624 msgstr "B<POSIX_FADV_NORMAL>"
7627 #: build/C/man2/posix_fadvise.2:71
7629 "Indicates that the application has no advice to give about its access "
7630 "pattern for the specified data. If no advice is given for an open file, "
7631 "this is the default assumption."
7633 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7634 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7635 "合、 これがデフォルトで仮定される。"
7638 #: build/C/man2/posix_fadvise.2:71
7640 msgid "B<POSIX_FADV_SEQUENTIAL>"
7641 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7644 #: build/C/man2/posix_fadvise.2:75
7646 "The application expects to access the specified data sequentially (with "
7647 "lower offsets read before higher ones)."
7649 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7650 "小さなオフセットのデータを読むように) アクセスされることを期待する。"
7653 #: build/C/man2/posix_fadvise.2:75
7655 msgid "B<POSIX_FADV_RANDOM>"
7656 msgstr "B<POSIX_FADV_RANDOM>"
7659 #: build/C/man2/posix_fadvise.2:78
7660 msgid "The specified data will be accessed in random order."
7661 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7664 #: build/C/man2/posix_fadvise.2:78
7666 msgid "B<POSIX_FADV_NOREUSE>"
7667 msgstr "B<POSIX_FADV_NOREUSE>"
7670 #: build/C/man2/posix_fadvise.2:81
7671 msgid "The specified data will be accessed only once."
7672 msgstr "指定されたデータは 1 度しかアクセスされない。"
7675 #: build/C/man2/posix_fadvise.2:81
7677 msgid "B<POSIX_FADV_WILLNEED>"
7678 msgstr "B<POSIX_FADV_WILLNEED>"
7681 #: build/C/man2/posix_fadvise.2:84
7682 msgid "The specified data will be accessed in the near future."
7683 msgstr "指定されたデータは近い将来アクセスされる。"
7686 #: build/C/man2/posix_fadvise.2:84
7688 msgid "B<POSIX_FADV_DONTNEED>"
7689 msgstr "B<POSIX_FADV_DONTNEED>"
7692 #: build/C/man2/posix_fadvise.2:87
7693 msgid "The specified data will not be accessed in the near future."
7694 msgstr "指定されたデータは近い将来アクセスされない。"
7697 #: build/C/man2/posix_fadvise.2:90
7698 msgid "On success, zero is returned. On error, an error number is returned."
7699 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7702 #: build/C/man2/posix_fadvise.2:94
7703 msgid "The I<fd> argument was not a valid file descriptor."
7704 msgstr "I<fd> 引き数が有効なファイルディスクリプターでない。"
7707 #: build/C/man2/posix_fadvise.2:97
7708 msgid "An invalid value was specified for I<advice>."
7709 msgstr "無効な値が I<advice> に指定された。"
7711 #. commit 87ba81dba431232548ce29d5d224115d0c2355ac
7713 #: build/C/man2/posix_fadvise.2:107
7715 "The specified file descriptor refers to a pipe or FIFO. (B<ESPIPE> is the "
7716 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7717 "B<EINVAL> in this case.)"
7719 "指定されたファイルディスクリプターがパイプまたは FIFO を参照している "
7720 "(B<ESPIPE> は POSIX で規定されているエラーだが、 バージョン 2.16 より前のカー"
7721 "ネルでは、 この場合に B<EINVAL> を返していた。)"
7723 #. of fadvise64_64()
7725 #: build/C/man2/posix_fadvise.2:115
7727 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7728 "called B<fadvise64>(). Library support has been provided since glibc "
7729 "version 2.2, via the wrapper function B<posix_fadvise>()."
7731 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7732 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7733 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7734 "ラッパー関数は B<posix_fadvise>() という名前である。"
7736 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7738 #: build/C/man2/posix_fadvise.2:122
7740 "Since Linux 3.18, support for the underlying system call is optional, "
7741 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7744 "Linux 3.18 以降では、対応するシステムコールのサポートは任意となり、利用できる"
7745 "かはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされ"
7749 #: build/C/man2/posix_fadvise.2:131
7751 "POSIX.1-2001. Note that the type of the I<len> argument was changed from "
7752 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7754 "POSIX.1-2001. I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7755 "I<off_t> に変更された点に注意すること。"
7758 #: build/C/man2/posix_fadvise.2:137
7760 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7761 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7762 "B<POSIX_FADV_RANDOM> disables file readahead entirely. These changes affect "
7763 "the entire file, not just the specified region (but other open file handles "
7764 "to the same file are unaffected)."
7766 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7767 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7768 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7769 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7770 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7773 #: build/C/man2/posix_fadvise.2:144
7775 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7776 "into the page cache. The amount of data read may be decreased by the kernel "
7777 "depending on virtual memory load. (A few megabytes will usually be fully "
7778 "satisfied, and more is rarely useful.)"
7780 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7781 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリーの負荷に依ってカー"
7782 "ネルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより"
7786 #: build/C/man2/posix_fadvise.2:148
7788 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7789 "B<POSIX_FADV_WILLNEED>. This was probably a bug; since kernel 2.6.18, this "
7792 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7793 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7797 #: build/C/man2/posix_fadvise.2:156
7799 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7800 "specified region. This is useful, for example, while streaming large "
7801 "files. A program may periodically request the kernel to free cached data "
7802 "that has already been used, so that more useful cached pages are not "
7803 "discarded instead."
7805 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7806 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7807 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7808 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7809 "されたページが、 代わりに破棄されることはない。"
7812 #: build/C/man2/posix_fadvise.2:164
7814 "Requests to discard partial pages are ignored. It is preferable to preserve "
7815 "needed data than discard unneeded data. If the application requires that "
7816 "data be considered for discarding then I<offset> and I<len> must be page-"
7819 "ページの一部分の破棄要求は無視される。 不要なデータを破棄するよりも必要なデー"
7820 "タを保持する方がよい。 アプリケーションがデータを破棄した方がよいと思う場合"
7821 "は、 I<offset> と I<len> がページ境界に合っていなければならない。"
7824 #: build/C/man2/posix_fadvise.2:172
7826 "Pages that have not yet been written out will be unaffected, so if the "
7827 "application wishes to guarantee that pages will be released, it should call "
7828 "B<fsync>(2) or B<fdatasync>(2) first."
7830 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7831 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2) または "
7832 "B<fdatasync>(2) を呼ぶべきである。"
7835 #: build/C/man2/posix_fadvise.2:172
7837 msgid "Architecture-specific variants"
7838 msgstr "アーキテクチャー固有の派生バージョン"
7841 #: build/C/man2/posix_fadvise.2:189
7843 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7844 "of registers (see B<syscall>(2) for further detail). On such "
7845 "architectures, the call signature of B<posix_fadvise>() shown in the "
7846 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7847 "and I<offset> arguments. Therefore, these architectures define a version of "
7848 "the system call that orders the arguments suitably, but otherwise is "
7849 "otherwise exactly the same as B<posix_fadvise>()."
7851 "いくつかのアーキテクチャーでは、 64 ビットの引き数は適切なレジスターの組に割"
7852 "り当てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャーでは、 "
7853 "「書式」に書かれている B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 "
7854 "I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費されてし"
7855 "まう。 そのため、 これらのアーキテクチャーでは引き数が適切な順序になった別の"
7856 "システムコールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じで"
7860 #: build/C/man2/posix_fadvise.2:191
7861 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7863 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7866 #: build/C/man2/posix_fadvise.2:196
7869 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7870 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7872 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7873 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7876 #: build/C/man2/posix_fadvise.2:204
7878 "These architecture-specific details are generally hidden from applications "
7879 "by the glibc B<posix_fadvise>() wrapper function, which invokes the "
7880 "appropriate architecture-specific system call."
7882 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7883 "チャー固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適"
7884 "切なアーキテクチャー固有のシステムコールが呼び出される。"
7887 #: build/C/man2/posix_fadvise.2:209
7889 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7890 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7891 "through to the end of the file\"."
7893 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7894 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7897 #. FIXME . Write a posix_fadvise(3) page.
7899 #: build/C/man2/posix_fadvise.2:215
7901 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7902 "B<posix_madvise>(3)"
7904 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7905 "B<posix_madvise>(3)"
7908 #: build/C/man3/posix_fallocate.3:25
7910 msgid "POSIX_FALLOCATE"
7911 msgstr "POSIX_FALLOCATE"
7914 #: build/C/man3/posix_fallocate.3:28
7915 msgid "posix_fallocate - allocate file space"
7916 msgstr "posix_fallocate - ファイルのスペースを確保する"
7919 #: build/C/man3/posix_fallocate.3:33
7921 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7922 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7925 #: build/C/man3/posix_fallocate.3:42
7926 msgid "B<posix_fallocate>():"
7927 msgstr "B<posix_fallocate>():"
7930 #: build/C/man3/posix_fallocate.3:61
7932 "The function B<posix_fallocate>() ensures that disk space is allocated for "
7933 "the file referred to by the descriptor I<fd> for the bytes in the range "
7934 "starting at I<offset> and continuing for I<len> bytes. After a successful "
7935 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7936 "range are guaranteed not to fail because of lack of disk space."
7938 "関数 B<posix_fallocate>() は、ディスクリプター I<fd> で参照されるファイルに"
7939 "対して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から"
7940 "始まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>() の呼び出しが"
7941 "成功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足"
7945 #: build/C/man3/posix_fallocate.3:66
7947 "If the size of the file is less than I<offset>+I<len>, then the file is "
7948 "increased to this size; otherwise the file size is left unchanged."
7950 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7951 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7954 #: build/C/man3/posix_fallocate.3:72
7956 "B<posix_fallocate>() returns zero on success, or an error number on "
7957 "failure. Note that I<errno> is not set."
7959 "B<posix_fallocate>() は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7960 "す。 I<errno> が設定されない点に注意すること。"
7963 #: build/C/man3/posix_fallocate.3:81
7964 msgid "I<offset+len> exceeds the maximum file size."
7965 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7968 #: build/C/man3/posix_fallocate.3:91
7969 msgid "I<fd> does not refer to a regular file."
7970 msgstr "I<fd> が通常のファイルとして参照されていない。"
7973 #: build/C/man3/posix_fallocate.3:100
7974 msgid "I<fd> refers to a pipe."
7975 msgstr "I<fd> がパイプを参照している。"
7978 #: build/C/man3/posix_fallocate.3:103
7979 msgid "B<posix_fallocate>() is available since glibc 2.1.94."
7980 msgstr "B<posix_fallocate>() は glibc 2.1.94 以降で利用可能である。"
7983 #: build/C/man3/posix_fallocate.3:108
7984 msgid "The B<posix_fallocate>() function is thread-safe."
7985 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
7988 #: build/C/man3/posix_fallocate.3:133
7990 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7991 "if I<len> was 0, or I<offset> was less than 0. POSIX.1-2001 says that an "
7992 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7993 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7996 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7997 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7998 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7999 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
8003 #: build/C/man3/posix_fallocate.3:138
8005 "In the glibc implementation, B<posix_fallocate>() is implemented using "
8008 "glibc の実装では、 B<posix_fallocate>() は B<fallocate>() を使って実装されて"
8012 #: build/C/man3/posix_fallocate.3:143
8013 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8014 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8017 #: build/C/man3/posix_memalign.3:29
8019 msgid "POSIX_MEMALIGN"
8020 msgstr "POSIX_MEMALIGN"
8023 #: build/C/man3/posix_memalign.3:29
8029 #: build/C/man3/posix_memalign.3:32
8031 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8034 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8038 #: build/C/man3/posix_memalign.3:35
8040 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8041 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8044 #: build/C/man3/posix_memalign.3:39
8047 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8048 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8049 "B<void *valloc(size_t >I<size>B<);>\n"
8051 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8052 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8053 "B<void *valloc(size_t >I<size>B<);>\n"
8056 #: build/C/man3/posix_memalign.3:44
8059 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8060 "B<void *pvalloc(size_t >I<size>B<);>\n"
8062 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8063 "B<void *pvalloc(size_t >I<size>B<);>\n"
8066 #: build/C/man3/posix_memalign.3:54
8068 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8071 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8075 #: build/C/man3/posix_memalign.3:57
8076 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8077 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8080 #: build/C/man3/posix_memalign.3:59
8081 msgid "B<valloc>():"
8082 msgstr "B<valloc>():"
8085 #: build/C/man3/posix_memalign.3:62
8087 msgid "Since glibc 2.12:"
8088 msgstr "glibc 2.12 以降:"
8091 #: build/C/man3/posix_memalign.3:69
8095 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8096 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8097 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8100 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8101 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8102 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8105 #: build/C/man3/posix_memalign.3:71
8107 msgid "Before glibc 2.12:"
8108 msgstr "glibc 2.12 より前:"
8111 #: build/C/man3/posix_memalign.3:75
8113 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8114 "_XOPEN_SOURCE_EXTENDED"
8116 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8117 "_XOPEN_SOURCE_EXTENDED"
8120 #: build/C/man3/posix_memalign.3:82
8122 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8123 "declaration of B<valloc>(); no feature test macros are required.)"
8125 "((非標準の) ヘッダーファイル I<E<lt>malloc.hE<gt>> も\n"
8126 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8130 #: build/C/man3/posix_memalign.3:104
8132 "The function B<posix_memalign>() allocates I<size> bytes and places the "
8133 "address of the allocated memory in I<*memptr>. The address of the allocated "
8134 "memory will be a multiple of I<alignment>, which must be a power of two and "
8135 "a multiple of I<sizeof(void\\ *)>. If I<size> is 0, then the value placed "
8136 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8137 "successfully passed to B<free>(3)."
8139 "関数 B<posix_memalign>() は、 I<size> バイトのメモリーを割り当て、割り当てら"
8140 "れたメモリーのアドレスを I<*memptr> に設定する。 割り当てられたメモリーのアド"
8141 "レスは I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗"
8142 "で、かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場"
8143 "合、 I<*memptr> には NULL か一意なポインター値が書かれる。 このポインター値"
8144 "は、後で B<free>(3) に問題なく渡すことができる。"
8146 #. The behavior of memalign() for size==0 is as for posix_memalign()
8147 #. but no standards govern this.
8149 #: build/C/man3/posix_memalign.3:115
8151 "The obsolete function B<memalign>() allocates I<size> bytes and returns a "
8152 "pointer to the allocated memory. The memory address will be a multiple of "
8153 "I<alignment>, which must be a power of two."
8155 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリーを割り当"
8157 "割り当てられたメモリーへのポインターを返す。 メモリーのアドレスは "
8159 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8162 #: build/C/man3/posix_memalign.3:124
8164 "The function B<aligned_alloc>() is the same as B<memalign>(), except for "
8165 "the added restriction that I<size> should be a multiple of I<alignment>."
8167 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8169 "の倍数でなければならないという追加の制限がある点が異なる。"
8172 #: build/C/man3/posix_memalign.3:133
8174 "The obsolete function B<valloc>() allocates I<size> bytes and returns a "
8175 "pointer to the allocated memory. The memory address will be a multiple of "
8176 "the page size. It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8178 "廃止された関数である B<valloc>() は I<size> バイトのメモリーを割り当て、割り"
8179 "当てられたメモリーへのポインターを返す。 メモリーのアドレスはページサイズの倍"
8180 "数になっているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と"
8184 #: build/C/man3/posix_memalign.3:140
8186 "The obsolete function B<pvalloc>() is similar to B<valloc>(), but rounds "
8187 "the size of the allocation up to the next multiple of the system page size."
8189 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8190 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8193 #: build/C/man3/posix_memalign.3:142
8194 msgid "For all of these functions, the memory is not zeroed."
8195 msgstr "これらの関数はいずれもメモリーのゼロクリアを行わない。"
8198 #: build/C/man3/posix_memalign.3:149
8200 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>() return a "
8201 "pointer to the allocated memory, or NULL if the request fails."
8203 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8205 "メモリーへのポインターを返す。 割り当てに失敗した場合は NULL を返す。"
8208 #: build/C/man3/posix_memalign.3:157
8210 "B<posix_memalign>() returns zero on success, or one of the error values "
8211 "listed in the next section on failure. The value of I<errno> is "
8212 "indeterminate after a call to B<posix_memalign>()."
8214 "B<posix_memalign>() は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8215 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8216 "I<errno> の値は不定である。"
8219 #: build/C/man3/posix_memalign.3:164
8221 "The I<alignment> argument was not a power of two, or was not a multiple of "
8222 "I<sizeof(void\\ *)>."
8224 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8228 #: build/C/man3/posix_memalign.3:167
8229 msgid "There was insufficient memory to fulfill the allocation request."
8230 msgstr "割り当て要求を満たすのに十分なメモリーがなかった。"
8233 #: build/C/man3/posix_memalign.3:174
8235 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>() have been "
8236 "available in all Linux libc libraries."
8238 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8239 "すべての Linux libc ライブラリで使用可能である。"
8242 #: build/C/man3/posix_memalign.3:178
8243 msgid "The function B<aligned_alloc>() was added to glibc in version 2.16."
8244 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8247 #: build/C/man3/posix_memalign.3:182
8248 msgid "The function B<posix_memalign>() is available since glibc 2.1.91."
8249 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8252 #: build/C/man3/posix_memalign.3:189
8254 "The function B<valloc>() appeared in 3.0BSD. It is documented as being "
8255 "obsolete in 4.3BSD, and as legacy in SUSv2. It does not appear in "
8258 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8260 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8263 #: build/C/man3/posix_memalign.3:193
8264 msgid "The function B<pvalloc>() is a GNU extension."
8265 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8268 #: build/C/man3/posix_memalign.3:197
8269 msgid "The function B<memalign>() appears in SunOS 4.1.3 but not in 4.4BSD."
8270 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8273 #: build/C/man3/posix_memalign.3:201
8274 msgid "The function B<posix_memalign>() comes from POSIX.1d."
8275 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8278 #: build/C/man3/posix_memalign.3:206
8279 msgid "The function B<aligned_alloc>() is specified in the C11 standard."
8280 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8283 #: build/C/man3/posix_memalign.3:206
8289 #: build/C/man3/posix_memalign.3:210
8291 "Everybody agrees that B<posix_memalign>() is declared in I<E<lt>stdlib."
8294 "B<posix_memalign>() の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8298 #: build/C/man3/posix_memalign.3:214
8300 "On some systems B<memalign>() is declared in I<E<lt>stdlib.hE<gt>> instead "
8301 "of I<E<lt>malloc.hE<gt>>."
8303 "いくつかのシステムでは、 B<memalign>() は I<E<lt>malloc.hE<gt>> ではなく "
8304 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8307 #: build/C/man3/posix_memalign.3:221
8309 "According to SUSv2, B<valloc>() is declared in I<E<lt>stdlib.hE<gt>>. "
8310 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8311 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8314 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8316 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8317 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8320 #: build/C/man3/posix_memalign.3:230
8322 "On many systems there are alignment restrictions, for example, on buffers "
8323 "used for direct block device I/O. POSIX specifies the I<pathconf(path,"
8324 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed. Now one can "
8325 "use B<posix_memalign>() to satisfy this requirement."
8327 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8328 "スに対するダイレクト I/O に使用するバッファーには アラインメントに関する制限"
8329 "がある。 POSIX では、どんなアラインメントが必要かを知るために "
8330 "I<pathconf(path,_PC_REC_XFER_ALIGN)> コールを規定している。ここで "
8331 "B<posix_memalign>() を使うと、この必要条件を満たすことができる。"
8334 #: build/C/man3/posix_memalign.3:239
8336 "B<posix_memalign>() verifies that I<alignment> matches the requirements "
8337 "detailed above. B<memalign>() may not check that the I<alignment> argument "
8340 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8341 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8344 #. Other systems allow passing the result of
8351 #: build/C/man3/posix_memalign.3:267
8353 "POSIX requires that memory obtained from B<posix_memalign>() can be freed "
8354 "using B<free>(3). Some systems provide no way to reclaim memory allocated "
8355 "with B<memalign>() or B<valloc>() (because one can pass to B<free>(3) "
8356 "only a pointer obtained from B<malloc>(3), while, for example, "
8357 "B<memalign>() would call B<malloc>(3) and then align the obtained value). "
8358 "The glibc implementation allows memory obtained from any of these functions "
8359 "to be reclaimed with B<free>(3)."
8361 "POSIX では B<posix_memalign>() によって獲得したメモリーは B<free>(3) を\n"
8362 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8363 "B<memalign>() やB<valloc>() で割り当てられたメモリーを再利用する手段が\n"
8364 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8365 "B<malloc>(3) から受け取ったポインターだけだが、例えば B<memalign>() は\n"
8366 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8367 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリーも\n"
8368 "B<free>(3) で再利用することができる。"
8371 #: build/C/man3/posix_memalign.3:272
8373 "The glibc B<malloc>(3) always returns 8-byte aligned memory addresses, so "
8374 "these functions are needed only if you require larger alignment values."
8376 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリーアドレス"
8378 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8383 #: build/C/man3/posix_memalign.3:277
8384 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8385 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8388 #: build/C/man2/readahead.2:28
8394 #: build/C/man2/readahead.2:28
8400 #: build/C/man2/readahead.2:31
8401 msgid "readahead - initiate file readahead into page cache"
8402 msgstr "readahead - 前もってファイルをページキャッシュに読み込む"
8405 #: build/C/man2/readahead.2:37
8407 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8408 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8411 #: build/C/man2/readahead.2:44
8413 "B<readahead>() initiates readahead on a file so that subsequent reads from "
8414 "that file will be satisfied from the cache, and not block on disk I/O "
8415 "(assuming the readahead was initiated early enough and that other activity "
8416 "on the system did not in the meantime flush pages from the cache)."
8418 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8419 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8420 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8421 "ページがフラッシュされない場合である)。"
8424 #: build/C/man2/readahead.2:66
8426 "The I<fd> argument is a file descriptor identifying the file which is to be "
8427 "read. The I<offset> argument specifies the starting point from which data "
8428 "is to be read and I<count> specifies the number of bytes to be read. I/O is "
8429 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8430 "page boundary and bytes are read up to the next page boundary greater than "
8431 "or equal to I<(offset+count)>. B<readahead>() does not read beyond the end "
8432 "of the file. The current file offset of the open file referred to by I<fd> "
8433 "is left unchanged."
8435 "I<fd> 引き数は読み込みを行うファイルを識別するファイルディスクリプターであ"
8436 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8437 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8438 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8439 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>() は"
8440 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8441 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8444 #: build/C/man2/readahead.2:72
8446 "On success, B<readahead>() returns 0; on failure, -1 is returned, with "
8447 "I<errno> set to indicate the cause of the error."
8449 "B<readahead>() は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8453 #: build/C/man2/readahead.2:77
8454 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8456 "I<fd> が有効なファイルディスクリプターでない、または 読み込み用にオープンされ"
8460 #: build/C/man2/readahead.2:83
8462 "I<fd> does not refer to a file type to which B<readahead>() can be applied."
8464 "I<fd> が参照しているファイルが、 B<readahead>() を行うことができないタイプの"
8468 #: build/C/man2/readahead.2:88
8470 "The B<readahead>() system call appeared in Linux 2.4.13; glibc support has "
8471 "been provided since version 2.3."
8473 "B<readahead>() システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8474 "は glibc バージョン 2.3 以降で行われている。"
8477 #: build/C/man2/readahead.2:93
8479 "The B<readahead>() system call is Linux-specific, and its use should be "
8480 "avoided in portable applications."
8482 "B<readahead>() システムコールは Linux 固有であり、移植を考慮したプログラムで"
8486 #: build/C/man2/readahead.2:98
8488 "On some 32-bit architectures, the calling signature for this system call "
8489 "differs, for the reasons described in B<syscall>(2)."
8491 "いくつかの 32 ビットアーキテクチャーでは、このシステムコールの呼び出しシグネ"
8492 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8495 #: build/C/man2/readahead.2:107
8497 "B<readahead>() attempts to schedule the reads in the background and return "
8498 "immediately. However, it may block while it reads the filesystem metadata "
8499 "needed to locate the requested blocks. This occurs frequently with ext[234] "
8500 "on large files using indirect blocks instead of extents, giving the "
8501 "appearance that the call blocks until the requested data has been read."
8503 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8504 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8505 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8506 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8507 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8511 #: build/C/man2/readahead.2:113
8512 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8514 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8517 #: build/C/man2/remap_file_pages.2:28
8519 msgid "REMAP_FILE_PAGES"
8520 msgstr "REMAP_FILE_PAGES"
8523 #: build/C/man2/remap_file_pages.2:31
8524 msgid "remap_file_pages - create a nonlinear file mapping"
8525 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8528 #: build/C/man2/remap_file_pages.2:35
8531 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
8532 "B<#include E<lt>sys/mman.hE<gt>>\n"
8534 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
8535 "B<#include E<lt>sys/mman.hE<gt>>\n"
8538 #: build/C/man2/remap_file_pages.2:38
8541 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8542 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8544 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8545 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8547 #. commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8548 #. http://lwn.net/Articles/597632/
8550 #: build/C/man2/remap_file_pages.2:47
8552 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8553 "eventually be replaced by a slower in-kernel emulation. Those few "
8554 "applications that use this system call should consider migrating to "
8557 "B<注意>: このシステムコールは (Linux 3.16 以降で) 非推奨となっており、 やがて"
8558 "より低速なカーネル内でのエミュレーションに置き換えられる予定である。 このシス"
8559 "テムコールを使用しているアプリケーションは少ないが、こうしたアプリケーション"
8560 "は代替手段への移行を検討すべきである。"
8563 #: build/C/man2/remap_file_pages.2:59
8565 "The B<remap_file_pages>() system call is used to create a nonlinear "
8566 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8567 "nonsequential order in memory. The advantage of using "
8568 "B<remap_file_pages>() over using repeated calls to B<mmap>(2) is that the "
8569 "former approach does not require the kernel to create additional VMA "
8570 "(Virtual Memory Area) data structures."
8572 "B<remap_file_pages>() システムコールは非線形なマッピング、 つまりファイルの"
8573 "ページがメモリー上で連続しない順番でマップされる マッピングを作成するために使"
8574 "われる。 B<remap_file_pages>() を使う方が B<mmap>(2) を繰り返して使うより優"
8575 "れている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモ"
8576 "リー領域) データ構造体を追加で作成する必要がないことである。"
8579 #: build/C/man2/remap_file_pages.2:61
8580 msgid "To create a nonlinear mapping we perform the following steps:"
8581 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8584 #: build/C/man2/remap_file_pages.2:61 build/C/man2/memfd_create.2:219
8590 #: build/C/man2/remap_file_pages.2:69
8592 "Use B<mmap>(2) to create a mapping (which is initially linear). This "
8593 "mapping must be created with the B<MAP_SHARED> flag."
8595 "B<mmap>(2) を使い、マッピングを作成する (このマッピングは最初は線形であ"
8596 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8600 #: build/C/man2/remap_file_pages.2:69 build/C/man2/memfd_create.2:225
8606 #: build/C/man2/remap_file_pages.2:77
8608 "Use one or more calls to B<remap_file_pages>() to rearrange the "
8609 "correspondence between the pages of the mapping and the pages of the file. "
8610 "It is possible to map the same page of a file into multiple locations within "
8611 "the mapped region."
8613 "B<remap_file_pages>() を 1 回以上呼び出して、 マッピングのページとファイルの"
8614 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8618 #: build/C/man2/remap_file_pages.2:88
8620 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8621 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8622 "system page size; I<size> is the length of the region in bytes."
8624 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8625 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8626 "る。 I<size> は領域の長さであり、単位はバイトである。"
8629 #: build/C/man2/remap_file_pages.2:106
8631 "The I<addr> argument serves two purposes. First, it identifies the mapping "
8632 "whose pages we want to rearrange. Thus, I<addr> must be an address that "
8633 "falls within a region previously mapped by a call to B<mmap>(2). Second, "
8634 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8635 "and I<size> will be placed."
8637 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8638 "成したいページの マッピングを識別することである。 よって I<addr> は "
8639 "B<mmap>(2) の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8640 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8641 "予定のアドレスを、 I<addr> によって指定することである。"
8643 #. This rounding is weird, and not consistent with the treatment of
8644 #. the analogous arguments for munmap()/mprotect() and for mlock().
8647 #: build/C/man2/remap_file_pages.2:120
8649 "The values specified in I<addr> and I<size> should be multiples of the "
8650 "system page size. If they are not, then the kernel rounds I<both> values "
8651 "I<down> to the nearest multiple of the page size."
8653 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8654 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8658 #: build/C/man2/remap_file_pages.2:124
8659 msgid "The I<prot> argument must be specified as 0."
8660 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8663 #: build/C/man2/remap_file_pages.2:132
8665 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8666 "other than B<MAP_NONBLOCK> are ignored."
8668 "I<flags> 引き数は B<mmap>(2) のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8672 #: build/C/man2/remap_file_pages.2:139
8674 "On success, B<remap_file_pages>() returns 0. On error, -1 is returned, and "
8675 "I<errno> is set appropriately."
8677 "成功した場合、 B<remap_file_pages>() は 0 を返す。 エラーの場合、-1 が返さ"
8678 "れ、 I<errno> が適切に設定される。"
8681 #: build/C/man2/remap_file_pages.2:147
8683 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8686 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8689 #. And possibly others from vma->vm_ops->populate()
8691 #: build/C/man2/remap_file_pages.2:156
8692 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8693 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8696 #: build/C/man2/remap_file_pages.2:161
8698 "The B<remap_file_pages>() system call appeared in Linux 2.5.46; glibc "
8699 "support was added in version 2.3.3."
8701 "B<remap_file_pages>() システムコールは Linux 2.5.46 で登場した。 glibc での"
8702 "サポートは glibc バージョン 2.3.3 で追加された。"
8705 #: build/C/man2/remap_file_pages.2:165
8706 msgid "The B<remap_file_pages>() system call is Linux-specific."
8707 msgstr "B<remap_file_pages>() システムコールは Linux 固有のものである。"
8709 #. commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8711 #: build/C/man2/remap_file_pages.2:176
8713 "Since Linux 2.6.23, B<remap_file_pages>() creates non-linear mappings only "
8714 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs. On filesystems "
8715 "with a backing store, B<remap_file_pages>() is not much more efficient than "
8716 "using B<mmap>(2) to adjust which parts of the file are mapped to which "
8719 "Linux 2.6.23 以降、 B<remap_file_pages>() は tmpfs, hugetlbfs, ramfs などのイ"
8720 "ンメモリーファイルシステム上にのみ非線形マッピングを作成する。 裏にデータスト"
8721 "アを持つファイルシステム上では、 B<remap_file_pages>() は、 ファイルのどの部"
8722 "分がどのアドレスにマッピングされているかの調整が、 B<mmap>(2) を使った場合ほ"
8726 #: build/C/man2/remap_file_pages.2:183
8728 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8731 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8735 #: build/C/man3/shm_open.3:26
8741 #: build/C/man3/shm_open.3:29
8743 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8745 "shm_open, shm_unlink - POSIX 共有メモリーオブジェクトの作成/オープン/削除を行"
8749 #: build/C/man3/shm_open.3:33
8750 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8751 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8754 #: build/C/man3/shm_open.3:35
8755 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8756 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8759 #: build/C/man3/shm_open.3:37
8761 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8763 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8766 #: build/C/man3/shm_open.3:39
8767 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8768 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8771 #: build/C/man3/shm_open.3:41
8772 msgid "Link with I<-lrt>."
8773 msgstr "I<-lrt> でリンクする。"
8776 #: build/C/man3/shm_open.3:53
8778 "B<shm_open>() creates and opens a new, or opens an existing, POSIX shared "
8779 "memory object. A POSIX shared memory object is in effect a handle which can "
8780 "be used by unrelated processes to B<mmap>(2) the same region of shared "
8781 "memory. The B<shm_unlink>() function performs the converse operation, "
8782 "removing an object previously created by B<shm_open>()."
8784 "B<shm_open>() は、POSIX 共有メモリーオブジェクトを新規に作成/オープンした"
8785 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリーオブ"
8786 "ジェクトは、実際には、関係のないプロセスが 共有メモリーの同じ領域を "
8787 "B<mmap>(2) するために使用することができる手段である。 B<shm_unlink>() は、"
8788 "逆の操作、つまり以前に B<shm_open>() で作成されたオブジェクトの削除を行う。"
8790 #. glibc allows the initial slash to be omitted, and makes
8791 #. multiple initial slashes equivalent to a single slash.
8792 #. This differs from the implementation of POSIX message queues.
8793 #. glibc allows subdirectory components in the name, in which
8794 #. case the subdirectory must exist under /dev/shm, and allow the
8795 #. required permissions if a user wants to create a shared memory
8796 #. object in that subdirectory.
8798 #: build/C/man3/shm_open.3:74
8800 "The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> "
8801 "specifies the shared memory object to be created or opened. For portable "
8802 "use, a shared memory object should be identified by a name of the form I</"
8803 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8804 "255) characters consisting of an initial slash, followed by one or more "
8805 "characters, none of which are slashes."
8807 "B<shm_open>() の動作は B<open>(2) とよく似ている。 I<name> で作成したりオー"
8808 "プンしたりする共有メモリーオブジェクトを指定する。 移植性を持たせるためには、"
8809 "共有メモリーオブジェクトは I</somename> という形式の名前で識別し、 その名前"
8810 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8811 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8814 #: build/C/man3/shm_open.3:81
8816 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8817 "or B<O_RDWR> and any of the other flags listed here:"
8819 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8820 "述べる他のフラグの論理和をとったもの を指定する。"
8823 #: build/C/man3/shm_open.3:81
8826 msgstr "B<O_RDONLY>"
8829 #: build/C/man3/shm_open.3:89
8831 "Open the object for read access. A shared memory object opened in this way "
8832 "can be B<mmap>(2)ed only for read (B<PROT_READ>) access."
8834 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8835 "された共有メモリーオブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8836 "B<mmap>(2) することができる。"
8839 #: build/C/man3/shm_open.3:89
8845 #: build/C/man3/shm_open.3:92
8846 msgid "Open the object for read-write access."
8847 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8850 #: build/C/man3/shm_open.3:92
8855 #. In truth it is actually the filesystem IDs on Linux, but these
8856 #. are nearly always the same as the effective IDs. (MTK, Jul 05)
8858 #: build/C/man3/shm_open.3:112
8860 "Create the shared memory object if it does not exist. The user and group "
8861 "ownership of the object are taken from the corresponding effective IDs of "
8862 "the calling process, and the object's permission bits are set according to "
8863 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8864 "file mode creation mask (see B<umask>(2)) are cleared for the new object. "
8865 "A set of macro constants which can be used to define I<mode> is listed in "
8866 "B<open>(2). (Symbolic definitions of these constants can be obtained by "
8867 "including I<E<lt>sys/stat.hE<gt>>.)"
8869 "存在しない場合、共有メモリーオブジェクトを作成する。 オブジェクトのユーザーと"
8870 "グループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェ"
8871 "クトの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファ"
8872 "イルモード作成マスク (B<umask>(2) 参照) に設定されている値は、新規オブジェク"
8873 "トに関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)"
8874 "は B<open>(2) に記載されている (これらの定数のシンボル定義は I<E<lt>sys/"
8875 "stat.hE<gt>> のインクルードにより得られる)。"
8878 #: build/C/man3/shm_open.3:118
8880 "A new shared memory object initially has zero length\\(emthe size of the "
8881 "object can be set using B<ftruncate>(2). The newly allocated bytes of a "
8882 "shared memory object are automatically initialized to 0."
8884 "新規に作成された共有メモリーオブジェクトは長さ 0 で初期化される。 オブジェク"
8885 "トの大きさは B<ftruncate>(2) を使って設定できる。 共有メモリーオブジェクトと"
8886 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8889 #: build/C/man3/shm_open.3:118
8895 #: build/C/man3/shm_open.3:127
8897 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8898 "I<name> already exists, return an error. The check for the existence of the "
8899 "object, and its creation if it does not exist, are performed atomically."
8901 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリーオブジェ"
8902 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8903 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8907 #: build/C/man3/shm_open.3:127
8913 #: build/C/man3/shm_open.3:130
8914 msgid "If the shared memory object already exists, truncate it to zero bytes."
8916 "共有メモリーオブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8920 #: build/C/man3/shm_open.3:133
8922 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8925 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8928 #: build/C/man3/shm_open.3:144
8930 "On successful completion B<shm_open>() returns a new file descriptor "
8931 "referring to the shared memory object. This file descriptor is guaranteed "
8932 "to be the lowest-numbered file descriptor not previously opened within the "
8933 "process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file "
8936 "成功して完了した場合、 B<shm_open>() は共有メモリーオブジェクトを参照する新"
8937 "しいファイルディスクリプターを返す。 このファイルディスクリプターは、そのプロ"
8938 "セス内で過去にオープンされていない ファイルディスクリプターの中で最も小さな数"
8939 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2) を参照) が、この"
8940 "ファイルディスクリプターに設定される。"
8943 #: build/C/man3/shm_open.3:153
8945 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2) "
8946 "(for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) "
8947 "the file descriptor may be closed without affecting the memory mapping."
8949 "通常、これらのファイルディスクリプターは、この後続けて実行される "
8950 "B<ftruncate>(2) (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2) の呼"
8951 "び出しに使用される。 B<mmap>(2) を呼び出した後は、ファイルディスクリプターを"
8952 "クローズしてもよく、 クローズしてもメモリーマッピングに影響を与えることはな"
8956 #: build/C/man3/shm_open.3:171
8958 "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a "
8959 "shared memory object name, and, once all processes have unmapped the object, "
8960 "de-allocates and destroys the contents of the associated memory region. "
8961 "After a successful B<shm_unlink>(), attempts to B<shm_open>() an object "
8962 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8963 "case a new, distinct object is created)."
8965 "B<shm_unlink>() の動作は B<unlink>(2) とよく似ている: 共有メモリーオブジェ"
8966 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8967 "でオブジェクトの割り当てを解除し、 対応するメモリー領域の内容を破棄する。 "
8968 "B<shm_unlink>() が成功した後で、同じ I<name> を持つオブジェクトに対して "
8969 "B<shm_open>() を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8970 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8973 #: build/C/man3/shm_open.3:180
8975 "On success, B<shm_open>() returns a nonnegative file descriptor. On "
8976 "failure, B<shm_open>() returns -1. B<shm_unlink>() returns 0 on success, "
8979 "成功した場合、 B<shm_open>() は非負のファイルディスクリプターを返す。 失敗し"
8980 "た場合、 B<shm_open>() は -1 を返す。 B<shm_unlink>() は、成功した場合 0 "
8981 "を、エラーが起こった場合 -1 を返す。"
8984 #: build/C/man3/shm_open.3:187
8986 "On failure, I<errno> is set to indicate the cause of the error. Values "
8987 "which may appear in I<errno> include the following:"
8989 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8993 #: build/C/man3/shm_open.3:192
8994 msgid "Permission to B<shm_unlink>() the shared memory object was denied."
8995 msgstr "共有メモリーオブジェクトを B<shm_unlink>() する権限がなかった。"
8998 #: build/C/man3/shm_open.3:202
9000 "Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or "
9001 "B<O_TRUNC> was specified and the caller does not have write permission on "
9004 "指定された I<mode> で I<name> を B<shm_open>() する権限がなかった。もしく"
9005 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
9009 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
9015 #: build/C/man3/shm_open.3:213
9017 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the "
9018 "shared memory object specified by I<name> already exists."
9020 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>() に指定されたが、 I<name> で指"
9021 "定された共有メモリーオブジェクトが既に存在した。"
9024 #: build/C/man3/shm_open.3:220
9025 msgid "The I<name> argument to B<shm_open>() was invalid."
9026 msgstr "B<shm_open>() に与えられた I<name> 引き数が不正であった。"
9029 #: build/C/man3/shm_open.3:220 build/C/man2/memfd_create.2:146
9035 #: build/C/man3/shm_open.3:223
9036 msgid "The process already has the maximum number of files open."
9037 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9040 #: build/C/man3/shm_open.3:223
9042 msgid "B<ENAMETOOLONG>"
9043 msgstr "B<ENAMETOOLONG>"
9046 #: build/C/man3/shm_open.3:229
9047 msgid "The length of I<name> exceeds B<PATH_MAX>."
9048 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9051 #: build/C/man3/shm_open.3:233
9053 "The limit on the total number of files open on the system has been reached."
9054 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9057 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9058 #: build/C/man2/shmget.2:225
9064 #: build/C/man3/shm_open.3:242
9066 "An attempt was made to B<shm_open>() a I<name> that did not exist, and "
9067 "B<O_CREAT> was not specified."
9069 "存在していない I<name> のオブジェクトを B<shm_open>() しようとしたが、 "
9070 "B<O_CREAT> が指定されていなかった。"
9073 #: build/C/man3/shm_open.3:249
9075 "An attempt was to made to B<shm_unlink>() a I<name> that does not exist."
9076 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>() しようとした。"
9079 #: build/C/man3/shm_open.3:251
9080 msgid "These functions are provided in glibc 2.2 and later."
9081 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9084 #: build/C/man3/shm_open.3:257
9086 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9087 "object is set to either the calling process's effective group ID or \"a "
9088 "system default group ID\"."
9090 "POSIX.1-2001 には、新規に作成される共有メモリーオブジェクトのグループ所有権"
9091 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9092 "ID」 のどちらかに設定される、と書かれている。"
9095 #: build/C/man3/shm_open.3:266
9097 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9098 "unspecified. On Linux, this will successfully truncate an existing shared "
9099 "memory object\\(emthis may not be so on other UNIX systems."
9101 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9102 "いる。Linux では、 既存の共有メモリーオブジェクトに対する切り詰め (truncate) "
9103 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9106 #: build/C/man3/shm_open.3:271
9108 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9109 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9111 "Linux 2.4 における POSIX 共有メモリーオブジェクトの実装は 専用のファイルシス"
9112 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9115 #: build/C/man3/shm_open.3:283
9117 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9118 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9119 "B<shm_overview>(7)"
9121 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9122 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9123 "B<shm_overview>(7)"
9126 #: build/C/man7/shm_overview.7:27
9128 msgid "SHM_OVERVIEW"
9129 msgstr "SHM_OVERVIEW"
9132 #: build/C/man7/shm_overview.7:27
9138 #: build/C/man7/shm_overview.7:30
9139 msgid "shm_overview - overview of POSIX shared memory"
9140 msgstr "shm_overview - POSIX 共有メモリーの概要"
9143 #: build/C/man7/shm_overview.7:33
9145 "The POSIX shared memory API allows processes to communicate information by "
9146 "sharing a region of memory."
9148 "POSIX 共有メモリー API を使用すると、メモリーのある領域を共有して、 プロセス"
9149 "間で情報をやり取りすることができる。"
9152 #: build/C/man7/shm_overview.7:35
9153 msgid "The interfaces employed in the API are:"
9154 msgstr "この API では以下のインターフェースが採用されている。"
9157 #: build/C/man7/shm_overview.7:35
9159 msgid "B<shm_open>(3)"
9160 msgstr "B<shm_open>(3)"
9163 #: build/C/man7/shm_overview.7:42
9165 "Create and open a new object, or open an existing object. This is analogous "
9166 "to B<open>(2). The call returns a file descriptor for use by the other "
9167 "interfaces listed below."
9169 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9170 "する。これは B<open>(2) と同じである。下記にある他のインターフェースで使用す"
9171 "る ファイルディスクリプターを返す。"
9174 #: build/C/man7/shm_overview.7:42
9176 msgid "B<ftruncate>(2)"
9177 msgstr "B<ftruncate>(2)"
9180 #: build/C/man7/shm_overview.7:46
9182 "Set the size of the shared memory object. (A newly created shared memory "
9183 "object has a length of zero.)"
9184 msgstr "共有メモリーオブジェクトの大きさを設定する。"
9187 #: build/C/man7/shm_overview.7:50
9189 "Map the shared memory object into the virtual address space of the calling "
9192 "呼び出したプロセスの仮想アドレス空間に共有メモリーオブジェクトを マップする。"
9195 #: build/C/man7/shm_overview.7:50
9197 msgid "B<munmap>(2)"
9198 msgstr "B<munmap>(2)"
9201 #: build/C/man7/shm_overview.7:54
9203 "Unmap the shared memory object from the virtual address space of the calling "
9206 "呼び出したプロセスの仮想アドレス空間から 共有メモリーオブジェクトをアンマップ"
9210 #: build/C/man7/shm_overview.7:54
9212 msgid "B<shm_unlink>(3)"
9213 msgstr "B<shm_unlink>(3)"
9216 #: build/C/man7/shm_overview.7:57
9217 msgid "Remove a shared memory object name."
9218 msgstr "共有メモリーオブジェクト名を削除する。"
9221 #: build/C/man7/shm_overview.7:57
9224 msgstr "B<close>(2)"
9227 #: build/C/man7/shm_overview.7:62
9229 "Close the file descriptor allocated by B<shm_open>(3) when it is no longer "
9232 "B<shm_open>(3) で割り当てられたファイルディスクリプターが不要になった際に、 "
9233 "そのファイルディスクリプターをクローズする。"
9236 #: build/C/man7/shm_overview.7:62
9239 msgstr "B<fstat>(2)"
9242 #: build/C/man7/shm_overview.7:76
9244 "Obtain a I<stat> structure that describes the shared memory object. Among "
9245 "the information returned by this call are the object's size (I<st_size>), "
9246 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9248 "その共有メモリーオブジェクトについての情報が入った I<stat> 構造体を取得す"
9249 "る。 このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許"
9250 "可属性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>) がある。"
9253 #: build/C/man7/shm_overview.7:76
9255 msgid "B<fchown>(2)"
9256 msgstr "B<fchown>(2)"
9259 #: build/C/man7/shm_overview.7:79
9260 msgid "To change the ownership of a shared memory object."
9261 msgstr "共有メモリーオブジェクトの所有権を変更する。"
9264 #: build/C/man7/shm_overview.7:79
9266 msgid "B<fchmod>(2)"
9267 msgstr "B<fchmod>(2)"
9270 #: build/C/man7/shm_overview.7:82
9271 msgid "To change the permissions of a shared memory object."
9272 msgstr "共有メモリーオブジェクトの許可属性を変更する。"
9275 #: build/C/man7/shm_overview.7:82
9281 #: build/C/man7/shm_overview.7:84
9282 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9283 msgstr "POSIX 共有メモリーは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9286 #: build/C/man7/shm_overview.7:84
9292 #: build/C/man7/shm_overview.7:89
9294 "POSIX shared memory objects have kernel persistence: a shared memory object "
9295 "will exist until the system is shut down, or until all processes have "
9296 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9298 "POSIX 共有メモリーオブジェクトはカーネル内で保持される。 共有メモリーオブジェ"
9299 "クトは、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトを"
9300 "アンマップし、 B<shm_unlink>(3) で削除されるまで、存在し続ける。"
9303 #: build/C/man7/shm_overview.7:89
9309 #: build/C/man7/shm_overview.7:94
9311 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9312 "to link against the real-time library, I<librt>."
9314 "POSIX 共有メモリー API を使用したプログラムは I<cc -lrt> でコンパイルし、リア"
9315 "ルタイムライブラリ I<librt> とリンクしなければならない。"
9318 #: build/C/man7/shm_overview.7:94
9320 msgid "Accessing shared memory objects via the filesystem"
9321 msgstr "ファイルシステム経由での共有メモリーオブジェクトへのアクセス"
9324 #: build/C/man7/shm_overview.7:101
9326 "On Linux, shared memory objects are created in a (I<tmpfs>) virtual "
9327 "filesystem, normally mounted under I</dev/shm>. Since kernel 2.6.19, Linux "
9328 "supports the use of access control lists (ACLs) to control the permissions "
9329 "of objects in the virtual filesystem."
9331 "Linux では、共有メモリーオブジェクトは通常 I</dev/shm> 以下にマウントされる仮"
9332 "想ファイルシステム (I<tmpfs>) 内に作成される。 カーネル 2.6.19 以降の Linux "
9333 "では、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御"
9334 "リスト (ACL; access control lists) を使うことができる。"
9337 #: build/C/man7/shm_overview.7:106
9339 "Typically, processes must synchronize their access to a shared memory "
9340 "object, using, for example, POSIX semaphores."
9342 "通常は、共有メモリーオブジェクトにアクセスするプロセスは、 POSIX セマフォなど"
9343 "を使ってプロセス間で同期をとらなければならない。"
9346 #: build/C/man7/shm_overview.7:114
9348 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9349 "memory API. POSIX shared memory provides a simpler, and better designed "
9350 "interface; on the other hand POSIX shared memory is somewhat less widely "
9351 "available (especially on older systems) than System V shared memory."
9353 "System V 共有メモリー (B<shmget>(2), B<shmop>(2) など) は古い共有メモリー "
9354 "API である。 POSIX 共有メモリーは、より簡単で、うまく設計されたインターフェー"
9355 "スを提供している。 一方で、POSIX 共有メモリーは System V 共有メモリーと比べる"
9356 "と 利用できるシステムが少ない (特に、古いシステムでは少ない)。"
9359 #: build/C/man7/shm_overview.7:127
9361 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9362 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9363 "B<shm_unlink>(3), B<sem_overview>(7)"
9365 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9366 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9367 "B<shm_unlink>(3), B<sem_overview>(7)"
9370 #: build/C/man2/shmctl.2:45
9376 #: build/C/man2/shmctl.2:45
9382 #: build/C/man2/shmctl.2:48
9383 msgid "shmctl - System V shared memory control"
9384 msgstr "shmctl - System V 共有メモリー (shared memory) を制御する"
9387 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9388 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9389 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9392 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9393 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9394 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9397 #: build/C/man2/shmctl.2:55
9399 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9401 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9404 #: build/C/man2/shmctl.2:62
9406 "B<shmctl>() performs the control operation specified by I<cmd> on the System"
9407 "\\ V shared memory segment whose identifier is given in I<shmid>."
9409 "B<shmctl>() は、識別子が I<shmid> の System\\ V 共有メモリーセグメントに対し"
9410 "て I<cmd> で指示した制御命令を実行する。"
9413 #: build/C/man2/shmctl.2:67
9415 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9416 "I<E<lt>sys/shm.hE<gt>> as follows:"
9418 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインターである。 この構造体は "
9419 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9422 #: build/C/man2/shmctl.2:81
9425 "struct shmid_ds {\n"
9426 " struct ipc_perm shm_perm; /* Ownership and permissions */\n"
9427 " size_t shm_segsz; /* Size of segment (bytes) */\n"
9428 " time_t shm_atime; /* Last attach time */\n"
9429 " time_t shm_dtime; /* Last detach time */\n"
9430 " time_t shm_ctime; /* Last change time */\n"
9431 " pid_t shm_cpid; /* PID of creator */\n"
9432 " pid_t shm_lpid; /* PID of last shmat(2)/shmdt(2) */\n"
9433 " shmatt_t shm_nattch; /* No. of current attaches */\n"
9437 "struct shmid_ds {\n"
9438 " struct ipc_perm shm_perm; /* 所有権と許可 */\n"
9439 " size_t shm_segsz; /* セグメントのサイズ (バイト) */\n"
9440 " time_t shm_atime; /* 最後の付加 (attach) の時刻 */\n"
9441 " time_t shm_dtime; /* 最後の分離 (detach) の時刻 */\n"
9442 " time_t shm_ctime; /* 最後に変更が行われた時刻 */\n"
9443 " pid_t shm_cpid; /* 作成者 (creator) の PID */\n"
9444 " pid_t shm_lpid; /* 最後の shmat(2)/shmdt(2) の PID */\n"
9445 " shmatt_t shm_nattch; /* 現在付加されている数 */\n"
9450 #: build/C/man2/shmctl.2:89
9452 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9453 "settable using B<IPC_SET>):"
9455 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9456 "B<IPC_SET> を使って設定可能である):"
9459 #: build/C/man2/shmctl.2:102
9462 "struct ipc_perm {\n"
9463 " key_t __key; /* Key supplied to shmget(2) */\n"
9464 " uid_t B<uid>; /* Effective UID of owner */\n"
9465 " gid_t B<gid>; /* Effective GID of owner */\n"
9466 " uid_t cuid; /* Effective UID of creator */\n"
9467 " gid_t cgid; /* Effective GID of creator */\n"
9468 " unsigned short B<mode>; /* B<Permissions> + SHM_DEST and\n"
9469 " SHM_LOCKED flags */\n"
9470 " unsigned short __seq; /* Sequence number */\n"
9473 "struct ipc_perm {\n"
9474 " key_t __key; /* shmget(2) に与えられるキー */\n"
9475 " uid_t B<uid>; /* 所有者の実効 UID */\n"
9476 " gid_t B<gid>; /* 所有者の実効 GID */\n"
9477 " uid_t cuid; /* 作成者の実効 UID */\n"
9478 " gid_t cgid; /* 作成者の実効 GID */\n"
9479 " unsigned short B<mode>; /* B<許可> + SHM_DEST と\n"
9480 " SHM_LOCKED フラグ */\n"
9481 " unsigned short __seq; /* シーケンス番号 */\n"
9485 #: build/C/man2/shmctl.2:108
9486 msgid "Valid values for I<cmd> are:"
9487 msgstr "I<cmd> として有効な値は以下の通り:"
9490 #: build/C/man2/shmctl.2:109
9493 msgstr "B<IPC_STAT>"
9496 #: build/C/man2/shmctl.2:118
9498 "Copy information from the kernel data structure associated with I<shmid> "
9499 "into the I<shmid_ds> structure pointed to by I<buf>. The caller must have "
9500 "read permission on the shared memory segment."
9502 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9503 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリーセグメントに対する "
9504 "読み込み許可を持たなければならない。"
9507 #: build/C/man2/shmctl.2:118
9513 #: build/C/man2/shmctl.2:136
9515 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9516 "I<buf> to the kernel data structure associated with this shared memory "
9517 "segment, updating also its I<shm_ctime> member. The following fields can be "
9518 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9519 "of) I<shm_perm.mode>. The effective UID of the calling process must match "
9520 "the owner (I<shm_perm.uid>) or creator (I<shm_perm.cuid>) of the shared "
9521 "memory segment, or the caller must be privileged."
9523 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9524 "有メモリーセグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9525 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9526 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9527 "セスの実効 UID が所有者 (I<shm_perm.uid>) または作成者 (I<shm_perm.cuid>) "
9528 "と一致するか、呼び出し元が特権を持たなければならない。"
9531 #: build/C/man2/shmctl.2:136
9534 msgstr "B<IPC_RMID>"
9537 #: build/C/man2/shmctl.2:149
9539 "Mark the segment to be destroyed. The segment will only actually be "
9540 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9541 "member of the associated structure I<shmid_ds> is zero). The caller must be "
9542 "the owner or creator of the segment, or be privileged. The I<buf> argument "
9545 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9546 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9547 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9548 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9551 #: build/C/man2/shmctl.2:157
9553 "If a segment has been marked for destruction, then the (nonstandard) "
9554 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9555 "structure retrieved by B<IPC_STAT> will be set."
9557 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9558 "I<shm_perm.mode> フィールドの (標準ではない) B<SHM_DEST> フラグが設定され"
9559 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9562 #: build/C/man2/shmctl.2:160
9564 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9565 "its pages that were faulted in will remain in memory or swap."
9567 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9568 "なれば、フォールト (fault) されたページは メモリーかスワップ (swap) に残り続"
9572 #: build/C/man2/shmctl.2:165
9574 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9576 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9579 #: build/C/man2/shmctl.2:165
9581 msgid "B<IPC_INFO> (Linux-specific)"
9582 msgstr "B<IPC_INFO> (Linux 固有)"
9585 #: build/C/man2/shmctl.2:178
9587 "Return information about system-wide shared memory limits and parameters in "
9588 "the structure pointed to by I<buf>. This structure is of type I<shminfo> "
9589 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9590 "B<_GNU_SOURCE> feature test macro is defined:"
9592 "システム全体での共有メモリーの制限とパラメーターに関する情報を、 I<buf> が指"
9593 "す構造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必"
9594 "要である)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9595 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9598 #: build/C/man2/shmctl.2:192
9601 "struct shminfo {\n"
9602 " unsigned long shmmax; /* Maximum segment size */\n"
9603 " unsigned long shmmin; /* Minimum segment size;\n"
9605 " unsigned long shmmni; /* Maximum number of segments */\n"
9606 " unsigned long shmseg; /* Maximum number of segments\n"
9607 " that a process can attach;\n"
9608 " unused within kernel */\n"
9609 " unsigned long shmall; /* Maximum number of pages of\n"
9610 " shared memory, system-wide */\n"
9613 "struct shminfo {\n"
9614 " unsigned long shmmax; /* 最大セグメントサイズ */\n"
9615 " unsigned long shmmin; /* 最小セグメントサイズ。\n"
9617 " unsigned long shmmni; /* 最大セグメント数 */\n"
9618 " unsigned long shmseg; /* プロセスが付加できる\n"
9621 " unsigned long shmall; /* 共有メモリーの最大ページ数。\n"
9626 #: build/C/man2/shmctl.2:205
9628 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9629 "files of the same name; see B<proc>(5) for details."
9631 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9632 "で変更可能である。 詳しくは B<proc>(5) を参照。"
9635 #: build/C/man2/shmctl.2:205
9637 msgid "B<SHM_INFO> (Linux-specific)"
9638 msgstr "B<SHM_INFO> (Linux 固有)"
9641 #: build/C/man2/shmctl.2:216
9643 "Return a I<shm_info> structure whose fields contain information about system "
9644 "resources consumed by shared memory. This structure is defined in "
9645 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9647 "共有メモリーが消費しているシステム資源に関する情報を 格納した I<shm_info> 構"
9648 "造体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9649 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9652 #: build/C/man2/shmctl.2:233
9655 "struct shm_info {\n"
9656 " int used_ids; /* # of currently existing\n"
9658 " unsigned long shm_tot; /* Total number of shared\n"
9659 " memory pages */\n"
9660 " unsigned long shm_rss; /* # of resident shared\n"
9661 " memory pages */\n"
9662 " unsigned long shm_swp; /* # of swapped shared\n"
9663 " memory pages */\n"
9664 " unsigned long swap_attempts;\n"
9665 " /* Unused since Linux 2.4 */\n"
9666 " unsigned long swap_successes;\n"
9667 " /* Unused since Linux 2.4 */\n"
9670 "struct shm_info {\n"
9671 " int used_ids; /* 現在存在するセグメント数 */\n"
9672 " unsigned long shm_tot; /* 共有メモリーのページ総数 */\n"
9673 " unsigned long shm_rss; /* メモリー上にある (スワップされて\n"
9674 " いない) 共有メモリーページ数 */\n"
9675 " unsigned long shm_swp; /* スワップされている共有メモリー\n"
9677 " unsigned long swap_attempts;\n"
9678 " /* Linux 2.4 以降では未使用 */\n"
9679 " unsigned long swap_successes;\n"
9680 " /* Linux 2.4 以降では未使用 */\n"
9684 #: build/C/man2/shmctl.2:235
9686 msgid "B<SHM_STAT> (Linux-specific)"
9687 msgstr "B<SHM_STAT> (Linux 固有)"
9690 #: build/C/man2/shmctl.2:246
9692 "Return a I<shmid_ds> structure as for B<IPC_STAT>. However, the I<shmid> "
9693 "argument is not a segment identifier, but instead an index into the kernel's "
9694 "internal array that maintains information about all shared memory segments "
9697 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9698 "グメント識別子ではなく、システム上の全ての共有メモリー セグメントに関する情報"
9699 "を管理するカーネルの内部配列へのインデックス である。"
9702 #: build/C/man2/shmctl.2:249
9704 "The caller can prevent or allow swapping of a shared memory segment with the "
9705 "following I<cmd> values:"
9707 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリーセグメントが ス"
9708 "ワップされることを防止したり、許可したりできる:"
9711 #: build/C/man2/shmctl.2:250
9713 msgid "B<SHM_LOCK> (Linux-specific)"
9714 msgstr "B<SHM_LOCK> (Linux 固有)"
9717 #: build/C/man2/shmctl.2:262
9719 "Prevent swapping of the shared memory segment. The caller must fault in any "
9720 "pages that are required to be present after locking is enabled. If a "
9721 "segment has been locked, then the (nonstandard) B<SHM_LOCKED> flag of the "
9722 "I<shm_perm.mode> field in the associated data structure retrieved by "
9723 "B<IPC_STAT> will be set."
9725 "共有メモリーセグメントをスワップすることを防止する。 ロックが有効になった後、"
9726 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9727 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9728 "I<shm_perm.mode> フィールドの (標準的ではない) B<SHM_LOCKED> フラグが設定さ"
9729 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9732 #: build/C/man2/shmctl.2:262
9734 msgid "B<SHM_UNLOCK> (Linux-specific)"
9735 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9738 #: build/C/man2/shmctl.2:265
9739 msgid "Unlock the segment, allowing it to be swapped out."
9740 msgstr "セグメントのロックを解除し、スワップアウトすることを可能にする。"
9742 #. There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9743 #. be applied to a segment, regardless of ownership of the segment.
9744 #. This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9745 #. in 2.6.10. MTK, May 2005
9747 #: build/C/man2/shmctl.2:283
9749 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9750 "and B<SHM_UNLOCK>. Since kernel 2.6.10, an unprivileged process can employ "
9751 "these operations if its effective UID matches the owner or creator UID of "
9752 "the segment, and (for B<SHM_LOCK>) the amount of memory to be locked falls "
9753 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9755 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9756 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9757 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9758 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9759 "(B<SHM_LOCK> の場合には) ロックするメモリーの合計が B<RLIMIT_MEMLOCK> リソー"
9760 "ス上限 (B<setrlimit>(2) 参照) の範囲内に入っていることである。"
9763 #: build/C/man2/shmctl.2:301
9765 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9766 "highest used entry in the kernel's internal array recording information "
9767 "about all shared memory segments. (This information can be used with "
9768 "repeated B<SHM_STAT> operations to obtain information about all shared "
9769 "memory segments on the system.) A successful B<SHM_STAT> operation returns "
9770 "the identifier of the shared memory segment whose index was given in "
9771 "I<shmid>. Other operations return 0 on success."
9773 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリーセグメントに"
9774 "関する情報を 管理しているカーネルの内部配列の使用中エントリーのインデックス"
9775 "の うち最大値を返す (この情報は、システムの全ての共有メモリーセグメントに関す"
9776 "る情報を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用でき"
9777 "る)。 B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持"
9778 "つ共有メモリーセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9781 #: build/C/man2/shmctl.2:305
9782 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9783 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9786 #: build/C/man2/shmctl.2:314
9788 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9789 "read access for I<shmid>, and the calling process does not have the "
9790 "B<CAP_IPC_OWNER> capability."
9792 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9793 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9794 "ケーパビリティ (capability) を持っていない。"
9797 #: build/C/man2/shmctl.2:325
9799 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9800 "pointed to by I<buf> isn't accessible."
9802 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9806 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9812 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9813 msgid "I<shmid> points to a removed identifier."
9814 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9817 #: build/C/man2/shmctl.2:337
9819 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command. Or: "
9820 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9821 "to an array slot that is currently unused."
9823 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9824 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9828 #: build/C/man2/shmctl.2:348
9830 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9831 "be-locked segment would mean that the total bytes in locked shared memory "
9832 "segments would exceed the limit for the real user ID of the calling "
9833 "process. This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9834 "(see B<setrlimit>(2))."
9836 "(2.6.9 以降のカーネルにおいて) B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9837 "グメントのサイズ (ロックされる共有メモリーセグメントの合計バイト数) が、 呼び"
9838 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9839 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2) を参照)。"
9842 #: build/C/man2/shmctl.2:353
9844 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9845 "in the structure pointed to by I<buf>."
9847 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9851 #: build/C/man2/shmctl.2:365
9853 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9854 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9855 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9856 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9858 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9859 "作成者 (I<shm_perm.cuid>) でも所有者 (I<shm_perm.uid>) でもなく、プロセスが"
9860 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9863 #: build/C/man2/shmctl.2:377
9865 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9866 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9867 "capability). (Since Linux 2.6.9, this error can also occur if the "
9868 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9870 "または (2.6.9 より前のカーネルで) B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9871 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9872 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9873 "が特権を持たない場合にも、このエラーが起こる。)"
9875 #. SVr4 documents an additional error condition EMFILE.
9877 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9878 #: build/C/man2/shmop.2:231
9879 msgid "SVr4, POSIX.1-2001."
9880 msgstr "SVr4, POSIX.1-2001."
9882 #. Like Linux, the FreeBSD man pages still document
9883 #. the inclusion of these header files.
9885 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9887 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9888 "required on Linux or by any version of POSIX. However, some old "
9889 "implementations required the inclusion of these header files, and the SVID "
9890 "also documented their inclusion. Applications intended to be portable to "
9891 "such old systems may need to include these header files."
9893 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9894 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9895 "実装ではこれらのヘッダーファイルのインクルードが必要であり、 SVID でもこれら"
9896 "のインクルードをするように記載されている。このような古いシステムへの移植性を"
9897 "意図したアプリケーションではこれらのファイルをインクルードする必要があるかも"
9901 #: build/C/man2/shmctl.2:407
9903 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9904 "B<ipcs>(1) program to provide information on allocated resources. In the "
9905 "future, these may modified or moved to a I</proc> filesystem interface."
9907 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1) プログラムで割り当"
9908 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9909 "更されたり、 I</proc> ファイルシステムのインターフェースに移動されるかもしれ"
9913 #: build/C/man2/shmctl.2:415
9915 "Linux permits a process to attach (B<shmat>(2)) a shared memory segment "
9916 "that has already been marked for deletion using I<shmctl(IPC_RMID)>. This "
9917 "feature is not available on other UNIX implementations; portable "
9918 "applications should avoid relying on it."
9920 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9921 "メモリーセグメントを あるプロセスが付加 (attach) (B<shmat>(2)) することを許"
9922 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9923 "プリケーションではこれに依存しないようにすべきである。"
9926 #: build/C/man2/shmctl.2:428
9928 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9929 "2.2 and have become I<long> under Linux 2.4. To take advantage of this, a "
9930 "recompilation under glibc-2.1.91 or later should suffice. (The kernel "
9931 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9933 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9934 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9935 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9936 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9939 #: build/C/man2/shmctl.2:435
9941 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9944 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9945 "B<shm_overview>(7), B<svipc>(7)"
9948 #: build/C/man2/shmget.2:38
9954 #: build/C/man2/shmget.2:38
9960 #: build/C/man2/shmget.2:41
9961 msgid "shmget - allocates a System V shared memory segment"
9962 msgstr "shmget - System V 共有メモリーセグメントを割り当てる"
9965 #: build/C/man2/shmget.2:48
9966 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9967 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9970 #: build/C/man2/shmget.2:72
9972 "B<shmget>() returns the identifier of the System\\ V shared memory segment "
9973 "associated with the value of the argument I<key>. A new shared memory "
9974 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9975 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9976 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9977 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9979 "B<shmget>() は I<key> 引き数に対応する System\\ V 共有メモリーセグメントの識"
9980 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9981 "共有メモリーセグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9982 "場合、 新しい共有メモリーセグメントを作成する。 作成される共有メモリーセグメ"
9983 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9987 #: build/C/man2/shmget.2:91
9989 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9990 "segment already exists for I<key>, then B<shmget>() fails with I<errno> set "
9991 "to B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT "
9992 "| O_EXCL> for B<open>(2).)"
9994 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9995 "応する共有メモリーセグメントが既に存在すると、 B<shmget>() は失敗し、 "
9996 "I<errno> に B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | "
9997 "O_EXCL> を指定した場合の動作と同じである)。"
10000 #: build/C/man2/shmget.2:95
10001 msgid "The value I<shmflg> is composed of:"
10002 msgstr "I<shmflg> は以下の内容から構成される:"
10005 #: build/C/man2/shmget.2:95
10007 msgid "B<IPC_CREAT>"
10008 msgstr "B<IPC_CREAT>"
10010 #. type: Plain text
10011 #: build/C/man2/shmget.2:102
10013 "Create a new segment. If this flag is not used, then B<shmget>() will find "
10014 "the segment associated with I<key> and check to see if the user has "
10015 "permission to access the segment."
10017 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>() "
10018 "は I<key> に対応するセグメントを探し、 ユーザーがそのセグメントにアクセスする"
10019 "許可があるかどうかをチェックする。"
10022 #: build/C/man2/shmget.2:102
10024 msgid "B<IPC_EXCL>"
10025 msgstr "B<IPC_EXCL>"
10027 #. type: Plain text
10028 #: build/C/man2/shmget.2:108
10030 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
10031 "segment. If the segment already exists, the call fails."
10033 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
10034 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
10037 #: build/C/man2/shmget.2:108
10039 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10040 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10042 #. type: Plain text
10043 #: build/C/man2/shmget.2:114
10045 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10046 "I<Documentation/vm/hugetlbpage.txt> for further information."
10048 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10049 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10052 #: build/C/man2/shmget.2:114
10054 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10055 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10057 #. As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10059 #. type: Plain text
10060 #: build/C/man2/shmget.2:133
10062 "This flag serves the same purpose as the B<mmap>(2) B<MAP_NORESERVE> flag. "
10063 "Do not reserve swap space for this segment. When swap space is reserved, "
10064 "one has the guarantee that it is possible to modify the segment. When swap "
10065 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10066 "memory is available. See also the discussion of the file I</proc/sys/vm/"
10067 "overcommit_memory> in B<proc>(5)."
10069 "このフラグは、 B<mmap>(2) の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10070 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10071 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10072 "行わなかった場合は、物理メモリーに空きが ないと書き込み時に B<SIGSEGV> を受け"
10073 "取る可能性がある。 B<proc>(5) にある I</proc/sys/vm/overcommit_memory> ファ"
10076 #. type: Plain text
10077 #: build/C/man2/shmget.2:143
10079 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10080 "specify the permissions granted to the owner, group, and others. These bits "
10081 "have the same format, and the same meaning, as the I<mode> argument of "
10082 "B<open>(2). Presently, execute permissions are not used by the system."
10084 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10085 "への許可を指定する。 これらのビットは B<open>(2) の I<mode> 引き数と同じ形式"
10086 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10088 #. type: Plain text
10089 #: build/C/man2/shmget.2:151
10091 "When a new shared memory segment is created, its contents are initialized to "
10092 "zero values, and its associated data structure, I<shmid_ds> (see "
10093 "B<shmctl>(2)), is initialized as follows:"
10095 "共有メモリーセグメントが新たに作成される際、 共有メモリーセグメントの内容は "
10096 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10099 #. type: Plain text
10100 #: build/C/man2/shmget.2:156
10102 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10105 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10108 #. type: Plain text
10109 #: build/C/man2/shmget.2:161
10111 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10112 "the calling process."
10114 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10117 #. type: Plain text
10118 #: build/C/man2/shmget.2:166
10120 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10121 "significant 9 bit of I<shmflg>."
10123 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10125 #. type: Plain text
10126 #: build/C/man2/shmget.2:170
10127 msgid "I<shm_segsz> is set to the value of I<size>."
10128 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10130 #. type: Plain text
10131 #: build/C/man2/shmget.2:177
10133 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10135 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10137 #. type: Plain text
10138 #: build/C/man2/shmget.2:180
10139 msgid "I<shm_ctime> is set to the current time."
10140 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10142 #. type: Plain text
10143 #: build/C/man2/shmget.2:183
10145 "If the shared memory segment already exists, the permissions are verified, "
10146 "and a check is made to see if it is marked for destruction."
10148 "共有メモリーセグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10149 "(destruction) マークがつけられていないかのチェックが行われる。"
10151 #. type: Plain text
10152 #: build/C/man2/shmget.2:188
10154 "On success, a valid shared memory identifier is returned. On error, -1 is "
10155 "returned, and I<errno> is set to indicate the error."
10157 "成功の場合、有効な共有メモリーセグメントの識別子が返される。 エラーの場合、 "
10158 "-1 が返り、 I<errno> にエラーを示す値が設定される。"
10160 #. type: Plain text
10161 #: build/C/man2/shmget.2:192
10162 msgid "On failure, I<errno> is set to one of the following:"
10163 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10165 #. type: Plain text
10166 #: build/C/man2/shmget.2:198
10168 "The user does not have permission to access the shared memory segment, and "
10169 "does not have the B<CAP_IPC_OWNER> capability."
10171 "ユーザーはその共有メモリーセグメントへのアクセス許可を持たず、 "
10172 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10174 #. type: Plain text
10175 #: build/C/man2/shmget.2:207
10177 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10178 "memory segment already exists for I<key>."
10180 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10181 "有メモリーセグメントはすでに存在する。"
10183 #. type: Plain text
10184 #: build/C/man2/shmget.2:215
10186 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10187 "greater than B<SHMMAX>."
10189 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10190 "B<SHMMAX> よりも大きかった。"
10192 #. type: Plain text
10193 #: build/C/man2/shmget.2:221
10195 "A segment for the given I<key> exists, but I<size> is greater than the size "
10198 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10201 #. type: Plain text
10202 #: build/C/man2/shmget.2:230
10204 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10206 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10209 #. type: Plain text
10210 #: build/C/man2/shmget.2:233
10211 msgid "No memory could be allocated for segment overhead."
10212 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリーがなかった。"
10214 #. type: Plain text
10215 #: build/C/man2/shmget.2:241
10217 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10218 "segment of the requested I<size> would cause the system to exceed the system-"
10219 "wide limit on shared memory (B<SHMALL>)."
10221 "システム全体の共有メモリーセグメント数の制限 (B<SHMMNI>) に達した、または要"
10222 "求された I<size> のセグメントの割り当てが システム全体の共有メモリーサイズの"
10223 "制限 (B<SHMALL>) を超過した。"
10225 #. type: Plain text
10226 #: build/C/man2/shmget.2:248
10228 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10229 "(did not have the B<CAP_IPC_LOCK> capability)."
10231 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10232 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10234 #. type: Plain text
10235 #: build/C/man2/shmget.2:256
10236 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10237 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10239 #. type: Plain text
10240 #: build/C/man2/shmget.2:280
10242 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special "
10243 "value is used for I<key>, the system call ignores all but the least "
10244 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10246 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10247 "使用された場合は、 B<shmget>() は I<shmflg> の下位 9 ビットを除いた全てを無"
10248 "視し、 新しい共有メモリーセグメントを作成する。"
10251 #: build/C/man2/shmget.2:280
10253 msgid "Shared memory limits"
10256 #. type: Plain text
10257 #: build/C/man2/shmget.2:284
10259 "The following limits on shared memory segment resources affect the "
10260 "B<shmget>() call:"
10262 "B<shmget>() コールに影響する共有メモリーセグメント資源の制限は以下の通りであ"
10266 #: build/C/man2/shmget.2:284
10271 #. type: Plain text
10272 #: build/C/man2/shmget.2:288
10274 "System-wide limit on the total amount of shared memory, measured in units of "
10275 "the system page size."
10277 "共有メモリーの全使用量のシステム全体での上限値。 システムページサイズが単位で"
10280 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10281 #. type: Plain text
10282 #: build/C/man2/shmget.2:294
10284 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10285 "shmall>. Since Linux 3.16, the default value for this limit is:"
10287 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10288 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10291 #. type: Plain text
10292 #: build/C/man2/shmget.2:296 build/C/man2/shmget.2:331
10294 msgid " ULONG_MAX - 2^24\n"
10295 msgstr " ULONG_MAX - 2^24\n"
10297 #. type: Plain text
10298 #: build/C/man2/shmget.2:307
10300 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10301 "systems) is to impose no limitation on allocations. This value, rather "
10302 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10303 "historical applications simply raised the existing limit without first "
10304 "checking its current value. Such applications would cause the value to "
10305 "overflow if the limit was set at B<ULONG_MAX>."
10307 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10308 "ステムにも 64 ビットシステムにも適したものになっている)。 B<ULONG_MAX> ではな"
10309 "く、この値が選ばれたのは、 古いアプリケーションが最初に現在の値を確認せずに既"
10310 "存の上限をそのまま増やしてしまっても問題が起こらないようなデフォルト値を選ん"
10311 "だからである。 このようなアプリケーションでは、 上限を B<ULONG_MAX> に設定す"
10312 "ると値がオーバーフローしてしまうことになる。"
10314 #. type: Plain text
10315 #: build/C/man2/shmget.2:310
10316 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10317 msgstr "Linux 2.4 から Linux 3.15 では、この上限のデフォルト値は以下であった。"
10319 #. type: Plain text
10320 #: build/C/man2/shmget.2:312
10322 msgid " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10323 msgstr " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10325 #. type: Plain text
10326 #: build/C/man2/shmget.2:320
10328 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10329 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10330 "GB as the limit on the total memory used by all shared memory segments."
10332 "B<SHMMAX> と B<SHMMNI> が変更されないとすると、 この式の結果に (バイト単位の"
10333 "値を得るために) ページサイズを掛け算すると、 全ての共有メモリーセグメントで使"
10334 "用される全メモリーの上限として、 8 GB という値が得られる。"
10337 #: build/C/man2/shmget.2:320
10342 #. type: Plain text
10343 #: build/C/man2/shmget.2:323
10344 msgid "Maximum size in bytes for a shared memory segment."
10345 msgstr "1 つの共有メモリーセグメントの最大サイズ (バイト数)。"
10347 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10348 #. type: Plain text
10349 #: build/C/man2/shmget.2:329
10351 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10352 "shmmax>. Since Linux 3.16, the default value for this limit is:"
10354 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10355 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10358 #. type: Plain text
10359 #: build/C/man2/shmget.2:340
10361 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10362 "systems) is to impose no limitation on allocations. See the description of "
10363 "B<SHMALL> for a discussion of why this default value (rather than "
10364 "B<ULONG_MAX>) is used."
10366 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10367 "ステムにも 64 ビットシステムにも適したものになっている)。 (B<ULONG_MAX> では"
10368 "なく) このデフォルト値が使われている理由については B<SHMALL> の説明を参照。"
10370 #. type: Plain text
10371 #: build/C/man2/shmget.2:343
10373 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10374 "0x2000000 (32MB)."
10376 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10379 #. type: Plain text
10380 #: build/C/man2/shmget.2:349
10382 "Because it is not possible to map just part of a shared memory segment, the "
10383 "amount of virtual memory places another limit on the maximum size of a "
10384 "usable segment: for example, on i386 the largest segments that can be mapped "
10385 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10387 "共有メモリーセグメントの一部分だけをマッピングすることはできないので、 使用可"
10388 "能なセグメントの最大サイズには仮想メモリーの総量という別の上限が適用される。 "
10389 "例えば、i386 ではマッピング可能な最大セグメントの大きさはおおよそ 2.8GB で、 "
10390 "x86_64 では上限はおおよそ 127TB である。"
10393 #: build/C/man2/shmget.2:349
10398 #. type: Plain text
10399 #: build/C/man2/shmget.2:355
10401 "Minimum size in bytes for a shared memory segment: implementation dependent "
10402 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10404 "共有メモリーセグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10405 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10408 #: build/C/man2/shmget.2:355
10413 #. type: Plain text
10414 #: build/C/man2/shmget.2:360
10416 "System-wide limit on the number of shared memory segments. In Linux 2.2, "
10417 "the default value for this limit was 128; since Linux 2.4, the default value "
10420 "システム全体の共有メモリーセグメント数の上限値。 この上限値のデフォルトは、 "
10421 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10423 #. Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10424 #. that we could create one more segment than SHMMNI -- MTK
10425 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
10426 #. type: Plain text
10427 #: build/C/man2/shmget.2:366
10429 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10431 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10434 #. type: Plain text
10435 #: build/C/man2/shmget.2:370
10437 "The implementation has no specific limits for the per-process maximum number "
10438 "of shared memory segments (B<SHMSEG>)."
10440 "プロセス当りの共有メモリーセグメントの個数の最大値 (B<SHMSEG>) に関する実装"
10443 #. type: Plain text
10444 #: build/C/man2/shmget.2:376
10446 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>() on a "
10447 "shared memory segment scheduled for deletion."
10449 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリーセグメント"
10450 "に対して B<shmget>() が行われると B<EIDRM> を返していた。"
10452 #. type: Plain text
10453 #: build/C/man2/shmget.2:382
10455 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10456 "more clearly show its function."
10458 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10459 "より明確にその機能を表しているだろう。"
10461 #. type: Plain text
10462 #: build/C/man2/shmget.2:391
10464 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10465 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10467 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10468 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10471 #: build/C/man2/shmop.2:41
10476 #. type: Plain text
10477 #: build/C/man2/shmop.2:44
10478 msgid "shmat, shmdt - System V shared memory operations"
10479 msgstr "shmat, shmdt - System V 共有メモリー (shared memory) の操作"
10481 #. type: Plain text
10482 #: build/C/man2/shmop.2:48
10485 "B<#include E<lt>sys/types.hE<gt>>\n"
10486 "B<#include E<lt>sys/shm.hE<gt>>\n"
10488 "B<#include E<lt>sys/types.hE<gt>>\n"
10489 "B<#include E<lt>sys/shm.hE<gt>>\n"
10491 #. type: Plain text
10492 #: build/C/man2/shmop.2:50
10494 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10495 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10497 #. type: Plain text
10498 #: build/C/man2/shmop.2:52
10500 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10501 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10504 #: build/C/man2/shmop.2:54
10509 #. type: Plain text
10510 #: build/C/man2/shmop.2:62
10512 "B<shmat>() attaches the System\\ V shared memory segment identified by "
10513 "I<shmid> to the address space of the calling process. The attaching address "
10514 "is specified by I<shmaddr> with one of the following criteria:"
10516 "B<shmat>() は I<shmid> で指定された System\\ V 共有メモリーセグメント "
10517 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10518 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10520 #. type: Plain text
10521 #: build/C/man2/shmop.2:68
10523 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10524 "which to attach the segment."
10526 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10527 "されていない) アドレスを選択する。"
10529 #. type: Plain text
10530 #: build/C/man2/shmop.2:80
10532 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10533 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10534 "multiple of B<SHMLBA>."
10536 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10537 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10540 #. type: Plain text
10541 #: build/C/man2/shmop.2:84
10543 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10546 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10549 #. type: Plain text
10550 #: build/C/man2/shmop.2:90
10552 "In addition to B<SHM_RND>, the following flags may be specified in the "
10553 "I<shmflg> bit-mask argument:"
10555 "B<SHM_RND> に加えて、以下のフラグを I<shmflg> ビットマスク引き数に指定でき"
10559 #: build/C/man2/shmop.2:90
10561 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10562 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10564 #. type: Plain text
10565 #: build/C/man2/shmop.2:94
10567 "Allow the contents of the segment to be executed. The caller must have "
10568 "execute permission on the segment."
10570 "セグメントの内容を実行できる。 呼び出し元はセグメントに対する実行許可を持って"
10574 #: build/C/man2/shmop.2:94
10576 msgid "B<SHM_RDONLY>"
10577 msgstr "B<SHM_RDONLY>"
10579 #. type: Plain text
10580 #: build/C/man2/shmop.2:102
10582 "Attach the segment for read-only access. The process must have read "
10583 "permission for the segment. If this flag is not specified, the segment is "
10584 "attached for read and write access, and the process must have read and write "
10585 "permission for the segment. There is no notion of a write-only shared "
10588 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10589 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10590 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10591 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリーセ"
10595 #: build/C/man2/shmop.2:102
10597 msgid "B<SHM_REMAP> (Linux-specific)"
10598 msgstr "B<SHM_REMAP> (Linux 固有)"
10600 #. type: Plain text
10601 #: build/C/man2/shmop.2:115
10603 "This flag specifies that the mapping of the segment should replace any "
10604 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10605 "size of the segment. (Normally, an B<EINVAL> error would result if a "
10606 "mapping already exists in this address range.) In this case, I<shmaddr> "
10607 "must not be NULL."
10609 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10610 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10611 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10612 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10614 #. type: Plain text
10615 #: build/C/man2/shmop.2:122
10617 "The B<brk>(2) value of the calling process is not altered by the attach. "
10618 "The segment will automatically be detached at process exit. The same "
10619 "segment may be attached as a read and as a read-write one, and more than "
10620 "once, in the process's address space."
10622 "呼び出したプロセスの B<brk>(2) の値は付加によって変化しない。 そのセグメント"
10623 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10624 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10627 #. type: Plain text
10628 #: build/C/man2/shmop.2:130
10630 "A successful B<shmat>() call updates the members of the I<shmid_ds> "
10631 "structure (see B<shmctl>(2)) associated with the shared memory segment as "
10634 "成功した B<shmat>() コールは共有メモリーセグメントに関連する I<shmid_ds> 構"
10635 "造体 (B<shmctl>(2) を参照) のメンバーを以下のように更新する:"
10637 #. type: Plain text
10638 #: build/C/man2/shmop.2:133
10639 msgid "I<shm_atime> is set to the current time."
10640 msgstr "I<shm_atime> には現在の時刻を設定する。"
10642 #. type: Plain text
10643 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10644 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10645 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10647 #. type: Plain text
10648 #: build/C/man2/shmop.2:140
10649 msgid "I<shm_nattch> is incremented by one."
10650 msgstr "I<shm_nattch> を 1 増加させる。"
10653 #: build/C/man2/shmop.2:140
10658 #. type: Plain text
10659 #: build/C/man2/shmop.2:151
10661 "B<shmdt>() detaches the shared memory segment located at the address "
10662 "specified by I<shmaddr> from the address space of the calling process. The "
10663 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10664 "the value returned by the attaching B<shmat>() call."
10666 "B<shmdt>() は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10667 "ドレスに配置された共有メモリーセグメントを分離 (detach) する。 分離する共有メ"
10668 "モリーセグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10669 "I<shmaddr> は、それを付加した時に B<shmat>() が返した値に等しくなければなら"
10672 #. type: Plain text
10673 #: build/C/man2/shmop.2:157
10675 "On a successful B<shmdt>() call, the system updates the members of the "
10676 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10678 "成功した B<shmdt>() コールはその共有メモリーセグメントに関連する "
10679 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10681 #. type: Plain text
10682 #: build/C/man2/shmop.2:160
10683 msgid "I<shm_dtime> is set to the current time."
10684 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10686 #. type: Plain text
10687 #: build/C/man2/shmop.2:168
10689 "I<shm_nattch> is decremented by one. If it becomes 0 and the segment is "
10690 "marked for deletion, the segment is deleted."
10692 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10695 #. type: Plain text
10696 #: build/C/man2/shmop.2:176
10698 "On success, B<shmat>() returns the address of the attached shared memory "
10699 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10700 "indicate the cause of the error."
10702 "B<shmat>() は、成功した場合、 付加された共有メモリーセグメントのアドレスを返"
10703 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10706 #. type: Plain text
10707 #: build/C/man2/shmop.2:182
10709 "On success, B<shmdt>() returns 0; on error -1 is returned, and I<errno> is "
10710 "set to indicate the cause of the error."
10712 "B<shmdt>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10715 #. type: Plain text
10716 #: build/C/man2/shmop.2:188
10717 msgid "When B<shmat>() fails, I<errno> is set to one of the following:"
10719 "B<shmat>() が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10721 #. type: Plain text
10722 #: build/C/man2/shmop.2:194
10724 "The calling process does not have the required permissions for the requested "
10725 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10727 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10728 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10730 #. type: Plain text
10731 #: build/C/man2/shmop.2:211
10733 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10734 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10735 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10737 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10738 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10739 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10740 "れているが、 I<shmaddr> が NULL であった。"
10742 #. type: Plain text
10743 #: build/C/man2/shmop.2:214
10744 msgid "Could not allocate memory for the descriptor or for the page tables."
10746 "ディスクリプター (descriptor) やページテーブルのためのメモリーを 割り当てるこ"
10749 #. type: Plain text
10750 #: build/C/man2/shmop.2:220
10751 msgid "When B<shmdt>() fails, I<errno> is set as follows:"
10752 msgstr "B<shmdt>() が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10754 #. The following since 2.6.17-rc1:
10755 #. type: Plain text
10756 #: build/C/man2/shmop.2:228
10758 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10759 "not aligned on a page boundary."
10761 "I<shmaddr> に付加された共有メモリーセグメントが存在しない。 もしくは、 "
10762 "I<shmaddr> がページ境界に合っていない。"
10764 #. type: Plain text
10765 #: build/C/man2/shmop.2:243
10767 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10768 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10769 "B<shmat>() from I<char\\ *> into I<void\\ *>."
10771 "SVID 3 で (たぶんそれより前だと思うが) I<shmaddr> 引き数の型は I<char\\ *> "
10772 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10775 #. type: Plain text
10776 #: build/C/man2/shmop.2:248
10778 "After a B<fork>(2), the child inherits the attached shared memory segments."
10780 "B<fork>(2) した後、子プロセスは付加された共有メモリーセグメントを継承する。"
10782 #. type: Plain text
10783 #: build/C/man2/shmop.2:252
10785 "After an B<execve>(2), all attached shared memory segments are detached from "
10788 "B<exec>(2) した後、全ての付加された共有メモリーセグメントはプロセスから分離"
10791 #. type: Plain text
10792 #: build/C/man2/shmop.2:256
10794 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10797 "B<exit>(2) において、全ての付加された共有メモリーセグメントはプロセスから分"
10800 #. type: Plain text
10801 #: build/C/man2/shmop.2:268
10803 "Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable "
10804 "way of attaching a shared memory segment. Be aware that the shared memory "
10805 "segment attached in this way may be attached at different addresses in "
10806 "different processes. Therefore, any pointers maintained within the shared "
10807 "memory must be made relative (typically to the starting address of the "
10808 "segment), rather than absolute."
10810 "共有メモリーセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> "
10811 "を NULL にして B<shmat>() を使用するのがよい。 このような方法で付加される共"
10812 "有メモリーセグメントは、 プロセスが異なれば別のアドレスに付加される、という点"
10813 "に注意すること。 よって共有メモリー内で管理されるポインターは、 絶対アドレス"
10814 "ではなく、 (一般的にはセグメントの開始アドレスからの) 相対アドレスで作成する"
10817 #. type: Plain text
10818 #: build/C/man2/shmop.2:273
10820 "On Linux, it is possible to attach a shared memory segment even if it is "
10821 "already marked to be deleted. However, POSIX.1-2001 does not specify this "
10822 "behavior and many other implementations do not support it."
10824 "Linux では共有メモリーセグメントに既に削除マークが付けられていても、 その共有"
10825 "メモリーセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような"
10826 "動作を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10828 #. type: Plain text
10829 #: build/C/man2/shmop.2:276
10830 msgid "The following system parameter affects B<shmat>():"
10831 msgstr "以下のシステムパラメーターは、 B<shmat>() に影響する:"
10834 #: build/C/man2/shmop.2:276
10839 #. type: Plain text
10840 #: build/C/man2/shmop.2:289
10842 "Segment low boundary address multiple. When explicitly specifying an attach "
10843 "address in a call to B<shmat>(), the caller should ensure that the address "
10844 "is a multiple of this value. This is necessary on some architectures, in "
10845 "order either to ensure good CPU cache performance or to ensure that "
10846 "different attaches of the same segment have consistent views within the CPU "
10847 "cache. B<SHMLBA> is normally some multiple of the system page size (on many "
10848 "Linux architectures, it is the same as the system page size)."
10850 "セグメントの下限アドレス倍数 (Segment low boundary address multiple)。 "
10851 "B<shmat>() の呼び出しにおいて付加するアドレスを明示的に指定する際、 呼び出し"
10852 "元は指定するアドレスがこの値の倍数になるように保証しなければならない。 これは"
10853 "いくつかのアーキテクチャーでは必要なことで、 CPU キャッシュの性能を保証するた"
10854 "めであったり、 同じセグメントの別の付与を CPU キャッシュ内部で一貫して扱える"
10855 "ようにするためだったりする。 B<SHMLBA> は通常はシステムページサイズの倍数であ"
10856 "る (Linux の多くのアーキテクチャーではシステムページサイズと同じである)。"
10858 #. type: Plain text
10859 #: build/C/man2/shmop.2:293
10861 "The implementation places no intrinsic per-process limit on the number of "
10862 "shared memory segments (B<SHMSEG>)."
10864 "現在の実装では、プロセスごとの 共有メモリーセグメントの最大数 (B<SHMSEG>) に"
10867 #. type: Plain text
10868 #: build/C/man2/shmop.2:301
10870 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10871 "B<shm_overview>(7), B<svipc>(7)"
10873 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10874 "B<shm_overview>(7), B<svipc>(7)"
10877 #: build/C/man2/subpage_prot.2:30
10879 msgid "SUBPAGE_PROT"
10880 msgstr "SUBPAGE_PROT"
10883 #: build/C/man2/subpage_prot.2:30
10886 msgstr "2012-07-13"
10888 #. type: Plain text
10889 #: build/C/man2/subpage_prot.2:33
10890 msgid "subpage_prot - define a subpage protection for an address range"
10893 #. type: Plain text
10894 #: build/C/man2/subpage_prot.2:37
10897 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10898 "B< uint32_t *>I<map>B<);>\n"
10900 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10901 "B< uint32_t *>I<map>B<);>\n"
10903 #. type: Plain text
10904 #: build/C/man2/subpage_prot.2:41
10905 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10907 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10910 #. type: Plain text
10911 #: build/C/man2/subpage_prot.2:47
10913 "The PowerPC-specific B<subpage_prot>() system call provides the facility to "
10914 "control the access permissions on individual 4kB subpages on systems "
10915 "configured with a page size of 64kB."
10918 #. type: Plain text
10919 #: build/C/man2/subpage_prot.2:54
10921 "The protection map is applied to the memory pages in the region starting at "
10922 "I<addr> and continuing for I<len> bytes. Both of these arguments must be "
10923 "aligned to a 64-kB boundary."
10926 #. type: Plain text
10927 #: build/C/man2/subpage_prot.2:66
10929 "The protection map is specified in the buffer pointed to by I<map>. The map "
10930 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10931 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10932 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10933 "I<len>). Each 2-bit field in the protection map is either 0 to allow any "
10934 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10937 #. type: Plain text
10938 #: build/C/man2/subpage_prot.2:71
10940 "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes "
10941 "specified below is returned."
10944 #. type: Plain text
10945 #: build/C/man2/subpage_prot.2:77
10946 msgid "The buffer referred to by I<map> is not accessible."
10949 #. type: Plain text
10950 #: build/C/man2/subpage_prot.2:87
10952 "The I<addr> or I<len> arguments are incorrect. Both of these arguments must "
10953 "be aligned to a multiple of the system page size, and they must not refer to "
10954 "a region outside of the address space of the process or to a region that "
10955 "consists of huge pages."
10958 #. type: Plain text
10959 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10960 msgid "Out of memory."
10961 msgstr "メモリー不足である。"
10963 #. type: Plain text
10964 #: build/C/man2/subpage_prot.2:96
10966 "This system call is provided on the PowerPC architecture since Linux "
10967 "2.6.25. The system call is provided only if the kernel is configured with "
10968 "B<CONFIG_PPC_64K_PAGES>. No library support is provided."
10971 #. type: Plain text
10972 #: build/C/man2/subpage_prot.2:101
10974 "Glibc does not provide a wrapper for this system call; call it using "
10978 #. type: Plain text
10979 #: build/C/man2/subpage_prot.2:106
10981 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10982 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10983 "field won't allow writes to a page that is otherwise write-protected."
10987 #: build/C/man2/subpage_prot.2:106
10992 #. In the initial implementation, it was the case that:
10993 #. In fact the whole process is switched to use 4k hardware pages when the
10994 #. subpage_prot system call is used, but this could be improved in future
10995 #. to switch only the affected segments.
10996 #. But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10997 #. the affected segment, not the whole process.
10998 #. type: Plain text
10999 #: build/C/man2/subpage_prot.2:128
11001 "This system call is provided to assist writing emulators that operate using "
11002 "64-kB pages on PowerPC systems. When emulating systems such as x86, which "
11003 "uses a smaller page size, the emulator can no longer use the memory-"
11004 "management unit (MMU) and normal system calls for controlling page "
11005 "protections. (The emulator could emulate the MMU by checking and possibly "
11006 "remapping the address for each memory access in software, but that is "
11007 "slow.) The idea is that the emulator supplies an array of protection masks "
11008 "to apply to a specified range of virtual addresses. These masks are applied "
11009 "at the level where hardware page-table entries (PTEs) are inserted into the "
11010 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
11011 "affected. Implicit in this is that the regions of the address space that "
11012 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
11013 "hardware pages (on machines with hardware 64-kB page support)."
11016 #. type: Plain text
11017 #: build/C/man2/subpage_prot.2:131
11018 msgid "B<mprotect>(2), B<syscall>(2)"
11019 msgstr "B<mprotect>(2), B<syscall>(2)"
11021 #. type: Plain text
11022 #: build/C/man2/subpage_prot.2:134
11023 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
11024 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
11027 #: build/C/man2/sync_file_range.2:30
11029 msgid "SYNC_FILE_RANGE"
11030 msgstr "SYNC_FILE_RANGE"
11033 #: build/C/man2/sync_file_range.2:30
11036 msgstr "2014-08-19"
11038 #. type: Plain text
11039 #: build/C/man2/sync_file_range.2:33
11040 msgid "sync_file_range - sync a file segment with disk"
11041 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
11043 #. type: Plain text
11044 #: build/C/man2/sync_file_range.2:37
11047 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
11048 "B<#include E<lt>fcntl.hE<gt>>\n"
11050 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
11051 "B<#include E<lt>fcntl.hE<gt>>\n"
11053 #. type: Plain text
11054 #: build/C/man2/sync_file_range.2:40
11057 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11058 "B< unsigned int >I<flags>B<);>\n"
11060 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11061 "B< unsigned int >I<flags>B<);>\n"
11063 #. type: Plain text
11064 #: build/C/man2/sync_file_range.2:47
11066 "B<sync_file_range>() permits fine control when synchronizing the open file "
11067 "referred to by the file descriptor I<fd> with disk."
11069 "B<sync_file_range>() を使うと、ファイルディスクリプター I<fd> で参照される"
11070 "オープンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能とな"
11073 #. type: Plain text
11074 #: build/C/man2/sync_file_range.2:61
11076 "I<offset> is the starting byte of the file range to be synchronized. "
11077 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11078 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11079 "are synchronized. Synchronization is in units of the system page size: "
11080 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11081 "rounded up to a page boundary."
11083 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11084 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11085 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11086 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11087 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11089 #. type: Plain text
11090 #: build/C/man2/sync_file_range.2:65
11091 msgid "The I<flags> bit-mask argument can include any of the following values:"
11092 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11095 #: build/C/man2/sync_file_range.2:65
11097 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11098 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11100 #. type: Plain text
11101 #: build/C/man2/sync_file_range.2:70
11103 "Wait upon write-out of all pages in the specified range that have already "
11104 "been submitted to the device driver for write-out before performing any "
11107 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11108 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11112 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11114 msgid "B<SYNC_FILE_RANGE_WRITE>"
11115 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11117 #. type: Plain text
11118 #: build/C/man2/sync_file_range.2:76
11120 "Initiate write-out of all dirty pages in the specified range which are not "
11121 "presently submitted write-out. Note that even this may block if you attempt "
11122 "to write more than request queue size."
11124 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11125 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11126 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11130 #: build/C/man2/sync_file_range.2:76
11132 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11133 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11135 #. type: Plain text
11136 #: build/C/man2/sync_file_range.2:80
11138 "Wait upon write-out of all pages in the range after performing any write."
11140 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11143 #. type: Plain text
11144 #: build/C/man2/sync_file_range.2:84
11145 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11146 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11149 #: build/C/man2/sync_file_range.2:84
11154 #. type: Plain text
11155 #: build/C/man2/sync_file_range.2:100
11157 "This system call is extremely dangerous and should not be used in portable "
11158 "programs. None of these operations writes out the file's metadata. "
11159 "Therefore, unless the application is strictly performing overwrites of "
11160 "already-instantiated disk blocks, there are no guarantees that the data will "
11161 "be available after a crash. There is no user interface to know if a write "
11162 "is purely an overwrite. On filesystems using copy-on-write semantics (e.g., "
11163 "I<btrfs>) an overwrite of existing allocated blocks is impossible. When "
11164 "writing into preallocated space, many filesystems also require calls into "
11165 "the block allocator, which this system call does not sync out to disk. This "
11166 "system call does not flush disk write caches and thus does not provide any "
11167 "data integrity on systems with volatile disk write caches."
11169 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11170 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11171 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11172 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11173 "みが上書きだけであるかを知るためのユーザーインターフェースは存在しない。 "
11174 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11175 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11176 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11177 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11178 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11179 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11180 "コールではデータの一貫性を確保できないことになる。"
11183 #: build/C/man2/sync_file_range.2:100
11185 msgid "Some details"
11188 #. type: Plain text
11189 #: build/C/man2/sync_file_range.2:108
11191 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11192 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11194 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11195 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11197 #. type: Plain text
11198 #: build/C/man2/sync_file_range.2:112
11199 msgid "Useful combinations of the I<flags> bits are:"
11200 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11203 #: build/C/man2/sync_file_range.2:112
11205 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11206 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11208 #. type: Plain text
11209 #: build/C/man2/sync_file_range.2:120
11211 "Ensures that all pages in the specified range which were dirty when "
11212 "B<sync_file_range>() was called are placed under write-out. This is a "
11213 "start-write-for-data-integrity operation."
11215 "指定された範囲内のページで、 B<sync_file_range>() が呼び出された際に dirty "
11216 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11217 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11220 #. type: Plain text
11221 #: build/C/man2/sync_file_range.2:127
11223 "Start write-out of all dirty pages in the specified range which are not "
11224 "presently under write-out. This is an asynchronous flush-to-disk "
11225 "operation. This is not suitable for data integrity operations."
11227 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11228 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk) 操作であ"
11229 "る。データ完全性確保が必要な操作としては適切ではない。"
11232 #: build/C/man2/sync_file_range.2:127
11234 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11235 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11237 #. type: Plain text
11238 #: build/C/man2/sync_file_range.2:134
11240 "Wait for completion of write-out of all pages in the specified range. This "
11241 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11242 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11243 "and obtain its result."
11245 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11246 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11247 "き、この操作の完了を待ち、結果を取得することができる。"
11250 #: build/C/man2/sync_file_range.2:134
11252 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11253 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11255 #. type: Plain text
11256 #: build/C/man2/sync_file_range.2:141
11258 "This is a write-for-data-integrity operation that will ensure that all pages "
11259 "in the specified range which were dirty when B<sync_file_range>() was "
11260 "called are committed to disk."
11262 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11263 "り、指定された範囲内の、 B<sync_file_range>() が呼ばれた時点で dirty な全て"
11264 "のページが ディスクに格納されることが保証される。"
11266 #. type: Plain text
11267 #: build/C/man2/sync_file_range.2:147
11269 "On success, B<sync_file_range>() returns 0; on failure -1 is returned and "
11270 "I<errno> is set to indicate the error."
11272 "成功の場合、 B<sync_file_range>() は 0 を返す。失敗の場合、-1 を返し、 "
11273 "I<errno> にエラーを示す値を設定する。"
11275 #. type: Plain text
11276 #: build/C/man2/sync_file_range.2:152
11277 msgid "I<fd> is not a valid file descriptor."
11278 msgstr "I<fd> が有効なファイルディスクリプターではない。"
11280 #. type: Plain text
11281 #: build/C/man2/sync_file_range.2:160
11283 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11285 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11288 #. type: Plain text
11289 #: build/C/man2/sync_file_range.2:163
11293 #. type: Plain text
11294 #: build/C/man2/sync_file_range.2:169
11295 msgid "Out of disk space."
11296 msgstr "ディスク領域不足である。"
11298 #. FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11299 #. (In user space at least) it isn't possible to obtain a file descriptor
11300 #. for a symbolic link.
11301 #. type: Plain text
11302 #: build/C/man2/sync_file_range.2:177
11304 "I<fd> refers to something other than a regular file, a block device, a "
11305 "directory, or a symbolic link."
11307 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11310 #. type: Plain text
11311 #: build/C/man2/sync_file_range.2:180
11312 msgid "B<sync_file_range>() appeared on Linux in kernel 2.6.17."
11313 msgstr "B<sync_file_range>() はカーネル 2.6.17 で Linux に登場した。"
11315 #. type: Plain text
11316 #: build/C/man2/sync_file_range.2:183
11318 "This system call is Linux-specific, and should be avoided in portable "
11321 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11325 #: build/C/man2/sync_file_range.2:184
11327 msgid "sync_file_range2()"
11328 msgstr "sync_file_range2()"
11330 #. See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11331 #. type: Plain text
11332 #: build/C/man2/sync_file_range.2:201
11334 "Some architectures (e.g., PowerPC, ARM) need 64-bit arguments to be aligned "
11335 "in a suitable pair of registers. On such architectures, the call signature "
11336 "of B<sync_file_range>() shown in the SYNOPSIS would force a register to be "
11337 "wasted as padding between the I<fd> and I<offset> arguments. (See "
11338 "B<syscall>(2) for details.) Therefore, these architectures define a "
11339 "different system call that orders the arguments suitably:"
11341 "いくつかのアーキテクチャー (例えば、 PowerPC や ARM) では、 64 ビットの引き数"
11342 "は適切なレジスターの組に割り当てる必要がある。 このようなアーキテクチャーで"
11343 "は、 「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 "
11344 "引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費"
11345 "されてしまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテク"
11346 "チャーでは引き数が適切な順序になった別のシステムコールが定義されている。"
11348 #. type: Plain text
11349 #: build/C/man2/sync_file_range.2:206
11352 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11353 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11355 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11356 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11358 #. type: Plain text
11359 #: build/C/man2/sync_file_range.2:211
11361 "The behavior of this system call is otherwise exactly the same as "
11362 "B<sync_file_range>()."
11364 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11365 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11366 "glibc では提供されていない。"
11368 #. type: Plain text
11369 #: build/C/man2/sync_file_range.2:222
11371 "A system call with this signature first appeared on the ARM architecture in "
11372 "Linux 2.6.20, with the name B<arm_sync_file_range>(). It was renamed in "
11373 "Linux 2.6.22, when the analogous system call was added for PowerPC. On "
11374 "architectures where glibc support is provided, glibc transparently wraps "
11375 "B<sync_file_range2>() under the name B<sync_file_range>()."
11377 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャーで\n"
11378 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11379 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11380 "システムコールの名前が変更された。\n"
11381 "glibc によるサポートが提供されているアーキテクチャーでは、\n"
11382 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11383 "B<sync_file_range2>() を適切に使用するようになっている。"
11385 #. type: Plain text
11386 #: build/C/man2/sync_file_range.2:227
11387 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11388 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11391 #: build/C/man2/memfd_create.2:21
11393 msgid "MEMFD_CREATE"
11394 msgstr "MEMFD_CREATE"
11396 #. type: Plain text
11397 #: build/C/man2/memfd_create.2:24
11398 msgid "memfd_create - create an anonymous file"
11399 msgstr "memfd_create - 無名ファイル (anonymous file) を作成する"
11401 #. type: Plain text
11402 #: build/C/man2/memfd_create.2:26
11403 msgid "B<#include E<lt>sys/memfd.hE<gt>>"
11404 msgstr "B<#include E<lt>sys/memfd.hE<gt>>"
11406 #. type: Plain text
11407 #: build/C/man2/memfd_create.2:28
11408 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11409 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11412 #. memfd uses VM_NORESERVE so each page is accounted on first access.
11413 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
11414 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
11415 #. those are accounted on "current" and "current->mm", that is, the
11416 #. process doing the first page access.
11417 #. type: Plain text
11418 #: build/C/man2/memfd_create.2:51
11420 "B<memfd_create>() creates an anonymous file and returns a file descriptor "
11421 "that refers to it. The file behaves like a regular file, and so can be "
11422 "modified, truncated, memory-mapped, and so on. However, unlike a regular "
11423 "file, it lives in RAM and has a volatile backing storage. Once all "
11424 "references to the file are dropped, it is automatically released. Anonymous "
11425 "memory is used for all backing pages of the file. Therefore, files created "
11426 "by B<memfd_create>() have the same semantics as other anonymous memory "
11427 "allocations such as those allocated using B<mmap>(2) with the "
11428 "B<MAP_ANONYMOUS> flag."
11430 "B<memfd_create>() は、 無名ファイル (anonymous file) を作成し、 そのファイル"
11431 "を参照するファイルディスクリプターを返す。 このファイルは通常のファイルと同様"
11432 "に振る舞い、 変更、切り詰め (truncate)、 メモリーマップなどを行うことができ"
11433 "る。 しかし、 通常のファイルとは違い、 このファイルは RAM 上に置かれ、 格納さ"
11434 "れるストレージは揮発性である。 このファイルへの参照がすべてなくなると、 ファ"
11435 "イルは自動的に解放される。 このファイルが置かれるページには無名メモリー "
11436 "(anonymous memory) が使用される。 したがって、 B<memfd_create>() で作成された"
11437 "フィアルは、 他の無名メモリーの割り当て (B<MAP_ANONYMOUS> フラグ付きの "
11438 "B<mmap>(2) を使って割り当てられた無名メモリーなど) と同じ動作をする。"
11440 #. type: Plain text
11441 #: build/C/man2/memfd_create.2:58
11443 "The initial size of the file is set to 0. Following the call, the file size "
11444 "should be set using B<ftruncate>(2). (Alternatively, the file may be "
11445 "populated by calls to B<write>(2) or similar.)"
11447 "ファイルの初期サイズは 0 に設定される。 呼び出しの後に、 B<ftruncate>(2) を"
11448 "使ってファイルサイズを設定すべきである (代わりに、 B<write>(2) や同様の関数を"
11449 "呼び出してファイルにデータを書き込むこともできる)。"
11451 #. type: Plain text
11452 #: build/C/man2/memfd_create.2:69
11454 "The name supplied in I<name> is used as a filename and will be displayed as "
11455 "the target of the corresponding symbolic link in the directory I</proc/self/"
11456 "fd/>. The displayed name is always prefixed with I<memfd:> and serves only "
11457 "for debugging purposes. Names do not affect the behavior of the file "
11458 "descriptor, and as such multiple files can have the same name without any "
11461 "I<name> に指定された名前はファイル名として使用され、 ディレクトリ I</proc/"
11462 "self/fd/> で対応するシンボリックリンクのリンク先として表示される。 表示される"
11463 "名前の前には常に I<memfd:> が付き、 この名前はデバッグ用途としてのみ機能す"
11464 "る。 名前はファイルディスクリプターの動作には影響せず、 複数のファイルが同じ"
11467 #. type: Plain text
11468 #: build/C/man2/memfd_create.2:74
11470 "The following values may be bitwise ORed in I<flags> to change the behaviour "
11471 "of B<memfd_create>():"
11473 "以下の値をビット論理和で I<flags> に指定して、 B<memfd_create>() の動作を変更"
11477 #: build/C/man2/memfd_create.2:74
11479 msgid "B<MFD_CLOEXEC>"
11480 msgstr "B<MFD_CLOEXEC>"
11482 #. type: Plain text
11483 #: build/C/man2/memfd_create.2:84
11485 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
11486 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
11489 "新しいファイルディスクリプターに close-on-exec (B<FD_CLOEXEC>) フラグをセット"
11490 "する。 これが有用な理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参"
11494 #: build/C/man2/memfd_create.2:84
11496 msgid "B<MFD_ALLOW_SEALING>"
11497 msgstr "B<MFD_ALLOW_SEALING>"
11499 #. FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
11500 #. Is it worth adding some text explaining this?
11501 #. type: Plain text
11502 #: build/C/man2/memfd_create.2:100
11504 "Allow sealing operations on this file. See the discussion of the "
11505 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
11506 "below. The initial set of seals is empty. If this flag is not set, the "
11507 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
11508 "be set on the file."
11510 "このファイルに対して sealing 操作を許可する。 B<fcntl>(2) の B<F_ADD_SEALS> "
11511 "と B<F_GET_SEALS> 操作の議論を参照。 下記の「注意」も参照。 初期の seal 集合"
11512 "は空となる。 このフラグを指定しなかった場合、 初期の seal 集合は "
11513 "B<F_SEAL_SEAL> となり、 これはこのファイルには他の seal をセットできないこと"
11516 #. type: Plain text
11517 #: build/C/man2/memfd_create.2:104
11518 msgid "Unused bits in I<flags> must be 0."
11519 msgstr "I<flags> の未使用のビットは 0 でなければならない。"
11521 #. type: Plain text
11522 #: build/C/man2/memfd_create.2:113
11524 "As its return value, B<memfd_create>() returns a new file descriptor that "
11525 "can be used to refer to the file. This file descriptor is opened for both "
11526 "reading and writing (B<O_RDWR>) and B<O_LARGEFILE> is set for the "
11529 "返り値として B<memfd_create>() は、 作成したファイルを参照するのに使用できる"
11530 "新しいファイルディスクリプターを返す。 このファイルディスクリプターは読み書き"
11531 "両用 (B<O_RDWR>) でオープンされ、 B<O_LARGEFILE> がこのファイルディスクリプ"
11534 #. type: Plain text
11535 #: build/C/man2/memfd_create.2:126
11537 "With respect to B<fork>(2) and B<execve>(2), the usual semantics apply for "
11538 "the file descriptor created by B<memfd_create>(). A copy of the file "
11539 "descriptor is inherited by the child produced by B<fork>(2) and refers to "
11540 "the same file. The file descriptor is preserved across B<execve>(2), unless "
11541 "the close-on-exec flag has been set."
11543 "B<fork>(2) と B<execve>(2) に関しては、 B<memfd_create>() で作成したファイル"
11544 "ディスクリプターについても通常の動作が適用される。 ファイルディスクリプターの"
11545 "コピーは B<fork>(2) で生成される子プロセスに継承され、 同じファイルを参照す"
11546 "る。 close-on-exec フラグがセットされていない限り、 B<execve>(2) の前後でファ"
11547 "イルディスクリプターは保持される。"
11549 #. type: Plain text
11550 #: build/C/man2/memfd_create.2:133
11552 "On success, B<memfd_create>() returns a new file descriptor. On error, -1 "
11553 "is returned and I<errno> is set to indicate the error."
11555 "成功の場合、 B<memfd_create>() は新しいファイルディスクリプターを返す。 エ"
11556 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11558 #. type: Plain text
11559 #: build/C/man2/memfd_create.2:139
11560 msgid "The address in I<name> points to invalid memory."
11561 msgstr "I<name> のアドレスが無効なメモリーを指している。"
11563 #. type: Plain text
11564 #: build/C/man2/memfd_create.2:146
11566 "An unsupported value was specified in one of the arguments: I<flags> "
11567 "included unknown bits, or I<name> was too long."
11569 "サポートされていない値がいずれかの引き数で指定された。 I<flags> に未知のビッ"
11570 "トが含まれていたか、 I<name> が長過ぎた。"
11572 #. type: Plain text
11573 #: build/C/man2/memfd_create.2:149
11574 msgid "The per-process limit on open file descriptors has been reached."
11576 "オープンされているファイルディスクリプターのプロセス単位の上限に達した。"
11578 #. type: Plain text
11579 #: build/C/man2/memfd_create.2:152
11581 "The system-wide limit on the total number of open files has been reached."
11582 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
11584 #. type: Plain text
11585 #: build/C/man2/memfd_create.2:155
11586 msgid "There was insufficient memory to create a new anonymous file."
11587 msgstr "新しい無名ファイルを作成するのに十分なメモリーがなかった。"
11589 #. FIXME . When glibc support appears, update the following sentence:
11590 #. type: Plain text
11591 #: build/C/man2/memfd_create.2:161
11593 "The B<memfd_create>() system call first appeared in Linux 3.17. Support in "
11594 "the GNU C library is pending."
11596 "B<memfd_create>() システムコールは Linux 3.17 で初めて登場した。 GNU C ライブ"
11599 #. type: Plain text
11600 #: build/C/man2/memfd_create.2:165
11601 msgid "The B<memfd_create>() system call is Linux-specific."
11602 msgstr "B<memfd_create>() システムコールは Linux 固有である。"
11604 #. See also http://lwn.net/Articles/593918/
11605 #. and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
11606 #. type: Plain text
11607 #: build/C/man2/memfd_create.2:178
11609 "The B<memfd_create>() system call provides a simple alternative to manually "
11610 "mounting a I<tmpfs> filesystem and creating and opening a file in that "
11611 "filesystem. The primary purpose of B<memfd_create>() is to create files "
11612 "and associated file descriptors that are used with the file-sealing APIs "
11613 "provided by B<fcntl>(2)."
11615 "B<memfd_create>() システムコールは、 手動で I<tmpfs> ファイルシステムをマウン"
11616 "トして、 そのファイルシステムにファイルをオープンするという操作の、 簡単な代"
11617 "替手段を提供している。 B<memfd_create>() の主な目的は、 B<fcntl>(2) が提供す"
11618 "る file-sealing API で使用できる、 ファイルとそれに関連付けられるファイルディ"
11619 "スクリプターを作成することである。"
11621 #. type: Plain text
11622 #: build/C/man2/memfd_create.2:192
11624 "The B<memfd_create>() system call also has uses without file sealing (which "
11625 "is why file-sealing is disabled, unless explicitly requested with the "
11626 "B<MFD_ALLOW_SEALING> flag). In particular, it can be used as an alternative "
11627 "to creating files in I<tmp> or as an alternative to using the B<open>(2) "
11628 "B<O_TMPFILE> in cases where there is no intention to actually link the "
11629 "resulting file into the filesystem."
11631 "B<memfd_create>() システムコールは、 file sealing なしでも用途がある (これが"
11632 "明示的に B<MFD_ALLOW_SEALING> フラグが要求されない限り、 file-sealing が無効"
11633 "になる理由である)。 特に、 ファイルシステムに実際にファイルを残す意図がない場"
11634 "合、 I<tmp> にファイルを作成したり B<open>(2) B<O_TMPFILE> を使ったりする際の"
11638 #: build/C/man2/memfd_create.2:192
11640 msgid "File sealing"
11641 msgstr "file sealing"
11643 #. type: Plain text
11644 #: build/C/man2/memfd_create.2:210
11646 "In the absence of file sealing, processes that communicate via shared memory "
11647 "must either trust each other, or take measures to deal with the possibility "
11648 "that an untrusted peer may manipulate the shared memory region in "
11649 "problematic ways. For example, an untrusted peer might modify the contents "
11650 "of the shared memory at any time, or shrink the shared memory region. The "
11651 "former possibility leaves the local process vulnerable to time-of-check-to-"
11652 "time-of-use race conditions (typically dealt with by copying data from the "
11653 "shared memory region before checking and using it). The latter possibility "
11654 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
11655 "made to access a now-nonexistent location in the shared memory region. "
11656 "(Dealing with this possibility necessitates the use of a handler for the "
11657 "B<SIGBUS> signal.)"
11659 "file sealing がない場合、 共有メモリー経由で通信するプロセスは、 互いに信頼す"
11660 "るか、 信頼していない相手が共有メモリー領域を問題がある方法で操作する可能性に"
11661 "対処するための対策を講じなければならない。\n"
11662 "例えば、 信頼していない相手は、 いつでも共有メモリーの内容を変更したり、 共有"
11663 "メモリー領域を縮小したりする可能性がある。 前者の場合は、 ローカルプロセスで"
11664 "は、 データの確認時点と使用時点の競合条件の問題が起こり得る (通常はこの問題へ"
11665 "の対処は共有メモリー領域からデータをこぴーしてからデータを確認、使用すること"
11666 "である)。 後者の場合は、 ローカルプロセスでは、 共有メモリー領域の存在しなく"
11667 "なった場所にアクセスしようとした際にシグナル B<SIGBUS> が発生する可能性があ"
11668 "る (この可能性に対処するにはシグナル B<SIGBUS> に対してハンドラーを使用する必"
11671 #. type: Plain text
11672 #: build/C/man2/memfd_create.2:216
11674 "Dealing with untrusted peers imposes extra complexity on code that employs "
11675 "shared memory. Memory sealing enables that extra complexity to be "
11676 "eliminated, by allowing a process to operate secure in the knowledge that "
11677 "its peer can't modify the shared memory in an undesired fashion."
11679 "信頼していない相手への対処により、 共有メモリーを利用するコードに余計な複雑性"
11680 "が増すことになる。 メモリー sealing により余計な複雑性をなくすことができる。 "
11681 "相手が望まない方法で共有メモリーを変更できないことを知っていることで、 プロセ"
11684 #. type: Plain text
11685 #: build/C/man2/memfd_create.2:218
11686 msgid "An example of the usage of the sealing mechanism is as follows:"
11687 msgstr "sealing 機構の使い方の例は以下のとおりである。"
11689 #. type: Plain text
11690 #: build/C/man2/memfd_create.2:225
11692 "The first process creates a I<tmpfs> file using B<memfd_create>(). The call "
11693 "yields a file descriptor used in subsequent steps."
11695 "最初のプロセスは B<memfd_create>() を使って I<tmpfs> ファイルを作成する。 "
11696 "B<memfd_create>() はこれ以降のステップで使用するファイルディスクリプターを返"
11699 #. type: Plain text
11700 #: build/C/man2/memfd_create.2:232
11702 "The first process sizes the file created in the previous step using "
11703 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
11704 "with the desired data."
11706 "最初のプロセスは B<ftruncate>(2) を使って直前のステップで作成したファイルのサ"
11707 "イズを変更し、 B<mmap>(2) を使ってそのファイルをマッピングし、 共有メモリーに"
11711 #: build/C/man2/memfd_create.2:232
11716 #. type: Plain text
11717 #: build/C/man2/memfd_create.2:242
11719 "The first process uses the B<fcntl>(2) B<F_ADD_SEALS> operation to place "
11720 "one or more seals on the file, in order to restrict further modifications on "
11721 "the file. (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
11722 "to first unmap the shared writable mapping created in the previous step.)"
11724 "最初のプロセスは、 このファイルに対する今後の変更を制限するために、 "
11725 "B<fcntl>(2) の B<F_ADD_SEALS> 操作を使って、 そのファイルに seal をいくつか設"
11726 "定する。 (seal B<F_SEAL_WRITE> を設定する場合、 直前のステップで作成した書き"
11727 "込み可能な共有マッピングをまずアンマップする必要が出てくる。)"
11730 #: build/C/man2/memfd_create.2:242
11735 #. type: Plain text
11736 #: build/C/man2/memfd_create.2:247
11738 "A second process obtains a file descriptor for the I<tmpfs> file and maps "
11739 "it. Among the possible ways in which this could happen are the following:"
11741 "二つ目のプロセスは I<tmpfs> ファイルのファイルディスクリプターを入手し、 その"
11742 "ファイルをマップする。 以下に示す方法を使用することができる。"
11744 #. type: Plain text
11745 #: build/C/man2/memfd_create.2:258
11747 "The process that called B<memfd_create>() could transfer the resulting file "
11748 "descriptor to the second process via a UNIX domain socket (see B<unix>(7) "
11749 "and B<cmsg>(3)). The second process then maps the file using B<mmap>(2)."
11751 "B<memfd_create>() を呼び出したプロセスは、 得られたファイルディスクリプターを"
11752 "二つ目のプロセスに UNIX ドメインソケット経由で渡すことができる (B<unix>(7) "
11753 "と B<cmsg>(3) を参照)。 それから、二つ目のプロセスは B<mmap>(2) を使ってファ"
11756 #. type: Plain text
11757 #: build/C/man2/memfd_create.2:266
11759 "The second process is created via B<fork>(2) and thus automatically "
11760 "inherits the file descriptor and mapping. (Note that in this case and the "
11761 "next, there is a natural trust relationship between the two processes, since "
11762 "they are running under the same user ID. Therefore, file sealing would not "
11763 "normally be necessary.)"
11765 "二つ目のプロセスを B<fork>(2) を使って作成する。 そうすると、 自動的にファイ"
11766 "ルディスクリプターとマッピングが継承される。 (この方法と次の方法では、 二つの"
11767 "プロセス間で自然な信頼関係が存在することになる。 なぜなら、 二つのプロセスは"
11768 "同じユーザー ID。 の元で実行されているからである。 したがって、 file sealing "
11771 #. type: Plain text
11772 #: build/C/man2/memfd_create.2:280
11774 "The second process opens the file I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>>, "
11775 "where I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
11776 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
11777 "returned by the call to B<memfd_create>() in that process. The second "
11778 "process then maps the file using B<mmap>(2)."
11780 "二つ目のプロセスは I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>> をオープンする。 "
11781 "I<E<lt>pidE<gt>> は最初のプロセス (B<memfd_create>() を呼び出したプロセス) "
11782 "の PID で、 I<E<lt>fdE<gt>> は最初のプロセスでの B<memfd_create>() の呼び出し"
11783 "で返されたファイルディスクリプター番号である。 それからこのファイルを "
11784 "B<mmap>(2) を使ってマッピングする。"
11787 #: build/C/man2/memfd_create.2:281
11792 #. type: Plain text
11793 #: build/C/man2/memfd_create.2:293
11795 "The second process uses the B<fcntl>(2) B<F_GET_SEALS> operation to "
11796 "retrieve the bit mask of seals that has been applied to the file. This bit "
11797 "mask can be inspected in order to determine what kinds of restrictions have "
11798 "been placed on file modifications. If desired, the second process can apply "
11799 "further seals to impose additional restrictions (so long as the "
11800 "B<F_SEAL_SEAL> seal has not yet been applied)."
11802 "二つ目のプロセスは B<fcntl>(2) の B<F_GET_SEALS> 操作を使って、 そのファイル"
11803 "に適用されている seal のビットマスクを取得する。 このビットマスクを調べて、 "
11804 "ファイルの変更に関してどのような制限が適用されているかを知ることができる。 "
11805 "(B<F_SEAL_SEAL> seal がそれまでに適用されていない限りは) 必要であれば、 二つ"
11806 "目のプロセスはさらに seal を設定して追加の制限をかけることができる。"
11808 #. type: Plain text
11809 #: build/C/man2/memfd_create.2:297
11811 "Below are shown two example programs that demonstrate the use of "
11812 "B<memfd_create>() and the file sealing API."
11814 "以下では B<memfd_create>() と file sealing API の使用例を示すサンプルプログラ"
11817 #. type: Plain text
11818 #: build/C/man2/memfd_create.2:312
11820 "The first program, I<t_memfd_create.c>, creates a I<tmpfs> file using "
11821 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
11822 "optionally places some seals on the file. The program accepts up to three "
11823 "command-line arguments, of which the first two are required. The first "
11824 "argument is the name to associate with the file, the second argument is the "
11825 "size to be set for the file, and the optional third is a string of "
11826 "characters that specify seals to be set on file."
11828 "最初のプログラム I<t_memfd_create.c> は、 B<memfd_create>() を使って "
11829 "I<tmpfs> ファイルを作成し、 そのファイルのサイズを設定し、 メモリーにマッピン"
11830 "グし、 要求された場合にはそのファイルに seal を設定する。 このプログラムは最"
11831 "大で 3 つのコマンドライン引き数を取り、 最初の 2 つは必須である。 最初の引き"
11832 "数はファイルに関連付けられる名前で、 2 番目の引き数はファイルに設定されるサイ"
11833 "ズである。 省略可能な 3 番目の引き数は、 このファイルに設定する seal を指定す"
11836 #. type: Plain text
11837 #: build/C/man2/memfd_create.2:318
11839 "The second program, I<t_get_seals.c>, can be used to open an existing file "
11840 "that was created via B<memfd_create>() and inspect the set of seals that "
11841 "have been applied to that file."
11843 "2 つめのプログラム I<t_get_seals.c> を使うと、 B<memfd_create>() を使って作成"
11844 "された既存のファイルをオープンし、 そのファイルに適用されている seal の集合を"
11847 #. type: Plain text
11848 #: build/C/man2/memfd_create.2:323
11850 "The following shell session demonstrates the use of these programs. First "
11851 "we create a I<tmpfs> file and set some seals on it:"
11853 "以下のシェルのセッションはこれらのプログラムの使用例を示したものである。 ま"
11854 "ず I<tmpfs> ファイルを作成し、そのファイルに seal をいくつか設定している。"
11856 #. type: Plain text
11857 #: build/C/man2/memfd_create.2:329
11860 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11862 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11864 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11866 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11868 #. type: Plain text
11869 #: build/C/man2/memfd_create.2:347
11871 "At this point, the I<t_memfd_create> program continues to run in the "
11872 "background. From another program, we can obtain a file descriptor for the "
11873 "file created by B<memfd_create>() by opening the I</proc/PID/fd> file that "
11874 "corresponds to the descriptor opened by B<memfd_create>(). Using that "
11875 "pathname, we inspect the content of the I</proc/PID/fd> symbolic link, and "
11876 "use our I<t_get_seals> program to view the seals that have been placed on "
11879 "この時点では、 I<t_memfd_create> プログラムはバックグラウンドで動作し続け"
11880 "る。 もう一つのプログラムから、 B<memfd_create>() がオープンしたディスクリプ"
11881 "ターに対応する I</proc/PID/fd> ファイルをオープンすることで、 "
11882 "B<memfd_create>() で作成されたファイルのファイルディスクリプターを取得でき"
11884 "そのパス名を使って、 I</proc/PID/fd> シンボリックリンクの内容を調査し、 "
11885 "I<t_get_seals> プログラムを使ってそのファイルに設定されている seal を見ること"
11888 #. type: Plain text
11889 #: build/C/man2/memfd_create.2:354
11892 "$ B<readlink /proc/11775/fd/3>\n"
11893 "/memfd:my_memfd_file (deleted)\n"
11894 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11895 "Existing seals: WRITE SHRINK\n"
11897 "$ B<readlink /proc/11775/fd/3>\n"
11898 "/memfd:my_memfd_file (deleted)\n"
11899 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11900 "Existing seals: WRITE SHRINK\n"
11903 #: build/C/man2/memfd_create.2:356
11905 msgid "Program source: t_memfd_create.c"
11906 msgstr "プログラムのソース: t_memfd_create.c"
11908 #. type: Plain text
11909 #: build/C/man2/memfd_create.2:365
11912 "#include E<lt>sys/memfd.hE<gt>\n"
11913 "#include E<lt>fcntl.hE<gt>\n"
11914 "#include E<lt>stdlib.hE<gt>\n"
11915 "#include E<lt>unistd.hE<gt>\n"
11916 "#include E<lt>string.hE<gt>\n"
11917 "#include E<lt>stdio.hE<gt>\n"
11919 "#include E<lt>sys/memfd.hE<gt>\n"
11920 "#include E<lt>fcntl.hE<gt>\n"
11921 "#include E<lt>stdlib.hE<gt>\n"
11922 "#include E<lt>unistd.hE<gt>\n"
11923 "#include E<lt>string.hE<gt>\n"
11924 "#include E<lt>stdio.hE<gt>\n"
11926 #. type: Plain text
11927 #: build/C/man2/memfd_create.2:377
11931 "main(int argc, char *argv[])\n"
11934 " unsigned int seals;\n"
11936 " char *name, *seals_arg;\n"
11940 "main(int argc, char *argv[])\n"
11943 " unsigned int seals;\n"
11945 " char *name, *seals_arg;\n"
11948 #. type: Plain text
11949 #: build/C/man2/memfd_create.2:388
11952 " if (argc E<lt> 3) {\n"
11953 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
11954 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
11955 " \"following characters:\\en\");\n"
11956 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
11957 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
11958 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
11959 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
11960 " exit(EXIT_FAILURE);\n"
11963 " if (argc E<lt> 3) {\n"
11964 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
11965 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
11966 " \"following characters:\\en\");\n"
11967 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
11968 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
11969 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
11970 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
11971 " exit(EXIT_FAILURE);\n"
11974 #. type: Plain text
11975 #: build/C/man2/memfd_create.2:392
11978 " name = argv[1];\n"
11979 " len = atoi(argv[2]);\n"
11980 " seals_arg = argv[3];\n"
11982 " name = argv[1];\n"
11983 " len = atoi(argv[2]);\n"
11984 " seals_arg = argv[3];\n"
11986 #. type: Plain text
11987 #: build/C/man2/memfd_create.2:395
11990 " /* Create an anonymous file in tmpfs; allow seals to be\n"
11991 " placed on the file */\n"
11993 " /* Create an anonymous file in tmpfs; allow seals to be\n"
11994 " placed on the file */\n"
11996 #. type: Plain text
11997 #: build/C/man2/memfd_create.2:399
12000 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12002 " errExit(\"memfd_create\");\n"
12004 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12006 " errExit(\"memfd_create\");\n"
12008 #. type: Plain text
12009 #: build/C/man2/memfd_create.2:401
12011 msgid " /* Size the file as specified on the command line */\n"
12012 msgstr " /* Size the file as specified on the command line */\n"
12014 #. type: Plain text
12015 #: build/C/man2/memfd_create.2:404
12018 " if (ftruncate(fd, len) == -1)\n"
12019 " errExit(\"truncate\");\n"
12021 " if (ftruncate(fd, len) == -1)\n"
12022 " errExit(\"truncate\");\n"
12024 #. type: Plain text
12025 #: build/C/man2/memfd_create.2:407
12028 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12029 " (long) getpid(), fd, (long) getpid(), fd);\n"
12031 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12032 " (long) getpid(), fd, (long) getpid(), fd);\n"
12034 #. type: Plain text
12035 #: build/C/man2/memfd_create.2:410
12038 " /* Code to map the file and populate the mapping with data\n"
12041 " /* Code to map the file and populate the mapping with data\n"
12044 #. type: Plain text
12045 #: build/C/man2/memfd_create.2:413
12048 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12049 " seals on the file */\n"
12051 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12052 " seals on the file */\n"
12054 #. type: Plain text
12055 #: build/C/man2/memfd_create.2:416
12058 " if (seals_arg != NULL) {\n"
12061 " if (seals_arg != NULL) {\n"
12064 #. type: Plain text
12065 #: build/C/man2/memfd_create.2:425
12068 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12069 " seals |= F_SEAL_GROW;\n"
12070 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12071 " seals |= F_SEAL_SHRINK;\n"
12072 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12073 " seals |= F_SEAL_WRITE;\n"
12074 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12075 " seals |= F_SEAL_SEAL;\n"
12077 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12078 " seals |= F_SEAL_GROW;\n"
12079 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12080 " seals |= F_SEAL_SHRINK;\n"
12081 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12082 " seals |= F_SEAL_WRITE;\n"
12083 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12084 " seals |= F_SEAL_SEAL;\n"
12086 #. type: Plain text
12087 #: build/C/man2/memfd_create.2:429
12090 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12091 " errExit(\"fcntl\");\n"
12094 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12095 " errExit(\"fcntl\");\n"
12098 #. type: Plain text
12099 #: build/C/man2/memfd_create.2:432
12102 " /* Keep running, so that the file created by memfd_create()\n"
12103 " continues to exist */\n"
12105 " /* Keep running, so that the file created by memfd_create()\n"
12106 " continues to exist */\n"
12108 #. type: Plain text
12109 #: build/C/man2/memfd_create.2:434
12111 msgid " pause();\n"
12112 msgstr " pause();\n"
12115 #: build/C/man2/memfd_create.2:438
12117 msgid "Program source: t_get_seals.c"
12118 msgstr "プログラムのソース: t_get_seals.c"
12120 #. type: Plain text
12121 #: build/C/man2/memfd_create.2:447
12124 "#include E<lt>sys/memfd.hE<gt>\n"
12125 "#include E<lt>fcntl.hE<gt>\n"
12126 "#include E<lt>unistd.hE<gt>\n"
12127 "#include E<lt>stdlib.hE<gt>\n"
12128 "#include E<lt>string.hE<gt>\n"
12129 "#include E<lt>stdio.hE<gt>\n"
12131 "#include E<lt>sys/memfd.hE<gt>\n"
12132 "#include E<lt>fcntl.hE<gt>\n"
12133 "#include E<lt>unistd.hE<gt>\n"
12134 "#include E<lt>stdlib.hE<gt>\n"
12135 "#include E<lt>string.hE<gt>\n"
12136 "#include E<lt>stdio.hE<gt>\n"
12138 #. type: Plain text
12139 #: build/C/man2/memfd_create.2:456
12143 "main(int argc, char *argv[])\n"
12146 " unsigned int seals;\n"
12149 "main(int argc, char *argv[])\n"
12152 " unsigned int seals;\n"
12154 #. type: Plain text
12155 #: build/C/man2/memfd_create.2:461
12158 " if (argc != 2) {\n"
12159 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12160 " exit(EXIT_FAILURE);\n"
12163 " if (argc != 2) {\n"
12164 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12165 " exit(EXIT_FAILURE);\n"
12168 #. type: Plain text
12169 #: build/C/man2/memfd_create.2:465
12172 " fd = open(argv[1], O_RDWR);\n"
12174 " errExit(\"open\");\n"
12176 " fd = open(argv[1], O_RDWR);\n"
12178 " errExit(\"open\");\n"
12180 #. type: Plain text
12181 #: build/C/man2/memfd_create.2:469
12184 " seals = fcntl(fd, F_GET_SEALS);\n"
12185 " if (seals == -1)\n"
12186 " errExit(\"fcntl\");\n"
12188 " seals = fcntl(fd, F_GET_SEALS);\n"
12189 " if (seals == -1)\n"
12190 " errExit(\"fcntl\");\n"
12192 #. type: Plain text
12193 #: build/C/man2/memfd_create.2:480
12196 " printf(\"Existing seals:\");\n"
12197 " if (seals & F_SEAL_SEAL)\n"
12198 " printf(\" SEAL\");\n"
12199 " if (seals & F_SEAL_GROW)\n"
12200 " printf(\" GROW\");\n"
12201 " if (seals & F_SEAL_WRITE)\n"
12202 " printf(\" WRITE\");\n"
12203 " if (seals & F_SEAL_SHRINK)\n"
12204 " printf(\" SHRINK\");\n"
12205 " printf(\"\\en\");\n"
12207 " printf(\"Existing seals:\");\n"
12208 " if (seals & F_SEAL_SEAL)\n"
12209 " printf(\" SEAL\");\n"
12210 " if (seals & F_SEAL_GROW)\n"
12211 " printf(\" GROW\");\n"
12212 " if (seals & F_SEAL_WRITE)\n"
12213 " printf(\" WRITE\");\n"
12214 " if (seals & F_SEAL_SHRINK)\n"
12215 " printf(\" SHRINK\");\n"
12216 " printf(\"\\en\");\n"
12218 #. type: Plain text
12219 #: build/C/man2/memfd_create.2:483
12222 " /* Code to map the file and access the contents of the\n"
12223 " resulting mapping omitted */\n"
12225 " /* Code to map the file and access the contents of the\n"
12226 " resulting mapping omitted */\n"
12228 #. type: Plain text
12229 #: build/C/man2/memfd_create.2:493
12230 msgid "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12231 msgstr "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12234 #: build/C/man2/s390_pci_mmio_write.2:25
12236 msgid "S390_PCI_MMIO_WRITE"
12237 msgstr "S390_PCI_MMIO_WRITE"
12240 #: build/C/man2/s390_pci_mmio_write.2:25
12243 msgstr "2015-01-15"
12245 #. type: Plain text
12246 #: build/C/man2/s390_pci_mmio_write.2:29
12248 "s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO "
12252 #. type: Plain text
12253 #: build/C/man2/s390_pci_mmio_write.2:32
12255 msgid "B<#include E<lt>asm/unistd.hE<gt>>\n"
12256 msgstr "B<#include E<lt>asm/unistd.hE<gt>>\n"
12258 #. type: Plain text
12259 #: build/C/man2/s390_pci_mmio_write.2:35
12262 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12263 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12265 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12266 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12268 #. type: Plain text
12269 #: build/C/man2/s390_pci_mmio_write.2:38
12272 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12273 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12275 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12276 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12278 #. type: Plain text
12279 #: build/C/man2/s390_pci_mmio_write.2:57
12281 "The B<s390_pci_mmio_write>() system call writes I<length> bytes of data "
12282 "from the user-space buffer I<user_buffer> to the PCI MMIO memory location "
12283 "specified by I<mmio_addr>. The B<s390_pci_mmio_read>() system call reads "
12284 "I<length> bytes of data from the PCI MMIO memory location specified by "
12285 "I<mmio_addr> to the user-space buffer I<user_buffer>."
12288 #. type: Plain text
12289 #: build/C/man2/s390_pci_mmio_write.2:68
12291 "These system calls must be used instead of the simple assignment or data-"
12292 "transfer operations that are used to access the PCI MMIO memory areas mapped "
12293 "to user space on the Linux System z platform. The address specified by "
12294 "I<mmio_addr> must belong to a PCI MMIO memory page mapping in the caller's "
12295 "address space, and the data being written or read must not cross a page "
12296 "boundary. The I<length> value cannot be greater than the system page size."
12299 #. type: Plain text
12300 #: build/C/man2/s390_pci_mmio_write.2:77
12302 "On success, B<s390_pci_mmio_write>() and B<s390_pci_mmio_read>() return "
12303 "0. On error, -1 is returned and I<errno> is set to one of the error codes "
12306 "成功すると、 B<s390_pci_mmio_write>() と B<s390_pci_mmio_read>() は 0 を返"
12307 "す。 エラーの場合、-1 を返し、 I<errno> に以下のリストにあるエラーコードのい"
12310 #. type: Plain text
12311 #: build/C/man2/s390_pci_mmio_write.2:83
12312 msgid "The address in I<mmio_addr> is invalid."
12315 #. type: Plain text
12316 #: build/C/man2/s390_pci_mmio_write.2:87
12318 "I<user_buffer> does not point to a valid location in the caller's address "
12322 #. type: Plain text
12323 #: build/C/man2/s390_pci_mmio_write.2:92
12324 msgid "Invalid I<length> argument."
12327 #. type: Plain text
12328 #: build/C/man2/s390_pci_mmio_write.2:95
12329 msgid "PCI support is not enabled."
12332 #. type: Plain text
12333 #: build/C/man2/s390_pci_mmio_write.2:98
12334 msgid "Insufficient memory."
12337 #. type: Plain text
12338 #: build/C/man2/s390_pci_mmio_write.2:100
12339 msgid "These system calls are available since Linux 3.19."
12340 msgstr "これらのシステムコールは Linux 3.19 以降で使用可能である。"
12342 #. type: Plain text
12343 #: build/C/man2/s390_pci_mmio_write.2:103
12345 "This Linux-specific system call is available only on the s390 architecture. "
12346 "The required PCI support is available beginning with System z EC12."
12349 #. type: Plain text
12350 #: build/C/man2/s390_pci_mmio_write.2:107
12352 "Glibc does not provide a wrapper for this system call, use B<syscall>(2) to "
12356 #. type: Plain text
12357 #: build/C/man2/s390_pci_mmio_write.2:109
12358 msgid "B<syscall>(2)"
12359 msgstr "B<syscall>(2)"
12361 #~ msgid "System-wide limit on the number of pages of shared memory."
12362 #~ msgstr "共有メモリーのページ数のシステム全体での上限値。"
12365 #~ "Segment low boundary address multiple. Must be page aligned. For the "
12366 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
12368 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
12369 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
12371 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
12373 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
12376 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
12377 #~ "2^20 (2,097,152)."
12379 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
12380 #~ "(2,097,152) になる。"
12383 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
12384 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
12387 #~ "共有メモリーセグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
12388 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
12392 #~ "System wide maximum number of shared memory segments: implementation "
12393 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
12394 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
12396 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
12397 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
12398 #~ "で参照したり、変更したりできる)。"
12401 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
12403 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
12407 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
12408 #~ "pair of registers. On this architecture, the call signature of "
12409 #~ "B<posix_fadvise>() is flawed, since it forces a register to be wasted as "
12410 #~ "padding between the I<fd> and I<len> arguments. Therefore, since Linux "
12411 #~ "2.6.14, ARM defines a different system call that orders the arguments "
12414 #~ "ARM アーキテクチャーでは、64 ビットの引き数は適切なレジスターの組に割り当"
12416 #~ "る必要がある。このアーキテクチャーでは、B<posix_fadvise>() の呼び出し方"
12418 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
12419 #~ "パディング (詰めもの) でレジスターが一つ消費されてしまうというものであ"
12421 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
12422 #~ "システムコールが定義されている。"
12425 #~ "The behavior of this system call is otherwise exactly the same as "
12426 #~ "B<posix_fadvise>(). No library support is provided for this system call "
12429 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
12430 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
12434 #~ "The I<mode> is not supported by the file system containing the file "
12435 #~ "referred to by I<fd>."
12437 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
12441 #~ "The function B<mtrace>() installs handlers for B<malloc>(3), "
12442 #~ "B<realloc>(3) and B<free>(3). The function B<muntrace>() disables "
12443 #~ "these handlers."
12445 #~ "関数 B<mtrace>() は、 B<malloc>(3), B<realloc>(3), B<free>(3) のハンド"
12446 #~ "ラーを組み込む。 関数 B<muntrace>() はこれらのハンドラーを解除する。"
12449 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
12450 #~ "B<mtrace>() writes its output. This file must be writable to the user "
12451 #~ "or B<mtrace>() will do nothing. If the file is not empty it will be "
12454 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>() が出力を書き出すファイルを指定す"
12455 #~ "る。 ユーザーが書き込み権限を持つファイルを指定しなければならない。 書き込"
12456 #~ "み権限がない場合、 B<mtrace>() は何もしない。 ファイルが空でない場合、"
12457 #~ "ファイルの元の内容を上書きする。"
12460 #~ "The output of B<mtrace>() will be ASCII but not in a friendly format. "
12461 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
12463 #~ "B<mtrace>() の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
12464 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
12468 #~ "This flag allocates and initializes to zero the disk space within the "
12469 #~ "range specified by I<offset> and I<len>. After a successful call, "
12470 #~ "subsequent writes into this range are guaranteed not to fail because of "
12471 #~ "lack of disk space. Preallocating zeroed blocks beyond the end of the "
12472 #~ "file is useful for optimizing append workloads. Preallocating blocks "
12473 #~ "does not change the file size (as reported by B<stat>(2)) even if it is "
12474 #~ "less than I<offset>+I<len>."
12476 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
12477 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
12478 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
12479 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
12480 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
12481 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
12482 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2) が返す) ファイルサイズ"