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"
92 msgstr "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
95 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
96 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
97 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
98 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
99 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
100 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
101 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
102 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:42
103 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
104 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
105 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
106 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
107 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
108 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
109 #: build/C/man2/memfd_create.2:24 build/C/man2/s390_pci_mmio_write.2:29
114 #. asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
115 #. unsigned long len, int prot, int flag);
117 #: build/C/man2/alloc_hugepages.2:34
120 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
121 "B< int >I<prot>B<, int >I<flag>B<);>\n"
123 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
124 "B< int >I<prot>B<, int >I<flag>B<);>\n"
126 #. asmlinkage int sys_free_hugepages(unsigned long addr);
128 #: build/C/man2/alloc_hugepages.2:37
130 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
131 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
134 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
135 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
136 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
137 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
138 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
139 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
140 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
141 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:48
142 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
143 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
144 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
145 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
146 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
147 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
148 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
149 #: build/C/man2/memfd_create.2:28 build/C/man2/s390_pci_mmio_write.2:39
155 #: build/C/man2/alloc_hugepages.2:49
156 msgid "The system calls B<alloc_hugepages>() and B<free_hugepages>() were introduced in Linux 2.5.36 and removed again in 2.5.54. They existed only on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>). In Linux 2.4.20, the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
157 msgstr "システムコール B<alloc_hugepages>() と B<free_hugepages>() は Linux 2.5.36 で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失敗する。"
160 #: build/C/man2/alloc_hugepages.2:57
161 msgid "On i386 the memory management hardware knows about ordinary pages (4 KiB) and huge pages (2 or 4 MiB). Similarly ia64 knows about huge pages of several sizes. These system calls serve to map huge pages into the process's memory or to free them again. Huge pages are locked into memory, and are not swapped."
162 msgstr "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのページ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステムコールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりする。 ヒュージページはメモリ内にロックされ、スワップされない。"
165 #: build/C/man2/alloc_hugepages.2:66
166 msgid "The I<key> argument is an identifier. When zero the pages are private, and not inherited by children. When positive the pages are shared with other applications using the same I<key>, and inherited by child processes."
167 msgstr "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有され、子プロセスに継承される。"
170 #: build/C/man2/alloc_hugepages.2:81
171 msgid "The I<addr> argument of B<free_hugepages>() tells which page is being freed: it was the return value of a call to B<alloc_hugepages>(). (The memory is first actually freed when all users have released it.) The I<addr> argument of B<alloc_hugepages>() is a hint, that the kernel may or may not follow. Addresses must be properly aligned."
172 msgstr "B<free_hugepages>() の I<addr> 引き数は、どのページを解放するかを指定する: I<addr> は B<alloc_hugepages>() の呼び出しの返り値である (全てのユーザがメモリを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>() の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従わないかもしれない。 アドレスは正しく配置されなければならない。"
175 #: build/C/man2/alloc_hugepages.2:86
176 msgid "The I<len> argument is the length of the required segment. It must be a multiple of the huge page size."
177 msgstr "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイズの倍数にしなければならない。"
180 #: build/C/man2/alloc_hugepages.2:94
181 msgid "The I<prot> argument specifies the memory protection of the segment. It is one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
182 msgstr "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
185 #: build/C/man2/alloc_hugepages.2:109
186 msgid "The I<flag> argument is ignored, unless I<key> is positive. In that case, if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when none with the given key existed. If this flag is not set, then B<ENOENT> is returned when no segment with the given key exists."
187 msgstr "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> が返される。"
190 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
191 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:228
192 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
193 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
194 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
195 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
196 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:77
197 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
198 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
199 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
200 #: build/C/man2/remap_file_pages.2:132 build/C/man3/shm_open.3:171
201 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:183
202 #: build/C/man2/shmop.2:168 build/C/man2/subpage_prot.2:66
203 #: build/C/man2/sync_file_range.2:141 build/C/man2/memfd_create.2:126
204 #: build/C/man2/s390_pci_mmio_write.2:68
210 #: build/C/man2/alloc_hugepages.2:118
211 msgid "On success, B<alloc_hugepages>() returns the allocated virtual address, and B<free_hugepages>() returns zero. On error, -1 is returned, and I<errno> is set appropriately."
212 msgstr "成功した場合、 B<alloc_hugepages>() は割り当てられた仮想アドレスを返し、 B<free_hugepages>() は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切に設定される。"
215 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
216 #: build/C/man2/fallocate.2:235 build/C/man2/madvise.2:275
217 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
218 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
219 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:84
220 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
221 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
222 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
223 #: build/C/man2/remap_file_pages.2:139 build/C/man3/shm_open.3:180
224 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:188
225 #: build/C/man2/shmop.2:182 build/C/man2/subpage_prot.2:71
226 #: build/C/man2/sync_file_range.2:147 build/C/man2/memfd_create.2:133
227 #: build/C/man2/s390_pci_mmio_write.2:77
233 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:319
239 #: build/C/man2/alloc_hugepages.2:122
240 msgid "The system call is not supported on this kernel."
241 msgstr "このシステムコールはカーネルでサポートされていない。"
244 #: build/C/man2/alloc_hugepages.2:122
250 #: build/C/man2/alloc_hugepages.2:126
251 msgid "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages. This can be read and written."
252 msgstr "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読み書きできる。"
255 #: build/C/man2/alloc_hugepages.2:130
256 msgid "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on their size in the three variables HugePages_Total, HugePages_Free, Hugepagesize."
257 msgstr "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供する。"
260 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
261 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:375
262 #: build/C/man2/madvise.2:332 build/C/man3/mallinfo.3:110
263 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
264 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
265 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:53
266 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
267 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:499 build/C/man2/mmap2.2:77
268 #: build/C/man2/mprotect.2:112 build/C/man2/mremap.2:185
269 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
270 #: build/C/man2/posix_fadvise.2:122 build/C/man3/posix_fallocate.3:108
271 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
272 #: build/C/man2/remap_file_pages.2:161 build/C/man3/shm_open.3:251
273 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:377
274 #: build/C/man2/shmget.2:248 build/C/man2/shmop.2:228
275 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
276 #: build/C/man2/memfd_create.2:161 build/C/man2/s390_pci_mmio_write.2:100
278 msgid "CONFORMING TO"
282 #: build/C/man2/alloc_hugepages.2:133
283 msgid "These calls are specific to Linux on Intel processors, and should not be used in programs intended to be portable."
284 msgstr "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が必要なプログラムで使うべきでない。"
287 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:78
288 #: build/C/man2/madvise.2:354 build/C/man3/malloc_get_state.3:88
289 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
290 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
291 #: build/C/man3/malloc_usable_size.3:55 build/C/man3/mcheck.3:147
292 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:517 build/C/man2/mmap2.2:79
293 #: build/C/man2/mprotect.2:121 build/C/man2/mremap.2:191
294 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:80
295 #: build/C/man2/posix_fadvise.2:131 build/C/man3/posix_fallocate.3:133
296 #: build/C/man3/posix_memalign.3:221 build/C/man2/readahead.2:93
297 #: build/C/man2/remap_file_pages.2:165 build/C/man3/shm_open.3:257
298 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:382
299 #: build/C/man2/shmget.2:256 build/C/man2/shmop.2:243
300 #: build/C/man2/subpage_prot.2:98 build/C/man2/sync_file_range.2:183
301 #: build/C/man2/memfd_create.2:165 build/C/man2/s390_pci_mmio_write.2:103
307 #: build/C/man2/alloc_hugepages.2:141
308 msgid "These system calls are gone; they existed only in Linux 2.5.36 through to 2.5.54. Now the hugetlbfs filesystem can be used instead. Memory backed by huge pages (if the CPU supports them) is obtained by using B<mmap>(2) to map files in this virtual filesystem."
309 msgstr "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2) を使ってこの仮想ファイルシステムでファイルをマップすることで取得できる。"
312 #: build/C/man2/alloc_hugepages.2:145
313 msgid "The maximal number of huge pages can be specified using the B<hugepages=> boot parameter."
314 msgstr "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
317 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
318 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:383
319 #: build/C/man2/madvise.2:388 build/C/man3/mallinfo.3:279
320 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
321 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
322 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:69
323 #: build/C/man3/mallopt.3:568 build/C/man3/mcheck.3:208
324 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:741 build/C/man2/mmap2.2:101
325 #: build/C/man2/mprotect.2:228 build/C/man2/mremap.2:214
326 #: build/C/man2/msync.2:151 build/C/man3/mtrace.3:172
327 #: build/C/man2/posix_fadvise.2:215 build/C/man3/posix_fallocate.3:143
328 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
329 #: build/C/man2/remap_file_pages.2:183 build/C/man3/shm_open.3:283
330 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
331 #: build/C/man2/shmget.2:391 build/C/man2/shmop.2:301
332 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:227
333 #: build/C/man2/memfd_create.2:493 build/C/man2/s390_pci_mmio_write.2:109
339 #: build/C/man2/alloc_hugepages.2:158 build/C/man3/alloca.3:170
340 #: build/C/man2/cacheflush.2:97 build/C/man2/fallocate.2:391
341 #: build/C/man2/madvise.2:396 build/C/man3/mallinfo.3:287
342 #: build/C/man3/malloc_get_state.3:122 build/C/man3/malloc_hook.3:150
343 #: build/C/man3/malloc_info.3:270 build/C/man3/malloc_stats.3:75
344 #: build/C/man3/malloc_trim.3:90 build/C/man3/malloc_usable_size.3:77
345 #: build/C/man3/mallopt.3:576 build/C/man3/mcheck.3:216
346 #: build/C/man2/mlock.2:351 build/C/man2/mmap.2:749 build/C/man2/mmap2.2:109
347 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:222
348 #: build/C/man2/msync.2:159 build/C/man3/mtrace.3:180
349 #: build/C/man2/posix_fadvise.2:223 build/C/man3/posix_fallocate.3:151
350 #: build/C/man3/posix_memalign.3:285 build/C/man2/readahead.2:121
351 #: build/C/man2/remap_file_pages.2:191 build/C/man3/shm_open.3:291
352 #: build/C/man7/shm_overview.7:135 build/C/man2/shmctl.2:443
353 #: build/C/man2/shmget.2:399 build/C/man2/shmop.2:309
354 #: build/C/man2/subpage_prot.2:142 build/C/man2/sync_file_range.2:235
355 #: build/C/man2/memfd_create.2:501 build/C/man2/s390_pci_mmio_write.2:117
356 msgid "This page is part of release 3.78 of the Linux I<man-pages> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/."
358 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
359 "である。プロジェクトの説明とバグ報告に関する情報は\n"
360 "http://www.kernel.org/doc/man-pages/ に書かれている。"
363 #: build/C/man3/alloca.3:43
369 #: build/C/man3/alloca.3:43
375 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
376 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
377 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
378 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
379 #: build/C/man3/posix_memalign.3:29
385 #: build/C/man3/alloca.3:46
386 msgid "alloca - allocate memory that is automatically freed"
387 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
390 #: build/C/man3/alloca.3:48
391 msgid "B<#include E<lt>alloca.hE<gt>>"
392 msgstr "B<#include E<lt>alloca.hE<gt>>"
395 #: build/C/man3/alloca.3:50
396 msgid "B<void *alloca(size_t >I<size>B<);>"
397 msgstr "B<void *alloca(size_t >I<size>B<);>"
400 #: build/C/man3/alloca.3:60
401 msgid "The B<alloca>() function allocates I<size> bytes of space in the stack frame of the caller. This temporary space is automatically freed when the function that called B<alloca>() returns to its caller."
402 msgstr "B<alloca>() 関数は、 I<size> バイトの領域を呼出元のスタックフレームに割り付ける。 この一時的な領域は、 B<alloca>() を呼び出した関数が呼出元に返るときに自動的に解放される。"
405 #: build/C/man3/alloca.3:65
406 msgid "The B<alloca>() function returns a pointer to the beginning of the allocated space. If the allocation causes stack overflow, program behavior is undefined."
407 msgstr "B<alloca>() 関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けによってスタックオーバーフローが起った場合の プログラムの動作は定義されていない。"
410 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
411 #: build/C/man3/posix_fallocate.3:103
417 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
418 #: build/C/man3/posix_fallocate.3:104
420 msgid "Multithreading (see pthreads(7))"
421 msgstr "マルチスレッディング (pthreads(7) 参照)"
424 #: build/C/man3/alloca.3:70
425 msgid "The B<alloca>() function is thread-safe."
426 msgstr "B<alloca>() 関数はスレッドセーフである。"
429 #: build/C/man3/alloca.3:72
430 msgid "This function is not in POSIX.1-2001."
431 msgstr "この関数は POSIX.1-2001 にはない。"
434 #: build/C/man3/alloca.3:78
435 msgid "There is evidence that the B<alloca>() function appeared in 32V, PWB, PWB.2, 3BSD, and 4BSD. There is a man page for it in 4.3BSD. Linux uses the GNU version."
436 msgstr "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>() 関数が登場した証拠がある。 4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数は POSIX.1-2001 にはない。"
439 #: build/C/man3/alloca.3:93
440 msgid "The B<alloca>() function is machine- and compiler-dependent. For certain applications, its use can improve efficiency compared to the use of B<malloc>(3) plus B<free>(3). In certain cases, it can also simplify memory deallocation in applications that use B<longjmp>(3) or B<siglongjmp>(3). Otherwise, its use is discouraged."
441 msgstr "B<alloca>() 関数は、機種とコンパイラに依存する。 特定のアプリケーションでは、この関数を使うと B<malloc>(3) と B<free>(3) を組み合わせて使った場合に比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 B<longjmp>(3) や B<siglongjmp>(3) を使うアプリケーションでのメモリの開放を簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
444 #: build/C/man3/alloca.3:102
445 msgid "Because the space allocated by B<alloca>() is allocated within the stack frame, that space is automatically freed if the function return is jumped over by a call to B<longjmp>(3) or B<siglongjmp>(3)."
446 msgstr "B<alloca>() により割り当てられる空間はスタックフレームから割り当てらるので、 関数の戻り先が B<longjmp>(3) や B<siglongjmp>(3) の呼び出しによりジャンプした場合には、 割り当てられた空間は自動的に解放される。"
449 #: build/C/man3/alloca.3:107
450 msgid "Do not attempt to B<free>(3) space allocated by B<alloca>()!"
451 msgstr "B<alloca>() で割り当てられた空間を B<free>(3) しようとすることのないように!"
454 #: build/C/man3/alloca.3:107
456 msgid "Notes on the GNU version"
457 msgstr "GNU 版についての注意"
460 #: build/C/man3/alloca.3:129
461 msgid "Normally, B<gcc>(1) translates calls to B<alloca>() with inlined code. This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not included. Otherwise, (without an -ansi or -std=c* option) the glibc version of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the lines:"
462 msgstr "通常 B<gcc>(1) は B<alloca>() の呼び出しをインラインコードに変換する。 I<-ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定され、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定されない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> をインクルードするが、このファイルには以下の行が含まれており、"
465 #: build/C/man3/alloca.3:134
469 " #define alloca(size) __builtin_alloca (size)\n"
473 " #define alloca(size) __builtin_alloca (size)\n"
477 #: build/C/man3/alloca.3:137
478 msgid "with messy consequences if one has a private version of this function."
479 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
482 #: build/C/man3/alloca.3:141
483 msgid "The fact that the code is inlined means that it is impossible to take the address of this function, or to change its behavior by linking with a different library."
484 msgstr "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他のライブラリをリンクして動作を変更することはできない。"
487 #: build/C/man3/alloca.3:145
488 msgid "The inlined code often consists of a single instruction adjusting the stack pointer, and does not check for stack overflow. Thus, there is no NULL error return."
489 msgstr "通常このインラインコードはスタックポインタを移動する 1 つの命令 (instruction) から構成されており、 スタックオーバーフローをチェックしない。 よって NULL エラーが返されることはない。"
492 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
493 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
494 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:590 build/C/man3/mtrace.3:102
495 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
496 #: build/C/man2/shmget.2:376
502 #: build/C/man3/alloca.3:150
503 msgid "There is no error indication if the stack frame cannot be extended. (However, after a failed allocation, the program is likely to receive a B<SIGSEGV> signal if it attempts to access the unallocated space.)"
504 msgstr "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしながら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスしようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
507 #: build/C/man3/alloca.3:158
508 msgid "On many systems B<alloca>() cannot be used inside the list of arguments of a function call, because the stack space reserved by B<alloca>() would appear on the stack in the middle of the space for the function arguments."
509 msgstr "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>() が使えない。 これは、 B<alloca>() によって予約されるスタック領域が、 関数引き数に使われるスタック領域の中に現れてしまうためである。"
512 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:378
513 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
514 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
515 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
516 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
517 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
518 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:715 build/C/man2/mmap2.2:95
519 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
520 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
521 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:138
522 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
523 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
524 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
525 #: build/C/man2/shmget.2:382 build/C/man2/shmop.2:293
526 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
527 #: build/C/man2/memfd_create.2:487 build/C/man2/s390_pci_mmio_write.2:107
533 #: build/C/man3/alloca.3:162
534 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
535 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
538 #: build/C/man2/cacheflush.2:25
544 #: build/C/man2/cacheflush.2:25
550 #: build/C/man2/cacheflush.2:28
551 msgid "cacheflush - flush contents of instruction and/or data cache"
552 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
555 #: build/C/man2/cacheflush.2:31
557 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
558 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
561 #: build/C/man2/cacheflush.2:33
563 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
564 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
567 #: build/C/man2/cacheflush.2:43
568 msgid "B<cacheflush>() flushes the contents of the indicated cache(s) for the user addresses in the range I<addr> to I<(addr+nbytes-1)>. I<cache> may be one of:"
569 msgstr "B<cacheflush>() は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを指定する:"
572 #: build/C/man2/cacheflush.2:43
578 #: build/C/man2/cacheflush.2:46
579 msgid "Flush the instruction cache."
580 msgstr "命令 (instruction) キャッシュをフラッシュする。"
583 #: build/C/man2/cacheflush.2:46
589 #: build/C/man2/cacheflush.2:49
590 msgid "Write back to memory and invalidate the affected valid cache lines."
591 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
594 #: build/C/man2/cacheflush.2:49
600 #: build/C/man2/cacheflush.2:53
601 msgid "Same as B<(ICACHE|DCACHE)>."
602 msgstr "B<(ICACHE|DCACHE)> と同じ。"
605 #: build/C/man2/cacheflush.2:59
606 msgid "B<cacheflush>() returns 0 on success or -1 on error. If errors are detected, I<errno> will indicate the error."
607 msgstr "B<cacheflush>() は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検出された場合は I<errno> にエラーが指示される。"
610 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
611 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
612 #: build/C/man2/subpage_prot.2:72 build/C/man2/memfd_create.2:134
613 #: build/C/man2/s390_pci_mmio_write.2:78 build/C/man2/s390_pci_mmio_write.2:83
619 #: build/C/man2/cacheflush.2:67
620 msgid "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not accessible."
621 msgstr "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可能ではない。"
624 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
625 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
626 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
627 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
628 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
629 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
630 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
631 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
632 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
633 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
634 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
635 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
636 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
637 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
638 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
639 #: build/C/man2/memfd_create.2:139 build/C/man2/s390_pci_mmio_write.2:87
645 #: build/C/man2/cacheflush.2:75
646 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
647 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
649 #. FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
650 #. but by now it is on a number of other architectures (but not i386).
651 #. Investigate the details and update this page.
652 #. Irix 6.5 appears to have a cacheflush() syscall -- mtk
654 #: build/C/man2/cacheflush.2:82
655 msgid "This Linux-specific system call is available only on MIPS-based systems. It should not be used in programs intended to be portable."
656 msgstr "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移植を意図したプログラムで使用すべきではない。"
659 #: build/C/man2/cacheflush.2:89
660 msgid "The current implementation ignores the I<addr> and I<nbytes> arguments. Therefore, the whole cache is always flushed."
661 msgstr "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全てのキャッシュがフラッシュされる。"
664 #: build/C/man2/fallocate.2:11
670 #: build/C/man2/fallocate.2:11 build/C/man3/malloc_info.3:25
671 #: build/C/man2/mmap.2:40 build/C/man3/posix_fallocate.3:25
672 #: build/C/man3/shm_open.3:26 build/C/man2/memfd_create.2:21
678 #: build/C/man2/fallocate.2:14
679 msgid "fallocate - manipulate file space"
680 msgstr "fallocate - ファイル空間の操作"
683 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
686 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
687 "B<#include E<lt>fcntl.hE<gt>>\n"
689 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
690 "B<#include E<lt>fcntl.hE<gt>>\n"
693 #: build/C/man2/fallocate.2:21
695 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
696 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
699 #: build/C/man2/fallocate.2:27
700 msgid "This is a nonportable, Linux-specific system call. For the portable, POSIX.1-specified method of ensuring that space is allocated for a file, see B<posix_fallocate>(3)."
701 msgstr "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 で規定された方法である B<posix_fallocate>(3) を使うこと。"
704 #: build/C/man2/fallocate.2:37
705 msgid "B<fallocate>() allows the caller to directly manipulate the allocated disk space for the file referred to by I<fd> for the byte range starting at I<offset> and continuing for I<len> bytes."
706 msgstr "B<fallocate>() を使うと、 I<fd> が参照するファイルに割り当てられたディスク空間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領域である。"
709 #: build/C/man2/fallocate.2:42
710 msgid "The I<mode> argument determines the operation to be performed on the given range. Details of the supported operations are given in the subsections below."
712 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
713 "サポートされている操作の詳細は以下のサブセクションで説明する。"
716 #: build/C/man2/fallocate.2:42
718 msgid "Allocating disk space"
722 #: build/C/man2/fallocate.2:65
723 msgid "The default operation (i.e., I<mode> is zero) of B<fallocate>() allocates the disk space within the range specified by I<offset> and I<len>. The file size (as reported by B<stat>(2)) will be changed if I<offset>+I<len> is greater than the file size. Any subregion within the range specified by I<offset> and I<len> that did not contain data before the call will be initialized to zero. This default behavior closely resembles the behavior of the B<posix_fallocate>(3) library function, and is intended as a method of optimally implementing that function."
724 msgstr "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告される) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供することを目的としているからである。"
727 #: build/C/man2/fallocate.2:71
728 msgid "After a successful call, subsequent writes into the range specified by I<offset> and I<len> are guaranteed not to fail because of lack of disk space."
731 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
732 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
735 #: build/C/man2/fallocate.2:82
736 msgid "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of the call is similar, but the file size will not be changed even if I<offset>+I<len> is greater than the file size. Preallocating zeroed blocks beyond the end of the file in this manner is useful for optimizing append workloads."
738 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコール\n"
739 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
740 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
741 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
745 #: build/C/man2/fallocate.2:86
746 msgid "Because allocation is done in block size chunks, B<fallocate>() may allocate a larger range of disk space than was specified."
748 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたより\n"
749 "も大きなディスク領域を割り当てることがある。"
752 #: build/C/man2/fallocate.2:86
754 msgid "Deallocating file space"
755 msgstr "ファイル空間の割り当て解除"
758 #: build/C/man2/fallocate.2:101
759 msgid "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) in I<mode> deallocates space (i.e., creates a hole) in the byte range starting at I<offset> and continuing for I<len> bytes. Within the specified range, partial filesystem blocks are zeroed, and whole filesystem blocks are removed from the file. After a successful call, subsequent reads from this range will return zeroes."
760 msgstr "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロックは 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルから削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 を返す。"
763 #: build/C/man2/fallocate.2:112
764 msgid "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in I<mode>; in other words, even when punching off the end of the file, the file size (as reported by B<stat>(2)) does not change."
765 msgstr "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとって I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
768 #: build/C/man2/fallocate.2:117
769 msgid "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't support the operation, an error is returned. The operation is supported on at least the following filesystems:"
770 msgstr "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけではない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
773 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
774 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
775 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
776 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
777 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
778 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
779 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
780 #: build/C/man2/shmop.2:80 build/C/man2/memfd_create.2:248
781 #: build/C/man2/memfd_create.2:258 build/C/man2/memfd_create.2:266
787 #: build/C/man2/fallocate.2:119
788 msgid "XFS (since Linux 2.6.38)"
789 msgstr "XFS (Linux 2.6.38 以降)"
791 #. commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
793 #: build/C/man2/fallocate.2:122
794 msgid "ext4 (since Linux 3.0)"
795 msgstr "ext4 (Linux 3.0 以降)"
798 #: build/C/man2/fallocate.2:124
799 msgid "Btrfs (since Linux 3.7)"
800 msgstr "Btrfs (Linux 3.7 以降)"
802 #. commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
804 #: build/C/man2/fallocate.2:127
805 msgid "tmpfs (since Linux 3.5)"
806 msgstr "tmpfs (Linux 3.5 以降)"
809 #: build/C/man2/fallocate.2:127
811 msgid "Collapsing file space"
814 #. commit 00f5e61998dd17f5375d9dfc01331f104b83f841
816 #: build/C/man2/fallocate.2:147
817 msgid "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) in I<mode> removes a byte range from a file, without leaving a hole. The byte range to be collapsed starts at I<offset> and continues for I<len> bytes. At the completion of the operation, the contents of the file starting at the location I<offset+len> will be appended at the location I<offset>, and the file will be I<len> bytes smaller."
818 msgstr "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残さない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲である。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さくなる。"
821 #: build/C/man2/fallocate.2:161
822 msgid "A filesystem may place limitations on the granularity of the operation, in order to ensure efficient implementation. Typically, I<offset> and I<len> must be a multiple of the filesystem logical block size, which varies according to the filesystem type and configuration. If a filesystem has such a requirement, B<fallocate>() will fail with the error B<EINVAL> if this requirement is violated."
823 msgstr "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設けることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサイズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
826 #: build/C/man2/fallocate.2:170
827 msgid "If the region specified by I<offset> plus I<len> reaches or passes the end of file, an error is returned; instead, use B<ftruncate>(2) to truncate a file."
828 msgstr "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達している場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う B<ftruncate>(2) を使用すること。"
831 #: build/C/man2/fallocate.2:175
832 msgid "No other flags may be specified in I<mode> in conjunction with B<FALLOC_FL_COLLAPSE_RANGE>."
833 msgstr "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはできない。"
835 #. commit 9eb79482a97152930b113b51dff530aba9e28c8e
836 #. commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
838 #: build/C/man2/fallocate.2:183
839 msgid "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for extent-based files) and XFS."
840 msgstr "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースのファイル) と XFS でサポートされている。"
843 #: build/C/man2/fallocate.2:183
845 msgid "Zeroing file space"
848 #. commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
850 #: build/C/man2/fallocate.2:199
851 msgid "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14) in I<mode> zeroes space in the byte range starting at I<offset> and continuing for I<len> bytes. Within the specified range, blocks are preallocated for the regions that span the holes in the file. After a successful call, subsequent reads from this range will return zeroes."
852 msgstr "B<FALLOC_FL_ZERO_RANGE> フラグ (Linux 3.14 以降で利用可能) を I<mode> に指定すると、 I<offset> で始まる I<len> バイト範囲の空間をゼロ埋めする。 指定された範囲の中では、ブロックは、そのファイル内のホールが広がる領域にあらかじめ割り当てられたものである。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 を返す。"
855 #: build/C/man2/fallocate.2:205
856 msgid "Zeroing is done within the filesystem preferably by converting the range into unwritten extents. This approach means that the specified range will not be physically zeroed out on the device (except for partial blocks at the either end of the range), and I/O is (otherwise) required only to update metadata."
857 msgstr "ゼロ埋めは、ファイルシステム内部では、指定された範囲を書き込みを伴わないエクステントに変換する方法をできるだけ使って行われる。 この方法は、指定された範囲について物理的にゼロ埋めしたデータがデバイスに書き込まれるのではないことを意味する (例外は指定された範囲の端の部分的に使用しているブロックである)。 (これ以外で) I/O が必要なのはメタデータの更新だけである。"
860 #: build/C/man2/fallocate.2:217
861 msgid "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the behavior of the call is similar, but the file size will not be changed even if I<offset>+I<len> is greater than the file size. This behavior is the same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
862 msgstr "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に追加で指定された場合、 このシステムコールの動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合であってもファイルサイズは変更されない点が異なる。 この動作は B<FALLOC_FL_KEEP_SIZE> を指定してスペースを前もって割り当てた場合と同じである。"
865 #: build/C/man2/fallocate.2:222
866 msgid "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't support the operation, an error is returned. The operation is supported on at least the following filesystems:"
867 msgstr "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけではない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
869 #. commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
871 #: build/C/man2/fallocate.2:225
872 msgid "XFS (since Linux 3.14)"
873 msgstr "XFS (Linux 3.14 以降)"
875 #. commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
877 #: build/C/man2/fallocate.2:228
878 msgid "ext4, for extent-based files (since Linux 3.14)"
879 msgstr "ext4 のエクステントベースのファイル (Linux 3.14 以降)"
882 #: build/C/man2/fallocate.2:235
883 msgid "On success, B<fallocate>() returns zero. On error, -1 is returned and I<errno> is set to indicate the error."
884 msgstr "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
887 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
888 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
889 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
890 #: build/C/man2/sync_file_range.2:148
896 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
897 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
898 msgstr "I<fd> が有効なファイルディスクリプターでないか、 書き込み用としてオープンされていない。"
901 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
907 #: build/C/man2/fallocate.2:244
908 msgid "I<offset>+I<len> exceeds the maximum file size."
909 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
912 #: build/C/man2/fallocate.2:244
918 #: build/C/man2/fallocate.2:247
919 msgid "A signal was caught during execution."
920 msgstr "実行中にシグナルが捕捉された。"
923 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
924 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
925 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
928 #: build/C/man2/fallocate.2:269
929 msgid "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> plus I<len> reaches or passes the end of the file."
930 msgstr "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達している。"
933 #: build/C/man2/fallocate.2:279
934 msgid "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is not a multiple of the filesystem block size."
935 msgstr "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれかがファイルシステムのブロックサイズの倍数ではない。"
938 #: build/C/man2/fallocate.2:287
939 msgid "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
940 msgstr "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
942 #. There was a inconsistency in 3.15-rc1, that should be resolved so that all
943 #. filesystems use this error for this case. (Tytso says ex4 will change.)
944 #. http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
945 #. From: Michael Kerrisk (man-pages <mtk.manpages@...>
946 #. Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
947 #. Newsgroups: gmane.linux.man, gmane.linux.file-systems
948 #. Date: 2014-04-17 13:40:05 GMT
950 #: build/C/man2/fallocate.2:304
951 msgid "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the file referred to by I<fd> is not a regular file."
952 msgstr "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 I<fd> が参照しているファイルが通常のファイルではない。"
955 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
956 #: build/C/man2/sync_file_range.2:160
962 #: build/C/man2/fallocate.2:307
963 msgid "An I/O error occurred while reading from or writing to a filesystem."
964 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
967 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
968 #: build/C/man3/posix_fallocate.3:87 build/C/man2/s390_pci_mmio_write.2:92
974 #: build/C/man2/fallocate.2:314
975 msgid "I<fd> does not refer to a regular file or a directory. (If I<fd> is a pipe or FIFO, a different error results.)"
976 msgstr "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO を参照している場合、別のエラーが発生する)。"
979 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
980 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
986 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
987 msgid "There is not enough space left on the device containing the file referred to by I<fd>."
988 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
991 #: build/C/man2/fallocate.2:323
992 msgid "This kernel does not implement B<fallocate>()."
993 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
996 #: build/C/man2/fallocate.2:323
998 msgid "B<EOPNOTSUPP>"
999 msgstr "B<EOPNOTSUPP>"
1002 #: build/C/man2/fallocate.2:332
1003 msgid "The filesystem containing the file referred to by I<fd> does not support this operation; or the I<mode> is not supported by the filesystem containing the file referred to by I<fd>."
1005 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1006 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1007 "I<mode> をサポートしていない。"
1010 #: build/C/man2/fallocate.2:332 build/C/man2/fallocate.2:338
1011 #: build/C/man2/fallocate.2:351 build/C/man2/mlock.2:143
1012 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/mmap.2:467
1013 #: build/C/man2/shmctl.2:353 build/C/man2/shmget.2:241
1019 #: build/C/man2/fallocate.2:338
1020 msgid "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
1021 msgstr "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>(1) 参照)。"
1024 #: build/C/man2/fallocate.2:351
1025 msgid "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1026 msgstr "I<mode> に B<FALLOC_FL_PUNCH_HOLE> か B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1029 #: build/C/man2/fallocate.2:355 build/C/man2/mmap.2:471
1030 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
1031 msgstr "操作が file seal により禁止されている。 B<fcntl>(2) 参照。"
1034 #: build/C/man2/fallocate.2:355 build/C/man2/posix_fadvise.2:97
1035 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1041 #: build/C/man2/fallocate.2:359
1042 msgid "I<fd> refers to a pipe or FIFO."
1043 msgstr "I<fd> がパイプか FIFO を参照している。"
1046 #: build/C/man2/fallocate.2:359 build/C/man2/mmap.2:471
1052 #: build/C/man2/fallocate.2:367
1053 msgid "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by I<fd> is currently being executed."
1054 msgstr "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルは現在実行中である。"
1057 #: build/C/man2/fallocate.2:367 build/C/man2/madvise.2:325
1058 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1059 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1060 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1061 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1062 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1063 #: build/C/man2/sync_file_range.2:177 build/C/man2/memfd_create.2:155
1064 #: build/C/man2/s390_pci_mmio_write.2:98
1069 #. See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1071 #: build/C/man2/fallocate.2:375
1072 msgid "B<fallocate>() is available on Linux since kernel 2.6.23. Support is provided by glibc since version 2.10. The B<FALLOC_FL_*> flags are defined in glibc headers only since version 2.18."
1073 msgstr "B<fallocate>() はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダファイルで定義されているのは、バージョン 2.18 以降のみである。"
1076 #: build/C/man2/fallocate.2:378
1077 msgid "B<fallocate>() is Linux-specific."
1078 msgstr "B<fallocate>() は Linux 固有である。"
1081 #: build/C/man2/fallocate.2:383
1082 msgid "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1083 msgstr "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1086 #: build/C/man2/madvise.2:35
1092 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1098 #: build/C/man2/madvise.2:38
1099 msgid "madvise - give advice about use of memory"
1100 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1103 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1104 #: build/C/man3/shm_open.3:31
1105 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1106 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1109 #: build/C/man2/madvise.2:42
1110 msgid "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1111 msgstr "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1114 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1115 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1116 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1117 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1120 #: build/C/man2/madvise.2:50
1121 msgid "B<madvise>(): _BSD_SOURCE"
1122 msgstr "B<madvise>(): _BSD_SOURCE"
1125 #: build/C/man2/madvise.2:68
1126 msgid "The B<madvise>() system call advises the kernel about how to handle paging input/output in the address range beginning at address I<addr> and with size I<length> bytes. It allows an application to tell the kernel how it expects to use some mapped or shared memory areas, so that the kernel can choose appropriate read-ahead and caching techniques. This call does not influence the semantics of the application (except in the case of B<MADV_DONTNEED>), but may influence its performance. The kernel is free to ignore the advice."
1127 msgstr "B<madvise>() システムコールは、アドレス I<addr> からはじまる I<length> バイトのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイスする。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーションの動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1130 #: build/C/man2/madvise.2:72
1131 msgid "The advice is indicated in the I<advice> argument which can be"
1132 msgstr "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1135 #: build/C/man2/madvise.2:72
1137 msgid "B<MADV_NORMAL>"
1138 msgstr "B<MADV_NORMAL>"
1141 #: build/C/man2/madvise.2:76
1142 msgid "No special treatment. This is the default."
1143 msgstr "特別な扱いは行わない。これがデフォルトである。"
1146 #: build/C/man2/madvise.2:76
1148 msgid "B<MADV_RANDOM>"
1149 msgstr "B<MADV_RANDOM>"
1152 #: build/C/man2/madvise.2:80
1153 msgid "Expect page references in random order. (Hence, read ahead may be less useful than normally.)"
1154 msgstr "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果がなさそうだ。)"
1157 #: build/C/man2/madvise.2:80
1159 msgid "B<MADV_SEQUENTIAL>"
1160 msgstr "B<MADV_SEQUENTIAL>"
1163 #: build/C/man2/madvise.2:85
1164 msgid "Expect page references in sequential order. (Hence, pages in the given range can be aggressively read ahead, and may be freed soon after they are accessed.)"
1165 msgstr "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のページは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放して良い。)"
1168 #: build/C/man2/madvise.2:85
1170 msgid "B<MADV_WILLNEED>"
1171 msgstr "B<MADV_WILLNEED>"
1174 #: build/C/man2/madvise.2:89
1175 msgid "Expect access in the near future. (Hence, it might be a good idea to read some pages ahead.)"
1176 msgstr "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みしておくといいだろう。)"
1179 #: build/C/man2/madvise.2:89
1181 msgid "B<MADV_DONTNEED>"
1182 msgstr "B<MADV_DONTNEED>"
1185 #: build/C/man2/madvise.2:100
1186 msgid "Do not expect access in the near future. (For the time being, the application is finished with the given range, so the kernel can free resources associated with it.) Subsequent accesses of pages in this range will succeed, but will result either in reloading of the memory contents from the underlying mapped file (see B<mmap>(2)) or zero-fill-on-demand pages for mappings without an underlying file."
1187 msgstr "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を終えている。 したがってカーネルはこれに関連するリソースを解放して良い。) これ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマップ元のファイルからロードし直すことになる (B<mmap>(2) を見よ) か、 または元ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることになる。"
1190 #: build/C/man2/madvise.2:100
1192 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1193 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1196 #. Databases want to use this feature to drop a section of their
1197 #. bufferpool (shared memory segments) - without writing back to
1198 #. disk/swap space. This feature is also useful for supporting
1199 #. hot-plug memory on UML.
1201 #: build/C/man2/madvise.2:113
1202 msgid "Free up a given range of pages and its associated backing store. Currently, only shmfs/tmpfs supports this; other filesystems return with the error B<ENOSYS>."
1203 msgstr "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が返される。"
1206 #: build/C/man2/madvise.2:113
1208 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1209 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1211 #. See http://lwn.net/Articles/171941/
1212 #. [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1213 #. Currently, copy-on-write may change the physical address of
1214 #. a page even if the user requested that the page is pinned in
1215 #. memory (either by mlock or by get_user_pages). This happens
1216 #. if the process forks meanwhile, and the parent writes to that
1217 #. page. As a result, the page is orphaned: in case of
1218 #. get_user_pages, the application will never see any data hardware
1219 #. DMA's into this page after the COW. In case of mlock'd memory,
1220 #. the parent is not getting the realtime/security benefits of mlock.
1221 #. In particular, this affects the Infiniband modules which do DMA from
1222 #. and into user pages all the time.
1223 #. This patch adds madvise options to control whether memory range is
1224 #. inherited across fork. Useful e.g. for when hardware is doing DMA
1225 #. from/into these pages. Could also be useful to an application
1226 #. wanting to speed up its forks by cutting large areas out of
1228 #. SEE ALSO: http://lwn.net/Articles/171941/
1229 #. "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1231 #: build/C/man2/madvise.2:144
1232 msgid "Do not make the pages in this range available to the child after a B<fork>(2). This is useful to prevent copy-on-write semantics from changing the physical location of a page(s) if the parent writes to it after a B<fork>(2). (Such page relocations cause problems for hardware that DMAs into the page(s).)"
1233 msgstr "B<fork>(2) が行われた後、指定された範囲のページを子プロセスが利用できないようにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2) の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しないようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送を行うような場合に 問題を起こすことがある)。"
1236 #: build/C/man2/madvise.2:144
1238 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1239 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1242 #: build/C/man2/madvise.2:150
1243 msgid "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby a mapping is inherited across B<fork>(2)."
1244 msgstr "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>(2) の前後でマッピングは継承されるようになる。"
1247 #: build/C/man2/madvise.2:150
1249 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1250 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1253 #: build/C/man2/madvise.2:162
1254 msgid "Poison a page and handle it like a hardware memory corruption. This operation is available only for privileged (B<CAP_SYS_ADMIN>) processes. This operation may result in the calling process receiving a B<SIGBUS> and the page being unmapped. This feature is intended for testing of memory error-handling code; it is available only if the kernel was configured with B<CONFIG_MEMORY_FAILURE>."
1255 msgstr "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップされる。 この機能はメモリのエラー処理コードをテストするためのものである。 カーネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1258 #: build/C/man2/madvise.2:162
1260 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1261 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1264 #: build/C/man2/madvise.2:180
1265 msgid "Soft offline the pages in the range specified by I<addr> and I<length>. The memory of each page in the specified range is preserved (i.e., when next accessed, the same content will be visible, but in a new physical page frame), and the original page is offlined (i.e., no longer used, and taken out of normal memory management). The effect of the B<MADV_SOFT_OFFLINE> operation is invisible to (i.e., does not change the semantics of) the calling process. This feature is intended for testing of memory error-handling code; it is available only if the kernel was configured with B<CONFIG_MEMORY_FAILURE>."
1266 msgstr "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない (つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1269 #: build/C/man2/madvise.2:180
1271 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1272 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1275 #: build/C/man2/madvise.2:205
1276 msgid "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by I<addr> and I<length>. The kernel regularly scans those areas of user memory that have been marked as mergeable, looking for pages with identical content. These are replaced by a single write-protected page (which is automatically copied if a process later wants to update the content of the page). KSM merges only private anonymous pages (see B<mmap>(2)). The KSM feature is intended for applications that generate many instances of the same data (e.g., virtualization systems such as KVM). It can consume a lot of processing power; use with care. See the Linux kernel source file I<Documentation/vm/ksm.txt> for more details. The B<MADV_MERGEABLE> and B<MADV_UNMERGEABLE> operations are available only if the kernel was configured with B<CONFIG_KSM>."
1277 msgstr "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がついたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) がかかった一つのページで置き換えられる (プロセスが後でページの内容を更新しようとした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ページ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデータのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があり、注意して使用すること。 詳細は Linux カーネルソースファイル I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になっている場合にのみ利用できる。"
1280 #: build/C/man2/madvise.2:205
1282 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1283 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1286 #: build/C/man2/madvise.2:214
1287 msgid "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified address range; KSM unmerges whatever pages it had merged in the address range specified by I<addr> and I<length>."
1288 msgstr "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効果を取り消す。 KSM は、 I<addr> と I<length> で指定されたアドレス範囲の統合済みのすべてのページの統合解除を行う。"
1291 #: build/C/man2/madvise.2:214
1293 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1294 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1296 #. http://lwn.net/Articles/358904/
1297 #. https://lwn.net/Articles/423584/
1299 #: build/C/man2/madvise.2:243
1300 msgid "Enables Transparent Huge Pages (THP) for pages in the range specified by I<addr> and I<length>. Currently, Transparent Huge Pages work only with private anonymous pages (see B<mmap>(2)). The kernel will regularly scan the areas marked as huge page candidates to replace them with huge pages. The kernel will also allocate huge pages directly when the region is naturally aligned to the huge page size (see B<posix_memalign>(2)). This feature is primarily aimed at applications that use large mappings of data and access large regions of that memory at a time (e.g., virtualization systems such as QEMU). It can very easily waste memory (e.g., a 2MB mapping that only ever accesses 1 byte will result in 2MB of wired memory instead of one 4KB page). See the Linux kernel source file I<Documentation/vm/transhuge.txt> for more details. The B<MADV_HUGEPAGE> and B<MADV_NOHUGEPAGE> operations are available only if the kernel was configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1301 msgstr "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ (anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ (huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータマッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されている。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセスしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってしまう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge.txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用できる。"
1304 #: build/C/man2/madvise.2:243
1306 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1307 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1310 #: build/C/man2/madvise.2:250
1311 msgid "Ensures that memory in the address range specified by I<addr> and I<length> will not be collapsed into huge pages."
1312 msgstr "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込まれないようにする。"
1315 #: build/C/man2/madvise.2:250
1317 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1318 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1321 #: build/C/man2/madvise.2:264
1322 msgid "Exclude from a core dump those pages in the range specified by I<addr> and I<length>. This is useful in applications that have large areas of memory that are known not to be useful in a core dump. The effect of B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</proc/PID/coredump_filter> file (see B<core>(5))."
1323 msgstr "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これは、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域があるアプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/coredump_filter> ファイル経由で設定されたビットマスクよりも優先される (B<core>(5) 参照)。"
1326 #: build/C/man2/madvise.2:264
1328 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1329 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1332 #: build/C/man2/madvise.2:268
1333 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1334 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1337 #: build/C/man2/madvise.2:275
1338 msgid "On success B<madvise>() returns zero. On error, it returns -1 and I<errno> is set appropriately."
1339 msgstr "B<madvise>() は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> を適切な値に設定する。"
1342 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1343 #: build/C/man2/mremap.2:136
1349 #: build/C/man2/madvise.2:279
1350 msgid "A kernel resource was temporarily unavailable."
1351 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1354 #: build/C/man2/madvise.2:282
1355 msgid "The map exists, but the area maps something that isn't a file."
1356 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1359 #: build/C/man2/madvise.2:285
1360 msgid "This error can occur for the following reasons:"
1361 msgstr "このエラーは以下の理由で発生する。"
1366 #: build/C/man2/madvise.2:292
1367 msgid "The value I<len> is negative."
1368 msgstr "I<len> が負の値である。"
1371 #: build/C/man2/madvise.2:295
1372 msgid "I<addr> is not page-aligned."
1373 msgstr "I<addr> がページ境界ではない。"
1376 #: build/C/man2/madvise.2:298
1377 msgid "I<advice> is not a valid value"
1378 msgstr "I<advice> が有効な値でない。"
1381 #: build/C/man2/madvise.2:301
1382 msgid "The application is attempting to release locked or shared pages (with B<MADV_DONTNEED>)."
1384 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解放\n"
1388 #: build/C/man2/madvise.2:309
1389 msgid "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the kernel was not configured with B<CONFIG_KSM>."
1390 msgstr "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1393 #: build/C/man2/madvise.2:316
1394 msgid "(for B<MADV_WILLNEED>) Paging in this area would exceed the process's maximum resident set size."
1395 msgstr "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS (resident set size) の最大値を越えてしまう。"
1398 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1399 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1400 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1401 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1402 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1403 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1404 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1405 #: build/C/man2/sync_file_range.2:163 build/C/man2/memfd_create.2:152
1406 #: build/C/man2/s390_pci_mmio_write.2:95
1412 #: build/C/man2/madvise.2:321
1413 msgid "(for B<MADV_WILLNEED>) Not enough memory: paging in failed."
1414 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1417 #: build/C/man2/madvise.2:325
1418 msgid "Addresses in the specified range are not currently mapped, or are outside the address space of the process."
1419 msgstr "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス空間の内部にない。"
1421 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1423 #: build/C/man2/madvise.2:332
1424 msgid "Since Linux 3.18, support for this system call is optional, depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1425 msgstr "Linux 3.18 以降では、このシステムコールのサポートは任意となり、利用できるかはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされているかに依存する。"
1427 #. FIXME . Write a posix_madvise(3) page.
1429 #: build/C/man2/madvise.2:345
1430 msgid "POSIX.1b. POSIX.1-2001 describes B<posix_madvise>(3) with constants B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close to that described here. There is a similar B<posix_fadvise>(2) for file access."
1431 msgstr "POSIX.1b. POSIX.1-2001 では、 B<posix_madvise>(3) を B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2) という類似の関数が存在する。"
1434 #: build/C/man2/madvise.2:354
1435 msgid "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1437 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1438 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1441 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
1442 #: build/C/man2/shmget.2:370
1448 #: build/C/man2/madvise.2:363
1449 msgid "The current Linux implementation (2.4.0) views this system call more as a command than as advice and hence may return an error when it cannot do what it usually would do in response to this advice. (See the ERRORS description above.) This is nonstandard behavior."
1450 msgstr "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準とは異なる。"
1455 #. function first appeared in 4.4BSD.
1457 #: build/C/man2/madvise.2:379
1458 msgid "The Linux implementation requires that the address I<addr> be page-aligned, and allows I<length> to be zero. If there are some parts of the specified address range that are not mapped, the Linux version of B<madvise>() ignores them and applies the call to the rest (but returns B<ENOMEM> from the system call, as it should)."
1459 msgstr "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また I<length> は 0 であっても構わない。 また Linux 版の B<madvise>() では、指定されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を返す)。"
1462 #: build/C/man2/madvise.2:388
1463 msgid "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), B<munmap>(2), B<prctl>(2), B<core>(5)"
1464 msgstr "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), B<munmap>(2), B<prctl>(2), B<core>(5)"
1467 #: build/C/man3/mallinfo.3:26
1473 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1479 #: build/C/man3/mallinfo.3:29
1480 msgid "mallinfo - obtain memory allocation information"
1481 msgstr "mallinfo - メモリ割り当て情報を取得する"
1484 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1485 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1486 #: build/C/man3/mallopt.3:31
1487 msgid "B<#include E<lt>malloc.hE<gt>>"
1488 msgstr "B<#include E<lt>malloc.hE<gt>>"
1491 #: build/C/man3/mallinfo.3:33
1492 msgid "B<struct mallinfo mallinfo(void);>"
1493 msgstr "B<struct mallinfo mallinfo(void);>"
1496 #: build/C/man3/mallinfo.3:41
1497 msgid "The B<mallinfo>() function returns a copy of a structure containing information about memory allocations performed by B<malloc>(3) and related functions. This structure is defined as follows:"
1499 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1500 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1501 "この構造体は以下のように定義されている。"
1504 #: build/C/man3/mallinfo.3:56
1507 "struct mallinfo {\n"
1508 " int arena; /* Non-mmapped space allocated (bytes) */\n"
1509 " int ordblks; /* Number of free chunks */\n"
1510 " int smblks; /* Number of free fastbin blocks */\n"
1511 " int hblks; /* Number of mmapped regions */\n"
1512 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
1513 " int usmblks; /* Maximum total allocated space (bytes) */\n"
1514 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
1515 " int uordblks; /* Total allocated space (bytes) */\n"
1516 " int fordblks; /* Total free space (bytes) */\n"
1517 " int keepcost; /* Top-most, releasable space (bytes) */\n"
1520 "struct mallinfo {\n"
1521 " int arena; /* Non-mmapped space allocated (bytes) */\n"
1522 " int ordblks; /* Number of free chunks */\n"
1523 " int smblks; /* Number of free fastbin blocks */\n"
1524 " int hblks; /* Number of mmapped regions */\n"
1525 " int hblkhd; /* Space allocated in mmapped regions (bytes) */\n"
1526 " int usmblks; /* Maximum total allocated space (bytes) */\n"
1527 " int fsmblks; /* Space in freed fastbin blocks (bytes) */\n"
1528 " int uordblks; /* Total allocated space (bytes) */\n"
1529 " int fordblks; /* Total free space (bytes) */\n"
1530 " int keepcost; /* Top-most, releasable space (bytes) */\n"
1534 #: build/C/man3/mallinfo.3:62
1535 msgid "The fields of the I<mallinfo> structure contain the following information:"
1536 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1539 #: build/C/man3/mallinfo.3:62
1545 #: build/C/man3/mallinfo.3:68
1546 msgid "The total amount of memory allocated by means other than B<mmap>(2) (i.e., memory allocated on the heap). This figure includes both in-use blocks and blocks on the free list."
1550 #: build/C/man3/mallinfo.3:68
1556 #: build/C/man3/mallinfo.3:71
1557 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1561 #: build/C/man3/mallinfo.3:71
1567 #: build/C/man3/mallinfo.3:75
1568 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1572 #: build/C/man3/mallinfo.3:75
1578 #: build/C/man3/mallinfo.3:83
1579 msgid "The number of blocks currently allocated using B<mmap>(2). (See the discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1583 #: build/C/man3/mallinfo.3:83
1589 #: build/C/man3/mallinfo.3:87
1590 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1594 #: build/C/man3/mallinfo.3:87
1600 #: build/C/man3/mallinfo.3:92
1601 msgid "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount of space that was ever allocated. This field is maintained only in nonthreading environments."
1605 #: build/C/man3/mallinfo.3:92
1611 #: build/C/man3/mallinfo.3:95
1612 msgid "The total number of bytes in fastbin free blocks."
1616 #: build/C/man3/mallinfo.3:95
1619 msgstr "I<uordblks>"
1622 #: build/C/man3/mallinfo.3:98
1623 msgid "The total number of bytes used by in-use allocations."
1627 #: build/C/man3/mallinfo.3:98
1630 msgstr "I<fordblks>"
1633 #: build/C/man3/mallinfo.3:101
1634 msgid "The total number of bytes in free blocks."
1638 #: build/C/man3/mallinfo.3:101
1641 msgstr "I<keepcost>"
1644 #. Available already in glibc 2.0, possibly earlier
1646 #: build/C/man3/mallinfo.3:110
1647 msgid "The total amount of releasable free space at the top of the heap. This is the maximum number of bytes that could ideally (i.e., ignoring page alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1651 #: build/C/man3/mallinfo.3:114
1652 msgid "This function is not specified by POSIX or the C standards. A similar function exists on many System V derivatives, and was specified in the SVID."
1655 #. FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
1656 #. See the 24 Aug 2011 mail by Paul Pluzhnikov:
1657 #. "[patch] Fix mallinfo() to accumulate results for all arenas"
1658 #. on libc-alpha@sourceware.org
1660 #: build/C/man3/mallinfo.3:126
1661 msgid "B<Information is returned for only the main memory allocation area.> Allocations in other arenas are excluded. See B<malloc_stats>(3) and B<malloc_info>(3) for alternatives that include information about other arenas."
1665 #: build/C/man3/mallinfo.3:134
1666 msgid "The fields of the I<mallinfo> structure are typed as I<int>. However, because some internal bookkeeping values may be of type I<long>, the reported values may wrap around zero and thus be inaccurate."
1670 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1671 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
1672 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:633
1673 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
1674 #: build/C/man2/memfd_create.2:293
1680 #: build/C/man3/mallinfo.3:140
1681 msgid "The program below employs B<mallinfo>() to retrieve memory allocation statistics before and after allocating and freeing some blocks of memory. The statistics are displayed on standard output."
1685 #: build/C/man3/mallinfo.3:144
1686 msgid "The first two command-line arguments specify the number and size of blocks to be allocated with B<malloc>(3)."
1690 #: build/C/man3/mallinfo.3:158
1691 msgid "The remaining three arguments specify which of the allocated blocks should be freed with B<free>(3). These three arguments are optional, and specify (in order): the step size to be used in the loop that frees blocks (the default is 1, meaning free all blocks in the range); the ordinal position of the first block to be freed (default 0, meaning the first allocated block); and a number one greater than the ordinal position of the last block to be freed (default is one greater than the maximum block number). If these three arguments are omitted, then the defaults cause all allocated blocks to be freed."
1695 #: build/C/man3/mallinfo.3:162
1696 msgid "In the following example run of the program, 1000 allocations of 100 bytes are performed, and then every second allocated block is freed:"
1700 #: build/C/man3/mallinfo.3:177
1703 "$ B<./a.out 1000 100 2>\n"
1704 "============== Before allocating blocks ==============\n"
1705 "Total non-mmapped bytes (arena): 0\n"
1706 "# of free chunks (ordblks): 1\n"
1707 "# of free fastbin blocks (smblks): 0\n"
1708 "# of mapped regions (hblks): 0\n"
1709 "Bytes in mapped regions (hblkhd): 0\n"
1710 "Max. total allocated space (usmblks): 0\n"
1711 "Free bytes held in fastbins (fsmblks): 0\n"
1712 "Total allocated space (uordblks): 0\n"
1713 "Total free space (fordblks): 0\n"
1714 "Topmost releasable block (keepcost): 0\n"
1716 "$ B<./a.out 1000 100 2>\n"
1717 "============== Before allocating blocks ==============\n"
1718 "Total non-mmapped bytes (arena): 0\n"
1719 "# of free chunks (ordblks): 1\n"
1720 "# of free fastbin blocks (smblks): 0\n"
1721 "# of mapped regions (hblks): 0\n"
1722 "Bytes in mapped regions (hblkhd): 0\n"
1723 "Max. total allocated space (usmblks): 0\n"
1724 "Free bytes held in fastbins (fsmblks): 0\n"
1725 "Total allocated space (uordblks): 0\n"
1726 "Total free space (fordblks): 0\n"
1727 "Topmost releasable block (keepcost): 0\n"
1730 #: build/C/man3/mallinfo.3:189
1733 "============== After allocating blocks ==============\n"
1734 "Total non-mmapped bytes (arena): 135168\n"
1735 "# of free chunks (ordblks): 1\n"
1736 "# of free fastbin blocks (smblks): 0\n"
1737 "# of mapped regions (hblks): 0\n"
1738 "Bytes in mapped regions (hblkhd): 0\n"
1739 "Max. total allocated space (usmblks): 0\n"
1740 "Free bytes held in fastbins (fsmblks): 0\n"
1741 "Total allocated space (uordblks): 104000\n"
1742 "Total free space (fordblks): 31168\n"
1743 "Topmost releasable block (keepcost): 31168\n"
1745 "============== After allocating blocks ==============\n"
1746 "Total non-mmapped bytes (arena): 135168\n"
1747 "# of free chunks (ordblks): 1\n"
1748 "# of free fastbin blocks (smblks): 0\n"
1749 "# of mapped regions (hblks): 0\n"
1750 "Bytes in mapped regions (hblkhd): 0\n"
1751 "Max. total allocated space (usmblks): 0\n"
1752 "Free bytes held in fastbins (fsmblks): 0\n"
1753 "Total allocated space (uordblks): 104000\n"
1754 "Total free space (fordblks): 31168\n"
1755 "Topmost releasable block (keepcost): 31168\n"
1758 #: build/C/man3/mallinfo.3:201
1761 "============== After freeing blocks ==============\n"
1762 "Total non-mmapped bytes (arena): 135168\n"
1763 "# of free chunks (ordblks): 501\n"
1764 "# of free fastbin blocks (smblks): 0\n"
1765 "# of mapped regions (hblks): 0\n"
1766 "Bytes in mapped regions (hblkhd): 0\n"
1767 "Max. total allocated space (usmblks): 0\n"
1768 "Free bytes held in fastbins (fsmblks): 0\n"
1769 "Total allocated space (uordblks): 52000\n"
1770 "Total free space (fordblks): 83168\n"
1771 "Topmost releasable block (keepcost): 31168\n"
1773 "============== After freeing blocks ==============\n"
1774 "Total non-mmapped bytes (arena): 135168\n"
1775 "# of free chunks (ordblks): 501\n"
1776 "# of free fastbin blocks (smblks): 0\n"
1777 "# of mapped regions (hblks): 0\n"
1778 "Bytes in mapped regions (hblkhd): 0\n"
1779 "Max. total allocated space (usmblks): 0\n"
1780 "Free bytes held in fastbins (fsmblks): 0\n"
1781 "Total allocated space (uordblks): 52000\n"
1782 "Total free space (fordblks): 83168\n"
1783 "Topmost releasable block (keepcost): 31168\n"
1786 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
1787 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
1788 #: build/C/man2/mmap.2:645 build/C/man2/mprotect.2:164
1790 msgid "Program source"
1794 #: build/C/man3/mallinfo.3:208
1797 "#include E<lt>malloc.hE<gt>\n"
1798 "#include \"tlpi_hdr.h\"\n"
1800 "#include E<lt>malloc.hE<gt>\n"
1801 "#include \"tlpi_hdr.h\"\n"
1804 #: build/C/man3/mallinfo.3:213
1808 "display_mallinfo(void)\n"
1810 " struct mallinfo mi;\n"
1813 "display_mallinfo(void)\n"
1815 " struct mallinfo mi;\n"
1818 #: build/C/man3/mallinfo.3:215
1820 msgid " mi = mallinfo();\n"
1821 msgstr " mi = mallinfo();\n"
1824 #: build/C/man3/mallinfo.3:227
1827 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
1828 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
1829 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
1830 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
1831 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
1832 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
1833 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
1834 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
1835 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
1836 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
1839 " printf(\"Total non-mmapped bytes (arena): %d\\en\", mi.arena);\n"
1840 " printf(\"# of free chunks (ordblks): %d\\en\", mi.ordblks);\n"
1841 " printf(\"# of free fastbin blocks (smblks): %d\\en\", mi.smblks);\n"
1842 " printf(\"# of mapped regions (hblks): %d\\en\", mi.hblks);\n"
1843 " printf(\"Bytes in mapped regions (hblkhd): %d\\en\", mi.hblkhd);\n"
1844 " printf(\"Max. total allocated space (usmblks): %d\\en\", mi.usmblks);\n"
1845 " printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
1846 " printf(\"Total allocated space (uordblks): %d\\en\", mi.uordblks);\n"
1847 " printf(\"Total free space (fordblks): %d\\en\", mi.fordblks);\n"
1848 " printf(\"Topmost releasable block (keepcost): %d\\en\", mi.keepcost);\n"
1852 #: build/C/man3/mallinfo.3:235
1856 "main(int argc, char *argv[])\n"
1858 "#define MAX_ALLOCS 2000000\n"
1859 " char *alloc[MAX_ALLOCS];\n"
1860 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
1861 " size_t blockSize;\n"
1864 "main(int argc, char *argv[])\n"
1866 "#define MAX_ALLOCS 2000000\n"
1867 " char *alloc[MAX_ALLOCS];\n"
1868 " int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
1869 " size_t blockSize;\n"
1872 #: build/C/man3/mallinfo.3:239
1875 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
1876 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
1877 " \"[end-free]]]\\en\", argv[0]);\n"
1879 " if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
1880 " usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
1881 " \"[end-free]]]\\en\", argv[0]);\n"
1884 #: build/C/man3/mallinfo.3:245
1887 " numBlocks = atoi(argv[1]);\n"
1888 " blockSize = atoi(argv[2]);\n"
1889 " freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
1890 " freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
1891 " freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
1893 " numBlocks = atoi(argv[1]);\n"
1894 " blockSize = atoi(argv[2]);\n"
1895 " freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
1896 " freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
1897 " freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
1900 #: build/C/man3/mallinfo.3:248
1903 " printf(\"============== Before allocating blocks ==============\\en\");\n"
1904 " display_mallinfo();\n"
1906 " printf(\"============== Before allocating blocks ==============\\en\");\n"
1907 " display_mallinfo();\n"
1910 #: build/C/man3/mallinfo.3:252
1913 " for (j = 0; j E<lt> numBlocks; j++) {\n"
1914 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
1915 " fatal(\"Too many allocations\");\n"
1917 " for (j = 0; j E<lt> numBlocks; j++) {\n"
1918 " if (numBlocks E<gt>= MAX_ALLOCS)\n"
1919 " fatal(\"Too many allocations\");\n"
1922 #: build/C/man3/mallinfo.3:257
1925 " alloc[j] = malloc(blockSize);\n"
1926 " if (alloc[j] == NULL)\n"
1927 " errExit(\"malloc\");\n"
1930 " alloc[j] = malloc(blockSize);\n"
1931 " if (alloc[j] == NULL)\n"
1932 " errExit(\"malloc\");\n"
1936 #: build/C/man3/mallinfo.3:260
1939 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
1940 " display_mallinfo();\n"
1942 " printf(\"\\en============== After allocating blocks ==============\\en\");\n"
1943 " display_mallinfo();\n"
1946 #: build/C/man3/mallinfo.3:263
1949 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
1950 " free(alloc[j]);\n"
1952 " for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
1953 " free(alloc[j]);\n"
1956 #: build/C/man3/mallinfo.3:266
1959 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
1960 " display_mallinfo();\n"
1962 " printf(\"\\en============== After freeing blocks ==============\\en\");\n"
1963 " display_mallinfo();\n"
1966 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
1967 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
1968 #: build/C/man2/mmap.2:714 build/C/man2/memfd_create.2:437
1969 #: build/C/man2/memfd_create.2:486
1972 " exit(EXIT_SUCCESS);\n"
1975 " exit(EXIT_SUCCESS);\n"
1979 #: build/C/man3/mallinfo.3:279
1980 msgid "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mallopt>(3)"
1981 msgstr "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mallopt>(3)"
1984 #: build/C/man3/malloc_get_state.3:25
1986 msgid "MALLOC_GET_STATE"
1987 msgstr "MALLOC_GET_STATE"
1990 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
1996 #: build/C/man3/malloc_get_state.3:28
1997 msgid "malloc_get_state, malloc_set_state - record and restore state of malloc implementation"
2001 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2002 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2004 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2005 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2008 #: build/C/man3/malloc_get_state.3:33
2010 msgid "B<void* malloc_get_state(void);>\n"
2011 msgstr "B<void* malloc_get_state(void);>\n"
2014 #: build/C/man3/malloc_get_state.3:35
2016 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2017 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2020 #: build/C/man3/malloc_get_state.3:53
2021 msgid "The B<malloc_get_state>() function records the current state of all B<malloc>(3) internal bookkeeping variables (but not the actual contents of the heap or the state of B<malloc_hook>(3) functions pointers). The state is recorded in a system-dependent opaque data structure dynamically allocated via B<malloc>(3), and a pointer to that data structure is returned as the function result. (It is the caller's responsibility to B<free>(3) this memory.)"
2025 #: build/C/man3/malloc_get_state.3:61
2026 msgid "The B<malloc_set_state>() function restores the state of all B<malloc>(3) internal bookkeeping variables to the values recorded in the opaque data structure pointed to by I<state>."
2030 #: build/C/man3/malloc_get_state.3:68
2031 msgid "On success, B<malloc_get_state>() returns a pointer to a newly allocated opaque data structure. On error (for example, memory could not be allocated for the data structure), B<malloc_get_state>() returns NULL."
2034 #. if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2035 #. /* Must fail if the major version is too high. */
2036 #. if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2038 #: build/C/man3/malloc_get_state.3:86
2039 msgid "On success, B<malloc_set_state>() returns 0. If the implementation detects that I<state> does not point to a correctly formed data structure, B<malloc_set_state>() returns -1. If the implementation detects that the version of the data structure referred to by I<state> is a more recent version than this implementation knows about, B<malloc_set_state>() returns -2."
2043 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2044 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2045 msgid "These functions are GNU extensions."
2046 msgstr "これらの関数は GNU による拡張である。"
2049 #: build/C/man3/malloc_get_state.3:94
2050 msgid "These functions are useful when using this B<malloc>(3) implementation as part of a shared library, and the heap contents are saved/restored via some other method. This technique is used by GNU Emacs to implement its \"dumping\" function."
2053 #. i.e., calls __malloc_check_init()
2054 #. i.e., malloc checking is not already in use
2055 #. and the caller requested malloc checking
2057 #: build/C/man3/malloc_get_state.3:111
2058 msgid "Hook function pointers are never saved or restored by these functions, with two exceptions: if malloc checking (see B<mallopt>(3)) was in use when B<malloc_get_state>() was called, then B<malloc_set_state>() resets malloc checking hooks if possible; if malloc checking was not in use in the recorded state, but the caller has requested malloc checking, then the hooks are reset to 0."
2062 #: build/C/man3/malloc_get_state.3:114
2063 msgid "B<malloc>(3), B<mallopt>(3)"
2064 msgstr "B<malloc>(3), B<mallopt>(3)"
2067 #: build/C/man3/malloc_hook.3:10
2070 msgstr "MALLOC_HOOK"
2073 #: build/C/man3/malloc_hook.3:10
2079 #: build/C/man3/malloc_hook.3:15
2080 msgid "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, __realloc_hook, __after_morecore_hook - malloc debugging variables"
2081 msgstr "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, __realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2084 #: build/C/man3/malloc_hook.3:20
2086 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2087 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2090 #: build/C/man3/malloc_hook.3:23
2092 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2093 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2096 #: build/C/man3/malloc_hook.3:26
2099 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2100 "B< const void *>I<caller>B<);>\n"
2102 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2103 "B< const void *>I<caller>B<);>\n"
2106 #: build/C/man3/malloc_hook.3:28
2108 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2109 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2112 #: build/C/man3/malloc_hook.3:30
2114 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2115 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2118 #: build/C/man3/malloc_hook.3:32
2120 msgid "B<void (*__after_morecore_hook)(void);>\n"
2121 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2124 #: build/C/man3/malloc_hook.3:43
2125 msgid "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>(3), and B<free>(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example."
2126 msgstr "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで B<malloc>(3), B<realloc>(3), B<free>(3) の動作を変更することができる。例えば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うことができる。"
2129 #: build/C/man3/malloc_hook.3:50
2130 msgid "The variable B<__malloc_initialize_hook> points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:"
2131 msgstr "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリケーション内で 以下のような定義で上書きできる:"
2134 #: build/C/man3/malloc_hook.3:53
2136 msgid " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2137 msgstr " void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2140 #: build/C/man3/malloc_hook.3:58
2141 msgid "Now the function I<my_init_hook>() can do the initialization of all hooks."
2142 msgstr "なお、関数 I<my_init_hook>() で全てのフックの初期化をすることができる。"
2145 #: build/C/man3/malloc_hook.3:74
2146 msgid "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> have a prototype like the functions B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, except that they have a final argument I<caller> that gives the address of the caller of B<malloc>(3), etc."
2147 msgstr "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3) とよく似たプロトタイプを持っているが、 一番最後の引き数 I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3) などの呼び出し元 (caller) のアドレスが格納される。"
2150 #: build/C/man3/malloc_hook.3:80
2151 msgid "The variable B<__after_morecore_hook> points at a function that is called each time after B<sbrk>(2) was asked for more memory."
2152 msgstr "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2) が呼ばれた後で毎回呼び出される関数へのポインタである。"
2154 #. https://bugzilla.redhat.com/show_bug.cgi?id=450187
2155 #. http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2157 #: build/C/man3/malloc_hook.3:89
2158 msgid "The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. Programmers should instead preempt calls to the relevant functions by defining and exporting functions such as \"malloc\" and \"free\"."
2159 msgstr "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今では非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して公開して、 関連する関数を呼び出すようにすべきである。"
2162 #: build/C/man3/malloc_hook.3:91
2163 msgid "Here is a short example of how to use these variables."
2164 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2167 #: build/C/man3/malloc_hook.3:95
2170 "#include E<lt>stdio.hE<gt>\n"
2171 "#include E<lt>malloc.hE<gt>\n"
2173 "#include E<lt>stdio.hE<gt>\n"
2174 "#include E<lt>malloc.hE<gt>\n"
2177 #: build/C/man3/malloc_hook.3:99
2180 "/* Prototypes for our hooks. */\n"
2181 "static void my_init_hook(void);\n"
2182 "static void *my_malloc_hook(size_t, const void *);\n"
2184 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2185 "static void my_init_hook(void);\n"
2186 "static void *my_malloc_hook(size_t, const void *);\n"
2189 #: build/C/man3/malloc_hook.3:102
2192 "/* Variables to save original hooks. */\n"
2193 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2195 "/* 元々のフックを保存するための変数 */\n"
2196 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2199 #: build/C/man3/malloc_hook.3:105
2202 "/* Override initializing hook from the C library. */\n"
2203 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2205 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2206 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2209 #: build/C/man3/malloc_hook.3:112
2213 "my_init_hook(void)\n"
2215 " old_malloc_hook = __malloc_hook;\n"
2216 " __malloc_hook = my_malloc_hook;\n"
2220 "my_init_hook(void)\n"
2222 " old_malloc_hook = __malloc_hook;\n"
2223 " __malloc_hook = my_malloc_hook;\n"
2227 #: build/C/man3/malloc_hook.3:117
2231 "my_malloc_hook(size_t size, const void *caller)\n"
2236 "my_malloc_hook(size_t size, const void *caller)\n"
2241 #: build/C/man3/malloc_hook.3:120
2244 " /* Restore all old hooks */\n"
2245 " __malloc_hook = old_malloc_hook;\n"
2247 " /* 元々のフックを全て戻す */\n"
2248 " __malloc_hook = old_malloc_hook;\n"
2251 #: build/C/man3/malloc_hook.3:123
2254 " /* Call recursively */\n"
2255 " result = malloc(size);\n"
2257 " /* malloc の再帰的呼び出し */\n"
2258 " result = malloc(size);\n"
2261 #: build/C/man3/malloc_hook.3:126
2264 " /* Save underlying hooks */\n"
2265 " old_malloc_hook = __malloc_hook;\n"
2267 " /* 現在設定されているフック (underlying hook) を保存する */\n"
2268 " old_malloc_hook = __malloc_hook;\n"
2271 #: build/C/man3/malloc_hook.3:130
2274 " /* printf() might call malloc(), so protect it too. */\n"
2275 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2276 " (unsigned int) size, caller, result);\n"
2278 " /* printf() は malloc() を呼び出す可能性があるので\n"
2279 " ここでもガードを行う (元々のフックのままにしておく) */\n"
2280 " printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2281 " (unsigned int) size, caller, result);\n"
2284 #: build/C/man3/malloc_hook.3:133
2287 " /* Restore our own hooks */\n"
2288 " __malloc_hook = my_malloc_hook;\n"
2290 " /* ユーザが使おうとするフックを再設定する */\n"
2291 " __malloc_hook = my_malloc_hook;\n"
2294 #: build/C/man3/malloc_hook.3:136
2304 #: build/C/man3/malloc_hook.3:142
2305 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2306 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2309 #: build/C/man3/malloc_info.3:25
2312 msgstr "MALLOC_INFO"
2315 #: build/C/man3/malloc_info.3:28
2316 msgid "malloc_info - export malloc state to a stream"
2317 msgstr "malloc_info - malloc の状態をストリームに出力する"
2320 #: build/C/man3/malloc_info.3:33
2322 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
2323 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
2326 #: build/C/man3/malloc_info.3:44
2327 msgid "The B<malloc_info>() function exports an XML string that describes the current state of the memory-allocation implementation in the caller. The string is printed on the file stream I<stream>. The exported string includes information about all arenas (see B<malloc>(3))."
2328 msgstr "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す XML 文字列を出力する。 文字列は、 ファイルストリーム I<stream> に出力される。 出力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
2331 #: build/C/man3/malloc_info.3:48
2332 msgid "As currently implemented, I<options> must be zero."
2333 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
2336 #: build/C/man3/malloc_info.3:55
2337 msgid "On success, B<malloc_info>() returns 0; on error, it returns -1, with I<errno> set to indicate the cause."
2338 msgstr "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
2341 #: build/C/man3/malloc_info.3:60
2342 msgid "I<options> was nonzero."
2343 msgstr "I<options> が 0 でなかった。"
2346 #: build/C/man3/malloc_info.3:63
2347 msgid "B<malloc_info>() was added to glibc in version 2.10."
2348 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2351 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2352 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
2353 msgid "This function is a GNU extension."
2354 msgstr "この関数は GNU による拡張である。"
2357 #: build/C/man3/malloc_info.3:71
2358 msgid "The memory-allocation information is provided as an XML string (rather than a C structure) because the information may change over time (according to changes in the underlying implementation). The output XML string includes a version field."
2359 msgstr "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これは、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があるからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
2362 #: build/C/man3/malloc_info.3:77
2363 msgid "The B<open_memstream>(3) function can be used to send the output of B<malloc_info>() directly into a buffer in memory, rather than to a file."
2364 msgstr "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルではなくメモリ内のバッファに直接送ることができる。"
2367 #: build/C/man3/malloc_info.3:84
2368 msgid "The B<malloc_info>() function is designed to address deficiencies in B<malloc_stats>(3) and B<mallinfo>(3)."
2369 msgstr "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決するために設定された。"
2372 #: build/C/man3/malloc_info.3:95
2373 msgid "The program below takes up to four command-line arguments, of which the first three are mandatory. The first argument specifies the number of threads that the program should create. All of the threads, including the main thread, allocate the number of blocks of memory specified by the second argument. The third argument controls the size of the blocks to be allocated. The main thread creates blocks of this size, the second thread created by the program allocates blocks of twice this size, the third thread allocates blocks of three times this size, and so on."
2374 msgstr "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須である。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインスレッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこのサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサイズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズのブロックを割り当て、 以下同様である。"
2377 #: build/C/man3/malloc_info.3:102
2378 msgid "The program calls B<malloc_info>() twice to display the memory-allocation state. The first call takes place before any threads are created or memory allocated. The second call is performed after all threads have allocated memory."
2379 msgstr "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示する。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行される。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
2382 #: build/C/man3/malloc_info.3:110
2383 msgid "In the following example, the command-line arguments specify the creation of one additional thread, and both the main thread and the additional thread allocate 10000 blocks of memory. After the blocks of memory have been allocated, B<malloc_info>() shows the state of two allocation arenas."
2384 msgstr "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインスレッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当て領域の状態が表示されている。"
2387 #: build/C/man3/malloc_info.3:135
2390 "$ B<getconf GNU_LIBC_VERSION>\n"
2392 "$ B<./a.out 1 10000 100>\n"
2393 "============ Before allocating blocks ============\n"
2394 "E<lt>malloc version=\"1\"E<gt>\n"
2395 "E<lt>heap nr=\"0\"E<gt>\n"
2397 "E<lt>/sizesE<gt>\n"
2398 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2399 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2400 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2401 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2402 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2403 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2405 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2406 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2407 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2408 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2409 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2410 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2411 "E<lt>/mallocE<gt>\n"
2413 "$ B<getconf GNU_LIBC_VERSION>\n"
2415 "$ B<./a.out 1 10000 100>\n"
2416 "============ Before allocating blocks ============\n"
2417 "E<lt>malloc version=\"1\"E<gt>\n"
2418 "E<lt>heap nr=\"0\"E<gt>\n"
2420 "E<lt>/sizesE<gt>\n"
2421 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2422 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2423 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2424 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2425 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2426 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2428 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2429 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2430 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2431 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2432 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2433 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2434 "E<lt>/mallocE<gt>\n"
2437 #: build/C/man3/malloc_info.3:165
2440 "============ After allocating blocks ============\n"
2441 "E<lt>malloc version=\"1\"E<gt>\n"
2442 "E<lt>heap nr=\"0\"E<gt>\n"
2444 "E<lt>/sizesE<gt>\n"
2445 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2446 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2447 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2448 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2449 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2450 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2452 "E<lt>heap nr=\"1\"E<gt>\n"
2454 "E<lt>/sizesE<gt>\n"
2455 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2456 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2457 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2458 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2459 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2460 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2462 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2463 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2464 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2465 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2466 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2467 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2468 "E<lt>/mallocE<gt>\n"
2470 "============ After allocating blocks ============\n"
2471 "E<lt>malloc version=\"1\"E<gt>\n"
2472 "E<lt>heap nr=\"0\"E<gt>\n"
2474 "E<lt>/sizesE<gt>\n"
2475 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2476 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2477 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2478 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2479 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2480 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2482 "E<lt>heap nr=\"1\"E<gt>\n"
2484 "E<lt>/sizesE<gt>\n"
2485 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2486 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2487 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2488 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2489 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2490 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2492 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2493 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2494 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2495 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2496 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2497 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2498 "E<lt>/mallocE<gt>\n"
2501 #: build/C/man3/malloc_info.3:175
2504 "#include E<lt>unistd.hE<gt>\n"
2505 "#include E<lt>stdlib.hE<gt>\n"
2506 "#include E<lt>pthread.hE<gt>\n"
2507 "#include E<lt>malloc.hE<gt>\n"
2508 "#include E<lt>errno.hE<gt>\n"
2510 "#include E<lt>unistd.hE<gt>\n"
2511 "#include E<lt>stdlib.hE<gt>\n"
2512 "#include E<lt>pthread.hE<gt>\n"
2513 "#include E<lt>malloc.hE<gt>\n"
2514 "#include E<lt>errno.hE<gt>\n"
2517 #: build/C/man3/malloc_info.3:178
2520 "static size_t blockSize;\n"
2521 "static int numThreads, numBlocks;\n"
2523 "static size_t blockSize;\n"
2524 "static int numThreads, numBlocks;\n"
2527 #: build/C/man3/malloc_info.3:181 build/C/man2/memfd_create.2:368
2528 #: build/C/man2/memfd_create.2:450
2531 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2534 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2538 #: build/C/man3/malloc_info.3:187
2542 "thread_func(void *arg)\n"
2545 " int tn = (int) arg;\n"
2548 "thread_func(void *arg)\n"
2551 " int tn = (int) arg;\n"
2554 #: build/C/man3/malloc_info.3:190
2557 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2558 " the main thread) allocates a different amount of memory */\n"
2560 " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2561 " the main thread) allocates a different amount of memory */\n"
2564 #: build/C/man3/malloc_info.3:194
2567 " for (j = 0; j E<lt> numBlocks; j++)\n"
2568 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
2569 " errExit(\"malloc-thread\");\n"
2571 " for (j = 0; j E<lt> numBlocks; j++)\n"
2572 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
2573 " errExit(\"malloc-thread\");\n"
2576 #: build/C/man3/malloc_info.3:198
2579 " sleep(100); /* Sleep until main thread terminates */\n"
2583 " sleep(100); /* Sleep until main thread terminates */\n"
2588 #: build/C/man3/malloc_info.3:204
2592 "main(int argc, char *argv[])\n"
2594 " int j, tn, sleepTime;\n"
2595 " pthread_t *thr;\n"
2598 "main(int argc, char *argv[])\n"
2600 " int j, tn, sleepTime;\n"
2601 " pthread_t *thr;\n"
2604 #: build/C/man3/malloc_info.3:211
2607 " if (argc E<lt> 4) {\n"
2608 " fprintf(stderr,\n"
2609 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2611 " exit(EXIT_FAILURE);\n"
2614 " if (argc E<lt> 4) {\n"
2615 " fprintf(stderr,\n"
2616 " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2618 " exit(EXIT_FAILURE);\n"
2622 #: build/C/man3/malloc_info.3:216
2625 " numThreads = atoi(argv[1]);\n"
2626 " numBlocks = atoi(argv[2]);\n"
2627 " blockSize = atoi(argv[3]);\n"
2628 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2630 " numThreads = atoi(argv[1]);\n"
2631 " numBlocks = atoi(argv[2]);\n"
2632 " blockSize = atoi(argv[3]);\n"
2633 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2636 #: build/C/man3/malloc_info.3:220
2639 " thr = calloc(numThreads, sizeof(pthread_t));\n"
2640 " if (thr == NULL)\n"
2641 " errExit(\"calloc\");\n"
2643 " thr = calloc(numThreads, sizeof(pthread_t));\n"
2644 " if (thr == NULL)\n"
2645 " errExit(\"calloc\");\n"
2648 #: build/C/man3/malloc_info.3:223
2651 " printf(\"============ Before allocating blocks ============\\en\");\n"
2652 " malloc_info(0, stdout);\n"
2654 " printf(\"============ Before allocating blocks ============\\en\");\n"
2655 " malloc_info(0, stdout);\n"
2658 #: build/C/man3/malloc_info.3:225
2660 msgid " /* Create threads that allocate different amounts of memory */\n"
2661 msgstr " /* Create threads that allocate different amounts of memory */\n"
2664 #: build/C/man3/malloc_info.3:231
2667 " for (tn = 0; tn E<lt> numThreads; tn++) {\n"
2668 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
2670 " if (errno != 0)\n"
2671 " errExit(\"pthread_create\");\n"
2673 " for (tn = 0; tn E<lt> numThreads; tn++) {\n"
2674 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
2676 " if (errno != 0)\n"
2677 " errExit(\"pthread_create\");\n"
2680 #: build/C/man3/malloc_info.3:236
2683 " /* If we add a sleep interval after the start-up of each\n"
2684 " thread, the threads likely won\\(aqt contend for malloc\n"
2685 " mutexes, and therefore additional arenas won\\(aqt be\n"
2686 " allocated (see malloc(3)). */\n"
2688 " /* If we add a sleep interval after the start-up of each\n"
2689 " thread, the threads likely won\\(aqt contend for malloc\n"
2690 " mutexes, and therefore additional arenas won\\(aqt be\n"
2691 " allocated (see malloc(3)). */\n"
2694 #: build/C/man3/malloc_info.3:240
2697 " if (sleepTime E<gt> 0)\n"
2698 " sleep(sleepTime);\n"
2701 " if (sleepTime E<gt> 0)\n"
2702 " sleep(sleepTime);\n"
2706 #: build/C/man3/malloc_info.3:242
2708 msgid " /* The main thread also allocates some memory */\n"
2709 msgstr " /* The main thread also allocates some memory */\n"
2712 #: build/C/man3/malloc_info.3:246
2715 " for (j = 0; j E<lt> numBlocks; j++)\n"
2716 " if (malloc(blockSize) == NULL)\n"
2717 " errExit(\"malloc\");\n"
2719 " for (j = 0; j E<lt> numBlocks; j++)\n"
2720 " if (malloc(blockSize) == NULL)\n"
2721 " errExit(\"malloc\");\n"
2724 #: build/C/man3/malloc_info.3:249
2727 " sleep(2); /* Give all threads a chance to\n"
2728 " complete allocations */\n"
2730 " sleep(2); /* Give all threads a chance to\n"
2731 " complete allocations */\n"
2734 #: build/C/man3/malloc_info.3:252
2737 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
2738 " malloc_info(0, stdout);\n"
2740 " printf(\"\\en============ After allocating blocks ============\\en\");\n"
2741 " malloc_info(0, stdout);\n"
2744 #: build/C/man3/malloc_info.3:262
2745 msgid "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), B<open_memstream>(3)"
2746 msgstr "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), B<open_memstream>(3)"
2749 #: build/C/man3/malloc_stats.3:26
2751 msgid "MALLOC_STATS"
2752 msgstr "MALLOC_STATS"
2755 #: build/C/man3/malloc_stats.3:29
2756 msgid "malloc_stats - print memory allocation statistics"
2757 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
2760 #: build/C/man3/malloc_stats.3:33
2761 msgid "B<void malloc_stats(void);>"
2762 msgstr "B<void malloc_stats(void);>"
2765 #. Available already in glibc 2.0, possibly earlier
2767 #: build/C/man3/malloc_stats.3:55
2768 msgid "The B<malloc_stats>() function prints (on standard error) statistics about memory allocated by B<malloc>(3) and related functions. For each arena (allocation area), this function prints the total amount of memory allocated and the total number of bytes consumed by in-use allocations. (These two values correspond to the I<arena> and I<uordblks> fields retrieved by B<mallinfo>(3).) In addition, the function prints the sum of these two statistics for all arenas, and the maximum number of blocks and bytes that were ever simultaneously allocated using B<mmap>(2)."
2769 msgstr "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモリに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) について、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域のこれら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブロック数とバイト数の最大値を表示する。"
2772 #: build/C/man3/malloc_stats.3:61
2773 msgid "More detailed information about memory allocations in the main arena can be obtained using B<mallinfo>(3)."
2774 msgstr "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情報を取得できる。"
2777 #: build/C/man3/malloc_stats.3:67
2778 msgid "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
2779 msgstr "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
2782 #: build/C/man3/malloc_trim.3:26
2785 msgstr "MALLOC_TRIM"
2788 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
2794 #: build/C/man3/malloc_trim.3:29
2795 msgid "malloc_trim - release free memory from the top of the heap"
2799 #: build/C/man3/malloc_trim.3:33
2800 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
2801 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
2804 #: build/C/man3/malloc_trim.3:40
2805 msgid "The B<malloc_trim>() function attempts to release free memory at the top of the heap (by calling B<sbrk>(2) with a suitable argument)."
2809 #: build/C/man3/malloc_trim.3:51
2810 msgid "The I<pad> argument specifies the amount of free space to leave untrimmed at the top of the heap. If this argument is 0, only the minimum amount of memory is maintained at the top of the heap (i.e., one page or less). A nonzero argument can be used to maintain some trailing space at the top of the heap in order to allow future allocations to be made without having to extend the heap with B<sbrk>(2)."
2814 #: build/C/man3/malloc_trim.3:56
2815 msgid "The B<malloc_trim>() function returns 1 if memory was actually released back to the system, or 0 if it was not possible to release any memory."
2819 #. Available already in glibc 2.0, possibly earlier
2821 #: build/C/man3/malloc_trim.3:60
2822 msgid "No errors are defined."
2826 #: build/C/man3/malloc_trim.3:71
2827 msgid "This function is automatically called by B<free>(3) in certain circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in B<mallopt>(3)."
2831 #: build/C/man3/malloc_trim.3:74
2832 msgid "This function cannot release free memory located at places other than the top of the heap."
2835 #. malloc/malloc.c::mTRIm():
2836 #. return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
2838 #: build/C/man3/malloc_trim.3:78
2839 msgid "This function releases only memory in the main arena."
2843 #: build/C/man3/malloc_trim.3:82
2844 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
2845 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
2848 #: build/C/man3/malloc_usable_size.3:25
2850 msgid "MALLOC_USABLE_SIZE"
2851 msgstr "MALLOC_USABLE_SIZE"
2854 #: build/C/man3/malloc_usable_size.3:28
2855 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
2856 msgstr "malloc_usable_size - ヒープから確保したメモリブロックのサイズを取得する"
2859 #: build/C/man3/malloc_usable_size.3:32
2860 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
2861 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
2864 #: build/C/man3/malloc_usable_size.3:40
2865 msgid "The B<malloc_usable_size>() function returns the number of usable bytes in the block pointed to by I<ptr>, a pointer to a block of memory allocated by B<malloc>(3) or a related function."
2866 msgstr "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリブロックへのポインターである。"
2869 #: build/C/man3/malloc_usable_size.3:48
2870 msgid "B<malloc_usable_size>() returns the number of usable bytes in the block of allocated memory pointed to by I<ptr>. If I<ptr> is NULL, 0 is returned."
2871 msgstr "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリブロックで使用可能なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
2874 #: build/C/man3/malloc_usable_size.3:53
2875 msgid "The B<malloc_usable_size>() function is thread-safe."
2876 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
2879 #: build/C/man3/malloc_usable_size.3:65
2880 msgid "The value returned by B<malloc_usable_size>() may be greater than the requested size of the allocation because of alignment and minimum size constraints. Although the excess bytes can be overwritten by the application without ill effects, this is not good programming practice: the number of excess bytes in an allocation depends on the underlying implementation."
2881 msgstr "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合がある。 これは、メモリアラインメントと最小サイズの制約のためである。 この超過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行うのはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超過バイトの量は、内部の実装に依存する。"
2884 #: build/C/man3/malloc_usable_size.3:67
2885 msgid "The main use of this function is for debugging and introspection."
2886 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
2889 #: build/C/man3/malloc_usable_size.3:69
2890 msgid "B<malloc>(3)"
2891 msgstr "B<malloc>(3)"
2894 #: build/C/man3/mallopt.3:26
2900 #: build/C/man3/mallopt.3:26 build/C/man2/shmop.2:41
2906 #: build/C/man3/mallopt.3:29
2907 msgid "mallopt - set memory allocation parameters"
2908 msgstr "mallopt - メモリ割り当てパラメータを設定する"
2911 #: build/C/man3/mallopt.3:33
2912 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
2913 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
2916 #: build/C/man3/mallopt.3:44
2917 msgid "The B<mallopt>() function adjusts parameters that control the behavior of the memory-allocation functions (see B<malloc>(3)). The I<param> argument specifies the parameter to be modified, and I<value> specifies the new value for that parameter."
2919 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
2920 "制御するパラメータの調整を行う。\n"
2921 "I<param> 引き数で変更するパラメータを指定し、\n"
2922 "I<value> 引き数でそのパラメータの新しい値を指定する。"
2925 #: build/C/man3/mallopt.3:47
2926 msgid "The following values can be specified for I<param>:"
2927 msgstr "I<param> には以下の値を指定することができる。"
2930 #: build/C/man3/mallopt.3:47
2932 msgid "B<M_CHECK_ACTION>"
2933 msgstr "B<M_CHECK_ACTION>"
2936 #: build/C/man3/mallopt.3:53
2937 msgid "Setting this parameter controls how glibc responds when various kinds of programming errors are detected (e.g., freeing the same pointer twice). The 3 least significant bits (2, 1, and 0) of the value assigned to this parameter determine the glibc behavior, as follows:"
2941 #: build/C/man3/mallopt.3:54
2947 #: build/C/man3/mallopt.3:64
2948 msgid "If this bit is set, then print a one-line message on I<stderr> that provides details about the error. The message starts with the string \"***\\ glibc detected\\ ***\", followed by the program name, the name of the memory-allocation function in which the error was detected, a brief description of the error, and the memory address where the error was detected."
2952 #: build/C/man3/mallopt.3:64
2958 #: build/C/man3/mallopt.3:79
2959 msgid "If this bit is set, then, after printing any error message specified by bit 0, the program is terminated by calling B<abort>(3). In glibc versions since 2.4, if bit 0 is also set, then, between printing the error message and aborting, the program also prints a stack trace in the manner of B<backtrace>(3), and prints the process's memory mapping in the style of I</proc/[pid]/maps> (see B<proc>(5))."
2963 #: build/C/man3/mallopt.3:79
2965 msgid "Bit 2 (since glibc 2.4)"
2966 msgstr "Bit 2 (glibc 2.4 以降)"
2969 #: build/C/man3/mallopt.3:86
2970 msgid "This bit has an effect only if bit 0 is also set. If this bit is set, then the one-line message describing the error is simplified to contain just the name of the function where the error was detected and the brief description of the error."
2974 #: build/C/man3/mallopt.3:91
2975 msgid "The remaining bits in I<value> are ignored."
2979 #: build/C/man3/mallopt.3:95
2980 msgid "Combining the above details, the following numeric values are meaningful for B<M_CHECK_ACTION>:"
2984 #: build/C/man3/mallopt.3:96
2990 #: build/C/man3/mallopt.3:98
2991 msgid "Ignore error conditions; continue execution (with undefined results)."
2995 #: build/C/man3/mallopt.3:98
3001 #: build/C/man3/mallopt.3:100
3002 msgid "Print a detailed error message and continue execution."
3006 #: build/C/man3/mallopt.3:100
3012 #: build/C/man3/mallopt.3:102
3013 msgid "Abort the program."
3017 #: build/C/man3/mallopt.3:102
3023 #: build/C/man3/mallopt.3:105
3024 msgid "Print detailed error message, stack trace, and memory mappings, and abort the program."
3028 #: build/C/man3/mallopt.3:105
3034 #: build/C/man3/mallopt.3:107
3035 msgid "Print a simple error message and continue execution."
3039 #: build/C/man3/mallopt.3:107
3045 #: build/C/man3/mallopt.3:110
3046 msgid "Print simple error message, stack trace, and memory mappings, and abort the program."
3050 #: build/C/man3/mallopt.3:116
3051 msgid "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is 3. In glibc version 2.3.3 and earlier, the default value is 1."
3055 #: build/C/man3/mallopt.3:121
3056 msgid "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a crash may happen much later, and the true cause of the problem is then very hard to track down."
3060 #: build/C/man3/mallopt.3:121
3062 msgid "B<M_MMAP_MAX>"
3063 msgstr "B<M_MMAP_MAX>"
3065 #. The following text adapted from comments in the glibc source:
3067 #: build/C/man3/mallopt.3:131
3068 msgid "This parameter specifies the maximum number of allocation requests that may be simultaneously serviced using B<mmap>(2). This parameter exists because some systems have a limited number of internal tables for use by B<mmap>(2), and using more than a few of them may degrade performance."
3072 #: build/C/man3/mallopt.3:138
3073 msgid "The default value is 65,536, a value which has no special significance and which servers only as a safeguard. Setting this parameter to 0 disables the use of B<mmap>(2) for servicing large allocation requests."
3077 #: build/C/man3/mallopt.3:138
3079 msgid "B<M_MMAP_THRESHOLD>"
3080 msgstr "B<M_MMAP_THRESHOLD>"
3083 #: build/C/man3/mallopt.3:147
3084 msgid "For allocations greater than or equal to the limit specified (in bytes) by B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-allocation functions employ B<mmap>(2) instead of increasing the program break using B<sbrk>(2)."
3088 #: build/C/man3/mallopt.3:167
3089 msgid "Allocating memory using B<mmap>(2) has the significant advantage that the allocated memory blocks can always be independently released back to the system. (By contrast, the heap can be trimmed only if memory is freed at the top end.) On the other hand, there are some disadvantages to the use of B<mmap>(2): deallocated space is not placed on the free list for reuse by later allocations; memory may be wasted because B<mmap>(2) allocations must be page-aligned; and the kernel must perform the expensive task of zeroing out memory allocated via B<mmap>(2). Balancing these factors leads to a default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3093 #: build/C/man3/mallopt.3:174
3094 msgid "The lower limit for this parameter is 0. The upper limit is B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or I<4*1024*1024*sizeof(long)> on 64-bit systems."
3098 #: build/C/man3/mallopt.3:192
3099 msgid "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default. The initial value of the threshold is 128*1024, but when blocks larger than the current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> are freed, the threshold is adjusted upward to the size of the freed block. When dynamic mmap thresholding is in effect, the threshold for trimming the heap is also dynamically adjusted to be twice the dynamic mmap threshold. Dynamic adjustment of the mmap threshold is disabled if any of the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> parameters is set."
3103 #: build/C/man3/mallopt.3:192
3105 msgid "B<M_MXFAST> (since glibc 2.3)"
3106 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3108 #. The following text adapted from comments in the glibc sources:
3110 #: build/C/man3/mallopt.3:212
3111 msgid "Set the upper limit for memory allocation requests that are satisfied using \"fastbins\". (The measurement unit for this parameter is bytes.) Fastbins are storage areas that hold deallocated blocks of memory of the same size without merging adjacent free blocks. Subsequent reallocation of blocks of the same size can be handled very quickly by allocating from the fastbin, although memory fragmentation and the overall memory footprint of the program can increase. The default value for this parameter is I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures). The range for this parameter is 0 to I<80*sizeof(size_t)/4>. Setting B<M_MXFAST> to 0 disables the use of fastbins."
3115 #: build/C/man3/mallopt.3:212
3117 msgid "B<M_PERTURB> (since glibc 2.4)"
3118 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3121 #: build/C/man3/mallopt.3:227
3122 msgid "If this parameter is set to a nonzero value, then bytes of allocated memory (other than allocations via B<calloc>(3)) are initialized to the complement of the value in the least significant byte of I<value>, and when allocated memory is released using B<free>(3), the freed bytes are set to the least significant byte of I<value>. This can be useful for detecting errors where programs incorrectly rely on allocated memory being initialized to zero, or reuse values in memory that has already been freed."
3126 #: build/C/man3/mallopt.3:227
3128 msgid "B<M_TOP_PAD>"
3129 msgstr "B<M_TOP_PAD>"
3132 #: build/C/man3/mallopt.3:234
3133 msgid "This parameter defines the amount of padding to employ when calling B<sbrk>(2) to modify the program break. (The measurement unit for this parameter is bytes.) This parameter has an effect in the following circumstances:"
3137 #: build/C/man3/mallopt.3:241
3138 msgid "When the program break is increased, then B<M_TOP_PAD> bytes are added to the B<sbrk>(2) request."
3142 #: build/C/man3/mallopt.3:247
3143 msgid "When the heap is trimmed as a consequence of calling B<free>(3) (see the discussion of B<M_TRIM_THRESHOLD>) this much free space is preserved at the top of the heap."
3147 #: build/C/man3/mallopt.3:251
3148 msgid "In either case, the amount of padding is always rounded to a system page boundary."
3152 #: build/C/man3/mallopt.3:258
3153 msgid "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of system calls (when the parameter is set low) and wasting unused memory at the top of the heap (when the parameter is set high)."
3156 #. DEFAULT_TOP_PAD in glibc source
3158 #: build/C/man3/mallopt.3:261
3159 msgid "The default value for this parameter is 128*1024."
3163 #: build/C/man3/mallopt.3:261
3165 msgid "B<M_TRIM_THRESHOLD>"
3166 msgstr "B<M_TRIM_THRESHOLD>"
3169 #: build/C/man3/mallopt.3:277
3170 msgid "When the amount of contiguous free memory at the top of the heap grows sufficiently large, B<free>(3) employs B<sbrk>(2) to release this memory back to the system. (This can be useful in programs that continue to execute for a long period after freeing a significant amount of memory.) The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that this block of memory must reach before B<sbrk>(2) is used to trim the heap."
3174 #: build/C/man3/mallopt.3:282
3175 msgid "The default value for this parameter is 128*1024. Setting B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3181 #. FIXME Do the arena parameters need to be documented?
3183 #. .BR M_ARENA_TEST " (since glibc 2.10)"
3185 #. .BR M_ARENA_MAX " (since glibc 2.10)"
3186 #. Environment variables
3187 #. MALLOC_ARENA_MAX_
3188 #. MALLOC_ARENA_TEST_
3189 #. http://udrepper.livejournal.com/20948.html describes some details
3190 #. of the MALLOC_ARENA_* environment variables.
3191 #. These macros aren't enabled in production releases until 2.15?
3192 #. (see glibc malloc/Makefile)
3194 #: build/C/man3/mallopt.3:305
3195 msgid "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number of system calls (when the parameter is set low) and wasting unused memory at the top of the heap (when the parameter is set high)."
3199 #: build/C/man3/mallopt.3:305
3201 msgid "Environment variables"
3205 #: build/C/man3/mallopt.3:320
3206 msgid "A number of environment variables can be defined to modify some of the same parameters as are controlled by B<mallopt>(). Using these variables has the advantage that the source code of the program need not be changed. To be effective, these variables must be defined before the first call to a memory-allocation function. (If the same parameters are adjusted via B<mallopt>(), then the B<mallopt>() settings take precedence.) For security reasons, these variables are ignored in set-user-ID and set-group-ID programs."
3210 #: build/C/man3/mallopt.3:323
3211 msgid "The environment variables are as follows (note the trailing underscore at the end of the name of each variable):"
3215 #: build/C/man3/mallopt.3:323
3217 msgid "B<MALLOC_CHECK_>"
3218 msgstr "B<MALLOC_CHECK_>"
3220 #. On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3221 #. when MALLOC_CHECK_ was set.
3223 #: build/C/man3/mallopt.3:340
3224 msgid "This environment variable controls the same parameter as B<mallopt>() B<M_CHECK_ACTION>. If this variable is set to a nonzero value, then a special implementation of the memory-allocation functions is used. (This is accomplished using the B<malloc_hook>(3) feature.) This implementation performs additional error checking, but is slower than the standard set of memory-allocation functions. (This implementation does not detect all possible errors; memory leaks can still occur.)"
3228 #: build/C/man3/mallopt.3:345
3229 msgid "The value assigned to this environment variable should be a single digit, whose meaning is as described for B<M_CHECK_ACTION>. Any characters beyond the initial digit are ignored."
3233 #: build/C/man3/mallopt.3:354
3234 msgid "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default for set-user-ID and set-group-ID programs. However, if the file I</etc/suid-debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> also has an effect for set-user-ID and set-group-ID programs."
3238 #: build/C/man3/mallopt.3:354
3240 msgid "B<MALLOC_MMAP_MAX_>"
3241 msgstr "B<MALLOC_MMAP_MAX_>"
3244 #: build/C/man3/mallopt.3:359
3245 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_MAX>."
3249 #: build/C/man3/mallopt.3:359
3251 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3252 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3255 #: build/C/man3/mallopt.3:364
3256 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_THRESHOLD>."
3260 #: build/C/man3/mallopt.3:364
3262 msgid "B<MALLOC_PERTURB_>"
3263 msgstr "B<MALLOC_PERTURB_>"
3266 #: build/C/man3/mallopt.3:369
3267 msgid "Controls the same parameter as B<mallopt>() B<M_PERTURB>."
3271 #: build/C/man3/mallopt.3:369
3273 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3274 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3277 #: build/C/man3/mallopt.3:374
3278 msgid "Controls the same parameter as B<mallopt>() B<M_TRIM_THRESHOLD>."
3282 #: build/C/man3/mallopt.3:374
3284 msgid "B<MALLOC_TOP_PAD_>"
3285 msgstr "B<MALLOC_TOP_PAD_>"
3288 #: build/C/man3/mallopt.3:379
3289 msgid "Controls the same parameter as B<mallopt>() B<M_TOP_PAD>."
3293 #: build/C/man3/mallopt.3:384
3294 msgid "On success, B<mallopt>() returns 1. On error, it returns 0."
3295 msgstr "B<mallopt>() は成功すると 1 を返す。エラーの場合は 0 を返す。"
3298 #. Available already in glibc 2.0, possibly earlier
3300 #: build/C/man3/mallopt.3:392
3301 msgid "On error, I<errno> is I<not> set."
3302 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3306 #: build/C/man3/mallopt.3:406
3307 msgid "This function is not specified by POSIX or the C standards. A similar function exists on many System V derivatives, but the range of values for I<param> varies across systems. The SVID defined options B<M_MXFAST>, B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is implemented in glibc."
3311 #: build/C/man3/mallopt.3:410
3312 msgid "Specifying an invalid value for I<param> does not generate an error."
3315 #. FIXME . This looks buggy:
3316 #. setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3317 #. malloc requests are rounded up:
3318 #. (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3319 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3321 #: build/C/man3/mallopt.3:418
3322 msgid "A calculation error within the glibc implementation means that a call of the form:"
3326 #: build/C/man3/mallopt.3:421
3328 msgid " mallopt(M_MXFAST, n)\n"
3329 msgstr " mallopt(M_MXFAST, n)\n"
3331 #. Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3333 #: build/C/man3/mallopt.3:433
3334 msgid "does not result in fastbins being employed for all allocations of size up to I<n>. To ensure desired results, I<n> should be rounded up to the next multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an integer."
3337 #. FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3339 #: build/C/man3/mallopt.3:454
3340 msgid "If B<mallopt>() is used to set B<M_PERTURB>, then, as expected, the bytes of allocated memory are initialized to the complement of the byte in I<value>, and when that memory is freed, the bytes of the region are initialized to the byte specified in I<value>. However, there is an off-by-I<sizeof(size_t)> error in the implementation: instead of initializing precisely the block of memory being freed by the call I<free(p)>, the block starting at I<p+sizeof(size_t)> is initialized."
3344 #: build/C/man3/mallopt.3:463
3345 msgid "The program below demonstrates the use of B<M_CHECK_ACTION>. If the program is supplied with an (integer) command-line argument, then that argument is used to set the B<M_CHECK_ACTION> parameter. The program then allocates a block of memory, and frees it twice (an error)."
3349 #: build/C/man3/mallopt.3:467
3350 msgid "The following shell session shows what happens when we run this program under glibc, with the default value for B<M_CHECK_ACTION>:"
3354 #: build/C/man3/mallopt.3:487
3358 "main(): returned from first free() call\n"
3359 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3360 "======= Backtrace: =========\n"
3361 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3362 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3363 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3364 "\\&./a.out[0x80485db]\n"
3365 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3366 "\\&./a.out[0x8048471]\n"
3367 "======= Memory map: ========\n"
3368 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
3369 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
3370 "[some lines omitted]\n"
3371 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3372 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
3373 "Aborted (core dumped)\n"
3376 "main(): returned from first free() call\n"
3377 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3378 "======= Backtrace: =========\n"
3379 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3380 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3381 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3382 "\\&./a.out[0x80485db]\n"
3383 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3384 "\\&./a.out[0x8048471]\n"
3385 "======= Memory map: ========\n"
3386 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
3387 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
3388 "[some lines omitted]\n"
3389 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3390 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
3391 "Aborted (core dumped)\n"
3394 #: build/C/man3/mallopt.3:492
3395 msgid "The following runs show the results when employing other values for B<M_CHECK_ACTION>:"
3399 #: build/C/man3/mallopt.3:505
3402 "$ B<./a.out 1> # Diagnose error and continue\n"
3403 "main(): returned from first free() call\n"
3404 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3405 "main(): returned from second free() call\n"
3406 "$ B<./a.out 2> # Abort without error message\n"
3407 "main(): returned from first free() call\n"
3408 "Aborted (core dumped)\n"
3409 "$ B<./a.out 0> # Ignore error and continue\n"
3410 "main(): returned from first free() call\n"
3411 "main(): returned from second free() call\n"
3413 "$ B<./a.out 1> # Diagnose error and continue\n"
3414 "main(): returned from first free() call\n"
3415 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3416 "main(): returned from second free() call\n"
3417 "$ B<./a.out 2> # Abort without error message\n"
3418 "main(): returned from first free() call\n"
3419 "Aborted (core dumped)\n"
3420 "$ B<./a.out 0> # Ignore error and continue\n"
3421 "main(): returned from first free() call\n"
3422 "main(): returned from second free() call\n"
3425 #: build/C/man3/mallopt.3:511
3426 msgid "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> environment variable:"
3430 #: build/C/man3/mallopt.3:518
3433 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3434 "main(): returned from first free() call\n"
3435 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3436 "main(): returned from second free() call\n"
3438 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3439 "main(): returned from first free() call\n"
3440 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3441 "main(): returned from second free() call\n"
3444 #: build/C/man3/mallopt.3:526
3447 "#include E<lt>malloc.hE<gt>\n"
3448 "#include E<lt>stdio.hE<gt>\n"
3449 "#include E<lt>stdlib.hE<gt>\n"
3451 "#include E<lt>malloc.hE<gt>\n"
3452 "#include E<lt>stdio.hE<gt>\n"
3453 "#include E<lt>stdlib.hE<gt>\n"
3456 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
3460 "main(int argc, char *argv[])\n"
3465 "main(int argc, char *argv[])\n"
3470 #: build/C/man3/mallopt.3:538
3473 " if (argc E<gt> 1) {\n"
3474 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3475 " fprintf(stderr, \"mallopt() failed\");\n"
3476 " exit(EXIT_FAILURE);\n"
3480 " if (argc E<gt> 1) {\n"
3481 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3482 " fprintf(stderr, \"mallopt() failed\");\n"
3483 " exit(EXIT_FAILURE);\n"
3488 #: build/C/man3/mallopt.3:544
3491 " p = malloc(1000);\n"
3492 " if (p == NULL) {\n"
3493 " fprintf(stderr, \"malloc() failed\");\n"
3494 " exit(EXIT_FAILURE);\n"
3497 " p = malloc(1000);\n"
3498 " if (p == NULL) {\n"
3499 " fprintf(stderr, \"malloc() failed\");\n"
3500 " exit(EXIT_FAILURE);\n"
3504 #: build/C/man3/mallopt.3:547
3508 " printf(\"main(): returned from first free() call\\en\");\n"
3511 " printf(\"main(): returned from first free() call\\en\");\n"
3514 #: build/C/man3/mallopt.3:550
3518 " printf(\"main(): returned from second free() call\\en\");\n"
3521 " printf(\"main(): returned from second free() call\\en\");\n"
3524 #: build/C/man3/mallopt.3:568
3525 msgid "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
3526 msgstr "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
3529 #: build/C/man3/mcheck.3:25
3535 #: build/C/man3/mcheck.3:25
3541 #: build/C/man3/mcheck.3:28
3542 msgid "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
3546 #: build/C/man3/mcheck.3:31
3548 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
3549 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
3552 #: build/C/man3/mcheck.3:33
3554 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
3558 #: build/C/man3/mcheck.3:35
3560 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
3564 #: build/C/man3/mcheck.3:37
3566 msgid "B<void mcheck_check_all(void);>\n"
3567 msgstr "B<void mcheck_check_all(void);>\n"
3570 #: build/C/man3/mcheck.3:39
3572 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
3573 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
3576 #: build/C/man3/mcheck.3:51
3577 msgid "The B<mcheck>() function installs a set of debugging hooks for the B<malloc>(3) family of memory-allocation functions. These hooks cause certain consistency checks to be performed on the state of the heap. The checks can detect application errors such as freeing a block of memory more than once or corrupting the bookkeeping data structures that immediately precede a block of allocated memory."
3581 #: build/C/man3/mcheck.3:63
3582 msgid "To be effective, the B<mcheck>() function must be called before the first call to B<malloc>(3) or a related function. In cases where this is difficult to ensure, linking the program with I<-lmcheck> inserts an implicit call to B<mcheck>() (with a NULL argument) before the first call to a memory-allocation function."
3586 #: build/C/man3/mcheck.3:71
3587 msgid "The B<mcheck_pedantic>() function is similar to B<mcheck>(), but performs checks on all allocated blocks whenever one of the memory-allocation functions is called. This can be very slow!"
3591 #: build/C/man3/mcheck.3:78
3592 msgid "The B<mcheck_check_all>() function causes an immediate check on all allocated blocks. This call is effective only if B<mcheck>() is called beforehand."
3596 #: build/C/man3/mcheck.3:91
3597 msgid "If the system detects an inconsistency in the heap, the caller-supplied function pointed to by I<abortfunc> is invoked with a single argument argument, I<mstatus>, that indicates what type of inconsistency was detected. If I<abortfunc> is NULL, a default function prints an error message on I<stderr> and calls B<abort>(3)."
3601 #: build/C/man3/mcheck.3:103
3602 msgid "The B<mprobe>() function performs a consistency check on the block of allocated memory pointed to by I<ptr>. The B<mcheck>() function should be called beforehand (otherwise B<mprobe>() returns B<MCHECK_DISABLED>)."
3606 #: build/C/man3/mcheck.3:111
3607 msgid "The following list describes the values returned by B<mprobe>() or passed as the I<mstatus> argument when I<abortfunc> is invoked:"
3611 #: build/C/man3/mcheck.3:111
3613 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
3617 #: build/C/man3/mcheck.3:116
3618 msgid "B<mcheck>() was not called before the first memory allocation function was called. Consistency checking is not possible."
3622 #: build/C/man3/mcheck.3:116
3624 msgid "B<MCHECK_OK> (B<mprobe>() only)"
3628 #: build/C/man3/mcheck.3:119
3629 msgid "No inconsistency detected."
3633 #: build/C/man3/mcheck.3:119
3635 msgid "B<MCHECK_HEAD>"
3636 msgstr "B<MCHECK_HEAD>"
3639 #: build/C/man3/mcheck.3:122
3640 msgid "Memory preceding an allocated block was clobbered."
3644 #: build/C/man3/mcheck.3:122
3646 msgid "B<MCHECK_TAIL>"
3647 msgstr "B<MCHECK_TAIL>"
3650 #: build/C/man3/mcheck.3:125
3651 msgid "Memory following an allocated block was clobbered."
3655 #: build/C/man3/mcheck.3:125
3657 msgid "B<MCHECK_FREE>"
3658 msgstr "B<MCHECK_FREE>"
3661 #: build/C/man3/mcheck.3:129
3662 msgid "A block of memory was freed twice."
3666 #: build/C/man3/mcheck.3:134
3667 msgid "B<mcheck>() and B<mcheck_pedantic>() return 0 on success, or -1 on error."
3671 #: build/C/man3/mcheck.3:145
3672 msgid "The B<mcheck_pedantic>() and B<mcheck_check_all>() functions are available since glibc 2.2. The B<mcheck>() and B<mprobe>() functions are present since at least glibc 2.0"
3675 #. But is MALLOC_CHECK_ slower?
3677 #: build/C/man3/mcheck.3:159
3678 msgid "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> environment variable (described in B<mallopt>(3)) cause the same kinds of errors to be detected. But, using B<MALLOC_CHECK_> does not require the application to be relinked."
3682 #: build/C/man3/mcheck.3:165
3683 msgid "The program below calls B<mcheck>() with a NULL argument and then frees the same block of memory twice. The following shell session demonstrates what happens when running the program:"
3687 #: build/C/man3/mcheck.3:170
3695 #: build/C/man3/mcheck.3:174
3698 "About to free a second time\n"
3699 "block freed twice\n"
3700 "Aborted (core dumped)\n"
3704 #: build/C/man3/mcheck.3:182
3707 "#include E<lt>stdlib.hE<gt>\n"
3708 "#include E<lt>stdio.hE<gt>\n"
3709 "#include E<lt>mcheck.hE<gt>\n"
3711 "#include E<lt>stdlib.hE<gt>\n"
3712 "#include E<lt>stdio.hE<gt>\n"
3713 "#include E<lt>mcheck.hE<gt>\n"
3716 #: build/C/man3/mcheck.3:190
3719 " if (mcheck(NULL) != 0) {\n"
3720 " fprintf(stderr, \"mcheck() failed\\en\");\n"
3724 #: build/C/man3/mcheck.3:193
3727 " exit(EXIT_FAILURE);\n"
3730 " exit(EXIT_FAILURE);\n"
3734 #: build/C/man3/mcheck.3:195
3736 msgid " p = malloc(1000);\n"
3737 msgstr " p = malloc(1000);\n"
3740 #: build/C/man3/mcheck.3:200
3743 " fprintf(stderr, \"About to free\\en\");\n"
3745 " fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
3750 #: build/C/man3/mcheck.3:208
3751 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
3752 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
3755 #: build/C/man2/mlock.2:26
3761 #: build/C/man2/mlock.2:26
3767 #: build/C/man2/mlock.2:29
3768 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
3769 msgstr "mlock - メモリのロックとロック解除を行う"
3772 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
3773 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
3775 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
3776 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
3779 #: build/C/man2/mlock.2:35
3782 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3783 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3785 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3786 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3789 #: build/C/man2/mlock.2:38
3792 "B<int mlockall(int >I<flags>B<);>\n"
3793 "B<int munlockall(void);>\n"
3795 "B<int mlockall(int >I<flags>B<);>\n"
3796 "B<int munlockall(void);>\n"
3799 #: build/C/man2/mlock.2:54
3800 msgid "B<mlock>() and B<mlockall>() respectively lock part or all of the calling process's virtual address space into RAM, preventing that memory from being paged to the swap area. B<munlock>() and B<munlockall>() perform the converse operation, respectively unlocking part or all of the calling process's virtual address space, so that pages in the specified virtual address range may once more to be swapped out if required by the kernel memory manager. Memory locking and unlocking are performed in units of whole pages."
3801 msgstr "B<mlock>() と B<mlockall>() はそれぞれ、呼び出し元プロセスの仮想アドレス空間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされるのを防ぐ。 B<munlock>() と B<munlockall>() は逆の操作で、それぞれ呼び出し元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定された仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればスワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われる。"
3804 #: build/C/man2/mlock.2:54
3806 msgid "mlock() and munlock()"
3807 msgstr "mlock() と munlock()"
3810 #: build/C/man2/mlock.2:64
3811 msgid "B<mlock>() locks pages in the address range starting at I<addr> and continuing for I<len> bytes. All pages that contain a part of the specified address range are guaranteed to be resident in RAM when the call returns successfully; the pages are guaranteed to stay in RAM until later unlocked."
3812 msgstr "B<mlock>() は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページをロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全てのページは RAM に残り続けることが保証される。 これらのページは後でロック解除されるまで RAM に残り続けることが保証される。"
3815 #: build/C/man2/mlock.2:73
3816 msgid "B<munlock>() unlocks pages in the address range starting at I<addr> and continuing for I<len> bytes. After this call, all pages that contain a part of the specified memory range can be moved to external swap space again by the kernel."
3817 msgstr "B<munlock>() は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページのロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
3820 #: build/C/man2/mlock.2:73
3822 msgid "mlockall() and munlockall()"
3823 msgstr "mlockall() と munlockall()"
3826 #: build/C/man2/mlock.2:83
3827 msgid "B<mlockall>() locks all pages mapped into the address space of the calling process. This includes the pages of the code, data and stack segment, as well as shared libraries, user space kernel data, shared memory, and memory-mapped files. All mapped pages are guaranteed to be resident in RAM when the call returns successfully; the pages are guaranteed to stay in RAM until later unlocked."
3828 msgstr "B<mlockall>() は呼び出し元プロセスのアドレス空間にマップされている全てのページを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブラリ、カーネルのユーザー空間データ、 共有メモリ、メモリマップされたファイルが含まれる。 システムコールが成功した場合には全てのマップされたページは RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に残り続けることが保証される。"
3831 #: build/C/man2/mlock.2:88
3832 msgid "The I<flags> argument is constructed as the bitwise OR of one or more of the following constants:"
3833 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
3836 #: build/C/man2/mlock.2:88
3838 msgid "B<MCL_CURRENT>"
3839 msgstr "B<MCL_CURRENT>"
3842 #: build/C/man2/mlock.2:92
3843 msgid "Lock all pages which are currently mapped into the address space of the process."
3844 msgstr "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
3847 #: build/C/man2/mlock.2:92
3849 msgid "B<MCL_FUTURE>"
3850 msgstr "B<MCL_FUTURE>"
3853 #: build/C/man2/mlock.2:99
3854 msgid "Lock all pages which will become mapped into the address space of the process in the future. These could be for instance new pages required by a growing heap and stack as well as new memory-mapped files or shared memory regions."
3855 msgstr "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新しくメモリマップされたファイルや共有メモリ領域もロックされる。"
3858 #: build/C/man2/mlock.2:112
3859 msgid "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of locked bytes to exceed the permitted maximum (see below). In the same circumstances, stack growth may likewise fail: the kernel will deny stack expansion and deliver a B<SIGSEGV> signal to the process."
3860 msgstr "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), B<sbrk>(2), B<malloc>(3)) は、ロックするバイト数が許可された最大値 (下記参照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセスに送る。"
3863 #: build/C/man2/mlock.2:116
3864 msgid "B<munlockall>() unlocks all pages mapped into the address space of the calling process."
3865 msgstr "B<munlockall>() は、呼び出し元プロセスのアドレス空間にマッピングされている 全てのページをロック解除する。"
3868 #: build/C/man2/mlock.2:122
3869 msgid "On success these system calls return 0. On error, -1 is returned, I<errno> is set appropriately, and no changes are made to any locks in the address space of the process."
3870 msgstr "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返され、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更されない。"
3873 #: build/C/man2/mlock.2:131
3874 msgid "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft resource limit, but tried to lock more memory than the limit permitted. This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
3875 msgstr "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセスが特権 (B<CAP_IPC_LOCK>) を持っている場合は適用されない。"
3877 #. In the case of mlock(), this check is somewhat buggy: it doesn't
3878 #. take into account whether the to-be-locked range overlaps with
3879 #. already locked pages. Thus, suppose we allocate
3880 #. (num_physpages / 4 + 1) of memory, and lock those pages once using
3881 #. mlock(), and then lock the *same* page range a second time.
3882 #. In the case, the second mlock() call will fail, since the check
3883 #. calculates that the process is trying to lock (num_physpages / 2 + 2)
3884 #. pages, which of course is not true. (MTK, Nov 04, kernel 2.4.28)
3886 #: build/C/man2/mlock.2:143
3887 msgid "(Linux 2.4 and earlier) the calling process tried to lock more than half of RAM."
3888 msgstr "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
3890 #. SVr4 documents an additional EAGAIN error code.
3892 #: build/C/man2/mlock.2:149
3893 msgid "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>) to perform the requested operation."
3895 "呼び出し側が特権を持っていないが、\n"
3896 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
3899 #: build/C/man2/mlock.2:154
3900 msgid "For B<mlock>() and B<munlock>():"
3901 msgstr "B<mlock>() と B<munlock>() 用として:"
3904 #: build/C/man2/mlock.2:157
3905 msgid "Some or all of the specified address range could not be locked."
3906 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
3909 #: build/C/man2/mlock.2:164
3910 msgid "The result of the addition I<start>+I<len> was less than I<start> (e.g., the addition may have resulted in an overflow)."
3912 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
3913 "(例えば、加算でオーバーフローが発生したなど)。"
3916 #: build/C/man2/mlock.2:169
3917 msgid "(Not on Linux) I<addr> was not a multiple of the page size."
3918 msgstr "(Linux ではこの意味で使われない) I<addr> がページサイズの倍数ではない。"
3921 #: build/C/man2/mlock.2:173
3922 msgid "Some of the specified address range does not correspond to mapped pages in the address space of the process."
3923 msgstr "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しない。"
3926 #: build/C/man2/mlock.2:176
3927 msgid "For B<mlockall>():"
3928 msgstr "B<mlockall>() 用として:"
3931 #: build/C/man2/mlock.2:179
3932 msgid "Unknown I<flags> were specified."
3933 msgstr "未知の I<flags> が指定された。"
3936 #: build/C/man2/mlock.2:182
3937 msgid "For B<munlockall>():"
3938 msgstr "B<munlockall>() 用として:"
3941 #: build/C/man2/mlock.2:186
3942 msgid "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
3943 msgstr "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>) を持っていない。"
3946 #: build/C/man2/mlock.2:188
3947 msgid "POSIX.1-2001, SVr4."
3948 msgstr "POSIX.1-2001, SVr4."
3951 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:503 build/C/man2/msync.2:105
3953 msgid "AVAILABILITY"
3957 #: build/C/man2/mlock.2:200
3958 msgid "On POSIX systems on which B<mlock>() and B<munlock>() are available, B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number of bytes in a page can be determined from the constant B<PAGESIZE> (if defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
3959 msgstr "B<mlock>() と B<munlock>() が使用可能な POSIX システムでは B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼び出すことで決定できる。"
3961 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
3962 #. -1: unavailable, 0: ask using sysconf().
3963 #. glibc defines it to 1.
3965 #: build/C/man2/mlock.2:213
3966 msgid "On POSIX systems on which B<mlockall>() and B<munlockall>() are available, B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
3967 msgstr "B<mlockall>() と B<munlockall>() が利用可能な POSIX システムでは、 B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている (B<sysconf>(3) も参照のこと)。"
3970 #: build/C/man2/mlock.2:231
3971 msgid "Memory locking has two main applications: real-time algorithms and high-security data processing. Real-time applications require deterministic timing, and, like scheduling, paging is one major cause of unexpected program execution delays. Real-time applications will usually also switch to a real-time scheduler with B<sched_setscheduler>(2). Cryptographic security software often handles critical bytes like passwords or secret keys as data structures. As a result of paging, these secrets could be transferred onto a persistent swap store medium, where they might be accessible to the enemy long after the security software has erased the secrets in RAM and terminated. (But be aware that the suspend mode on laptops and some desktop computers will save a copy of the system's RAM to disk, regardless of memory locks.)"
3972 msgstr "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセキュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的なタイミングやスケジューリングを必要とするが、 ページングは予期しないプログラムの実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいていは B<sched_setscheduler>(2) でリアルタイムスケジューラに変更される。 暗号やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送されるかもしれない。そして、セキュリティ ソフトウェアが RAM 上の秘密を削除して終了したずっと後になっても、 このスワップされたデータには敵がアクセスできる可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サスペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保存することに注意)。"
3975 #: build/C/man2/mlock.2:244
3976 msgid "Real-time processes that are using B<mlockall>() to prevent delays on page faults should reserve enough locked stack pages before entering the time-critical section, so that no page fault can be caused by function calls. This can be achieved by calling a function that allocates a sufficiently large automatic variable (an array) and writes to the memory occupied by this array in order to touch these stack pages. This way, enough pages will be mapped for the stack and can be locked into RAM. The dummy writes ensure that not even copy-on-write page faults can occur in the critical section."
3977 msgstr "リアルタイムプロセスが B<mlockall>() を使ってページフォールトによる遅延を防ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされたスタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるようにこの配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすることで、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミーの書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
3980 #: build/C/man2/mlock.2:257
3981 msgid "Memory locks are not inherited by a child created via B<fork>(2) and are automatically removed (unlocked) during an B<execve>(2) or when the process terminates. The B<mlockall>() B<MCL_FUTURE> setting is not inherited by a child created via B<fork>(2) and is cleared during an B<execve>(2)."
3982 msgstr "メモリロックは B<fork>(2) で作成された子プロセスには継承されず、 B<execve>(2) が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
3985 #: build/C/man2/mlock.2:261
3986 msgid "The memory lock on an address range is automatically removed if the address range is unmapped via B<munmap>(2)."
3987 msgstr "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2) によってアンマップされた場合は削除される。"
3990 #: build/C/man2/mlock.2:274
3991 msgid "Memory locks do not stack, that is, pages which have been locked several times by calls to B<mlock>() or B<mlockall>() will be unlocked by a single call to B<munlock>() for the corresponding range or by B<munlockall>(). Pages which are mapped to several locations or by several processes stay locked into RAM as long as they are locked at least at one location or by at least one process."
3992 msgstr "メモリのロックは累積しない。 すなわち複数回 B<mlock>() や B<mlockall>() を呼び出してロックされたページでも、 対応する範囲に対して B<munlock>() を 1 回呼び出したり B<munlockall>() を呼び出したりするだけでロック解除される。 複数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つのプロセスでロックされている限りは RAM に残り続ける。"
3995 #: build/C/man2/mlock.2:285
3996 msgid "Under Linux, B<mlock>() and B<munlock>() automatically round I<addr> down to the nearest page boundary. However, POSIX.1-2001 allows an implementation to require that I<addr> is page aligned, so portable applications should ensure this."
3997 msgstr "Linux では、 B<mlock>() と B<munlock>() は自動的に I<addr> を端数切り捨てにより一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリケーションではきちんと境界に合わせた方が良い。"
4000 #: build/C/man2/mlock.2:298
4001 msgid "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how many kilobytes of memory the process with ID I<PID> has locked using B<mlock>(), B<mlockall>(), and B<mmap>(2) B<MAP_LOCKED>."
4003 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4004 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4005 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4009 #: build/C/man2/mlock.2:298
4011 msgid "Limits and permissions"
4015 #: build/C/man2/mlock.2:305
4016 msgid "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>) in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit defines a limit on how much memory the process may lock."
4017 msgstr "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>) が必要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロックできるかの制限を定義する。"
4020 #: build/C/man2/mlock.2:311
4021 msgid "Since Linux 2.6.9, no limits are placed on the amount of memory that a privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit instead defines a limit on how much memory an unprivileged process may lock."
4022 msgstr "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限となり、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロックできるメモリ量の制限を定義する。"
4025 #: build/C/man2/mlock.2:319
4026 msgid "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the B<mlockall>() B<MCL_FUTURE> flag to be inherited across a B<fork>(2). This was rectified in kernel 2.4.18."
4027 msgstr "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>() B<MCL_FUTURE> フラグが B<fork>(2) で継承されると言うバグがある。 これはカーネル 2.4.18 で修正された。"
4029 #. See the following LKML thread:
4030 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4031 #. "Rationale for RLIMIT_MEMLOCK"
4034 #: build/C/man2/mlock.2:336
4035 msgid "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for example, setting its effective UID to a nonzero value), then subsequent memory allocations (e.g., B<mmap>(2), B<brk>(2)) will fail if the B<RLIMIT_MEMLOCK> resource limit is encountered."
4036 msgstr "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するなどにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), B<brk>(2)) は失敗する。"
4039 #: build/C/man2/mlock.2:343
4040 msgid "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), B<capabilities>(7)"
4042 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4043 "B<capabilities>(7)"
4046 #: build/C/man2/mmap.2:40
4052 #: build/C/man2/mmap.2:43
4053 msgid "mmap, munmap - map or unmap files or devices into memory"
4054 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4057 #: build/C/man2/mmap.2:51
4060 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4061 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
4062 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4064 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4065 "B< int >I<fd>B<, off_t >I<offset>B<);>\n"
4066 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4069 #: build/C/man2/mmap.2:54
4070 msgid "See NOTES for information on feature test macro requirements."
4071 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
4074 #: build/C/man2/mmap.2:63
4075 msgid "B<mmap>() creates a new mapping in the virtual address space of the calling process. The starting address for the new mapping is specified in I<addr>. The I<length> argument specifies the length of the mapping."
4076 msgstr "B<mmap>() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成する。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さは I<length> 引き数で指定される。"
4078 #. Before Linux 2.6.24, the address was rounded up to the next page
4079 #. boundary; since 2.6.24, it is rounded down!
4081 #: build/C/man2/mmap.2:77
4082 msgid "If I<addr> is NULL, then the kernel chooses the address at which to create the mapping; this is the most portable method of creating a new mapping. If I<addr> is not NULL, then the kernel takes it as a hint about where to place the mapping; on Linux, the mapping will be created at a nearby page boundary. The address of the new mapping is returned as the result of the call."
4083 msgstr "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 この方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL でない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピングのアドレスは、呼び出しの返り値として返される。"
4086 #: build/C/man2/mmap.2:89
4087 msgid "The contents of a file mapping (as opposed to an anonymous mapping; see B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at offset I<offset> in the file (or other object) referred to by the file descriptor I<fd>. I<offset> must be a multiple of the page size as returned by I<sysconf(_SC_PAGE_SIZE)>."
4088 msgstr "ファイルマッピングの内容は、 ファイルディスクリプター I<fd> で参照されるファイル (もしくは他のオブジェクト) のオフセット I<offset> から開始される I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4091 #: build/C/man2/mmap.2:97
4092 msgid "The I<prot> argument describes the desired memory protection of the mapping (and must not conflict with the open mode of the file). It is either B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4093 msgstr "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する (ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4096 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
4098 msgid "B<PROT_EXEC>"
4099 msgstr "B<PROT_EXEC>"
4102 #: build/C/man2/mmap.2:100
4103 msgid "Pages may be executed."
4104 msgstr "ページは実行可能である。"
4107 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
4109 msgid "B<PROT_READ>"
4110 msgstr "B<PROT_READ>"
4113 #: build/C/man2/mmap.2:103
4114 msgid "Pages may be read."
4115 msgstr "ページは読み込み可能である。"
4118 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
4120 msgid "B<PROT_WRITE>"
4121 msgstr "B<PROT_WRITE>"
4124 #: build/C/man2/mmap.2:106
4125 msgid "Pages may be written."
4126 msgstr "ページに書き込み可能である。"
4129 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
4131 msgid "B<PROT_NONE>"
4132 msgstr "B<PROT_NONE>"
4135 #: build/C/man2/mmap.2:109
4136 msgid "Pages may not be accessed."
4137 msgstr "ページにはアクセスできない。"
4140 #: build/C/man2/mmap.2:118
4141 msgid "The I<flags> argument determines whether updates to the mapping are visible to other processes mapping the same region, and whether updates are carried through to the underlying file. This behavior is determined by including exactly one of the following values in I<flags>:"
4142 msgstr "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている 他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を I<flags> に含めることで指定する。"
4145 #: build/C/man2/mmap.2:118
4147 msgid "B<MAP_SHARED>"
4148 msgstr "B<MAP_SHARED>"
4151 #: build/C/man2/mmap.2:128
4152 msgid "Share this mapping. Updates to the mapping are visible to other processes that map this file, and are carried through to the underlying file. The file may not actually be updated until B<msync>(2) or B<munmap>() is called."
4153 msgstr "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングしている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられる。 ただし、ファイルの実際の更新は B<msync>(2) または B<munmap>() が呼ばれるまで行われないこともある。"
4156 #: build/C/man2/mmap.2:128
4158 msgid "B<MAP_PRIVATE>"
4159 msgstr "B<MAP_PRIVATE>"
4162 #: build/C/man2/mmap.2:137
4163 msgid "Create a private copy-on-write mapping. Updates to the mapping are not visible to other processes mapping the same file, and are not carried through to the underlying file. It is unspecified whether changes made to the file after the B<mmap>() call are visible in the mapped region."
4164 msgstr "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピングに対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新がマッピング元のファイルを通じて伝えられることもない。 B<mmap>() の呼び出し後にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどうかは規定されていない。"
4167 #: build/C/man2/mmap.2:139
4168 msgid "Both of these flags are described in POSIX.1-2001."
4169 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
4172 #: build/C/man2/mmap.2:142
4173 msgid "In addition, zero or more of the following values can be ORed in I<flags>:"
4174 msgstr "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定することができる。"
4177 #: build/C/man2/mmap.2:142
4179 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
4180 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
4182 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
4184 #: build/C/man2/mmap.2:158
4185 msgid "Put the mapping into the first 2 Gigabytes of the process address space. This flag is supported only on x86-64, for 64-bit programs. It was added to allow thread stacks to be allocated somewhere in the first 2GB of memory, so as to improve context-switch performance on some early 64-bit processors. Modern x86-64 processors no longer have this performance problem, so use of this flag is not required on those systems. The B<MAP_32BIT> flag is ignored when B<MAP_FIXED> is set."
4186 msgstr "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムのみである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB 以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおける コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロセッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラグは無視される。"
4189 #: build/C/man2/mmap.2:158
4192 msgstr "B<MAP_ANON>"
4195 #: build/C/man2/mmap.2:163
4196 msgid "Synonym for B<MAP_ANONYMOUS>. Deprecated."
4197 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
4200 #: build/C/man2/mmap.2:163
4202 msgid "B<MAP_ANONYMOUS>"
4203 msgstr "B<MAP_ANONYMOUS>"
4206 #: build/C/man2/mmap.2:185
4207 msgid "The mapping is not backed by any file; its contents are initialized to zero. The I<fd> and I<offset> arguments are ignored; however, some implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>) is specified, and portable applications should ensure this. The use of B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux only since kernel 2.4."
4208 msgstr "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>) が指定された場合、 I<fd> を -1 にする必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきである。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 以降の Linux でのみサポートされている。"
4211 #: build/C/man2/mmap.2:185
4213 msgid "B<MAP_DENYWRITE>"
4214 msgstr "B<MAP_DENYWRITE>"
4216 #. Introduced in 1.1.36, removed in 1.3.24.
4218 #: build/C/man2/mmap.2:193
4219 msgid "This flag is ignored. (Long ago, it signaled that attempts to write to the underlying file should fail with B<ETXTBUSY>. But this was a source of denial-of-service attacks.)"
4220 msgstr "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうとすると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これは denial-of-service (サービス拒否) 攻撃の原因となった)。"
4223 #: build/C/man2/mmap.2:193
4225 msgid "B<MAP_EXECUTABLE>"
4226 msgstr "B<MAP_EXECUTABLE>"
4228 #. Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
4229 #. (Long ago, it signaled that the underlying file is an executable.
4230 #. However, that information was not really used anywhere.)
4231 #. Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
4234 #: build/C/man2/mmap.2:201
4235 msgid "This flag is ignored."
4236 msgstr "このフラグは無視される。"
4239 #: build/C/man2/mmap.2:201
4242 msgstr "B<MAP_FILE>"
4244 #. On some systems, this was required as the opposite of
4245 #. MAP_ANONYMOUS -- mtk, 1 May 2007
4247 #: build/C/man2/mmap.2:207
4248 msgid "Compatibility flag. Ignored."
4249 msgstr "互換性のためのフラグ。無視される。"
4252 #: build/C/man2/mmap.2:207
4254 msgid "B<MAP_FIXED>"
4255 msgstr "B<MAP_FIXED>"
4258 #: build/C/man2/mmap.2:225
4259 msgid "Don't interpret I<addr> as a hint: place the mapping at exactly that address. I<addr> must be a multiple of the page size. If the memory region specified by I<addr> and I<len> overlaps pages of any existing mapping(s), then the overlapped part of the existing mapping(s) will be discarded. If the specified address cannot be used, B<mmap>() will fail. Because requiring a fixed address for a mapping is less portable, the use of this option is discouraged."
4260 msgstr "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアドレスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でなければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングのページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定されたアドレスが使用できない場合、 B<mmap>() は失敗する。 マッピングに対して固定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないことを推奨する。"
4263 #: build/C/man2/mmap.2:225
4265 msgid "B<MAP_GROWSDOWN>"
4266 msgstr "B<MAP_GROWSDOWN>"
4269 #: build/C/man2/mmap.2:230
4270 msgid "Used for stacks. Indicates to the kernel virtual memory system that the mapping should extend downward in memory."
4271 msgstr "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想メモリシステムに指示する。 (訳注:マッピングは通常はメモリアドレスが増加する向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
4274 #: build/C/man2/mmap.2:230
4276 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
4277 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
4280 #: build/C/man2/mmap.2:236
4281 msgid "Allocate the mapping using \"huge pages.\" See the Linux kernel source file I<Documentation/vm/hugetlbpage.txt> for further information."
4282 msgstr "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
4285 #: build/C/man2/mmap.2:236
4287 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
4288 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
4290 #. If set, the mapped pages will not be swapped out.
4292 #: build/C/man2/mmap.2:242
4293 msgid "Lock the pages of the mapped region into memory in the manner of B<mlock>(2). This flag is ignored in older kernels."
4294 msgstr "マップされた領域のページを B<mlock>(2) の方法でメモリ内にロックする。 それ以前のカーネルでは、このフラグは無視される。"
4297 #: build/C/man2/mmap.2:242
4299 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
4300 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
4303 #: build/C/man2/mmap.2:257
4304 msgid "Only meaningful in conjunction with B<MAP_POPULATE>. Don't perform read-ahead: create page tables entries only for pages that are already present in RAM. Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing. One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be reimplemented."
4305 msgstr "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページテーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
4308 #: build/C/man2/mmap.2:257
4310 msgid "B<MAP_NORESERVE>"
4311 msgstr "B<MAP_NORESERVE>"
4314 #: build/C/man2/mmap.2:272
4315 msgid "Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get B<SIGSEGV> upon a write if no physical memory is available. See also the discussion of the file I</proc/sys/vm/overcommit_memory> in B<proc>(5). In kernels before 2.6, this flag had effect only for private writable mappings."
4316 msgstr "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがある。 B<proc>(5) の I</proc/sys/vm/overcommit_memory> ファイルについての議論も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プライベートマッピングについてのみ効果があった。"
4319 #: build/C/man2/mmap.2:272
4321 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
4322 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
4325 #: build/C/man2/mmap.2:279
4326 msgid "Populate (prefault) page tables for a mapping. For a file mapping, this causes read-ahead on the file. Later accesses to the mapping will not be blocked by page faults. B<MAP_POPULATE> is supported for private mappings only since Linux 2.6.23."
4327 msgstr "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合には、これによりファイルが先読み (read-ahead) が行われる。この以後は、マッピングに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux 2.6.23 以降でのみプライベートマッピングについて B<MAP_POPULATE> がサポートされている。"
4330 #: build/C/man2/mmap.2:279
4332 msgid "B<MAP_STACK> (since Linux 2.6.27)"
4333 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
4335 #. See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
4336 #. commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
4337 #. http://thread.gmane.org/gmane.linux.kernel/720412
4338 #. "pthread_create() slow for many threads; also time to revisit 64b
4339 #. context switch optimization?"
4341 #: build/C/man2/mmap.2:292
4342 msgid "Allocate the mapping at an address suitable for a process or thread stack. This flag is currently a no-op, but is used in the glibc threading implementation so that if some architectures require special treatment for stack allocations, support can later be transparently implemented for glibc."
4343 msgstr "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在のところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためである。"
4346 #: build/C/man2/mmap.2:292
4348 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
4349 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
4352 #: build/C/man2/mmap.2:302
4353 msgid "Don't clear anonymous pages. This flag is intended to improve performance on embedded devices. This flag is honored only if the kernel was configured with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option. Because of the security implications, that option is normally enabled only on embedded devices (i.e., devices where one has complete control of the contents of user memory)."
4355 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイス\n"
4356 "での性能向上を目的に作られてものである。カーネルの設定で\n"
4357 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
4359 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
4360 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
4363 #: build/C/man2/mmap.2:310
4364 msgid "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001. However, most systems also support B<MAP_ANONYMOUS> (or its synonym B<MAP_ANON>)."
4365 msgstr "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 しかしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である B<MAP_ANON>) もサポートされている。"
4368 #: build/C/man2/mmap.2:317
4369 msgid "Some systems document the additional flags B<MAP_AUTOGROW>, B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
4370 msgstr "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
4373 #: build/C/man2/mmap.2:323
4374 msgid "Memory mapped by B<mmap>() is preserved across B<fork>(2), with the same attributes."
4375 msgstr "B<mmap>() によってマップされたメモリの属性は B<fork>(2) の際に継承される。"
4378 #: build/C/man2/mmap.2:331
4379 msgid "A file is mapped in multiples of the page size. For a file that is not a multiple of the page size, the remaining memory is zeroed when mapped, and writes to that region are not written out to the file. The effect of changing the size of the underlying file of a mapping on the pages that correspond to added or removed regions of the file is unspecified."
4380 msgstr "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 するマップされたページに対してどのような影響があるかは規定されていない。"
4383 #: build/C/man2/mmap.2:331
4389 #: build/C/man2/mmap.2:341
4390 msgid "The B<munmap>() system call deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. The region is also automatically unmapped when the process is terminated. On the other hand, closing the file descriptor does not unmap the region."
4391 msgstr "システムコール B<munmap>() は指定されたアドレス範囲のマップを消去し、 これ以降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したときにも自動的にアンマップされる。 一方、ファイルディスクリプターをクローズしても、この領域はアンマップされない。"
4394 #: build/C/man2/mmap.2:351
4395 msgid "The address I<addr> must be a multiple of the page size. All pages containing a part of the indicated range are unmapped, and subsequent references to these pages will generate B<SIGSEGV>. It is not an error if the indicated range does not contain any mapped pages."
4396 msgstr "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれていない場合でも エラーにならない。"
4399 #: build/C/man2/mmap.2:351
4401 msgid "Timestamps changes for file-backed mappings"
4402 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
4405 #: build/C/man2/mmap.2:358
4406 msgid "For file-backed mappings, the I<st_atime> field for the mapped file may be updated at any time between the B<mmap>() and the corresponding unmapping; the first reference to a mapped page will update the field if it has not been already."
4407 msgstr "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの I<st_atime> フィールドは、 B<mmap>() されてからアンマップ (unmap) されるまでの間に更新されることがある。 それまでに更新が行われていなければ、マップされたページへの最初の参照があった 際に更新される。"
4410 #: build/C/man2/mmap.2:375
4411 msgid "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> and B<MAP_SHARED> will be updated after a write to the mapped region, and before a subsequent B<msync>(2) with the B<MS_SYNC> or B<MS_ASYNC> flag, if one occurs."
4412 msgstr "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して B<msync>(2) が呼ばれる前までに更新される。"
4415 #: build/C/man2/mmap.2:392
4416 msgid "On success, B<mmap>() returns a pointer to the mapped area. On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, and I<errno> is set appropriately. On success, B<munmap>() returns 0, on failure -1, and I<errno> is set (probably to B<EINVAL>)."
4417 msgstr "B<mmap>() は成功するとマップされた領域へのポインタを返す。 失敗すると値 B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>) を返し、 I<errno> がエラーの内容にしたがってセットされる。 B<munmap>() は成功すると 0 を返す。失敗すると -1 を返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
4420 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
4421 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
4422 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
4423 #: build/C/man2/shmop.2:188
4429 #: build/C/man2/mmap.2:411
4430 msgid "A file descriptor refers to a non-regular file. Or a file mapping was requested, but I<fd> is not open for reading. Or B<MAP_SHARED> was requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write (B<O_RDWR>) mode. Or B<PROT_WRITE> is set, but the file is append-only."
4431 msgstr "以下のいずれかの場合。 ファイルディスクリプターの参照先が通常のファイルではない (non-regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープンされていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み書きモード (B<O_RDWR>) でオープンされていない、 B<PROT_WRITE> をセットしたが、ファイルは追加 (append) 専用である。"
4434 #: build/C/man2/mmap.2:415
4435 msgid "The file has been locked, or too much memory has been locked (see B<setrlimit>(2))."
4436 msgstr "ファイルがロックされている。またはロックされているメモリが多すぎる (B<setrlimit>(2) を参照)。"
4439 #: build/C/man2/mmap.2:421
4440 msgid "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
4441 msgstr "I<fd> が有効なファイルディスクリプター (file descriptor) ではない (かつ B<MAP_ANONYMOUS> がセットされていない)。"
4444 #: build/C/man2/mmap.2:429
4445 msgid "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or not aligned on a page boundary)."
4446 msgstr "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ページ境界にアラインメントされていない)。"
4449 #: build/C/man2/mmap.2:434
4450 msgid "(since Linux 2.6.12) I<length> was 0."
4451 msgstr "(Linux 2.6.12 以降) I<length> が 0 であった。"
4454 #: build/C/man2/mmap.2:442
4455 msgid "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained both of these values."
4456 msgstr "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、もしくは その両方が含まれていた。"
4459 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
4460 #: build/C/man2/shmget.2:221 build/C/man2/memfd_create.2:149
4465 #. [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
4467 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
4468 msgid "The system limit on the total number of open files has been reached."
4469 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
4472 #: build/C/man2/mmap.2:454
4473 msgid "The underlying filesystem of the specified file does not support memory mapping."
4474 msgstr "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート していない。"
4477 #: build/C/man2/mmap.2:458
4478 msgid "No memory is available, or the process's maximum number of mappings would have been exceeded."
4479 msgstr "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
4481 #. (Since 2.4.25 / 2.6.0.)
4483 #: build/C/man2/mmap.2:467
4484 msgid "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a file on a filesystem that was mounted no-exec."
4485 msgstr "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウントされたファイルシステム上のファイルに マップ領域が対応している。"
4488 #: build/C/man2/mmap.2:477
4489 msgid "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for writing."
4490 msgstr "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書き込み用に開かれている。"
4493 #: build/C/man2/mmap.2:477 build/C/man2/shmctl.2:348
4495 msgid "B<EOVERFLOW>"
4496 msgstr "B<EOVERFLOW>"
4499 #: build/C/man2/mmap.2:489
4500 msgid "On 32-bit architecture together with the large file extension (i.e., using 64-bit I<off_t>): the number of pages used for I<length> plus number of pages used for I<offset> would overflow I<unsigned long> (32 bits)."
4501 msgstr "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビットの I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローしてしまう) 場合がある。"
4504 #: build/C/man2/mmap.2:491
4505 msgid "Use of a mapped region can result in these signals:"
4506 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
4509 #: build/C/man2/mmap.2:491
4515 #: build/C/man2/mmap.2:494
4516 msgid "Attempted write into a region mapped as read-only."
4517 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
4520 #: build/C/man2/mmap.2:494
4526 #: build/C/man2/mmap.2:499
4527 msgid "Attempted access to a portion of the buffer that does not correspond to the file (for example, beyond the end of the file, including the case where another process has truncated the file)."
4528 msgstr "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越えた部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる) にアクセスしようとした。"
4530 #. SVr4 documents additional error codes ENXIO and ENODEV.
4531 #. SUSv2 documents additional error codes EMFILE and EOVERFLOW.
4533 #: build/C/man2/mmap.2:503
4534 msgid "SVr4, 4.4BSD, POSIX.1-2001."
4535 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
4537 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4538 #. -1: unavailable, 0: ask using sysconf().
4539 #. glibc defines it to 1.
4541 #: build/C/man2/mmap.2:517
4542 msgid "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>() are available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
4543 msgstr "B<mmap>(), B<msync>(2) B<munmap>() が利用可能な POSIX システムでは、 B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される (B<sysconf>(3) も参照のこと)。"
4546 #: build/C/man2/mmap.2:530
4547 msgid "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies B<PROT_READ>. It is architecture dependent whether B<PROT_READ> implies B<PROT_EXEC> or not. Portable programs should always set B<PROT_EXEC> if they intend to execute code in the new mapping."
4548 msgstr "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙のうちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、常に B<PROT_EXEC> をセットすべきである。"
4551 #: build/C/man2/mmap.2:545
4552 msgid "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and omit B<MAP_FIXED> from I<flags>. In this case, the system chooses the address for the mapping; the address is chosen so as not to conflict with any existing mapping, and will not be 0. If the B<MAP_FIXED> flag is specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
4553 msgstr "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 かつ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ I<addr> が 0 (NULL) の場合には、マップされるアドレスが 0 (NULL) になる。"
4556 #: build/C/man2/mmap.2:575
4557 msgid "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or B<_SVID_SOURCE> is defined. (Requiring B<_GNU_SOURCE> also suffices, and requiring that macro specifically would have been more logical, since these flags are all Linux-specific.) The relevant flags are: B<MAP_32BIT>, B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and B<MAP_STACK>."
4558 msgstr "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義された場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらのフラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点はもっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, B<MAP_STACK> である。"
4561 #: build/C/man2/mmap.2:575
4563 msgid "C library/kernel ABI differences"
4564 msgstr "C ライブラリとカーネル ABI の違い"
4566 #. Since around glibc 2.1/2.2, depending on the platform.
4568 #: build/C/man2/mmap.2:590
4569 msgid "This page describes the interface provided by the glibc B<mmap>() wrapper function. Originally, this function invoked a system call of the same name. Since kernel 2.4, that system call has been superseded by B<mmap2>(2), and nowadays the glibc B<mmap>() wrapper function invokes B<mmap2>(2) with a suitably adjusted value for I<offset>."
4571 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェースに\n"
4572 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動していた。\n"
4573 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
4574 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
4575 "B<mmap2>(2) を起動する。"
4578 #: build/C/man2/mmap.2:595
4579 msgid "On Linux there are no guarantees like those suggested above under B<MAP_NORESERVE>. By default, any process can be killed at any moment when the system runs out of memory."
4580 msgstr "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制終了されるか分からないからである。"
4583 #: build/C/man2/mmap.2:602
4584 msgid "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> is specified as B<PROT_NONE>."
4585 msgstr "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にのみ、 B<MAP_POPULATE> フラグが効力を持つ。"
4588 #: build/C/man2/mmap.2:617
4589 msgid "SUSv3 specifies that B<mmap>() should fail if I<length> is 0. However, in kernels before 2.6.12, B<mmap>() succeeded in this case: no mapping was created and the call returned I<addr>. Since kernel 2.6.12, B<mmap>() fails with the error B<EINVAL> for this case."
4590 msgstr "SUSv3 では、 I<length> が 0 の場合、 B<mmap>() は失敗すると規定されている。しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>() は成功していた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降では、 B<mmap>() はエラー B<EINVAL> で失敗する。"
4593 #: build/C/man2/mmap.2:633
4594 msgid "POSIX specifies that the system shall always zero fill any partial page at the end of the object and that system will never write any modification of the object beyond its end. On Linux, when you write data to such partial page after the end of the object, the data stays in the page cache even after the file is closed and unmapped and even though the data is never written to the file itself, subsequent mappings may see the modified content. In some cases, this could be fixed by calling B<msync>(2) before the unmap takes place; however, this doesn't work on tmpfs (for example, when using POSIX shared memory interface documented in B<shm_overview>(7))."
4595 msgstr "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルをクローズしてアンマップした後であってもページキャッシュにデータが残り続け、 データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更された内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これは tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX 共有メモリインターフェースを使った場合)。"
4598 #: build/C/man2/mmap.2:645
4599 msgid "The following program prints part of the file specified in its first command-line argument to standard output. The range of bytes to be printed is specified via offset and length values in the second and third command-line arguments. The program creates a memory mapping of the required pages of the file and then uses B<write>(2) to output the desired bytes."
4600 msgstr "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡される オフセットと長さで指定される。 このプログラムは、指定されたファイルの必要なページのメモリ マッピングを作成し、 B<write>(2) を使って所望のバイトを出力する。"
4603 #: build/C/man2/mmap.2:653
4606 "#include E<lt>sys/mman.hE<gt>\n"
4607 "#include E<lt>sys/stat.hE<gt>\n"
4608 "#include E<lt>fcntl.hE<gt>\n"
4609 "#include E<lt>stdio.hE<gt>\n"
4610 "#include E<lt>stdlib.hE<gt>\n"
4611 "#include E<lt>unistd.hE<gt>\n"
4613 "#include E<lt>sys/mman.hE<gt>\n"
4614 "#include E<lt>sys/stat.hE<gt>\n"
4615 "#include E<lt>fcntl.hE<gt>\n"
4616 "#include E<lt>stdio.hE<gt>\n"
4617 "#include E<lt>stdlib.hE<gt>\n"
4618 "#include E<lt>unistd.hE<gt>\n"
4621 #: build/C/man2/mmap.2:656 build/C/man2/mprotect.2:177
4624 "#define handle_error(msg) \\e\n"
4625 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4627 "#define handle_error(msg) \\e\n"
4628 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4631 #: build/C/man2/mmap.2:666
4635 "main(int argc, char *argv[])\n"
4639 " struct stat sb;\n"
4640 " off_t offset, pa_offset;\n"
4645 "main(int argc, char *argv[])\n"
4649 " struct stat sb;\n"
4650 " off_t offset, pa_offset;\n"
4655 #: build/C/man2/mmap.2:671
4658 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
4659 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4660 " exit(EXIT_FAILURE);\n"
4663 " if (argc E<lt> 3 || argc E<gt> 4) {\n"
4664 " fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4665 " exit(EXIT_FAILURE);\n"
4669 #: build/C/man2/mmap.2:675
4672 " fd = open(argv[1], O_RDONLY);\n"
4674 " handle_error(\"open\");\n"
4676 " fd = open(argv[1], O_RDONLY);\n"
4678 " handle_error(\"open\");\n"
4681 #: build/C/man2/mmap.2:678
4684 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
4685 " handle_error(\"fstat\");\n"
4687 " if (fstat(fd, &sb) == -1) /* To obtain file size */\n"
4688 " handle_error(\"fstat\");\n"
4691 #: build/C/man2/mmap.2:682
4694 " offset = atoi(argv[2]);\n"
4695 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4696 " /* offset for mmap() must be page aligned */\n"
4698 " offset = atoi(argv[2]);\n"
4699 " pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4700 " /* offset for mmap() must be page aligned */\n"
4703 #: build/C/man2/mmap.2:687
4706 " if (offset E<gt>= sb.st_size) {\n"
4707 " fprintf(stderr, \"offset is past end of file\\en\");\n"
4708 " exit(EXIT_FAILURE);\n"
4711 " if (offset E<gt>= sb.st_size) {\n"
4712 " fprintf(stderr, \"offset is past end of file\\en\");\n"
4713 " exit(EXIT_FAILURE);\n"
4717 #: build/C/man2/mmap.2:693
4720 " if (argc == 4) {\n"
4721 " length = atoi(argv[3]);\n"
4722 " if (offset + length E<gt> sb.st_size)\n"
4723 " length = sb.st_size - offset;\n"
4724 " /* Can\\(aqt display bytes past end of file */\n"
4726 " if (argc == 4) {\n"
4727 " length = atoi(argv[3]);\n"
4728 " if (offset + length E<gt> sb.st_size)\n"
4729 " length = sb.st_size - offset;\n"
4730 " /* Can\\(aqt display bytes past end of file */\n"
4733 #: build/C/man2/mmap.2:697
4736 " } else { /* No length arg ==E<gt> display to end of file */\n"
4737 " length = sb.st_size - offset;\n"
4740 " } else { /* No length arg ==E<gt> display to end of file */\n"
4741 " length = sb.st_size - offset;\n"
4745 #: build/C/man2/mmap.2:702
4748 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4749 " MAP_PRIVATE, fd, pa_offset);\n"
4750 " if (addr == MAP_FAILED)\n"
4751 " handle_error(\"mmap\");\n"
4753 " addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4754 " MAP_PRIVATE, fd, pa_offset);\n"
4755 " if (addr == MAP_FAILED)\n"
4756 " handle_error(\"mmap\");\n"
4759 #: build/C/man2/mmap.2:707
4762 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4763 " if (s != length) {\n"
4765 " handle_error(\"write\");\n"
4767 " s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4768 " if (s != length) {\n"
4770 " handle_error(\"write\");\n"
4773 #: build/C/man2/mmap.2:711
4776 " fprintf(stderr, \"partial write\");\n"
4777 " exit(EXIT_FAILURE);\n"
4780 " fprintf(stderr, \"partial write\");\n"
4781 " exit(EXIT_FAILURE);\n"
4785 #: build/C/man2/mmap.2:729
4786 msgid "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
4787 msgstr "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
4790 #: build/C/man2/mmap.2:736
4791 msgid "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
4792 msgstr "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/smaps> の説明。"
4795 #: build/C/man2/mmap.2:741 build/C/man2/msync.2:151
4796 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4797 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4800 #: build/C/man2/mmap2.2:29
4806 #: build/C/man2/mmap2.2:29
4812 #: build/C/man2/mmap2.2:32
4813 msgid "mmap2 - map files or devices into memory"
4814 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
4817 #: build/C/man2/mmap2.2:38
4820 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4821 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4823 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4824 "B< int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4827 #: build/C/man2/mmap2.2:43
4828 msgid "This is probably not the system call that you are interested in; instead, see B<mmap>(2), which describes the glibc wrapper function that invokes this system call."
4830 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
4831 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc の\n"
4835 #: build/C/man2/mmap2.2:54
4836 msgid "The B<mmap2>() system call provides the same interface as B<mmap>(2), except that the final argument specifies the offset into the file in 4096-byte units (instead of bytes, as is done by B<mmap>(2)). This enables applications that use a 32-bit I<off_t> to map large files (up to 2^44 bytes)."
4838 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。ただ\n"
4839 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイト\n"
4840 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
4841 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマップ\n"
4845 #: build/C/man2/mmap2.2:61
4846 msgid "On success, B<mmap2>() returns a pointer to the mapped area. On error, -1 is returned and I<errno> is set appropriately."
4847 msgstr "成功した場合、 B<mmap2>() はマップされた領域へのポインタを返す。 エラーの場合は -1 が返されて、 I<errno> が適切に設定される。"
4850 #: build/C/man2/mmap2.2:65
4851 msgid "Problem with getting the data from user space."
4852 msgstr "ユーザ空間からデータを取得するときに問題があった。"
4855 #: build/C/man2/mmap2.2:70
4856 msgid "(Various platforms where the page size is not 4096 bytes.) I<offset\\ *\\ 4096> is not a multiple of the system page size."
4857 msgstr "(ページサイズが 4096 バイトでないプラットフォームにおいて) I<offset\\ *\\ 4096> がシステムのページサイズの倍数ではない。"
4860 #: build/C/man2/mmap2.2:74
4861 msgid "B<mmap2>() can also return any of the errors described in B<mmap>(2)."
4862 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
4865 #: build/C/man2/mmap2.2:77
4866 msgid "B<mmap2>() is available since Linux 2.3.31."
4867 msgstr "B<mmap2>() は、Linux 2.3.31 以降で使用可能である。"
4870 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
4871 msgid "This system call is Linux-specific."
4872 msgstr "このシステムコールは Linux 独自である。"
4875 #: build/C/man2/mmap2.2:86
4876 msgid "On architectures where this system call is present, the glibc B<mmap>() wrapper function invokes this system call rather than the B<mmap>(2) system call."
4877 msgstr "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>() のラッパー関数は、 B<mmap>(2) システムコールではなく、このシステムコール (B<mmap2>(2)) を起動する。"
4880 #: build/C/man2/mmap2.2:88
4881 msgid "This system call does not exist on x86-64."
4882 msgstr "このシステムコールは x86-64 には存在しない。"
4884 #. ia64 can have page sizes ranging from 4kB to 64kB.
4885 #. On cris, it looks like the unit might also be the page size,
4886 #. which is 8192 bytes. -- mtk, June 2007
4888 #: build/C/man2/mmap2.2:95
4889 msgid "On ia64, the unit for I<offset> is actually the system page size, rather than 4096 bytes."
4890 msgstr "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 バイトではない。"
4893 #: build/C/man2/mmap2.2:101
4894 msgid "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4895 msgstr "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4898 #: build/C/man2/mprotect.2:39
4904 #: build/C/man2/mprotect.2:39
4910 #: build/C/man2/mprotect.2:42
4911 msgid "mprotect - set protection on a region of memory"
4912 msgstr "mprotect - メモリ領域の保護を設定する"
4915 #: build/C/man2/mprotect.2:47
4917 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4918 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4921 #: build/C/man2/mprotect.2:55
4922 msgid "B<mprotect>() changes protection for the calling process's memory page(s) containing any part of the address range in the interval [I<addr>,\\ I<addr>+I<len>-1]. I<addr> must be aligned to a page boundary."
4923 msgstr "B<mprotect>() は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境界に一致していなければならない。"
4926 #: build/C/man2/mprotect.2:60
4927 msgid "If the calling process tries to access memory in a manner that violates the protection, then the kernel generates a B<SIGSEGV> signal for the process."
4928 msgstr "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとすると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
4931 #: build/C/man2/mprotect.2:65
4932 msgid "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the following list:"
4933 msgstr "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット毎の論理和 (bitwize-or) で指定する:"
4936 #: build/C/man2/mprotect.2:68
4937 msgid "The memory cannot be accessed at all."
4938 msgstr "そのメモリには全くアクセスできない。"
4941 #: build/C/man2/mprotect.2:71
4942 msgid "The memory can be read."
4943 msgstr "そのメモリを読み取ることができる。"
4946 #: build/C/man2/mprotect.2:74
4947 msgid "The memory can be modified."
4948 msgstr "そのメモリを変更できる。"
4951 #: build/C/man2/mprotect.2:77
4952 msgid "The memory can be executed."
4953 msgstr "そのメモリは実行可能である。"
4956 #: build/C/man2/mprotect.2:84
4957 msgid "On success, B<mprotect>() returns zero. On error, -1 is returned, and I<errno> is set appropriately."
4958 msgstr "成功した場合、 B<mprotect>() は 0 を返す。エラーの場合は -1 が返り、 I<errno> が適切に設定される。"
4961 #: build/C/man2/mprotect.2:94
4962 msgid "The memory cannot be given the specified access. This can happen, for example, if you B<mmap>(2) a file to which you have read-only access, then ask B<mprotect>() to mark it B<PROT_WRITE>."
4963 msgstr "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイルを読み取り専用で B<mmap>(2) しており、その領域に対して B<mprotect>() を呼び出して B<PROT_WRITE> に設定しようとした場合に発生する。"
4965 #. Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
4967 #: build/C/man2/mprotect.2:99
4968 msgid "I<addr> is not a valid pointer, or not a multiple of the system page size."
4969 msgstr "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
4972 #: build/C/man2/mprotect.2:102
4973 msgid "Internal kernel structures could not be allocated."
4974 msgstr "カーネル内部の構造体を割り当てることができなかった。"
4977 #: build/C/man2/mprotect.2:112
4978 msgid "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the address space of the process, or specify one or more pages that are not mapped. (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced for these cases.)"
4979 msgstr "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間として不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生成されていた)。"
4981 #. SVr4 defines an additional error
4982 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
4984 #: build/C/man2/mprotect.2:121
4985 msgid "SVr4, POSIX.1-2001. POSIX says that the behavior of B<mprotect>() is unspecified if it is applied to a region of memory that was not obtained via B<mmap>(2)."
4986 msgstr "SVr4, POSIX.1-2001. POSIX では、 B<mmap>(2) 経由で獲得していないメモリ領域に対して B<mprotect>() を行った場合の B<mprotect>() の動作は未定義であるとされている。"
4989 #: build/C/man2/mprotect.2:128
4990 msgid "On Linux it is always permissible to call B<mprotect>() on any address in a process's address space (except for the kernel vsyscall area). In particular it can be used to change existing code mappings to be writable."
4991 msgstr "Linux では、(カーネル vsyscall 領域以外の) 任意のプロセスアドレス空間に対して B<mprotect>() を呼び出すことが、常に許されている。 これは特に既存のコードマッピングを書き込み可能にするために使われる。"
4994 #: build/C/man2/mprotect.2:138
4995 msgid "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is architecture- and kernel version-dependent. On some hardware architectures (e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
4996 msgstr "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカーネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
4999 #: build/C/man2/mprotect.2:147
5000 msgid "POSIX.1-2001 says that an implementation may permit access other than that specified in I<prot>, but at a minimum can allow write access only if B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> has been set."
5001 msgstr "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めている。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みアクセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可されない点だけは 満たす必要がある。"
5004 #: build/C/man2/mprotect.2:153
5005 msgid "The program below allocates four pages of memory, makes the third of these pages read-only, and then executes a loop that walks upward through the allocated region modifying bytes."
5006 msgstr "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向かって順番にバイト値を変更するループを実行する。"
5009 #: build/C/man2/mprotect.2:156
5010 msgid "An example of what we might see when running the program is the following:"
5011 msgstr "プログラムを実行した場合の一例を以下に示す。"
5014 #: build/C/man2/mprotect.2:162
5018 "Start of region: 0x804c000\n"
5019 "Got SIGSEGV at address: 0x804e000\n"
5022 "Start of region: 0x804c000\n"
5023 "Got SIGSEGV at address: 0x804e000\n"
5026 #: build/C/man2/mprotect.2:174
5029 "#include E<lt>unistd.hE<gt>\n"
5030 "#include E<lt>signal.hE<gt>\n"
5031 "#include E<lt>stdio.hE<gt>\n"
5032 "#include E<lt>malloc.hE<gt>\n"
5033 "#include E<lt>stdlib.hE<gt>\n"
5034 "#include E<lt>errno.hE<gt>\n"
5035 "#include E<lt>sys/mman.hE<gt>\n"
5037 "#include E<lt>unistd.hE<gt>\n"
5038 "#include E<lt>signal.hE<gt>\n"
5039 "#include E<lt>stdio.hE<gt>\n"
5040 "#include E<lt>malloc.hE<gt>\n"
5041 "#include E<lt>stdlib.hE<gt>\n"
5042 "#include E<lt>errno.hE<gt>\n"
5043 "#include E<lt>sys/mman.hE<gt>\n"
5046 #: build/C/man2/mprotect.2:179
5048 msgid "static char *buffer;\n"
5049 msgstr "static char *buffer;\n"
5052 #: build/C/man2/mprotect.2:187
5056 "handler(int sig, siginfo_t *si, void *unused)\n"
5058 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
5059 " (long) si-E<gt>si_addr);\n"
5060 " exit(EXIT_FAILURE);\n"
5064 "handler(int sig, siginfo_t *si, void *unused)\n"
5066 " printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
5067 " (long) si-E<gt>si_addr);\n"
5068 " exit(EXIT_FAILURE);\n"
5072 #: build/C/man2/mprotect.2:194
5076 "main(int argc, char *argv[])\n"
5080 " struct sigaction sa;\n"
5087 " struct sigaction sa;\n"
5090 #: build/C/man2/mprotect.2:200
5093 " sa.sa_flags = SA_SIGINFO;\n"
5094 " sigemptyset(&sa.sa_mask);\n"
5095 " sa.sa_sigaction = handler;\n"
5096 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
5097 " handle_error(\"sigaction\");\n"
5099 " sa.sa_flags = SA_SIGINFO;\n"
5100 " sigemptyset(&sa.sa_mask);\n"
5101 " sa.sa_sigaction = handler;\n"
5102 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
5103 " handle_error(\"sigaction\");\n"
5106 #: build/C/man2/mprotect.2:204
5109 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
5110 " if (pagesize == -1)\n"
5111 " handle_error(\"sysconf\");\n"
5113 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
5114 " if (pagesize == -1)\n"
5115 " handle_error(\"sysconf\");\n"
5118 #: build/C/man2/mprotect.2:207
5121 " /* Allocate a buffer aligned on a page boundary;\n"
5122 " initial protection is PROT_READ | PROT_WRITE */\n"
5124 " /* Allocate a buffer aligned on a page boundary;\n"
5125 " initial protection is PROT_READ | PROT_WRITE */\n"
5128 #: build/C/man2/mprotect.2:211
5131 " buffer = memalign(pagesize, 4 * pagesize);\n"
5132 " if (buffer == NULL)\n"
5133 " handle_error(\"memalign\");\n"
5135 " buffer = memalign(pagesize, 4 * pagesize);\n"
5136 " if (buffer == NULL)\n"
5137 " handle_error(\"memalign\");\n"
5140 #: build/C/man2/mprotect.2:213
5142 msgid " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
5143 msgstr " printf(\"Start of region: 0x%lx\\en\", (long) buffer);\n"
5146 #: build/C/man2/mprotect.2:217
5149 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
5150 " PROT_READ) == -1)\n"
5151 " handle_error(\"mprotect\");\n"
5153 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
5154 " PROT_READ) == -1)\n"
5155 " handle_error(\"mprotect\");\n"
5158 #: build/C/man2/mprotect.2:220
5161 " for (p = buffer ; ; )\n"
5162 " *(p++) = \\(aqa\\(aq;\n"
5164 " for (p = buffer ; ; )\n"
5165 " *(p++) = \\(aqa\\(aq;\n"
5168 #: build/C/man2/mprotect.2:224
5171 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
5172 " exit(EXIT_SUCCESS);\n"
5175 " printf(\"Loop completed\\en\"); /* Should never happen */\n"
5176 " exit(EXIT_SUCCESS);\n"
5180 #: build/C/man2/mprotect.2:228
5181 msgid "B<mmap>(2), B<sysconf>(3)"
5182 msgstr "B<mmap>(2), B<sysconf>(3)"
5185 #: build/C/man2/mremap.2:30
5191 #: build/C/man2/mremap.2:30
5197 #: build/C/man2/mremap.2:33
5198 msgid "mremap - remap a virtual memory address"
5199 msgstr "mremap - 仮想メモリアドレスを再マッピングする"
5202 #: build/C/man2/mremap.2:36
5204 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
5205 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
5208 #: build/C/man2/mremap.2:41
5211 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
5212 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
5214 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
5215 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
5218 #: build/C/man2/mremap.2:47
5219 msgid "B<mremap>() expands (or shrinks) an existing memory mapping, potentially moving it at the same time (controlled by the I<flags> argument and the available virtual address space)."
5220 msgstr "B<mremap>() は既存のメモリマッピングの拡張 (または縮小) を行う。 同時に移動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決まる)。"
5223 #: build/C/man2/mremap.2:61
5224 msgid "I<old_address> is the old address of the virtual memory block that you want to expand (or shrink). Note that I<old_address> has to be page aligned. I<old_size> is the old size of the virtual memory block. I<new_size> is the requested size of the virtual memory block after the resize. An optional fifth argument, I<new_address>, may be provided; see the description of B<MREMAP_FIXED> below."
5225 msgstr "I<old_address> は拡張 (または縮小) しようとする仮想メモリブロック の元のアドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意すること。I<old_size> は元の仮想メモリブロックの サイズである。 I<new_size> は要求する変更後の仮想メモリブロックのサイズである。 5 番目の引き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説明を参照のこと。"
5228 #: build/C/man2/mremap.2:73
5229 msgid "In Linux the memory is divided into pages. A user process has (one or) several linear virtual memory segments. Each virtual memory segment has one or more mappings to real memory pages (in the page table). Each virtual memory segment has its own protection (access rights), which may cause a segmentation violation if the memory is accessed incorrectly (e.g., writing to a read-only segment). Accessing virtual memory outside of the segments will also cause a segmentation violation."
5230 msgstr "Linux ではメモリはページに分割される。ユーザープロセスは (一つまたは) 複数のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以上の実メモリページ にマッピングされている (マッピング情報はページテーブルで管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメントに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーション侵害が発生する。"
5233 #: build/C/man2/mremap.2:81
5234 msgid "B<mremap>() uses the Linux page table scheme. B<mremap>() changes the mapping between virtual addresses and memory pages. This can be used to implement a very efficient B<realloc>(3)."
5235 msgstr "B<mremap>() は Linux のページテーブル方式を使用する。 B<mremap>() は仮想アドレスとメモリページのマッピングを変更する。これは非常に効率的な B<realloc>(3) を実装するのに使用されている。"
5238 #: build/C/man2/mremap.2:83
5239 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
5240 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
5243 #: build/C/man2/mremap.2:83
5245 msgid "B<MREMAP_MAYMOVE>"
5246 msgstr "B<MREMAP_MAYMOVE>"
5249 #: build/C/man2/mremap.2:95
5250 msgid "By default, if there is not sufficient space to expand a mapping at its current location, then B<mremap>() fails. If this flag is specified, then the kernel is permitted to relocate the mapping to a new virtual address, if necessary. If the mapping is relocated, then absolute pointers into the old mapping location become invalid (offsets relative to the starting address of the mapping should be employed)."
5251 msgstr "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ B<mremap>() は失敗する。 このフラグが指定されると、カーネルは必要があればマッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置されると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アドレスからの相対オフセットは有効のままである)。"
5254 #: build/C/man2/mremap.2:95
5256 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
5257 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
5260 #: build/C/man2/mremap.2:117
5261 msgid "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2). If this flag is specified, then B<mremap>() accepts a fifth argument, I<void\\ *new_address>, which specifies a page-aligned address to which the mapping must be moved. Any previous mapping at the address range specified by I<new_address> and I<new_size> is unmapped. If B<MREMAP_FIXED> is specified, then B<MREMAP_MAYMOVE> must also be specified."
5262 msgstr "このフラグは B<mmap>(2) の B<MAP_FIXED> フラグと似たような目的で用いられる。 このフラグが指定されると、 B<mremap>() は 5 番目の引き数 I<void\\ *new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定する。 このアドレスはページ境界に合っていなければならない。 I<new_address> と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 そのマッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 B<MREMAP_MAYMOVE> も指定しなければならない。"
5265 #: build/C/man2/mremap.2:127
5266 msgid "If the memory segment specified by I<old_address> and I<old_size> is locked (using B<mlock>(2) or similar), then this lock is maintained when the segment is resized and/or relocated. As a consequence, the amount of memory locked by the process may change."
5267 msgstr "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2) や同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置されたりした時にロックも維持される。 その結果、プロセスによってロックされるメモリの量は変化する。"
5270 #: build/C/man2/mremap.2:135
5271 msgid "On success B<mremap>() returns a pointer to the new virtual memory area. On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, and I<errno> is set appropriately."
5272 msgstr "成功した場合は B<mremap>() は新しい仮想メモリ領域へのポインタを返す。 エラーの場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適切に設定される。"
5275 #: build/C/man2/mremap.2:142
5276 msgid "The caller tried to expand a memory segment that is locked, but this was not possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
5277 msgstr "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
5280 #: build/C/man2/mremap.2:151
5281 msgid "\"Segmentation fault.\" Some address in the range I<old_address> to I<old_address>+I<old_size> is an invalid virtual memory address for this process. You can also get B<EFAULT> even if there exist mappings that cover the whole address space requested, but those mappings are of different types."
5282 msgstr "「セグメンテーション違反(segmentation fault)」 I<old_address> から I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不正な仮想メモリアドレスである。 たとえ要求したアドレス空間全体を含むようなマッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> を受け取るだろう。"
5285 #: build/C/man2/mremap.2:179
5286 msgid "An invalid argument was given. Possible causes are: I<old_address> was not page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> was invalid; or the new address range specified by I<new_address> and I<new_size> overlapped the old address range specified by I<old_address> and I<old_size>; or B<MREMAP_FIXED> was specified without also specifying B<MREMAP_MAYMOVE>."
5287 msgstr "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> または B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定されていない。"
5290 #: build/C/man2/mremap.2:185
5291 msgid "The memory area cannot be expanded at the current virtual address, and the B<MREMAP_MAYMOVE> flag is not set in I<flags>. Or, there is not enough (virtual) memory available."
5292 msgstr "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
5294 #. 4.2BSD had a (never actually implemented)
5296 #. call with completely different semantics.
5298 #: build/C/man2/mremap.2:191
5299 msgid "This call is Linux-specific, and should not be used in programs intended to be portable."
5300 msgstr "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではない。"
5303 #: build/C/man2/mremap.2:199
5304 msgid "Prior to version 2.4, glibc did not expose the definition of B<MREMAP_FIXED>, and the prototype for B<mremap>() did not allow for the I<new_address> argument."
5305 msgstr "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておらず、 B<mremap>() のプロトタイプは I<new_address> 引き数を取らなかった。"
5308 #: build/C/man2/mremap.2:208
5309 msgid "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
5310 msgstr "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
5313 #: build/C/man2/mremap.2:214
5314 msgid "Your favorite text book on operating systems for more information on paged memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach)"
5315 msgstr "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入りのオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
5318 #: build/C/man2/msync.2:25
5324 #: build/C/man2/msync.2:25
5330 #: build/C/man2/msync.2:28
5331 msgid "msync - synchronize a file with a memory map"
5332 msgstr "msync - ファイルをマップしたメモリと同期させる"
5335 #: build/C/man2/msync.2:32
5336 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5337 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5340 #: build/C/man2/msync.2:48
5341 msgid "B<msync>() flushes changes made to the in-core copy of a file that was mapped into memory using B<mmap>(2) back to the filesystem. Without use of this call there is no guarantee that changes are written back before B<munmap>(2) is called. To be more precise, the part of the file that corresponds to the memory area starting at I<addr> and having length I<length> is updated."
5342 msgstr "B<msync>() は B<mmap>(2) を使ってメモリにマップされたファイルの、 メモリ上のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しないと、 B<munmap>(2) が呼び出されるまで変更が書き戻される保証はない。 より正確には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が更新される。"
5345 #: build/C/man2/msync.2:68
5346 msgid "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>. B<MS_ASYNC> specifies that an update be scheduled, but the call returns immediately. B<MS_SYNC> asks for an update and waits for it to complete. B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that they can be updated with the fresh values just written)."
5347 msgstr "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定することができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たった今書き込んだ新しい値でマッピングを更新することができるように) 同じファイルに対する他のマッピングを無効にすることを要求する。"
5350 #: build/C/man2/msync.2:73
5351 msgid "On success, zero is returned. On error, -1 is returned, and I<errno> is set appropriately."
5352 msgstr "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定される。"
5355 #: build/C/man2/msync.2:74
5361 #: build/C/man2/msync.2:80
5362 msgid "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the specified address range."
5363 msgstr "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが存在する。"
5366 #: build/C/man2/msync.2:93
5367 msgid "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and B<MS_ASYNC> are set in I<flags>."
5368 msgstr "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
5371 #: build/C/man2/msync.2:96
5372 msgid "The indicated memory (or part of it) was not mapped."
5373 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
5376 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
5377 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
5378 msgid "POSIX.1-2001."
5379 msgstr "POSIX.1-2001."
5382 #: build/C/man2/msync.2:105
5383 msgid "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of B<ENOMEM>. In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
5384 msgstr "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使われていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
5386 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5387 #. -1: unavailable, 0: ask using sysconf().
5388 #. glibc defines them to 1.
5390 #: build/C/man2/msync.2:120
5391 msgid "On POSIX systems on which B<msync>() is available, both B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in I<E<lt>unistd.hE<gt>> to a value greater than 0. (See also B<sysconf>(3).)"
5392 msgstr "B<msync>() が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義される。 (B<sysconf>(3) を参照すること。 )"
5394 #. commit 204ec841fbea3e5138168edbc3a76d46747cc987
5396 #: build/C/man2/msync.2:147
5397 msgid "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in I<flags>, and indeed failure to include one of these flags will cause B<msync>() to fail on some systems. However, Linux permits a call to B<msync>() that specifies neither of these flags, with semantics that are (currently) equivalent to specifying B<MS_ASYNC>. (Since Linux 2.6.19, B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages and flushes them to storage as necessary.) Notwithstanding the Linux behavior, portable, future-proof applications should ensure that they specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
5398 msgstr "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなければならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいずれも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のところ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正しく dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからである。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に指定するようにすべきである。"
5401 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
5407 #: build/C/man3/mtrace.3:25
5413 #: build/C/man3/mtrace.3:25
5419 #: build/C/man3/mtrace.3:28
5420 msgid "mtrace, muntrace - malloc tracing"
5421 msgstr "mtrace, muntrace - malloc のトレース"
5424 #: build/C/man3/mtrace.3:30
5425 msgid "B<#include E<lt>mcheck.hE<gt>>"
5426 msgstr "B<#include E<lt>mcheck.hE<gt>>"
5429 #: build/C/man3/mtrace.3:32
5430 msgid "B<void mtrace(void);>"
5431 msgstr "B<void mtrace(void);>"
5434 #: build/C/man3/mtrace.3:34
5435 msgid "B<void muntrace(void);>"
5436 msgstr "B<void muntrace(void);>"
5439 #: build/C/man3/mtrace.3:46
5440 msgid "The B<mtrace>() function installs hook functions for the memory-allocation functions (B<malloc>(3), B<realloc>(3) B<memalign>(3), B<free>(3)). These hook functions record tracing information about memory allocation and deallocation. The tracing information can be used to discover memory leaks and attempts to free nonallocated memory in a program."
5444 #: build/C/man3/mtrace.3:57
5445 msgid "The B<muntrace>() function disables the hook functions installed by B<mtrace>(), so that tracing information is no longer recorded for the memory-allocation functions. If no hook functions were successfully installed by B<mtrace>(), B<muntrace>() does nothing."
5449 #: build/C/man3/mtrace.3:65
5450 msgid "When B<mtrace>() is called, it checks the value of the environment variable B<MALLOC_TRACE>, which should contain the pathname of a file in which the tracing information is to be recorded. If the pathname is successfully opened, it is truncated to zero length."
5454 #: build/C/man3/mtrace.3:78
5455 msgid "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or not writable, then no hook functions are installed, and B<mtrace>() has no effect. In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is ignored, and B<mtrace>() has no effect."
5459 #: build/C/man3/mtrace.3:86
5460 msgid "In normal usage, B<mtrace>() is called once at the start of execution of a program, and B<muntrace>() is never called."
5464 #: build/C/man3/mtrace.3:96
5465 msgid "The tracing output produced after a call to B<mtrace>() is textual, but not designed to be human readable. The GNU C library provides a Perl script, B<mtrace>(1), that interprets the trace log and produces human-readable output. For best results, the traced program should be compiled with debugging enabled, so that line-number information is recorded in the executable."
5469 #: build/C/man3/mtrace.3:102
5470 msgid "The tracing performed by B<mtrace>() incurs a performance penalty (if B<MALLOC_TRACE> points to a valid, writable pathname)."
5474 #: build/C/man3/mtrace.3:108
5475 msgid "The line-number information produced by B<mtrace>(1) is not always precise: the line number references may refer to the previous or following (nonblank) line of the source code."
5479 #: build/C/man3/mtrace.3:115
5480 msgid "The shell session below demonstrates the use of the B<mtrace>() function and the B<mtrace>(1) command in a program that has memory leaks at two different locations. The demonstration uses the following program:"
5484 #: build/C/man3/mtrace.3:122
5487 "$ B<cat t_mtrace.c>\n"
5488 "#include E<lt>mcheck.hE<gt>\n"
5489 "#include E<lt>stdlib.hE<gt>\n"
5490 "#include E<lt>stdio.hE<gt>\n"
5492 "$ B<cat t_mtrace.c>\n"
5493 "#include E<lt>mcheck.hE<gt>\n"
5494 "#include E<lt>stdlib.hE<gt>\n"
5495 "#include E<lt>stdio.hE<gt>\n"
5498 #: build/C/man3/mtrace.3:127
5502 "main(int argc, char *argv[])\n"
5507 "main(int argc, char *argv[])\n"
5512 #: build/C/man3/mtrace.3:129
5514 msgid " mtrace();\n"
5515 msgstr " mtrace();\n"
5518 #: build/C/man3/mtrace.3:132
5521 " for (j = 0; j E<lt> 2; j++)\n"
5522 " malloc(100); /* Never freed--a memory leak */\n"
5524 " for (j = 0; j E<lt> 2; j++)\n"
5525 " malloc(100); /* Never freed--a memory leak */\n"
5528 #: build/C/man3/mtrace.3:136
5531 " calloc(16, 16); /* Never freed--a memory leak */\n"
5532 " exit(EXIT_SUCCESS);\n"
5535 " calloc(16, 16); /* Never freed--a memory leak */\n"
5536 " exit(EXIT_SUCCESS);\n"
5540 #: build/C/man3/mtrace.3:142
5541 msgid "When we run the program as follows, we see that B<mtrace>() diagnosed memory leaks at two different locations in the program:"
5545 #: build/C/man3/mtrace.3:155
5548 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5549 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5551 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5552 "Memory not freed:\n"
5553 "-----------------\n"
5554 " Address Size Caller\n"
5555 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
5556 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
5557 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
5559 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5560 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5562 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5563 "Memory not freed:\n"
5564 "-----------------\n"
5565 " Address Size Caller\n"
5566 "0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12\n"
5567 "0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12\n"
5568 "0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16\n"
5571 #: build/C/man3/mtrace.3:167
5572 msgid "The first two messages about unfreed memory correspond to the two B<malloc>(3) calls inside the I<for> loop. The final message corresponds to the call to B<calloc>(3) (which in turn calls B<malloc>(3))."
5576 #: build/C/man3/mtrace.3:172
5577 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5578 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5581 #: build/C/man2/posix_fadvise.2:28
5583 msgid "POSIX_FADVISE"
5584 msgstr "POSIX_FADVISE"
5587 #: build/C/man2/posix_fadvise.2:31
5588 msgid "posix_fadvise - predeclare an access pattern for file data"
5589 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
5592 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
5594 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
5595 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
5598 #: build/C/man2/posix_fadvise.2:37
5600 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5601 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5604 #: build/C/man2/posix_fadvise.2:46
5605 msgid "B<posix_fadvise>():"
5606 msgstr "B<posix_fadvise>():"
5609 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
5610 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5611 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5614 #: build/C/man2/posix_fadvise.2:56
5615 msgid "Programs can use B<posix_fadvise>() to announce an intention to access file data in a specific pattern in the future, thus allowing the kernel to perform appropriate optimizations."
5616 msgstr "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるために B<posix_fadvise>() を使うことができる。 これにより、カーネルが適切な最適化を実行することが可能になる。"
5619 #: build/C/man2/posix_fadvise.2:63
5620 msgid "The I<advice> applies to a (not necessarily existent) region starting at I<offset> and extending for I<len> bytes (or until the end of the file if I<len> is 0) within the file referred to by I<fd>. The I<advice> is not binding; it merely constitutes an expectation on behalf of the application."
5622 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バイ\n"
5623 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
5624 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリケー\n"
5625 "ションのために可能性を構成するだけである。"
5628 #: build/C/man2/posix_fadvise.2:65
5629 msgid "Permissible values for I<advice> include:"
5630 msgstr "I<advice> に許される値には、以下のものが含まれる:"
5633 #: build/C/man2/posix_fadvise.2:65
5635 msgid "B<POSIX_FADV_NORMAL>"
5636 msgstr "B<POSIX_FADV_NORMAL>"
5639 #: build/C/man2/posix_fadvise.2:71
5640 msgid "Indicates that the application has no advice to give about its access pattern for the specified data. If no advice is given for an open file, this is the default assumption."
5641 msgstr "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場合、 これがデフォルトで仮定される。"
5644 #: build/C/man2/posix_fadvise.2:71
5646 msgid "B<POSIX_FADV_SEQUENTIAL>"
5647 msgstr "B<POSIX_FADV_SEQUENTIAL>"
5650 #: build/C/man2/posix_fadvise.2:75
5651 msgid "The application expects to access the specified data sequentially (with lower offsets read before higher ones)."
5652 msgstr "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に小さなオフセットのデータを読むように) アクセスされることを期待する。"
5655 #: build/C/man2/posix_fadvise.2:75
5657 msgid "B<POSIX_FADV_RANDOM>"
5658 msgstr "B<POSIX_FADV_RANDOM>"
5661 #: build/C/man2/posix_fadvise.2:78
5662 msgid "The specified data will be accessed in random order."
5663 msgstr "指定されたデータがランダムな順番でアクセスされる。"
5666 #: build/C/man2/posix_fadvise.2:78
5668 msgid "B<POSIX_FADV_NOREUSE>"
5669 msgstr "B<POSIX_FADV_NOREUSE>"
5672 #: build/C/man2/posix_fadvise.2:81
5673 msgid "The specified data will be accessed only once."
5674 msgstr "指定されたデータは 1 度しかアクセスされない。"
5677 #: build/C/man2/posix_fadvise.2:81
5679 msgid "B<POSIX_FADV_WILLNEED>"
5680 msgstr "B<POSIX_FADV_WILLNEED>"
5683 #: build/C/man2/posix_fadvise.2:84
5684 msgid "The specified data will be accessed in the near future."
5685 msgstr "指定されたデータは近い将来アクセスされる。"
5688 #: build/C/man2/posix_fadvise.2:84
5690 msgid "B<POSIX_FADV_DONTNEED>"
5691 msgstr "B<POSIX_FADV_DONTNEED>"
5694 #: build/C/man2/posix_fadvise.2:87
5695 msgid "The specified data will not be accessed in the near future."
5696 msgstr "指定されたデータは近い将来アクセスされない。"
5699 #: build/C/man2/posix_fadvise.2:90
5700 msgid "On success, zero is returned. On error, an error number is returned."
5701 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
5704 #: build/C/man2/posix_fadvise.2:94
5705 msgid "The I<fd> argument was not a valid file descriptor."
5706 msgstr "I<fd> 引き数が有効なファイルディスクリプターでない。"
5709 #: build/C/man2/posix_fadvise.2:97
5710 msgid "An invalid value was specified for I<advice>."
5711 msgstr "無効な値が I<advice> に指定された。"
5713 #. commit 87ba81dba431232548ce29d5d224115d0c2355ac
5715 #: build/C/man2/posix_fadvise.2:107
5716 msgid "The specified file descriptor refers to a pipe or FIFO. (B<ESPIPE> is the error specified by POSIX, but before kernel version 2.16, Linux returned B<EINVAL> in this case.)"
5717 msgstr "指定されたファイルディスクリプターがパイプまたは FIFO を参照している (B<ESPIPE> は POSIX で規定されているエラーだが、 バージョン 2.16 より前のカーネルでは、 この場合に B<EINVAL> を返していた。)"
5719 #. of fadvise64_64()
5721 #: build/C/man2/posix_fadvise.2:115
5722 msgid "Kernel support first appeared in Linux 2.5.60; the underlying system call is called B<fadvise64>(). Library support has been provided since glibc version 2.2, via the wrapper function B<posix_fadvise>()."
5724 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
5725 "対応するシステムコールは B<fadvise64>() という名前である。\n"
5726 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
5727 "ラッパー関数は B<posix_fadvise>() という名前である。"
5729 #. commit d3ac21cacc24790eb45d735769f35753f5b56ceb
5731 #: build/C/man2/posix_fadvise.2:122
5732 msgid "Since Linux 3.18, support for the underlying system call is optional, depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
5733 msgstr "Linux 3.18 以降では、対応するシステムコールのサポートは任意となり、利用できるかはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされているかに依存する。"
5736 #: build/C/man2/posix_fadvise.2:131
5737 msgid "POSIX.1-2001. Note that the type of the I<len> argument was changed from I<size_t> to I<off_t> in POSIX.1-2003 TC1."
5738 msgstr "POSIX.1-2001. I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から I<off_t> に変更された点に注意すること。"
5741 #: build/C/man2/posix_fadvise.2:137
5742 msgid "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and B<POSIX_FADV_RANDOM> disables file readahead entirely. These changes affect the entire file, not just the specified region (but other open file handles to the same file are unaffected)."
5743 msgstr "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズを 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更はファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じファイルに対する他のオープンファイルハンドルは影響を受けない)。"
5746 #: build/C/man2/posix_fadvise.2:144
5747 msgid "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region into the page cache. The amount of data read may be decreased by the kernel depending on virtual memory load. (A few megabytes will usually be fully satisfied, and more is rarely useful.)"
5748 msgstr "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多くてもめったに役に立たない)。"
5751 #: build/C/man2/posix_fadvise.2:148
5752 msgid "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as B<POSIX_FADV_WILLNEED>. This was probably a bug; since kernel 2.6.18, this flag is a no-op."
5753 msgstr "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、このフラグは何も行わない。"
5756 #: build/C/man2/posix_fadvise.2:156
5757 msgid "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the specified region. This is useful, for example, while streaming large files. A program may periodically request the kernel to free cached data that has already been used, so that more useful cached pages are not discarded instead."
5758 msgstr "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュされたページが、 代わりに破棄されることはない。"
5761 #: build/C/man2/posix_fadvise.2:164
5762 msgid "Requests to discard partial pages are ignored. It is preferable to preserve needed data than discard unneeded data. If the application requires that data be considered for discarding then I<offset> and I<len> must be page-aligned."
5763 msgstr "ページの一部分の破棄要求は無視される。 不要なデータを破棄するよりも必要なデータを保持する方がよい。 アプリケーションがデータを破棄した方がよいと思う場合は、 I<offset> と I<len> がページ境界に合っていなければならない。"
5766 #: build/C/man2/posix_fadvise.2:172
5767 msgid "Pages that have not yet been written out will be unaffected, so if the application wishes to guarantee that pages will be released, it should call B<fsync>(2) or B<fdatasync>(2) first."
5768 msgstr "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証されることをアプリケーションが望んでいるなら、 最初に B<fsync>(2) または B<fdatasync>(2) を呼ぶべきである。"
5771 #: build/C/man2/posix_fadvise.2:172
5773 msgid "Architecture-specific variants"
5774 msgstr "アーキテクチャ固有の派生バージョン"
5777 #: build/C/man2/posix_fadvise.2:189
5778 msgid "Some architectures require 64-bit arguments to be aligned in a suitable pair of registers (see B<syscall>(2) for further detail). On such architectures, the call signature of B<posix_fadvise>() shown in the SYNOPSIS would force a register to be wasted as padding between the I<fd> and I<offset> arguments. Therefore, these architectures define a version of the system call that orders the arguments suitably, but otherwise is otherwise exactly the same as B<posix_fadvise>()."
5779 msgstr "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」に書かれている B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステムコールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
5782 #: build/C/man2/posix_fadvise.2:191
5783 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
5784 msgstr "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
5787 #: build/C/man2/posix_fadvise.2:196
5790 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5791 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5793 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5794 "B< loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5797 #: build/C/man2/posix_fadvise.2:204
5798 msgid "These architecture-specific details are generally hidden from applications by the glibc B<posix_fadvise>() wrapper function, which invokes the appropriate architecture-specific system call."
5799 msgstr "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテクチャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切なアーキテクチャ固有のシステムコールが呼び出される。"
5802 #: build/C/man2/posix_fadvise.2:209
5803 msgid "In kernels before 2.6.6, if I<len> was specified as 0, then this was interpreted literally as \"zero bytes\", rather than as meaning \"all bytes through to the end of the file\"."
5804 msgstr "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終りまでの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されていた。"
5806 #. FIXME . Write a posix_fadvise(3) page.
5808 #: build/C/man2/posix_fadvise.2:215
5809 msgid "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), B<posix_madvise>(3)"
5811 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
5812 "B<posix_madvise>(3)"
5815 #: build/C/man3/posix_fallocate.3:25
5817 msgid "POSIX_FALLOCATE"
5818 msgstr "POSIX_FALLOCATE"
5821 #: build/C/man3/posix_fallocate.3:28
5822 msgid "posix_fallocate - allocate file space"
5823 msgstr "posix_fallocate - ファイルのスペースを確保する"
5826 #: build/C/man3/posix_fallocate.3:33
5828 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5829 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5832 #: build/C/man3/posix_fallocate.3:42
5833 msgid "B<posix_fallocate>():"
5834 msgstr "B<posix_fallocate>():"
5837 #: build/C/man3/posix_fallocate.3:61
5838 msgid "The function B<posix_fallocate>() ensures that disk space is allocated for the file referred to by the descriptor I<fd> for the bytes in the range starting at I<offset> and continuing for I<len> bytes. After a successful call to B<posix_fallocate>(), subsequent writes to bytes in the specified range are guaranteed not to fail because of lack of disk space."
5839 msgstr "関数 B<posix_fallocate>() は、ディスクリプター I<fd> で参照されるファイルに対して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>() の呼び出しが成功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で失敗しないことが保証される。"
5842 #: build/C/man3/posix_fallocate.3:66
5843 msgid "If the size of the file is less than I<offset>+I<len>, then the file is increased to this size; otherwise the file size is left unchanged."
5844 msgstr "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズになるように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
5847 #: build/C/man3/posix_fallocate.3:72
5848 msgid "B<posix_fallocate>() returns zero on success, or an error number on failure. Note that I<errno> is not set."
5849 msgstr "B<posix_fallocate>() は成功した場合、0 を返す。 失敗した場合、エラー番号を返す。 I<errno> が設定されない点に注意すること。"
5852 #: build/C/man3/posix_fallocate.3:81
5853 msgid "I<offset+len> exceeds the maximum file size."
5854 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
5857 #: build/C/man3/posix_fallocate.3:91
5858 msgid "I<fd> does not refer to a regular file."
5859 msgstr "I<fd> が通常のファイルとして参照されていない。"
5862 #: build/C/man3/posix_fallocate.3:100
5863 msgid "I<fd> refers to a pipe."
5864 msgstr "I<fd> がパイプを参照している。"
5867 #: build/C/man3/posix_fallocate.3:103
5868 msgid "B<posix_fallocate>() is available since glibc 2.1.94."
5869 msgstr "B<posix_fallocate>() は glibc 2.1.94 以降で利用可能である。"
5872 #: build/C/man3/posix_fallocate.3:108
5873 msgid "The B<posix_fallocate>() function is thread-safe."
5874 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
5877 #: build/C/man3/posix_fallocate.3:133
5878 msgid "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error if I<len> was 0, or I<offset> was less than 0. POSIX.1-2001 says that an implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, or I<offset> was less than 0, and I<may> give the error if I<len> equals zero."
5879 msgstr "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされている。"
5882 #: build/C/man3/posix_fallocate.3:138
5883 msgid "In the glibc implementation, B<posix_fallocate>() is implemented using B<fallocate>(2)."
5884 msgstr "glibc の実装では、 B<posix_fallocate>() は B<fallocate>() を使って実装されている。"
5887 #: build/C/man3/posix_fallocate.3:143
5888 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5889 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5892 #: build/C/man3/posix_memalign.3:29
5894 msgid "POSIX_MEMALIGN"
5895 msgstr "POSIX_MEMALIGN"
5898 #: build/C/man3/posix_memalign.3:29
5904 #: build/C/man3/posix_memalign.3:32
5905 msgid "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned memory"
5907 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
5911 #: build/C/man3/posix_memalign.3:35
5913 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
5914 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
5917 #: build/C/man3/posix_memalign.3:39
5920 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5921 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5922 "B<void *valloc(size_t >I<size>B<);>\n"
5924 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5925 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5926 "B<void *valloc(size_t >I<size>B<);>\n"
5929 #: build/C/man3/posix_memalign.3:44
5932 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5933 "B<void *pvalloc(size_t >I<size>B<);>\n"
5935 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5936 "B<void *pvalloc(size_t >I<size>B<);>\n"
5939 #: build/C/man3/posix_memalign.3:54
5940 msgid "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
5941 msgstr "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
5944 #: build/C/man3/posix_memalign.3:57
5945 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
5946 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
5949 #: build/C/man3/posix_memalign.3:59
5950 msgid "B<valloc>():"
5951 msgstr "B<valloc>():"
5954 #: build/C/man3/posix_memalign.3:62
5956 msgid "Since glibc 2.12:"
5957 msgstr "glibc 2.12 以降:"
5960 #: build/C/man3/posix_memalign.3:69
5964 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5965 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5966 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5969 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5970 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5971 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5974 #: build/C/man3/posix_memalign.3:71
5976 msgid "Before glibc 2.12:"
5977 msgstr "glibc 2.12 より前:"
5980 #: build/C/man3/posix_memalign.3:75
5981 msgid "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
5982 msgstr "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
5985 #: build/C/man3/posix_memalign.3:82
5986 msgid "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the declaration of B<valloc>(); no feature test macros are required.)"
5988 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
5989 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
5993 #: build/C/man3/posix_memalign.3:104
5994 msgid "The function B<posix_memalign>() allocates I<size> bytes and places the address of the allocated memory in I<*memptr>. The address of the allocated memory will be a multiple of I<alignment>, which must be a power of two and a multiple of I<sizeof(void\\ *)>. If I<size> is 0, then the value placed in I<*memptr> is either NULL, or a unique pointer value that can later be successfully passed to B<free>(3)."
5995 msgstr "関数 B<posix_memalign>() は、 I<size> バイトのメモリを割り当て、割り当てられたメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレスは I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で B<free>(3) に問題なく渡すことができる。"
5997 #. The behavior of memalign() for size==0 is as for posix_memalign()
5998 #. but no standards govern this.
6000 #: build/C/man3/posix_memalign.3:115
6001 msgid "The obsolete function B<memalign>() allocates I<size> bytes and returns a pointer to the allocated memory. The memory address will be a multiple of I<alignment>, which must be a power of two."
6003 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
6004 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
6005 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
6008 #: build/C/man3/posix_memalign.3:124
6009 msgid "The function B<aligned_alloc>() is the same as B<memalign>(), except for the added restriction that I<size> should be a multiple of I<alignment>."
6011 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が I<alignment>\n"
6012 "の倍数でなければならないという追加の制限がある点が異なる。"
6015 #: build/C/man3/posix_memalign.3:133
6016 msgid "The obsolete function B<valloc>() allocates I<size> bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the page size. It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
6017 msgstr "廃止された関数である B<valloc>() は I<size> バイトのメモリを割り当て、割り当てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価である。"
6020 #: build/C/man3/posix_memalign.3:140
6021 msgid "The obsolete function B<pvalloc>() is similar to B<valloc>(), but rounds the size of the allocation up to the next multiple of the system page size."
6023 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
6024 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
6027 #: build/C/man3/posix_memalign.3:142
6028 msgid "For all of these functions, the memory is not zeroed."
6029 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
6032 #: build/C/man3/posix_memalign.3:149
6033 msgid "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>() return a pointer to the allocated memory, or NULL if the request fails."
6035 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられた\n"
6036 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
6039 #: build/C/man3/posix_memalign.3:157
6040 msgid "B<posix_memalign>() returns zero on success, or one of the error values listed in the next section on failure. The value of I<errno> is indeterminate after a call to B<posix_memalign>()."
6041 msgstr "B<posix_memalign>() は成功した場合は 0 を返し、 失敗した場合は次のセクションに記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は I<errno> の値は不定である。"
6044 #: build/C/man3/posix_memalign.3:164
6045 msgid "The I<alignment> argument was not a power of two, or was not a multiple of I<sizeof(void\\ *)>."
6046 msgstr "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でなかった。"
6049 #: build/C/man3/posix_memalign.3:167
6050 msgid "There was insufficient memory to fulfill the allocation request."
6051 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
6054 #: build/C/man3/posix_memalign.3:174
6055 msgid "The functions B<memalign>(), B<valloc>(), and B<pvalloc>() have been available in all Linux libc libraries."
6057 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
6058 "すべての Linux libc ライブラリで使用可能である。"
6061 #: build/C/man3/posix_memalign.3:178
6062 msgid "The function B<aligned_alloc>() was added to glibc in version 2.16."
6063 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
6066 #: build/C/man3/posix_memalign.3:182
6067 msgid "The function B<posix_memalign>() is available since glibc 2.1.91."
6068 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
6071 #: build/C/man3/posix_memalign.3:189
6072 msgid "The function B<valloc>() appeared in 3.0BSD. It is documented as being obsolete in 4.3BSD, and as legacy in SUSv2. It does not appear in POSIX.1-2001."
6074 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されており、\n"
6075 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
6078 #: build/C/man3/posix_memalign.3:193
6079 msgid "The function B<pvalloc>() is a GNU extension."
6080 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
6083 #: build/C/man3/posix_memalign.3:197
6084 msgid "The function B<memalign>() appears in SunOS 4.1.3 but not in 4.4BSD."
6085 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
6088 #: build/C/man3/posix_memalign.3:201
6089 msgid "The function B<posix_memalign>() comes from POSIX.1d."
6090 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
6093 #: build/C/man3/posix_memalign.3:206
6094 msgid "The function B<aligned_alloc>() is specified in the C11 standard."
6095 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
6098 #: build/C/man3/posix_memalign.3:206
6104 #: build/C/man3/posix_memalign.3:210
6105 msgid "Everybody agrees that B<posix_memalign>() is declared in I<E<lt>stdlib.hE<gt>>."
6106 msgstr "B<posix_memalign>() の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆の意見が一致している。"
6109 #: build/C/man3/posix_memalign.3:214
6110 msgid "On some systems B<memalign>() is declared in I<E<lt>stdlib.hE<gt>> instead of I<E<lt>malloc.hE<gt>>."
6111 msgstr "いくつかのシステムでは、 B<memalign>() は I<E<lt>malloc.hE<gt>> ではなく I<E<lt>stdlib.hE<gt>> で宣言されている。"
6114 #: build/C/man3/posix_memalign.3:221
6115 msgid "According to SUSv2, B<valloc>() is declared in I<E<lt>stdlib.hE<gt>>. Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see above)."
6117 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 libc4,5\n"
6118 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
6119 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
6122 #: build/C/man3/posix_memalign.3:230
6123 msgid "On many systems there are alignment restrictions, for example, on buffers used for direct block device I/O. POSIX specifies the I<pathconf(path,_PC_REC_XFER_ALIGN)> call that tells what alignment is needed. Now one can use B<posix_memalign>() to satisfy this requirement."
6124 msgstr "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイスに対するダイレクト I/O に使用するバッファには アラインメントに関する制限がある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>() を使うと、この必要条件を満たすことができる。"
6127 #: build/C/man3/posix_memalign.3:239
6128 msgid "B<posix_memalign>() verifies that I<alignment> matches the requirements detailed above. B<memalign>() may not check that the I<alignment> argument is correct."
6130 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
6131 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
6134 #. Other systems allow passing the result of
6141 #: build/C/man3/posix_memalign.3:267
6142 msgid "POSIX requires that memory obtained from B<posix_memalign>() can be freed using B<free>(3). Some systems provide no way to reclaim memory allocated with B<memalign>() or B<valloc>() (because one can pass to B<free>(3) only a pointer obtained from B<malloc>(3), while, for example, B<memalign>() would call B<malloc>(3) and then align the obtained value). The glibc implementation allows memory obtained from any of these functions to be reclaimed with B<free>(3)."
6144 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
6145 "使って解放することができる必要がある。 いくつかのシステムでは\n"
6146 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
6147 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
6148 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
6149 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
6150 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
6151 "B<free>(3) で再利用することができる。"
6154 #: build/C/man3/posix_memalign.3:272
6155 msgid "The glibc B<malloc>(3) always returns 8-byte aligned memory addresses, so these functions are needed only if you require larger alignment values."
6157 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
6158 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメント\n"
6162 #: build/C/man3/posix_memalign.3:277
6163 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6164 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6167 #: build/C/man2/readahead.2:28
6173 #: build/C/man2/readahead.2:28
6179 #: build/C/man2/readahead.2:31
6180 msgid "readahead - initiate file readahead into page cache"
6181 msgstr "readahead - 前もってファイルをページキャッシュに読み込む"
6184 #: build/C/man2/readahead.2:37
6186 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6187 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6190 #: build/C/man2/readahead.2:44
6191 msgid "B<readahead>() initiates readahead on a file so that subsequent reads from that file will be satisfied from the cache, and not block on disk I/O (assuming the readahead was initiated early enough and that other activity on the system did not in the meantime flush pages from the cache)."
6192 msgstr "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みがキャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせるのは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュからページがフラッシュされない場合である)。"
6195 #: build/C/man2/readahead.2:66
6196 msgid "The I<fd> argument is a file descriptor identifying the file which is to be read. The I<offset> argument specifies the starting point from which data is to be read and I<count> specifies the number of bytes to be read. I/O is performed in whole pages, so that I<offset> is effectively rounded down to a page boundary and bytes are read up to the next page boundary greater than or equal to I<(offset+count)>. B<readahead>() does not read beyond the end of the file. The current file offset of the open file referred to by I<fd> is left unchanged."
6197 msgstr "I<fd> 引き数は読み込みを行うファイルを識別するファイルディスクリプターである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>() はファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変更されない。"
6200 #: build/C/man2/readahead.2:72
6201 msgid "On success, B<readahead>() returns 0; on failure, -1 is returned, with I<errno> set to indicate the cause of the error."
6202 msgstr "B<readahead>() は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
6205 #: build/C/man2/readahead.2:77
6206 msgid "I<fd> is not a valid file descriptor or is not open for reading."
6207 msgstr "I<fd> が有効なファイルディスクリプターでない、または 読み込み用にオープンされていない。"
6210 #: build/C/man2/readahead.2:83
6211 msgid "I<fd> does not refer to a file type to which B<readahead>() can be applied."
6212 msgstr "I<fd> が参照しているファイルが、 B<readahead>() を行うことができないタイプのファイルであった。"
6215 #: build/C/man2/readahead.2:88
6216 msgid "The B<readahead>() system call appeared in Linux 2.4.13; glibc support has been provided since version 2.3."
6217 msgstr "B<readahead>() システムコールは Linux 2.4.13 で登場した。 glibc でのサポートは glibc バージョン 2.3 以降で行われている。"
6220 #: build/C/man2/readahead.2:93
6221 msgid "The B<readahead>() system call is Linux-specific, and its use should be avoided in portable applications."
6222 msgstr "B<readahead>() システムコールは Linux 固有であり、移植を考慮したプログラムでは 使用を避けるべきである。"
6225 #: build/C/man2/readahead.2:98
6226 msgid "On some 32-bit architectures, the calling signature for this system call differs, for the reasons described in B<syscall>(2)."
6227 msgstr "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネチャーが違っている。 理由は B<syscall>(2) で説明されている。"
6230 #: build/C/man2/readahead.2:107
6231 msgid "B<readahead>() attempts to schedule the reads in the background and return immediately. However, it may block while it reads the filesystem metadata needed to locate the requested blocks. This occurs frequently with ext[234] on large files using indirect blocks instead of extents, giving the appearance that the call blocks until the requested data has been read."
6232 msgstr "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファイルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているように見える。"
6235 #: build/C/man2/readahead.2:113
6236 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6237 msgstr "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6240 #: build/C/man2/remap_file_pages.2:28
6242 msgid "REMAP_FILE_PAGES"
6243 msgstr "REMAP_FILE_PAGES"
6246 #: build/C/man2/remap_file_pages.2:31
6247 msgid "remap_file_pages - create a nonlinear file mapping"
6248 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
6251 #: build/C/man2/remap_file_pages.2:35
6254 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
6255 "B<#include E<lt>sys/mman.hE<gt>>\n"
6257 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
6258 "B<#include E<lt>sys/mman.hE<gt>>\n"
6261 #: build/C/man2/remap_file_pages.2:38
6264 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6265 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
6267 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6268 "B< size_t >I<pgoff>B<, int >I<flags>B<);>\n"
6270 #. commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
6271 #. http://lwn.net/Articles/597632/
6273 #: build/C/man2/remap_file_pages.2:47
6274 msgid "B<Note>: this system call is (since Linux 3.16) deprecated and will eventually be replaced by a slower in-kernel emulation. Those few applications that use this system call should consider migrating to alternatives."
6275 msgstr "B<注意>: このシステムコールは (Linux 3.16 以降で) 非推奨となっており、 やがてより低速なカーネル内でのエミュレーションに置き換えられる予定である。 このシステムコールを使用しているアプリケーションは少ないが、こうしたアプリケーションは代替手段への移行を検討すべきである。"
6278 #: build/C/man2/remap_file_pages.2:59
6279 msgid "The B<remap_file_pages>() system call is used to create a nonlinear mapping, that is, a mapping in which the pages of the file are mapped into a nonsequential order in memory. The advantage of using B<remap_file_pages>() over using repeated calls to B<mmap>(2) is that the former approach does not require the kernel to create additional VMA (Virtual Memory Area) data structures."
6280 msgstr "B<remap_file_pages>() システムコールは非線形なマッピング、 つまりファイルのページがメモリ上で連続しない順番でマップされる マッピングを作成するために使われる。 B<remap_file_pages>() を使う方が B<mmap>(2) を繰り返して使うより優れている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領域) データ構造体を追加で作成する必要がないことである。"
6283 #: build/C/man2/remap_file_pages.2:61
6284 msgid "To create a nonlinear mapping we perform the following steps:"
6285 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
6288 #: build/C/man2/remap_file_pages.2:61 build/C/man2/memfd_create.2:219
6294 #: build/C/man2/remap_file_pages.2:69
6295 msgid "Use B<mmap>(2) to create a mapping (which is initially linear). This mapping must be created with the B<MAP_SHARED> flag."
6296 msgstr "B<mmap>(2) を使い、マッピングを作成する (このマッピングは最初は線形である)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならない。"
6299 #: build/C/man2/remap_file_pages.2:69 build/C/man2/memfd_create.2:225
6305 #: build/C/man2/remap_file_pages.2:77
6306 msgid "Use one or more calls to B<remap_file_pages>() to rearrange the correspondence between the pages of the mapping and the pages of the file. It is possible to map the same page of a file into multiple locations within the mapped region."
6307 msgstr "B<remap_file_pages>() を 1 回以上呼び出して、 マッピングのページとファイルのページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場所に マップすることが可能である。"
6310 #: build/C/man2/remap_file_pages.2:88
6311 msgid "The I<pgoff> and I<size> arguments specify the region of the file that is to be relocated within the mapping: I<pgoff> is a file offset in units of the system page size; I<size> is the length of the region in bytes."
6312 msgstr "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズである。 I<size> は領域の長さであり、単位はバイトである。"
6315 #: build/C/man2/remap_file_pages.2:106
6316 msgid "The I<addr> argument serves two purposes. First, it identifies the mapping whose pages we want to rearrange. Thus, I<addr> must be an address that falls within a region previously mapped by a call to B<mmap>(2). Second, I<addr> specifies the address at which the file pages identified by I<pgoff> and I<size> will be placed."
6317 msgstr "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>(2) の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアドレスを、 I<addr> によって指定することである。"
6319 #. This rounding is weird, and not consistent with the treatment of
6320 #. the analogous arguments for munmap()/mprotect() and for mlock().
6323 #: build/C/man2/remap_file_pages.2:120
6324 msgid "The values specified in I<addr> and I<size> should be multiples of the system page size. If they are not, then the kernel rounds I<both> values I<down> to the nearest multiple of the page size."
6325 msgstr "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきである。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ「切り下げる」。"
6328 #: build/C/man2/remap_file_pages.2:124
6329 msgid "The I<prot> argument must be specified as 0."
6330 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
6333 #: build/C/man2/remap_file_pages.2:132
6334 msgid "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags other than B<MAP_NONBLOCK> are ignored."
6335 msgstr "I<flags> 引き数は B<mmap>(2) のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外の全てのフラグは無視される。"
6338 #: build/C/man2/remap_file_pages.2:139
6339 msgid "On success, B<remap_file_pages>() returns 0. On error, -1 is returned, and I<errno> is set appropriately."
6340 msgstr "成功した場合、 B<remap_file_pages>() は 0 を返す。 エラーの場合、-1 が返され、 I<errno> が適切に設定される。"
6343 #: build/C/man2/remap_file_pages.2:147
6344 msgid "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> flag."
6345 msgstr "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照していない。"
6347 #. And possibly others from vma->vm_ops->populate()
6349 #: build/C/man2/remap_file_pages.2:156
6350 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
6351 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
6354 #: build/C/man2/remap_file_pages.2:161
6355 msgid "The B<remap_file_pages>() system call appeared in Linux 2.5.46; glibc support was added in version 2.3.3."
6356 msgstr "B<remap_file_pages>() システムコールは Linux 2.5.46 で登場した。 glibc でのサポートは glibc バージョン 2.3.3 で追加された。"
6359 #: build/C/man2/remap_file_pages.2:165
6360 msgid "The B<remap_file_pages>() system call is Linux-specific."
6361 msgstr "B<remap_file_pages>() システムコールは Linux 固有のものである。"
6363 #. commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
6365 #: build/C/man2/remap_file_pages.2:176
6366 msgid "Since Linux 2.6.23, B<remap_file_pages>() creates non-linear mappings only on in-memory file systems such as tmpfs, hugetlbfs or ramfs. On filesystems with a backing store, B<remap_file_pages>() is not much more efficient than using B<mmap>(2) to adjust which parts of the file are mapped to which addresses."
6367 msgstr "Linux 2.6.23 以降、 B<remap_file_pages>() は tmpfs, hugetlbfs, ramfs などのインメモリファイルシステム上にのみ非線形マッピングを作成する。 裏にデータストアを持つファイルシステム上では、 B<remap_file_pages>() は、 ファイルのどの部分がどのアドレスにマッピングされているかの調整が、 B<mmap>(2) を使った場合ほど効率的ではない。"
6370 #: build/C/man2/remap_file_pages.2:183
6371 msgid "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2)"
6372 msgstr "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2)"
6375 #: build/C/man3/shm_open.3:26
6381 #: build/C/man3/shm_open.3:29
6382 msgid "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
6383 msgstr "shm_open, shm_unlink - POSIX 共有メモリオブジェクトの作成/オープン/削除を行う"
6386 #: build/C/man3/shm_open.3:33
6387 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
6388 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
6391 #: build/C/man3/shm_open.3:35
6392 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
6393 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
6396 #: build/C/man3/shm_open.3:37
6397 msgid "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
6398 msgstr "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
6401 #: build/C/man3/shm_open.3:39
6402 msgid "B<int shm_unlink(const char *>I<name>B<);>"
6403 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
6406 #: build/C/man3/shm_open.3:41
6407 msgid "Link with I<-lrt>."
6408 msgstr "I<-lrt> でリンクする。"
6411 #: build/C/man3/shm_open.3:53
6412 msgid "B<shm_open>() creates and opens a new, or opens an existing, POSIX shared memory object. A POSIX shared memory object is in effect a handle which can be used by unrelated processes to B<mmap>(2) the same region of shared memory. The B<shm_unlink>() function performs the converse operation, removing an object previously created by B<shm_open>()."
6413 msgstr "B<shm_open>() は、POSIX 共有メモリオブジェクトを新規に作成/オープンしたり、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリオブジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>(2) するために使用することができる手段である。 B<shm_unlink>() は、逆の操作、つまり以前に B<shm_open>() で作成されたオブジェクトの削除を行う。"
6415 #. glibc allows the initial slash to be omitted, and makes
6416 #. multiple initial slashes equivalent to a single slash.
6417 #. This differs from the implementation of POSIX message queues.
6418 #. glibc allows subdirectory components in the name, in which
6419 #. case the subdirectory must exist under /dev/shm, and allow the
6420 #. required permissions if a user wants to create a shared memory
6421 #. object in that subdirectory.
6423 #: build/C/man3/shm_open.3:74
6424 msgid "The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> specifies the shared memory object to be created or opened. For portable use, a shared memory object should be identified by a name of the form I</somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., 255) characters consisting of an initial slash, followed by one or more characters, none of which are slashes."
6425 msgstr "B<shm_open>() の動作は B<open>(2) とよく似ている。 I<name> で作成したりオープンしたりする共有メモリオブジェクトを指定する。 移植性を持たせるためには、共有メモリオブジェクトは I</somename> という形式の名前で識別し、 その名前は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッシュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
6428 #: build/C/man3/shm_open.3:81
6429 msgid "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> or B<O_RDWR> and any of the other flags listed here:"
6430 msgstr "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に述べる他のフラグの論理和をとったもの を指定する。"
6433 #: build/C/man3/shm_open.3:81
6436 msgstr "B<O_RDONLY>"
6439 #: build/C/man3/shm_open.3:89
6440 msgid "Open the object for read access. A shared memory object opened in this way can be B<mmap>(2)ed only for read (B<PROT_READ>) access."
6441 msgstr "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープンされた共有メモリオブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ B<mmap>(2) することができる。"
6444 #: build/C/man3/shm_open.3:89
6450 #: build/C/man3/shm_open.3:92
6451 msgid "Open the object for read-write access."
6452 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
6455 #: build/C/man3/shm_open.3:92
6460 #. In truth it is actually the filesystem IDs on Linux, but these
6461 #. are nearly always the same as the effective IDs. (MTK, Jul 05)
6463 #: build/C/man3/shm_open.3:112
6464 msgid "Create the shared memory object if it does not exist. The user and group ownership of the object are taken from the corresponding effective IDs of the calling process, and the object's permission bits are set according to the low-order 9 bits of I<mode>, except that those bits set in the process file mode creation mask (see B<umask>(2)) are cleared for the new object. A set of macro constants which can be used to define I<mode> is listed in B<open>(2). (Symbolic definitions of these constants can be obtained by including I<E<lt>sys/stat.hE<gt>>.)"
6465 msgstr "存在しない場合、共有メモリオブジェクトを作成する。 オブジェクトのユーザとグループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェクトの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイルモード作成マスク (B<umask>(2) 参照) に設定されている値は、新規オブジェクトに関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は B<open>(2) に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat.hE<gt>> のインクルードにより得られる)。"
6468 #: build/C/man3/shm_open.3:118
6469 msgid "A new shared memory object initially has zero length\\(emthe size of the object can be set using B<ftruncate>(2). The newly allocated bytes of a shared memory object are automatically initialized to 0."
6470 msgstr "新規に作成された共有メモリオブジェクトは長さ 0 で初期化される。 オブジェクトの大きさは B<ftruncate>(2) を使って設定できる。 共有メモリオブジェクトとして新規に確保されたバイトは自動的に 0 に初期化される。"
6473 #: build/C/man3/shm_open.3:118
6479 #: build/C/man3/shm_open.3:127
6480 msgid "If B<O_CREAT> was also specified, and a shared memory object with the given I<name> already exists, return an error. The check for the existence of the object, and its creation if it does not exist, are performed atomically."
6481 msgstr "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリオブジェクトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しなかった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed atomically)。"
6484 #: build/C/man3/shm_open.3:127
6490 #: build/C/man3/shm_open.3:130
6491 msgid "If the shared memory object already exists, truncate it to zero bytes."
6492 msgstr "共有メモリオブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに切り詰める。"
6495 #: build/C/man3/shm_open.3:133
6496 msgid "Definitions of these flag values can be obtained by including I<E<lt>fcntl.hE<gt>>."
6497 msgstr "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
6500 #: build/C/man3/shm_open.3:144
6501 msgid "On successful completion B<shm_open>() returns a new file descriptor referring to the shared memory object. This file descriptor is guaranteed to be the lowest-numbered file descriptor not previously opened within the process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file descriptor."
6502 msgstr "成功して完了した場合、 B<shm_open>() は共有メモリオブジェクトを参照する新しいファイルディスクリプターを返す。 このファイルディスクリプターは、そのプロセス内で過去にオープンされていない ファイルディスクリプターの中で最も小さな数になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2) を参照) が、このファイルディスクリプターに設定される。"
6505 #: build/C/man3/shm_open.3:153
6506 msgid "The file descriptor is normally used in subsequent calls to B<ftruncate>(2) (for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) the file descriptor may be closed without affecting the memory mapping."
6507 msgstr "通常、これらのファイルディスクリプターは、この後続けて実行される B<ftruncate>(2) (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2) の呼び出しに使用される。 B<mmap>(2) を呼び出した後は、ファイルディスクリプターをクローズしてもよく、 クローズしてもメモリマッピングに影響を与えることはない。"
6510 #: build/C/man3/shm_open.3:171
6511 msgid "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a shared memory object name, and, once all processes have unmapped the object, de-allocates and destroys the contents of the associated memory region. After a successful B<shm_unlink>(), attempts to B<shm_open>() an object with the same I<name> will fail (unless B<O_CREAT> was specified, in which case a new, distinct object is created)."
6512 msgstr "B<shm_unlink>() の動作は B<unlink>(2) とよく似ている: 共有メモリオブジェクト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 B<shm_unlink>() が成功した後で、同じ I<name> を持つオブジェクトに対して B<shm_open>() を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 (B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
6515 #: build/C/man3/shm_open.3:180
6516 msgid "On success, B<shm_open>() returns a nonnegative file descriptor. On failure, B<shm_open>() returns -1. B<shm_unlink>() returns 0 on success, or -1 on error."
6517 msgstr "成功した場合、 B<shm_open>() は非負のファイルディスクリプターを返す。 失敗した場合、 B<shm_open>() は -1 を返す。 B<shm_unlink>() は、成功した場合 0 を、エラーが起こった場合 -1 を返す。"
6520 #: build/C/man3/shm_open.3:187
6521 msgid "On failure, I<errno> is set to indicate the cause of the error. Values which may appear in I<errno> include the following:"
6522 msgstr "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定される値は以下の通りである:"
6525 #: build/C/man3/shm_open.3:192
6526 msgid "Permission to B<shm_unlink>() the shared memory object was denied."
6527 msgstr "共有メモリオブジェクトを B<shm_unlink>() する権限がなかった。"
6530 #: build/C/man3/shm_open.3:202
6531 msgid "Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or B<O_TRUNC> was specified and the caller does not have write permission on the object."
6532 msgstr "指定された I<mode> で I<name> を B<shm_open>() する権限がなかった。もしくは、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込み権限が なかった。"
6535 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
6541 #: build/C/man3/shm_open.3:213
6542 msgid "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the shared memory object specified by I<name> already exists."
6543 msgstr "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>() に指定されたが、 I<name> で指定された共有メモリオブジェクトが既に存在した。"
6546 #: build/C/man3/shm_open.3:220
6547 msgid "The I<name> argument to B<shm_open>() was invalid."
6548 msgstr "B<shm_open>() に与えられた I<name> 引き数が不正であった。"
6551 #: build/C/man3/shm_open.3:220 build/C/man2/memfd_create.2:146
6557 #: build/C/man3/shm_open.3:223
6558 msgid "The process already has the maximum number of files open."
6559 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
6562 #: build/C/man3/shm_open.3:223
6564 msgid "B<ENAMETOOLONG>"
6565 msgstr "B<ENAMETOOLONG>"
6568 #: build/C/man3/shm_open.3:229
6569 msgid "The length of I<name> exceeds B<PATH_MAX>."
6570 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
6573 #: build/C/man3/shm_open.3:233
6574 msgid "The limit on the total number of files open on the system has been reached."
6575 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
6578 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
6579 #: build/C/man2/shmget.2:225
6585 #: build/C/man3/shm_open.3:242
6586 msgid "An attempt was made to B<shm_open>() a I<name> that did not exist, and B<O_CREAT> was not specified."
6587 msgstr "存在していない I<name> のオブジェクトを B<shm_open>() しようとしたが、 B<O_CREAT> が指定されていなかった。"
6590 #: build/C/man3/shm_open.3:249
6591 msgid "An attempt was to made to B<shm_unlink>() a I<name> that does not exist."
6592 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>() しようとした。"
6595 #: build/C/man3/shm_open.3:251
6596 msgid "These functions are provided in glibc 2.2 and later."
6597 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
6600 #: build/C/man3/shm_open.3:257
6601 msgid "POSIX.1-2001 says that the group ownership of a newly created shared memory object is set to either the calling process's effective group ID or \"a system default group ID\"."
6602 msgstr "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ ID」 のどちらかに設定される、と書かれている。"
6605 #: build/C/man3/shm_open.3:266
6606 msgid "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> unspecified. On Linux, this will successfully truncate an existing shared memory object\\(emthis may not be so on other UNIX systems."
6607 msgstr "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にしている。Linux では、 既存の共有メモリオブジェクトに対する切り詰め (truncate) は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
6610 #: build/C/man3/shm_open.3:271
6611 msgid "The POSIX shared memory object implementation on Linux 2.4 makes use of a dedicated filesystem, which is normally mounted under I</dev/shm>."
6612 msgstr "Linux 2.4 における POSIX 共有メモリオブジェクトの実装は 専用のファイルシステムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
6615 #: build/C/man3/shm_open.3:283
6616 msgid "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6617 msgstr "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6620 #: build/C/man7/shm_overview.7:27
6622 msgid "SHM_OVERVIEW"
6623 msgstr "SHM_OVERVIEW"
6626 #: build/C/man7/shm_overview.7:27
6632 #: build/C/man7/shm_overview.7:30
6633 msgid "shm_overview - overview of POSIX shared memory"
6634 msgstr "shm_overview - POSIX 共有メモリの概要"
6637 #: build/C/man7/shm_overview.7:33
6638 msgid "The POSIX shared memory API allows processes to communicate information by sharing a region of memory."
6639 msgstr "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で情報をやり取りすることができる。"
6642 #: build/C/man7/shm_overview.7:35
6643 msgid "The interfaces employed in the API are:"
6644 msgstr "この API では以下のインターフェースが採用されている。"
6647 #: build/C/man7/shm_overview.7:35
6649 msgid "B<shm_open>(3)"
6650 msgstr "B<shm_open>(3)"
6653 #: build/C/man7/shm_overview.7:42
6654 msgid "Create and open a new object, or open an existing object. This is analogous to B<open>(2). The call returns a file descriptor for use by the other interfaces listed below."
6655 msgstr "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープンする。これは B<open>(2) と同じである。下記にある他のインターフェースで使用する ファイルディスクリプターを返す。"
6658 #: build/C/man7/shm_overview.7:42
6660 msgid "B<ftruncate>(2)"
6661 msgstr "B<ftruncate>(2)"
6664 #: build/C/man7/shm_overview.7:46
6665 msgid "Set the size of the shared memory object. (A newly created shared memory object has a length of zero.)"
6666 msgstr "共有メモリオブジェクトの大きさを設定する。"
6669 #: build/C/man7/shm_overview.7:50
6670 msgid "Map the shared memory object into the virtual address space of the calling process."
6671 msgstr "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
6674 #: build/C/man7/shm_overview.7:50
6676 msgid "B<munmap>(2)"
6677 msgstr "B<munmap>(2)"
6680 #: build/C/man7/shm_overview.7:54
6681 msgid "Unmap the shared memory object from the virtual address space of the calling process."
6682 msgstr "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップする。"
6685 #: build/C/man7/shm_overview.7:54
6687 msgid "B<shm_unlink>(3)"
6688 msgstr "B<shm_unlink>(3)"
6691 #: build/C/man7/shm_overview.7:57
6692 msgid "Remove a shared memory object name."
6693 msgstr "共有メモリオブジェクト名を削除する。"
6696 #: build/C/man7/shm_overview.7:57
6699 msgstr "B<close>(2)"
6702 #: build/C/man7/shm_overview.7:62
6703 msgid "Close the file descriptor allocated by B<shm_open>(3) when it is no longer needed."
6704 msgstr "B<shm_open>(3) で割り当てられたファイルディスクリプターが不要になった際に、 そのファイルディスクリプターをクローズする。"
6707 #: build/C/man7/shm_overview.7:62
6710 msgstr "B<fstat>(2)"
6713 #: build/C/man7/shm_overview.7:76
6714 msgid "Obtain a I<stat> structure that describes the shared memory object. Among the information returned by this call are the object's size (I<st_size>), permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
6715 msgstr "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>) がある。"
6718 #: build/C/man7/shm_overview.7:76
6720 msgid "B<fchown>(2)"
6721 msgstr "B<fchown>(2)"
6724 #: build/C/man7/shm_overview.7:79
6725 msgid "To change the ownership of a shared memory object."
6726 msgstr "共有メモリオブジェクトの所有権を変更する。"
6729 #: build/C/man7/shm_overview.7:79
6731 msgid "B<fchmod>(2)"
6732 msgstr "B<fchmod>(2)"
6735 #: build/C/man7/shm_overview.7:82
6736 msgid "To change the permissions of a shared memory object."
6737 msgstr "共有メモリオブジェクトの許可属性を変更する。"
6740 #: build/C/man7/shm_overview.7:82
6746 #: build/C/man7/shm_overview.7:84
6747 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
6748 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
6751 #: build/C/man7/shm_overview.7:84
6757 #: build/C/man7/shm_overview.7:89
6758 msgid "POSIX shared memory objects have kernel persistence: a shared memory object will exist until the system is shut down, or until all processes have unmapped the object and it has been deleted with B<shm_unlink>(3)"
6759 msgstr "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクトは、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアンマップし、 B<shm_unlink>(3) で削除されるまで、存在し続ける。"
6762 #: build/C/man7/shm_overview.7:89
6768 #: build/C/man7/shm_overview.7:94
6769 msgid "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> to link against the real-time library, I<librt>."
6770 msgstr "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアルタイムライブラリ I<librt> とリンクしなければならない。"
6773 #: build/C/man7/shm_overview.7:94
6775 msgid "Accessing shared memory objects via the filesystem"
6776 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
6779 #: build/C/man7/shm_overview.7:101
6780 msgid "On Linux, shared memory objects are created in a (I<tmpfs>) virtual filesystem, normally mounted under I</dev/shm>. Since kernel 2.6.19, Linux supports the use of access control lists (ACLs) to control the permissions of objects in the virtual filesystem."
6781 msgstr "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想ファイルシステム (I<tmpfs>) 内に作成される。 カーネル 2.6.19 以降の Linux では、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リスト (ACL; access control lists) を使うことができる。"
6784 #: build/C/man7/shm_overview.7:106
6785 msgid "Typically, processes must synchronize their access to a shared memory object, using, for example, POSIX semaphores."
6786 msgstr "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを使ってプロセス間で同期をとらなければならない。"
6789 #: build/C/man7/shm_overview.7:114
6790 msgid "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared memory API. POSIX shared memory provides a simpler, and better designed interface; on the other hand POSIX shared memory is somewhat less widely available (especially on older systems) than System V shared memory."
6791 msgstr "System V 共有メモリ (B<shmget>(2), B<shmop>(2) など) は古い共有メモリ API である。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供している。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できるシステムが少ない (特に、古いシステムでは少ない)。"
6794 #: build/C/man7/shm_overview.7:127
6795 msgid "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), B<shm_unlink>(3), B<sem_overview>(7)"
6796 msgstr "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), B<shm_unlink>(3), B<sem_overview>(7)"
6799 #: build/C/man2/shmctl.2:45
6805 #: build/C/man2/shmctl.2:45
6811 #: build/C/man2/shmctl.2:48
6812 msgid "shmctl - System V shared memory control"
6813 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
6816 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
6817 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
6818 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
6821 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
6822 msgid "B<#include E<lt>sys/shm.hE<gt>>"
6823 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
6826 #: build/C/man2/shmctl.2:55
6827 msgid "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
6828 msgstr "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
6831 #: build/C/man2/shmctl.2:62
6832 msgid "B<shmctl>() performs the control operation specified by I<cmd> on the System\\ V shared memory segment whose identifier is given in I<shmid>."
6833 msgstr "B<shmctl>() は、識別子が I<shmid> の System\\ V 共有メモリセグメントに対して I<cmd> で指示した制御命令を実行する。"
6836 #: build/C/man2/shmctl.2:67
6837 msgid "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in I<E<lt>sys/shm.hE<gt>> as follows:"
6838 msgstr "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
6841 #: build/C/man2/shmctl.2:81
6844 "struct shmid_ds {\n"
6845 " struct ipc_perm shm_perm; /* Ownership and permissions */\n"
6846 " size_t shm_segsz; /* Size of segment (bytes) */\n"
6847 " time_t shm_atime; /* Last attach time */\n"
6848 " time_t shm_dtime; /* Last detach time */\n"
6849 " time_t shm_ctime; /* Last change time */\n"
6850 " pid_t shm_cpid; /* PID of creator */\n"
6851 " pid_t shm_lpid; /* PID of last shmat(2)/shmdt(2) */\n"
6852 " shmatt_t shm_nattch; /* No. of current attaches */\n"
6856 "struct shmid_ds {\n"
6857 " struct ipc_perm shm_perm; /* 所有権と許可 */\n"
6858 " size_t shm_segsz; /* セグメントのサイズ (バイト) */\n"
6859 " time_t shm_atime; /* 最後の付加 (attach) の時刻 */\n"
6860 " time_t shm_dtime; /* 最後の分離 (detach) の時刻 */\n"
6861 " time_t shm_ctime; /* 最後に変更が行われた時刻 */\n"
6862 " pid_t shm_cpid; /* 作成者 (creator) の PID */\n"
6863 " pid_t shm_lpid; /* 最後の shmat(2)/shmdt(2) の PID */\n"
6864 " shmatt_t shm_nattch; /* 現在付加されている数 */\n"
6869 #: build/C/man2/shmctl.2:89
6870 msgid "The I<ipc_perm> structure is defined as follows (the highlighted fields are settable using B<IPC_SET>):"
6871 msgstr "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは B<IPC_SET> を使って設定可能である):"
6874 #: build/C/man2/shmctl.2:102
6877 "struct ipc_perm {\n"
6878 " key_t __key; /* Key supplied to shmget(2) */\n"
6879 " uid_t B<uid>; /* Effective UID of owner */\n"
6880 " gid_t B<gid>; /* Effective GID of owner */\n"
6881 " uid_t cuid; /* Effective UID of creator */\n"
6882 " gid_t cgid; /* Effective GID of creator */\n"
6883 " unsigned short B<mode>; /* B<Permissions> + SHM_DEST and\n"
6884 " SHM_LOCKED flags */\n"
6885 " unsigned short __seq; /* Sequence number */\n"
6888 "struct ipc_perm {\n"
6889 " key_t __key; /* shmget(2) に与えられるキー */\n"
6890 " uid_t B<uid>; /* 所有者の実効 UID */\n"
6891 " gid_t B<gid>; /* 所有者の実効 GID */\n"
6892 " uid_t cuid; /* 作成者の実効 UID */\n"
6893 " gid_t cgid; /* 作成者の実効 GID */\n"
6894 " unsigned short B<mode>; /* B<許可> + SHM_DEST と\n"
6895 " SHM_LOCKED フラグ */\n"
6896 " unsigned short __seq; /* シーケンス番号 */\n"
6900 #: build/C/man2/shmctl.2:108
6901 msgid "Valid values for I<cmd> are:"
6902 msgstr "I<cmd> として有効な値は以下の通り:"
6905 #: build/C/man2/shmctl.2:109
6908 msgstr "B<IPC_STAT>"
6911 #: build/C/man2/shmctl.2:118
6912 msgid "Copy information from the kernel data structure associated with I<shmid> into the I<shmid_ds> structure pointed to by I<buf>. The caller must have read permission on the shared memory segment."
6913 msgstr "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリセグメントに対する 読み込み許可を持たなければならない。"
6916 #: build/C/man2/shmctl.2:118
6922 #: build/C/man2/shmctl.2:136
6923 msgid "Write the values of some members of the I<shmid_ds> structure pointed to by I<buf> to the kernel data structure associated with this shared memory segment, updating also its I<shm_ctime> member. The following fields can be changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits of) I<shm_perm.mode>. The effective UID of the calling process must match the owner (I<shm_perm.uid>) or creator (I<shm_perm.cuid>) of the shared memory segment, or the caller must be privileged."
6924 msgstr "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共有メモリセグメントに関連づけられたカーネルデータ構造体に書き込み、 I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm.uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロセスの実効 UID が所有者 (I<shm_perm.uid>) または作成者 (I<shm_perm.cuid>) と一致するか、呼び出し元が特権を持たなければならない。"
6927 #: build/C/man2/shmctl.2:136
6930 msgstr "B<IPC_RMID>"
6933 #: build/C/man2/shmctl.2:149
6934 msgid "Mark the segment to be destroyed. The segment will only actually be destroyed after the last process detaches it (i.e., when the I<shm_nattch> member of the associated structure I<shmid_ds> is zero). The caller must be the owner or creator of the segment, or be privileged. The I<buf> argument is ignored."
6935 msgstr "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセグメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であるか、特権を持たなければならない。 I<buf> 引き数は無視される。"
6938 #: build/C/man2/shmctl.2:157
6939 msgid "If a segment has been marked for destruction, then the (nonstandard) B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data structure retrieved by B<IPC_STAT> will be set."
6940 msgstr "セグメントに破棄のマークが付けられると、 関連するデータ構造体において I<shm_perm.mode> フィールドの (標準ではない) B<SHM_DEST> フラグが設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
6943 #: build/C/man2/shmctl.2:160
6944 msgid "The caller I<must> ensure that a segment is eventually destroyed; otherwise its pages that were faulted in will remain in memory or swap."
6945 msgstr "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうでなれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続ける。"
6948 #: build/C/man2/shmctl.2:165
6949 msgid "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>(5)."
6950 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
6953 #: build/C/man2/shmctl.2:165
6955 msgid "B<IPC_INFO> (Linux-specific)"
6956 msgstr "B<IPC_INFO> (Linux 固有)"
6959 #: build/C/man2/shmctl.2:178
6960 msgid "Return information about system-wide shared memory limits and parameters in the structure pointed to by I<buf>. This structure is of type I<shminfo> (thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
6961 msgstr "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要である)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
6964 #: build/C/man2/shmctl.2:192
6967 "struct shminfo {\n"
6968 " unsigned long shmmax; /* Maximum segment size */\n"
6969 " unsigned long shmmin; /* Minimum segment size;\n"
6971 " unsigned long shmmni; /* Maximum number of segments */\n"
6972 " unsigned long shmseg; /* Maximum number of segments\n"
6973 " that a process can attach;\n"
6974 " unused within kernel */\n"
6975 " unsigned long shmall; /* Maximum number of pages of\n"
6976 " shared memory, system-wide */\n"
6979 "struct shminfo {\n"
6980 " unsigned long shmmax; /* 最大セグメントサイズ */\n"
6981 " unsigned long shmmin; /* 最小セグメントサイズ。\n"
6983 " unsigned long shmmni; /* 最大セグメント数 */\n"
6984 " unsigned long shmseg; /* プロセスが付加できる\n"
6987 " unsigned long shmall; /* 共有メモリの最大ページ数。\n"
6992 #: build/C/man2/shmctl.2:205
6993 msgid "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> files of the same name; see B<proc>(5) for details."
6994 msgstr "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由で変更可能である。 詳しくは B<proc>(5) を参照。"
6997 #: build/C/man2/shmctl.2:205
6999 msgid "B<SHM_INFO> (Linux-specific)"
7000 msgstr "B<SHM_INFO> (Linux 固有)"
7003 #: build/C/man2/shmctl.2:216
7004 msgid "Return a I<shm_info> structure whose fields contain information about system resources consumed by shared memory. This structure is defined in I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
7005 msgstr "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7008 #: build/C/man2/shmctl.2:233
7011 "struct shm_info {\n"
7012 " int used_ids; /* # of currently existing\n"
7014 " unsigned long shm_tot; /* Total number of shared\n"
7015 " memory pages */\n"
7016 " unsigned long shm_rss; /* # of resident shared\n"
7017 " memory pages */\n"
7018 " unsigned long shm_swp; /* # of swapped shared\n"
7019 " memory pages */\n"
7020 " unsigned long swap_attempts;\n"
7021 " /* Unused since Linux 2.4 */\n"
7022 " unsigned long swap_successes;\n"
7023 " /* Unused since Linux 2.4 */\n"
7026 "struct shm_info {\n"
7027 " int used_ids; /* 現在存在するセグメント数 */\n"
7028 " unsigned long shm_tot; /* 共有メモリのページ総数 */\n"
7029 " unsigned long shm_rss; /* メモリ上にある (スワップされて\n"
7030 " いない) 共有メモリページ数 */\n"
7031 " unsigned long shm_swp; /* スワップされている共有メモリ\n"
7033 " unsigned long swap_attempts;\n"
7034 " /* Linux 2.4 以降では未使用 */\n"
7035 " unsigned long swap_successes;\n"
7036 " /* Linux 2.4 以降では未使用 */\n"
7040 #: build/C/man2/shmctl.2:235
7042 msgid "B<SHM_STAT> (Linux-specific)"
7043 msgstr "B<SHM_STAT> (Linux 固有)"
7046 #: build/C/man2/shmctl.2:246
7047 msgid "Return a I<shmid_ds> structure as for B<IPC_STAT>. However, the I<shmid> argument is not a segment identifier, but instead an index into the kernel's internal array that maintains information about all shared memory segments on the system."
7048 msgstr "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セグメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を管理するカーネルの内部配列へのインデックス である。"
7051 #: build/C/man2/shmctl.2:249
7052 msgid "The caller can prevent or allow swapping of a shared memory segment with the following I<cmd> values:"
7053 msgstr "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリセグメントが スワップされることを防止したり、許可したりできる:"
7056 #: build/C/man2/shmctl.2:250
7058 msgid "B<SHM_LOCK> (Linux-specific)"
7059 msgstr "B<SHM_LOCK> (Linux 固有)"
7062 #: build/C/man2/shmctl.2:262
7063 msgid "Prevent swapping of the shared memory segment. The caller must fault in any pages that are required to be present after locking is enabled. If a segment has been locked, then the (nonstandard) B<SHM_LOCKED> flag of the I<shm_perm.mode> field in the associated data structure retrieved by B<IPC_STAT> will be set."
7064 msgstr "共有メモリセグメントをスワップすることを防止する。 ロックが有効になった後、呼び出し元は、 存在することが要求された全てのページをフォールトさせなければならない。 セグメントがロックされると、 関連するデータ構造体において I<shm_perm.mode> フィールドの (標準的ではない) B<SHM_LOCKED> フラグが設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
7067 #: build/C/man2/shmctl.2:262
7069 msgid "B<SHM_UNLOCK> (Linux-specific)"
7070 msgstr "B<SHM_UNLOCK> (Linux 固有)"
7073 #: build/C/man2/shmctl.2:265
7074 msgid "Unlock the segment, allowing it to be swapped out."
7075 msgstr "セグメントのロックを解除し、スワップアウトすることを可能にする。"
7077 #. There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
7078 #. be applied to a segment, regardless of ownership of the segment.
7079 #. This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
7080 #. in 2.6.10. MTK, May 2005
7082 #: build/C/man2/shmctl.2:283
7083 msgid "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> and B<SHM_UNLOCK>. Since kernel 2.6.10, an unprivileged process can employ these operations if its effective UID matches the owner or creator UID of the segment, and (for B<SHM_LOCK>) the amount of memory to be locked falls within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
7084 msgstr "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセスの実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 (B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース上限 (B<setrlimit>(2) 参照) の範囲内に入っていることである。"
7087 #: build/C/man2/shmctl.2:301
7088 msgid "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the highest used entry in the kernel's internal array recording information about all shared memory segments. (This information can be used with repeated B<SHM_STAT> operations to obtain information about all shared memory segments on the system.) A successful B<SHM_STAT> operation returns the identifier of the shared memory segment whose index was given in I<shmid>. Other operations return 0 on success."
7089 msgstr "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの うち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
7092 #: build/C/man2/shmctl.2:305
7093 msgid "On error, -1 is returned, and I<errno> is set appropriately."
7094 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
7097 #: build/C/man2/shmctl.2:314
7098 msgid "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow read access for I<shmid>, and the calling process does not have the B<CAP_IPC_OWNER> capability."
7099 msgstr "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> ケーパビリティ (capability) を持っていない。"
7102 #: build/C/man2/shmctl.2:325
7103 msgid "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address pointed to by I<buf> isn't accessible."
7104 msgstr "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されているアドレスにアクセスできない。"
7107 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
7113 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
7114 msgid "I<shmid> points to a removed identifier."
7115 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
7118 #: build/C/man2/shmctl.2:337
7119 msgid "I<shmid> is not a valid identifier, or I<cmd> is not a valid command. Or: for a B<SHM_STAT> operation, the index value specified in I<shmid> referred to an array slot that is currently unused."
7120 msgstr "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の配列のスロットを参照していた。"
7123 #: build/C/man2/shmctl.2:348
7124 msgid "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-be-locked segment would mean that the total bytes in locked shared memory segments would exceed the limit for the real user ID of the calling process. This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit (see B<setrlimit>(2))."
7125 msgstr "(2.6.9 以降のカーネルにおいて) B<SHM_LOCK> が指定され、 ロックされる予定のセグメントのサイズ (ロックされる共有メモリセグメントの合計バイト数) が、 呼び出したプロセスの実ユーザー ID についての制限を超えた。 この制限は B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2) を参照)。"
7128 #: build/C/man2/shmctl.2:353
7129 msgid "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored in the structure pointed to by I<buf>."
7130 msgstr "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納するには大き過ぎる。"
7133 #: build/C/man2/shmctl.2:365
7134 msgid "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the calling process is not that of the creator (found in I<shm_perm.cuid>), or the owner (found in I<shm_perm.uid>), and the process was not privileged (Linux: did not have the B<CAP_SYS_ADMIN> capability)."
7135 msgstr "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が作成者 (I<shm_perm.cuid>) でも所有者 (I<shm_perm.uid>) でもなく、プロセスが特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
7138 #: build/C/man2/shmctl.2:377
7139 msgid "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> capability). (Since Linux 2.6.9, this error can also occur if the B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
7140 msgstr "または (2.6.9 より前のカーネルで) B<SHM_LOCK> または B<SHM_UNLOCK> が指定されているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元が特権を持たない場合にも、このエラーが起こる。)"
7142 #. SVr4 documents an additional error condition EMFILE.
7144 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
7145 #: build/C/man2/shmop.2:231
7146 msgid "SVr4, POSIX.1-2001."
7147 msgstr "SVr4, POSIX.1-2001."
7149 #. Like Linux, the FreeBSD man pages still document
7150 #. the inclusion of these header files.
7152 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
7153 msgid "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't required on Linux or by any version of POSIX. However, some old implementations required the inclusion of these header files, and the SVID also documented their inclusion. Applications intended to be portable to such old systems may need to include these header files."
7154 msgstr "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらのインクルードをするように記載されている。このような古いシステムへの移植性を意図したアプリケーションではこれらのファイルをインクルードする必要があるかもしれない。"
7157 #: build/C/man2/shmctl.2:407
7158 msgid "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the B<ipcs>(1) program to provide information on allocated resources. In the future, these may modified or moved to a I</proc> filesystem interface."
7159 msgstr "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1) プログラムで割り当て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれない。"
7162 #: build/C/man2/shmctl.2:415
7163 msgid "Linux permits a process to attach (B<shmat>(2)) a shared memory segment that has already been marked for deletion using I<shmctl(IPC_RMID)>. This feature is not available on other UNIX implementations; portable applications should avoid relying on it."
7164 msgstr "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有メモリセグメントを あるプロセスが付加 (attach) (B<shmat>(2)) することを許可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したアプリケーションではこれに依存しないようにすべきである。"
7167 #: build/C/man2/shmctl.2:428
7168 msgid "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux 2.2 and have become I<long> under Linux 2.4. To take advantage of this, a recompilation under glibc-2.1.91 or later should suffice. (The kernel distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
7169 msgstr "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だったが、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
7172 #: build/C/man2/shmctl.2:435
7173 msgid "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), B<svipc>(7)"
7174 msgstr "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
7177 #: build/C/man2/shmget.2:38
7183 #: build/C/man2/shmget.2:38
7189 #: build/C/man2/shmget.2:41
7190 msgid "shmget - allocates a System V shared memory segment"
7191 msgstr "shmget - System V 共有メモリセグメントを割り当てる"
7194 #: build/C/man2/shmget.2:48
7195 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7196 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7199 #: build/C/man2/shmget.2:72
7200 msgid "B<shmget>() returns the identifier of the System\\ V shared memory segment associated with the value of the argument I<key>. A new shared memory segment, with size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and B<IPC_CREAT> is specified in I<shmflg>."
7201 msgstr "B<shmget>() は I<key> 引き数に対応する System\\ V 共有メモリセグメントの識別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモリセグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 新しい共有メモリセグメントを作成する。 作成される共有メモリセグメントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさとなる。"
7204 #: build/C/man2/shmget.2:91
7205 msgid "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory segment already exists for I<key>, then B<shmget>() fails with I<errno> set to B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT | O_EXCL> for B<open>(2).)"
7206 msgstr "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対応する共有メモリセグメントが既に存在すると、 B<shmget>() は失敗し、 I<errno> に B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | O_EXCL> を指定した場合の動作と同じである)。"
7209 #: build/C/man2/shmget.2:95
7210 msgid "The value I<shmflg> is composed of:"
7211 msgstr "I<shmflg> は以下の内容から構成される:"
7214 #: build/C/man2/shmget.2:95
7216 msgid "B<IPC_CREAT>"
7217 msgstr "B<IPC_CREAT>"
7220 #: build/C/man2/shmget.2:102
7221 msgid "Create a new segment. If this flag is not used, then B<shmget>() will find the segment associated with I<key> and check to see if the user has permission to access the segment."
7222 msgstr "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>() は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許可があるかどうかをチェックする。"
7225 #: build/C/man2/shmget.2:102
7228 msgstr "B<IPC_EXCL>"
7231 #: build/C/man2/shmget.2:108
7232 msgid "This flag is used with B<IPC_CREAT> to ensure that this call creates the segment. If the segment already exists, the call fails."
7233 msgstr "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
7236 #: build/C/man2/shmget.2:108
7238 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
7239 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
7242 #: build/C/man2/shmget.2:114
7243 msgid "Allocate the segment using \"huge pages.\" See the Linux kernel source file I<Documentation/vm/hugetlbpage.txt> for further information."
7244 msgstr "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
7247 #: build/C/man2/shmget.2:114
7249 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
7250 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
7252 #. As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
7255 #: build/C/man2/shmget.2:133
7256 msgid "This flag serves the same purpose as the B<mmap>(2) B<MAP_NORESERVE> flag. Do not reserve swap space for this segment. When swap space is reserved, one has the guarantee that it is possible to modify the segment. When swap space is not reserved one might get B<SIGSEGV> upon a write if no physical memory is available. See also the discussion of the file I</proc/sys/vm/overcommit_memory> in B<proc>(5)."
7257 msgstr "このフラグは、 B<mmap>(2) の B<MAP_NORESERVE> フラグと同じ役割を果たす。 このセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取る可能性がある。 B<proc>(5) にある I</proc/sys/vm/overcommit_memory> ファイルに関する議論も参照のこと。"
7260 #: build/C/man2/shmget.2:143
7261 msgid "In addition to the above flags, the least significant 9 bits of I<shmflg> specify the permissions granted to the owner, group, and others. These bits have the same format, and the same meaning, as the I<mode> argument of B<open>(2). Presently, execute permissions are not used by the system."
7262 msgstr "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他への許可を指定する。 これらのビットは B<open>(2) の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
7265 #: build/C/man2/shmget.2:151
7266 msgid "When a new shared memory segment is created, its contents are initialized to zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>(2)), is initialized as follows:"
7267 msgstr "共有メモリセグメントが新たに作成される際、 共有メモリセグメントの内容は 0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初期化される。"
7270 #: build/C/man2/shmget.2:156
7271 msgid "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the calling process."
7272 msgstr "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) ユーザーID を設定する。"
7275 #: build/C/man2/shmget.2:161
7276 msgid "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of the calling process."
7277 msgstr "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設定する。"
7280 #: build/C/man2/shmget.2:166
7281 msgid "The least significant 9 bits of I<shm_perm.mode> are set to the least significant 9 bit of I<shmflg>."
7282 msgstr "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
7285 #: build/C/man2/shmget.2:170
7286 msgid "I<shm_segsz> is set to the value of I<size>."
7287 msgstr "I<shm_segsz> に I<size> の値を設定する。"
7290 #: build/C/man2/shmget.2:177
7291 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
7292 msgstr "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
7295 #: build/C/man2/shmget.2:180
7296 msgid "I<shm_ctime> is set to the current time."
7297 msgstr "I<shm_ctime> に現在の時刻を設定する。"
7300 #: build/C/man2/shmget.2:183
7301 msgid "If the shared memory segment already exists, the permissions are verified, and a check is made to see if it is marked for destruction."
7302 msgstr "共有メモリセグメントが既に存在する場合、アクセス許可の検査と、 破壊 (destruction) マークがつけられていないかのチェックが行われる。"
7305 #: build/C/man2/shmget.2:188
7306 msgid "On success, a valid shared memory identifier is returned. On error, -1 is returned, and I<errno> is set to indicate the error."
7307 msgstr "成功の場合、有効な共有メモリセグメントの識別子が返される。 エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
7310 #: build/C/man2/shmget.2:192
7311 msgid "On failure, I<errno> is set to one of the following:"
7312 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
7315 #: build/C/man2/shmget.2:198
7316 msgid "The user does not have permission to access the shared memory segment, and does not have the B<CAP_IPC_OWNER> capability."
7317 msgstr "ユーザーはその共有メモリセグメントへのアクセス許可を持たず、 B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
7320 #: build/C/man2/shmget.2:207
7321 msgid "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared memory segment already exists for I<key>."
7322 msgstr "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共有メモリセグメントはすでに存在する。"
7325 #: build/C/man2/shmget.2:215
7326 msgid "A new segment was to be created and I<size> is less than B<SHMMIN> or greater than B<SHMMAX>."
7327 msgstr "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか B<SHMMAX> よりも大きかった。"
7330 #: build/C/man2/shmget.2:221
7331 msgid "A segment for the given I<key> exists, but I<size> is greater than the size of that segment."
7332 msgstr "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメントのサイズよりも大きかった。"
7335 #: build/C/man2/shmget.2:230
7336 msgid "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
7337 msgstr "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されていなかった。"
7340 #: build/C/man2/shmget.2:233
7341 msgid "No memory could be allocated for segment overhead."
7342 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
7345 #: build/C/man2/shmget.2:241
7346 msgid "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a segment of the requested I<size> would cause the system to exceed the system-wide limit on shared memory (B<SHMALL>)."
7347 msgstr "システム全体の共有メモリセグメント数の制限 (B<SHMMNI>) に達した、または要求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制限 (B<SHMALL>) を超過した。"
7350 #: build/C/man2/shmget.2:248
7351 msgid "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged (did not have the B<CAP_IPC_LOCK> capability)."
7352 msgstr "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった (B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
7355 #: build/C/man2/shmget.2:256
7356 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
7357 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
7360 #: build/C/man2/shmget.2:280
7361 msgid "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special value is used for I<key>, the system call ignores all but the least significant 9 bits of I<shmflg> and creates a new shared memory segment."
7362 msgstr "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に使用された場合は、 B<shmget>() は I<shmflg> の下位 9 ビットを除いた全てを無視し、 新しい共有メモリセグメントを作成する。"
7365 #: build/C/man2/shmget.2:280
7367 msgid "Shared memory limits"
7371 #: build/C/man2/shmget.2:284
7372 msgid "The following limits on shared memory segment resources affect the B<shmget>() call:"
7373 msgstr "B<shmget>() コールに影響する共有メモリセグメント資源の制限は以下の通りである:"
7376 #: build/C/man2/shmget.2:284
7382 #: build/C/man2/shmget.2:288
7383 msgid "System-wide limit on the total amount of shared memory, measured in units of the system page size."
7384 msgstr "共有メモリの全使用量のシステム全体での上限値。 システムページサイズが単位である。"
7386 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
7388 #: build/C/man2/shmget.2:294
7389 msgid "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmall>. Since Linux 3.16, the default value for this limit is:"
7390 msgstr "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更したりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりである。"
7393 #: build/C/man2/shmget.2:296 build/C/man2/shmget.2:331
7395 msgid " ULONG_MAX - 2^24\n"
7396 msgstr " ULONG_MAX - 2^24\n"
7399 #: build/C/man2/shmget.2:307
7400 msgid "The effect of this value (which is suitable for both 32-bit and 64-bit systems) is to impose no limitation on allocations. This value, rather than B<ULONG_MAX>, was chosen as the default to prevent some cases where historical applications simply raised the existing limit without first checking its current value. Such applications would cause the value to overflow if the limit was set at B<ULONG_MAX>."
7401 msgstr "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシステムにも 64 ビットシステムにも適したものになっている)。 B<ULONG_MAX> ではなく、この値が選ばれたのは、 古いアプリケーションが最初に現在の値を確認せずに既存の上限をそのまま増やしてしまっても問題が起こらないようなデフォルト値を選んだからである。 このようなアプリケーションでは、 上限を B<ULONG_MAX> に設定すると値がオーバーフローしてしまうことになる。"
7404 #: build/C/man2/shmget.2:310
7405 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
7406 msgstr "Linux 2.4 から Linux 3.15 では、この上限のデフォルト値は以下であった。"
7409 #: build/C/man2/shmget.2:312
7411 msgid " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
7412 msgstr " SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
7415 #: build/C/man2/shmget.2:320
7416 msgid "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of this formula by the page size (to get a value in bytes) yielded a value of 8 GB as the limit on the total memory used by all shared memory segments."
7417 msgstr "B<SHMMAX> と B<SHMMNI> が変更されないとすると、 この式の結果に (バイト単位の値を得るために) ページサイズを掛け算すると、 全ての共有メモリセグメントで使用される全メモリの上限として、 8 GB という値が得られる。"
7420 #: build/C/man2/shmget.2:320
7426 #: build/C/man2/shmget.2:323
7427 msgid "Maximum size in bytes for a shared memory segment."
7428 msgstr "1 つの共有メモリセグメントの最大サイズ (バイト数)。"
7430 #. commit 060028bac94bf60a65415d1d55a359c3a17d5c31
7432 #: build/C/man2/shmget.2:329
7433 msgid "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>. Since Linux 3.16, the default value for this limit is:"
7434 msgstr "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりである。"
7437 #: build/C/man2/shmget.2:340
7438 msgid "The effect of this value (which is suitable for both 32-bit and 64-bit systems) is to impose no limitation on allocations. See the description of B<SHMALL> for a discussion of why this default value (rather than B<ULONG_MAX>) is used."
7439 msgstr "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシステムにも 64 ビットシステムにも適したものになっている)。 (B<ULONG_MAX> ではなく) このデフォルト値が使われている理由については B<SHMALL> の説明を参照。"
7442 #: build/C/man2/shmget.2:343
7443 msgid "From Linux 2.2 up to Linux 3.15, the default value of this limit was 0x2000000 (32MB)."
7444 msgstr "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 (32MB) であった。"
7447 #: build/C/man2/shmget.2:349
7448 msgid "Because it is not possible to map just part of a shared memory segment, the amount of virtual memory places another limit on the maximum size of a usable segment: for example, on i386 the largest segments that can be mapped have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
7449 msgstr "共有メモリセグメントの一部分だけをマッピングすることはできないので、 使用可能なセグメントの最大サイズには仮想メモリの総量という別の上限が適用される。 例えば、i386 ではマッピング可能な最大セグメントの大きさはおおよそ 2.8GB で、 x86_64 では上限はおおよそ 127TB である。"
7452 #: build/C/man2/shmget.2:349
7458 #: build/C/man2/shmget.2:355
7459 msgid "Minimum size in bytes for a shared memory segment: implementation dependent (currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
7460 msgstr "共有メモリセグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだが、実質的な最小サイズは B<PAGE_SIZE> である)。"
7463 #: build/C/man2/shmget.2:355
7469 #: build/C/man2/shmget.2:360
7470 msgid "System-wide limit on the number of shared memory segments. In Linux 2.2, the default value for this limit was 128; since Linux 2.4, the default value is 4096."
7471 msgstr "システム全体の共有メモリセグメント数の上限値。 この上限値のデフォルトは、 Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
7473 #. Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
7474 #. that we could create one more segment than SHMMNI -- MTK
7475 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
7477 #: build/C/man2/shmget.2:366
7478 msgid "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
7479 msgstr "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更したりできる。"
7482 #: build/C/man2/shmget.2:370
7483 msgid "The implementation has no specific limits for the per-process maximum number of shared memory segments (B<SHMSEG>)."
7484 msgstr "プロセス当りの共有メモリセグメントの個数の最大値 (B<SHMSEG>) に関する実装上の制限はない。"
7487 #: build/C/man2/shmget.2:376
7488 msgid "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>() on a shared memory segment scheduled for deletion."
7489 msgstr "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリセグメントに対して B<shmget>() が行われると B<EIDRM> を返していた。"
7492 #: build/C/man2/shmget.2:382
7493 msgid "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would more clearly show its function."
7494 msgstr "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方がより明確にその機能を表しているだろう。"
7497 #: build/C/man2/shmget.2:391
7498 msgid "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
7499 msgstr "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
7502 #: build/C/man2/shmop.2:41
7508 #: build/C/man2/shmop.2:44
7509 msgid "shmat, shmdt - System V shared memory operations"
7510 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
7513 #: build/C/man2/shmop.2:48
7516 "B<#include E<lt>sys/types.hE<gt>>\n"
7517 "B<#include E<lt>sys/shm.hE<gt>>\n"
7519 "B<#include E<lt>sys/types.hE<gt>>\n"
7520 "B<#include E<lt>sys/shm.hE<gt>>\n"
7523 #: build/C/man2/shmop.2:50
7525 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
7526 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
7529 #: build/C/man2/shmop.2:52
7531 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
7532 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
7535 #: build/C/man2/shmop.2:54
7541 #: build/C/man2/shmop.2:62
7542 msgid "B<shmat>() attaches the System\\ V shared memory segment identified by I<shmid> to the address space of the calling process. The attaching address is specified by I<shmaddr> with one of the following criteria:"
7543 msgstr "B<shmat>() は I<shmid> で指定された System\\ V 共有メモリセグメント (shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
7546 #: build/C/man2/shmop.2:68
7547 msgid "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at which to attach the segment."
7548 msgstr "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用されていない) アドレスを選択する。"
7551 #: build/C/man2/shmop.2:80
7552 msgid "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the attach occurs at the address equal to I<shmaddr> rounded down to the nearest multiple of B<SHMLBA>."
7553 msgstr "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレスへ付加する。"
7556 #: build/C/man2/shmop.2:84
7557 msgid "Otherwise, I<shmaddr> must be a page-aligned address at which the attach occurs."
7558 msgstr "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必要がある。"
7561 #: build/C/man2/shmop.2:90
7562 msgid "In addition to B<SHM_RND>, the following flags may be specified in the I<shmflg> bit-mask argument:"
7563 msgstr "B<SHM_RND> に加えて、以下のフラグを I<shmflg> ビットマスク引き数に指定できる。"
7566 #: build/C/man2/shmop.2:90
7568 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
7569 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
7572 #: build/C/man2/shmop.2:94
7573 msgid "Allow the contents of the segment to be executed. The caller must have execute permission on the segment."
7574 msgstr "セグメントの内容を実行できる。 呼び出し元はセグメントに対する実行許可を持っていなければならない。"
7577 #: build/C/man2/shmop.2:94
7579 msgid "B<SHM_RDONLY>"
7580 msgstr "B<SHM_RDONLY>"
7583 #: build/C/man2/shmop.2:102
7584 msgid "Attach the segment for read-only access. The process must have read permission for the segment. If this flag is not specified, the segment is attached for read and write access, and the process must have read and write permission for the segment. There is no notion of a write-only shared memory segment."
7585 msgstr "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可を持っていなければならない。 このフラグが指定されなかった場合、そのセグメントは読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリセグメントという概念は存在しない。"
7588 #: build/C/man2/shmop.2:102
7590 msgid "B<SHM_REMAP> (Linux-specific)"
7591 msgstr "B<SHM_REMAP> (Linux 固有)"
7594 #: build/C/man2/shmop.2:115
7595 msgid "This flag specifies that the mapping of the segment should replace any existing mapping in the range starting at I<shmaddr> and continuing for the size of the segment. (Normally, an B<EINVAL> error would result if a mapping already exists in this address range.) In this case, I<shmaddr> must not be NULL."
7596 msgstr "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
7599 #: build/C/man2/shmop.2:122
7600 msgid "The B<brk>(2) value of the calling process is not altered by the attach. The segment will automatically be detached at process exit. The same segment may be attached as a read and as a read-write one, and more than once, in the process's address space."
7601 msgstr "呼び出したプロセスの B<brk>(2) の値は付加によって変化しない。 そのセグメントはプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントをプロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また複数回付加することもできる。"
7604 #: build/C/man2/shmop.2:130
7605 msgid "A successful B<shmat>() call updates the members of the I<shmid_ds> structure (see B<shmctl>(2)) associated with the shared memory segment as follows:"
7606 msgstr "成功した B<shmat>() コールは共有メモリセグメントに関連する I<shmid_ds> 構造体 (B<shmctl>(2) を参照) のメンバーを以下のように更新する:"
7609 #: build/C/man2/shmop.2:133
7610 msgid "I<shm_atime> is set to the current time."
7611 msgstr "I<shm_atime> には現在の時刻を設定する。"
7614 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
7615 msgid "I<shm_lpid> is set to the process-ID of the calling process."
7616 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
7619 #: build/C/man2/shmop.2:140
7620 msgid "I<shm_nattch> is incremented by one."
7621 msgstr "I<shm_nattch> を 1 増加させる。"
7624 #: build/C/man2/shmop.2:140
7630 #: build/C/man2/shmop.2:151
7631 msgid "B<shmdt>() detaches the shared memory segment located at the address specified by I<shmaddr> from the address space of the calling process. The to-be-detached segment must be currently attached with I<shmaddr> equal to the value returned by the attaching B<shmat>() call."
7632 msgstr "B<shmdt>() は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたアドレスに配置された共有メモリセグメントを分離 (detach) する。 分離する共有メモリセグメントは、現在 I<shmaddr> に付加されているものでなければならない。 I<shmaddr> は、それを付加した時に B<shmat>() が返した値に等しくなければならない。"
7635 #: build/C/man2/shmop.2:157
7636 msgid "On a successful B<shmdt>() call, the system updates the members of the I<shmid_ds> structure associated with the shared memory segment as follows:"
7637 msgstr "成功した B<shmdt>() コールはその共有メモリセグメントに関連する I<shmid_ds> 構造体のメンバーを以下のように更新する:"
7640 #: build/C/man2/shmop.2:160
7641 msgid "I<shm_dtime> is set to the current time."
7642 msgstr "I<shm_dtime> には現在の時刻が設定される。"
7645 #: build/C/man2/shmop.2:168
7646 msgid "I<shm_nattch> is decremented by one. If it becomes 0 and the segment is marked for deletion, the segment is deleted."
7647 msgstr "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は そのセグメントは削除される。"
7650 #: build/C/man2/shmop.2:176
7651 msgid "On success, B<shmat>() returns the address of the attached shared memory segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to indicate the cause of the error."
7652 msgstr "B<shmat>() は、成功した場合、 付加された共有メモリセグメントのアドレスを返す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す値を設定する。"
7655 #: build/C/man2/shmop.2:182
7656 msgid "On success, B<shmdt>() returns 0; on error -1 is returned, and I<errno> is set to indicate the cause of the error."
7657 msgstr "B<shmdt>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
7660 #: build/C/man2/shmop.2:188
7661 msgid "When B<shmat>() fails, I<errno> is set to one of the following:"
7662 msgstr "B<shmat>() が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
7665 #: build/C/man2/shmop.2:194
7666 msgid "The calling process does not have the required permissions for the requested attach type, and does not have the B<CAP_IPC_OWNER> capability."
7667 msgstr "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
7670 #: build/C/man2/shmop.2:211
7671 msgid "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was not specified) or invalid I<shmaddr> value, or can't attach segment at I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
7672 msgstr "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正である。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定されているが、 I<shmaddr> が NULL であった。"
7675 #: build/C/man2/shmop.2:214
7676 msgid "Could not allocate memory for the descriptor or for the page tables."
7677 msgstr "ディスクリプター (descriptor) やページテーブルのためのメモリを 割り当てることができない。"
7680 #: build/C/man2/shmop.2:220
7681 msgid "When B<shmdt>() fails, I<errno> is set as follows:"
7682 msgstr "B<shmdt>() が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
7684 #. The following since 2.6.17-rc1:
7686 #: build/C/man2/shmop.2:228
7687 msgid "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is not aligned on a page boundary."
7688 msgstr "I<shmaddr> に付加された共有メモリセグメントが存在しない。 もしくは、 I<shmaddr> がページ境界に合っていない。"
7691 #: build/C/man2/shmop.2:243
7692 msgid "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was changed from I<char\\ *> into I<const void\\ *>, and the returned type of B<shmat>() from I<char\\ *> into I<void\\ *>."
7693 msgstr "SVID 3 で (たぶんそれより前だと思うが) I<shmaddr> 引き数の型は I<char\\ *> から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void\\ *> に変更された。"
7696 #: build/C/man2/shmop.2:248
7697 msgid "After a B<fork>(2), the child inherits the attached shared memory segments."
7698 msgstr "B<fork>(2) した後、子プロセスは付加された共有メモリセグメントを継承する。"
7701 #: build/C/man2/shmop.2:252
7702 msgid "After an B<execve>(2), all attached shared memory segments are detached from the process."
7703 msgstr "B<exec>(2) した後、全ての付加された共有メモリセグメントはプロセスから分離される。"
7706 #: build/C/man2/shmop.2:256
7707 msgid "Upon B<_exit>(2), all attached shared memory segments are detached from the process."
7708 msgstr "B<exit>(2) において、全ての付加された共有メモリセグメントはプロセスから分離される。"
7711 #: build/C/man2/shmop.2:268
7712 msgid "Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable way of attaching a shared memory segment. Be aware that the shared memory segment attached in this way may be attached at different addresses in different processes. Therefore, any pointers maintained within the shared memory must be made relative (typically to the starting address of the segment), rather than absolute."
7713 msgstr "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を NULL にして B<shmat>() を使用するのがよい。 このような方法で付加される共有メモリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 (一般的にはセグメントの開始アドレスからの) 相対アドレスで作成するべきである。"
7716 #: build/C/man2/shmop.2:273
7717 msgid "On Linux, it is possible to attach a shared memory segment even if it is already marked to be deleted. However, POSIX.1-2001 does not specify this behavior and many other implementations do not support it."
7718 msgstr "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メモリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作を指定しておらず、 他の多くの実装もこれをサポートしていない。"
7721 #: build/C/man2/shmop.2:276
7722 msgid "The following system parameter affects B<shmat>():"
7723 msgstr "以下のシステムパラメーターは、 B<shmat>() に影響する:"
7726 #: build/C/man2/shmop.2:276
7732 #: build/C/man2/shmop.2:289
7733 msgid "Segment low boundary address multiple. When explicitly specifying an attach address in a call to B<shmat>(), the caller should ensure that the address is a multiple of this value. This is necessary on some architectures, in order either to ensure good CPU cache performance or to ensure that different attaches of the same segment have consistent views within the CPU cache. B<SHMLBA> is normally some multiple of the system page size (on many Linux architectures, it is the same as the system page size)."
7734 msgstr "セグメントの下限アドレス倍数 (Segment low boundary address multiple)。 B<shmat>() の呼び出しにおいて付加するアドレスを明示的に指定する際、 呼び出し元は指定するアドレスがこの値の倍数になるように保証しなければならない。 これはいくつかのアーキテクチャーでは必要なことで、 CPU キャッシュの性能を保証するためであったり、 同じセグメントの別の付与を CPU キャッシュ内部で一貫して扱えるようにするためだったりする。 B<SHMLBA> は通常はシステムページサイズの倍数である (Linux の多くのアーキテクチャーではシステムページサイズと同じである)。"
7737 #: build/C/man2/shmop.2:293
7738 msgid "The implementation places no intrinsic per-process limit on the number of shared memory segments (B<SHMSEG>)."
7739 msgstr "現在の実装では、プロセスごとの 共有メモリセグメントの最大数 (B<SHMSEG>) に関する実装依存の制限はない。"
7742 #: build/C/man2/shmop.2:301
7743 msgid "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
7744 msgstr "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
7747 #: build/C/man2/subpage_prot.2:30
7749 msgid "SUBPAGE_PROT"
7750 msgstr "SUBPAGE_PROT"
7753 #: build/C/man2/subpage_prot.2:30
7759 #: build/C/man2/subpage_prot.2:33
7760 msgid "subpage_prot - define a subpage protection for an address range"
7764 #: build/C/man2/subpage_prot.2:37
7767 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
7768 "B< uint32_t *>I<map>B<);>\n"
7770 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
7771 "B< uint32_t *>I<map>B<);>\n"
7774 #: build/C/man2/subpage_prot.2:41
7775 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
7776 msgstr "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。"
7779 #: build/C/man2/subpage_prot.2:47
7780 msgid "The PowerPC-specific B<subpage_prot>() system call provides the facility to control the access permissions on individual 4kB subpages on systems configured with a page size of 64kB."
7784 #: build/C/man2/subpage_prot.2:54
7785 msgid "The protection map is applied to the memory pages in the region starting at I<addr> and continuing for I<len> bytes. Both of these arguments must be aligned to a 64-kB boundary."
7789 #: build/C/man2/subpage_prot.2:66
7790 msgid "The protection map is specified in the buffer pointed to by I<map>. The map has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words pointed to by I<map> should equate to the number of 64-kB pages specified by I<len>). Each 2-bit field in the protection map is either 0 to allow any access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
7794 #: build/C/man2/subpage_prot.2:71
7795 msgid "On success, B<subpage_prot>() returns 0. Otherwise, one of the error codes specified below is returned."
7799 #: build/C/man2/subpage_prot.2:77
7800 msgid "The buffer referred to by I<map> is not accessible."
7804 #: build/C/man2/subpage_prot.2:87
7805 msgid "The I<addr> or I<len> arguments are incorrect. Both of these arguments must be aligned to a multiple of the system page size, and they must not refer to a region outside of the address space of the process or to a region that consists of huge pages."
7809 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
7810 msgid "Out of memory."
7814 #: build/C/man2/subpage_prot.2:96
7815 msgid "This system call is provided on the PowerPC architecture since Linux 2.6.25. The system call is provided only if the kernel is configured with B<CONFIG_PPC_64K_PAGES>. No library support is provided."
7819 #: build/C/man2/subpage_prot.2:101
7820 msgid "Glibc does not provide a wrapper for this system call; call it using B<syscall>(2)."
7824 #: build/C/man2/subpage_prot.2:106
7825 msgid "Normal page protections (at the 64-kB page level) also apply; the subpage protection mechanism is an additional constraint, so putting 0 in a 2-bit field won't allow writes to a page that is otherwise write-protected."
7829 #: build/C/man2/subpage_prot.2:106
7834 #. In the initial implementation, it was the case that:
7835 #. In fact the whole process is switched to use 4k hardware pages when the
7836 #. subpage_prot system call is used, but this could be improved in future
7837 #. to switch only the affected segments.
7838 #. But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
7839 #. the affected segment, not the whole process.
7841 #: build/C/man2/subpage_prot.2:128
7842 msgid "This system call is provided to assist writing emulators that operate using 64-kB pages on PowerPC systems. When emulating systems such as x86, which uses a smaller page size, the emulator can no longer use the memory-management unit (MMU) and normal system calls for controlling page protections. (The emulator could emulate the MMU by checking and possibly remapping the address for each memory access in software, but that is slow.) The idea is that the emulator supplies an array of protection masks to apply to a specified range of virtual addresses. These masks are applied at the level where hardware page-table entries (PTEs) are inserted into the hardware page table based on the Linux PTEs, so the Linux PTEs are not affected. Implicit in this is that the regions of the address space that are protected are switched to use 4-kB hardware pages rather than 64-kB hardware pages (on machines with hardware 64-kB page support)."
7846 #: build/C/man2/subpage_prot.2:131
7847 msgid "B<mprotect>(2), B<syscall>(2)"
7848 msgstr "B<mprotect>(2), B<syscall>(2)"
7851 #: build/C/man2/subpage_prot.2:134
7852 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
7853 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
7856 #: build/C/man2/sync_file_range.2:30
7858 msgid "SYNC_FILE_RANGE"
7859 msgstr "SYNC_FILE_RANGE"
7862 #: build/C/man2/sync_file_range.2:30
7868 #: build/C/man2/sync_file_range.2:33
7869 msgid "sync_file_range - sync a file segment with disk"
7870 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
7873 #: build/C/man2/sync_file_range.2:37
7876 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
7877 "B<#include E<lt>fcntl.hE<gt>>\n"
7879 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
7880 "B<#include E<lt>fcntl.hE<gt>>\n"
7883 #: build/C/man2/sync_file_range.2:40
7886 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
7887 "B< unsigned int >I<flags>B<);>\n"
7889 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
7890 "B< unsigned int >I<flags>B<);>\n"
7893 #: build/C/man2/sync_file_range.2:47
7894 msgid "B<sync_file_range>() permits fine control when synchronizing the open file referred to by the file descriptor I<fd> with disk."
7895 msgstr "B<sync_file_range>() を使うと、ファイルディスクリプター I<fd> で参照されるオープンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
7898 #: build/C/man2/sync_file_range.2:61
7899 msgid "I<offset> is the starting byte of the file range to be synchronized. I<nbytes> specifies the length of the range to be synchronized, in bytes; if I<nbytes> is zero, then all bytes from I<offset> through to the end of file are synchronized. Synchronization is in units of the system page size: I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is rounded up to a page boundary."
7900 msgstr "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset+nbytes-1)> はページ境界にあわせて切り上げられる。"
7903 #: build/C/man2/sync_file_range.2:65
7904 msgid "The I<flags> bit-mask argument can include any of the following values:"
7905 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
7908 #: build/C/man2/sync_file_range.2:65
7910 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
7911 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
7914 #: build/C/man2/sync_file_range.2:70
7915 msgid "Wait upon write-out of all pages in the specified range that have already been submitted to the device driver for write-out before performing any write."
7916 msgstr "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバイスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待つ。"
7919 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
7921 msgid "B<SYNC_FILE_RANGE_WRITE>"
7922 msgstr "B<SYNC_FILE_RANGE_WRITE>"
7925 #: build/C/man2/sync_file_range.2:76
7926 msgid "Initiate write-out of all dirty pages in the specified range which are not presently submitted write-out. Note that even this may block if you attempt to write more than request queue size."
7927 msgstr "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッシュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性がある点に注意すること。"
7930 #: build/C/man2/sync_file_range.2:76
7932 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
7933 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
7936 #: build/C/man2/sync_file_range.2:80
7937 msgid "Wait upon write-out of all pages in the range after performing any write."
7938 msgstr "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待つ。"
7941 #: build/C/man2/sync_file_range.2:84
7942 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
7943 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
7946 #: build/C/man2/sync_file_range.2:84
7952 #: build/C/man2/sync_file_range.2:100
7953 msgid "This system call is extremely dangerous and should not be used in portable programs. None of these operations writes out the file's metadata. Therefore, unless the application is strictly performing overwrites of already-instantiated disk blocks, there are no guarantees that the data will be available after a crash. There is no user interface to know if a write is purely an overwrite. On filesystems using copy-on-write semantics (e.g., I<btrfs>) an overwrite of existing allocated blocks is impossible. When writing into preallocated space, many filesystems also require calls into the block allocator, which this system call does not sync out to disk. This system call does not flush disk write caches and thus does not provide any data integrity on systems with volatile disk write caches."
7954 msgstr "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきではない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 したがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 (I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込みも必要となるが、 このシステムコールは block allocator のディスクへの同期を行わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わないので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステムコールではデータの一貫性を確保できないことになる。"
7957 #: build/C/man2/sync_file_range.2:100
7959 msgid "Some details"
7963 #: build/C/man2/sync_file_range.2:108
7964 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect any I/O errors or B<ENOSPC> conditions and will return these to the caller."
7965 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラーや B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
7968 #: build/C/man2/sync_file_range.2:112
7969 msgid "Useful combinations of the I<flags> bits are:"
7970 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
7973 #: build/C/man2/sync_file_range.2:112
7975 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
7976 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
7979 #: build/C/man2/sync_file_range.2:120
7980 msgid "Ensures that all pages in the specified range which were dirty when B<sync_file_range>() was called are placed under write-out. This is a start-write-for-data-integrity operation."
7981 msgstr "指定された範囲内のページで、 B<sync_file_range>() が呼び出された際に dirty であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) である。"
7984 #: build/C/man2/sync_file_range.2:127
7985 msgid "Start write-out of all dirty pages in the specified range which are not presently under write-out. This is an asynchronous flush-to-disk operation. This is not suitable for data integrity operations."
7986 msgstr "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk) 操作である。データ完全性確保が必要な操作としては適切ではない。"
7989 #: build/C/man2/sync_file_range.2:127
7991 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
7992 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
7995 #: build/C/man2/sync_file_range.2:134
7996 msgid "Wait for completion of write-out of all pages in the specified range. This can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, and obtain its result."
7997 msgstr "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行われた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用でき、この操作の完了を待ち、結果を取得することができる。"
8000 #: build/C/man2/sync_file_range.2:134
8002 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8003 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8006 #: build/C/man2/sync_file_range.2:141
8007 msgid "This is a write-for-data-integrity operation that will ensure that all pages in the specified range which were dirty when B<sync_file_range>() was called are committed to disk."
8008 msgstr "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であり、指定された範囲内の、 B<sync_file_range>() が呼ばれた時点で dirty な全てのページが ディスクに格納されることが保証される。"
8011 #: build/C/man2/sync_file_range.2:147
8012 msgid "On success, B<sync_file_range>() returns 0; on failure -1 is returned and I<errno> is set to indicate the error."
8013 msgstr "成功の場合、 B<sync_file_range>() は 0 を返す。失敗の場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
8016 #: build/C/man2/sync_file_range.2:152
8017 msgid "I<fd> is not a valid file descriptor."
8018 msgstr "I<fd> が有効なファイルディスクリプターではない。"
8021 #: build/C/man2/sync_file_range.2:160
8022 msgid "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
8023 msgstr "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正である。"
8026 #: build/C/man2/sync_file_range.2:163
8031 #: build/C/man2/sync_file_range.2:169
8032 msgid "Out of disk space."
8033 msgstr "ディスク領域不足である。"
8035 #. FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
8036 #. (In user space at least) it isn't possible to obtain a file descriptor
8037 #. for a symbolic link.
8039 #: build/C/man2/sync_file_range.2:177
8040 msgid "I<fd> refers to something other than a regular file, a block device, a directory, or a symbolic link."
8041 msgstr "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク 以外のものを指している。"
8044 #: build/C/man2/sync_file_range.2:180
8045 msgid "B<sync_file_range>() appeared on Linux in kernel 2.6.17."
8046 msgstr "B<sync_file_range>() はカーネル 2.6.17 で Linux に登場した。"
8049 #: build/C/man2/sync_file_range.2:183
8050 msgid "This system call is Linux-specific, and should be avoided in portable programs."
8051 msgstr "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避けるべきである。"
8054 #: build/C/man2/sync_file_range.2:184
8056 msgid "sync_file_range2()"
8057 msgstr "sync_file_range2()"
8059 #. See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
8061 #: build/C/man2/sync_file_range.2:201
8062 msgid "Some architectures (e.g., PowerPC, ARM) need 64-bit arguments to be aligned in a suitable pair of registers. On such architectures, the call signature of B<sync_file_range>() shown in the SYNOPSIS would force a register to be wasted as padding between the I<fd> and I<offset> arguments. (See B<syscall>(2) for details.) Therefore, these architectures define a different system call that orders the arguments suitably:"
8063 msgstr "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステムコールが定義されている。"
8066 #: build/C/man2/sync_file_range.2:206
8069 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8070 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8072 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8073 "B< off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8076 #: build/C/man2/sync_file_range.2:211
8077 msgid "The behavior of this system call is otherwise exactly the same as B<sync_file_range>()."
8079 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
8080 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
8084 #: build/C/man2/sync_file_range.2:222
8085 msgid "A system call with this signature first appeared on the ARM architecture in Linux 2.6.20, with the name B<arm_sync_file_range>(). It was renamed in Linux 2.6.22, when the analogous system call was added for PowerPC. On architectures where glibc support is provided, glibc transparently wraps B<sync_file_range2>() under the name B<sync_file_range>()."
8087 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
8088 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
8089 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
8090 "システムコールの名前が変更された。\n"
8091 "glibc によるサポートが提供されているアーキテクチャでは、\n"
8092 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
8093 "B<sync_file_range2>() を適切に使用するようになっている。"
8096 #: build/C/man2/sync_file_range.2:227
8097 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8098 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8101 #: build/C/man2/memfd_create.2:21
8103 msgid "MEMFD_CREATE"
8104 msgstr "MEMFD_CREATE"
8107 #: build/C/man2/memfd_create.2:24
8108 msgid "memfd_create - create an anonymous file"
8109 msgstr "memfd_create - 無名ファイル (anonymous file) を作成する"
8112 #: build/C/man2/memfd_create.2:26
8113 msgid "B<#include E<lt>sys/memfd.hE<gt>>"
8114 msgstr "B<#include E<lt>sys/memfd.hE<gt>>"
8117 #: build/C/man2/memfd_create.2:28
8118 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
8119 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
8122 #. memfd uses VM_NORESERVE so each page is accounted on first access.
8123 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
8124 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
8125 #. those are accounted on "current" and "current->mm", that is, the
8126 #. process doing the first page access.
8128 #: build/C/man2/memfd_create.2:51
8129 msgid "B<memfd_create>() creates an anonymous file and returns a file descriptor that refers to it. The file behaves like a regular file, and so can be modified, truncated, memory-mapped, and so on. However, unlike a regular file, it lives in RAM and has a volatile backing storage. Once all references to the file are dropped, it is automatically released. Anonymous memory is used for all backing pages of the file. Therefore, files created by B<memfd_create>() have the same semantics as other anonymous memory allocations such as those allocated using B<mmap>(2) with the B<MAP_ANONYMOUS> flag."
8130 msgstr "B<memfd_create>() は、 無名ファイル (anonymous file) を作成し、 そのファイルを参照するファイルディスクリプターを返す。 このファイルは通常のファイルと同様に振る舞い、 変更、切り詰め (truncate)、 メモリーマップなどを行うことができる。 しかし、 通常のファイルとは違い、 このファイルは RAM 上に置かれ、 格納されるストレージは揮発性である。 このファイルへの参照がすべてなくなると、 ファイルは自動的に解放される。 このファイルが置かれるページには無名メモリー (anonymous memory) が使用される。 したがって、 B<memfd_create>() で作成されたフィアルは、 他の無名メモリーの割り当て (B<MAP_ANONYMOUS> フラグ付きの B<mmap>(2) を使って割り当てられた無名メモリーなど) と同じ動作をする。"
8133 #: build/C/man2/memfd_create.2:58
8134 msgid "The initial size of the file is set to 0. Following the call, the file size should be set using B<ftruncate>(2). (Alternatively, the file may be populated by calls to B<write>(2) or similar.)"
8135 msgstr "ファイルの初期サイズは 0 に設定される。 呼び出しの後に、 B<ftruncate>(2) を使ってファイルサイズを設定すべきである (代わりに、 B<write>(2) や同様の関数を呼び出してファイルにデータを書き込むこともできる)。"
8138 #: build/C/man2/memfd_create.2:69
8139 msgid "The name supplied in I<name> is used as a filename and will be displayed as the target of the corresponding symbolic link in the directory I</proc/self/fd/>. The displayed name is always prefixed with I<memfd:> and serves only for debugging purposes. Names do not affect the behavior of the file descriptor, and as such multiple files can have the same name without any side effects."
8140 msgstr "I<name> に指定された名前はファイル名として使用され、 ディレクトリ I</proc/self/fd/> で対応するシンボリックリンクのリンク先として表示される。 表示される名前の前には常に I<memfd:> が付き、 この名前はデバッグ用途としてのみ機能する。 名前はファイルディスクリプターの動作には影響せず、 複数のファイルが同じ名前を持っても副作用はない。"
8143 #: build/C/man2/memfd_create.2:74
8144 msgid "The following values may be bitwise ORed in I<flags> to change the behaviour of B<memfd_create>():"
8145 msgstr "以下の値をビット論理和で I<flags> に指定して、 B<memfd_create>() の動作を変更できる。"
8148 #: build/C/man2/memfd_create.2:74
8150 msgid "B<MFD_CLOEXEC>"
8151 msgstr "B<MFD_CLOEXEC>"
8154 #: build/C/man2/memfd_create.2:84
8155 msgid "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this may be useful."
8156 msgstr "新しいファイルディスクリプターに close-on-exec (B<FD_CLOEXEC>) フラグをセットする。 これが有用な理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参照のこと。"
8159 #: build/C/man2/memfd_create.2:84
8161 msgid "B<MFD_ALLOW_SEALING>"
8162 msgstr "B<MFD_ALLOW_SEALING>"
8164 #. FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
8165 #. Is it worth adding some text explaining this?
8167 #: build/C/man2/memfd_create.2:100
8168 msgid "Allow sealing operations on this file. See the discussion of the B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, below. The initial set of seals is empty. If this flag is not set, the initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can be set on the file."
8169 msgstr "このファイルに対して sealing 操作を許可する。 B<fcntl>(2) の B<F_ADD_SEALS> と B<F_GET_SEALS> 操作の議論を参照。 下記の「注意」も参照。 初期の seal 集合は空となる。 このフラグを指定しなかった場合、 初期の seal 集合は B<F_SEAL_SEAL> となり、 これはこのファイルには他の seal をセットできないことということである。"
8172 #: build/C/man2/memfd_create.2:104
8173 msgid "Unused bits in I<flags> must be 0."
8174 msgstr "I<flags> の未使用のビットは 0 でなければならない。"
8177 #: build/C/man2/memfd_create.2:113
8178 msgid "As its return value, B<memfd_create>() returns a new file descriptor that can be used to refer to the file. This file descriptor is opened for both reading and writing (B<O_RDWR>) and B<O_LARGEFILE> is set for the descriptor."
8179 msgstr "返り値として B<memfd_create>() は、 作成したファイルを参照するのに使用できる新しいファイルディスクリプターを返す。 このファイルディスクリプターは読み書き両用 (B<O_RDWR>) でオープンされ、 B<O_LARGEFILE> がこのファイルディスクリプターにセットされる。"
8182 #: build/C/man2/memfd_create.2:126
8183 msgid "With respect to B<fork>(2) and B<execve>(2), the usual semantics apply for the file descriptor created by B<memfd_create>(). A copy of the file descriptor is inherited by the child produced by B<fork>(2) and refers to the same file. The file descriptor is preserved across B<execve>(2), unless the close-on-exec flag has been set."
8184 msgstr "B<fork>(2) と B<execve>(2) に関しては、 B<memfd_create>() で作成したファイルディスクリプターについても通常の動作が適用される。 ファイルディスクリプターのコピーは B<fork>(2) で生成される子プロセスに継承され、 同じファイルを参照する。 close-on-exec フラグがセットされていない限り、 B<execve>(2) の前後でファイルディスクリプターは保持される。"
8187 #: build/C/man2/memfd_create.2:133
8188 msgid "On success, B<memfd_create>() returns a new file descriptor. On error, -1 is returned and I<errno> is set to indicate the error."
8189 msgstr "成功の場合、 B<memfd_create>() は新しいファイルディスクリプターを返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
8192 #: build/C/man2/memfd_create.2:139
8193 msgid "The address in I<name> points to invalid memory."
8194 msgstr "I<name> のアドレスが無効なメモリーを指している。"
8197 #: build/C/man2/memfd_create.2:146
8198 msgid "An unsupported value was specified in one of the arguments: I<flags> included unknown bits, or I<name> was too long."
8199 msgstr "サポートされていない値がいずれかの引き数で指定された。 I<flags> に未知のビットが含まれていたか、 I<name> が長過ぎた。"
8202 #: build/C/man2/memfd_create.2:149
8203 msgid "The per-process limit on open file descriptors has been reached."
8204 msgstr "オープンされているファイルディスクリプターのプロセス単位の上限に達した。"
8207 #: build/C/man2/memfd_create.2:152
8208 msgid "The system-wide limit on the total number of open files has been reached."
8209 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
8212 #: build/C/man2/memfd_create.2:155
8213 msgid "There was insufficient memory to create a new anonymous file."
8214 msgstr "新しい無名ファイルを作成するのに十分なメモリがなかった。"
8216 #. FIXME . When glibc support appears, update the following sentence:
8218 #: build/C/man2/memfd_create.2:161
8219 msgid "The B<memfd_create>() system call first appeared in Linux 3.17. Support in the GNU C library is pending."
8220 msgstr "B<memfd_create>() システムコールは Linux 3.17 で初めて登場した。 GNU C ライブラリでのサポートは検討中である。"
8223 #: build/C/man2/memfd_create.2:165
8224 msgid "The B<memfd_create>() system call is Linux-specific."
8225 msgstr "B<memfd_create>() システムコールは Linux 固有である。"
8227 #. See also http://lwn.net/Articles/593918/
8228 #. and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
8230 #: build/C/man2/memfd_create.2:178
8231 msgid "The B<memfd_create>() system call provides a simple alternative to manually mounting a I<tmpfs> filesystem and creating and opening a file in that filesystem. The primary purpose of B<memfd_create>() is to create files and associated file descriptors that are used with the file-sealing APIs provided by B<fcntl>(2)."
8232 msgstr "B<memfd_create>() システムコールは、 手動で I<tmpfs> ファイルシステムをマウントして、 そのファイルシステムにファイルをオープンするという操作の、 簡単な代替手段を提供している。 B<memfd_create>() の主な目的は、 B<fcntl>(2) が提供する file-sealing API で使用できる、 ファイルとそれに関連付けられるファイルディスクリプターを作成することである。"
8235 #: build/C/man2/memfd_create.2:192
8236 msgid "The B<memfd_create>() system call also has uses without file sealing (which is why file-sealing is disabled, unless explicitly requested with the B<MFD_ALLOW_SEALING> flag). In particular, it can be used as an alternative to creating files in I<tmp> or as an alternative to using the B<open>(2) B<O_TMPFILE> in cases where there is no intention to actually link the resulting file into the filesystem."
8237 msgstr "B<memfd_create>() システムコールは、 file sealing なしでも用途がある (これが明示的に B<MFD_ALLOW_SEALING> フラグが要求されない限り、 file-sealing が無効になる理由である)。 特に、 ファイルシステムに実際にファイルを残す意図がない場合、 I<tmp> にファイルを作成したり B<open>(2) B<O_TMPFILE> を使ったりする際の代替手段として使用できる。"
8240 #: build/C/man2/memfd_create.2:192
8242 msgid "File sealing"
8243 msgstr "file sealing"
8246 #: build/C/man2/memfd_create.2:210
8247 msgid "In the absence of file sealing, processes that communicate via shared memory must either trust each other, or take measures to deal with the possibility that an untrusted peer may manipulate the shared memory region in problematic ways. For example, an untrusted peer might modify the contents of the shared memory at any time, or shrink the shared memory region. The former possibility leaves the local process vulnerable to time-of-check-to-time-of-use race conditions (typically dealt with by copying data from the shared memory region before checking and using it). The latter possibility leaves the local process vulnerable to B<SIGBUS> signals when an attempt is made to access a now-nonexistent location in the shared memory region. (Dealing with this possibility necessitates the use of a handler for the B<SIGBUS> signal.)"
8249 "file sealing がない場合、 共有メモリ経由で通信するプロセスは、 互いに信頼するか、 信頼していない相手が共有メモリ領域を問題がある方法で操作する可能性に対処するための対策を講じなければならない。\n"
8250 "例えば、 信頼していない相手は、 いつでも共有メモリの内容を変更したり、 共有メモリ領域を縮小したりする可能性がある。 前者の場合は、 ローカルプロセスでは、 データの確認時点と使用時点の競合条件の問題が起こり得る (通常はこの問題への対処は共有メモリ領域からデータをこぴーしてからデータを確認、使用することである)。 後者の場合は、 ローカルプロセスでは、 共有メモリ領域の存在しなくなった場所にアクセスしようとした際にシグナル B<SIGBUS> が発生する可能性がある (この可能性に対処するにはシグナル B<SIGBUS> に対してハンドラーを使用する必要がある)。"
8253 #: build/C/man2/memfd_create.2:216
8254 msgid "Dealing with untrusted peers imposes extra complexity on code that employs shared memory. Memory sealing enables that extra complexity to be eliminated, by allowing a process to operate secure in the knowledge that its peer can't modify the shared memory in an undesired fashion."
8255 msgstr "信頼していない相手への対処により、 共有メモリを利用するコードに余計な複雑性が増すことになる。 メモリー sealing により余計な複雑性をなくすことができる。 相手が望まない方法で共有メモリを変更できないことを知っていることで、 プロセスは安全に動作できるようになる。"
8258 #: build/C/man2/memfd_create.2:218
8259 msgid "An example of the usage of the sealing mechanism is as follows:"
8260 msgstr "sealing 機構の使い方の例は以下のとおりである。"
8263 #: build/C/man2/memfd_create.2:225
8264 msgid "The first process creates a I<tmpfs> file using B<memfd_create>(). The call yields a file descriptor used in subsequent steps."
8265 msgstr "最初のプロセスは B<memfd_create>() を使って I<tmpfs> ファイルを作成する。 B<memfd_create>() はこれ以降のステップで使用するファイルディスクリプターを返す。"
8268 #: build/C/man2/memfd_create.2:232
8269 msgid "The first process sizes the file created in the previous step using B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory with the desired data."
8270 msgstr "最初のプロセスは B<ftruncate>(2) を使って直前のステップで作成したファイルのサイズを変更し、 B<mmap>(2) を使ってそのファイルをマッピングし、 共有メモリに所望のデータを配置する。"
8273 #: build/C/man2/memfd_create.2:232
8279 #: build/C/man2/memfd_create.2:242
8280 msgid "The first process uses the B<fcntl>(2) B<F_ADD_SEALS> operation to place one or more seals on the file, in order to restrict further modifications on the file. (If placing the seal B<F_SEAL_WRITE>, then it will be necessary to first unmap the shared writable mapping created in the previous step.)"
8281 msgstr "最初のプロセスは、 このファイルに対する今後の変更を制限するために、 B<fcntl>(2) の B<F_ADD_SEALS> 操作を使って、 そのファイルに seal をいくつか設定する。 (seal B<F_SEAL_WRITE> を設定する場合、 直前のステップで作成した書き込み可能な共有マッピングをまずアンマップする必要が出てくる。)"
8284 #: build/C/man2/memfd_create.2:242
8290 #: build/C/man2/memfd_create.2:247
8291 msgid "A second process obtains a file descriptor for the I<tmpfs> file and maps it. Among the possible ways in which this could happen are the following:"
8292 msgstr "二つ目のプロセスは I<tmpfs> ファイルのファイルディスクリプターを入手し、 そのファイルをマップする。 以下に示す方法を使用することができる。"
8295 #: build/C/man2/memfd_create.2:258
8296 msgid "The process that called B<memfd_create>() could transfer the resulting file descriptor to the second process via a UNIX domain socket (see B<unix>(7) and B<cmsg>(3)). The second process then maps the file using B<mmap>(2)."
8297 msgstr "B<memfd_create>() を呼び出したプロセスは、 得られたファイルディスクリプターを二つ目のプロセスに UNIX ドメインソケット経由で渡すことができる (B<unix>(7) と B<cmsg>(3) を参照)。 それから、二つ目のプロセスは B<mmap>(2) を使ってファイルをマップする。"
8300 #: build/C/man2/memfd_create.2:266
8301 msgid "The second process is created via B<fork>(2) and thus automatically inherits the file descriptor and mapping. (Note that in this case and the next, there is a natural trust relationship between the two processes, since they are running under the same user ID. Therefore, file sealing would not normally be necessary.)"
8302 msgstr "二つ目のプロセスを B<fork>(2) を使って作成する。 そうすると、 自動的にファイルディスクリプターとマッピングが継承される。 (この方法と次の方法では、 二つのプロセス間で自然な信頼関係が存在することになる。 なぜなら、 二つのプロセスは同じユーザー ID。 の元で実行されているからである。 したがって、 file sealing は通常は不要であろう。)"
8305 #: build/C/man2/memfd_create.2:280
8306 msgid "The second process opens the file I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>>, where I<E<lt>pidE<gt>> is the PID of the first process (the one that called B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor returned by the call to B<memfd_create>() in that process. The second process then maps the file using B<mmap>(2)."
8307 msgstr "二つ目のプロセスは I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>> をオープンする。 I<E<lt>pidE<gt>> は最初のプロセス (B<memfd_create>() を呼び出したプロセス) の PID で、 I<E<lt>fdE<gt>> は最初のプロセスでの B<memfd_create>() の呼び出しで返されたファイルディスクリプター番号である。 それからこのファイルを B<mmap>(2) を使ってマッピングする。"
8310 #: build/C/man2/memfd_create.2:281
8316 #: build/C/man2/memfd_create.2:293
8317 msgid "The second process uses the B<fcntl>(2) B<F_GET_SEALS> operation to retrieve the bit mask of seals that has been applied to the file. This bit mask can be inspected in order to determine what kinds of restrictions have been placed on file modifications. If desired, the second process can apply further seals to impose additional restrictions (so long as the B<F_SEAL_SEAL> seal has not yet been applied)."
8318 msgstr "二つ目のプロセスは B<fcntl>(2) の B<F_GET_SEALS> 操作を使って、 そのファイルに適用されている seal のビットマスクを取得する。 このビットマスクを調べて、 ファイルの変更に関してどのような制限が適用されているかを知ることができる。 (B<F_SEAL_SEAL> seal がそれまでに適用されていない限りは) 必要であれば、 二つ目のプロセスはさらに seal を設定して追加の制限をかけることができる。"
8321 #: build/C/man2/memfd_create.2:297
8322 msgid "Below are shown two example programs that demonstrate the use of B<memfd_create>() and the file sealing API."
8323 msgstr "以下では B<memfd_create>() と file sealing API の使用例を示すサンプルプログラムを 2 つとりあげる。"
8326 #: build/C/man2/memfd_create.2:312
8327 msgid "The first program, I<t_memfd_create.c>, creates a I<tmpfs> file using B<memfd_create>(), sets a size for the file, maps it into memory, and optionally places some seals on the file. The program accepts up to three command-line arguments, of which the first two are required. The first argument is the name to associate with the file, the second argument is the size to be set for the file, and the optional third is a string of characters that specify seals to be set on file."
8328 msgstr "最初のプログラム I<t_memfd_create.c> は、 B<memfd_create>() を使って I<tmpfs> ファイルを作成し、 そのファイルのサイズを設定し、 メモリにマッピングし、 要求された場合にはそのファイルに seal を設定する。 このプログラムは最大で 3 つのコマンドライン引き数を取り、 最初の 2 つは必須である。 最初の引き数はファイルに関連付けられる名前で、 2 番目の引き数はファイルに設定されるサイズである。 省略可能な 3 番目の引き数は、 このファイルに設定する seal を指定する文字列である。"
8331 #: build/C/man2/memfd_create.2:318
8332 msgid "The second program, I<t_get_seals.c>, can be used to open an existing file that was created via B<memfd_create>() and inspect the set of seals that have been applied to that file."
8333 msgstr "2 つめのプログラム I<t_get_seals.c> を使うと、 B<memfd_create>() を使って作成された既存のファイルをオープンし、 そのファイルに適用されている seal の集合を調査できる。"
8336 #: build/C/man2/memfd_create.2:323
8337 msgid "The following shell session demonstrates the use of these programs. First we create a I<tmpfs> file and set some seals on it:"
8338 msgstr "以下のシェルのセッションはこれらのプログラムの使用例を示したものである。 まず I<tmpfs> ファイルを作成し、そのファイルに seal をいくつか設定している。"
8341 #: build/C/man2/memfd_create.2:329
8344 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
8346 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
8348 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
8350 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
8353 #: build/C/man2/memfd_create.2:347
8354 msgid "At this point, the I<t_memfd_create> program continues to run in the background. From another program, we can obtain a file descriptor for the file created by B<memfd_create>() by opening the I</proc/PID/fd> file that corresponds to the descriptor opened by B<memfd_create>(). Using that pathname, we inspect the content of the I</proc/PID/fd> symbolic link, and use our I<t_get_seals> program to view the seals that have been placed on the file:"
8356 "この時点では、 I<t_memfd_create> プログラムはバックグラウンドで動作し続ける。 もう一つのプログラムから、 B<memfd_create>() がオープンしたディスクリプターに対応する I</proc/PID/fd> ファイルをオープンすることで、 B<memfd_create>() で作成されたファイルのファイルディスクリプターを取得できる。\n"
8357 "そのパス名を使って、 I</proc/PID/fd> シンボリックリンクの内容を調査し、 I<t_get_seals> プログラムを使ってそのファイルに設定されている seal を見ることができる。"
8360 #: build/C/man2/memfd_create.2:354
8363 "$ B<readlink /proc/11775/fd/3>\n"
8364 "/memfd:my_memfd_file (deleted)\n"
8365 "$ B<./t_get_seals /proc/11775/fd/3>\n"
8366 "Existing seals: WRITE SHRINK\n"
8368 "$ B<readlink /proc/11775/fd/3>\n"
8369 "/memfd:my_memfd_file (deleted)\n"
8370 "$ B<./t_get_seals /proc/11775/fd/3>\n"
8371 "Existing seals: WRITE SHRINK\n"
8374 #: build/C/man2/memfd_create.2:356
8376 msgid "Program source: t_memfd_create.c"
8377 msgstr "プログラムのソース: t_memfd_create.c"
8380 #: build/C/man2/memfd_create.2:365
8383 "#include E<lt>sys/memfd.hE<gt>\n"
8384 "#include E<lt>fcntl.hE<gt>\n"
8385 "#include E<lt>stdlib.hE<gt>\n"
8386 "#include E<lt>unistd.hE<gt>\n"
8387 "#include E<lt>string.hE<gt>\n"
8388 "#include E<lt>stdio.hE<gt>\n"
8390 "#include E<lt>sys/memfd.hE<gt>\n"
8391 "#include E<lt>fcntl.hE<gt>\n"
8392 "#include E<lt>stdlib.hE<gt>\n"
8393 "#include E<lt>unistd.hE<gt>\n"
8394 "#include E<lt>string.hE<gt>\n"
8395 "#include E<lt>stdio.hE<gt>\n"
8398 #: build/C/man2/memfd_create.2:377
8402 "main(int argc, char *argv[])\n"
8405 " unsigned int seals;\n"
8407 " char *name, *seals_arg;\n"
8411 "main(int argc, char *argv[])\n"
8414 " unsigned int seals;\n"
8416 " char *name, *seals_arg;\n"
8420 #: build/C/man2/memfd_create.2:388
8423 " if (argc E<lt> 3) {\n"
8424 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
8425 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
8426 " \"following characters:\\en\");\n"
8427 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
8428 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
8429 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
8430 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
8431 " exit(EXIT_FAILURE);\n"
8434 " if (argc E<lt> 3) {\n"
8435 " fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
8436 " fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
8437 " \"following characters:\\en\");\n"
8438 " fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
8439 " fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
8440 " fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
8441 " fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
8442 " exit(EXIT_FAILURE);\n"
8446 #: build/C/man2/memfd_create.2:392
8449 " name = argv[1];\n"
8450 " len = atoi(argv[2]);\n"
8451 " seals_arg = argv[3];\n"
8453 " name = argv[1];\n"
8454 " len = atoi(argv[2]);\n"
8455 " seals_arg = argv[3];\n"
8458 #: build/C/man2/memfd_create.2:395
8461 " /* Create an anonymous file in tmpfs; allow seals to be\n"
8462 " placed on the file */\n"
8464 " /* Create an anonymous file in tmpfs; allow seals to be\n"
8465 " placed on the file */\n"
8468 #: build/C/man2/memfd_create.2:399
8471 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
8473 " errExit(\"memfd_create\");\n"
8475 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
8477 " errExit(\"memfd_create\");\n"
8480 #: build/C/man2/memfd_create.2:401
8482 msgid " /* Size the file as specified on the command line */\n"
8483 msgstr " /* Size the file as specified on the command line */\n"
8486 #: build/C/man2/memfd_create.2:404
8489 " if (ftruncate(fd, len) == -1)\n"
8490 " errExit(\"truncate\");\n"
8492 " if (ftruncate(fd, len) == -1)\n"
8493 " errExit(\"truncate\");\n"
8496 #: build/C/man2/memfd_create.2:407
8499 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
8500 " (long) getpid(), fd, (long) getpid(), fd);\n"
8502 " printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
8503 " (long) getpid(), fd, (long) getpid(), fd);\n"
8506 #: build/C/man2/memfd_create.2:410
8509 " /* Code to map the file and populate the mapping with data\n"
8512 " /* Code to map the file and populate the mapping with data\n"
8516 #: build/C/man2/memfd_create.2:413
8519 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
8520 " seals on the file */\n"
8522 " /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
8523 " seals on the file */\n"
8526 #: build/C/man2/memfd_create.2:416
8529 " if (seals_arg != NULL) {\n"
8532 " if (seals_arg != NULL) {\n"
8536 #: build/C/man2/memfd_create.2:425
8539 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
8540 " seals |= F_SEAL_GROW;\n"
8541 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
8542 " seals |= F_SEAL_SHRINK;\n"
8543 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
8544 " seals |= F_SEAL_WRITE;\n"
8545 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
8546 " seals |= F_SEAL_SEAL;\n"
8548 " if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
8549 " seals |= F_SEAL_GROW;\n"
8550 " if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
8551 " seals |= F_SEAL_SHRINK;\n"
8552 " if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
8553 " seals |= F_SEAL_WRITE;\n"
8554 " if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
8555 " seals |= F_SEAL_SEAL;\n"
8558 #: build/C/man2/memfd_create.2:429
8561 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
8562 " errExit(\"fcntl\");\n"
8565 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
8566 " errExit(\"fcntl\");\n"
8570 #: build/C/man2/memfd_create.2:432
8573 " /* Keep running, so that the file created by memfd_create()\n"
8574 " continues to exist */\n"
8576 " /* Keep running, so that the file created by memfd_create()\n"
8577 " continues to exist */\n"
8580 #: build/C/man2/memfd_create.2:434
8583 msgstr " pause();\n"
8586 #: build/C/man2/memfd_create.2:438
8588 msgid "Program source: t_get_seals.c"
8589 msgstr "プログラムのソース: t_get_seals.c"
8592 #: build/C/man2/memfd_create.2:447
8595 "#include E<lt>sys/memfd.hE<gt>\n"
8596 "#include E<lt>fcntl.hE<gt>\n"
8597 "#include E<lt>unistd.hE<gt>\n"
8598 "#include E<lt>stdlib.hE<gt>\n"
8599 "#include E<lt>string.hE<gt>\n"
8600 "#include E<lt>stdio.hE<gt>\n"
8602 "#include E<lt>sys/memfd.hE<gt>\n"
8603 "#include E<lt>fcntl.hE<gt>\n"
8604 "#include E<lt>unistd.hE<gt>\n"
8605 "#include E<lt>stdlib.hE<gt>\n"
8606 "#include E<lt>string.hE<gt>\n"
8607 "#include E<lt>stdio.hE<gt>\n"
8610 #: build/C/man2/memfd_create.2:456
8614 "main(int argc, char *argv[])\n"
8617 " unsigned int seals;\n"
8620 "main(int argc, char *argv[])\n"
8623 " unsigned int seals;\n"
8626 #: build/C/man2/memfd_create.2:461
8629 " if (argc != 2) {\n"
8630 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
8631 " exit(EXIT_FAILURE);\n"
8634 " if (argc != 2) {\n"
8635 " fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
8636 " exit(EXIT_FAILURE);\n"
8640 #: build/C/man2/memfd_create.2:465
8643 " fd = open(argv[1], O_RDWR);\n"
8645 " errExit(\"open\");\n"
8647 " fd = open(argv[1], O_RDWR);\n"
8649 " errExit(\"open\");\n"
8652 #: build/C/man2/memfd_create.2:469
8655 " seals = fcntl(fd, F_GET_SEALS);\n"
8656 " if (seals == -1)\n"
8657 " errExit(\"fcntl\");\n"
8659 " seals = fcntl(fd, F_GET_SEALS);\n"
8660 " if (seals == -1)\n"
8661 " errExit(\"fcntl\");\n"
8664 #: build/C/man2/memfd_create.2:480
8667 " printf(\"Existing seals:\");\n"
8668 " if (seals & F_SEAL_SEAL)\n"
8669 " printf(\" SEAL\");\n"
8670 " if (seals & F_SEAL_GROW)\n"
8671 " printf(\" GROW\");\n"
8672 " if (seals & F_SEAL_WRITE)\n"
8673 " printf(\" WRITE\");\n"
8674 " if (seals & F_SEAL_SHRINK)\n"
8675 " printf(\" SHRINK\");\n"
8676 " printf(\"\\en\");\n"
8678 " printf(\"Existing seals:\");\n"
8679 " if (seals & F_SEAL_SEAL)\n"
8680 " printf(\" SEAL\");\n"
8681 " if (seals & F_SEAL_GROW)\n"
8682 " printf(\" GROW\");\n"
8683 " if (seals & F_SEAL_WRITE)\n"
8684 " printf(\" WRITE\");\n"
8685 " if (seals & F_SEAL_SHRINK)\n"
8686 " printf(\" SHRINK\");\n"
8687 " printf(\"\\en\");\n"
8690 #: build/C/man2/memfd_create.2:483
8693 " /* Code to map the file and access the contents of the\n"
8694 " resulting mapping omitted */\n"
8696 " /* Code to map the file and access the contents of the\n"
8697 " resulting mapping omitted */\n"
8700 #: build/C/man2/memfd_create.2:493
8701 msgid "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
8702 msgstr "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
8705 #: build/C/man2/s390_pci_mmio_write.2:25
8707 msgid "S390_PCI_MMIO_WRITE"
8708 msgstr "S390_PCI_MMIO_WRITE"
8711 #: build/C/man2/s390_pci_mmio_write.2:25
8717 #: build/C/man2/s390_pci_mmio_write.2:29
8718 msgid "s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO memory page"
8722 #: build/C/man2/s390_pci_mmio_write.2:32
8724 msgid "B<#include E<lt>asm/unistd.hE<gt>>\n"
8725 msgstr "B<#include E<lt>asm/unistd.hE<gt>>\n"
8728 #: build/C/man2/s390_pci_mmio_write.2:35
8731 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
8732 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
8734 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
8735 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
8738 #: build/C/man2/s390_pci_mmio_write.2:38
8741 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
8742 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
8744 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
8745 "B< void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
8748 #: build/C/man2/s390_pci_mmio_write.2:57
8749 msgid "The B<s390_pci_mmio_write>() system call writes I<length> bytes of data from the user-space buffer I<user_buffer> to the PCI MMIO memory location specified by I<mmio_addr>. The B<s390_pci_mmio_read>() system call reads I<length> bytes of data from the PCI MMIO memory location specified by I<mmio_addr> to the user-space buffer I<user_buffer>."
8753 #: build/C/man2/s390_pci_mmio_write.2:68
8754 msgid "These system calls must be used instead of the simple assignment or data-transfer operations that are used to access the PCI MMIO memory areas mapped to user space on the Linux System z platform. The address specified by I<mmio_addr> must belong to a PCI MMIO memory page mapping in the caller's address space, and the data being written or read must not cross a page boundary. The I<length> value cannot be greater than the system page size."
8758 #: build/C/man2/s390_pci_mmio_write.2:77
8759 msgid "On success, B<s390_pci_mmio_write>() and B<s390_pci_mmio_read>() return 0. On error, -1 is returned and I<errno> is set to one of the error codes listed below."
8760 msgstr "成功すると、 B<s390_pci_mmio_write>() と B<s390_pci_mmio_read>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> に以下のリストにあるエラーコードのいずれかを設定する。"
8763 #: build/C/man2/s390_pci_mmio_write.2:83
8764 msgid "The address in I<mmio_addr> is invalid."
8768 #: build/C/man2/s390_pci_mmio_write.2:87
8769 msgid "I<user_buffer> does not point to a valid location in the caller's address space."
8773 #: build/C/man2/s390_pci_mmio_write.2:92
8774 msgid "Invalid I<length> argument."
8778 #: build/C/man2/s390_pci_mmio_write.2:95
8779 msgid "PCI support is not enabled."
8783 #: build/C/man2/s390_pci_mmio_write.2:98
8784 msgid "Insufficient memory."
8788 #: build/C/man2/s390_pci_mmio_write.2:100
8789 msgid "These system calls are available since Linux 3.19."
8790 msgstr "これらのシステムコールは Linux 3.19 以降で使用可能である。"
8793 #: build/C/man2/s390_pci_mmio_write.2:103
8794 msgid "This Linux-specific system call is available only on the s390 architecture. The required PCI support is available beginning with System z EC12."
8798 #: build/C/man2/s390_pci_mmio_write.2:107
8799 msgid "Glibc does not provide a wrapper for this system call, use B<syscall>(2) to call it."
8803 #: build/C/man2/s390_pci_mmio_write.2:109
8804 msgid "B<syscall>(2)"
8805 msgstr "B<syscall>(2)"
8807 #~ msgid "System-wide limit on the number of pages of shared memory."
8808 #~ msgstr "共有メモリのページ数のシステム全体での上限値。"
8810 #~ msgid "Segment low boundary address multiple. Must be page aligned. For the current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
8811 #~ msgstr "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
8813 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
8814 #~ msgstr "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
8816 #~ msgid "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value 2^20 (2,097,152)."
8817 #~ msgstr "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 (2,097,152) になる。"
8819 #~ msgid "Maximum size in bytes for a shared memory segment: policy dependent (on Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
8820 #~ msgstr "共有メモリセグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
8822 #~ msgid "System wide maximum number of shared memory segments: implementation dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>)."
8823 #~ msgstr "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更したりできる)。"
8825 #~ msgid "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
8826 #~ msgstr "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 が返される。"
8828 #~ msgid "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair of registers. On this architecture, the call signature of B<posix_fadvise>() is flawed, since it forces a register to be wasted as padding between the I<fd> and I<len> arguments. Therefore, since Linux 2.6.14, ARM defines a different system call that orders the arguments suitably:"
8830 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
8831 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
8832 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
8833 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
8834 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
8835 #~ "システムコールが定義されている。"
8837 #~ msgid "The behavior of this system call is otherwise exactly the same as B<posix_fadvise>(). No library support is provided for this system call in glibc."
8839 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
8840 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
8843 #~ msgid "The I<mode> is not supported by the file system containing the file referred to by I<fd>."
8844 #~ msgstr "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしていない。"
8846 #~ msgid "The function B<mtrace>() installs handlers for B<malloc>(3), B<realloc>(3) and B<free>(3). The function B<muntrace>() disables these handlers."
8847 #~ msgstr "関数 B<mtrace>() は、 B<malloc>(3), B<realloc>(3), B<free>(3) のハンドラを組み込む。 関数 B<muntrace>() はこれらのハンドラを解除する。"
8849 #~ msgid "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>() writes its output. This file must be writable to the user or B<mtrace>() will do nothing. If the file is not empty it will be truncated."
8850 #~ msgstr "環境変数 B<MALLOC_TRACE> は B<mtrace>() が出力を書き出すファイルを指定する。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み権限がない場合、 B<mtrace>() は何もしない。 ファイルが空でない場合、ファイルの元の内容を上書きする。"
8852 #~ msgid "The output of B<mtrace>() will be ASCII but not in a friendly format. So glibc comes with a perl-script called mtrace to make sense of it."
8853 #~ msgstr "B<mtrace>() の出力は ASCII 形式だが、人が読みやすいフォーマットではない。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スクリプトが付属している。"
8855 #~ msgid "This flag allocates and initializes to zero the disk space within the range specified by I<offset> and I<len>. After a successful call, subsequent writes into this range are guaranteed not to fail because of lack of disk space. Preallocating zeroed blocks beyond the end of the file is useful for optimizing append workloads. Preallocating blocks does not change the file size (as reported by B<stat>(2)) even if it is less than I<offset>+I<len>."
8856 #~ msgstr "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しないことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロックを前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに 有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であっても、ブロックの前もっての割り当てにより (B<stat>(2) が返す) ファイルサイズは変更されることはない。"