OSDN Git Service

LDP: Update POT and ja.po to LDP v3.78
[linuxjm/LDP_man-pages.git] / po4a / memory / po / ja.po
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.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:22+0900\n"
10 "PO-Revision-Date: 2015-01-22 05:24+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
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
43 #, no-wrap
44 msgid "Linux"
45 msgstr "Linux"
46
47 #. type: TH
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
64 #, no-wrap
65 msgid "Linux Programmer's Manual"
66 msgstr "Linux Programmer's Manual"
67
68 #. type: SH
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
85 #, no-wrap
86 msgid "NAME"
87 msgstr "名前"
88
89 #. type: Plain text
90 #: build/C/man2/alloc_hugepages.2:28
91 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
92 msgstr ""
93 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
94
95 #. type: SH
96 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
97 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
98 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
99 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
100 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
101 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
102 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
103 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:42
104 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
105 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
106 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
107 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
108 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
109 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
110 #: build/C/man2/memfd_create.2:24 build/C/man2/s390_pci_mmio_write.2:29
111 #, no-wrap
112 msgid "SYNOPSIS"
113 msgstr "書式"
114
115 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
116 #.  unsigned long len, int prot, int flag);
117 #. type: Plain text
118 #: build/C/man2/alloc_hugepages.2:34
119 #, no-wrap
120 msgid ""
121 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
122 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
123 msgstr ""
124 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
125 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
126
127 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
128 #. type: Plain text
129 #: build/C/man2/alloc_hugepages.2:37
130 #, no-wrap
131 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
132 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
133
134 #. type: SH
135 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
136 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
137 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
138 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
139 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
140 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
141 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
142 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:48
143 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
144 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
145 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
146 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
147 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
148 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
149 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
150 #: build/C/man2/memfd_create.2:28 build/C/man2/s390_pci_mmio_write.2:39
151 #, no-wrap
152 msgid "DESCRIPTION"
153 msgstr "説明"
154
155 #. type: Plain text
156 #: build/C/man2/alloc_hugepages.2:49
157 msgid ""
158 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
159 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
160 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20, "
161 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
162 msgstr ""
163 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
164 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
165 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
166 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
167 "敗する。"
168
169 #. type: Plain text
170 #: build/C/man2/alloc_hugepages.2:57
171 msgid ""
172 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
173 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
174 "several sizes.  These system calls serve to map huge pages into the "
175 "process's memory or to free them again.  Huge pages are locked into memory, "
176 "and are not swapped."
177 msgstr ""
178 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
179 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
180 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
181 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
182 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
183
184 #. type: Plain text
185 #: build/C/man2/alloc_hugepages.2:66
186 msgid ""
187 "The I<key> argument is an identifier.  When zero the pages are private, and "
188 "not inherited by children.  When positive the pages are shared with other "
189 "applications using the same I<key>, and inherited by child processes."
190 msgstr ""
191 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
192 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
193 "れ、子プロセスに継承される。"
194
195 #. type: Plain text
196 #: build/C/man2/alloc_hugepages.2:81
197 msgid ""
198 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
199 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
200 "memory is first actually freed when all users have released it.)  The "
201 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
202 "may not follow.  Addresses must be properly aligned."
203 msgstr ""
204 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
205 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
206 "リを解放したときに、 そのメモリは初めて実際に解放される)。 "
207 "B<alloc_hugepages>()  の I<addr> 引き数はヒントであり、カーネルはそれに従うか"
208 "もしれないし、 従わないかもしれない。 アドレスは正しく配置されなければならな"
209 "い。"
210
211 #. type: Plain text
212 #: build/C/man2/alloc_hugepages.2:86
213 msgid ""
214 "The I<len> argument is the length of the required segment.  It must be a "
215 "multiple of the huge page size."
216 msgstr ""
217 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
218 "ズの倍数にしなければならない。"
219
220 #. type: Plain text
221 #: build/C/man2/alloc_hugepages.2:94
222 msgid ""
223 "The I<prot> argument specifies the memory protection of the segment.  It is "
224 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
225 msgstr ""
226 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
227 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
228
229 #. type: Plain text
230 #: build/C/man2/alloc_hugepages.2:109
231 msgid ""
232 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
233 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
234 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
235 "returned when no segment with the given key exists."
236 msgstr ""
237 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
238 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
239 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
240 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
241 "が返される。"
242
243 #. type: SH
244 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
245 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:228
246 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
247 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
248 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
249 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
250 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:77
251 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
252 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
253 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
254 #: build/C/man2/remap_file_pages.2:132 build/C/man3/shm_open.3:171
255 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:183
256 #: build/C/man2/shmop.2:168 build/C/man2/subpage_prot.2:66
257 #: build/C/man2/sync_file_range.2:141 build/C/man2/memfd_create.2:126
258 #: build/C/man2/s390_pci_mmio_write.2:68
259 #, no-wrap
260 msgid "RETURN VALUE"
261 msgstr "返り値"
262
263 #. type: Plain text
264 #: build/C/man2/alloc_hugepages.2:118
265 msgid ""
266 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
267 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
268 "is set appropriately."
269 msgstr ""
270 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
271 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
272 "に設定される。"
273
274 #. type: SH
275 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
276 #: build/C/man2/fallocate.2:235 build/C/man2/madvise.2:275
277 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
278 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
279 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:84
280 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
281 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
282 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
283 #: build/C/man2/remap_file_pages.2:139 build/C/man3/shm_open.3:180
284 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:188
285 #: build/C/man2/shmop.2:182 build/C/man2/subpage_prot.2:71
286 #: build/C/man2/sync_file_range.2:147 build/C/man2/memfd_create.2:133
287 #: build/C/man2/s390_pci_mmio_write.2:77
288 #, no-wrap
289 msgid "ERRORS"
290 msgstr "エラー"
291
292 #. type: TP
293 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:319
294 #, no-wrap
295 msgid "B<ENOSYS>"
296 msgstr "B<ENOSYS>"
297
298 #. type: Plain text
299 #: build/C/man2/alloc_hugepages.2:122
300 msgid "The system call is not supported on this kernel."
301 msgstr "このシステムコールはカーネルでサポートされていない。"
302
303 #. type: SH
304 #: build/C/man2/alloc_hugepages.2:122
305 #, no-wrap
306 msgid "FILES"
307 msgstr "ファイル"
308
309 #. type: Plain text
310 #: build/C/man2/alloc_hugepages.2:126
311 msgid ""
312 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
313 "be read and written."
314 msgstr ""
315 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
316 "み書きできる。"
317
318 #. type: Plain text
319 #: build/C/man2/alloc_hugepages.2:130
320 msgid ""
321 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
322 "their size in the three variables HugePages_Total, HugePages_Free, "
323 "Hugepagesize."
324 msgstr ""
325 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
326 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
327 "る。"
328
329 #. type: SH
330 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
331 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:375
332 #: build/C/man2/madvise.2:332 build/C/man3/mallinfo.3:110
333 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
334 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
335 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:53
336 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
337 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:499 build/C/man2/mmap2.2:77
338 #: build/C/man2/mprotect.2:112 build/C/man2/mremap.2:185
339 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
340 #: build/C/man2/posix_fadvise.2:122 build/C/man3/posix_fallocate.3:108
341 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
342 #: build/C/man2/remap_file_pages.2:161 build/C/man3/shm_open.3:251
343 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:377
344 #: build/C/man2/shmget.2:248 build/C/man2/shmop.2:228
345 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
346 #: build/C/man2/memfd_create.2:161 build/C/man2/s390_pci_mmio_write.2:100
347 #, no-wrap
348 msgid "CONFORMING TO"
349 msgstr "準拠"
350
351 #. type: Plain text
352 #: build/C/man2/alloc_hugepages.2:133
353 msgid ""
354 "These calls are specific to Linux on Intel processors, and should not be "
355 "used in programs intended to be portable."
356 msgstr ""
357 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
358 "必要なプログラムで使うべきでない。"
359
360 #. type: SH
361 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:78
362 #: build/C/man2/madvise.2:354 build/C/man3/malloc_get_state.3:88
363 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
364 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
365 #: build/C/man3/malloc_usable_size.3:55 build/C/man3/mcheck.3:147
366 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:517 build/C/man2/mmap2.2:79
367 #: build/C/man2/mprotect.2:121 build/C/man2/mremap.2:191
368 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:80
369 #: build/C/man2/posix_fadvise.2:131 build/C/man3/posix_fallocate.3:133
370 #: build/C/man3/posix_memalign.3:221 build/C/man2/readahead.2:93
371 #: build/C/man2/remap_file_pages.2:165 build/C/man3/shm_open.3:257
372 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:382
373 #: build/C/man2/shmget.2:256 build/C/man2/shmop.2:243
374 #: build/C/man2/subpage_prot.2:98 build/C/man2/sync_file_range.2:183
375 #: build/C/man2/memfd_create.2:165 build/C/man2/s390_pci_mmio_write.2:103
376 #, no-wrap
377 msgid "NOTES"
378 msgstr "注意"
379
380 #. type: Plain text
381 #: build/C/man2/alloc_hugepages.2:141
382 msgid ""
383 "These system calls are gone; they existed only in Linux 2.5.36 through to "
384 "2.5.54.  Now the hugetlbfs filesystem can be used instead.  Memory backed by "
385 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
386 "map files in this virtual filesystem."
387 msgstr ""
388 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
389 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
390 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
391 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
392
393 #. type: Plain text
394 #: build/C/man2/alloc_hugepages.2:145
395 msgid ""
396 "The maximal number of huge pages can be specified using the B<hugepages=> "
397 "boot parameter."
398 msgstr ""
399 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
400
401 #. type: SH
402 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
403 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:383
404 #: build/C/man2/madvise.2:388 build/C/man3/mallinfo.3:279
405 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
406 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
407 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:69
408 #: build/C/man3/mallopt.3:568 build/C/man3/mcheck.3:208
409 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:741 build/C/man2/mmap2.2:101
410 #: build/C/man2/mprotect.2:228 build/C/man2/mremap.2:214
411 #: build/C/man2/msync.2:151 build/C/man3/mtrace.3:172
412 #: build/C/man2/posix_fadvise.2:215 build/C/man3/posix_fallocate.3:143
413 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
414 #: build/C/man2/remap_file_pages.2:183 build/C/man3/shm_open.3:283
415 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
416 #: build/C/man2/shmget.2:391 build/C/man2/shmop.2:301
417 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:227
418 #: build/C/man2/memfd_create.2:493 build/C/man2/s390_pci_mmio_write.2:109
419 #, no-wrap
420 msgid "COLOPHON"
421 msgstr "この文書について"
422
423 #. type: Plain text
424 #: build/C/man2/alloc_hugepages.2:158 build/C/man3/alloca.3:170
425 #: build/C/man2/cacheflush.2:97 build/C/man2/fallocate.2:391
426 #: build/C/man2/madvise.2:396 build/C/man3/mallinfo.3:287
427 #: build/C/man3/malloc_get_state.3:122 build/C/man3/malloc_hook.3:150
428 #: build/C/man3/malloc_info.3:270 build/C/man3/malloc_stats.3:75
429 #: build/C/man3/malloc_trim.3:90 build/C/man3/malloc_usable_size.3:77
430 #: build/C/man3/mallopt.3:576 build/C/man3/mcheck.3:216
431 #: build/C/man2/mlock.2:351 build/C/man2/mmap.2:749 build/C/man2/mmap2.2:109
432 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:222
433 #: build/C/man2/msync.2:159 build/C/man3/mtrace.3:180
434 #: build/C/man2/posix_fadvise.2:223 build/C/man3/posix_fallocate.3:151
435 #: build/C/man3/posix_memalign.3:285 build/C/man2/readahead.2:121
436 #: build/C/man2/remap_file_pages.2:191 build/C/man3/shm_open.3:291
437 #: build/C/man7/shm_overview.7:135 build/C/man2/shmctl.2:443
438 #: build/C/man2/shmget.2:399 build/C/man2/shmop.2:309
439 #: build/C/man2/subpage_prot.2:142 build/C/man2/sync_file_range.2:235
440 #: build/C/man2/memfd_create.2:501 build/C/man2/s390_pci_mmio_write.2:117
441 #, fuzzy
442 #| msgid ""
443 #| "This page is part of release 3.77 of the Linux I<man-pages> project.  A "
444 #| "description of the project, information about reporting bugs, and the "
445 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
446 #| "man-pages/."
447 msgid ""
448 "This page is part of release 3.78 of the Linux I<man-pages> project.  A "
449 "description of the project, information about reporting bugs, and the latest "
450 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
451 "pages/."
452 msgstr ""
453 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.77 の一部\n"
454 "である。プロジェクトの説明とバグ報告に関する情報は\n"
455 "http://www.kernel.org/doc/man-pages/ に書かれている。"
456
457 #. type: TH
458 #: build/C/man3/alloca.3:43
459 #, no-wrap
460 msgid "ALLOCA"
461 msgstr "ALLOCA"
462
463 #. type: TH
464 #: build/C/man3/alloca.3:43
465 #, no-wrap
466 msgid "2013-10-07"
467 msgstr "2013-10-07"
468
469 #. type: TH
470 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
471 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
472 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
473 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
474 #: build/C/man3/posix_memalign.3:29
475 #, no-wrap
476 msgid "GNU"
477 msgstr "GNU"
478
479 #. type: Plain text
480 #: build/C/man3/alloca.3:46
481 msgid "alloca - allocate memory that is automatically freed"
482 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
483
484 #. type: Plain text
485 #: build/C/man3/alloca.3:48
486 msgid "B<#include E<lt>alloca.hE<gt>>"
487 msgstr "B<#include E<lt>alloca.hE<gt>>"
488
489 #. type: Plain text
490 #: build/C/man3/alloca.3:50
491 msgid "B<void *alloca(size_t >I<size>B<);>"
492 msgstr "B<void *alloca(size_t >I<size>B<);>"
493
494 #. type: Plain text
495 #: build/C/man3/alloca.3:60
496 msgid ""
497 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
498 "frame of the caller.  This temporary space is automatically freed when the "
499 "function that called B<alloca>()  returns to its caller."
500 msgstr ""
501 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
502 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
503 "に自動的に解放される。"
504
505 #. type: Plain text
506 #: build/C/man3/alloca.3:65
507 msgid ""
508 "The B<alloca>()  function returns a pointer to the beginning of the "
509 "allocated space.  If the allocation causes stack overflow, program behavior "
510 "is undefined."
511 msgstr ""
512 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
513 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
514 "い。"
515
516 #. type: SH
517 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
518 #: build/C/man3/posix_fallocate.3:103
519 #, no-wrap
520 msgid "ATTRIBUTES"
521 msgstr "属性"
522
523 #. type: SS
524 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
525 #: build/C/man3/posix_fallocate.3:104
526 #, no-wrap
527 msgid "Multithreading (see pthreads(7))"
528 msgstr "マルチスレッディング (pthreads(7) 参照)"
529
530 #. type: Plain text
531 #: build/C/man3/alloca.3:70
532 msgid "The B<alloca>()  function is thread-safe."
533 msgstr "B<alloca>() 関数はスレッドセーフである。"
534
535 #. type: Plain text
536 #: build/C/man3/alloca.3:72
537 msgid "This function is not in POSIX.1-2001."
538 msgstr "この関数は POSIX.1-2001 にはない。"
539
540 #. type: Plain text
541 #: build/C/man3/alloca.3:78
542 msgid ""
543 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
544 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
545 "the GNU version."
546 msgstr ""
547 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
548 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
549 "は POSIX.1-2001 にはない。"
550
551 #. type: Plain text
552 #: build/C/man3/alloca.3:93
553 msgid ""
554 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
555 "applications, its use can improve efficiency compared to the use of "
556 "B<malloc>(3)  plus B<free>(3).  In certain cases, it can also simplify "
557 "memory deallocation in applications that use B<longjmp>(3)  or "
558 "B<siglongjmp>(3).  Otherwise, its use is discouraged."
559 msgstr ""
560 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
561 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
562 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
563 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
564 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
565
566 #. type: Plain text
567 #: build/C/man3/alloca.3:102
568 msgid ""
569 "Because the space allocated by B<alloca>()  is allocated within the stack "
570 "frame, that space is automatically freed if the function return is jumped "
571 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
572 msgstr ""
573 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
574 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
575 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
576
577 #. type: Plain text
578 #: build/C/man3/alloca.3:107
579 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
580 msgstr ""
581 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
582 "に!"
583
584 #. type: SS
585 #: build/C/man3/alloca.3:107
586 #, no-wrap
587 msgid "Notes on the GNU version"
588 msgstr "GNU 版についての注意"
589
590 #. type: Plain text
591 #: build/C/man3/alloca.3:129
592 msgid ""
593 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
594 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
595 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
596 "included.  Otherwise, (without an -ansi or -std=c* option) the glibc version "
597 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
598 "the lines:"
599 msgstr ""
600 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
601 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
602 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
603 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
604 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
605 "インクルードするが、このファイルには以下の行が含まれており、"
606
607 #. type: Plain text
608 #: build/C/man3/alloca.3:134
609 #, no-wrap
610 msgid ""
611 "    #ifdef  __GNUC__\n"
612 "    #define alloca(size)   __builtin_alloca (size)\n"
613 "    #endif\n"
614 msgstr ""
615 "    #ifdef  __GNUC__\n"
616 "    #define alloca(size)   __builtin_alloca (size)\n"
617 "    #endif\n"
618
619 #. type: Plain text
620 #: build/C/man3/alloca.3:137
621 msgid "with messy consequences if one has a private version of this function."
622 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
623
624 #. type: Plain text
625 #: build/C/man3/alloca.3:141
626 msgid ""
627 "The fact that the code is inlined means that it is impossible to take the "
628 "address of this function, or to change its behavior by linking with a "
629 "different library."
630 msgstr ""
631 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
632 "のライブラリをリンクして動作を変更することはできない。"
633
634 #. type: Plain text
635 #: build/C/man3/alloca.3:145
636 msgid ""
637 "The inlined code often consists of a single instruction adjusting the stack "
638 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
639 "error return."
640 msgstr ""
641 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
642 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
643 "よって NULL エラーが返されることはない。"
644
645 #. type: SH
646 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
647 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
648 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:590 build/C/man3/mtrace.3:102
649 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
650 #: build/C/man2/shmget.2:376
651 #, no-wrap
652 msgid "BUGS"
653 msgstr "バグ"
654
655 #. type: Plain text
656 #: build/C/man3/alloca.3:150
657 msgid ""
658 "There is no error indication if the stack frame cannot be extended.  "
659 "(However, after a failed allocation, the program is likely to receive a "
660 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
661 msgstr ""
662 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
663 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
664 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
665
666 #. type: Plain text
667 #: build/C/man3/alloca.3:158
668 msgid ""
669 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
670 "a function call, because the stack space reserved by B<alloca>()  would "
671 "appear on the stack in the middle of the space for the function arguments."
672 msgstr ""
673 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
674 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
675 "使われるスタック領域の中に現れてしまうためである。"
676
677 #. type: SH
678 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:378
679 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
680 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
681 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
682 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
683 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
684 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:715 build/C/man2/mmap2.2:95
685 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
686 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
687 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:138
688 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
689 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
690 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
691 #: build/C/man2/shmget.2:382 build/C/man2/shmop.2:293
692 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
693 #: build/C/man2/memfd_create.2:487 build/C/man2/s390_pci_mmio_write.2:107
694 #, no-wrap
695 msgid "SEE ALSO"
696 msgstr "関連項目"
697
698 #. type: Plain text
699 #: build/C/man3/alloca.3:162
700 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
701 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
702
703 #. type: TH
704 #: build/C/man2/cacheflush.2:25
705 #, no-wrap
706 msgid "CACHEFLUSH"
707 msgstr "CACHEFLUSH"
708
709 #. type: TH
710 #: build/C/man2/cacheflush.2:25
711 #, no-wrap
712 msgid "2007-05-26"
713 msgstr "2007-05-26"
714
715 #. type: Plain text
716 #: build/C/man2/cacheflush.2:28
717 msgid "cacheflush - flush contents of instruction and/or data cache"
718 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
719
720 #. type: Plain text
721 #: build/C/man2/cacheflush.2:31
722 #, no-wrap
723 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
724 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
725
726 #. type: Plain text
727 #: build/C/man2/cacheflush.2:33
728 #, no-wrap
729 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
730 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
731
732 #. type: Plain text
733 #: build/C/man2/cacheflush.2:43
734 msgid ""
735 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
736 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
737 "of:"
738 msgstr ""
739 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
740 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
741 "指定する:"
742
743 #. type: TP
744 #: build/C/man2/cacheflush.2:43
745 #, no-wrap
746 msgid "B<ICACHE>"
747 msgstr "B<ICACHE>"
748
749 #. type: Plain text
750 #: build/C/man2/cacheflush.2:46
751 msgid "Flush the instruction cache."
752 msgstr "命令 (instruction) キャッシュをフラッシュする。"
753
754 #. type: TP
755 #: build/C/man2/cacheflush.2:46
756 #, no-wrap
757 msgid "B<DCACHE>"
758 msgstr "B<DCACHE>"
759
760 #. type: Plain text
761 #: build/C/man2/cacheflush.2:49
762 msgid "Write back to memory and invalidate the affected valid cache lines."
763 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
764
765 #. type: TP
766 #: build/C/man2/cacheflush.2:49
767 #, no-wrap
768 msgid "B<BCACHE>"
769 msgstr "B<BCACHE>"
770
771 #. type: Plain text
772 #: build/C/man2/cacheflush.2:53
773 msgid "Same as B<(ICACHE|DCACHE)>."
774 msgstr "B<(ICACHE|DCACHE)> と同じ。"
775
776 #. type: Plain text
777 #: build/C/man2/cacheflush.2:59
778 msgid ""
779 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
780 "detected, I<errno> will indicate the error."
781 msgstr ""
782 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
783 "出された場合は I<errno> にエラーが指示される。"
784
785 #. type: TP
786 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
787 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
788 #: build/C/man2/subpage_prot.2:72 build/C/man2/memfd_create.2:134
789 #: build/C/man2/s390_pci_mmio_write.2:78 build/C/man2/s390_pci_mmio_write.2:83
790 #, no-wrap
791 msgid "B<EFAULT>"
792 msgstr "B<EFAULT>"
793
794 #. type: Plain text
795 #: build/C/man2/cacheflush.2:67
796 msgid ""
797 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
798 "accessible."
799 msgstr ""
800 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
801 "能ではない。"
802
803 #. type: TP
804 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
805 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
806 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
807 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
808 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
809 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
810 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
811 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
812 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
813 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
814 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
815 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
816 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
817 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
818 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
819 #: build/C/man2/memfd_create.2:139 build/C/man2/s390_pci_mmio_write.2:87
820 #, no-wrap
821 msgid "B<EINVAL>"
822 msgstr "B<EINVAL>"
823
824 #. type: Plain text
825 #: build/C/man2/cacheflush.2:75
826 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
827 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
828
829 #.  FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
830 #.  but by now it is on a number of other architectures (but not i386).
831 #.  Investigate the details and update this page.
832 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
833 #. type: Plain text
834 #: build/C/man2/cacheflush.2:82
835 msgid ""
836 "This Linux-specific system call is available only on MIPS-based systems.  It "
837 "should not be used in programs intended to be portable."
838 msgstr ""
839 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
840 "植を意図したプログラムで使用すべきではない。"
841
842 #. type: Plain text
843 #: build/C/man2/cacheflush.2:89
844 msgid ""
845 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
846 "Therefore, the whole cache is always flushed."
847 msgstr ""
848 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
849 "のキャッシュがフラッシュされる。"
850
851 #. type: TH
852 #: build/C/man2/fallocate.2:11
853 #, no-wrap
854 msgid "FALLOCATE"
855 msgstr "FALLOCATE"
856
857 #. type: TH
858 #: build/C/man2/fallocate.2:11 build/C/man3/malloc_info.3:25
859 #: build/C/man2/mmap.2:40 build/C/man3/posix_fallocate.3:25
860 #: build/C/man3/shm_open.3:26 build/C/man2/memfd_create.2:21
861 #, fuzzy, no-wrap
862 #| msgid "2015-01-10"
863 msgid "2015-01-22"
864 msgstr "2015-01-10"
865
866 #. type: Plain text
867 #: build/C/man2/fallocate.2:14
868 msgid "fallocate - manipulate file space"
869 msgstr "fallocate - ファイル空間の操作"
870
871 #. type: Plain text
872 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
873 #, no-wrap
874 msgid ""
875 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
876 "B<#include E<lt>fcntl.hE<gt>>\n"
877 msgstr ""
878 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
879 "B<#include E<lt>fcntl.hE<gt>>\n"
880
881 #. type: Plain text
882 #: build/C/man2/fallocate.2:21
883 #, no-wrap
884 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
885 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
886
887 #. type: Plain text
888 #: build/C/man2/fallocate.2:27
889 msgid ""
890 "This is a nonportable, Linux-specific system call.  For the portable, "
891 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
892 "B<posix_fallocate>(3)."
893 msgstr ""
894 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
895 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
896 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
897
898 #. type: Plain text
899 #: build/C/man2/fallocate.2:37
900 msgid ""
901 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
902 "space for the file referred to by I<fd> for the byte range starting at "
903 "I<offset> and continuing for I<len> bytes."
904 msgstr ""
905 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
906 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
907 "域である。"
908
909 #. type: Plain text
910 #: build/C/man2/fallocate.2:42
911 msgid ""
912 "The I<mode> argument determines the operation to be performed on the given "
913 "range.  Details of the supported operations are given in the subsections "
914 "below."
915 msgstr ""
916 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
917 "サポートされている操作の詳細は以下のサブセクションで説明する。"
918
919 #. type: SS
920 #: build/C/man2/fallocate.2:42
921 #, no-wrap
922 msgid "Allocating disk space"
923 msgstr "ディスク領域の割り当て"
924
925 #. type: Plain text
926 #: build/C/man2/fallocate.2:65
927 msgid ""
928 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
929 "the disk space within the range specified by I<offset> and I<len>.  The file "
930 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
931 "greater than the file size.  Any subregion within the range specified by "
932 "I<offset> and I<len> that did not contain data before the call will be "
933 "initialized to zero.  This default behavior closely resembles the behavior "
934 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
935 "of optimally implementing that function."
936 msgstr ""
937 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
938 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
939 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
940 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
941 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
942 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
943 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
944 "適に実装する手段を提供することを目的としているからである。"
945
946 #. type: Plain text
947 #: build/C/man2/fallocate.2:71
948 msgid ""
949 "After a successful call, subsequent writes into the range specified by "
950 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
951 "space."
952 msgstr ""
953 "呼び出しが成功した場合、\n"
954 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
955 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
956
957 #. type: Plain text
958 #: build/C/man2/fallocate.2:82
959 msgid ""
960 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
961 "the call is similar, but the file size will not be changed even if I<offset>"
962 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
963 "the end of the file in this manner is useful for optimizing append workloads."
964 msgstr ""
965 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
966 "ル\n"
967 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
968 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
969 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
970 "追記を最適化したい場合に役に立つ。"
971
972 #. type: Plain text
973 #: build/C/man2/fallocate.2:86
974 msgid ""
975 "Because allocation is done in block size chunks, B<fallocate>()  may "
976 "allocate a larger range of disk space than was specified."
977 msgstr ""
978 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
979 "り\n"
980 "も大きなディスク領域を割り当てることがある。"
981
982 #. type: SS
983 #: build/C/man2/fallocate.2:86
984 #, no-wrap
985 msgid "Deallocating file space"
986 msgstr "ファイル空間の割り当て解除"
987
988 #. type: Plain text
989 #: build/C/man2/fallocate.2:101
990 msgid ""
991 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
992 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
993 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
994 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
995 "removed from the file.  After a successful call, subsequent reads from this "
996 "range will return zeroes."
997 msgstr ""
998 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
999 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1000 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1001 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1002 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1003 "を返す。"
1004
1005 #. type: Plain text
1006 #: build/C/man2/fallocate.2:112
1007 msgid ""
1008 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
1009 "I<mode>; in other words, even when punching off the end of the file, the "
1010 "file size (as reported by B<stat>(2))  does not change."
1011 msgstr ""
1012 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
1013 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
1014 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
1015
1016 #. type: Plain text
1017 #: build/C/man2/fallocate.2:117
1018 msgid ""
1019 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1020 "support the operation, an error is returned.  The operation is supported on "
1021 "at least the following filesystems:"
1022 msgstr ""
1023 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1024 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1025 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1026
1027 #. type: IP
1028 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1029 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1030 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1031 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1032 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1033 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1034 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1035 #: build/C/man2/shmop.2:80 build/C/man2/memfd_create.2:248
1036 #: build/C/man2/memfd_create.2:258 build/C/man2/memfd_create.2:266
1037 #, no-wrap
1038 msgid "*"
1039 msgstr "*"
1040
1041 #. type: Plain text
1042 #: build/C/man2/fallocate.2:119
1043 msgid "XFS (since Linux 2.6.38)"
1044 msgstr "XFS (Linux 2.6.38 以降)"
1045
1046 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1047 #. type: Plain text
1048 #: build/C/man2/fallocate.2:122
1049 msgid "ext4 (since Linux 3.0)"
1050 msgstr "ext4 (Linux 3.0 以降)"
1051
1052 #. type: Plain text
1053 #: build/C/man2/fallocate.2:124
1054 msgid "Btrfs (since Linux 3.7)"
1055 msgstr "Btrfs (Linux 3.7 以降)"
1056
1057 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1058 #. type: Plain text
1059 #: build/C/man2/fallocate.2:127
1060 msgid "tmpfs (since Linux 3.5)"
1061 msgstr "tmpfs (Linux 3.5 以降)"
1062
1063 #. type: SS
1064 #: build/C/man2/fallocate.2:127
1065 #, no-wrap
1066 msgid "Collapsing file space"
1067 msgstr "ファイル空間の一部削除"
1068
1069 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1070 #. type: Plain text
1071 #: build/C/man2/fallocate.2:147
1072 msgid ""
1073 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1074 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1075 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1076 "bytes.  At the completion of the operation, the contents of the file "
1077 "starting at the location I<offset+len> will be appended at the location "
1078 "I<offset>, and the file will be I<len> bytes smaller."
1079 msgstr ""
1080 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1081 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残さ"
1082 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1083 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1084 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1085 "くなる。"
1086
1087 #. type: Plain text
1088 #: build/C/man2/fallocate.2:161
1089 msgid ""
1090 "A filesystem may place limitations on the granularity of the operation, in "
1091 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1092 "must be a multiple of the filesystem logical block size, which varies "
1093 "according to the filesystem type and configuration.  If a filesystem has "
1094 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1095 "this requirement is violated."
1096 msgstr ""
1097 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1098 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1099 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1100 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1101 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1102
1103 #. type: Plain text
1104 #: build/C/man2/fallocate.2:170
1105 msgid ""
1106 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1107 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1108 "file."
1109 msgstr ""
1110 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1111 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1112 "B<ftruncate>(2) を使用すること。"
1113
1114 #. type: Plain text
1115 #: build/C/man2/fallocate.2:175
1116 msgid ""
1117 "No other flags may be specified in I<mode> in conjunction with "
1118 "B<FALLOC_FL_COLLAPSE_RANGE>."
1119 msgstr ""
1120 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1121 "ない。"
1122
1123 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1124 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1125 #. type: Plain text
1126 #: build/C/man2/fallocate.2:183
1127 msgid ""
1128 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1129 "extent-based files)  and XFS."
1130 msgstr ""
1131 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1132 "ファイル) と XFS でサポートされている。"
1133
1134 #. type: SS
1135 #: build/C/man2/fallocate.2:183
1136 #, no-wrap
1137 msgid "Zeroing file space"
1138 msgstr "ファイル空間のゼロ埋め"
1139
1140 #.  commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1141 #. type: Plain text
1142 #: build/C/man2/fallocate.2:199
1143 msgid ""
1144 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14)  in "
1145 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1146 "for I<len> bytes.  Within the specified range, blocks are preallocated for "
1147 "the regions that span the holes in the file.  After a successful call, "
1148 "subsequent reads from this range will return zeroes."
1149 msgstr ""
1150 "B<FALLOC_FL_ZERO_RANGE> フラグ (Linux 3.14 以降で利用可能) を I<mode> に指定"
1151 "すると、 I<offset> で始まる I<len> バイト範囲の空間をゼロ埋めする。 指定され"
1152 "た範囲の中では、ブロックは、そのファイル内のホールが広がる領域にあらかじめ割"
1153 "り当てられたものである。 呼び出しが成功すると、 これ以降のこの範囲からの読み"
1154 "出しでは 0 を返す。"
1155
1156 #. type: Plain text
1157 #: build/C/man2/fallocate.2:205
1158 msgid ""
1159 "Zeroing is done within the filesystem preferably by converting the range "
1160 "into unwritten extents.  This approach means that the specified range will "
1161 "not be physically zeroed out on the device (except for partial blocks at the "
1162 "either end of the range), and I/O is (otherwise) required only to update "
1163 "metadata."
1164 msgstr ""
1165 "ゼロ埋めは、ファイルシステム内部では、指定された範囲を書き込みを伴わないエク"
1166 "ステントに変換する方法をできるだけ使って行われる。 この方法は、指定された範囲"
1167 "について物理的にゼロ埋めしたデータがデバイスに書き込まれるのではないことを意"
1168 "味する (例外は指定された範囲の端の部分的に使用しているブロックである)。 (これ"
1169 "以外で) I/O が必要なのはメタデータの更新だけである。"
1170
1171 #. type: Plain text
1172 #: build/C/man2/fallocate.2:217
1173 msgid ""
1174 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1175 "behavior of the call is similar, but the file size will not be changed even "
1176 "if I<offset>+I<len> is greater than the file size.  This behavior is the "
1177 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1178 msgstr ""
1179 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に追加で指定された場合、 このシステム"
1180 "コールの動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合"
1181 "であってもファイルサイズは変更されない点が異なる。 この動作は "
1182 "B<FALLOC_FL_KEEP_SIZE> を指定してスペースを前もって割り当てた場合と同じであ"
1183 "る。"
1184
1185 #. type: Plain text
1186 #: build/C/man2/fallocate.2:222
1187 msgid ""
1188 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1189 "support the operation, an error is returned.  The operation is supported on "
1190 "at least the following filesystems:"
1191 msgstr ""
1192 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1193 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1194 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1195
1196 #.  commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1197 #. type: Plain text
1198 #: build/C/man2/fallocate.2:225
1199 msgid "XFS (since Linux 3.14)"
1200 msgstr "XFS (Linux 3.14 以降)"
1201
1202 #.  commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1203 #. type: Plain text
1204 #: build/C/man2/fallocate.2:228
1205 msgid "ext4, for extent-based files (since Linux 3.14)"
1206 msgstr "ext4 のエクステントベースのファイル (Linux 3.14 以降)"
1207
1208 #. type: Plain text
1209 #: build/C/man2/fallocate.2:235
1210 msgid ""
1211 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1212 "I<errno> is set to indicate the error."
1213 msgstr ""
1214 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> "
1215 "にエラーを示す値を設定する。"
1216
1217 #. type: TP
1218 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1219 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1220 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1221 #: build/C/man2/sync_file_range.2:148
1222 #, no-wrap
1223 msgid "B<EBADF>"
1224 msgstr "B<EBADF>"
1225
1226 #. type: Plain text
1227 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1228 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1229 msgstr ""
1230 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1231 "いない。"
1232
1233 #. type: TP
1234 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1235 #, no-wrap
1236 msgid "B<EFBIG>"
1237 msgstr "B<EFBIG>"
1238
1239 #. type: Plain text
1240 #: build/C/man2/fallocate.2:244
1241 msgid "I<offset>+I<len> exceeds the maximum file size."
1242 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1243
1244 #. type: TP
1245 #: build/C/man2/fallocate.2:244
1246 #, no-wrap
1247 msgid "B<EINTR>"
1248 msgstr "B<EINTR>"
1249
1250 #. type: Plain text
1251 #: build/C/man2/fallocate.2:247
1252 msgid "A signal was caught during execution."
1253 msgstr "実行中にシグナルが捕捉された。"
1254
1255 #. type: Plain text
1256 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1257 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1258 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1259
1260 #. type: Plain text
1261 #: build/C/man2/fallocate.2:269
1262 msgid ""
1263 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1264 "plus I<len> reaches or passes the end of the file."
1265 msgstr ""
1266 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1267 "範囲がファイルの末尾かそれより先まで達している。"
1268
1269 #. type: Plain text
1270 #: build/C/man2/fallocate.2:279
1271 msgid ""
1272 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1273 "not a multiple of the filesystem block size."
1274 msgstr ""
1275 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1276 "がファイルシステムのブロックサイズの倍数ではない。"
1277
1278 #. type: Plain text
1279 #: build/C/man2/fallocate.2:287
1280 msgid ""
1281 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1282 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1283 msgstr ""
1284 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1285 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1286
1287 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1288 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1289 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1290 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1291 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1292 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1293 #.  Date: 2014-04-17 13:40:05 GMT
1294 #. type: Plain text
1295 #: build/C/man2/fallocate.2:304
1296 msgid ""
1297 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1298 "file referred to by I<fd> is not a regular file."
1299 msgstr ""
1300 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1301 "I<fd> が参照しているファイルが通常のファイルではない。"
1302
1303 #. type: TP
1304 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1305 #: build/C/man2/sync_file_range.2:160
1306 #, no-wrap
1307 msgid "B<EIO>"
1308 msgstr "B<EIO>"
1309
1310 #. type: Plain text
1311 #: build/C/man2/fallocate.2:307
1312 msgid "An I/O error occurred while reading from or writing to a filesystem."
1313 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1314
1315 #. type: TP
1316 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1317 #: build/C/man3/posix_fallocate.3:87 build/C/man2/s390_pci_mmio_write.2:92
1318 #, no-wrap
1319 msgid "B<ENODEV>"
1320 msgstr "B<ENODEV>"
1321
1322 #. type: Plain text
1323 #: build/C/man2/fallocate.2:314
1324 msgid ""
1325 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1326 "or FIFO, a different error results.)"
1327 msgstr ""
1328 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1329 "を参照している場合、別のエラーが発生する)。"
1330
1331 #. type: TP
1332 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1333 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1334 #, no-wrap
1335 msgid "B<ENOSPC>"
1336 msgstr "B<ENOSPC>"
1337
1338 #. type: Plain text
1339 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1340 msgid ""
1341 "There is not enough space left on the device containing the file referred to "
1342 "by I<fd>."
1343 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1344
1345 #. type: Plain text
1346 #: build/C/man2/fallocate.2:323
1347 msgid "This kernel does not implement B<fallocate>()."
1348 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1349
1350 #. type: TP
1351 #: build/C/man2/fallocate.2:323
1352 #, no-wrap
1353 msgid "B<EOPNOTSUPP>"
1354 msgstr "B<EOPNOTSUPP>"
1355
1356 #. type: Plain text
1357 #: build/C/man2/fallocate.2:332
1358 msgid ""
1359 "The filesystem containing the file referred to by I<fd> does not support "
1360 "this operation; or the I<mode> is not supported by the filesystem containing "
1361 "the file referred to by I<fd>."
1362 msgstr ""
1363 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1364 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1365 "I<mode> をサポートしていない。"
1366
1367 #. type: TP
1368 #: build/C/man2/fallocate.2:332 build/C/man2/fallocate.2:338
1369 #: build/C/man2/fallocate.2:351 build/C/man2/mlock.2:143
1370 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/mmap.2:467
1371 #: build/C/man2/shmctl.2:353 build/C/man2/shmget.2:241
1372 #, no-wrap
1373 msgid "B<EPERM>"
1374 msgstr "B<EPERM>"
1375
1376 #. type: Plain text
1377 #: build/C/man2/fallocate.2:338
1378 msgid "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
1379 msgstr ""
1380 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1381 "(B<chattr>(1) 参照)。"
1382
1383 #. type: Plain text
1384 #: build/C/man2/fallocate.2:351
1385 msgid ""
1386 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1387 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1388 msgstr ""
1389 "I<mode> に B<FALLOC_FL_PUNCH_HOLE> か B<FALLOC_FL_COLLAPSE_RANGE> が指定され"
1390 "たが、 I<fd> が参照するファイルに追加のみ (append-only) の属性が付いている "
1391 "(B<chattr>(1) 参照)。"
1392
1393 #. type: Plain text
1394 #: build/C/man2/fallocate.2:355 build/C/man2/mmap.2:471
1395 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
1396 msgstr "操作が file seal により禁止されている。 B<fcntl>(2) 参照。"
1397
1398 #. type: TP
1399 #: build/C/man2/fallocate.2:355 build/C/man2/posix_fadvise.2:97
1400 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1401 #, no-wrap
1402 msgid "B<ESPIPE>"
1403 msgstr "B<ESPIPE>"
1404
1405 #. type: Plain text
1406 #: build/C/man2/fallocate.2:359
1407 msgid "I<fd> refers to a pipe or FIFO."
1408 msgstr "I<fd> がパイプか FIFO を参照している。"
1409
1410 #. type: TP
1411 #: build/C/man2/fallocate.2:359 build/C/man2/mmap.2:471
1412 #, no-wrap
1413 msgid "B<ETXTBSY>"
1414 msgstr "B<ETXTBSY>"
1415
1416 #. type: Plain text
1417 #: build/C/man2/fallocate.2:367
1418 msgid ""
1419 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1420 "I<fd> is currently being executed."
1421 msgstr ""
1422 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1423 "イルは現在実行中である。"
1424
1425 #. type: SH
1426 #: build/C/man2/fallocate.2:367 build/C/man2/madvise.2:325
1427 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1428 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1429 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1430 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1431 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1432 #: build/C/man2/sync_file_range.2:177 build/C/man2/memfd_create.2:155
1433 #: build/C/man2/s390_pci_mmio_write.2:98
1434 #, no-wrap
1435 msgid "VERSIONS"
1436 msgstr "バージョン"
1437
1438 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1439 #. type: Plain text
1440 #: build/C/man2/fallocate.2:375
1441 msgid ""
1442 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1443 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1444 "in glibc headers only since version 2.18."
1445 msgstr ""
1446 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1447 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1448 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1449
1450 #. type: Plain text
1451 #: build/C/man2/fallocate.2:378
1452 msgid "B<fallocate>()  is Linux-specific."
1453 msgstr "B<fallocate>()  は Linux 固有である。"
1454
1455 #. type: Plain text
1456 #: build/C/man2/fallocate.2:383
1457 msgid ""
1458 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1459 msgstr ""
1460 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1461
1462 #. type: TH
1463 #: build/C/man2/madvise.2:35
1464 #, no-wrap
1465 msgid "MADVISE"
1466 msgstr "MADVISE"
1467
1468 #. type: TH
1469 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1470 #, no-wrap
1471 msgid "2014-12-31"
1472 msgstr "2014-12-31"
1473
1474 #. type: Plain text
1475 #: build/C/man2/madvise.2:38
1476 msgid "madvise - give advice about use of memory"
1477 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1478
1479 #. type: Plain text
1480 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1481 #: build/C/man3/shm_open.3:31
1482 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1483 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1484
1485 #. type: Plain text
1486 #: build/C/man2/madvise.2:42
1487 msgid ""
1488 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1489 msgstr ""
1490 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1491
1492 #. type: Plain text
1493 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1494 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1495 msgid ""
1496 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1497 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1498
1499 #. type: Plain text
1500 #: build/C/man2/madvise.2:50
1501 msgid "B<madvise>(): _BSD_SOURCE"
1502 msgstr "B<madvise>(): _BSD_SOURCE"
1503
1504 #. type: Plain text
1505 #: build/C/man2/madvise.2:68
1506 msgid ""
1507 "The B<madvise>()  system call advises the kernel about how to handle paging "
1508 "input/output in the address range beginning at address I<addr> and with size "
1509 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1510 "to use some mapped or shared memory areas, so that the kernel can choose "
1511 "appropriate read-ahead and caching techniques.  This call does not influence "
1512 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1513 "but may influence its performance.  The kernel is free to ignore the advice."
1514 msgstr ""
1515 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1516 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1517 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1518 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1519 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1520 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1521 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1522
1523 #. type: Plain text
1524 #: build/C/man2/madvise.2:72
1525 msgid "The advice is indicated in the I<advice> argument which can be"
1526 msgstr ""
1527 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1528
1529 #. type: TP
1530 #: build/C/man2/madvise.2:72
1531 #, no-wrap
1532 msgid "B<MADV_NORMAL>"
1533 msgstr "B<MADV_NORMAL>"
1534
1535 #. type: Plain text
1536 #: build/C/man2/madvise.2:76
1537 msgid "No special treatment.  This is the default."
1538 msgstr "特別な扱いは行わない。これがデフォルトである。"
1539
1540 #. type: TP
1541 #: build/C/man2/madvise.2:76
1542 #, no-wrap
1543 msgid "B<MADV_RANDOM>"
1544 msgstr "B<MADV_RANDOM>"
1545
1546 #. type: Plain text
1547 #: build/C/man2/madvise.2:80
1548 msgid ""
1549 "Expect page references in random order.  (Hence, read ahead may be less "
1550 "useful than normally.)"
1551 msgstr ""
1552 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1553 "なさそうだ。)"
1554
1555 #. type: TP
1556 #: build/C/man2/madvise.2:80
1557 #, no-wrap
1558 msgid "B<MADV_SEQUENTIAL>"
1559 msgstr "B<MADV_SEQUENTIAL>"
1560
1561 #. type: Plain text
1562 #: build/C/man2/madvise.2:85
1563 msgid ""
1564 "Expect page references in sequential order.  (Hence, pages in the given "
1565 "range can be aggressively read ahead, and may be freed soon after they are "
1566 "accessed.)"
1567 msgstr ""
1568 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1569 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1570 "して良い。)"
1571
1572 #. type: TP
1573 #: build/C/man2/madvise.2:85
1574 #, no-wrap
1575 msgid "B<MADV_WILLNEED>"
1576 msgstr "B<MADV_WILLNEED>"
1577
1578 #. type: Plain text
1579 #: build/C/man2/madvise.2:89
1580 msgid ""
1581 "Expect access in the near future.  (Hence, it might be a good idea to read "
1582 "some pages ahead.)"
1583 msgstr ""
1584 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1585 "ておくといいだろう。)"
1586
1587 #. type: TP
1588 #: build/C/man2/madvise.2:89
1589 #, no-wrap
1590 msgid "B<MADV_DONTNEED>"
1591 msgstr "B<MADV_DONTNEED>"
1592
1593 #. type: Plain text
1594 #: build/C/man2/madvise.2:100
1595 msgid ""
1596 "Do not expect access in the near future.  (For the time being, the "
1597 "application is finished with the given range, so the kernel can free "
1598 "resources associated with it.)  Subsequent accesses of pages in this range "
1599 "will succeed, but will result either in reloading of the memory contents "
1600 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1601 "pages for mappings without an underlying file."
1602 msgstr ""
1603 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1604 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1605 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1606 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1607 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1608 "なる。"
1609
1610 #. type: TP
1611 #: build/C/man2/madvise.2:100
1612 #, no-wrap
1613 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1614 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1615
1616 #.  2.6.18-rc5
1617 #.  Databases want to use this feature to drop a section of their
1618 #.  bufferpool (shared memory segments) - without writing back to
1619 #.  disk/swap space.  This feature is also useful for supporting
1620 #.  hot-plug memory on UML.
1621 #. type: Plain text
1622 #: build/C/man2/madvise.2:113
1623 msgid ""
1624 "Free up a given range of pages and its associated backing store.  Currently, "
1625 "only shmfs/tmpfs supports this; other filesystems return with the error "
1626 "B<ENOSYS>."
1627 msgstr ""
1628 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1629 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1630 "返される。"
1631
1632 #. type: TP
1633 #: build/C/man2/madvise.2:113
1634 #, no-wrap
1635 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1636 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1637
1638 #.  See http://lwn.net/Articles/171941/
1639 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1640 #.  Currently, copy-on-write may change the physical address of
1641 #.  a page even if the user requested that the page is pinned in
1642 #.  memory (either by mlock or by get_user_pages).  This happens
1643 #.  if the process forks meanwhile, and the parent writes to that
1644 #.  page.  As a result, the page is orphaned: in case of
1645 #.  get_user_pages, the application will never see any data hardware
1646 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1647 #.  the parent is not getting the realtime/security benefits of mlock.
1648 #.  In particular, this affects the Infiniband modules which do DMA from
1649 #.  and into user pages all the time.
1650 #.  This patch adds madvise options to control whether memory range is
1651 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1652 #.  from/into these pages.  Could also be useful to an application
1653 #.  wanting to speed up its forks by cutting large areas out of
1654 #.  consideration.
1655 #.  SEE ALSO: http://lwn.net/Articles/171941/
1656 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1657 #. type: Plain text
1658 #: build/C/man2/madvise.2:144
1659 msgid ""
1660 "Do not make the pages in this range available to the child after a "
1661 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1662 "the physical location of a page(s) if the parent writes to it after a "
1663 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1664 "into the page(s).)"
1665 msgstr ""
1666 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1667 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1668 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1669 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1670 "を行うような場合に 問題を起こすことがある)。"
1671
1672 #. type: TP
1673 #: build/C/man2/madvise.2:144
1674 #, no-wrap
1675 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1676 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1677
1678 #. type: Plain text
1679 #: build/C/man2/madvise.2:150
1680 msgid ""
1681 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1682 "a mapping is inherited across B<fork>(2)."
1683 msgstr ""
1684 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1685 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1686
1687 #. type: TP
1688 #: build/C/man2/madvise.2:150
1689 #, no-wrap
1690 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1691 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1692
1693 #. type: Plain text
1694 #: build/C/man2/madvise.2:162
1695 msgid ""
1696 "Poison a page and handle it like a hardware memory corruption.  This "
1697 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1698 "This operation may result in the calling process receiving a B<SIGBUS> and "
1699 "the page being unmapped.  This feature is intended for testing of memory "
1700 "error-handling code; it is available only if the kernel was configured with "
1701 "B<CONFIG_MEMORY_FAILURE>."
1702 msgstr ""
1703 "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 "
1704 "この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操"
1705 "作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップさ"
1706 "れる。 この機能はメモリのエラー処理コードをテストするためのものである。 カー"
1707 "ネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1708
1709 #. type: TP
1710 #: build/C/man2/madvise.2:162
1711 #, no-wrap
1712 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1713 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1714
1715 #. type: Plain text
1716 #: build/C/man2/madvise.2:180
1717 msgid ""
1718 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1719 "memory of each page in the specified range is preserved (i.e., when next "
1720 "accessed, the same content will be visible, but in a new physical page "
1721 "frame), and the original page is offlined (i.e., no longer used, and taken "
1722 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1723 "operation is invisible to (i.e., does not change the semantics of)  the "
1724 "calling process.  This feature is intended for testing of memory error-"
1725 "handling code; it is available only if the kernel was configured with "
1726 "B<CONFIG_MEMORY_FAILURE>."
1727 msgstr ""
1728 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1729 "された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際"
1730 "に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフ"
1731 "ラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り"
1732 "除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない "
1733 "(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理"
1734 "コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> "
1735 "が有効になっている場合にのみ利用可能である。"
1736
1737 #. type: TP
1738 #: build/C/man2/madvise.2:180
1739 #, no-wrap
1740 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1741 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1742
1743 #. type: Plain text
1744 #: build/C/man2/madvise.2:205
1745 msgid ""
1746 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1747 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1748 "memory that have been marked as mergeable, looking for pages with identical "
1749 "content.  These are replaced by a single write-protected page (which is "
1750 "automatically copied if a process later wants to update the content of the "
1751 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1752 "feature is intended for applications that generate many instances of the "
1753 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1754 "of processing power; use with care.  See the Linux kernel source file "
1755 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1756 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1757 "configured with B<CONFIG_KSM>."
1758 msgstr ""
1759 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1760 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1761 "いたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内"
1762 "容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) が"
1763 "かかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよう"
1764 "とした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ペー"
1765 "ジ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデー"
1766 "タのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) "
1767 "での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があ"
1768 "り、注意して使用すること。 詳細は Linux カーネルソースファイル "
1769 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1770 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1771 "る場合にのみ利用できる。"
1772
1773 #. type: TP
1774 #: build/C/man2/madvise.2:205
1775 #, no-wrap
1776 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1777 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1778
1779 #. type: Plain text
1780 #: build/C/man2/madvise.2:214
1781 msgid ""
1782 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1783 "address range; KSM unmerges whatever pages it had merged in the address "
1784 "range specified by I<addr> and I<length>."
1785 msgstr ""
1786 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1787 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1788 "済みのすべてのページの統合解除を行う。"
1789
1790 #. type: TP
1791 #: build/C/man2/madvise.2:214
1792 #, no-wrap
1793 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1794 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1795
1796 #.  http://lwn.net/Articles/358904/
1797 #.  https://lwn.net/Articles/423584/
1798 #. type: Plain text
1799 #: build/C/man2/madvise.2:243
1800 msgid ""
1801 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1802 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1803 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1804 "the areas marked as huge page candidates to replace them with huge pages.  "
1805 "The kernel will also allocate huge pages directly when the region is "
1806 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1807 "feature is primarily aimed at applications that use large mappings of data "
1808 "and access large regions of that memory at a time (e.g., virtualization "
1809 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1810 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1811 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1812 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1813 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1814 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1815 msgstr ""
1816 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1817 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1818 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1819 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1820 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1821 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1822 "マッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリ"
1823 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1824 "る。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセ"
1825 "スしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってし"
1826 "まう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1827 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1828 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1829 "る。"
1830
1831 #. type: TP
1832 #: build/C/man2/madvise.2:243
1833 #, no-wrap
1834 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1835 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1836
1837 #. type: Plain text
1838 #: build/C/man2/madvise.2:250
1839 msgid ""
1840 "Ensures that memory in the address range specified by I<addr> and I<length> "
1841 "will not be collapsed into huge pages."
1842 msgstr ""
1843 "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込"
1844 "まれないようにする。"
1845
1846 #. type: TP
1847 #: build/C/man2/madvise.2:250
1848 #, no-wrap
1849 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1850 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1851
1852 #. type: Plain text
1853 #: build/C/man2/madvise.2:264
1854 msgid ""
1855 "Exclude from a core dump those pages in the range specified by I<addr> and "
1856 "I<length>.  This is useful in applications that have large areas of memory "
1857 "that are known not to be useful in a core dump.  The effect of "
1858 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1859 "proc/PID/coredump_filter> file (see B<core>(5))."
1860 msgstr ""
1861 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1862 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域がある"
1863 "アプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1864 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1865 "(B<core>(5) 参照)。"
1866
1867 #. type: TP
1868 #: build/C/man2/madvise.2:264
1869 #, no-wrap
1870 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1871 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1872
1873 #. type: Plain text
1874 #: build/C/man2/madvise.2:268
1875 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1876 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1877
1878 #. type: Plain text
1879 #: build/C/man2/madvise.2:275
1880 msgid ""
1881 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1882 "is set appropriately."
1883 msgstr ""
1884 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1885 "を適切な値に設定する。"
1886
1887 #. type: TP
1888 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1889 #: build/C/man2/mremap.2:136
1890 #, no-wrap
1891 msgid "B<EAGAIN>"
1892 msgstr "B<EAGAIN>"
1893
1894 #. type: Plain text
1895 #: build/C/man2/madvise.2:279
1896 msgid "A kernel resource was temporarily unavailable."
1897 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1898
1899 #. type: Plain text
1900 #: build/C/man2/madvise.2:282
1901 msgid "The map exists, but the area maps something that isn't a file."
1902 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1903
1904 #. type: Plain text
1905 #: build/C/man2/madvise.2:285
1906 msgid "This error can occur for the following reasons:"
1907 msgstr "このエラーは以下の理由で発生する。"
1908
1909 #.  .I len
1910 #.  is zero,
1911 #. type: Plain text
1912 #: build/C/man2/madvise.2:292
1913 msgid "The value I<len> is negative."
1914 msgstr "I<len> が負の値である。"
1915
1916 #. type: Plain text
1917 #: build/C/man2/madvise.2:295
1918 msgid "I<addr> is not page-aligned."
1919 msgstr "I<addr> がページ境界ではない。"
1920
1921 #. type: Plain text
1922 #: build/C/man2/madvise.2:298
1923 msgid "I<advice> is not a valid value"
1924 msgstr "I<advice> が有効な値でない。"
1925
1926 #. type: Plain text
1927 #: build/C/man2/madvise.2:301
1928 msgid ""
1929 "The application is attempting to release locked or shared pages (with "
1930 "B<MADV_DONTNEED>)."
1931 msgstr ""
1932 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1933 "放\n"
1934 "しようとしている。"
1935
1936 #. type: Plain text
1937 #: build/C/man2/madvise.2:309
1938 msgid ""
1939 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1940 "kernel was not configured with B<CONFIG_KSM>."
1941 msgstr ""
1942 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1943 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1944
1945 #. type: Plain text
1946 #: build/C/man2/madvise.2:316
1947 msgid ""
1948 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1949 "maximum resident set size."
1950 msgstr ""
1951 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1952 "(resident set size) の最大値を越えてしまう。"
1953
1954 #. type: TP
1955 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1956 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1957 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1958 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1959 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1960 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1961 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1962 #: build/C/man2/sync_file_range.2:163 build/C/man2/memfd_create.2:152
1963 #: build/C/man2/s390_pci_mmio_write.2:95
1964 #, no-wrap
1965 msgid "B<ENOMEM>"
1966 msgstr "B<ENOMEM>"
1967
1968 #. type: Plain text
1969 #: build/C/man2/madvise.2:321
1970 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1971 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1972
1973 #. type: Plain text
1974 #: build/C/man2/madvise.2:325
1975 msgid ""
1976 "Addresses in the specified range are not currently mapped, or are outside "
1977 "the address space of the process."
1978 msgstr ""
1979 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1980 "空間の内部にない。"
1981
1982 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1983 #. type: Plain text
1984 #: build/C/man2/madvise.2:332
1985 msgid ""
1986 "Since Linux 3.18, support for this system call is optional, depending on the "
1987 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1988 msgstr ""
1989 "Linux 3.18 以降では、このシステムコールのサポートは任意となり、利用できるかは"
1990 "カーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされてい"
1991 "るかに依存する。"
1992
1993 #.  FIXME . Write a posix_madvise(3) page.
1994 #. type: Plain text
1995 #: build/C/man2/madvise.2:345
1996 msgid ""
1997 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1998 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1999 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
2000 "access."
2001 msgstr ""
2002 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
2003 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
2004 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
2005 "類似の関数が存在する。"
2006
2007 #. type: Plain text
2008 #: build/C/man2/madvise.2:354
2009 msgid ""
2010 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
2011 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
2012 msgstr ""
2013 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
2014 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
2015
2016 #. type: SS
2017 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
2018 #: build/C/man2/shmget.2:370
2019 #, no-wrap
2020 msgid "Linux notes"
2021 msgstr "Linux での注意"
2022
2023 #. type: Plain text
2024 #: build/C/man2/madvise.2:363
2025 msgid ""
2026 "The current Linux implementation (2.4.0) views this system call more as a "
2027 "command than as advice and hence may return an error when it cannot do what "
2028 "it usually would do in response to this advice.  (See the ERRORS description "
2029 "above.)  This is nonstandard behavior."
2030 msgstr ""
2031 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2032 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2033 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2034 "とは異なる。"
2035
2036 #.  .SH HISTORY
2037 #.  The
2038 #.  .BR madvise ()
2039 #.  function first appeared in 4.4BSD.
2040 #. type: Plain text
2041 #: build/C/man2/madvise.2:379
2042 msgid ""
2043 "The Linux implementation requires that the address I<addr> be page-aligned, "
2044 "and allows I<length> to be zero.  If there are some parts of the specified "
2045 "address range that are not mapped, the Linux version of B<madvise>()  "
2046 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2047 "the system call, as it should)."
2048 msgstr ""
2049 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2050 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2051 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2052 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2053 "返す)。"
2054
2055 #. type: Plain text
2056 #: build/C/man2/madvise.2:388
2057 msgid ""
2058 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2059 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2060 msgstr ""
2061 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2062 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2063
2064 #. type: TH
2065 #: build/C/man3/mallinfo.3:26
2066 #, no-wrap
2067 msgid "MALLINFO"
2068 msgstr "MALLINFO"
2069
2070 #. type: TH
2071 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2072 #, no-wrap
2073 msgid "2012-05-06"
2074 msgstr "2012-05-06"
2075
2076 #. type: Plain text
2077 #: build/C/man3/mallinfo.3:29
2078 msgid "mallinfo - obtain memory allocation information"
2079 msgstr "mallinfo - メモリ割り当て情報を取得する"
2080
2081 #. type: Plain text
2082 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2083 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2084 #: build/C/man3/mallopt.3:31
2085 msgid "B<#include E<lt>malloc.hE<gt>>"
2086 msgstr "B<#include E<lt>malloc.hE<gt>>"
2087
2088 #. type: Plain text
2089 #: build/C/man3/mallinfo.3:33
2090 msgid "B<struct mallinfo mallinfo(void);>"
2091 msgstr "B<struct mallinfo mallinfo(void);>"
2092
2093 #. type: Plain text
2094 #: build/C/man3/mallinfo.3:41
2095 msgid ""
2096 "The B<mallinfo>()  function returns a copy of a structure containing "
2097 "information about memory allocations performed by B<malloc>(3)  and related "
2098 "functions.  This structure is defined as follows:"
2099 msgstr ""
2100 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
2101 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2102 "この構造体は以下のように定義されている。"
2103
2104 #. type: Plain text
2105 #: build/C/man3/mallinfo.3:56
2106 #, no-wrap
2107 msgid ""
2108 "struct mallinfo {\n"
2109 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2110 "    int ordblks;   /* Number of free chunks */\n"
2111 "    int smblks;    /* Number of free fastbin blocks */\n"
2112 "    int hblks;     /* Number of mmapped regions */\n"
2113 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2114 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2115 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2116 "    int uordblks;  /* Total allocated space (bytes) */\n"
2117 "    int fordblks;  /* Total free space (bytes) */\n"
2118 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2119 "};\n"
2120 msgstr ""
2121 "struct mallinfo {\n"
2122 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2123 "    int ordblks;   /* Number of free chunks */\n"
2124 "    int smblks;    /* Number of free fastbin blocks */\n"
2125 "    int hblks;     /* Number of mmapped regions */\n"
2126 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2127 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2128 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2129 "    int uordblks;  /* Total allocated space (bytes) */\n"
2130 "    int fordblks;  /* Total free space (bytes) */\n"
2131 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2132 "};\n"
2133
2134 #. type: Plain text
2135 #: build/C/man3/mallinfo.3:62
2136 msgid ""
2137 "The fields of the I<mallinfo> structure contain the following information:"
2138 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2139
2140 #. type: TP
2141 #: build/C/man3/mallinfo.3:62
2142 #, no-wrap
2143 msgid "I<arena>"
2144 msgstr "I<arena>"
2145
2146 #. type: Plain text
2147 #: build/C/man3/mallinfo.3:68
2148 msgid ""
2149 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2150 "memory allocated on the heap).  This figure includes both in-use blocks and "
2151 "blocks on the free list."
2152 msgstr ""
2153
2154 #. type: TP
2155 #: build/C/man3/mallinfo.3:68
2156 #, no-wrap
2157 msgid "I<ordblks>"
2158 msgstr "I<ordblks>"
2159
2160 #. type: Plain text
2161 #: build/C/man3/mallinfo.3:71
2162 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2163 msgstr ""
2164
2165 #. type: TP
2166 #: build/C/man3/mallinfo.3:71
2167 #, no-wrap
2168 msgid "I<smblks>"
2169 msgstr "I<smblks>"
2170
2171 #. type: Plain text
2172 #: build/C/man3/mallinfo.3:75
2173 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2174 msgstr ""
2175
2176 #. type: TP
2177 #: build/C/man3/mallinfo.3:75
2178 #, no-wrap
2179 msgid "I<hblks>"
2180 msgstr "I<hblks>"
2181
2182 #. type: Plain text
2183 #: build/C/man3/mallinfo.3:83
2184 msgid ""
2185 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2186 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2187 msgstr ""
2188
2189 #. type: TP
2190 #: build/C/man3/mallinfo.3:83
2191 #, no-wrap
2192 msgid "I<hblkhd>"
2193 msgstr "I<hblkhd>"
2194
2195 #. type: Plain text
2196 #: build/C/man3/mallinfo.3:87
2197 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2198 msgstr ""
2199
2200 #. type: TP
2201 #: build/C/man3/mallinfo.3:87
2202 #, no-wrap
2203 msgid "I<usmblks>"
2204 msgstr "I<usmblks>"
2205
2206 #. type: Plain text
2207 #: build/C/man3/mallinfo.3:92
2208 msgid ""
2209 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2210 "of space that was ever allocated.  This field is maintained only in "
2211 "nonthreading environments."
2212 msgstr ""
2213
2214 #. type: TP
2215 #: build/C/man3/mallinfo.3:92
2216 #, no-wrap
2217 msgid "I<fsmblks>"
2218 msgstr "I<fsmblks>"
2219
2220 #. type: Plain text
2221 #: build/C/man3/mallinfo.3:95
2222 msgid "The total number of bytes in fastbin free blocks."
2223 msgstr ""
2224
2225 #. type: TP
2226 #: build/C/man3/mallinfo.3:95
2227 #, no-wrap
2228 msgid "I<uordblks>"
2229 msgstr "I<uordblks>"
2230
2231 #. type: Plain text
2232 #: build/C/man3/mallinfo.3:98
2233 msgid "The total number of bytes used by in-use allocations."
2234 msgstr ""
2235
2236 #. type: TP
2237 #: build/C/man3/mallinfo.3:98
2238 #, no-wrap
2239 msgid "I<fordblks>"
2240 msgstr "I<fordblks>"
2241
2242 #. type: Plain text
2243 #: build/C/man3/mallinfo.3:101
2244 msgid "The total number of bytes in free blocks."
2245 msgstr ""
2246
2247 #. type: TP
2248 #: build/C/man3/mallinfo.3:101
2249 #, no-wrap
2250 msgid "I<keepcost>"
2251 msgstr "I<keepcost>"
2252
2253 #.  .SH VERSIONS
2254 #.  Available already in glibc 2.0, possibly earlier
2255 #. type: Plain text
2256 #: build/C/man3/mallinfo.3:110
2257 msgid ""
2258 "The total amount of releasable free space at the top of the heap.  This is "
2259 "the maximum number of bytes that could ideally (i.e., ignoring page "
2260 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2261 msgstr ""
2262
2263 #. type: Plain text
2264 #: build/C/man3/mallinfo.3:114
2265 msgid ""
2266 "This function is not specified by POSIX or the C standards.  A similar "
2267 "function exists on many System V derivatives, and was specified in the SVID."
2268 msgstr ""
2269
2270 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2271 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2272 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2273 #.  on libc-alpha@sourceware.org
2274 #. type: Plain text
2275 #: build/C/man3/mallinfo.3:126
2276 msgid ""
2277 "B<Information is returned for only the main memory allocation area.> "
2278 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2279 "B<malloc_info>(3)  for alternatives that include information about other "
2280 "arenas."
2281 msgstr ""
2282
2283 #. type: Plain text
2284 #: build/C/man3/mallinfo.3:134
2285 msgid ""
2286 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2287 "because some internal bookkeeping values may be of type I<long>, the "
2288 "reported values may wrap around zero and thus be inaccurate."
2289 msgstr ""
2290
2291 #. type: SH
2292 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2293 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2294 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:633
2295 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2296 #: build/C/man2/memfd_create.2:293
2297 #, no-wrap
2298 msgid "EXAMPLE"
2299 msgstr "例"
2300
2301 #. type: Plain text
2302 #: build/C/man3/mallinfo.3:140
2303 msgid ""
2304 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2305 "statistics before and after allocating and freeing some blocks of memory.  "
2306 "The statistics are displayed on standard output."
2307 msgstr ""
2308
2309 #. type: Plain text
2310 #: build/C/man3/mallinfo.3:144
2311 msgid ""
2312 "The first two command-line arguments specify the number and size of blocks "
2313 "to be allocated with B<malloc>(3)."
2314 msgstr ""
2315
2316 #. type: Plain text
2317 #: build/C/man3/mallinfo.3:158
2318 msgid ""
2319 "The remaining three arguments specify which of the allocated blocks should "
2320 "be freed with B<free>(3).  These three arguments are optional, and specify "
2321 "(in order): the step size to be used in the loop that frees blocks (the "
2322 "default is 1, meaning free all blocks in the range); the ordinal position of "
2323 "the first block to be freed (default 0, meaning the first allocated block); "
2324 "and a number one greater than the ordinal position of the last block to be "
2325 "freed (default is one greater than the maximum block number).  If these "
2326 "three arguments are omitted, then the defaults cause all allocated blocks to "
2327 "be freed."
2328 msgstr ""
2329
2330 #. type: Plain text
2331 #: build/C/man3/mallinfo.3:162
2332 msgid ""
2333 "In the following example run of the program, 1000 allocations of 100 bytes "
2334 "are performed, and then every second allocated block is freed:"
2335 msgstr ""
2336
2337 #. type: Plain text
2338 #: build/C/man3/mallinfo.3:177
2339 #, no-wrap
2340 msgid ""
2341 "$ B<./a.out 1000 100 2>\n"
2342 "============== Before allocating blocks ==============\n"
2343 "Total non-mmapped bytes (arena):       0\n"
2344 "# of free chunks (ordblks):            1\n"
2345 "# of free fastbin blocks (smblks):     0\n"
2346 "# of mapped regions (hblks):           0\n"
2347 "Bytes in mapped regions (hblkhd):      0\n"
2348 "Max. total allocated space (usmblks):  0\n"
2349 "Free bytes held in fastbins (fsmblks): 0\n"
2350 "Total allocated space (uordblks):      0\n"
2351 "Total free space (fordblks):           0\n"
2352 "Topmost releasable block (keepcost):   0\n"
2353 msgstr ""
2354 "$ B<./a.out 1000 100 2>\n"
2355 "============== Before allocating blocks ==============\n"
2356 "Total non-mmapped bytes (arena):       0\n"
2357 "# of free chunks (ordblks):            1\n"
2358 "# of free fastbin blocks (smblks):     0\n"
2359 "# of mapped regions (hblks):           0\n"
2360 "Bytes in mapped regions (hblkhd):      0\n"
2361 "Max. total allocated space (usmblks):  0\n"
2362 "Free bytes held in fastbins (fsmblks): 0\n"
2363 "Total allocated space (uordblks):      0\n"
2364 "Total free space (fordblks):           0\n"
2365 "Topmost releasable block (keepcost):   0\n"
2366
2367 #. type: Plain text
2368 #: build/C/man3/mallinfo.3:189
2369 #, no-wrap
2370 msgid ""
2371 "============== After allocating blocks ==============\n"
2372 "Total non-mmapped bytes (arena):       135168\n"
2373 "# of free chunks (ordblks):            1\n"
2374 "# of free fastbin blocks (smblks):     0\n"
2375 "# of mapped regions (hblks):           0\n"
2376 "Bytes in mapped regions (hblkhd):      0\n"
2377 "Max. total allocated space (usmblks):  0\n"
2378 "Free bytes held in fastbins (fsmblks): 0\n"
2379 "Total allocated space (uordblks):      104000\n"
2380 "Total free space (fordblks):           31168\n"
2381 "Topmost releasable block (keepcost):   31168\n"
2382 msgstr ""
2383 "============== After allocating blocks ==============\n"
2384 "Total non-mmapped bytes (arena):       135168\n"
2385 "# of free chunks (ordblks):            1\n"
2386 "# of free fastbin blocks (smblks):     0\n"
2387 "# of mapped regions (hblks):           0\n"
2388 "Bytes in mapped regions (hblkhd):      0\n"
2389 "Max. total allocated space (usmblks):  0\n"
2390 "Free bytes held in fastbins (fsmblks): 0\n"
2391 "Total allocated space (uordblks):      104000\n"
2392 "Total free space (fordblks):           31168\n"
2393 "Topmost releasable block (keepcost):   31168\n"
2394
2395 #. type: Plain text
2396 #: build/C/man3/mallinfo.3:201
2397 #, no-wrap
2398 msgid ""
2399 "============== After freeing blocks ==============\n"
2400 "Total non-mmapped bytes (arena):       135168\n"
2401 "# of free chunks (ordblks):            501\n"
2402 "# of free fastbin blocks (smblks):     0\n"
2403 "# of mapped regions (hblks):           0\n"
2404 "Bytes in mapped regions (hblkhd):      0\n"
2405 "Max. total allocated space (usmblks):  0\n"
2406 "Free bytes held in fastbins (fsmblks): 0\n"
2407 "Total allocated space (uordblks):      52000\n"
2408 "Total free space (fordblks):           83168\n"
2409 "Topmost releasable block (keepcost):   31168\n"
2410 msgstr ""
2411 "============== After freeing blocks ==============\n"
2412 "Total non-mmapped bytes (arena):       135168\n"
2413 "# of free chunks (ordblks):            501\n"
2414 "# of free fastbin blocks (smblks):     0\n"
2415 "# of mapped regions (hblks):           0\n"
2416 "Bytes in mapped regions (hblkhd):      0\n"
2417 "Max. total allocated space (usmblks):  0\n"
2418 "Free bytes held in fastbins (fsmblks): 0\n"
2419 "Total allocated space (uordblks):      52000\n"
2420 "Total free space (fordblks):           83168\n"
2421 "Topmost releasable block (keepcost):   31168\n"
2422
2423 #. type: SS
2424 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2425 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2426 #: build/C/man2/mmap.2:645 build/C/man2/mprotect.2:164
2427 #, no-wrap
2428 msgid "Program source"
2429 msgstr "プログラムのソース"
2430
2431 #. type: Plain text
2432 #: build/C/man3/mallinfo.3:208
2433 #, no-wrap
2434 msgid ""
2435 "#include E<lt>malloc.hE<gt>\n"
2436 "#include \"tlpi_hdr.h\"\n"
2437 msgstr ""
2438 "#include E<lt>malloc.hE<gt>\n"
2439 "#include \"tlpi_hdr.h\"\n"
2440
2441 #. type: Plain text
2442 #: build/C/man3/mallinfo.3:213
2443 #, no-wrap
2444 msgid ""
2445 "static void\n"
2446 "display_mallinfo(void)\n"
2447 "{\n"
2448 "    struct mallinfo mi;\n"
2449 msgstr ""
2450 "static void\n"
2451 "display_mallinfo(void)\n"
2452 "{\n"
2453 "    struct mallinfo mi;\n"
2454
2455 #. type: Plain text
2456 #: build/C/man3/mallinfo.3:215
2457 #, no-wrap
2458 msgid "    mi = mallinfo();\n"
2459 msgstr "    mi = mallinfo();\n"
2460
2461 #. type: Plain text
2462 #: build/C/man3/mallinfo.3:227
2463 #, no-wrap
2464 msgid ""
2465 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2466 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2467 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2468 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2469 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2470 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2471 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2472 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2473 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2474 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2475 "}\n"
2476 msgstr ""
2477 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2478 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2479 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2480 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2481 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2482 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2483 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2484 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2485 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2486 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2487 "}\n"
2488
2489 #. type: Plain text
2490 #: build/C/man3/mallinfo.3:235
2491 #, no-wrap
2492 msgid ""
2493 "int\n"
2494 "main(int argc, char *argv[])\n"
2495 "{\n"
2496 "#define MAX_ALLOCS 2000000\n"
2497 "    char *alloc[MAX_ALLOCS];\n"
2498 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2499 "    size_t blockSize;\n"
2500 msgstr ""
2501 "int\n"
2502 "main(int argc, char *argv[])\n"
2503 "{\n"
2504 "#define MAX_ALLOCS 2000000\n"
2505 "    char *alloc[MAX_ALLOCS];\n"
2506 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2507 "    size_t blockSize;\n"
2508
2509 #. type: Plain text
2510 #: build/C/man3/mallinfo.3:239
2511 #, no-wrap
2512 msgid ""
2513 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2514 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2515 "                \"[end-free]]]\\en\", argv[0]);\n"
2516 msgstr ""
2517 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2518 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2519 "                \"[end-free]]]\\en\", argv[0]);\n"
2520
2521 #. type: Plain text
2522 #: build/C/man3/mallinfo.3:245
2523 #, no-wrap
2524 msgid ""
2525 "    numBlocks = atoi(argv[1]);\n"
2526 "    blockSize = atoi(argv[2]);\n"
2527 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2528 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2529 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2530 msgstr ""
2531 "    numBlocks = atoi(argv[1]);\n"
2532 "    blockSize = atoi(argv[2]);\n"
2533 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2534 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2535 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2536
2537 #. type: Plain text
2538 #: build/C/man3/mallinfo.3:248
2539 #, no-wrap
2540 msgid ""
2541 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2542 "    display_mallinfo();\n"
2543 msgstr ""
2544 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2545 "    display_mallinfo();\n"
2546
2547 #. type: Plain text
2548 #: build/C/man3/mallinfo.3:252
2549 #, no-wrap
2550 msgid ""
2551 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2552 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2553 "            fatal(\"Too many allocations\");\n"
2554 msgstr ""
2555 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2556 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2557 "            fatal(\"Too many allocations\");\n"
2558
2559 #. type: Plain text
2560 #: build/C/man3/mallinfo.3:257
2561 #, no-wrap
2562 msgid ""
2563 "        alloc[j] = malloc(blockSize);\n"
2564 "        if (alloc[j] == NULL)\n"
2565 "            errExit(\"malloc\");\n"
2566 "    }\n"
2567 msgstr ""
2568 "        alloc[j] = malloc(blockSize);\n"
2569 "        if (alloc[j] == NULL)\n"
2570 "            errExit(\"malloc\");\n"
2571 "    }\n"
2572
2573 #. type: Plain text
2574 #: build/C/man3/mallinfo.3:260
2575 #, no-wrap
2576 msgid ""
2577 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2578 "    display_mallinfo();\n"
2579 msgstr ""
2580 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2581 "    display_mallinfo();\n"
2582
2583 #. type: Plain text
2584 #: build/C/man3/mallinfo.3:263
2585 #, no-wrap
2586 msgid ""
2587 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2588 "        free(alloc[j]);\n"
2589 msgstr ""
2590 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2591 "        free(alloc[j]);\n"
2592
2593 #. type: Plain text
2594 #: build/C/man3/mallinfo.3:266
2595 #, no-wrap
2596 msgid ""
2597 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2598 "    display_mallinfo();\n"
2599 msgstr ""
2600 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2601 "    display_mallinfo();\n"
2602
2603 #. type: Plain text
2604 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2605 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2606 #: build/C/man2/mmap.2:714 build/C/man2/memfd_create.2:437
2607 #: build/C/man2/memfd_create.2:486
2608 #, no-wrap
2609 msgid ""
2610 "    exit(EXIT_SUCCESS);\n"
2611 "}\n"
2612 msgstr ""
2613 "    exit(EXIT_SUCCESS);\n"
2614 "}\n"
2615
2616 #. type: Plain text
2617 #: build/C/man3/mallinfo.3:279
2618 msgid ""
2619 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2620 "B<malloc_trim>(3), B<mallopt>(3)"
2621 msgstr ""
2622 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2623 "B<malloc_trim>(3), B<mallopt>(3)"
2624
2625 #. type: TH
2626 #: build/C/man3/malloc_get_state.3:25
2627 #, no-wrap
2628 msgid "MALLOC_GET_STATE"
2629 msgstr "MALLOC_GET_STATE"
2630
2631 #. type: TH
2632 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2633 #, no-wrap
2634 msgid "2014-06-13"
2635 msgstr "2014-06-13"
2636
2637 #. type: Plain text
2638 #: build/C/man3/malloc_get_state.3:28
2639 msgid ""
2640 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2641 "implementation"
2642 msgstr ""
2643
2644 #. type: Plain text
2645 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2646 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2647 #, no-wrap
2648 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2649 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2650
2651 #. type: Plain text
2652 #: build/C/man3/malloc_get_state.3:33
2653 #, no-wrap
2654 msgid "B<void* malloc_get_state(void);>\n"
2655 msgstr "B<void* malloc_get_state(void);>\n"
2656
2657 #. type: Plain text
2658 #: build/C/man3/malloc_get_state.3:35
2659 #, no-wrap
2660 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2661 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2662
2663 #. type: Plain text
2664 #: build/C/man3/malloc_get_state.3:53
2665 msgid ""
2666 "The B<malloc_get_state>()  function records the current state of all "
2667 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2668 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2669 "is recorded in a system-dependent opaque data structure dynamically "
2670 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2671 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2672 "this memory.)"
2673 msgstr ""
2674
2675 #. type: Plain text
2676 #: build/C/man3/malloc_get_state.3:61
2677 msgid ""
2678 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2679 "internal bookkeeping variables to the values recorded in the opaque data "
2680 "structure pointed to by I<state>."
2681 msgstr ""
2682
2683 #. type: Plain text
2684 #: build/C/man3/malloc_get_state.3:68
2685 msgid ""
2686 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2687 "opaque data structure.  On error (for example, memory could not be allocated "
2688 "for the data structure), B<malloc_get_state>()  returns NULL."
2689 msgstr ""
2690
2691 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2692 #.  /* Must fail if the major version is too high. */
2693 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2694 #. type: Plain text
2695 #: build/C/man3/malloc_get_state.3:86
2696 msgid ""
2697 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2698 "that I<state> does not point to a correctly formed data structure, "
2699 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2700 "version of the data structure referred to by I<state> is a more recent "
2701 "version than this implementation knows about, B<malloc_set_state>()  returns "
2702 "-2."
2703 msgstr ""
2704
2705 #. type: Plain text
2706 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2707 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2708 msgid "These functions are GNU extensions."
2709 msgstr "これらの関数は GNU による拡張である。"
2710
2711 #. type: Plain text
2712 #: build/C/man3/malloc_get_state.3:94
2713 msgid ""
2714 "These functions are useful when using this B<malloc>(3)  implementation as "
2715 "part of a shared library, and the heap contents are saved/restored via some "
2716 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2717 "\" function."
2718 msgstr ""
2719
2720 #.  i.e., calls __malloc_check_init()
2721 #.  i.e., malloc checking is not already in use
2722 #.  and the caller requested malloc checking
2723 #. type: Plain text
2724 #: build/C/man3/malloc_get_state.3:111
2725 msgid ""
2726 "Hook function pointers are never saved or restored by these functions, with "
2727 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2728 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2729 "checking hooks if possible; if malloc checking was not in use in the "
2730 "recorded state, but the caller has requested malloc checking, then the hooks "
2731 "are reset to 0."
2732 msgstr ""
2733
2734 #. type: Plain text
2735 #: build/C/man3/malloc_get_state.3:114
2736 msgid "B<malloc>(3), B<mallopt>(3)"
2737 msgstr "B<malloc>(3), B<mallopt>(3)"
2738
2739 #. type: TH
2740 #: build/C/man3/malloc_hook.3:10
2741 #, no-wrap
2742 msgid "MALLOC_HOOK"
2743 msgstr "MALLOC_HOOK"
2744
2745 #. type: TH
2746 #: build/C/man3/malloc_hook.3:10
2747 #, no-wrap
2748 msgid "2010-10-13"
2749 msgstr "2010-10-13"
2750
2751 #. type: Plain text
2752 #: build/C/man3/malloc_hook.3:15
2753 msgid ""
2754 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2755 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2756 msgstr ""
2757 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2758 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2759
2760 #. type: Plain text
2761 #: build/C/man3/malloc_hook.3:20
2762 #, no-wrap
2763 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2764 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2765
2766 #. type: Plain text
2767 #: build/C/man3/malloc_hook.3:23
2768 #, no-wrap
2769 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2770 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2771
2772 #. type: Plain text
2773 #: build/C/man3/malloc_hook.3:26
2774 #, no-wrap
2775 msgid ""
2776 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2777 "B<                         const void *>I<caller>B<);>\n"
2778 msgstr ""
2779 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2780 "B<                         const void *>I<caller>B<);>\n"
2781
2782 #. type: Plain text
2783 #: build/C/man3/malloc_hook.3:28
2784 #, no-wrap
2785 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2786 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2787
2788 #. type: Plain text
2789 #: build/C/man3/malloc_hook.3:30
2790 #, no-wrap
2791 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2792 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2793
2794 #. type: Plain text
2795 #: build/C/man3/malloc_hook.3:32
2796 #, no-wrap
2797 msgid "B<void (*__after_morecore_hook)(void);>\n"
2798 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2799
2800 #. type: Plain text
2801 #: build/C/man3/malloc_hook.3:43
2802 msgid ""
2803 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2804 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2805 "You can use these hooks to help you debug programs that use dynamic memory "
2806 "allocation, for example."
2807 msgstr ""
2808 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2809 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2810 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2811 "ができる。"
2812
2813 #. type: Plain text
2814 #: build/C/man3/malloc_hook.3:50
2815 msgid ""
2816 "The variable B<__malloc_initialize_hook> points at a function that is called "
2817 "once when the malloc implementation is initialized.  This is a weak "
2818 "variable, so it can be overridden in the application with a definition like "
2819 "the following:"
2820 msgstr ""
2821 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2822 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2823 "ケーション内で 以下のような定義で上書きできる:"
2824
2825 #. type: Plain text
2826 #: build/C/man3/malloc_hook.3:53
2827 #, no-wrap
2828 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2829 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2830
2831 #. type: Plain text
2832 #: build/C/man3/malloc_hook.3:58
2833 msgid ""
2834 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2835 msgstr ""
2836 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2837
2838 #. type: Plain text
2839 #: build/C/man3/malloc_hook.3:74
2840 msgid ""
2841 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2842 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2843 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2844 "except that they have a final argument I<caller> that gives the address of "
2845 "the caller of B<malloc>(3), etc."
2846 msgstr ""
2847 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2848 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2849 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2850 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2851 "出し元 (caller) のアドレスが格納される。"
2852
2853 #. type: Plain text
2854 #: build/C/man3/malloc_hook.3:80
2855 msgid ""
2856 "The variable B<__after_morecore_hook> points at a function that is called "
2857 "each time after B<sbrk>(2)  was asked for more memory."
2858 msgstr ""
2859 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2860 "後で毎回呼び出される関数へのポインタである。"
2861
2862 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2863 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2864 #. type: Plain text
2865 #: build/C/man3/malloc_hook.3:89
2866 msgid ""
2867 "The use of these hook functions is not safe in multithreaded programs, and "
2868 "they are now deprecated.  Programmers should instead preempt calls to the "
2869 "relevant functions by defining and exporting functions such as \"malloc\" "
2870 "and \"free\"."
2871 msgstr ""
2872 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2873 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2874 "公開して、 関連する関数を呼び出すようにすべきである。"
2875
2876 #. type: Plain text
2877 #: build/C/man3/malloc_hook.3:91
2878 msgid "Here is a short example of how to use these variables."
2879 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2880
2881 #. type: Plain text
2882 #: build/C/man3/malloc_hook.3:95
2883 #, no-wrap
2884 msgid ""
2885 "#include E<lt>stdio.hE<gt>\n"
2886 "#include E<lt>malloc.hE<gt>\n"
2887 msgstr ""
2888 "#include E<lt>stdio.hE<gt>\n"
2889 "#include E<lt>malloc.hE<gt>\n"
2890
2891 #. type: Plain text
2892 #: build/C/man3/malloc_hook.3:99
2893 #, no-wrap
2894 msgid ""
2895 "/* Prototypes for our hooks.  */\n"
2896 "static void my_init_hook(void);\n"
2897 "static void *my_malloc_hook(size_t, const void *);\n"
2898 msgstr ""
2899 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2900 "static void my_init_hook(void);\n"
2901 "static void *my_malloc_hook(size_t, const void *);\n"
2902
2903 #. type: Plain text
2904 #: build/C/man3/malloc_hook.3:102
2905 #, no-wrap
2906 msgid ""
2907 "/* Variables to save original hooks. */\n"
2908 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2909 msgstr ""
2910 "/* 元々のフックを保存するための変数 */\n"
2911 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2912
2913 #. type: Plain text
2914 #: build/C/man3/malloc_hook.3:105
2915 #, no-wrap
2916 msgid ""
2917 "/* Override initializing hook from the C library. */\n"
2918 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2919 msgstr ""
2920 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2921 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2922
2923 #. type: Plain text
2924 #: build/C/man3/malloc_hook.3:112
2925 #, no-wrap
2926 msgid ""
2927 "static void\n"
2928 "my_init_hook(void)\n"
2929 "{\n"
2930 "    old_malloc_hook = __malloc_hook;\n"
2931 "    __malloc_hook = my_malloc_hook;\n"
2932 "}\n"
2933 msgstr ""
2934 "static void\n"
2935 "my_init_hook(void)\n"
2936 "{\n"
2937 "    old_malloc_hook = __malloc_hook;\n"
2938 "    __malloc_hook = my_malloc_hook;\n"
2939 "}\n"
2940
2941 #. type: Plain text
2942 #: build/C/man3/malloc_hook.3:117
2943 #, no-wrap
2944 msgid ""
2945 "static void *\n"
2946 "my_malloc_hook(size_t size, const void *caller)\n"
2947 "{\n"
2948 "    void *result;\n"
2949 msgstr ""
2950 "static void *\n"
2951 "my_malloc_hook(size_t size, const void *caller)\n"
2952 "{\n"
2953 "    void *result;\n"
2954
2955 #. type: Plain text
2956 #: build/C/man3/malloc_hook.3:120
2957 #, no-wrap
2958 msgid ""
2959 "    /* Restore all old hooks */\n"
2960 "    __malloc_hook = old_malloc_hook;\n"
2961 msgstr ""
2962 "    /* 元々のフックを全て戻す */\n"
2963 "    __malloc_hook = old_malloc_hook;\n"
2964
2965 #. type: Plain text
2966 #: build/C/man3/malloc_hook.3:123
2967 #, no-wrap
2968 msgid ""
2969 "    /* Call recursively */\n"
2970 "    result = malloc(size);\n"
2971 msgstr ""
2972 "    /* malloc の再帰的呼び出し */\n"
2973 "    result = malloc(size);\n"
2974
2975 #. type: Plain text
2976 #: build/C/man3/malloc_hook.3:126
2977 #, no-wrap
2978 msgid ""
2979 "    /* Save underlying hooks */\n"
2980 "    old_malloc_hook = __malloc_hook;\n"
2981 msgstr ""
2982 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2983 "    old_malloc_hook = __malloc_hook;\n"
2984
2985 #. type: Plain text
2986 #: build/C/man3/malloc_hook.3:130
2987 #, no-wrap
2988 msgid ""
2989 "    /* printf() might call malloc(), so protect it too. */\n"
2990 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2991 "            (unsigned int) size, caller, result);\n"
2992 msgstr ""
2993 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2994 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2995 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2996 "            (unsigned int) size, caller, result);\n"
2997
2998 #. type: Plain text
2999 #: build/C/man3/malloc_hook.3:133
3000 #, no-wrap
3001 msgid ""
3002 "    /* Restore our own hooks */\n"
3003 "    __malloc_hook = my_malloc_hook;\n"
3004 msgstr ""
3005 "    /* ユーザが使おうとするフックを再設定する */\n"
3006 "    __malloc_hook = my_malloc_hook;\n"
3007
3008 #. type: Plain text
3009 #: build/C/man3/malloc_hook.3:136
3010 #, no-wrap
3011 msgid ""
3012 "    return result;\n"
3013 "}\n"
3014 msgstr ""
3015 "    return result;\n"
3016 "}\n"
3017
3018 #. type: Plain text
3019 #: build/C/man3/malloc_hook.3:142
3020 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3021 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3022
3023 #. type: TH
3024 #: build/C/man3/malloc_info.3:25
3025 #, no-wrap
3026 msgid "MALLOC_INFO"
3027 msgstr "MALLOC_INFO"
3028
3029 #. type: Plain text
3030 #: build/C/man3/malloc_info.3:28
3031 msgid "malloc_info - export malloc state to a stream"
3032 msgstr "malloc_info - malloc の状態をストリームに出力する"
3033
3034 #. type: Plain text
3035 #: build/C/man3/malloc_info.3:33
3036 #, no-wrap
3037 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3038 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3039
3040 #. type: Plain text
3041 #: build/C/man3/malloc_info.3:44
3042 msgid ""
3043 "The B<malloc_info>()  function exports an XML string that describes the "
3044 "current state of the memory-allocation implementation in the caller.  The "
3045 "string is printed on the file stream I<stream>.  The exported string "
3046 "includes information about all arenas (see B<malloc>(3))."
3047 msgstr ""
3048 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
3049 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<stream> に出力され"
3050 "る。 出力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) "
3051 "参照)。"
3052
3053 #. type: Plain text
3054 #: build/C/man3/malloc_info.3:48
3055 msgid "As currently implemented, I<options> must be zero."
3056 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3057
3058 #. type: Plain text
3059 #: build/C/man3/malloc_info.3:55
3060 msgid ""
3061 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3062 "I<errno> set to indicate the cause."
3063 msgstr ""
3064 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3065 "I<errno> にエラーの原因を示す値を設定する。"
3066
3067 #. type: Plain text
3068 #: build/C/man3/malloc_info.3:60
3069 msgid "I<options> was nonzero."
3070 msgstr "I<options> が 0 でなかった。"
3071
3072 #. type: Plain text
3073 #: build/C/man3/malloc_info.3:63
3074 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3075 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3076
3077 #. type: Plain text
3078 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3079 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3080 msgid "This function is a GNU extension."
3081 msgstr "この関数は GNU による拡張である。"
3082
3083 #. type: Plain text
3084 #: build/C/man3/malloc_info.3:71
3085 msgid ""
3086 "The memory-allocation information is provided as an XML string (rather than "
3087 "a C structure)  because the information may change over time (according to "
3088 "changes in the underlying implementation).  The output XML string includes a "
3089 "version field."
3090 msgstr ""
3091 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3092 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3093 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3094
3095 #. type: Plain text
3096 #: build/C/man3/malloc_info.3:77
3097 msgid ""
3098 "The B<open_memstream>(3)  function can be used to send the output of "
3099 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3100 msgstr ""
3101 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3102 "なくメモリ内のバッファに直接送ることができる。"
3103
3104 #. type: Plain text
3105 #: build/C/man3/malloc_info.3:84
3106 msgid ""
3107 "The B<malloc_info>()  function is designed to address deficiencies in "
3108 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3109 msgstr ""
3110 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3111 "るために設定された。"
3112
3113 #. type: Plain text
3114 #: build/C/man3/malloc_info.3:95
3115 msgid ""
3116 "The program below takes up to four command-line arguments, of which the "
3117 "first three are mandatory.  The first argument specifies the number of "
3118 "threads that the program should create.  All of the threads, including the "
3119 "main thread, allocate the number of blocks of memory specified by the second "
3120 "argument.  The third argument controls the size of the blocks to be "
3121 "allocated.  The main thread creates blocks of this size, the second thread "
3122 "created by the program allocates blocks of twice this size, the third thread "
3123 "allocates blocks of three times this size, and so on."
3124 msgstr ""
3125 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3126 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3127 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
3128 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
3129 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
3130 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
3131 "のブロックを割り当て、 以下同様である。"
3132
3133 #. type: Plain text
3134 #: build/C/man3/malloc_info.3:102
3135 msgid ""
3136 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3137 "state.  The first call takes place before any threads are created or memory "
3138 "allocated.  The second call is performed after all threads have allocated "
3139 "memory."
3140 msgstr ""
3141 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
3142 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
3143 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
3144
3145 #. type: Plain text
3146 #: build/C/man3/malloc_info.3:110
3147 msgid ""
3148 "In the following example, the command-line arguments specify the creation of "
3149 "one additional thread, and both the main thread and the additional thread "
3150 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3151 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3152 msgstr ""
3153 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3154 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
3155 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
3156 "て領域の状態が表示されている。"
3157
3158 #. type: Plain text
3159 #: build/C/man3/malloc_info.3:135
3160 #, no-wrap
3161 msgid ""
3162 "$ B<getconf GNU_LIBC_VERSION>\n"
3163 "glibc 2.13\n"
3164 "$ B<./a.out 1 10000 100>\n"
3165 "============ Before allocating blocks ============\n"
3166 "E<lt>malloc version=\"1\"E<gt>\n"
3167 "E<lt>heap nr=\"0\"E<gt>\n"
3168 "E<lt>sizesE<gt>\n"
3169 "E<lt>/sizesE<gt>\n"
3170 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3171 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3172 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3173 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3174 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3175 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3176 "E<lt>/heapE<gt>\n"
3177 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3178 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3179 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3180 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3181 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3182 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3183 "E<lt>/mallocE<gt>\n"
3184 msgstr ""
3185 "$ B<getconf GNU_LIBC_VERSION>\n"
3186 "glibc 2.13\n"
3187 "$ B<./a.out 1 10000 100>\n"
3188 "============ Before allocating blocks ============\n"
3189 "E<lt>malloc version=\"1\"E<gt>\n"
3190 "E<lt>heap nr=\"0\"E<gt>\n"
3191 "E<lt>sizesE<gt>\n"
3192 "E<lt>/sizesE<gt>\n"
3193 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3194 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3195 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3196 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3197 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3198 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3199 "E<lt>/heapE<gt>\n"
3200 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3201 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3202 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3203 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3204 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3205 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3206 "E<lt>/mallocE<gt>\n"
3207
3208 #. type: Plain text
3209 #: build/C/man3/malloc_info.3:165
3210 #, no-wrap
3211 msgid ""
3212 "============ After allocating blocks ============\n"
3213 "E<lt>malloc version=\"1\"E<gt>\n"
3214 "E<lt>heap nr=\"0\"E<gt>\n"
3215 "E<lt>sizesE<gt>\n"
3216 "E<lt>/sizesE<gt>\n"
3217 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3218 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3219 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3220 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3221 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3222 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3223 "E<lt>/heapE<gt>\n"
3224 "E<lt>heap nr=\"1\"E<gt>\n"
3225 "E<lt>sizesE<gt>\n"
3226 "E<lt>/sizesE<gt>\n"
3227 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3228 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3229 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3230 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3231 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3232 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3233 "E<lt>/heapE<gt>\n"
3234 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3235 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3236 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3237 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3238 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3239 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3240 "E<lt>/mallocE<gt>\n"
3241 msgstr ""
3242 "============ After allocating blocks ============\n"
3243 "E<lt>malloc version=\"1\"E<gt>\n"
3244 "E<lt>heap nr=\"0\"E<gt>\n"
3245 "E<lt>sizesE<gt>\n"
3246 "E<lt>/sizesE<gt>\n"
3247 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3248 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3249 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3250 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3251 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3252 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3253 "E<lt>/heapE<gt>\n"
3254 "E<lt>heap nr=\"1\"E<gt>\n"
3255 "E<lt>sizesE<gt>\n"
3256 "E<lt>/sizesE<gt>\n"
3257 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3258 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3259 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3260 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3261 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3262 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3263 "E<lt>/heapE<gt>\n"
3264 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3265 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3266 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3267 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3268 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3269 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3270 "E<lt>/mallocE<gt>\n"
3271
3272 #. type: Plain text
3273 #: build/C/man3/malloc_info.3:175
3274 #, no-wrap
3275 msgid ""
3276 "#include E<lt>unistd.hE<gt>\n"
3277 "#include E<lt>stdlib.hE<gt>\n"
3278 "#include E<lt>pthread.hE<gt>\n"
3279 "#include E<lt>malloc.hE<gt>\n"
3280 "#include E<lt>errno.hE<gt>\n"
3281 msgstr ""
3282 "#include E<lt>unistd.hE<gt>\n"
3283 "#include E<lt>stdlib.hE<gt>\n"
3284 "#include E<lt>pthread.hE<gt>\n"
3285 "#include E<lt>malloc.hE<gt>\n"
3286 "#include E<lt>errno.hE<gt>\n"
3287
3288 #. type: Plain text
3289 #: build/C/man3/malloc_info.3:178
3290 #, no-wrap
3291 msgid ""
3292 "static size_t blockSize;\n"
3293 "static int numThreads, numBlocks;\n"
3294 msgstr ""
3295 "static size_t blockSize;\n"
3296 "static int numThreads, numBlocks;\n"
3297
3298 #. type: Plain text
3299 #: build/C/man3/malloc_info.3:181 build/C/man2/memfd_create.2:368
3300 #: build/C/man2/memfd_create.2:450
3301 #, no-wrap
3302 msgid ""
3303 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3304 "                        } while (0)\n"
3305 msgstr ""
3306 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3307 "                        } while (0)\n"
3308
3309 #. type: Plain text
3310 #: build/C/man3/malloc_info.3:187
3311 #, no-wrap
3312 msgid ""
3313 "static void *\n"
3314 "thread_func(void *arg)\n"
3315 "{\n"
3316 "    int j;\n"
3317 "    int tn = (int) arg;\n"
3318 msgstr ""
3319 "static void *\n"
3320 "thread_func(void *arg)\n"
3321 "{\n"
3322 "    int j;\n"
3323 "    int tn = (int) arg;\n"
3324
3325 #. type: Plain text
3326 #: build/C/man3/malloc_info.3:190
3327 #, no-wrap
3328 msgid ""
3329 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3330 "       the main thread) allocates a different amount of memory */\n"
3331 msgstr ""
3332 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3333 "       the main thread) allocates a different amount of memory */\n"
3334
3335 #. type: Plain text
3336 #: build/C/man3/malloc_info.3:194
3337 #, no-wrap
3338 msgid ""
3339 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3340 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3341 "            errExit(\"malloc-thread\");\n"
3342 msgstr ""
3343 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3344 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3345 "            errExit(\"malloc-thread\");\n"
3346
3347 #. type: Plain text
3348 #: build/C/man3/malloc_info.3:198
3349 #, no-wrap
3350 msgid ""
3351 "    sleep(100);         /* Sleep until main thread terminates */\n"
3352 "    return NULL;\n"
3353 "}\n"
3354 msgstr ""
3355 "    sleep(100);         /* Sleep until main thread terminates */\n"
3356 "    return NULL;\n"
3357 "}\n"
3358
3359 #. type: Plain text
3360 #: build/C/man3/malloc_info.3:204
3361 #, no-wrap
3362 msgid ""
3363 "int\n"
3364 "main(int argc, char *argv[])\n"
3365 "{\n"
3366 "    int j, tn, sleepTime;\n"
3367 "    pthread_t *thr;\n"
3368 msgstr ""
3369 "int\n"
3370 "main(int argc, char *argv[])\n"
3371 "{\n"
3372 "    int j, tn, sleepTime;\n"
3373 "    pthread_t *thr;\n"
3374
3375 #. type: Plain text
3376 #: build/C/man3/malloc_info.3:211
3377 #, no-wrap
3378 msgid ""
3379 "    if (argc E<lt> 4) {\n"
3380 "        fprintf(stderr,\n"
3381 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3382 "                argv[0]);\n"
3383 "        exit(EXIT_FAILURE);\n"
3384 "    }\n"
3385 msgstr ""
3386 "    if (argc E<lt> 4) {\n"
3387 "        fprintf(stderr,\n"
3388 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3389 "                argv[0]);\n"
3390 "        exit(EXIT_FAILURE);\n"
3391 "    }\n"
3392
3393 #. type: Plain text
3394 #: build/C/man3/malloc_info.3:216
3395 #, no-wrap
3396 msgid ""
3397 "    numThreads = atoi(argv[1]);\n"
3398 "    numBlocks = atoi(argv[2]);\n"
3399 "    blockSize = atoi(argv[3]);\n"
3400 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3401 msgstr ""
3402 "    numThreads = atoi(argv[1]);\n"
3403 "    numBlocks = atoi(argv[2]);\n"
3404 "    blockSize = atoi(argv[3]);\n"
3405 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3406
3407 #. type: Plain text
3408 #: build/C/man3/malloc_info.3:220
3409 #, no-wrap
3410 msgid ""
3411 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3412 "    if (thr == NULL)\n"
3413 "        errExit(\"calloc\");\n"
3414 msgstr ""
3415 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3416 "    if (thr == NULL)\n"
3417 "        errExit(\"calloc\");\n"
3418
3419 #. type: Plain text
3420 #: build/C/man3/malloc_info.3:223
3421 #, no-wrap
3422 msgid ""
3423 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3424 "    malloc_info(0, stdout);\n"
3425 msgstr ""
3426 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3427 "    malloc_info(0, stdout);\n"
3428
3429 #. type: Plain text
3430 #: build/C/man3/malloc_info.3:225
3431 #, no-wrap
3432 msgid "    /* Create threads that allocate different amounts of memory */\n"
3433 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3434
3435 #. type: Plain text
3436 #: build/C/man3/malloc_info.3:231
3437 #, no-wrap
3438 msgid ""
3439 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3440 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3441 "                               (void *) tn);\n"
3442 "        if (errno != 0)\n"
3443 "            errExit(\"pthread_create\");\n"
3444 msgstr ""
3445 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3446 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3447 "                               (void *) tn);\n"
3448 "        if (errno != 0)\n"
3449 "            errExit(\"pthread_create\");\n"
3450
3451 #. type: Plain text
3452 #: build/C/man3/malloc_info.3:236
3453 #, no-wrap
3454 msgid ""
3455 "        /* If we add a sleep interval after the start-up of each\n"
3456 "           thread, the threads likely won\\(aqt contend for malloc\n"
3457 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3458 "           allocated (see malloc(3)). */\n"
3459 msgstr ""
3460 "        /* If we add a sleep interval after the start-up of each\n"
3461 "           thread, the threads likely won\\(aqt contend for malloc\n"
3462 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3463 "           allocated (see malloc(3)). */\n"
3464
3465 #. type: Plain text
3466 #: build/C/man3/malloc_info.3:240
3467 #, no-wrap
3468 msgid ""
3469 "        if (sleepTime E<gt> 0)\n"
3470 "            sleep(sleepTime);\n"
3471 "    }\n"
3472 msgstr ""
3473 "        if (sleepTime E<gt> 0)\n"
3474 "            sleep(sleepTime);\n"
3475 "    }\n"
3476
3477 #. type: Plain text
3478 #: build/C/man3/malloc_info.3:242
3479 #, no-wrap
3480 msgid "    /* The main thread also allocates some memory */\n"
3481 msgstr "    /* The main thread also allocates some memory */\n"
3482
3483 #. type: Plain text
3484 #: build/C/man3/malloc_info.3:246
3485 #, no-wrap
3486 msgid ""
3487 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3488 "        if (malloc(blockSize) == NULL)\n"
3489 "            errExit(\"malloc\");\n"
3490 msgstr ""
3491 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3492 "        if (malloc(blockSize) == NULL)\n"
3493 "            errExit(\"malloc\");\n"
3494
3495 #. type: Plain text
3496 #: build/C/man3/malloc_info.3:249
3497 #, no-wrap
3498 msgid ""
3499 "    sleep(2);           /* Give all threads a chance to\n"
3500 "                           complete allocations */\n"
3501 msgstr ""
3502 "    sleep(2);           /* Give all threads a chance to\n"
3503 "                           complete allocations */\n"
3504
3505 #. type: Plain text
3506 #: build/C/man3/malloc_info.3:252
3507 #, no-wrap
3508 msgid ""
3509 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3510 "    malloc_info(0, stdout);\n"
3511 msgstr ""
3512 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3513 "    malloc_info(0, stdout);\n"
3514
3515 #. type: Plain text
3516 #: build/C/man3/malloc_info.3:262
3517 msgid ""
3518 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3519 "B<open_memstream>(3)"
3520 msgstr ""
3521 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3522 "B<open_memstream>(3)"
3523
3524 #. type: TH
3525 #: build/C/man3/malloc_stats.3:26
3526 #, no-wrap
3527 msgid "MALLOC_STATS"
3528 msgstr "MALLOC_STATS"
3529
3530 #. type: Plain text
3531 #: build/C/man3/malloc_stats.3:29
3532 msgid "malloc_stats - print memory allocation statistics"
3533 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3534
3535 #. type: Plain text
3536 #: build/C/man3/malloc_stats.3:33
3537 msgid "B<void malloc_stats(void);>"
3538 msgstr "B<void malloc_stats(void);>"
3539
3540 #.  .SH VERSIONS
3541 #.  Available already in glibc 2.0, possibly earlier
3542 #. type: Plain text
3543 #: build/C/man3/malloc_stats.3:55
3544 msgid ""
3545 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3546 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3547 "(allocation area), this function prints the total amount of memory allocated "
3548 "and the total number of bytes consumed by in-use allocations.  (These two "
3549 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3550 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3551 "statistics for all arenas, and the maximum number of blocks and bytes that "
3552 "were ever simultaneously allocated using B<mmap>(2)."
3553 msgstr ""
3554 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3555 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3556 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3557 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3558 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3559 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3560 "ロック数とバイト数の最大値を表示する。"
3561
3562 #. type: Plain text
3563 #: build/C/man3/malloc_stats.3:61
3564 msgid ""
3565 "More detailed information about memory allocations in the main arena can be "
3566 "obtained using B<mallinfo>(3)."
3567 msgstr ""
3568 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3569 "報を取得できる。"
3570
3571 #. type: Plain text
3572 #: build/C/man3/malloc_stats.3:67
3573 msgid ""
3574 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3575 msgstr ""
3576 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3577
3578 #. type: TH
3579 #: build/C/man3/malloc_trim.3:26
3580 #, no-wrap
3581 msgid "MALLOC_TRIM"
3582 msgstr "MALLOC_TRIM"
3583
3584 #. type: TH
3585 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3586 #, no-wrap
3587 msgid "2014-05-28"
3588 msgstr "2014-05-28"
3589
3590 #. type: Plain text
3591 #: build/C/man3/malloc_trim.3:29
3592 msgid "malloc_trim - release free memory from the top of the heap"
3593 msgstr ""
3594
3595 #. type: Plain text
3596 #: build/C/man3/malloc_trim.3:33
3597 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3598 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3599
3600 #. type: Plain text
3601 #: build/C/man3/malloc_trim.3:40
3602 msgid ""
3603 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3604 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3605 msgstr ""
3606
3607 #. type: Plain text
3608 #: build/C/man3/malloc_trim.3:51
3609 msgid ""
3610 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3611 "the top of the heap.  If this argument is 0, only the minimum amount of "
3612 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3613 "nonzero argument can be used to maintain some trailing space at the top of "
3614 "the heap in order to allow future allocations to be made without having to "
3615 "extend the heap with B<sbrk>(2)."
3616 msgstr ""
3617
3618 #. type: Plain text
3619 #: build/C/man3/malloc_trim.3:56
3620 msgid ""
3621 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3622 "back to the system, or 0 if it was not possible to release any memory."
3623 msgstr ""
3624
3625 #.  .SH VERSIONS
3626 #.  Available already in glibc 2.0, possibly earlier
3627 #. type: Plain text
3628 #: build/C/man3/malloc_trim.3:60
3629 msgid "No errors are defined."
3630 msgstr ""
3631
3632 #. type: Plain text
3633 #: build/C/man3/malloc_trim.3:71
3634 msgid ""
3635 "This function is automatically called by B<free>(3)  in certain "
3636 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3637 "B<mallopt>(3)."
3638 msgstr ""
3639
3640 #. type: Plain text
3641 #: build/C/man3/malloc_trim.3:74
3642 msgid ""
3643 "This function cannot release free memory located at places other than the "
3644 "top of the heap."
3645 msgstr ""
3646
3647 #.  malloc/malloc.c::mTRIm():
3648 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3649 #. type: Plain text
3650 #: build/C/man3/malloc_trim.3:78
3651 msgid "This function releases only memory in the main arena."
3652 msgstr ""
3653
3654 #. type: Plain text
3655 #: build/C/man3/malloc_trim.3:82
3656 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3657 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3658
3659 #. type: TH
3660 #: build/C/man3/malloc_usable_size.3:25
3661 #, no-wrap
3662 msgid "MALLOC_USABLE_SIZE"
3663 msgstr "MALLOC_USABLE_SIZE"
3664
3665 #. type: Plain text
3666 #: build/C/man3/malloc_usable_size.3:28
3667 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3668 msgstr ""
3669 "malloc_usable_size - ヒープから確保したメモリブロックのサイズを取得する"
3670
3671 #. type: Plain text
3672 #: build/C/man3/malloc_usable_size.3:32
3673 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3674 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3675
3676 #. type: Plain text
3677 #: build/C/man3/malloc_usable_size.3:40
3678 msgid ""
3679 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3680 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3681 "B<malloc>(3)  or a related function."
3682 msgstr ""
3683 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3684 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリブロックへの"
3685 "ポインターである。"
3686
3687 #. type: Plain text
3688 #: build/C/man3/malloc_usable_size.3:48
3689 msgid ""
3690 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3691 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3692 msgstr ""
3693 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリブロックで使用可能"
3694 "なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3695
3696 #. type: Plain text
3697 #: build/C/man3/malloc_usable_size.3:53
3698 msgid "The B<malloc_usable_size>()  function is thread-safe."
3699 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3700
3701 #. type: Plain text
3702 #: build/C/man3/malloc_usable_size.3:65
3703 msgid ""
3704 "The value returned by B<malloc_usable_size>()  may be greater than the "
3705 "requested size of the allocation because of alignment and minimum size "
3706 "constraints.  Although the excess bytes can be overwritten by the "
3707 "application without ill effects, this is not good programming practice: the "
3708 "number of excess bytes in an allocation depends on the underlying "
3709 "implementation."
3710 msgstr ""
3711 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3712 "がある。 これは、メモリアラインメントと最小サイズの制約のためである。 この超"
3713 "過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行う"
3714 "のはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超過"
3715 "バイトの量は、内部の実装に依存する。"
3716
3717 #. type: Plain text
3718 #: build/C/man3/malloc_usable_size.3:67
3719 msgid "The main use of this function is for debugging and introspection."
3720 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3721
3722 #. type: Plain text
3723 #: build/C/man3/malloc_usable_size.3:69
3724 msgid "B<malloc>(3)"
3725 msgstr "B<malloc>(3)"
3726
3727 #. type: TH
3728 #: build/C/man3/mallopt.3:26
3729 #, no-wrap
3730 msgid "MALLOPT"
3731 msgstr "MALLOPT"
3732
3733 #. type: TH
3734 #: build/C/man3/mallopt.3:26 build/C/man2/shmop.2:41
3735 #, no-wrap
3736 msgid "2014-07-08"
3737 msgstr "2014-07-08"
3738
3739 #. type: Plain text
3740 #: build/C/man3/mallopt.3:29
3741 msgid "mallopt - set memory allocation parameters"
3742 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3743
3744 #. type: Plain text
3745 #: build/C/man3/mallopt.3:33
3746 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3747 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3748
3749 #. type: Plain text
3750 #: build/C/man3/mallopt.3:44
3751 msgid ""
3752 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3753 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3754 "specifies the parameter to be modified, and I<value> specifies the new value "
3755 "for that parameter."
3756 msgstr ""
3757 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3758 "制御するパラメータの調整を行う。\n"
3759 "I<param> 引き数で変更するパラメータを指定し、\n"
3760 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3761
3762 #. type: Plain text
3763 #: build/C/man3/mallopt.3:47
3764 msgid "The following values can be specified for I<param>:"
3765 msgstr "I<param> には以下の値を指定することができる。"
3766
3767 #. type: TP
3768 #: build/C/man3/mallopt.3:47
3769 #, no-wrap
3770 msgid "B<M_CHECK_ACTION>"
3771 msgstr "B<M_CHECK_ACTION>"
3772
3773 #. type: Plain text
3774 #: build/C/man3/mallopt.3:53
3775 msgid ""
3776 "Setting this parameter controls how glibc responds when various kinds of "
3777 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3778 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3779 "parameter determine the glibc behavior, as follows:"
3780 msgstr ""
3781
3782 #. type: TP
3783 #: build/C/man3/mallopt.3:54
3784 #, no-wrap
3785 msgid "Bit 0"
3786 msgstr "Bit 0"
3787
3788 #. type: Plain text
3789 #: build/C/man3/mallopt.3:64
3790 msgid ""
3791 "If this bit is set, then print a one-line message on I<stderr> that provides "
3792 "details about the error.  The message starts with the string \"***\\ glibc "
3793 "detected\\ ***\", followed by the program name, the name of the memory-"
3794 "allocation function in which the error was detected, a brief description of "
3795 "the error, and the memory address where the error was detected."
3796 msgstr ""
3797
3798 #. type: TP
3799 #: build/C/man3/mallopt.3:64
3800 #, no-wrap
3801 msgid "Bit 1"
3802 msgstr "Bit 1"
3803
3804 #. type: Plain text
3805 #: build/C/man3/mallopt.3:79
3806 msgid ""
3807 "If this bit is set, then, after printing any error message specified by bit "
3808 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3809 "since 2.4, if bit 0 is also set, then, between printing the error message "
3810 "and aborting, the program also prints a stack trace in the manner of "
3811 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3812 "proc/[pid]/maps> (see B<proc>(5))."
3813 msgstr ""
3814
3815 #. type: TP
3816 #: build/C/man3/mallopt.3:79
3817 #, no-wrap
3818 msgid "Bit 2 (since glibc 2.4)"
3819 msgstr "Bit 2 (glibc 2.4 以降)"
3820
3821 #. type: Plain text
3822 #: build/C/man3/mallopt.3:86
3823 msgid ""
3824 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3825 "the one-line message describing the error is simplified to contain just the "
3826 "name of the function where the error was detected and the brief description "
3827 "of the error."
3828 msgstr ""
3829
3830 #. type: Plain text
3831 #: build/C/man3/mallopt.3:91
3832 msgid "The remaining bits in I<value> are ignored."
3833 msgstr ""
3834
3835 #. type: Plain text
3836 #: build/C/man3/mallopt.3:95
3837 msgid ""
3838 "Combining the above details, the following numeric values are meaningful for "
3839 "B<M_CHECK_ACTION>:"
3840 msgstr ""
3841
3842 #. type: IP
3843 #: build/C/man3/mallopt.3:96
3844 #, no-wrap
3845 msgid "0"
3846 msgstr "0"
3847
3848 #. type: Plain text
3849 #: build/C/man3/mallopt.3:98
3850 msgid "Ignore error conditions; continue execution (with undefined results)."
3851 msgstr ""
3852
3853 #. type: IP
3854 #: build/C/man3/mallopt.3:98
3855 #, no-wrap
3856 msgid "1"
3857 msgstr "1"
3858
3859 #. type: Plain text
3860 #: build/C/man3/mallopt.3:100
3861 msgid "Print a detailed error message and continue execution."
3862 msgstr ""
3863
3864 #. type: IP
3865 #: build/C/man3/mallopt.3:100
3866 #, no-wrap
3867 msgid "2"
3868 msgstr "2"
3869
3870 #. type: Plain text
3871 #: build/C/man3/mallopt.3:102
3872 msgid "Abort the program."
3873 msgstr ""
3874
3875 #. type: IP
3876 #: build/C/man3/mallopt.3:102
3877 #, no-wrap
3878 msgid "3"
3879 msgstr "3"
3880
3881 #. type: Plain text
3882 #: build/C/man3/mallopt.3:105
3883 msgid ""
3884 "Print detailed error message, stack trace, and memory mappings, and abort "
3885 "the program."
3886 msgstr ""
3887
3888 #. type: IP
3889 #: build/C/man3/mallopt.3:105
3890 #, no-wrap
3891 msgid "5"
3892 msgstr "5"
3893
3894 #. type: Plain text
3895 #: build/C/man3/mallopt.3:107
3896 msgid "Print a simple error message and continue execution."
3897 msgstr ""
3898
3899 #. type: IP
3900 #: build/C/man3/mallopt.3:107
3901 #, no-wrap
3902 msgid "7"
3903 msgstr "7"
3904
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:110
3907 msgid ""
3908 "Print simple error message, stack trace, and memory mappings, and abort the "
3909 "program."
3910 msgstr ""
3911
3912 #. type: Plain text
3913 #: build/C/man3/mallopt.3:116
3914 msgid ""
3915 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3916 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3917 msgstr ""
3918
3919 #. type: Plain text
3920 #: build/C/man3/mallopt.3:121
3921 msgid ""
3922 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3923 "crash may happen much later, and the true cause of the problem is then very "
3924 "hard to track down."
3925 msgstr ""
3926
3927 #. type: TP
3928 #: build/C/man3/mallopt.3:121
3929 #, no-wrap
3930 msgid "B<M_MMAP_MAX>"
3931 msgstr "B<M_MMAP_MAX>"
3932
3933 #.  The following text adapted from comments in the glibc source:
3934 #. type: Plain text
3935 #: build/C/man3/mallopt.3:131
3936 msgid ""
3937 "This parameter specifies the maximum number of allocation requests that may "
3938 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3939 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3940 "and using more than a few of them may degrade performance."
3941 msgstr ""
3942
3943 #. type: Plain text
3944 #: build/C/man3/mallopt.3:138
3945 msgid ""
3946 "The default value is 65,536, a value which has no special significance and "
3947 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3948 "use of B<mmap>(2)  for servicing large allocation requests."
3949 msgstr ""
3950
3951 #. type: TP
3952 #: build/C/man3/mallopt.3:138
3953 #, no-wrap
3954 msgid "B<M_MMAP_THRESHOLD>"
3955 msgstr "B<M_MMAP_THRESHOLD>"
3956
3957 #. type: Plain text
3958 #: build/C/man3/mallopt.3:147
3959 msgid ""
3960 "For allocations greater than or equal to the limit specified (in bytes) by "
3961 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3962 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3963 "break using B<sbrk>(2)."
3964 msgstr ""
3965
3966 #. type: Plain text
3967 #: build/C/man3/mallopt.3:167
3968 msgid ""
3969 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3970 "allocated memory blocks can always be independently released back to the "
3971 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3972 "the top end.)  On the other hand, there are some disadvantages to the use of "
3973 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3974 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3975 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3976 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3977 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3978 msgstr ""
3979
3980 #. type: Plain text
3981 #: build/C/man3/mallopt.3:174
3982 msgid ""
3983 "The lower limit for this parameter is 0.  The upper limit is "
3984 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3985 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3986 msgstr ""
3987
3988 #. type: Plain text
3989 #: build/C/man3/mallopt.3:192
3990 msgid ""
3991 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3992 "initial value of the threshold is 128*1024, but when blocks larger than the "
3993 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3994 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3995 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3996 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3997 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3998 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3999 "parameters is set."
4000 msgstr ""
4001
4002 #. type: TP
4003 #: build/C/man3/mallopt.3:192
4004 #, no-wrap
4005 msgid "B<M_MXFAST> (since glibc 2.3)"
4006 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
4007
4008 #.  The following text adapted from comments in the glibc sources:
4009 #. type: Plain text
4010 #: build/C/man3/mallopt.3:212
4011 msgid ""
4012 "Set the upper limit for memory allocation requests that are satisfied using "
4013 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
4014 "are storage areas that hold deallocated blocks of memory of the same size "
4015 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
4016 "the same size can be handled very quickly by allocating from the fastbin, "
4017 "although memory fragmentation and the overall memory footprint of the "
4018 "program can increase.  The default value for this parameter is "
4019 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
4020 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
4021 "disables the use of fastbins."
4022 msgstr ""
4023
4024 #. type: TP
4025 #: build/C/man3/mallopt.3:212
4026 #, no-wrap
4027 msgid "B<M_PERTURB> (since glibc 2.4)"
4028 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4029
4030 #. type: Plain text
4031 #: build/C/man3/mallopt.3:227
4032 msgid ""
4033 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4034 "(other than allocations via B<calloc>(3))  are initialized to the complement "
4035 "of the value in the least significant byte of I<value>, and when allocated "
4036 "memory is released using B<free>(3), the freed bytes are set to the least "
4037 "significant byte of I<value>.  This can be useful for detecting errors where "
4038 "programs incorrectly rely on allocated memory being initialized to zero, or "
4039 "reuse values in memory that has already been freed."
4040 msgstr ""
4041
4042 #. type: TP
4043 #: build/C/man3/mallopt.3:227
4044 #, no-wrap
4045 msgid "B<M_TOP_PAD>"
4046 msgstr "B<M_TOP_PAD>"
4047
4048 #. type: Plain text
4049 #: build/C/man3/mallopt.3:234
4050 msgid ""
4051 "This parameter defines the amount of padding to employ when calling "
4052 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4053 "parameter is bytes.)  This parameter has an effect in the following "
4054 "circumstances:"
4055 msgstr ""
4056
4057 #. type: Plain text
4058 #: build/C/man3/mallopt.3:241
4059 msgid ""
4060 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4061 "the B<sbrk>(2)  request."
4062 msgstr ""
4063
4064 #. type: Plain text
4065 #: build/C/man3/mallopt.3:247
4066 msgid ""
4067 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4068 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4069 "top of the heap."
4070 msgstr ""
4071
4072 #. type: Plain text
4073 #: build/C/man3/mallopt.3:251
4074 msgid ""
4075 "In either case, the amount of padding is always rounded to a system page "
4076 "boundary."
4077 msgstr ""
4078
4079 #. type: Plain text
4080 #: build/C/man3/mallopt.3:258
4081 msgid ""
4082 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4083 "system calls (when the parameter is set low)  and wasting unused memory at "
4084 "the top of the heap (when the parameter is set high)."
4085 msgstr ""
4086
4087 #.  DEFAULT_TOP_PAD in glibc source
4088 #. type: Plain text
4089 #: build/C/man3/mallopt.3:261
4090 msgid "The default value for this parameter is 128*1024."
4091 msgstr ""
4092
4093 #. type: TP
4094 #: build/C/man3/mallopt.3:261
4095 #, no-wrap
4096 msgid "B<M_TRIM_THRESHOLD>"
4097 msgstr "B<M_TRIM_THRESHOLD>"
4098
4099 #. type: Plain text
4100 #: build/C/man3/mallopt.3:277
4101 msgid ""
4102 "When the amount of contiguous free memory at the top of the heap grows "
4103 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4104 "back to the system.  (This can be useful in programs that continue to "
4105 "execute for a long period after freeing a significant amount of memory.)  "
4106 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4107 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4108 msgstr ""
4109
4110 #. type: Plain text
4111 #: build/C/man3/mallopt.3:282
4112 msgid ""
4113 "The default value for this parameter is 128*1024.  Setting "
4114 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4115 msgstr ""
4116
4117 #
4118 #
4119 #
4120 #.  FIXME Do the arena parameters need to be documented?
4121 #.  .TP
4122 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4123 #.  .TP
4124 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4125 #.  Environment variables
4126 #.      MALLOC_ARENA_MAX_
4127 #.      MALLOC_ARENA_TEST_
4128 #.  http://udrepper.livejournal.com/20948.html describes some details
4129 #.      of the MALLOC_ARENA_* environment variables.
4130 #.  These macros aren't enabled in production releases until 2.15?
4131 #.  (see glibc malloc/Makefile)
4132 #. type: Plain text
4133 #: build/C/man3/mallopt.3:305
4134 msgid ""
4135 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4136 "of system calls (when the parameter is set low)  and wasting unused memory "
4137 "at the top of the heap (when the parameter is set high)."
4138 msgstr ""
4139
4140 #. type: SS
4141 #: build/C/man3/mallopt.3:305
4142 #, no-wrap
4143 msgid "Environment variables"
4144 msgstr "環境変数"
4145
4146 #. type: Plain text
4147 #: build/C/man3/mallopt.3:320
4148 msgid ""
4149 "A number of environment variables can be defined to modify some of the same "
4150 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4151 "advantage that the source code of the program need not be changed.  To be "
4152 "effective, these variables must be defined before the first call to a memory-"
4153 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4154 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4155 "these variables are ignored in set-user-ID and set-group-ID programs."
4156 msgstr ""
4157
4158 #. type: Plain text
4159 #: build/C/man3/mallopt.3:323
4160 msgid ""
4161 "The environment variables are as follows (note the trailing underscore at "
4162 "the end of the name of each variable):"
4163 msgstr ""
4164
4165 #. type: TP
4166 #: build/C/man3/mallopt.3:323
4167 #, no-wrap
4168 msgid "B<MALLOC_CHECK_>"
4169 msgstr "B<MALLOC_CHECK_>"
4170
4171 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4172 #.  when MALLOC_CHECK_ was set.
4173 #. type: Plain text
4174 #: build/C/man3/mallopt.3:340
4175 msgid ""
4176 "This environment variable controls the same parameter as B<mallopt>()  "
4177 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4178 "special implementation of the memory-allocation functions is used.  (This is "
4179 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4180 "performs additional error checking, but is slower than the standard set of "
4181 "memory-allocation functions.  (This implementation does not detect all "
4182 "possible errors; memory leaks can still occur.)"
4183 msgstr ""
4184
4185 #. type: Plain text
4186 #: build/C/man3/mallopt.3:345
4187 msgid ""
4188 "The value assigned to this environment variable should be a single digit, "
4189 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4190 "the initial digit are ignored."
4191 msgstr ""
4192
4193 #. type: Plain text
4194 #: build/C/man3/mallopt.3:354
4195 msgid ""
4196 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4197 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4198 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4199 "also has an effect for set-user-ID and set-group-ID programs."
4200 msgstr ""
4201
4202 #. type: TP
4203 #: build/C/man3/mallopt.3:354
4204 #, no-wrap
4205 msgid "B<MALLOC_MMAP_MAX_>"
4206 msgstr "B<MALLOC_MMAP_MAX_>"
4207
4208 #. type: Plain text
4209 #: build/C/man3/mallopt.3:359
4210 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4211 msgstr ""
4212
4213 #. type: TP
4214 #: build/C/man3/mallopt.3:359
4215 #, no-wrap
4216 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4217 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4218
4219 #. type: Plain text
4220 #: build/C/man3/mallopt.3:364
4221 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4222 msgstr ""
4223
4224 #. type: TP
4225 #: build/C/man3/mallopt.3:364
4226 #, no-wrap
4227 msgid "B<MALLOC_PERTURB_>"
4228 msgstr "B<MALLOC_PERTURB_>"
4229
4230 #. type: Plain text
4231 #: build/C/man3/mallopt.3:369
4232 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4233 msgstr ""
4234
4235 #. type: TP
4236 #: build/C/man3/mallopt.3:369
4237 #, no-wrap
4238 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4239 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4240
4241 #. type: Plain text
4242 #: build/C/man3/mallopt.3:374
4243 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4244 msgstr ""
4245
4246 #. type: TP
4247 #: build/C/man3/mallopt.3:374
4248 #, no-wrap
4249 msgid "B<MALLOC_TOP_PAD_>"
4250 msgstr "B<MALLOC_TOP_PAD_>"
4251
4252 #. type: Plain text
4253 #: build/C/man3/mallopt.3:379
4254 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4255 msgstr ""
4256
4257 #. type: Plain text
4258 #: build/C/man3/mallopt.3:384
4259 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4260 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4261
4262 #.  .SH VERSIONS
4263 #.  Available already in glibc 2.0, possibly earlier
4264 #. type: Plain text
4265 #: build/C/man3/mallopt.3:392
4266 msgid "On error, I<errno> is I<not> set."
4267 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4268
4269 #.  .SH NOTES
4270 #. type: Plain text
4271 #: build/C/man3/mallopt.3:406
4272 msgid ""
4273 "This function is not specified by POSIX or the C standards.  A similar "
4274 "function exists on many System V derivatives, but the range of values for "
4275 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4276 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4277 "implemented in glibc."
4278 msgstr ""
4279
4280 #. type: Plain text
4281 #: build/C/man3/mallopt.3:410
4282 msgid "Specifying an invalid value for I<param> does not generate an error."
4283 msgstr ""
4284
4285 #.  FIXME . This looks buggy:
4286 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4287 #.  malloc requests are rounded up:
4288 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4289 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4290 #. type: Plain text
4291 #: build/C/man3/mallopt.3:418
4292 msgid ""
4293 "A calculation error within the glibc implementation means that a call of the "
4294 "form:"
4295 msgstr ""
4296
4297 #. type: Plain text
4298 #: build/C/man3/mallopt.3:421
4299 #, no-wrap
4300 msgid "    mallopt(M_MXFAST, n)\n"
4301 msgstr "    mallopt(M_MXFAST, n)\n"
4302
4303 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4304 #. type: Plain text
4305 #: build/C/man3/mallopt.3:433
4306 msgid ""
4307 "does not result in fastbins being employed for all allocations of size up to "
4308 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4309 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4310 "integer."
4311 msgstr ""
4312
4313 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4314 #. type: Plain text
4315 #: build/C/man3/mallopt.3:454
4316 msgid ""
4317 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4318 "of allocated memory are initialized to the complement of the byte in "
4319 "I<value>, and when that memory is freed, the bytes of the region are "
4320 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4321 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4322 "precisely the block of memory being freed by the call I<free(p)>, the block "
4323 "starting at I<p+sizeof(size_t)> is initialized."
4324 msgstr ""
4325
4326 #. type: Plain text
4327 #: build/C/man3/mallopt.3:463
4328 msgid ""
4329 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4330 "is supplied with an (integer) command-line argument, then that argument is "
4331 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4332 "block of memory, and frees it twice (an error)."
4333 msgstr ""
4334
4335 #. type: Plain text
4336 #: build/C/man3/mallopt.3:467
4337 msgid ""
4338 "The following shell session shows what happens when we run this program "
4339 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4340 msgstr ""
4341
4342 #. type: Plain text
4343 #: build/C/man3/mallopt.3:487
4344 #, no-wrap
4345 msgid ""
4346 "$ B<./a.out>\n"
4347 "main(): returned from first free() call\n"
4348 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4349 "======= Backtrace: =========\n"
4350 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4351 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4352 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4353 "\\&./a.out[0x80485db]\n"
4354 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4355 "\\&./a.out[0x8048471]\n"
4356 "======= Memory map: ========\n"
4357 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4358 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4359 "[some lines omitted]\n"
4360 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4361 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4362 "Aborted (core dumped)\n"
4363 msgstr ""
4364 "$ B<./a.out>\n"
4365 "main(): returned from first free() call\n"
4366 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4367 "======= Backtrace: =========\n"
4368 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4369 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4370 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4371 "\\&./a.out[0x80485db]\n"
4372 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4373 "\\&./a.out[0x8048471]\n"
4374 "======= Memory map: ========\n"
4375 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4376 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4377 "[some lines omitted]\n"
4378 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4379 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4380 "Aborted (core dumped)\n"
4381
4382 #. type: Plain text
4383 #: build/C/man3/mallopt.3:492
4384 msgid ""
4385 "The following runs show the results when employing other values for "
4386 "B<M_CHECK_ACTION>:"
4387 msgstr ""
4388
4389 #. type: Plain text
4390 #: build/C/man3/mallopt.3:505
4391 #, no-wrap
4392 msgid ""
4393 "$ B<./a.out 1>             # Diagnose error and continue\n"
4394 "main(): returned from first free() call\n"
4395 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4396 "main(): returned from second free() call\n"
4397 "$ B<./a.out 2>             # Abort without error message\n"
4398 "main(): returned from first free() call\n"
4399 "Aborted (core dumped)\n"
4400 "$ B<./a.out 0>             # Ignore error and continue\n"
4401 "main(): returned from first free() call\n"
4402 "main(): returned from second free() call\n"
4403 msgstr ""
4404 "$ B<./a.out 1>             # Diagnose error and continue\n"
4405 "main(): returned from first free() call\n"
4406 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4407 "main(): returned from second free() call\n"
4408 "$ B<./a.out 2>             # Abort without error message\n"
4409 "main(): returned from first free() call\n"
4410 "Aborted (core dumped)\n"
4411 "$ B<./a.out 0>             # Ignore error and continue\n"
4412 "main(): returned from first free() call\n"
4413 "main(): returned from second free() call\n"
4414
4415 #. type: Plain text
4416 #: build/C/man3/mallopt.3:511
4417 msgid ""
4418 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4419 "environment variable:"
4420 msgstr ""
4421
4422 #. type: Plain text
4423 #: build/C/man3/mallopt.3:518
4424 #, no-wrap
4425 msgid ""
4426 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4427 "main(): returned from first free() call\n"
4428 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4429 "main(): returned from second free() call\n"
4430 msgstr ""
4431 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4432 "main(): returned from first free() call\n"
4433 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4434 "main(): returned from second free() call\n"
4435
4436 #. type: Plain text
4437 #: build/C/man3/mallopt.3:526
4438 #, no-wrap
4439 msgid ""
4440 "#include E<lt>malloc.hE<gt>\n"
4441 "#include E<lt>stdio.hE<gt>\n"
4442 "#include E<lt>stdlib.hE<gt>\n"
4443 msgstr ""
4444 "#include E<lt>malloc.hE<gt>\n"
4445 "#include E<lt>stdio.hE<gt>\n"
4446 "#include E<lt>stdlib.hE<gt>\n"
4447
4448 #. type: Plain text
4449 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4450 #, no-wrap
4451 msgid ""
4452 "int\n"
4453 "main(int argc, char *argv[])\n"
4454 "{\n"
4455 "    char *p;\n"
4456 msgstr ""
4457 "int\n"
4458 "main(int argc, char *argv[])\n"
4459 "{\n"
4460 "    char *p;\n"
4461
4462 #. type: Plain text
4463 #: build/C/man3/mallopt.3:538
4464 #, no-wrap
4465 msgid ""
4466 "    if (argc E<gt> 1) {\n"
4467 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4468 "            fprintf(stderr, \"mallopt() failed\");\n"
4469 "            exit(EXIT_FAILURE);\n"
4470 "        }\n"
4471 "    }\n"
4472 msgstr ""
4473 "    if (argc E<gt> 1) {\n"
4474 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4475 "            fprintf(stderr, \"mallopt() failed\");\n"
4476 "            exit(EXIT_FAILURE);\n"
4477 "        }\n"
4478 "    }\n"
4479
4480 #. type: Plain text
4481 #: build/C/man3/mallopt.3:544
4482 #, no-wrap
4483 msgid ""
4484 "    p = malloc(1000);\n"
4485 "    if (p == NULL) {\n"
4486 "        fprintf(stderr, \"malloc() failed\");\n"
4487 "        exit(EXIT_FAILURE);\n"
4488 "    }\n"
4489 msgstr ""
4490 "    p = malloc(1000);\n"
4491 "    if (p == NULL) {\n"
4492 "        fprintf(stderr, \"malloc() failed\");\n"
4493 "        exit(EXIT_FAILURE);\n"
4494 "    }\n"
4495
4496 #. type: Plain text
4497 #: build/C/man3/mallopt.3:547
4498 #, no-wrap
4499 msgid ""
4500 "    free(p);\n"
4501 "    printf(\"main(): returned from first free() call\\en\");\n"
4502 msgstr ""
4503 "    free(p);\n"
4504 "    printf(\"main(): returned from first free() call\\en\");\n"
4505
4506 #. type: Plain text
4507 #: build/C/man3/mallopt.3:550
4508 #, no-wrap
4509 msgid ""
4510 "    free(p);\n"
4511 "    printf(\"main(): returned from second free() call\\en\");\n"
4512 msgstr ""
4513 "    free(p);\n"
4514 "    printf(\"main(): returned from second free() call\\en\");\n"
4515
4516 #. type: Plain text
4517 #: build/C/man3/mallopt.3:568
4518 msgid ""
4519 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4520 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4521 "B<mtrace>(3), B<posix_memalign>(3)"
4522 msgstr ""
4523 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4524 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4525 "B<mtrace>(3), B<posix_memalign>(3)"
4526
4527 #. type: TH
4528 #: build/C/man3/mcheck.3:25
4529 #, no-wrap
4530 msgid "MCHECK"
4531 msgstr "MCHECK"
4532
4533 #. type: TH
4534 #: build/C/man3/mcheck.3:25
4535 #, no-wrap
4536 msgid "2014-01-11"
4537 msgstr "2014-01-11"
4538
4539 #. type: Plain text
4540 #: build/C/man3/mcheck.3:28
4541 msgid ""
4542 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4543 msgstr ""
4544
4545 #. type: Plain text
4546 #: build/C/man3/mcheck.3:31
4547 #, no-wrap
4548 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4549 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4550
4551 #. type: Plain text
4552 #: build/C/man3/mcheck.3:33
4553 #, no-wrap
4554 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4555 msgstr ""
4556
4557 #. type: Plain text
4558 #: build/C/man3/mcheck.3:35
4559 #, no-wrap
4560 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4561 msgstr ""
4562
4563 #. type: Plain text
4564 #: build/C/man3/mcheck.3:37
4565 #, no-wrap
4566 msgid "B<void mcheck_check_all(void);>\n"
4567 msgstr "B<void mcheck_check_all(void);>\n"
4568
4569 #. type: Plain text
4570 #: build/C/man3/mcheck.3:39
4571 #, no-wrap
4572 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4573 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4574
4575 #. type: Plain text
4576 #: build/C/man3/mcheck.3:51
4577 msgid ""
4578 "The B<mcheck>()  function installs a set of debugging hooks for the "
4579 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4580 "certain consistency checks to be performed on the state of the heap.  The "
4581 "checks can detect application errors such as freeing a block of memory more "
4582 "than once or corrupting the bookkeeping data structures that immediately "
4583 "precede a block of allocated memory."
4584 msgstr ""
4585
4586 #. type: Plain text
4587 #: build/C/man3/mcheck.3:63
4588 msgid ""
4589 "To be effective, the B<mcheck>()  function must be called before the first "
4590 "call to B<malloc>(3)  or a related function.  In cases where this is "
4591 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4592 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4593 "to a memory-allocation function."
4594 msgstr ""
4595
4596 #. type: Plain text
4597 #: build/C/man3/mcheck.3:71
4598 msgid ""
4599 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4600 "checks on all allocated blocks whenever one of the memory-allocation "
4601 "functions is called.  This can be very slow!"
4602 msgstr ""
4603
4604 #. type: Plain text
4605 #: build/C/man3/mcheck.3:78
4606 msgid ""
4607 "The B<mcheck_check_all>()  function causes an immediate check on all "
4608 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4609 "beforehand."
4610 msgstr ""
4611
4612 #. type: Plain text
4613 #: build/C/man3/mcheck.3:91
4614 msgid ""
4615 "If the system detects an inconsistency in the heap, the caller-supplied "
4616 "function pointed to by I<abortfunc> is invoked with a single argument "
4617 "argument, I<mstatus>, that indicates what type of inconsistency was "
4618 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4619 "message on I<stderr> and calls B<abort>(3)."
4620 msgstr ""
4621
4622 #. type: Plain text
4623 #: build/C/man3/mcheck.3:103
4624 msgid ""
4625 "The B<mprobe>()  function performs a consistency check on the block of "
4626 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4627 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4628 msgstr ""
4629
4630 #. type: Plain text
4631 #: build/C/man3/mcheck.3:111
4632 msgid ""
4633 "The following list describes the values returned by B<mprobe>()  or passed "
4634 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4635 msgstr ""
4636
4637 #. type: TP
4638 #: build/C/man3/mcheck.3:111
4639 #, no-wrap
4640 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4641 msgstr ""
4642
4643 #. type: Plain text
4644 #: build/C/man3/mcheck.3:116
4645 msgid ""
4646 "B<mcheck>()  was not called before the first memory allocation function was "
4647 "called.  Consistency checking is not possible."
4648 msgstr ""
4649
4650 #. type: TP
4651 #: build/C/man3/mcheck.3:116
4652 #, no-wrap
4653 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4654 msgstr ""
4655
4656 #. type: Plain text
4657 #: build/C/man3/mcheck.3:119
4658 msgid "No inconsistency detected."
4659 msgstr ""
4660
4661 #. type: TP
4662 #: build/C/man3/mcheck.3:119
4663 #, no-wrap
4664 msgid "B<MCHECK_HEAD>"
4665 msgstr "B<MCHECK_HEAD>"
4666
4667 #. type: Plain text
4668 #: build/C/man3/mcheck.3:122
4669 msgid "Memory preceding an allocated block was clobbered."
4670 msgstr ""
4671
4672 #. type: TP
4673 #: build/C/man3/mcheck.3:122
4674 #, no-wrap
4675 msgid "B<MCHECK_TAIL>"
4676 msgstr "B<MCHECK_TAIL>"
4677
4678 #. type: Plain text
4679 #: build/C/man3/mcheck.3:125
4680 msgid "Memory following an allocated block was clobbered."
4681 msgstr ""
4682
4683 #. type: TP
4684 #: build/C/man3/mcheck.3:125
4685 #, no-wrap
4686 msgid "B<MCHECK_FREE>"
4687 msgstr "B<MCHECK_FREE>"
4688
4689 #. type: Plain text
4690 #: build/C/man3/mcheck.3:129
4691 msgid "A block of memory was freed twice."
4692 msgstr ""
4693
4694 #. type: Plain text
4695 #: build/C/man3/mcheck.3:134
4696 msgid ""
4697 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4698 msgstr ""
4699
4700 #. type: Plain text
4701 #: build/C/man3/mcheck.3:145
4702 msgid ""
4703 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4704 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4705 "since at least glibc 2.0"
4706 msgstr ""
4707
4708 #.  But is MALLOC_CHECK_ slower?
4709 #. type: Plain text
4710 #: build/C/man3/mcheck.3:159
4711 msgid ""
4712 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4713 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4714 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4715 "application to be relinked."
4716 msgstr ""
4717
4718 #. type: Plain text
4719 #: build/C/man3/mcheck.3:165
4720 msgid ""
4721 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4722 "same block of memory twice.  The following shell session demonstrates what "
4723 "happens when running the program:"
4724 msgstr ""
4725
4726 #. type: Plain text
4727 #: build/C/man3/mcheck.3:170
4728 #, no-wrap
4729 msgid ""
4730 "$B< ./a.out>\n"
4731 "About to free\n"
4732 msgstr ""
4733
4734 #. type: Plain text
4735 #: build/C/man3/mcheck.3:174
4736 #, no-wrap
4737 msgid ""
4738 "About to free a second time\n"
4739 "block freed twice\n"
4740 "Aborted (core dumped)\n"
4741 msgstr ""
4742
4743 #. type: Plain text
4744 #: build/C/man3/mcheck.3:182
4745 #, no-wrap
4746 msgid ""
4747 "#include E<lt>stdlib.hE<gt>\n"
4748 "#include E<lt>stdio.hE<gt>\n"
4749 "#include E<lt>mcheck.hE<gt>\n"
4750 msgstr ""
4751 "#include E<lt>stdlib.hE<gt>\n"
4752 "#include E<lt>stdio.hE<gt>\n"
4753 "#include E<lt>mcheck.hE<gt>\n"
4754
4755 #. type: Plain text
4756 #: build/C/man3/mcheck.3:190
4757 #, no-wrap
4758 msgid ""
4759 "    if (mcheck(NULL) != 0) {\n"
4760 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4761 msgstr ""
4762
4763 #. type: Plain text
4764 #: build/C/man3/mcheck.3:193
4765 #, no-wrap
4766 msgid ""
4767 "        exit(EXIT_FAILURE);\n"
4768 "    }\n"
4769 msgstr ""
4770 "        exit(EXIT_FAILURE);\n"
4771 "    }\n"
4772
4773 #. type: Plain text
4774 #: build/C/man3/mcheck.3:195
4775 #, no-wrap
4776 msgid "    p = malloc(1000);\n"
4777 msgstr "    p = malloc(1000);\n"
4778
4779 #. type: Plain text
4780 #: build/C/man3/mcheck.3:200
4781 #, no-wrap
4782 msgid ""
4783 "    fprintf(stderr, \"About to free\\en\");\n"
4784 "    free(p);\n"
4785 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4786 "    free(p);\n"
4787 msgstr ""
4788
4789 #. type: Plain text
4790 #: build/C/man3/mcheck.3:208
4791 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4792 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4793
4794 #. type: TH
4795 #: build/C/man2/mlock.2:26
4796 #, no-wrap
4797 msgid "MLOCK"
4798 msgstr "MLOCK"
4799
4800 #. type: TH
4801 #: build/C/man2/mlock.2:26
4802 #, no-wrap
4803 msgid "2014-04-14"
4804 msgstr "2014-04-14"
4805
4806 #. type: Plain text
4807 #: build/C/man2/mlock.2:29
4808 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4809 msgstr "mlock - メモリのロックとロック解除を行う"
4810
4811 #. type: Plain text
4812 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4813 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4814 #, no-wrap
4815 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4816 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4817
4818 #. type: Plain text
4819 #: build/C/man2/mlock.2:35
4820 #, no-wrap
4821 msgid ""
4822 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4823 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4824 msgstr ""
4825 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4826 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4827
4828 #. type: Plain text
4829 #: build/C/man2/mlock.2:38
4830 #, no-wrap
4831 msgid ""
4832 "B<int mlockall(int >I<flags>B<);>\n"
4833 "B<int munlockall(void);>\n"
4834 msgstr ""
4835 "B<int mlockall(int >I<flags>B<);>\n"
4836 "B<int munlockall(void);>\n"
4837
4838 #. type: Plain text
4839 #: build/C/man2/mlock.2:54
4840 msgid ""
4841 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4842 "process's virtual address space into RAM, preventing that memory from being "
4843 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4844 "converse operation, respectively unlocking part or all of the calling "
4845 "process's virtual address space, so that pages in the specified virtual "
4846 "address range may once more to be swapped out if required by the kernel "
4847 "memory manager.  Memory locking and unlocking are performed in units of "
4848 "whole pages."
4849 msgstr ""
4850 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4851 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4852 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4853 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4854 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4855 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4856 "る。"
4857
4858 #. type: SS
4859 #: build/C/man2/mlock.2:54
4860 #, no-wrap
4861 msgid "mlock() and munlock()"
4862 msgstr "mlock() と munlock()"
4863
4864 #. type: Plain text
4865 #: build/C/man2/mlock.2:64
4866 msgid ""
4867 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4868 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4869 "address range are guaranteed to be resident in RAM when the call returns "
4870 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4871 msgstr ""
4872 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4873 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4874 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4875 "れるまで RAM に残り続けることが保証される。"
4876
4877 #. type: Plain text
4878 #: build/C/man2/mlock.2:73
4879 msgid ""
4880 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4881 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4882 "of the specified memory range can be moved to external swap space again by "
4883 "the kernel."
4884 msgstr ""
4885 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4886 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4887 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4888
4889 #. type: SS
4890 #: build/C/man2/mlock.2:73
4891 #, no-wrap
4892 msgid "mlockall() and munlockall()"
4893 msgstr "mlockall() と munlockall()"
4894
4895 #. type: Plain text
4896 #: build/C/man2/mlock.2:83
4897 msgid ""
4898 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4899 "process.  This includes the pages of the code, data and stack segment, as "
4900 "well as shared libraries, user space kernel data, shared memory, and memory-"
4901 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4902 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4903 "later unlocked."
4904 msgstr ""
4905 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4906 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4907 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4908 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4909 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4910 "残り続けることが保証される。"
4911
4912 #. type: Plain text
4913 #: build/C/man2/mlock.2:88
4914 msgid ""
4915 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4916 "following constants:"
4917 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4918
4919 #. type: TP
4920 #: build/C/man2/mlock.2:88
4921 #, no-wrap
4922 msgid "B<MCL_CURRENT>"
4923 msgstr "B<MCL_CURRENT>"
4924
4925 #. type: Plain text
4926 #: build/C/man2/mlock.2:92
4927 msgid ""
4928 "Lock all pages which are currently mapped into the address space of the "
4929 "process."
4930 msgstr ""
4931 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4932
4933 #. type: TP
4934 #: build/C/man2/mlock.2:92
4935 #, no-wrap
4936 msgid "B<MCL_FUTURE>"
4937 msgstr "B<MCL_FUTURE>"
4938
4939 #. type: Plain text
4940 #: build/C/man2/mlock.2:99
4941 msgid ""
4942 "Lock all pages which will become mapped into the address space of the "
4943 "process in the future.  These could be for instance new pages required by a "
4944 "growing heap and stack as well as new memory-mapped files or shared memory "
4945 "regions."
4946 msgstr ""
4947 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4948 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4949 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4950
4951 #. type: Plain text
4952 #: build/C/man2/mlock.2:112
4953 msgid ""
4954 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4955 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4956 "of locked bytes to exceed the permitted maximum (see below).  In the same "
4957 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4958 "expansion and deliver a B<SIGSEGV> signal to the process."
4959 msgstr ""
4960 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4961 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4962 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4963 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4964 "スに送る。"
4965
4966 #. type: Plain text
4967 #: build/C/man2/mlock.2:116
4968 msgid ""
4969 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4970 "calling process."
4971 msgstr ""
4972 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4973 "全てのページをロック解除する。"
4974
4975 #. type: Plain text
4976 #: build/C/man2/mlock.2:122
4977 msgid ""
4978 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4979 "is set appropriately, and no changes are made to any locks in the address "
4980 "space of the process."
4981 msgstr ""
4982 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4983 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4984 "れない。"
4985
4986 #. type: Plain text
4987 #: build/C/man2/mlock.2:131
4988 msgid ""
4989 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4990 "resource limit, but tried to lock more memory than the limit permitted.  "
4991 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4992 msgstr ""
4993 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4994 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4995 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4996
4997 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4998 #.  take into account whether the to-be-locked range overlaps with
4999 #.  already locked pages.  Thus, suppose we allocate
5000 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
5001 #.  mlock(), and then lock the *same* page range a second time.
5002 #.  In the case, the second mlock() call will fail, since the check
5003 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
5004 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
5005 #. type: Plain text
5006 #: build/C/man2/mlock.2:143
5007 msgid ""
5008 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
5009 "RAM."
5010 msgstr ""
5011 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
5012
5013 #. SVr4 documents an additional EAGAIN error code.
5014 #. type: Plain text
5015 #: build/C/man2/mlock.2:149
5016 msgid ""
5017 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
5018 "perform the requested operation."
5019 msgstr ""
5020 "呼び出し側が特権を持っていないが、\n"
5021 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5022
5023 #. type: Plain text
5024 #: build/C/man2/mlock.2:154
5025 msgid "For B<mlock>()  and B<munlock>():"
5026 msgstr "B<mlock>()  と B<munlock>()  用として:"
5027
5028 #. type: Plain text
5029 #: build/C/man2/mlock.2:157
5030 msgid "Some or all of the specified address range could not be locked."
5031 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5032
5033 #. type: Plain text
5034 #: build/C/man2/mlock.2:164
5035 msgid ""
5036 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5037 "addition may have resulted in an overflow)."
5038 msgstr ""
5039 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5040 "(例えば、加算でオーバーフローが発生したなど)。"
5041
5042 #. type: Plain text
5043 #: build/C/man2/mlock.2:169
5044 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5045 msgstr ""
5046 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5047
5048 #. type: Plain text
5049 #: build/C/man2/mlock.2:173
5050 msgid ""
5051 "Some of the specified address range does not correspond to mapped pages in "
5052 "the address space of the process."
5053 msgstr ""
5054 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5055 "い。"
5056
5057 #. type: Plain text
5058 #: build/C/man2/mlock.2:176
5059 msgid "For B<mlockall>():"
5060 msgstr "B<mlockall>()  用として:"
5061
5062 #. type: Plain text
5063 #: build/C/man2/mlock.2:179
5064 msgid "Unknown I<flags> were specified."
5065 msgstr "未知の I<flags> が指定された。"
5066
5067 #. type: Plain text
5068 #: build/C/man2/mlock.2:182
5069 msgid "For B<munlockall>():"
5070 msgstr "B<munlockall>()  用として:"
5071
5072 #. type: Plain text
5073 #: build/C/man2/mlock.2:186
5074 msgid ""
5075 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5076 msgstr ""
5077 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5078
5079 #. type: Plain text
5080 #: build/C/man2/mlock.2:188
5081 msgid "POSIX.1-2001, SVr4."
5082 msgstr "POSIX.1-2001, SVr4."
5083
5084 #. type: SH
5085 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:503 build/C/man2/msync.2:105
5086 #, no-wrap
5087 msgid "AVAILABILITY"
5088 msgstr "可用性"
5089
5090 #. type: Plain text
5091 #: build/C/man2/mlock.2:200
5092 msgid ""
5093 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5094 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5095 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5096 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5097 msgstr ""
5098 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5099 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5100 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5101 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5102 "び出すことで決定できる。"
5103
5104 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5105 #.  -1: unavailable, 0: ask using sysconf().
5106 #.  glibc defines it to 1.
5107 #. type: Plain text
5108 #: build/C/man2/mlock.2:213
5109 msgid ""
5110 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5111 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5112 "than 0.  (See also B<sysconf>(3).)"
5113 msgstr ""
5114 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5115 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5116 "(B<sysconf>(3)  も参照のこと)。"
5117
5118 #. type: Plain text
5119 #: build/C/man2/mlock.2:231
5120 msgid ""
5121 "Memory locking has two main applications: real-time algorithms and high-"
5122 "security data processing.  Real-time applications require deterministic "
5123 "timing, and, like scheduling, paging is one major cause of unexpected "
5124 "program execution delays.  Real-time applications will usually also switch "
5125 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5126 "security software often handles critical bytes like passwords or secret keys "
5127 "as data structures.  As a result of paging, these secrets could be "
5128 "transferred onto a persistent swap store medium, where they might be "
5129 "accessible to the enemy long after the security software has erased the "
5130 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5131 "laptops and some desktop computers will save a copy of the system's RAM to "
5132 "disk, regardless of memory locks.)"
5133 msgstr ""
5134 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5135 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5136 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5137 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5138 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5139 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5140 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5141 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
5142 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
5143 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
5144 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
5145 "存することに注意)。"
5146
5147 #. type: Plain text
5148 #: build/C/man2/mlock.2:244
5149 msgid ""
5150 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5151 "faults should reserve enough locked stack pages before entering the time-"
5152 "critical section, so that no page fault can be caused by function calls.  "
5153 "This can be achieved by calling a function that allocates a sufficiently "
5154 "large automatic variable (an array) and writes to the memory occupied by "
5155 "this array in order to touch these stack pages.  This way, enough pages will "
5156 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5157 "that not even copy-on-write page faults can occur in the critical section."
5158 msgstr ""
5159 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5160 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5161 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5162 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5163 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
5164 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5165 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5166 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5167 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5168
5169 #. type: Plain text
5170 #: build/C/man2/mlock.2:257
5171 msgid ""
5172 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5173 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5174 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5175 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5176 msgstr ""
5177 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5178 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5179 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5180 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5181
5182 #. type: Plain text
5183 #: build/C/man2/mlock.2:261
5184 msgid ""
5185 "The memory lock on an address range is automatically removed if the address "
5186 "range is unmapped via B<munmap>(2)."
5187 msgstr ""
5188 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5189 "よってアンマップされた場合は削除される。"
5190
5191 #. type: Plain text
5192 #: build/C/man2/mlock.2:274
5193 msgid ""
5194 "Memory locks do not stack, that is, pages which have been locked several "
5195 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5196 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5197 "Pages which are mapped to several locations or by several processes stay "
5198 "locked into RAM as long as they are locked at least at one location or by at "
5199 "least one process."
5200 msgstr ""
5201 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5202 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5203 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5204 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5205 "のプロセスでロックされている限りは RAM に残り続ける。"
5206
5207 #. type: Plain text
5208 #: build/C/man2/mlock.2:285
5209 msgid ""
5210 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5211 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5212 "implementation to require that I<addr> is page aligned, so portable "
5213 "applications should ensure this."
5214 msgstr ""
5215 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5216 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5217 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5218 "ケーションではきちんと境界に合わせた方が良い。"
5219
5220 #. type: Plain text
5221 #: build/C/man2/mlock.2:298
5222 msgid ""
5223 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5224 "many kilobytes of memory the process with ID I<PID> has locked using "
5225 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5226 msgstr ""
5227 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5228 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5229 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5230 "表示される。"
5231
5232 #. type: SS
5233 #: build/C/man2/mlock.2:298
5234 #, no-wrap
5235 msgid "Limits and permissions"
5236 msgstr "制限と権限"
5237
5238 #. type: Plain text
5239 #: build/C/man2/mlock.2:305
5240 msgid ""
5241 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5242 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5243 "defines a limit on how much memory the process may lock."
5244 msgstr ""
5245 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5246 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5247 "できるかの制限を定義する。"
5248
5249 #. type: Plain text
5250 #: build/C/man2/mlock.2:311
5251 msgid ""
5252 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5253 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5254 "instead defines a limit on how much memory an unprivileged process may lock."
5255 msgstr ""
5256 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5257 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5258 "クできるメモリ量の制限を定義する。"
5259
5260 #. type: Plain text
5261 #: build/C/man2/mlock.2:319
5262 msgid ""
5263 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5264 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5265 "was rectified in kernel 2.4.18."
5266 msgstr ""
5267 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5268 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5269 "ネル 2.4.18 で修正された。"
5270
5271 #.  See the following LKML thread:
5272 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5273 #.  "Rationale for RLIMIT_MEMLOCK"
5274 #.  23 Jan 2006
5275 #. type: Plain text
5276 #: build/C/man2/mlock.2:336
5277 msgid ""
5278 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5279 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5280 "example, setting its effective UID to a nonzero value), then subsequent "
5281 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5282 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5283 msgstr ""
5284 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5285 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5286 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5287 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5288 "B<brk>(2))  は失敗する。"
5289
5290 #. type: Plain text
5291 #: build/C/man2/mlock.2:343
5292 msgid ""
5293 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5294 "B<capabilities>(7)"
5295 msgstr ""
5296 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5297 "B<capabilities>(7)"
5298
5299 #. type: TH
5300 #: build/C/man2/mmap.2:40
5301 #, no-wrap
5302 msgid "MMAP"
5303 msgstr "MMAP"
5304
5305 #. type: Plain text
5306 #: build/C/man2/mmap.2:43
5307 msgid "mmap, munmap - map or unmap files or devices into memory"
5308 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5309
5310 #. type: Plain text
5311 #: build/C/man2/mmap.2:51
5312 #, no-wrap
5313 msgid ""
5314 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5315 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5316 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5317 msgstr ""
5318 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5319 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5320 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5321
5322 #. type: Plain text
5323 #: build/C/man2/mmap.2:54
5324 msgid "See NOTES for information on feature test macro requirements."
5325 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5326
5327 #. type: Plain text
5328 #: build/C/man2/mmap.2:63
5329 msgid ""
5330 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5331 "process.  The starting address for the new mapping is specified in I<addr>.  "
5332 "The I<length> argument specifies the length of the mapping."
5333 msgstr ""
5334 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5335 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5336 "は I<length> 引き数で指定される。"
5337
5338 #.  Before Linux 2.6.24, the address was rounded up to the next page
5339 #.  boundary; since 2.6.24, it is rounded down!
5340 #. type: Plain text
5341 #: build/C/man2/mmap.2:77
5342 msgid ""
5343 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5344 "the mapping; this is the most portable method of creating a new mapping.  If "
5345 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5346 "the mapping; on Linux, the mapping will be created at a nearby page "
5347 "boundary.  The address of the new mapping is returned as the result of the "
5348 "call."
5349 msgstr ""
5350 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5351 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5352 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5353 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5354 "ングのアドレスは、呼び出しの返り値として返される。"
5355
5356 #. type: Plain text
5357 #: build/C/man2/mmap.2:89
5358 msgid ""
5359 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5360 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5361 "offset I<offset> in the file (or other object) referred to by the file "
5362 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5363 "by I<sysconf(_SC_PAGE_SIZE)>."
5364 msgstr ""
5365 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5366 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5367 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5368 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5369 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5370
5371 #. type: Plain text
5372 #: build/C/man2/mmap.2:97
5373 msgid ""
5374 "The I<prot> argument describes the desired memory protection of the mapping "
5375 "(and must not conflict with the open mode of the file).  It is either "
5376 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5377 msgstr ""
5378 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5379 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5380 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5381
5382 #. type: TP
5383 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5384 #, no-wrap
5385 msgid "B<PROT_EXEC>"
5386 msgstr "B<PROT_EXEC>"
5387
5388 #. type: Plain text
5389 #: build/C/man2/mmap.2:100
5390 msgid "Pages may be executed."
5391 msgstr "ページは実行可能である。"
5392
5393 #. type: TP
5394 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5395 #, no-wrap
5396 msgid "B<PROT_READ>"
5397 msgstr "B<PROT_READ>"
5398
5399 #. type: Plain text
5400 #: build/C/man2/mmap.2:103
5401 msgid "Pages may be read."
5402 msgstr "ページは読み込み可能である。"
5403
5404 #. type: TP
5405 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5406 #, no-wrap
5407 msgid "B<PROT_WRITE>"
5408 msgstr "B<PROT_WRITE>"
5409
5410 #. type: Plain text
5411 #: build/C/man2/mmap.2:106
5412 msgid "Pages may be written."
5413 msgstr "ページに書き込み可能である。"
5414
5415 #. type: TP
5416 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5417 #, no-wrap
5418 msgid "B<PROT_NONE>"
5419 msgstr "B<PROT_NONE>"
5420
5421 #. type: Plain text
5422 #: build/C/man2/mmap.2:109
5423 msgid "Pages may not be accessed."
5424 msgstr "ページにはアクセスできない。"
5425
5426 #. type: Plain text
5427 #: build/C/man2/mmap.2:118
5428 msgid ""
5429 "The I<flags> argument determines whether updates to the mapping are visible "
5430 "to other processes mapping the same region, and whether updates are carried "
5431 "through to the underlying file.  This behavior is determined by including "
5432 "exactly one of the following values in I<flags>:"
5433 msgstr ""
5434 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5435 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5436 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5437 "I<flags> に含めることで指定する。"
5438
5439 #. type: TP
5440 #: build/C/man2/mmap.2:118
5441 #, no-wrap
5442 msgid "B<MAP_SHARED>"
5443 msgstr "B<MAP_SHARED>"
5444
5445 #. type: Plain text
5446 #: build/C/man2/mmap.2:128
5447 msgid ""
5448 "Share this mapping.  Updates to the mapping are visible to other processes "
5449 "that map this file, and are carried through to the underlying file.  The "
5450 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5451 "called."
5452 msgstr ""
5453 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5454 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5455 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5456 "るまで行われないこともある。"
5457
5458 #. type: TP
5459 #: build/C/man2/mmap.2:128
5460 #, no-wrap
5461 msgid "B<MAP_PRIVATE>"
5462 msgstr "B<MAP_PRIVATE>"
5463
5464 #. type: Plain text
5465 #: build/C/man2/mmap.2:137
5466 msgid ""
5467 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5468 "visible to other processes mapping the same file, and are not carried "
5469 "through to the underlying file.  It is unspecified whether changes made to "
5470 "the file after the B<mmap>()  call are visible in the mapped region."
5471 msgstr ""
5472 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5473 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5474 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5475 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5476 "かは規定されていない。"
5477
5478 #. type: Plain text
5479 #: build/C/man2/mmap.2:139
5480 msgid "Both of these flags are described in POSIX.1-2001."
5481 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5482
5483 #. type: Plain text
5484 #: build/C/man2/mmap.2:142
5485 msgid ""
5486 "In addition, zero or more of the following values can be ORed in I<flags>:"
5487 msgstr ""
5488 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5489 "ことができる。"
5490
5491 #. type: TP
5492 #: build/C/man2/mmap.2:142
5493 #, no-wrap
5494 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5495 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5496
5497 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5498 #. type: Plain text
5499 #: build/C/man2/mmap.2:158
5500 msgid ""
5501 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5502 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5503 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5504 "as to improve context-switch performance on some early 64-bit processors.  "
5505 "Modern x86-64 processors no longer have this performance problem, so use of "
5506 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5507 "ignored when B<MAP_FIXED> is set."
5508 msgstr ""
5509 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5510 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5511 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5512 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5513 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5514 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5515 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5516 "グは無視される。"
5517
5518 #. type: TP
5519 #: build/C/man2/mmap.2:158
5520 #, no-wrap
5521 msgid "B<MAP_ANON>"
5522 msgstr "B<MAP_ANON>"
5523
5524 #. type: Plain text
5525 #: build/C/man2/mmap.2:163
5526 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5527 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5528
5529 #. type: TP
5530 #: build/C/man2/mmap.2:163
5531 #, no-wrap
5532 msgid "B<MAP_ANONYMOUS>"
5533 msgstr "B<MAP_ANONYMOUS>"
5534
5535 #. type: Plain text
5536 #: build/C/man2/mmap.2:185
5537 msgid ""
5538 "The mapping is not backed by any file; its contents are initialized to "
5539 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5540 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5541 "is specified, and portable applications should ensure this.  The use of "
5542 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5543 "only since kernel 2.4."
5544 msgstr ""
5545 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5546 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5547 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5548 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5549 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5550 "以降の Linux でのみサポートされている。"
5551
5552 #. type: TP
5553 #: build/C/man2/mmap.2:185
5554 #, no-wrap
5555 msgid "B<MAP_DENYWRITE>"
5556 msgstr "B<MAP_DENYWRITE>"
5557
5558 #.  Introduced in 1.1.36, removed in 1.3.24.
5559 #. type: Plain text
5560 #: build/C/man2/mmap.2:193
5561 msgid ""
5562 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5563 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5564 "denial-of-service attacks.)"
5565 msgstr ""
5566 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5567 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5568 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5569
5570 #. type: TP
5571 #: build/C/man2/mmap.2:193
5572 #, no-wrap
5573 msgid "B<MAP_EXECUTABLE>"
5574 msgstr "B<MAP_EXECUTABLE>"
5575
5576 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5577 #.  (Long ago, it signaled that the underlying file is an executable.
5578 #.  However, that information was not really used anywhere.)
5579 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5580 #.  MAP_DENYWRITE?
5581 #. type: Plain text
5582 #: build/C/man2/mmap.2:201
5583 msgid "This flag is ignored."
5584 msgstr "このフラグは無視される。"
5585
5586 #. type: TP
5587 #: build/C/man2/mmap.2:201
5588 #, no-wrap
5589 msgid "B<MAP_FILE>"
5590 msgstr "B<MAP_FILE>"
5591
5592 #.  On some systems, this was required as the opposite of
5593 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5594 #. type: Plain text
5595 #: build/C/man2/mmap.2:207
5596 msgid "Compatibility flag.  Ignored."
5597 msgstr "互換性のためのフラグ。無視される。"
5598
5599 #. type: TP
5600 #: build/C/man2/mmap.2:207
5601 #, no-wrap
5602 msgid "B<MAP_FIXED>"
5603 msgstr "B<MAP_FIXED>"
5604
5605 #. type: Plain text
5606 #: build/C/man2/mmap.2:225
5607 msgid ""
5608 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5609 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5610 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5611 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5612 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5613 "requiring a fixed address for a mapping is less portable, the use of this "
5614 "option is discouraged."
5615 msgstr ""
5616 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5617 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5618 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5619 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5620 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5621 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5622 "を推奨する。"
5623
5624 #. type: TP
5625 #: build/C/man2/mmap.2:225
5626 #, no-wrap
5627 msgid "B<MAP_GROWSDOWN>"
5628 msgstr "B<MAP_GROWSDOWN>"
5629
5630 #. type: Plain text
5631 #: build/C/man2/mmap.2:230
5632 msgid ""
5633 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5634 "mapping should extend downward in memory."
5635 msgstr ""
5636 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5637 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5638 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5639
5640 #. type: TP
5641 #: build/C/man2/mmap.2:230
5642 #, no-wrap
5643 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5644 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5645
5646 #. type: Plain text
5647 #: build/C/man2/mmap.2:236
5648 msgid ""
5649 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5650 "I<Documentation/vm/hugetlbpage.txt> for further information."
5651 msgstr ""
5652 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5653 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5654
5655 #. type: TP
5656 #: build/C/man2/mmap.2:236
5657 #, no-wrap
5658 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5659 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5660
5661 #.  If set, the mapped pages will not be swapped out.
5662 #. type: Plain text
5663 #: build/C/man2/mmap.2:242
5664 msgid ""
5665 "Lock the pages of the mapped region into memory in the manner of "
5666 "B<mlock>(2).  This flag is ignored in older kernels."
5667 msgstr ""
5668 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5669 "前のカーネルでは、このフラグは無視される。"
5670
5671 #. type: TP
5672 #: build/C/man2/mmap.2:242
5673 #, no-wrap
5674 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5675 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5676
5677 #. type: Plain text
5678 #: build/C/man2/mmap.2:257
5679 msgid ""
5680 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5681 "ahead: create page tables entries only for pages that are already present in "
5682 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5683 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5684 "reimplemented."
5685 msgstr ""
5686 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5687 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5688 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5689 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5690 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5691
5692 #. type: TP
5693 #: build/C/man2/mmap.2:257
5694 #, no-wrap
5695 msgid "B<MAP_NORESERVE>"
5696 msgstr "B<MAP_NORESERVE>"
5697
5698 #. type: Plain text
5699 #: build/C/man2/mmap.2:272
5700 msgid ""
5701 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5702 "one has the guarantee that it is possible to modify the mapping.  When swap "
5703 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5704 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5705 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5706 "effect only for private writable mappings."
5707 msgstr ""
5708 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5709 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5710 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5711 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5712 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5713 "イベート・マッピングについてのみ効果があった。"
5714
5715 #. type: TP
5716 #: build/C/man2/mmap.2:272
5717 #, no-wrap
5718 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5719 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5720
5721 #. type: Plain text
5722 #: build/C/man2/mmap.2:279
5723 msgid ""
5724 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5725 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5726 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5727 "only since Linux 2.6.23."
5728 msgstr ""
5729 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5730 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5731 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5732 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5733 "されている。"
5734
5735 #. type: TP
5736 #: build/C/man2/mmap.2:279
5737 #, no-wrap
5738 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5739 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5740
5741 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5742 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5743 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5744 #.  "pthread_create() slow for many threads; also time to revisit 64b
5745 #.   context switch optimization?"
5746 #. type: Plain text
5747 #: build/C/man2/mmap.2:292
5748 msgid ""
5749 "Allocate the mapping at an address suitable for a process or thread stack.  "
5750 "This flag is currently a no-op, but is used in the glibc threading "
5751 "implementation so that if some architectures require special treatment for "
5752 "stack allocations, support can later be transparently implemented for glibc."
5753 msgstr ""
5754 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5755 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5756 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5757 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5758 "る。"
5759
5760 #. type: TP
5761 #: build/C/man2/mmap.2:292
5762 #, no-wrap
5763 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5764 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5765
5766 #. type: Plain text
5767 #: build/C/man2/mmap.2:302
5768 msgid ""
5769 "Don't clear anonymous pages.  This flag is intended to improve performance "
5770 "on embedded devices.  This flag is honored only if the kernel was configured "
5771 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5772 "implications, that option is normally enabled only on embedded devices (i."
5773 "e., devices where one has complete control of the contents of user memory)."
5774 msgstr ""
5775 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5776 "ス\n"
5777 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5778 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5779 "このフラグは効果を持つ。\n"
5780 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5781 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5782
5783 #. type: Plain text
5784 #: build/C/man2/mmap.2:310
5785 msgid ""
5786 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5787 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5788 "B<MAP_ANON>)."
5789 msgstr ""
5790 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5791 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5792 "B<MAP_ANON>)  もサポートされている。"
5793
5794 #. type: Plain text
5795 #: build/C/man2/mmap.2:317
5796 msgid ""
5797 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5798 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5799 msgstr ""
5800 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5801 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5802
5803 #. type: Plain text
5804 #: build/C/man2/mmap.2:323
5805 msgid ""
5806 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5807 "attributes."
5808 msgstr ""
5809 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5810
5811 #. type: Plain text
5812 #: build/C/man2/mmap.2:331
5813 msgid ""
5814 "A file is mapped in multiples of the page size.  For a file that is not a "
5815 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5816 "writes to that region are not written out to the file.  The effect of "
5817 "changing the size of the underlying file of a mapping on the pages that "
5818 "correspond to added or removed regions of the file is unspecified."
5819 msgstr ""
5820 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5821 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5822 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5823 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5824 "マップされたページに対してどのような影響があるかは規定されていない。"
5825
5826 #. type: SS
5827 #: build/C/man2/mmap.2:331
5828 #, no-wrap
5829 msgid "munmap()"
5830 msgstr "munmap()"
5831
5832 #. type: Plain text
5833 #: build/C/man2/mmap.2:341
5834 msgid ""
5835 "The B<munmap>()  system call deletes the mappings for the specified address "
5836 "range, and causes further references to addresses within the range to "
5837 "generate invalid memory references.  The region is also automatically "
5838 "unmapped when the process is terminated.  On the other hand, closing the "
5839 "file descriptor does not unmap the region."
5840 msgstr ""
5841 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5842 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5843 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5844 "はアンマップされない。"
5845
5846 #. type: Plain text
5847 #: build/C/man2/mmap.2:351
5848 msgid ""
5849 "The address I<addr> must be a multiple of the page size.  All pages "
5850 "containing a part of the indicated range are unmapped, and subsequent "
5851 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5852 "the indicated range does not contain any mapped pages."
5853 msgstr ""
5854 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5855 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5856 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5857 "ていない場合でも エラーにならない。"
5858
5859 #. type: SS
5860 #: build/C/man2/mmap.2:351
5861 #, no-wrap
5862 msgid "Timestamps changes for file-backed mappings"
5863 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5864
5865 #. type: Plain text
5866 #: build/C/man2/mmap.2:358
5867 msgid ""
5868 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5869 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5870 "the first reference to a mapped page will update the field if it has not "
5871 "been already."
5872 msgstr ""
5873 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5874 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5875 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5876 "ページへの最初の参照があった 際に更新される。"
5877
5878 #. type: Plain text
5879 #: build/C/man2/mmap.2:375
5880 msgid ""
5881 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5882 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5883 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5884 "one occurs."
5885 msgstr ""
5886 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5887 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5888 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5889 "B<msync>(2)  が呼ばれる前までに更新される。"
5890
5891 #. type: Plain text
5892 #: build/C/man2/mmap.2:392
5893 msgid ""
5894 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5895 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5896 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5897 "and I<errno> is set (probably to B<EINVAL>)."
5898 msgstr ""
5899 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5900 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5901 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5902 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5903
5904 #. type: TP
5905 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5906 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5907 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5908 #: build/C/man2/shmop.2:188
5909 #, no-wrap
5910 msgid "B<EACCES>"
5911 msgstr "B<EACCES>"
5912
5913 #. type: Plain text
5914 #: build/C/man2/mmap.2:411
5915 msgid ""
5916 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5917 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5918 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5919 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5920 msgstr ""
5921 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5922 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5923 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5924 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5925 "たが、ファイルは追加 (append) 専用である。"
5926
5927 #. type: Plain text
5928 #: build/C/man2/mmap.2:415
5929 msgid ""
5930 "The file has been locked, or too much memory has been locked (see "
5931 "B<setrlimit>(2))."
5932 msgstr ""
5933 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5934 "(B<setrlimit>(2)  を参照)。"
5935
5936 #. type: Plain text
5937 #: build/C/man2/mmap.2:421
5938 msgid ""
5939 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5940 msgstr ""
5941 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5942 "B<MAP_ANONYMOUS> がセットされていない)。"
5943
5944 #. type: Plain text
5945 #: build/C/man2/mmap.2:429
5946 msgid ""
5947 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5948 "not aligned on a page boundary)."
5949 msgstr ""
5950 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5951 "ジ境界にアラインメントされていない)。"
5952
5953 #. type: Plain text
5954 #: build/C/man2/mmap.2:434
5955 msgid "(since Linux 2.6.12)  I<length> was 0."
5956 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5957
5958 #. type: Plain text
5959 #: build/C/man2/mmap.2:442
5960 msgid ""
5961 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5962 "both of these values."
5963 msgstr ""
5964 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5965 "しくは その両方が含まれていた。"
5966
5967 #. type: TP
5968 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5969 #: build/C/man2/shmget.2:221 build/C/man2/memfd_create.2:149
5970 #, no-wrap
5971 msgid "B<ENFILE>"
5972 msgstr "B<ENFILE>"
5973
5974 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5975 #. type: Plain text
5976 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5977 msgid "The system limit on the total number of open files has been reached."
5978 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5979
5980 #. type: Plain text
5981 #: build/C/man2/mmap.2:454
5982 msgid ""
5983 "The underlying filesystem of the specified file does not support memory "
5984 "mapping."
5985 msgstr ""
5986 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5987 "していない。"
5988
5989 #. type: Plain text
5990 #: build/C/man2/mmap.2:458
5991 msgid ""
5992 "No memory is available, or the process's maximum number of mappings would "
5993 "have been exceeded."
5994 msgstr ""
5995 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5996
5997 #.  (Since 2.4.25 / 2.6.0.)
5998 #. type: Plain text
5999 #: build/C/man2/mmap.2:467
6000 msgid ""
6001 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
6002 "file on a filesystem that was mounted no-exec."
6003 msgstr ""
6004 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
6005 "トされたファイルシステム上のファイルに マップ領域が対応している。"
6006
6007 #. type: Plain text
6008 #: build/C/man2/mmap.2:477
6009 msgid ""
6010 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
6011 "writing."
6012 msgstr ""
6013 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
6014 "き込み用に開かれている。"
6015
6016 #. type: TP
6017 #: build/C/man2/mmap.2:477 build/C/man2/shmctl.2:348
6018 #, no-wrap
6019 msgid "B<EOVERFLOW>"
6020 msgstr "B<EOVERFLOW>"
6021
6022 #. type: Plain text
6023 #: build/C/man2/mmap.2:489
6024 msgid ""
6025 "On 32-bit architecture together with the large file extension (i.e., using "
6026 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6027 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6028 msgstr ""
6029 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
6030 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6031 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6032 "しまう) 場合がある。"
6033
6034 #. type: Plain text
6035 #: build/C/man2/mmap.2:491
6036 msgid "Use of a mapped region can result in these signals:"
6037 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6038
6039 #. type: TP
6040 #: build/C/man2/mmap.2:491
6041 #, no-wrap
6042 msgid "B<SIGSEGV>"
6043 msgstr "B<SIGSEGV>"
6044
6045 #. type: Plain text
6046 #: build/C/man2/mmap.2:494
6047 msgid "Attempted write into a region mapped as read-only."
6048 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6049
6050 #. type: TP
6051 #: build/C/man2/mmap.2:494
6052 #, no-wrap
6053 msgid "B<SIGBUS>"
6054 msgstr "B<SIGBUS>"
6055
6056 #. type: Plain text
6057 #: build/C/man2/mmap.2:499
6058 msgid ""
6059 "Attempted access to a portion of the buffer that does not correspond to the "
6060 "file (for example, beyond the end of the file, including the case where "
6061 "another process has truncated the file)."
6062 msgstr ""
6063 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
6064 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
6065 "にアクセスしようとした。"
6066
6067 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6068 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6069 #. type: Plain text
6070 #: build/C/man2/mmap.2:503
6071 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6072 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6073
6074 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6075 #.  -1: unavailable, 0: ask using sysconf().
6076 #.  glibc defines it to 1.
6077 #. type: Plain text
6078 #: build/C/man2/mmap.2:517
6079 msgid ""
6080 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>()  are "
6081 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6082 "value greater than 0.  (See also B<sysconf>(3).)"
6083 msgstr ""
6084 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6085 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6086 "(B<sysconf>(3)  も参照のこと)。"
6087
6088 #. type: Plain text
6089 #: build/C/man2/mmap.2:530
6090 msgid ""
6091 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6092 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6093 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6094 "they intend to execute code in the new mapping."
6095 msgstr ""
6096 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
6097 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
6098 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
6099 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
6100 "常に B<PROT_EXEC> をセットすべきである。"
6101
6102 #. type: Plain text
6103 #: build/C/man2/mmap.2:545
6104 msgid ""
6105 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6106 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6107 "address for the mapping; the address is chosen so as not to conflict with "
6108 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6109 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6110 msgstr ""
6111 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6112 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6113 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6114 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6115 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6116
6117 #. type: Plain text
6118 #: build/C/man2/mmap.2:575
6119 msgid ""
6120 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6121 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6122 "requiring that macro specifically would have been more logical, since these "
6123 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6124 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6125 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6126 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6127 "B<MAP_STACK>."
6128 msgstr ""
6129 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6130 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6131 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6132 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6133 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6134 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6135 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6136 "B<MAP_STACK> である。"
6137
6138 #. type: SS
6139 #: build/C/man2/mmap.2:575
6140 #, no-wrap
6141 msgid "C library/kernel ABI differences"
6142 msgstr "C ライブラリとカーネル ABI の違い"
6143
6144 #.  Since around glibc 2.1/2.2, depending on the platform.
6145 #. type: Plain text
6146 #: build/C/man2/mmap.2:590
6147 msgid ""
6148 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6149 "function.  Originally, this function invoked a system call of the same "
6150 "name.  Since kernel 2.4, that system call has been superseded by "
6151 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6152 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6153 msgstr ""
6154 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6155 "に\n"
6156 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6157 "た。\n"
6158 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6159 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6160 "B<mmap2>(2) を起動する。"
6161
6162 #. type: Plain text
6163 #: build/C/man2/mmap.2:595
6164 msgid ""
6165 "On Linux there are no guarantees like those suggested above under "
6166 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6167 "the system runs out of memory."
6168 msgstr ""
6169 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6170 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6171 "終了されるか分からないからである。"
6172
6173 #. type: Plain text
6174 #: build/C/man2/mmap.2:602
6175 msgid ""
6176 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6177 "is specified as B<PROT_NONE>."
6178 msgstr ""
6179 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6180 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6181
6182 #. type: Plain text
6183 #: build/C/man2/mmap.2:617
6184 msgid ""
6185 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6186 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6187 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6188 "fails with the error B<EINVAL> for this case."
6189 msgstr ""
6190 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6191 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6192 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6193 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6194
6195 #. type: Plain text
6196 #: build/C/man2/mmap.2:633
6197 msgid ""
6198 "POSIX specifies that the system shall always zero fill any partial page at "
6199 "the end of the object and that system will never write any modification of "
6200 "the object beyond its end.  On Linux, when you write data to such partial "
6201 "page after the end of the object, the data stays in the page cache even "
6202 "after the file is closed and unmapped and even though the data is never "
6203 "written to the file itself, subsequent mappings may see the modified "
6204 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6205 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6206 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6207 msgstr ""
6208 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6209 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6210 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6211 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6212 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6213 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6214 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6215 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6216 "共有メモリインターフェースを使った場合)。"
6217
6218 #. type: Plain text
6219 #: build/C/man2/mmap.2:645
6220 msgid ""
6221 "The following program prints part of the file specified in its first command-"
6222 "line argument to standard output.  The range of bytes to be printed is "
6223 "specified via offset and length values in the second and third command-line "
6224 "arguments.  The program creates a memory mapping of the required pages of "
6225 "the file and then uses B<write>(2)  to output the desired bytes."
6226 msgstr ""
6227 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6228 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6229 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6230 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6231 "を出力する。"
6232
6233 #. type: Plain text
6234 #: build/C/man2/mmap.2:653
6235 #, no-wrap
6236 msgid ""
6237 "#include E<lt>sys/mman.hE<gt>\n"
6238 "#include E<lt>sys/stat.hE<gt>\n"
6239 "#include E<lt>fcntl.hE<gt>\n"
6240 "#include E<lt>stdio.hE<gt>\n"
6241 "#include E<lt>stdlib.hE<gt>\n"
6242 "#include E<lt>unistd.hE<gt>\n"
6243 msgstr ""
6244 "#include E<lt>sys/mman.hE<gt>\n"
6245 "#include E<lt>sys/stat.hE<gt>\n"
6246 "#include E<lt>fcntl.hE<gt>\n"
6247 "#include E<lt>stdio.hE<gt>\n"
6248 "#include E<lt>stdlib.hE<gt>\n"
6249 "#include E<lt>unistd.hE<gt>\n"
6250
6251 #. type: Plain text
6252 #: build/C/man2/mmap.2:656 build/C/man2/mprotect.2:177
6253 #, no-wrap
6254 msgid ""
6255 "#define handle_error(msg) \\e\n"
6256 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6257 msgstr ""
6258 "#define handle_error(msg) \\e\n"
6259 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6260
6261 #. type: Plain text
6262 #: build/C/man2/mmap.2:666
6263 #, no-wrap
6264 msgid ""
6265 "int\n"
6266 "main(int argc, char *argv[])\n"
6267 "{\n"
6268 "    char *addr;\n"
6269 "    int fd;\n"
6270 "    struct stat sb;\n"
6271 "    off_t offset, pa_offset;\n"
6272 "    size_t length;\n"
6273 "    ssize_t s;\n"
6274 msgstr ""
6275 "int\n"
6276 "main(int argc, char *argv[])\n"
6277 "{\n"
6278 "    char *addr;\n"
6279 "    int fd;\n"
6280 "    struct stat sb;\n"
6281 "    off_t offset, pa_offset;\n"
6282 "    size_t length;\n"
6283 "    ssize_t s;\n"
6284
6285 #. type: Plain text
6286 #: build/C/man2/mmap.2:671
6287 #, no-wrap
6288 msgid ""
6289 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6290 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6291 "        exit(EXIT_FAILURE);\n"
6292 "    }\n"
6293 msgstr ""
6294 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6295 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6296 "        exit(EXIT_FAILURE);\n"
6297 "    }\n"
6298
6299 #. type: Plain text
6300 #: build/C/man2/mmap.2:675
6301 #, no-wrap
6302 msgid ""
6303 "    fd = open(argv[1], O_RDONLY);\n"
6304 "    if (fd == -1)\n"
6305 "        handle_error(\"open\");\n"
6306 msgstr ""
6307 "    fd = open(argv[1], O_RDONLY);\n"
6308 "    if (fd == -1)\n"
6309 "        handle_error(\"open\");\n"
6310
6311 #. type: Plain text
6312 #: build/C/man2/mmap.2:678
6313 #, no-wrap
6314 msgid ""
6315 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6316 "        handle_error(\"fstat\");\n"
6317 msgstr ""
6318 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6319 "        handle_error(\"fstat\");\n"
6320
6321 #. type: Plain text
6322 #: build/C/man2/mmap.2:682
6323 #, no-wrap
6324 msgid ""
6325 "    offset = atoi(argv[2]);\n"
6326 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6327 "        /* offset for mmap() must be page aligned */\n"
6328 msgstr ""
6329 "    offset = atoi(argv[2]);\n"
6330 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6331 "        /* offset for mmap() must be page aligned */\n"
6332
6333 #. type: Plain text
6334 #: build/C/man2/mmap.2:687
6335 #, no-wrap
6336 msgid ""
6337 "    if (offset E<gt>= sb.st_size) {\n"
6338 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6339 "        exit(EXIT_FAILURE);\n"
6340 "    }\n"
6341 msgstr ""
6342 "    if (offset E<gt>= sb.st_size) {\n"
6343 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6344 "        exit(EXIT_FAILURE);\n"
6345 "    }\n"
6346
6347 #. type: Plain text
6348 #: build/C/man2/mmap.2:693
6349 #, no-wrap
6350 msgid ""
6351 "    if (argc == 4) {\n"
6352 "        length = atoi(argv[3]);\n"
6353 "        if (offset + length E<gt> sb.st_size)\n"
6354 "            length = sb.st_size - offset;\n"
6355 "                /* Can\\(aqt display bytes past end of file */\n"
6356 msgstr ""
6357 "    if (argc == 4) {\n"
6358 "        length = atoi(argv[3]);\n"
6359 "        if (offset + length E<gt> sb.st_size)\n"
6360 "            length = sb.st_size - offset;\n"
6361 "                /* Can\\(aqt display bytes past end of file */\n"
6362
6363 #. type: Plain text
6364 #: build/C/man2/mmap.2:697
6365 #, no-wrap
6366 msgid ""
6367 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6368 "        length = sb.st_size - offset;\n"
6369 "    }\n"
6370 msgstr ""
6371 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6372 "        length = sb.st_size - offset;\n"
6373 "    }\n"
6374
6375 #. type: Plain text
6376 #: build/C/man2/mmap.2:702
6377 #, no-wrap
6378 msgid ""
6379 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6380 "                MAP_PRIVATE, fd, pa_offset);\n"
6381 "    if (addr == MAP_FAILED)\n"
6382 "        handle_error(\"mmap\");\n"
6383 msgstr ""
6384 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6385 "                MAP_PRIVATE, fd, pa_offset);\n"
6386 "    if (addr == MAP_FAILED)\n"
6387 "        handle_error(\"mmap\");\n"
6388
6389 #. type: Plain text
6390 #: build/C/man2/mmap.2:707
6391 #, no-wrap
6392 msgid ""
6393 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6394 "    if (s != length) {\n"
6395 "        if (s == -1)\n"
6396 "            handle_error(\"write\");\n"
6397 msgstr ""
6398 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6399 "    if (s != length) {\n"
6400 "        if (s == -1)\n"
6401 "            handle_error(\"write\");\n"
6402
6403 #. type: Plain text
6404 #: build/C/man2/mmap.2:711
6405 #, no-wrap
6406 msgid ""
6407 "        fprintf(stderr, \"partial write\");\n"
6408 "        exit(EXIT_FAILURE);\n"
6409 "    }\n"
6410 msgstr ""
6411 "        fprintf(stderr, \"partial write\");\n"
6412 "        exit(EXIT_FAILURE);\n"
6413 "    }\n"
6414
6415 #. type: Plain text
6416 #: build/C/man2/mmap.2:729
6417 msgid ""
6418 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6419 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6420 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6421 "B<shm_overview>(7)"
6422 msgstr ""
6423 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6424 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6425 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6426 "B<shm_overview>(7)"
6427
6428 #. type: Plain text
6429 #: build/C/man2/mmap.2:736
6430 msgid ""
6431 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6432 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6433 msgstr ""
6434 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6435 "smaps> の説明。"
6436
6437 #. type: Plain text
6438 #: build/C/man2/mmap.2:741 build/C/man2/msync.2:151
6439 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6440 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6441
6442 #. type: TH
6443 #: build/C/man2/mmap2.2:29
6444 #, no-wrap
6445 msgid "MMAP2"
6446 msgstr "MMAP2"
6447
6448 #. type: TH
6449 #: build/C/man2/mmap2.2:29
6450 #, no-wrap
6451 msgid "2014-02-25"
6452 msgstr "2014-02-25"
6453
6454 #. type: Plain text
6455 #: build/C/man2/mmap2.2:32
6456 msgid "mmap2 - map files or devices into memory"
6457 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6458
6459 #. type: Plain text
6460 #: build/C/man2/mmap2.2:38
6461 #, no-wrap
6462 msgid ""
6463 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6464 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6465 msgstr ""
6466 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6467 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6468
6469 #. type: Plain text
6470 #: build/C/man2/mmap2.2:43
6471 msgid ""
6472 "This is probably not the system call that you are interested in; instead, "
6473 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6474 "system call."
6475 msgstr ""
6476 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6477 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6478 "の\n"
6479 "ラッパー関数についての説明がある。"
6480
6481 #. type: Plain text
6482 #: build/C/man2/mmap2.2:54
6483 msgid ""
6484 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6485 "except that the final argument specifies the offset into the file in 4096-"
6486 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6487 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6488 "bytes)."
6489 msgstr ""
6490 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6491 "だ\n"
6492 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6493 "ト\n"
6494 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6495 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6496 "プ\n"
6497 "できるようになる。"
6498
6499 #. type: Plain text
6500 #: build/C/man2/mmap2.2:61
6501 msgid ""
6502 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6503 "is returned and I<errno> is set appropriately."
6504 msgstr ""
6505 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6506 "合は -1 が返されて、 I<errno> が適切に設定される。"
6507
6508 #. type: Plain text
6509 #: build/C/man2/mmap2.2:65
6510 msgid "Problem with getting the data from user space."
6511 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6512
6513 #. type: Plain text
6514 #: build/C/man2/mmap2.2:70
6515 msgid ""
6516 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6517 "4096> is not a multiple of the system page size."
6518 msgstr ""
6519 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6520 "4096> がシステムのページサイズの倍数ではない。"
6521
6522 #. type: Plain text
6523 #: build/C/man2/mmap2.2:74
6524 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6525 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6526
6527 #. type: Plain text
6528 #: build/C/man2/mmap2.2:77
6529 msgid "B<mmap2>()  is available since Linux 2.3.31."
6530 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6531
6532 #. type: Plain text
6533 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6534 msgid "This system call is Linux-specific."
6535 msgstr "このシステムコールは Linux 独自である。"
6536
6537 #. type: Plain text
6538 #: build/C/man2/mmap2.2:86
6539 msgid ""
6540 "On architectures where this system call is present, the glibc B<mmap>()  "
6541 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6542 "call."
6543 msgstr ""
6544 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6545 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6546 "(B<mmap2>(2))  を起動する。"
6547
6548 #. type: Plain text
6549 #: build/C/man2/mmap2.2:88
6550 msgid "This system call does not exist on x86-64."
6551 msgstr "このシステムコールは x86-64 には存在しない。"
6552
6553 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6554 #.  On cris, it looks like the unit might also be the page size,
6555 #.  which is 8192 bytes. -- mtk, June 2007
6556 #. type: Plain text
6557 #: build/C/man2/mmap2.2:95
6558 msgid ""
6559 "On ia64, the unit for I<offset> is actually the system page size, rather "
6560 "than 4096 bytes."
6561 msgstr ""
6562 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6563 "バイトではない。"
6564
6565 #. type: Plain text
6566 #: build/C/man2/mmap2.2:101
6567 msgid ""
6568 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6569 msgstr ""
6570 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6571
6572 #. type: TH
6573 #: build/C/man2/mprotect.2:39
6574 #, no-wrap
6575 msgid "MPROTECT"
6576 msgstr "MPROTECT"
6577
6578 #. type: TH
6579 #: build/C/man2/mprotect.2:39
6580 #, no-wrap
6581 msgid "2014-01-05"
6582 msgstr "2014-01-05"
6583
6584 #. type: Plain text
6585 #: build/C/man2/mprotect.2:42
6586 msgid "mprotect - set protection on a region of memory"
6587 msgstr "mprotect - メモリ領域の保護を設定する"
6588
6589 #. type: Plain text
6590 #: build/C/man2/mprotect.2:47
6591 #, no-wrap
6592 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6593 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6594
6595 #. type: Plain text
6596 #: build/C/man2/mprotect.2:55
6597 msgid ""
6598 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6599 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6600 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6601 msgstr ""
6602 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6603 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6604 "界に一致していなければならない。"
6605
6606 #. type: Plain text
6607 #: build/C/man2/mprotect.2:60
6608 msgid ""
6609 "If the calling process tries to access memory in a manner that violates the "
6610 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6611 msgstr ""
6612 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6613 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6614
6615 #. type: Plain text
6616 #: build/C/man2/mprotect.2:65
6617 msgid ""
6618 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6619 "following list:"
6620 msgstr ""
6621 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6622 "毎の論理和 (bitwize-or) で指定する:"
6623
6624 #. type: Plain text
6625 #: build/C/man2/mprotect.2:68
6626 msgid "The memory cannot be accessed at all."
6627 msgstr "そのメモリには全くアクセスできない。"
6628
6629 #. type: Plain text
6630 #: build/C/man2/mprotect.2:71
6631 msgid "The memory can be read."
6632 msgstr "そのメモリを読み取ることができる。"
6633
6634 #. type: Plain text
6635 #: build/C/man2/mprotect.2:74
6636 msgid "The memory can be modified."
6637 msgstr "そのメモリを変更できる。"
6638
6639 #. type: Plain text
6640 #: build/C/man2/mprotect.2:77
6641 msgid "The memory can be executed."
6642 msgstr "そのメモリは実行可能である。"
6643
6644 #. type: Plain text
6645 #: build/C/man2/mprotect.2:84
6646 msgid ""
6647 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6648 "I<errno> is set appropriately."
6649 msgstr ""
6650 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6651 "I<errno> が適切に設定される。"
6652
6653 #. type: Plain text
6654 #: build/C/man2/mprotect.2:94
6655 msgid ""
6656 "The memory cannot be given the specified access.  This can happen, for "
6657 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6658 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6659 msgstr ""
6660 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6661 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6662 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6663
6664 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6665 #. type: Plain text
6666 #: build/C/man2/mprotect.2:99
6667 msgid ""
6668 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6669 msgstr ""
6670 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6671
6672 #. type: Plain text
6673 #: build/C/man2/mprotect.2:102
6674 msgid "Internal kernel structures could not be allocated."
6675 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6676
6677 #. type: Plain text
6678 #: build/C/man2/mprotect.2:112
6679 msgid ""
6680 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6681 "address space of the process, or specify one or more pages that are not "
6682 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6683 "for these cases.)"
6684 msgstr ""
6685 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6686 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6687 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6688 "成されていた)。"
6689
6690 #.  SVr4 defines an additional error
6691 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6692 #. type: Plain text
6693 #: build/C/man2/mprotect.2:121
6694 msgid ""
6695 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6696 "unspecified if it is applied to a region of memory that was not obtained via "
6697 "B<mmap>(2)."
6698 msgstr ""
6699 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6700 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6701 "されている。"
6702
6703 #. type: Plain text
6704 #: build/C/man2/mprotect.2:128
6705 msgid ""
6706 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6707 "process's address space (except for the kernel vsyscall area).  In "
6708 "particular it can be used to change existing code mappings to be writable."
6709 msgstr ""
6710 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6711 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6712 "マッピングを書き込み可能にするために使われる。"
6713
6714 #. type: Plain text
6715 #: build/C/man2/mprotect.2:138
6716 msgid ""
6717 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6718 "architecture- and kernel version-dependent.  On some hardware architectures "
6719 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6720 msgstr ""
6721 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6722 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6723 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6724
6725 #. type: Plain text
6726 #: build/C/man2/mprotect.2:147
6727 msgid ""
6728 "POSIX.1-2001 says that an implementation may permit access other than that "
6729 "specified in I<prot>, but at a minimum can allow write access only if "
6730 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6731 "has been set."
6732 msgstr ""
6733 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6734 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6735 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6736 "ない点だけは 満たす必要がある。"
6737
6738 #. type: Plain text
6739 #: build/C/man2/mprotect.2:153
6740 msgid ""
6741 "The program below allocates four pages of memory, makes the third of these "
6742 "pages read-only, and then executes a loop that walks upward through the "
6743 "allocated region modifying bytes."
6744 msgstr ""
6745 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6746 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6747 "かって順番にバイト値を変更するループを実行する。"
6748
6749 #. type: Plain text
6750 #: build/C/man2/mprotect.2:156
6751 msgid ""
6752 "An example of what we might see when running the program is the following:"
6753 msgstr "プログラムを実行した場合の一例を以下に示す。"
6754
6755 #. type: Plain text
6756 #: build/C/man2/mprotect.2:162
6757 #, no-wrap
6758 msgid ""
6759 "$B< ./a.out>\n"
6760 "Start of region:        0x804c000\n"
6761 "Got SIGSEGV at address: 0x804e000\n"
6762 msgstr ""
6763 "$B< ./a.out>\n"
6764 "Start of region:        0x804c000\n"
6765 "Got SIGSEGV at address: 0x804e000\n"
6766
6767 #. type: Plain text
6768 #: build/C/man2/mprotect.2:174
6769 #, no-wrap
6770 msgid ""
6771 "#include E<lt>unistd.hE<gt>\n"
6772 "#include E<lt>signal.hE<gt>\n"
6773 "#include E<lt>stdio.hE<gt>\n"
6774 "#include E<lt>malloc.hE<gt>\n"
6775 "#include E<lt>stdlib.hE<gt>\n"
6776 "#include E<lt>errno.hE<gt>\n"
6777 "#include E<lt>sys/mman.hE<gt>\n"
6778 msgstr ""
6779 "#include E<lt>unistd.hE<gt>\n"
6780 "#include E<lt>signal.hE<gt>\n"
6781 "#include E<lt>stdio.hE<gt>\n"
6782 "#include E<lt>malloc.hE<gt>\n"
6783 "#include E<lt>stdlib.hE<gt>\n"
6784 "#include E<lt>errno.hE<gt>\n"
6785 "#include E<lt>sys/mman.hE<gt>\n"
6786
6787 #. type: Plain text
6788 #: build/C/man2/mprotect.2:179
6789 #, no-wrap
6790 msgid "static char *buffer;\n"
6791 msgstr "static char *buffer;\n"
6792
6793 #. type: Plain text
6794 #: build/C/man2/mprotect.2:187
6795 #, no-wrap
6796 msgid ""
6797 "static void\n"
6798 "handler(int sig, siginfo_t *si, void *unused)\n"
6799 "{\n"
6800 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6801 "            (long) si-E<gt>si_addr);\n"
6802 "    exit(EXIT_FAILURE);\n"
6803 "}\n"
6804 msgstr ""
6805 "static void\n"
6806 "handler(int sig, siginfo_t *si, void *unused)\n"
6807 "{\n"
6808 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6809 "            (long) si-E<gt>si_addr);\n"
6810 "    exit(EXIT_FAILURE);\n"
6811 "}\n"
6812
6813 #. type: Plain text
6814 #: build/C/man2/mprotect.2:194
6815 #, no-wrap
6816 msgid ""
6817 "int\n"
6818 "main(int argc, char *argv[])\n"
6819 "{\n"
6820 "    char *p;\n"
6821 "    int pagesize;\n"
6822 "    struct sigaction sa;\n"
6823 msgstr ""
6824 "int\n"
6825 "main(void)\n"
6826 "{\n"
6827 "    char *p;\n"
6828 "    int pagesize;\n"
6829 "    struct sigaction sa;\n"
6830
6831 #. type: Plain text
6832 #: build/C/man2/mprotect.2:200
6833 #, no-wrap
6834 msgid ""
6835 "    sa.sa_flags = SA_SIGINFO;\n"
6836 "    sigemptyset(&sa.sa_mask);\n"
6837 "    sa.sa_sigaction = handler;\n"
6838 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6839 "        handle_error(\"sigaction\");\n"
6840 msgstr ""
6841 "    sa.sa_flags = SA_SIGINFO;\n"
6842 "    sigemptyset(&sa.sa_mask);\n"
6843 "    sa.sa_sigaction = handler;\n"
6844 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6845 "        handle_error(\"sigaction\");\n"
6846
6847 #. type: Plain text
6848 #: build/C/man2/mprotect.2:204
6849 #, no-wrap
6850 msgid ""
6851 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6852 "    if (pagesize == -1)\n"
6853 "        handle_error(\"sysconf\");\n"
6854 msgstr ""
6855 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6856 "    if (pagesize == -1)\n"
6857 "        handle_error(\"sysconf\");\n"
6858
6859 #. type: Plain text
6860 #: build/C/man2/mprotect.2:207
6861 #, no-wrap
6862 msgid ""
6863 "    /* Allocate a buffer aligned on a page boundary;\n"
6864 "       initial protection is PROT_READ | PROT_WRITE */\n"
6865 msgstr ""
6866 "    /* Allocate a buffer aligned on a page boundary;\n"
6867 "       initial protection is PROT_READ | PROT_WRITE */\n"
6868
6869 #. type: Plain text
6870 #: build/C/man2/mprotect.2:211
6871 #, no-wrap
6872 msgid ""
6873 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6874 "    if (buffer == NULL)\n"
6875 "        handle_error(\"memalign\");\n"
6876 msgstr ""
6877 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6878 "    if (buffer == NULL)\n"
6879 "        handle_error(\"memalign\");\n"
6880
6881 #. type: Plain text
6882 #: build/C/man2/mprotect.2:213
6883 #, no-wrap
6884 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6885 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6886
6887 #. type: Plain text
6888 #: build/C/man2/mprotect.2:217
6889 #, no-wrap
6890 msgid ""
6891 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6892 "                PROT_READ) == -1)\n"
6893 "        handle_error(\"mprotect\");\n"
6894 msgstr ""
6895 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6896 "                PROT_READ) == -1)\n"
6897 "        handle_error(\"mprotect\");\n"
6898
6899 #. type: Plain text
6900 #: build/C/man2/mprotect.2:220
6901 #, no-wrap
6902 msgid ""
6903 "    for (p = buffer ; ; )\n"
6904 "        *(p++) = \\(aqa\\(aq;\n"
6905 msgstr ""
6906 "    for (p = buffer ; ; )\n"
6907 "        *(p++) = \\(aqa\\(aq;\n"
6908
6909 #. type: Plain text
6910 #: build/C/man2/mprotect.2:224
6911 #, no-wrap
6912 msgid ""
6913 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6914 "    exit(EXIT_SUCCESS);\n"
6915 "}\n"
6916 msgstr ""
6917 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6918 "    exit(EXIT_SUCCESS);\n"
6919 "}\n"
6920
6921 #. type: Plain text
6922 #: build/C/man2/mprotect.2:228
6923 msgid "B<mmap>(2), B<sysconf>(3)"
6924 msgstr "B<mmap>(2), B<sysconf>(3)"
6925
6926 #. type: TH
6927 #: build/C/man2/mremap.2:30
6928 #, no-wrap
6929 msgid "MREMAP"
6930 msgstr "MREMAP"
6931
6932 #. type: TH
6933 #: build/C/man2/mremap.2:30
6934 #, no-wrap
6935 msgid "2010-06-10"
6936 msgstr "2010-06-10"
6937
6938 #. type: Plain text
6939 #: build/C/man2/mremap.2:33
6940 msgid "mremap - remap a virtual memory address"
6941 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6942
6943 #. type: Plain text
6944 #: build/C/man2/mremap.2:36
6945 #, no-wrap
6946 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6947 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6948
6949 #. type: Plain text
6950 #: build/C/man2/mremap.2:41
6951 #, no-wrap
6952 msgid ""
6953 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6954 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6955 msgstr ""
6956 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6957 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6958
6959 #. type: Plain text
6960 #: build/C/man2/mremap.2:47
6961 msgid ""
6962 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6963 "moving it at the same time (controlled by the I<flags> argument and the "
6964 "available virtual address space)."
6965 msgstr ""
6966 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6967 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6968 "る)。"
6969
6970 #. type: Plain text
6971 #: build/C/man2/mremap.2:61
6972 msgid ""
6973 "I<old_address> is the old address of the virtual memory block that you want "
6974 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6975 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6976 "requested size of the virtual memory block after the resize.  An optional "
6977 "fifth argument, I<new_address>, may be provided; see the description of "
6978 "B<MREMAP_FIXED> below."
6979 msgstr ""
6980 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6981 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6982 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6983 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6984 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6985 "明を参照のこと。"
6986
6987 #. type: Plain text
6988 #: build/C/man2/mremap.2:73
6989 msgid ""
6990 "In Linux the memory is divided into pages.  A user process has (one or)  "
6991 "several linear virtual memory segments.  Each virtual memory segment has one "
6992 "or more mappings to real memory pages (in the page table).  Each virtual "
6993 "memory segment has its own protection (access rights), which may cause a "
6994 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6995 "to a read-only segment).  Accessing virtual memory outside of the segments "
6996 "will also cause a segmentation violation."
6997 msgstr ""
6998 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6999 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
7000 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
7001 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
7002 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
7003 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
7004 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
7005 "ン侵害が発生する。"
7006
7007 #. type: Plain text
7008 #: build/C/man2/mremap.2:81
7009 msgid ""
7010 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
7011 "mapping between virtual addresses and memory pages.  This can be used to "
7012 "implement a very efficient B<realloc>(3)."
7013 msgstr ""
7014 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
7015 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
7016 "B<realloc>(3)  を実装するのに使用されている。"
7017
7018 #. type: Plain text
7019 #: build/C/man2/mremap.2:83
7020 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7021 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7022
7023 #. type: TP
7024 #: build/C/man2/mremap.2:83
7025 #, no-wrap
7026 msgid "B<MREMAP_MAYMOVE>"
7027 msgstr "B<MREMAP_MAYMOVE>"
7028
7029 #. type: Plain text
7030 #: build/C/man2/mremap.2:95
7031 msgid ""
7032 "By default, if there is not sufficient space to expand a mapping at its "
7033 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7034 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7035 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7036 "mapping location become invalid (offsets relative to the starting address of "
7037 "the mapping should be employed)."
7038 msgstr ""
7039 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7040 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7041 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7042 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
7043 "レスからの相対オフセットは有効のままである)。"
7044
7045 #. type: TP
7046 #: build/C/man2/mremap.2:95
7047 #, no-wrap
7048 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7049 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7050
7051 #. type: Plain text
7052 #: build/C/man2/mremap.2:117
7053 msgid ""
7054 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7055 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7056 "\\ *new_address>, which specifies a page-aligned address to which the "
7057 "mapping must be moved.  Any previous mapping at the address range specified "
7058 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7059 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7060 msgstr ""
7061 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7062 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7063 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7064 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7065 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7066 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7067 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7068
7069 #. type: Plain text
7070 #: build/C/man2/mremap.2:127
7071 msgid ""
7072 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7073 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7074 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7075 "locked by the process may change."
7076 msgstr ""
7077 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
7078 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
7079 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
7080 "の量は変化する。"
7081
7082 #. type: Plain text
7083 #: build/C/man2/mremap.2:135
7084 msgid ""
7085 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7086 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7087 "and I<errno> is set appropriately."
7088 msgstr ""
7089 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
7090 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
7091 "切に設定される。"
7092
7093 #. type: Plain text
7094 #: build/C/man2/mremap.2:142
7095 msgid ""
7096 "The caller tried to expand a memory segment that is locked, but this was not "
7097 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7098 msgstr ""
7099 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
7100 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7101
7102 #. type: Plain text
7103 #: build/C/man2/mremap.2:151
7104 msgid ""
7105 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7106 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7107 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7108 "the whole address space requested, but those mappings are of different types."
7109 msgstr ""
7110 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7111 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7112 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
7113 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7114 "を受け取るだろう。"
7115
7116 #. type: Plain text
7117 #: build/C/man2/mremap.2:179
7118 msgid ""
7119 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7120 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7121 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7122 "was invalid; or the new address range specified by I<new_address> and "
7123 "I<new_size> overlapped the old address range specified by I<old_address> and "
7124 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7125 "B<MREMAP_MAYMOVE>."
7126 msgstr ""
7127 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7128 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7129 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7130 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7131 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7132 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7133 "されていない。"
7134
7135 #. type: Plain text
7136 #: build/C/man2/mremap.2:185
7137 msgid ""
7138 "The memory area cannot be expanded at the current virtual address, and the "
7139 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7140 "(virtual) memory available."
7141 msgstr ""
7142 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7143 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
7144
7145 #.  4.2BSD had a (never actually implemented)
7146 #.  .BR mremap (2)
7147 #.  call with completely different semantics.
7148 #. type: Plain text
7149 #: build/C/man2/mremap.2:191
7150 msgid ""
7151 "This call is Linux-specific, and should not be used in programs intended to "
7152 "be portable."
7153 msgstr ""
7154 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7155 "い。"
7156
7157 #. type: Plain text
7158 #: build/C/man2/mremap.2:199
7159 msgid ""
7160 "Prior to version 2.4, glibc did not expose the definition of "
7161 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7162 "I<new_address> argument."
7163 msgstr ""
7164 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7165 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7166
7167 #. type: Plain text
7168 #: build/C/man2/mremap.2:208
7169 msgid ""
7170 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7171 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7172 msgstr ""
7173 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7174 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7175
7176 #. type: Plain text
7177 #: build/C/man2/mremap.2:214
7178 msgid ""
7179 "Your favorite text book on operating systems for more information on paged "
7180 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7181 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7182 "Maurice J. Bach)"
7183 msgstr ""
7184 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7185 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7186 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7187 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7188
7189 #. type: TH
7190 #: build/C/man2/msync.2:25
7191 #, no-wrap
7192 msgid "MSYNC"
7193 msgstr "MSYNC"
7194
7195 #. type: TH
7196 #: build/C/man2/msync.2:25
7197 #, no-wrap
7198 msgid "2014-04-20"
7199 msgstr "2014-04-20"
7200
7201 #. type: Plain text
7202 #: build/C/man2/msync.2:28
7203 msgid "msync - synchronize a file with a memory map"
7204 msgstr "msync - ファイルをマップしたメモリと同期させる"
7205
7206 #. type: Plain text
7207 #: build/C/man2/msync.2:32
7208 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7209 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7210
7211 #. type: Plain text
7212 #: build/C/man2/msync.2:48
7213 msgid ""
7214 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7215 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7216 "this call there is no guarantee that changes are written back before "
7217 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7218 "corresponds to the memory area starting at I<addr> and having length "
7219 "I<length> is updated."
7220 msgstr ""
7221 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7222 "のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しない"
7223 "と、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確"
7224 "には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する"
7225 "部分が更新される。"
7226
7227 #. type: Plain text
7228 #: build/C/man2/msync.2:68
7229 msgid ""
7230 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7231 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7232 "specifies that an update be scheduled, but the call returns immediately.  "
7233 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7234 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7235 "they can be updated with the fresh values just written)."
7236 msgstr ""
7237 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7238 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7239 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7240 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7241 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7242 "に対する他のマッピングを無効にすることを要求する。"
7243
7244 #. type: Plain text
7245 #: build/C/man2/msync.2:73
7246 msgid ""
7247 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7248 "appropriately."
7249 msgstr ""
7250 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7251 "る。"
7252
7253 #. type: TP
7254 #: build/C/man2/msync.2:74
7255 #, no-wrap
7256 msgid "B<EBUSY>"
7257 msgstr "B<EBUSY>"
7258
7259 #. type: Plain text
7260 #: build/C/man2/msync.2:80
7261 msgid ""
7262 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7263 "specified address range."
7264 msgstr ""
7265 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7266 "存在する。"
7267
7268 #. type: Plain text
7269 #: build/C/man2/msync.2:93
7270 msgid ""
7271 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7272 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7273 "B<MS_ASYNC> are set in I<flags>."
7274 msgstr ""
7275 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7276 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7277 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7278
7279 #. type: Plain text
7280 #: build/C/man2/msync.2:96
7281 msgid "The indicated memory (or part of it) was not mapped."
7282 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7283
7284 #. type: Plain text
7285 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7286 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7287 msgid "POSIX.1-2001."
7288 msgstr "POSIX.1-2001."
7289
7290 #. type: Plain text
7291 #: build/C/man2/msync.2:105
7292 msgid ""
7293 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7294 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7295 msgstr ""
7296 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7297 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7298
7299 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7300 #.  -1: unavailable, 0: ask using sysconf().
7301 #.  glibc defines them to 1.
7302 #. type: Plain text
7303 #: build/C/man2/msync.2:120
7304 msgid ""
7305 "On POSIX systems on which B<msync>()  is available, both "
7306 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7307 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7308 msgstr ""
7309 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7310 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7311 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7312
7313 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7314 #. type: Plain text
7315 #: build/C/man2/msync.2:147
7316 msgid ""
7317 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7318 "I<flags>, and indeed failure to include one of these flags will cause "
7319 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7320 "B<msync>()  that specifies neither of these flags, with semantics that are "
7321 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7322 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7323 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7324 "behavior, portable, future-proof applications should ensure that they "
7325 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7326 msgstr ""
7327 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7328 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7329 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7330 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7331 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7332 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7333 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7334 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7335 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7336 "指定するようにすべきである。"
7337
7338 #. type: TP
7339 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7340 #, no-wrap
7341 msgid "B<mmap>(2)"
7342 msgstr "B<mmap>(2)"
7343
7344 #. type: TH
7345 #: build/C/man3/mtrace.3:25
7346 #, no-wrap
7347 msgid "MTRACE"
7348 msgstr "MTRACE"
7349
7350 #. type: TH
7351 #: build/C/man3/mtrace.3:25
7352 #, no-wrap
7353 msgid "2012-04-18"
7354 msgstr "2012-04-18"
7355
7356 #. type: Plain text
7357 #: build/C/man3/mtrace.3:28
7358 msgid "mtrace, muntrace - malloc tracing"
7359 msgstr "mtrace, muntrace - malloc のトレース"
7360
7361 #. type: Plain text
7362 #: build/C/man3/mtrace.3:30
7363 msgid "B<#include E<lt>mcheck.hE<gt>>"
7364 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7365
7366 #. type: Plain text
7367 #: build/C/man3/mtrace.3:32
7368 msgid "B<void mtrace(void);>"
7369 msgstr "B<void mtrace(void);>"
7370
7371 #. type: Plain text
7372 #: build/C/man3/mtrace.3:34
7373 msgid "B<void muntrace(void);>"
7374 msgstr "B<void muntrace(void);>"
7375
7376 #. type: Plain text
7377 #: build/C/man3/mtrace.3:46
7378 msgid ""
7379 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7380 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7381 "hook functions record tracing information about memory allocation and "
7382 "deallocation.  The tracing information can be used to discover memory leaks "
7383 "and attempts to free nonallocated memory in a program."
7384 msgstr ""
7385
7386 #. type: Plain text
7387 #: build/C/man3/mtrace.3:57
7388 msgid ""
7389 "The B<muntrace>()  function disables the hook functions installed by "
7390 "B<mtrace>(), so that tracing information is no longer recorded for the "
7391 "memory-allocation functions.  If no hook functions were successfully "
7392 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7393 msgstr ""
7394
7395 #. type: Plain text
7396 #: build/C/man3/mtrace.3:65
7397 msgid ""
7398 "When B<mtrace>()  is called, it checks the value of the environment variable "
7399 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7400 "tracing information is to be recorded.  If the pathname is successfully "
7401 "opened, it is truncated to zero length."
7402 msgstr ""
7403
7404 #. type: Plain text
7405 #: build/C/man3/mtrace.3:78
7406 msgid ""
7407 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7408 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7409 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7410 "ignored, and B<mtrace>()  has no effect."
7411 msgstr ""
7412
7413 #. type: Plain text
7414 #: build/C/man3/mtrace.3:86
7415 msgid ""
7416 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7417 "program, and B<muntrace>()  is never called."
7418 msgstr ""
7419
7420 #. type: Plain text
7421 #: build/C/man3/mtrace.3:96
7422 msgid ""
7423 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7424 "designed to be human readable.  The GNU C library provides a Perl script, "
7425 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7426 "output.  For best results, the traced program should be compiled with "
7427 "debugging enabled, so that line-number information is recorded in the "
7428 "executable."
7429 msgstr ""
7430
7431 #. type: Plain text
7432 #: build/C/man3/mtrace.3:102
7433 msgid ""
7434 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7435 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7436 msgstr ""
7437
7438 #. type: Plain text
7439 #: build/C/man3/mtrace.3:108
7440 msgid ""
7441 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7442 "the line number references may refer to the previous or following "
7443 "(nonblank)  line of the source code."
7444 msgstr ""
7445
7446 #. type: Plain text
7447 #: build/C/man3/mtrace.3:115
7448 msgid ""
7449 "The shell session below demonstrates the use of the B<mtrace>()  function "
7450 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7451 "different locations.  The demonstration uses the following program:"
7452 msgstr ""
7453
7454 #. type: Plain text
7455 #: build/C/man3/mtrace.3:122
7456 #, no-wrap
7457 msgid ""
7458 "$ B<cat t_mtrace.c>\n"
7459 "#include E<lt>mcheck.hE<gt>\n"
7460 "#include E<lt>stdlib.hE<gt>\n"
7461 "#include E<lt>stdio.hE<gt>\n"
7462 msgstr ""
7463 "$ B<cat t_mtrace.c>\n"
7464 "#include E<lt>mcheck.hE<gt>\n"
7465 "#include E<lt>stdlib.hE<gt>\n"
7466 "#include E<lt>stdio.hE<gt>\n"
7467
7468 #. type: Plain text
7469 #: build/C/man3/mtrace.3:127
7470 #, no-wrap
7471 msgid ""
7472 "int\n"
7473 "main(int argc, char *argv[])\n"
7474 "{\n"
7475 "    int j;\n"
7476 msgstr ""
7477 "int\n"
7478 "main(int argc, char *argv[])\n"
7479 "{\n"
7480 "    int j;\n"
7481
7482 #. type: Plain text
7483 #: build/C/man3/mtrace.3:129
7484 #, no-wrap
7485 msgid "    mtrace();\n"
7486 msgstr "    mtrace();\n"
7487
7488 #. type: Plain text
7489 #: build/C/man3/mtrace.3:132
7490 #, no-wrap
7491 msgid ""
7492 "    for (j = 0; j E<lt> 2; j++)\n"
7493 "        malloc(100);            /* Never freed--a memory leak */\n"
7494 msgstr ""
7495 "    for (j = 0; j E<lt> 2; j++)\n"
7496 "        malloc(100);            /* Never freed--a memory leak */\n"
7497
7498 #. type: Plain text
7499 #: build/C/man3/mtrace.3:136
7500 #, no-wrap
7501 msgid ""
7502 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7503 "    exit(EXIT_SUCCESS);\n"
7504 "}\n"
7505 msgstr ""
7506 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7507 "    exit(EXIT_SUCCESS);\n"
7508 "}\n"
7509
7510 #. type: Plain text
7511 #: build/C/man3/mtrace.3:142
7512 msgid ""
7513 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7514 "memory leaks at two different locations in the program:"
7515 msgstr ""
7516
7517 #. type: Plain text
7518 #: build/C/man3/mtrace.3:155
7519 #, no-wrap
7520 msgid ""
7521 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7522 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7523 "$ B<./t_mtrace>\n"
7524 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7525 "Memory not freed:\n"
7526 "-----------------\n"
7527 "   Address     Size     Caller\n"
7528 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7529 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7530 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7531 msgstr ""
7532 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7533 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7534 "$ B<./t_mtrace>\n"
7535 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7536 "Memory not freed:\n"
7537 "-----------------\n"
7538 "   Address     Size     Caller\n"
7539 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7540 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7541 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7542
7543 #. type: Plain text
7544 #: build/C/man3/mtrace.3:167
7545 msgid ""
7546 "The first two messages about unfreed memory correspond to the two "
7547 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7548 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7549 msgstr ""
7550
7551 #. type: Plain text
7552 #: build/C/man3/mtrace.3:172
7553 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7554 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7555
7556 #. type: TH
7557 #: build/C/man2/posix_fadvise.2:28
7558 #, no-wrap
7559 msgid "POSIX_FADVISE"
7560 msgstr "POSIX_FADVISE"
7561
7562 #. type: Plain text
7563 #: build/C/man2/posix_fadvise.2:31
7564 msgid "posix_fadvise - predeclare an access pattern for file data"
7565 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7566
7567 #. type: Plain text
7568 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7569 #, no-wrap
7570 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7571 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7572
7573 #. type: Plain text
7574 #: build/C/man2/posix_fadvise.2:37
7575 #, no-wrap
7576 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7577 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7578
7579 #. type: Plain text
7580 #: build/C/man2/posix_fadvise.2:46
7581 msgid "B<posix_fadvise>():"
7582 msgstr "B<posix_fadvise>():"
7583
7584 #. type: Plain text
7585 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7586 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7587 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7588
7589 #. type: Plain text
7590 #: build/C/man2/posix_fadvise.2:56
7591 msgid ""
7592 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7593 "data in a specific pattern in the future, thus allowing the kernel to "
7594 "perform appropriate optimizations."
7595 msgstr ""
7596 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7597 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7598 "適化を実行することが可能になる。"
7599
7600 #. type: Plain text
7601 #: build/C/man2/posix_fadvise.2:63
7602 msgid ""
7603 "The I<advice> applies to a (not necessarily existent) region starting at "
7604 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7605 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7606 "binding; it merely constitutes an expectation on behalf of the application."
7607 msgstr ""
7608 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7609 "イ\n"
7610 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7611 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7612 "ケー\n"
7613 "ションのために可能性を構成するだけである。"
7614
7615 #. type: Plain text
7616 #: build/C/man2/posix_fadvise.2:65
7617 msgid "Permissible values for I<advice> include:"
7618 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7619
7620 #. type: TP
7621 #: build/C/man2/posix_fadvise.2:65
7622 #, no-wrap
7623 msgid "B<POSIX_FADV_NORMAL>"
7624 msgstr "B<POSIX_FADV_NORMAL>"
7625
7626 #. type: Plain text
7627 #: build/C/man2/posix_fadvise.2:71
7628 msgid ""
7629 "Indicates that the application has no advice to give about its access "
7630 "pattern for the specified data.  If no advice is given for an open file, "
7631 "this is the default assumption."
7632 msgstr ""
7633 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7634 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7635 "合、 これがデフォルトで仮定される。"
7636
7637 #. type: TP
7638 #: build/C/man2/posix_fadvise.2:71
7639 #, no-wrap
7640 msgid "B<POSIX_FADV_SEQUENTIAL>"
7641 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7642
7643 #. type: Plain text
7644 #: build/C/man2/posix_fadvise.2:75
7645 msgid ""
7646 "The application expects to access the specified data sequentially (with "
7647 "lower offsets read before higher ones)."
7648 msgstr ""
7649 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7650 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7651
7652 #. type: TP
7653 #: build/C/man2/posix_fadvise.2:75
7654 #, no-wrap
7655 msgid "B<POSIX_FADV_RANDOM>"
7656 msgstr "B<POSIX_FADV_RANDOM>"
7657
7658 #. type: Plain text
7659 #: build/C/man2/posix_fadvise.2:78
7660 msgid "The specified data will be accessed in random order."
7661 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7662
7663 #. type: TP
7664 #: build/C/man2/posix_fadvise.2:78
7665 #, no-wrap
7666 msgid "B<POSIX_FADV_NOREUSE>"
7667 msgstr "B<POSIX_FADV_NOREUSE>"
7668
7669 #. type: Plain text
7670 #: build/C/man2/posix_fadvise.2:81
7671 msgid "The specified data will be accessed only once."
7672 msgstr "指定されたデータは 1 度しかアクセスされない。"
7673
7674 #. type: TP
7675 #: build/C/man2/posix_fadvise.2:81
7676 #, no-wrap
7677 msgid "B<POSIX_FADV_WILLNEED>"
7678 msgstr "B<POSIX_FADV_WILLNEED>"
7679
7680 #. type: Plain text
7681 #: build/C/man2/posix_fadvise.2:84
7682 msgid "The specified data will be accessed in the near future."
7683 msgstr "指定されたデータは近い将来アクセスされる。"
7684
7685 #. type: TP
7686 #: build/C/man2/posix_fadvise.2:84
7687 #, no-wrap
7688 msgid "B<POSIX_FADV_DONTNEED>"
7689 msgstr "B<POSIX_FADV_DONTNEED>"
7690
7691 #. type: Plain text
7692 #: build/C/man2/posix_fadvise.2:87
7693 msgid "The specified data will not be accessed in the near future."
7694 msgstr "指定されたデータは近い将来アクセスされない。"
7695
7696 #. type: Plain text
7697 #: build/C/man2/posix_fadvise.2:90
7698 msgid "On success, zero is returned.  On error, an error number is returned."
7699 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7700
7701 #. type: Plain text
7702 #: build/C/man2/posix_fadvise.2:94
7703 msgid "The I<fd> argument was not a valid file descriptor."
7704 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7705
7706 #. type: Plain text
7707 #: build/C/man2/posix_fadvise.2:97
7708 msgid "An invalid value was specified for I<advice>."
7709 msgstr "無効な値が I<advice> に指定された。"
7710
7711 #.  commit 87ba81dba431232548ce29d5d224115d0c2355ac
7712 #. type: Plain text
7713 #: build/C/man2/posix_fadvise.2:107
7714 msgid ""
7715 "The specified file descriptor refers to a pipe or FIFO.  (B<ESPIPE> is the "
7716 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7717 "B<EINVAL> in this case.)"
7718 msgstr ""
7719 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している "
7720 "(B<ESPIPE> は POSIX で規定されているエラーだが、 バージョン 2.16 より前のカー"
7721 "ネルでは、 この場合に B<EINVAL> を返していた。)"
7722
7723 #.  of fadvise64_64()
7724 #. type: Plain text
7725 #: build/C/man2/posix_fadvise.2:115
7726 msgid ""
7727 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7728 "called B<fadvise64>().  Library support has been provided since glibc "
7729 "version 2.2, via the wrapper function B<posix_fadvise>()."
7730 msgstr ""
7731 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7732 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7733 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7734 "ラッパー関数は B<posix_fadvise>() という名前である。"
7735
7736 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7737 #. type: Plain text
7738 #: build/C/man2/posix_fadvise.2:122
7739 msgid ""
7740 "Since Linux 3.18, support for the underlying system call is optional, "
7741 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7742 "option."
7743 msgstr ""
7744 "Linux 3.18 以降では、対応するシステムコールのサポートは任意となり、利用できる"
7745 "かはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされ"
7746 "ているかに依存する。"
7747
7748 #. type: Plain text
7749 #: build/C/man2/posix_fadvise.2:131
7750 msgid ""
7751 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7752 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7753 msgstr ""
7754 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7755 "I<off_t> に変更された点に注意すること。"
7756
7757 #. type: Plain text
7758 #: build/C/man2/posix_fadvise.2:137
7759 msgid ""
7760 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7761 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7762 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7763 "the entire file, not just the specified region (but other open file handles "
7764 "to the same file are unaffected)."
7765 msgstr ""
7766 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7767 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7768 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7769 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7770 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7771
7772 #. type: Plain text
7773 #: build/C/man2/posix_fadvise.2:144
7774 msgid ""
7775 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7776 "into the page cache.  The amount of data read may be decreased by the kernel "
7777 "depending on virtual memory load.  (A few megabytes will usually be fully "
7778 "satisfied, and more is rarely useful.)"
7779 msgstr ""
7780 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7781 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7782 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7783 "くてもめったに役に立たない)。"
7784
7785 #. type: Plain text
7786 #: build/C/man2/posix_fadvise.2:148
7787 msgid ""
7788 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7789 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7790 "flag is a no-op."
7791 msgstr ""
7792 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7793 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7794 "フラグは何も行わない。"
7795
7796 #. type: Plain text
7797 #: build/C/man2/posix_fadvise.2:156
7798 msgid ""
7799 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7800 "specified region.  This is useful, for example, while streaming large "
7801 "files.  A program may periodically request the kernel to free cached data "
7802 "that has already been used, so that more useful cached pages are not "
7803 "discarded instead."
7804 msgstr ""
7805 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7806 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7807 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7808 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7809 "されたページが、 代わりに破棄されることはない。"
7810
7811 #. type: Plain text
7812 #: build/C/man2/posix_fadvise.2:164
7813 msgid ""
7814 "Requests to discard partial pages are ignored.  It is preferable to preserve "
7815 "needed data than discard unneeded data.  If the application requires that "
7816 "data be considered for discarding then I<offset> and I<len> must be page-"
7817 "aligned."
7818 msgstr ""
7819 "ページの一部分の破棄要求は無視される。 不要なデータを破棄するよりも必要なデー"
7820 "タを保持する方がよい。 アプリケーションがデータを破棄した方がよいと思う場合"
7821 "は、 I<offset> と I<len> がページ境界に合っていなければならない。"
7822
7823 #. type: Plain text
7824 #: build/C/man2/posix_fadvise.2:172
7825 msgid ""
7826 "Pages that have not yet been written out will be unaffected, so if the "
7827 "application wishes to guarantee that pages will be released, it should call "
7828 "B<fsync>(2)  or B<fdatasync>(2)  first."
7829 msgstr ""
7830 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7831 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7832 "B<fdatasync>(2)  を呼ぶべきである。"
7833
7834 #. type: SS
7835 #: build/C/man2/posix_fadvise.2:172
7836 #, no-wrap
7837 msgid "Architecture-specific variants"
7838 msgstr "アーキテクチャ固有の派生バージョン"
7839
7840 #. type: Plain text
7841 #: build/C/man2/posix_fadvise.2:189
7842 msgid ""
7843 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7844 "of registers (see B<syscall>(2)  for further detail).  On such "
7845 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7846 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7847 "and I<offset> arguments.  Therefore, these architectures define a version of "
7848 "the system call that orders the arguments suitably, but otherwise is "
7849 "otherwise exactly the same as B<posix_fadvise>()."
7850 msgstr ""
7851 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7852 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7853 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7854 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7855 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7856 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7857
7858 #. type: Plain text
7859 #: build/C/man2/posix_fadvise.2:191
7860 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7861 msgstr ""
7862 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7863
7864 #. type: Plain text
7865 #: build/C/man2/posix_fadvise.2:196
7866 #, no-wrap
7867 msgid ""
7868 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7869 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7870 msgstr ""
7871 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7872 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7873
7874 #. type: Plain text
7875 #: build/C/man2/posix_fadvise.2:204
7876 msgid ""
7877 "These architecture-specific details are generally hidden from applications "
7878 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7879 "appropriate architecture-specific system call."
7880 msgstr ""
7881 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7882 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7883 "なアーキテクチャ固有のシステムコールが呼び出される。"
7884
7885 #. type: Plain text
7886 #: build/C/man2/posix_fadvise.2:209
7887 msgid ""
7888 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7889 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7890 "through to the end of the file\"."
7891 msgstr ""
7892 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7893 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7894 "いた。"
7895
7896 #.  FIXME . Write a posix_fadvise(3) page.
7897 #. type: Plain text
7898 #: build/C/man2/posix_fadvise.2:215
7899 msgid ""
7900 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7901 "B<posix_madvise>(3)"
7902 msgstr ""
7903 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7904 "B<posix_madvise>(3)"
7905
7906 #. type: TH
7907 #: build/C/man3/posix_fallocate.3:25
7908 #, no-wrap
7909 msgid "POSIX_FALLOCATE"
7910 msgstr "POSIX_FALLOCATE"
7911
7912 #. type: Plain text
7913 #: build/C/man3/posix_fallocate.3:28
7914 msgid "posix_fallocate - allocate file space"
7915 msgstr "posix_fallocate - ファイルのスペースを確保する"
7916
7917 #. type: Plain text
7918 #: build/C/man3/posix_fallocate.3:33
7919 #, no-wrap
7920 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7921 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7922
7923 #. type: Plain text
7924 #: build/C/man3/posix_fallocate.3:42
7925 msgid "B<posix_fallocate>():"
7926 msgstr "B<posix_fallocate>():"
7927
7928 #. type: Plain text
7929 #: build/C/man3/posix_fallocate.3:61
7930 msgid ""
7931 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7932 "the file referred to by the descriptor I<fd> for the bytes in the range "
7933 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7934 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7935 "range are guaranteed not to fail because of lack of disk space."
7936 msgstr ""
7937 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7938 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7939 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7940 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7941 "失敗しないことが保証される。"
7942
7943 #. type: Plain text
7944 #: build/C/man3/posix_fallocate.3:66
7945 msgid ""
7946 "If the size of the file is less than I<offset>+I<len>, then the file is "
7947 "increased to this size; otherwise the file size is left unchanged."
7948 msgstr ""
7949 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7950 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7951
7952 #. type: Plain text
7953 #: build/C/man3/posix_fallocate.3:72
7954 msgid ""
7955 "B<posix_fallocate>()  returns zero on success, or an error number on "
7956 "failure.  Note that I<errno> is not set."
7957 msgstr ""
7958 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7959 "す。 I<errno> が設定されない点に注意すること。"
7960
7961 #. type: Plain text
7962 #: build/C/man3/posix_fallocate.3:81
7963 msgid "I<offset+len> exceeds the maximum file size."
7964 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7965
7966 #. type: Plain text
7967 #: build/C/man3/posix_fallocate.3:91
7968 msgid "I<fd> does not refer to a regular file."
7969 msgstr "I<fd> が通常のファイルとして参照されていない。"
7970
7971 #. type: Plain text
7972 #: build/C/man3/posix_fallocate.3:100
7973 msgid "I<fd> refers to a pipe."
7974 msgstr "I<fd> がパイプを参照している。"
7975
7976 #. type: Plain text
7977 #: build/C/man3/posix_fallocate.3:103
7978 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7979 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7980
7981 #. type: Plain text
7982 #: build/C/man3/posix_fallocate.3:108
7983 msgid "The B<posix_fallocate>()  function is thread-safe."
7984 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
7985
7986 #. type: Plain text
7987 #: build/C/man3/posix_fallocate.3:133
7988 msgid ""
7989 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7990 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7991 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7992 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7993 "zero."
7994 msgstr ""
7995 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7996 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7997 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7998 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7999 "る。"
8000
8001 #. type: Plain text
8002 #: build/C/man3/posix_fallocate.3:138
8003 msgid ""
8004 "In the glibc implementation, B<posix_fallocate>()  is implemented using "
8005 "B<fallocate>(2)."
8006 msgstr ""
8007 "glibc の実装では、 B<posix_fallocate>() は B<fallocate>() を使って実装されて"
8008 "いる。"
8009
8010 #. type: Plain text
8011 #: build/C/man3/posix_fallocate.3:143
8012 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8013 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8014
8015 #. type: TH
8016 #: build/C/man3/posix_memalign.3:29
8017 #, no-wrap
8018 msgid "POSIX_MEMALIGN"
8019 msgstr "POSIX_MEMALIGN"
8020
8021 #. type: TH
8022 #: build/C/man3/posix_memalign.3:29
8023 #, no-wrap
8024 msgid "2013-09-02"
8025 msgstr "2013-09-02"
8026
8027 #. type: Plain text
8028 #: build/C/man3/posix_memalign.3:32
8029 msgid ""
8030 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8031 "memory"
8032 msgstr ""
8033 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8034 "されたメモリの割り当てを行う"
8035
8036 #. type: Plain text
8037 #: build/C/man3/posix_memalign.3:35
8038 #, no-wrap
8039 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8040 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8041
8042 #. type: Plain text
8043 #: build/C/man3/posix_memalign.3:39
8044 #, no-wrap
8045 msgid ""
8046 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8047 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8048 "B<void *valloc(size_t >I<size>B<);>\n"
8049 msgstr ""
8050 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8051 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8052 "B<void *valloc(size_t >I<size>B<);>\n"
8053
8054 #. type: Plain text
8055 #: build/C/man3/posix_memalign.3:44
8056 #, no-wrap
8057 msgid ""
8058 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8059 "B<void *pvalloc(size_t >I<size>B<);>\n"
8060 msgstr ""
8061 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8062 "B<void *pvalloc(size_t >I<size>B<);>\n"
8063
8064 #. type: Plain text
8065 #: build/C/man3/posix_memalign.3:54
8066 msgid ""
8067 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8068 "E<gt>=\\ 600"
8069 msgstr ""
8070 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8071 "E<gt>=\\ 600"
8072
8073 #. type: Plain text
8074 #: build/C/man3/posix_memalign.3:57
8075 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8076 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8077
8078 #. type: Plain text
8079 #: build/C/man3/posix_memalign.3:59
8080 msgid "B<valloc>():"
8081 msgstr "B<valloc>():"
8082
8083 #. type: TP
8084 #: build/C/man3/posix_memalign.3:62
8085 #, no-wrap
8086 msgid "Since glibc 2.12:"
8087 msgstr "glibc 2.12 以降:"
8088
8089 #. type: Plain text
8090 #: build/C/man3/posix_memalign.3:69
8091 #, no-wrap
8092 msgid ""
8093 "_BSD_SOURCE ||\n"
8094 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8095 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8096 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8097 msgstr ""
8098 "_BSD_SOURCE ||\n"
8099 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8100 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8101 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8102
8103 #. type: TP
8104 #: build/C/man3/posix_memalign.3:71
8105 #, no-wrap
8106 msgid "Before glibc 2.12:"
8107 msgstr "glibc 2.12 より前:"
8108
8109 #. type: Plain text
8110 #: build/C/man3/posix_memalign.3:75
8111 msgid ""
8112 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8113 "_XOPEN_SOURCE_EXTENDED"
8114 msgstr ""
8115 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8116 "_XOPEN_SOURCE_EXTENDED"
8117
8118 #. type: Plain text
8119 #: build/C/man3/posix_memalign.3:82
8120 msgid ""
8121 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8122 "declaration of B<valloc>(); no feature test macros are required.)"
8123 msgstr ""
8124 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
8125 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8126
8127 #.  glibc does this:
8128 #. type: Plain text
8129 #: build/C/man3/posix_memalign.3:104
8130 msgid ""
8131 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8132 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8133 "memory will be a multiple of I<alignment>, which must be a power of two and "
8134 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8135 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8136 "successfully passed to B<free>(3)."
8137 msgstr ""
8138 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
8139 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
8140 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
8141 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
8142 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
8143 "B<free>(3)  に問題なく渡すことができる。"
8144
8145 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8146 #.  but no standards govern this.
8147 #. type: Plain text
8148 #: build/C/man3/posix_memalign.3:115
8149 msgid ""
8150 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8151 "pointer to the allocated memory.  The memory address will be a multiple of "
8152 "I<alignment>, which must be a power of two."
8153 msgstr ""
8154 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
8155 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
8156 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8157
8158 #. type: Plain text
8159 #: build/C/man3/posix_memalign.3:124
8160 msgid ""
8161 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8162 "the added restriction that I<size> should be a multiple of I<alignment>."
8163 msgstr ""
8164 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8165 "I<alignment>\n"
8166 "の倍数でなければならないという追加の制限がある点が異なる。"
8167
8168 #. type: Plain text
8169 #: build/C/man3/posix_memalign.3:133
8170 msgid ""
8171 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8172 "pointer to the allocated memory.  The memory address will be a multiple of "
8173 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8174 msgstr ""
8175 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
8176 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
8177 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
8178 "る。"
8179
8180 #. type: Plain text
8181 #: build/C/man3/posix_memalign.3:140
8182 msgid ""
8183 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8184 "the size of the allocation up to the next multiple of the system page size."
8185 msgstr ""
8186 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8187 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8188
8189 #. type: Plain text
8190 #: build/C/man3/posix_memalign.3:142
8191 msgid "For all of these functions, the memory is not zeroed."
8192 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
8193
8194 #. type: Plain text
8195 #: build/C/man3/posix_memalign.3:149
8196 msgid ""
8197 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8198 "pointer to the allocated memory, or NULL if the request fails."
8199 msgstr ""
8200 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8201 "た\n"
8202 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
8203
8204 #. type: Plain text
8205 #: build/C/man3/posix_memalign.3:157
8206 msgid ""
8207 "B<posix_memalign>()  returns zero on success, or one of the error values "
8208 "listed in the next section on failure.  The value of I<errno> is "
8209 "indeterminate after a call to B<posix_memalign>()."
8210 msgstr ""
8211 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8212 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8213 "I<errno> の値は不定である。"
8214
8215 #. type: Plain text
8216 #: build/C/man3/posix_memalign.3:164
8217 msgid ""
8218 "The I<alignment> argument was not a power of two, or was not a multiple of "
8219 "I<sizeof(void\\ *)>."
8220 msgstr ""
8221 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8222 "かった。"
8223
8224 #. type: Plain text
8225 #: build/C/man3/posix_memalign.3:167
8226 msgid "There was insufficient memory to fulfill the allocation request."
8227 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8228
8229 #. type: Plain text
8230 #: build/C/man3/posix_memalign.3:174
8231 msgid ""
8232 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8233 "available in all Linux libc libraries."
8234 msgstr ""
8235 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8236 "すべての Linux libc ライブラリで使用可能である。"
8237
8238 #. type: Plain text
8239 #: build/C/man3/posix_memalign.3:178
8240 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8241 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8242
8243 #. type: Plain text
8244 #: build/C/man3/posix_memalign.3:182
8245 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8246 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8247
8248 #. type: Plain text
8249 #: build/C/man3/posix_memalign.3:189
8250 msgid ""
8251 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8252 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8253 "POSIX.1-2001."
8254 msgstr ""
8255 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8256 "り、\n"
8257 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8258
8259 #. type: Plain text
8260 #: build/C/man3/posix_memalign.3:193
8261 msgid "The function B<pvalloc>()  is a GNU extension."
8262 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8263
8264 #. type: Plain text
8265 #: build/C/man3/posix_memalign.3:197
8266 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8267 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8268
8269 #. type: Plain text
8270 #: build/C/man3/posix_memalign.3:201
8271 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8272 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8273
8274 #. type: Plain text
8275 #: build/C/man3/posix_memalign.3:206
8276 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8277 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8278
8279 #. type: SS
8280 #: build/C/man3/posix_memalign.3:206
8281 #, no-wrap
8282 msgid "Headers"
8283 msgstr "ヘッダ"
8284
8285 #. type: Plain text
8286 #: build/C/man3/posix_memalign.3:210
8287 msgid ""
8288 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8289 "hE<gt>>."
8290 msgstr ""
8291 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8292 "の意見が一致している。"
8293
8294 #. type: Plain text
8295 #: build/C/man3/posix_memalign.3:214
8296 msgid ""
8297 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8298 "of I<E<lt>malloc.hE<gt>>."
8299 msgstr ""
8300 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8301 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8302
8303 #. type: Plain text
8304 #: build/C/man3/posix_memalign.3:221
8305 msgid ""
8306 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8307 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8308 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8309 "above)."
8310 msgstr ""
8311 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8312 "libc4,5\n"
8313 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8314 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8315
8316 #. type: Plain text
8317 #: build/C/man3/posix_memalign.3:230
8318 msgid ""
8319 "On many systems there are alignment restrictions, for example, on buffers "
8320 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8321 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8322 "use B<posix_memalign>()  to satisfy this requirement."
8323 msgstr ""
8324 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8325 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8326 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8327 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8328 "と、この必要条件を満たすことができる。"
8329
8330 #. type: Plain text
8331 #: build/C/man3/posix_memalign.3:239
8332 msgid ""
8333 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8334 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8335 "is correct."
8336 msgstr ""
8337 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8338 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8339 "確認を行わないかもしれない。"
8340
8341 #.  Other systems allow passing the result of
8342 #.  .IR valloc ()
8343 #.  to
8344 #.  .IR free (3),
8345 #.  but not to
8346 #.  .IR realloc (3).
8347 #. type: Plain text
8348 #: build/C/man3/posix_memalign.3:267
8349 msgid ""
8350 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8351 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8352 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8353 "only a pointer obtained from B<malloc>(3), while, for example, "
8354 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8355 "The glibc implementation allows memory obtained from any of these functions "
8356 "to be reclaimed with B<free>(3)."
8357 msgstr ""
8358 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8359 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8360 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8361 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8362 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8363 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8364 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8365 "B<free>(3) で再利用することができる。"
8366
8367 #. type: Plain text
8368 #: build/C/man3/posix_memalign.3:272
8369 msgid ""
8370 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8371 "these functions are needed only if you require larger alignment values."
8372 msgstr ""
8373 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8374 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8375 "ト\n"
8376 "が必要な場合だけである。"
8377
8378 #. type: Plain text
8379 #: build/C/man3/posix_memalign.3:277
8380 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8381 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8382
8383 #. type: TH
8384 #: build/C/man2/readahead.2:28
8385 #, no-wrap
8386 msgid "READAHEAD"
8387 msgstr "READAHEAD"
8388
8389 #. type: TH
8390 #: build/C/man2/readahead.2:28
8391 #, no-wrap
8392 msgid "2014-03-15"
8393 msgstr "2014-03-15"
8394
8395 #. type: Plain text
8396 #: build/C/man2/readahead.2:31
8397 msgid "readahead - initiate file readahead into page cache"
8398 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8399
8400 #. type: Plain text
8401 #: build/C/man2/readahead.2:37
8402 #, no-wrap
8403 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8404 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8405
8406 #. type: Plain text
8407 #: build/C/man2/readahead.2:44
8408 msgid ""
8409 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8410 "that file will be satisfied from the cache, and not block on disk I/O "
8411 "(assuming the readahead was initiated early enough and that other activity "
8412 "on the system did not in the meantime flush pages from the cache)."
8413 msgstr ""
8414 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8415 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8416 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8417 "ページがフラッシュされない場合である)。"
8418
8419 #. type: Plain text
8420 #: build/C/man2/readahead.2:66
8421 msgid ""
8422 "The I<fd> argument is a file descriptor identifying the file which is to be "
8423 "read.  The I<offset> argument specifies the starting point from which data "
8424 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8425 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8426 "page boundary and bytes are read up to the next page boundary greater than "
8427 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8428 "of the file.  The current file offset of the open file referred to by I<fd> "
8429 "is left unchanged."
8430 msgstr ""
8431 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8432 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8433 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8434 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8435 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8436 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8437 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8438
8439 #. type: Plain text
8440 #: build/C/man2/readahead.2:72
8441 msgid ""
8442 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8443 "I<errno> set to indicate the cause of the error."
8444 msgstr ""
8445 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8446 "ラーの原因を示す値を設定する。"
8447
8448 #. type: Plain text
8449 #: build/C/man2/readahead.2:77
8450 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8451 msgstr ""
8452 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8453 "ていない。"
8454
8455 #. type: Plain text
8456 #: build/C/man2/readahead.2:83
8457 msgid ""
8458 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8459 msgstr ""
8460 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8461 "ファイルであった。"
8462
8463 #. type: Plain text
8464 #: build/C/man2/readahead.2:88
8465 msgid ""
8466 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8467 "been provided since version 2.3."
8468 msgstr ""
8469 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8470 "は glibc バージョン 2.3 以降で行われている。"
8471
8472 #. type: Plain text
8473 #: build/C/man2/readahead.2:93
8474 msgid ""
8475 "The B<readahead>()  system call is Linux-specific, and its use should be "
8476 "avoided in portable applications."
8477 msgstr ""
8478 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8479 "は 使用を避けるべきである。"
8480
8481 #. type: Plain text
8482 #: build/C/man2/readahead.2:98
8483 msgid ""
8484 "On some 32-bit architectures, the calling signature for this system call "
8485 "differs, for the reasons described in B<syscall>(2)."
8486 msgstr ""
8487 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8488 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8489
8490 #. type: Plain text
8491 #: build/C/man2/readahead.2:107
8492 msgid ""
8493 "B<readahead>()  attempts to schedule the reads in the background and return "
8494 "immediately.  However, it may block while it reads the filesystem metadata "
8495 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8496 "on large files using indirect blocks instead of extents, giving the "
8497 "appearance that the call blocks until the requested data has been read."
8498 msgstr ""
8499 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8500 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8501 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8502 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8503 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8504 "に見える。"
8505
8506 #. type: Plain text
8507 #: build/C/man2/readahead.2:113
8508 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8509 msgstr ""
8510 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8511
8512 #. type: TH
8513 #: build/C/man2/remap_file_pages.2:28
8514 #, no-wrap
8515 msgid "REMAP_FILE_PAGES"
8516 msgstr "REMAP_FILE_PAGES"
8517
8518 #. type: Plain text
8519 #: build/C/man2/remap_file_pages.2:31
8520 msgid "remap_file_pages - create a nonlinear file mapping"
8521 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8522
8523 #. type: Plain text
8524 #: build/C/man2/remap_file_pages.2:35
8525 #, no-wrap
8526 msgid ""
8527 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8528 "B<#include E<lt>sys/mman.hE<gt>>\n"
8529 msgstr ""
8530 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8531 "B<#include E<lt>sys/mman.hE<gt>>\n"
8532
8533 #. type: Plain text
8534 #: build/C/man2/remap_file_pages.2:38
8535 #, no-wrap
8536 msgid ""
8537 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8538 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8539 msgstr ""
8540 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8541 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8542
8543 #.  commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8544 #.  http://lwn.net/Articles/597632/
8545 #. type: Plain text
8546 #: build/C/man2/remap_file_pages.2:47
8547 msgid ""
8548 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8549 "eventually be replaced by a slower in-kernel emulation.  Those few "
8550 "applications that use this system call should consider migrating to "
8551 "alternatives."
8552 msgstr ""
8553 "B<注意>: このシステムコールは (Linux 3.16 以降で) 非推奨となっており、 やがて"
8554 "より低速なカーネル内でのエミュレーションに置き換えられる予定である。 このシス"
8555 "テムコールを使用しているアプリケーションは少ないが、こうしたアプリケーション"
8556 "は代替手段への移行を検討すべきである。"
8557
8558 #. type: Plain text
8559 #: build/C/man2/remap_file_pages.2:59
8560 msgid ""
8561 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8562 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8563 "nonsequential order in memory.  The advantage of using "
8564 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8565 "former approach does not require the kernel to create additional VMA "
8566 "(Virtual Memory Area) data structures."
8567 msgstr ""
8568 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8569 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8570 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8571 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8572 "域)  データ構造体を追加で作成する必要がないことである。"
8573
8574 #. type: Plain text
8575 #: build/C/man2/remap_file_pages.2:61
8576 msgid "To create a nonlinear mapping we perform the following steps:"
8577 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8578
8579 #. type: IP
8580 #: build/C/man2/remap_file_pages.2:61 build/C/man2/memfd_create.2:219
8581 #, no-wrap
8582 msgid "1."
8583 msgstr "1."
8584
8585 #. type: Plain text
8586 #: build/C/man2/remap_file_pages.2:69
8587 msgid ""
8588 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8589 "mapping must be created with the B<MAP_SHARED> flag."
8590 msgstr ""
8591 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8592 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8593 "い。"
8594
8595 #. type: IP
8596 #: build/C/man2/remap_file_pages.2:69 build/C/man2/memfd_create.2:225
8597 #, no-wrap
8598 msgid "2."
8599 msgstr "2."
8600
8601 #. type: Plain text
8602 #: build/C/man2/remap_file_pages.2:77
8603 msgid ""
8604 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8605 "correspondence between the pages of the mapping and the pages of the file.  "
8606 "It is possible to map the same page of a file into multiple locations within "
8607 "the mapped region."
8608 msgstr ""
8609 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8610 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8611 "所に マップすることが可能である。"
8612
8613 #. type: Plain text
8614 #: build/C/man2/remap_file_pages.2:88
8615 msgid ""
8616 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8617 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8618 "system page size; I<size> is the length of the region in bytes."
8619 msgstr ""
8620 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8621 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8622 "る。 I<size> は領域の長さであり、単位はバイトである。"
8623
8624 #. type: Plain text
8625 #: build/C/man2/remap_file_pages.2:106
8626 msgid ""
8627 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8628 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8629 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8630 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8631 "and I<size> will be placed."
8632 msgstr ""
8633 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8634 "成したいページの マッピングを識別することである。 よって I<addr> は "
8635 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8636 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8637 "予定のアドレスを、 I<addr> によって指定することである。"
8638
8639 #.  This rounding is weird, and not consistent with the treatment of
8640 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8641 #.  MTK, 14 Sep 2005
8642 #. type: Plain text
8643 #: build/C/man2/remap_file_pages.2:120
8644 msgid ""
8645 "The values specified in I<addr> and I<size> should be multiples of the "
8646 "system page size.  If they are not, then the kernel rounds I<both> values "
8647 "I<down> to the nearest multiple of the page size."
8648 msgstr ""
8649 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8650 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8651 "「切り下げる」。"
8652
8653 #. type: Plain text
8654 #: build/C/man2/remap_file_pages.2:124
8655 msgid "The I<prot> argument must be specified as 0."
8656 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8657
8658 #. type: Plain text
8659 #: build/C/man2/remap_file_pages.2:132
8660 msgid ""
8661 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8662 "other than B<MAP_NONBLOCK> are ignored."
8663 msgstr ""
8664 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8665 "の全てのフラグは無視される。"
8666
8667 #. type: Plain text
8668 #: build/C/man2/remap_file_pages.2:139
8669 msgid ""
8670 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8671 "I<errno> is set appropriately."
8672 msgstr ""
8673 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8674 "れ、 I<errno> が適切に設定される。"
8675
8676 #. type: Plain text
8677 #: build/C/man2/remap_file_pages.2:147
8678 msgid ""
8679 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8680 "flag."
8681 msgstr ""
8682 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8683 "いない。"
8684
8685 #.  And possibly others from vma->vm_ops->populate()
8686 #. type: Plain text
8687 #: build/C/man2/remap_file_pages.2:156
8688 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8689 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8690
8691 #. type: Plain text
8692 #: build/C/man2/remap_file_pages.2:161
8693 msgid ""
8694 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8695 "support was added in version 2.3.3."
8696 msgstr ""
8697 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8698 "サポートは glibc バージョン 2.3.3 で追加された。"
8699
8700 #. type: Plain text
8701 #: build/C/man2/remap_file_pages.2:165
8702 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8703 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8704
8705 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8706 #. type: Plain text
8707 #: build/C/man2/remap_file_pages.2:176
8708 msgid ""
8709 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8710 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8711 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8712 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8713 "addresses."
8714 msgstr ""
8715 "Linux 2.6.23 以降、 B<remap_file_pages>() は tmpfs, hugetlbfs, ramfs などのイ"
8716 "ンメモリファイルシステム上にのみ非線形マッピングを作成する。 裏にデータストア"
8717 "を持つファイルシステム上では、 B<remap_file_pages>() は、 ファイルのどの部分"
8718 "がどのアドレスにマッピングされているかの調整が、 B<mmap>(2) を使った場合ほど"
8719 "効率的ではない。"
8720
8721 #. type: Plain text
8722 #: build/C/man2/remap_file_pages.2:183
8723 msgid ""
8724 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8725 "B<msync>(2)"
8726 msgstr ""
8727 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8728 "B<msync>(2)"
8729
8730 #. type: TH
8731 #: build/C/man3/shm_open.3:26
8732 #, no-wrap
8733 msgid "SHM_OPEN"
8734 msgstr "SHM_OPEN"
8735
8736 #. type: Plain text
8737 #: build/C/man3/shm_open.3:29
8738 msgid ""
8739 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8740 msgstr ""
8741 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8742 "う"
8743
8744 #. type: Plain text
8745 #: build/C/man3/shm_open.3:33
8746 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8747 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8748
8749 #. type: Plain text
8750 #: build/C/man3/shm_open.3:35
8751 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8752 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8753
8754 #. type: Plain text
8755 #: build/C/man3/shm_open.3:37
8756 msgid ""
8757 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8758 msgstr ""
8759 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8760
8761 #. type: Plain text
8762 #: build/C/man3/shm_open.3:39
8763 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8764 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8765
8766 #. type: Plain text
8767 #: build/C/man3/shm_open.3:41
8768 msgid "Link with I<-lrt>."
8769 msgstr "I<-lrt> でリンクする。"
8770
8771 #. type: Plain text
8772 #: build/C/man3/shm_open.3:53
8773 msgid ""
8774 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8775 "memory object.  A POSIX shared memory object is in effect a handle which can "
8776 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8777 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8778 "removing an object previously created by B<shm_open>()."
8779 msgstr ""
8780 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8781 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8782 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を "
8783 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8784 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8785
8786 #.  glibc allows the initial slash to be omitted, and makes
8787 #.  multiple initial slashes equivalent to a single slash.
8788 #.  This differs from the implementation of POSIX message queues.
8789 #.  glibc allows subdirectory components in the name, in which
8790 #.  case the subdirectory must exist under /dev/shm, and allow the
8791 #.  required permissions if a user wants to create a shared memory
8792 #.  object in that subdirectory.
8793 #. type: Plain text
8794 #: build/C/man3/shm_open.3:74
8795 msgid ""
8796 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8797 "specifies the shared memory object to be created or opened.  For portable "
8798 "use, a shared memory object should be identified by a name of the form I</"
8799 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8800 "255) characters consisting of an initial slash, followed by one or more "
8801 "characters, none of which are slashes."
8802 msgstr ""
8803 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8804 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8805 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8806 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8807 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8808
8809 #. type: Plain text
8810 #: build/C/man3/shm_open.3:81
8811 msgid ""
8812 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8813 "or B<O_RDWR> and any of the other flags listed here:"
8814 msgstr ""
8815 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8816 "述べる他のフラグの論理和をとったもの を指定する。"
8817
8818 #. type: TP
8819 #: build/C/man3/shm_open.3:81
8820 #, no-wrap
8821 msgid "B<O_RDONLY>"
8822 msgstr "B<O_RDONLY>"
8823
8824 #. type: Plain text
8825 #: build/C/man3/shm_open.3:89
8826 msgid ""
8827 "Open the object for read access.  A shared memory object opened in this way "
8828 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8829 msgstr ""
8830 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8831 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8832 "B<mmap>(2)  することができる。"
8833
8834 #. type: TP
8835 #: build/C/man3/shm_open.3:89
8836 #, no-wrap
8837 msgid "B<O_RDWR>"
8838 msgstr "B<O_RDWR>"
8839
8840 #. type: Plain text
8841 #: build/C/man3/shm_open.3:92
8842 msgid "Open the object for read-write access."
8843 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8844
8845 #. type: TP
8846 #: build/C/man3/shm_open.3:92
8847 #, no-wrap
8848 msgid "B<O_CREAT>"
8849 msgstr "B<O_CREAT>"
8850
8851 #.  In truth it is actually the filesystem IDs on Linux, but these
8852 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8853 #. type: Plain text
8854 #: build/C/man3/shm_open.3:112
8855 msgid ""
8856 "Create the shared memory object if it does not exist.  The user and group "
8857 "ownership of the object are taken from the corresponding effective IDs of "
8858 "the calling process, and the object's permission bits are set according to "
8859 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8860 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8861 "A set of macro constants which can be used to define I<mode> is listed in "
8862 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8863 "including I<E<lt>sys/stat.hE<gt>>.)"
8864 msgstr ""
8865 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8866 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8867 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8868 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8869 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8870 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8871 "hE<gt>> のインクルードにより得られる)。"
8872
8873 #. type: Plain text
8874 #: build/C/man3/shm_open.3:118
8875 msgid ""
8876 "A new shared memory object initially has zero length\\(emthe size of the "
8877 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8878 "shared memory object are automatically initialized to 0."
8879 msgstr ""
8880 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8881 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8882 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8883
8884 #. type: TP
8885 #: build/C/man3/shm_open.3:118
8886 #, no-wrap
8887 msgid "B<O_EXCL>"
8888 msgstr "B<O_EXCL>"
8889
8890 #. type: Plain text
8891 #: build/C/man3/shm_open.3:127
8892 msgid ""
8893 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8894 "I<name> already exists, return an error.  The check for the existence of the "
8895 "object, and its creation if it does not exist, are performed atomically."
8896 msgstr ""
8897 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8898 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8899 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8900 "atomically)。"
8901
8902 #. type: TP
8903 #: build/C/man3/shm_open.3:127
8904 #, no-wrap
8905 msgid "B<O_TRUNC>"
8906 msgstr "B<O_TRUNC>"
8907
8908 #. type: Plain text
8909 #: build/C/man3/shm_open.3:130
8910 msgid "If the shared memory object already exists, truncate it to zero bytes."
8911 msgstr ""
8912 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8913 "切り詰める。"
8914
8915 #. type: Plain text
8916 #: build/C/man3/shm_open.3:133
8917 msgid ""
8918 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8919 "hE<gt>>."
8920 msgstr ""
8921 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8922
8923 #. type: Plain text
8924 #: build/C/man3/shm_open.3:144
8925 msgid ""
8926 "On successful completion B<shm_open>()  returns a new file descriptor "
8927 "referring to the shared memory object.  This file descriptor is guaranteed "
8928 "to be the lowest-numbered file descriptor not previously opened within the "
8929 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8930 "descriptor."
8931 msgstr ""
8932 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8933 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8934 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8935 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8936 "ファイル・ディスクリプタに設定される。"
8937
8938 #. type: Plain text
8939 #: build/C/man3/shm_open.3:153
8940 msgid ""
8941 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8942 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8943 "the file descriptor may be closed without affecting the memory mapping."
8944 msgstr ""
8945 "通常、これらのファイル・ディスクリプタは、この後続けて実行される "
8946 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
8947 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタを"
8948 "クローズしてもよく、 クローズしてもメモリ・マッピングに影響を与えることはな"
8949 "い。"
8950
8951 #. type: Plain text
8952 #: build/C/man3/shm_open.3:171
8953 msgid ""
8954 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8955 "shared memory object name, and, once all processes have unmapped the object, "
8956 "de-allocates and destroys the contents of the associated memory region.  "
8957 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8958 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8959 "case a new, distinct object is created)."
8960 msgstr ""
8961 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8962 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8963 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8964 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8965 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8966 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8967
8968 #. type: Plain text
8969 #: build/C/man3/shm_open.3:180
8970 msgid ""
8971 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8972 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8973 "or -1 on error."
8974 msgstr ""
8975 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8976 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8977 "を、エラーが起こった場合 -1 を返す。"
8978
8979 #. type: Plain text
8980 #: build/C/man3/shm_open.3:187
8981 msgid ""
8982 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8983 "which may appear in I<errno> include the following:"
8984 msgstr ""
8985 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8986 "される値は以下の通りである:"
8987
8988 #. type: Plain text
8989 #: build/C/man3/shm_open.3:192
8990 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8991 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8992
8993 #. type: Plain text
8994 #: build/C/man3/shm_open.3:202
8995 msgid ""
8996 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8997 "B<O_TRUNC> was specified and the caller does not have write permission on "
8998 "the object."
8999 msgstr ""
9000 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
9001 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
9002 "み権限が なかった。"
9003
9004 #. type: TP
9005 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
9006 #, no-wrap
9007 msgid "B<EEXIST>"
9008 msgstr "B<EEXIST>"
9009
9010 #. type: Plain text
9011 #: build/C/man3/shm_open.3:213
9012 msgid ""
9013 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
9014 "shared memory object specified by I<name> already exists."
9015 msgstr ""
9016 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
9017 "定された共有メモリ・オブジェクトが既に存在した。"
9018
9019 #. type: Plain text
9020 #: build/C/man3/shm_open.3:220
9021 msgid "The I<name> argument to B<shm_open>()  was invalid."
9022 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
9023
9024 #. type: TP
9025 #: build/C/man3/shm_open.3:220 build/C/man2/memfd_create.2:146
9026 #, no-wrap
9027 msgid "B<EMFILE>"
9028 msgstr "B<EMFILE>"
9029
9030 #. type: Plain text
9031 #: build/C/man3/shm_open.3:223
9032 msgid "The process already has the maximum number of files open."
9033 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9034
9035 #. type: TP
9036 #: build/C/man3/shm_open.3:223
9037 #, no-wrap
9038 msgid "B<ENAMETOOLONG>"
9039 msgstr "B<ENAMETOOLONG>"
9040
9041 #. type: Plain text
9042 #: build/C/man3/shm_open.3:229
9043 msgid "The length of I<name> exceeds B<PATH_MAX>."
9044 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9045
9046 #. type: Plain text
9047 #: build/C/man3/shm_open.3:233
9048 msgid ""
9049 "The limit on the total number of files open on the system has been reached."
9050 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9051
9052 #. type: TP
9053 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9054 #: build/C/man2/shmget.2:225
9055 #, no-wrap
9056 msgid "B<ENOENT>"
9057 msgstr "B<ENOENT>"
9058
9059 #. type: Plain text
9060 #: build/C/man3/shm_open.3:242
9061 msgid ""
9062 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
9063 "B<O_CREAT> was not specified."
9064 msgstr ""
9065 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
9066 "B<O_CREAT> が指定されていなかった。"
9067
9068 #. type: Plain text
9069 #: build/C/man3/shm_open.3:249
9070 msgid ""
9071 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9072 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9073
9074 #. type: Plain text
9075 #: build/C/man3/shm_open.3:251
9076 msgid "These functions are provided in glibc 2.2 and later."
9077 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9078
9079 #. type: Plain text
9080 #: build/C/man3/shm_open.3:257
9081 msgid ""
9082 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9083 "object is set to either the calling process's effective group ID or \"a "
9084 "system default group ID\"."
9085 msgstr ""
9086 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
9087 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9088 "ID」 のどちらかに設定される、と書かれている。"
9089
9090 #. type: Plain text
9091 #: build/C/man3/shm_open.3:266
9092 msgid ""
9093 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9094 "unspecified.  On Linux, this will successfully truncate an existing shared "
9095 "memory object\\(emthis may not be so on other UNIX systems."
9096 msgstr ""
9097 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9098 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
9099 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9100
9101 #. type: Plain text
9102 #: build/C/man3/shm_open.3:271
9103 msgid ""
9104 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9105 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9106 msgstr ""
9107 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
9108 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9109
9110 #. type: Plain text
9111 #: build/C/man3/shm_open.3:283
9112 msgid ""
9113 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9114 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9115 "B<shm_overview>(7)"
9116 msgstr ""
9117 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9118 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9119 "B<shm_overview>(7)"
9120
9121 #. type: TH
9122 #: build/C/man7/shm_overview.7:27
9123 #, no-wrap
9124 msgid "SHM_OVERVIEW"
9125 msgstr "SHM_OVERVIEW"
9126
9127 #. type: TH
9128 #: build/C/man7/shm_overview.7:27
9129 #, no-wrap
9130 msgid "2010-09-10"
9131 msgstr "2010-09-10"
9132
9133 #. type: Plain text
9134 #: build/C/man7/shm_overview.7:30
9135 msgid "shm_overview - overview of POSIX shared memory"
9136 msgstr "shm_overview - POSIX 共有メモリの概要"
9137
9138 #. type: Plain text
9139 #: build/C/man7/shm_overview.7:33
9140 msgid ""
9141 "The POSIX shared memory API allows processes to communicate information by "
9142 "sharing a region of memory."
9143 msgstr ""
9144 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
9145 "情報をやり取りすることができる。"
9146
9147 #. type: Plain text
9148 #: build/C/man7/shm_overview.7:35
9149 msgid "The interfaces employed in the API are:"
9150 msgstr "この API では以下のインターフェースが採用されている。"
9151
9152 #. type: TP
9153 #: build/C/man7/shm_overview.7:35
9154 #, no-wrap
9155 msgid "B<shm_open>(3)"
9156 msgstr "B<shm_open>(3)"
9157
9158 #. type: Plain text
9159 #: build/C/man7/shm_overview.7:42
9160 msgid ""
9161 "Create and open a new object, or open an existing object.  This is analogous "
9162 "to B<open>(2).  The call returns a file descriptor for use by the other "
9163 "interfaces listed below."
9164 msgstr ""
9165 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9166 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9167 "る ファイルディスクリプタを返す。"
9168
9169 #. type: TP
9170 #: build/C/man7/shm_overview.7:42
9171 #, no-wrap
9172 msgid "B<ftruncate>(2)"
9173 msgstr "B<ftruncate>(2)"
9174
9175 #. type: Plain text
9176 #: build/C/man7/shm_overview.7:46
9177 msgid ""
9178 "Set the size of the shared memory object.  (A newly created shared memory "
9179 "object has a length of zero.)"
9180 msgstr "共有メモリオブジェクトの大きさを設定する。"
9181
9182 #. type: Plain text
9183 #: build/C/man7/shm_overview.7:50
9184 msgid ""
9185 "Map the shared memory object into the virtual address space of the calling "
9186 "process."
9187 msgstr ""
9188 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
9189
9190 #. type: TP
9191 #: build/C/man7/shm_overview.7:50
9192 #, no-wrap
9193 msgid "B<munmap>(2)"
9194 msgstr "B<munmap>(2)"
9195
9196 #. type: Plain text
9197 #: build/C/man7/shm_overview.7:54
9198 msgid ""
9199 "Unmap the shared memory object from the virtual address space of the calling "
9200 "process."
9201 msgstr ""
9202 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
9203 "る。"
9204
9205 #. type: TP
9206 #: build/C/man7/shm_overview.7:54
9207 #, no-wrap
9208 msgid "B<shm_unlink>(3)"
9209 msgstr "B<shm_unlink>(3)"
9210
9211 #. type: Plain text
9212 #: build/C/man7/shm_overview.7:57
9213 msgid "Remove a shared memory object name."
9214 msgstr "共有メモリオブジェクト名を削除する。"
9215
9216 #. type: TP
9217 #: build/C/man7/shm_overview.7:57
9218 #, no-wrap
9219 msgid "B<close>(2)"
9220 msgstr "B<close>(2)"
9221
9222 #. type: Plain text
9223 #: build/C/man7/shm_overview.7:62
9224 msgid ""
9225 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9226 "needed."
9227 msgstr ""
9228 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
9229 "のファイルディスクリプタをクローズする。"
9230
9231 #. type: TP
9232 #: build/C/man7/shm_overview.7:62
9233 #, no-wrap
9234 msgid "B<fstat>(2)"
9235 msgstr "B<fstat>(2)"
9236
9237 #. type: Plain text
9238 #: build/C/man7/shm_overview.7:76
9239 msgid ""
9240 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9241 "the information returned by this call are the object's size (I<st_size>), "
9242 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9243 msgstr ""
9244 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
9245 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
9246 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9247
9248 #. type: TP
9249 #: build/C/man7/shm_overview.7:76
9250 #, no-wrap
9251 msgid "B<fchown>(2)"
9252 msgstr "B<fchown>(2)"
9253
9254 #. type: Plain text
9255 #: build/C/man7/shm_overview.7:79
9256 msgid "To change the ownership of a shared memory object."
9257 msgstr "共有メモリオブジェクトの所有権を変更する。"
9258
9259 #. type: TP
9260 #: build/C/man7/shm_overview.7:79
9261 #, no-wrap
9262 msgid "B<fchmod>(2)"
9263 msgstr "B<fchmod>(2)"
9264
9265 #. type: Plain text
9266 #: build/C/man7/shm_overview.7:82
9267 msgid "To change the permissions of a shared memory object."
9268 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9269
9270 #. type: SS
9271 #: build/C/man7/shm_overview.7:82
9272 #, no-wrap
9273 msgid "Versions"
9274 msgstr "Versions"
9275
9276 #. type: Plain text
9277 #: build/C/man7/shm_overview.7:84
9278 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9279 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9280
9281 #. type: SS
9282 #: build/C/man7/shm_overview.7:84
9283 #, no-wrap
9284 msgid "Persistence"
9285 msgstr "持続性"
9286
9287 #. type: Plain text
9288 #: build/C/man7/shm_overview.7:89
9289 msgid ""
9290 "POSIX shared memory objects have kernel persistence: a shared memory object "
9291 "will exist until the system is shut down, or until all processes have "
9292 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9293 msgstr ""
9294 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9295 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9296 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9297
9298 #. type: SS
9299 #: build/C/man7/shm_overview.7:89
9300 #, no-wrap
9301 msgid "Linking"
9302 msgstr "リンク"
9303
9304 #. type: Plain text
9305 #: build/C/man7/shm_overview.7:94
9306 msgid ""
9307 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9308 "to link against the real-time library, I<librt>."
9309 msgstr ""
9310 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9311 "タイムライブラリ I<librt> とリンクしなければならない。"
9312
9313 #. type: SS
9314 #: build/C/man7/shm_overview.7:94
9315 #, no-wrap
9316 msgid "Accessing shared memory objects via the filesystem"
9317 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9318
9319 #. type: Plain text
9320 #: build/C/man7/shm_overview.7:101
9321 msgid ""
9322 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9323 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9324 "supports the use of access control lists (ACLs)  to control the permissions "
9325 "of objects in the virtual filesystem."
9326 msgstr ""
9327 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9328 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9329 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9330 "スト (ACL; access control lists) を使うことができる。"
9331
9332 #. type: Plain text
9333 #: build/C/man7/shm_overview.7:106
9334 msgid ""
9335 "Typically, processes must synchronize their access to a shared memory "
9336 "object, using, for example, POSIX semaphores."
9337 msgstr ""
9338 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9339 "使ってプロセス間で同期をとらなければならない。"
9340
9341 #. type: Plain text
9342 #: build/C/man7/shm_overview.7:114
9343 msgid ""
9344 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9345 "memory API.  POSIX shared memory provides a simpler, and better designed "
9346 "interface; on the other hand POSIX shared memory is somewhat less widely "
9347 "available (especially on older systems) than System V shared memory."
9348 msgstr ""
9349 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9350 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9351 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9352 "システムが少ない (特に、古いシステムでは少ない)。"
9353
9354 #. type: Plain text
9355 #: build/C/man7/shm_overview.7:127
9356 msgid ""
9357 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9358 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9359 "B<shm_unlink>(3), B<sem_overview>(7)"
9360 msgstr ""
9361 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9362 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9363 "B<shm_unlink>(3), B<sem_overview>(7)"
9364
9365 #. type: TH
9366 #: build/C/man2/shmctl.2:45
9367 #, no-wrap
9368 msgid "SHMCTL"
9369 msgstr "SHMCTL"
9370
9371 #. type: TH
9372 #: build/C/man2/shmctl.2:45
9373 #, no-wrap
9374 msgid "2014-02-07"
9375 msgstr "2014-02-07"
9376
9377 #. type: Plain text
9378 #: build/C/man2/shmctl.2:48
9379 msgid "shmctl - System V shared memory control"
9380 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9381
9382 #. type: Plain text
9383 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9384 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9385 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9386
9387 #. type: Plain text
9388 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9389 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9390 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9391
9392 #. type: Plain text
9393 #: build/C/man2/shmctl.2:55
9394 msgid ""
9395 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9396 msgstr ""
9397 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9398
9399 #. type: Plain text
9400 #: build/C/man2/shmctl.2:62
9401 msgid ""
9402 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9403 "\\ V shared memory segment whose identifier is given in I<shmid>."
9404 msgstr ""
9405 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリ・セグメントに対し"
9406 "て I<cmd> で指示した制御命令を実行する。"
9407
9408 #. type: Plain text
9409 #: build/C/man2/shmctl.2:67
9410 msgid ""
9411 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9412 "I<E<lt>sys/shm.hE<gt>> as follows:"
9413 msgstr ""
9414 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9415 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9416
9417 #. type: Plain text
9418 #: build/C/man2/shmctl.2:81
9419 #, no-wrap
9420 msgid ""
9421 "struct shmid_ds {\n"
9422 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9423 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9424 "    time_t          shm_atime;   /* Last attach time */\n"
9425 "    time_t          shm_dtime;   /* Last detach time */\n"
9426 "    time_t          shm_ctime;   /* Last change time */\n"
9427 "    pid_t           shm_cpid;    /* PID of creator */\n"
9428 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9429 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9430 "    ...\n"
9431 "};\n"
9432 msgstr ""
9433 "struct shmid_ds {\n"
9434 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9435 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9436 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9437 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9438 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9439 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9440 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9441 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9442 "    ...\n"
9443 "};\n"
9444
9445 #. type: Plain text
9446 #: build/C/man2/shmctl.2:89
9447 msgid ""
9448 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9449 "settable using B<IPC_SET>):"
9450 msgstr ""
9451 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9452 "B<IPC_SET> を使って設定可能である):"
9453
9454 #. type: Plain text
9455 #: build/C/man2/shmctl.2:102
9456 #, no-wrap
9457 msgid ""
9458 "struct ipc_perm {\n"
9459 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9460 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9461 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9462 "    uid_t          cuid;     /* Effective UID of creator */\n"
9463 "    gid_t          cgid;     /* Effective GID of creator */\n"
9464 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9465 "                                SHM_LOCKED flags */\n"
9466 "    unsigned short __seq;    /* Sequence number */\n"
9467 "};\n"
9468 msgstr ""
9469 "struct ipc_perm {\n"
9470 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9471 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9472 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9473 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9474 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9475 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9476 "                                SHM_LOCKED フラグ */\n"
9477 "    unsigned short __seq;    /* シーケンス番号 */\n"
9478 "};\n"
9479
9480 #. type: Plain text
9481 #: build/C/man2/shmctl.2:108
9482 msgid "Valid values for I<cmd> are:"
9483 msgstr "I<cmd> として有効な値は以下の通り:"
9484
9485 #. type: TP
9486 #: build/C/man2/shmctl.2:109
9487 #, no-wrap
9488 msgid "B<IPC_STAT>"
9489 msgstr "B<IPC_STAT>"
9490
9491 #. type: Plain text
9492 #: build/C/man2/shmctl.2:118
9493 msgid ""
9494 "Copy information from the kernel data structure associated with I<shmid> "
9495 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9496 "read permission on the shared memory segment."
9497 msgstr ""
9498 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9499 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9500 "読み込み許可を持たなければならない。"
9501
9502 #. type: TP
9503 #: build/C/man2/shmctl.2:118
9504 #, no-wrap
9505 msgid "B<IPC_SET>"
9506 msgstr "B<IPC_SET>"
9507
9508 #. type: Plain text
9509 #: build/C/man2/shmctl.2:136
9510 msgid ""
9511 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9512 "I<buf> to the kernel data structure associated with this shared memory "
9513 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9514 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9515 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9516 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9517 "memory segment, or the caller must be privileged."
9518 msgstr ""
9519 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9520 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9521 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9522 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9523 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9524 "と一致するか、呼び出し元が特権を持たなければならない。"
9525
9526 #. type: TP
9527 #: build/C/man2/shmctl.2:136
9528 #, no-wrap
9529 msgid "B<IPC_RMID>"
9530 msgstr "B<IPC_RMID>"
9531
9532 #. type: Plain text
9533 #: build/C/man2/shmctl.2:149
9534 msgid ""
9535 "Mark the segment to be destroyed.  The segment will only actually be "
9536 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9537 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9538 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9539 "is ignored."
9540 msgstr ""
9541 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9542 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9543 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9544 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9545
9546 #. type: Plain text
9547 #: build/C/man2/shmctl.2:157
9548 msgid ""
9549 "If a segment has been marked for destruction, then the (nonstandard)  "
9550 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9551 "structure retrieved by B<IPC_STAT> will be set."
9552 msgstr ""
9553 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9554 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9555 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9556
9557 #. type: Plain text
9558 #: build/C/man2/shmctl.2:160
9559 msgid ""
9560 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9561 "its pages that were faulted in will remain in memory or swap."
9562 msgstr ""
9563 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9564 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9565 "る。"
9566
9567 #. type: Plain text
9568 #: build/C/man2/shmctl.2:165
9569 msgid ""
9570 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9571 "B<proc>(5)."
9572 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9573
9574 #. type: TP
9575 #: build/C/man2/shmctl.2:165
9576 #, no-wrap
9577 msgid "B<IPC_INFO> (Linux-specific)"
9578 msgstr "B<IPC_INFO> (Linux 固有)"
9579
9580 #. type: Plain text
9581 #: build/C/man2/shmctl.2:178
9582 msgid ""
9583 "Return information about system-wide shared memory limits and parameters in "
9584 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9585 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9586 "B<_GNU_SOURCE> feature test macro is defined:"
9587 msgstr ""
9588 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9589 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9590 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9591 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9592
9593 #. type: Plain text
9594 #: build/C/man2/shmctl.2:192
9595 #, no-wrap
9596 msgid ""
9597 "struct shminfo {\n"
9598 "    unsigned long shmmax; /* Maximum segment size */\n"
9599 "    unsigned long shmmin; /* Minimum segment size;\n"
9600 "                             always 1 */\n"
9601 "    unsigned long shmmni; /* Maximum number of segments */\n"
9602 "    unsigned long shmseg; /* Maximum number of segments\n"
9603 "                             that a process can attach;\n"
9604 "                             unused within kernel */\n"
9605 "    unsigned long shmall; /* Maximum number of pages of\n"
9606 "                             shared memory, system-wide */\n"
9607 "};\n"
9608 msgstr ""
9609 "struct  shminfo {\n"
9610 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9611 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9612 "                             常に 1 */\n"
9613 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9614 "    unsigned long shmseg; /* プロセスが付加できる\n"
9615 "                             セグメントの最大数。\n"
9616 "                             カーネル内では未使用 */\n"
9617 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9618 "                             システム全体での値 */\n"
9619 "};\n"
9620
9621 #. type: Plain text
9622 #: build/C/man2/shmctl.2:205
9623 msgid ""
9624 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9625 "files of the same name; see B<proc>(5)  for details."
9626 msgstr ""
9627 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9628 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9629
9630 #. type: TP
9631 #: build/C/man2/shmctl.2:205
9632 #, no-wrap
9633 msgid "B<SHM_INFO> (Linux-specific)"
9634 msgstr "B<SHM_INFO> (Linux 固有)"
9635
9636 #. type: Plain text
9637 #: build/C/man2/shmctl.2:216
9638 msgid ""
9639 "Return a I<shm_info> structure whose fields contain information about system "
9640 "resources consumed by shared memory.  This structure is defined in "
9641 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9642 msgstr ""
9643 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9644 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9645 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9646
9647 #. type: Plain text
9648 #: build/C/man2/shmctl.2:233
9649 #, no-wrap
9650 msgid ""
9651 "struct shm_info {\n"
9652 "    int           used_ids; /* # of currently existing\n"
9653 "                               segments */\n"
9654 "    unsigned long shm_tot;  /* Total number of shared\n"
9655 "                               memory pages */\n"
9656 "    unsigned long shm_rss;  /* # of resident shared\n"
9657 "                               memory pages */\n"
9658 "    unsigned long shm_swp;  /* # of swapped shared\n"
9659 "                               memory pages */\n"
9660 "    unsigned long swap_attempts;\n"
9661 "                            /* Unused since Linux 2.4 */\n"
9662 "    unsigned long swap_successes;\n"
9663 "                            /* Unused since Linux 2.4 */\n"
9664 "};\n"
9665 msgstr ""
9666 "struct shm_info {\n"
9667 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9668 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9669 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9670 "                               いない) 共有メモリページ数 */\n"
9671 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9672 "                               ページ数 */\n"
9673 "    unsigned long swap_attempts;\n"
9674 "                            /* Linux 2.4 以降では未使用 */\n"
9675 "    unsigned long swap_successes;\n"
9676 "                            /* Linux 2.4 以降では未使用 */\n"
9677 "};\n"
9678
9679 #. type: TP
9680 #: build/C/man2/shmctl.2:235
9681 #, no-wrap
9682 msgid "B<SHM_STAT> (Linux-specific)"
9683 msgstr "B<SHM_STAT> (Linux 固有)"
9684
9685 #. type: Plain text
9686 #: build/C/man2/shmctl.2:246
9687 msgid ""
9688 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9689 "argument is not a segment identifier, but instead an index into the kernel's "
9690 "internal array that maintains information about all shared memory segments "
9691 "on the system."
9692 msgstr ""
9693 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9694 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9695 "管理するカーネルの内部配列へのインデックス である。"
9696
9697 #. type: Plain text
9698 #: build/C/man2/shmctl.2:249
9699 msgid ""
9700 "The caller can prevent or allow swapping of a shared memory segment with the "
9701 "following I<cmd> values:"
9702 msgstr ""
9703 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9704 "ワップされることを防止したり、許可したりできる:"
9705
9706 #. type: TP
9707 #: build/C/man2/shmctl.2:250
9708 #, no-wrap
9709 msgid "B<SHM_LOCK> (Linux-specific)"
9710 msgstr "B<SHM_LOCK> (Linux 固有)"
9711
9712 #. type: Plain text
9713 #: build/C/man2/shmctl.2:262
9714 msgid ""
9715 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9716 "pages that are required to be present after locking is enabled.  If a "
9717 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9718 "I<shm_perm.mode> field in the associated data structure retrieved by "
9719 "B<IPC_STAT> will be set."
9720 msgstr ""
9721 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9722 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9723 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9724 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9725 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9726
9727 #. type: TP
9728 #: build/C/man2/shmctl.2:262
9729 #, no-wrap
9730 msgid "B<SHM_UNLOCK> (Linux-specific)"
9731 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9732
9733 #. type: Plain text
9734 #: build/C/man2/shmctl.2:265
9735 msgid "Unlock the segment, allowing it to be swapped out."
9736 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9737
9738 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9739 #.  be applied to a segment, regardless of ownership of the segment.
9740 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9741 #.  in 2.6.10.  MTK, May 2005
9742 #. type: Plain text
9743 #: build/C/man2/shmctl.2:283
9744 msgid ""
9745 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9746 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9747 "these operations if its effective UID matches the owner or creator UID of "
9748 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9749 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9750 msgstr ""
9751 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9752 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9753 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9754 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9755 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9756 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9757
9758 #. type: Plain text
9759 #: build/C/man2/shmctl.2:301
9760 msgid ""
9761 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9762 "highest used entry in the kernel's internal array recording information "
9763 "about all shared memory segments.  (This information can be used with "
9764 "repeated B<SHM_STAT> operations to obtain information about all shared "
9765 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9766 "the identifier of the shared memory segment whose index was given in "
9767 "I<shmid>.  Other operations return 0 on success."
9768 msgstr ""
9769 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9770 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9771 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9772 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9773 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9774 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9775
9776 #. type: Plain text
9777 #: build/C/man2/shmctl.2:305
9778 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9779 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9780
9781 #. type: Plain text
9782 #: build/C/man2/shmctl.2:314
9783 msgid ""
9784 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9785 "read access for I<shmid>, and the calling process does not have the "
9786 "B<CAP_IPC_OWNER> capability."
9787 msgstr ""
9788 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9789 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9790 "ケーパビリティ (capability) を持っていない。"
9791
9792 #. type: Plain text
9793 #: build/C/man2/shmctl.2:325
9794 msgid ""
9795 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9796 "pointed to by I<buf> isn't accessible."
9797 msgstr ""
9798 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9799 "るアドレスにアクセスできない。"
9800
9801 #. type: TP
9802 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9803 #, no-wrap
9804 msgid "B<EIDRM>"
9805 msgstr "B<EIDRM>"
9806
9807 #. type: Plain text
9808 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9809 msgid "I<shmid> points to a removed identifier."
9810 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9811
9812 #. type: Plain text
9813 #: build/C/man2/shmctl.2:337
9814 msgid ""
9815 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9816 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9817 "to an array slot that is currently unused."
9818 msgstr ""
9819 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9820 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9821 "配列のスロットを参照していた。"
9822
9823 #. type: Plain text
9824 #: build/C/man2/shmctl.2:348
9825 msgid ""
9826 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9827 "be-locked segment would mean that the total bytes in locked shared memory "
9828 "segments would exceed the limit for the real user ID of the calling "
9829 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9830 "(see B<setrlimit>(2))."
9831 msgstr ""
9832 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9833 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9834 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9835 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9836
9837 #. type: Plain text
9838 #: build/C/man2/shmctl.2:353
9839 msgid ""
9840 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9841 "in the structure pointed to by I<buf>."
9842 msgstr ""
9843 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9844 "には大き過ぎる。"
9845
9846 #. type: Plain text
9847 #: build/C/man2/shmctl.2:365
9848 msgid ""
9849 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9850 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9851 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9852 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9853 msgstr ""
9854 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9855 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9856 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9857
9858 #. type: Plain text
9859 #: build/C/man2/shmctl.2:377
9860 msgid ""
9861 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9862 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9863 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9864 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9865 msgstr ""
9866 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9867 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9868 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9869 "が特権を持たない場合にも、このエラーが起こる。)"
9870
9871 #.  SVr4 documents an additional error condition EMFILE.
9872 #. type: Plain text
9873 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9874 #: build/C/man2/shmop.2:231
9875 msgid "SVr4, POSIX.1-2001."
9876 msgstr "SVr4, POSIX.1-2001."
9877
9878 #.  Like Linux, the FreeBSD man pages still document
9879 #.  the inclusion of these header files.
9880 #. type: Plain text
9881 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9882 msgid ""
9883 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9884 "required on Linux or by any version of POSIX.  However, some old "
9885 "implementations required the inclusion of these header files, and the SVID "
9886 "also documented their inclusion.  Applications intended to be portable to "
9887 "such old systems may need to include these header files."
9888 msgstr ""
9889 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9890 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9891 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9892 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9893 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9894 "れない。"
9895
9896 #. type: Plain text
9897 #: build/C/man2/shmctl.2:407
9898 msgid ""
9899 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9900 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9901 "future, these may modified or moved to a I</proc> filesystem interface."
9902 msgstr ""
9903 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9904 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9905 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9906 "い。"
9907
9908 #. type: Plain text
9909 #: build/C/man2/shmctl.2:415
9910 msgid ""
9911 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9912 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9913 "feature is not available on other UNIX implementations; portable "
9914 "applications should avoid relying on it."
9915 msgstr ""
9916 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9917 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9918 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9919 "プリケーションではこれに依存しないようにすべきである。"
9920
9921 #. type: Plain text
9922 #: build/C/man2/shmctl.2:428
9923 msgid ""
9924 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9925 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9926 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9927 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9928 msgstr ""
9929 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9930 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9931 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9932 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9933
9934 #. type: Plain text
9935 #: build/C/man2/shmctl.2:435
9936 msgid ""
9937 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9938 "B<svipc>(7)"
9939 msgstr ""
9940 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9941 "B<shm_overview>(7), B<svipc>(7)"
9942
9943 #. type: TH
9944 #: build/C/man2/shmget.2:38
9945 #, no-wrap
9946 msgid "SHMGET"
9947 msgstr "SHMGET"
9948
9949 #. type: TH
9950 #: build/C/man2/shmget.2:38
9951 #, no-wrap
9952 msgid "2015-01-10"
9953 msgstr "2015-01-10"
9954
9955 #. type: Plain text
9956 #: build/C/man2/shmget.2:41
9957 msgid "shmget - allocates a System V shared memory segment"
9958 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9959
9960 #. type: Plain text
9961 #: build/C/man2/shmget.2:48
9962 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9963 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9964
9965 #. type: Plain text
9966 #: build/C/man2/shmget.2:72
9967 msgid ""
9968 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
9969 "associated with the value of the argument I<key>.  A new shared memory "
9970 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9971 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9972 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9973 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9974 msgstr ""
9975 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリ・セグメントの識"
9976 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9977 "共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9978 "場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメ"
9979 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9980 "きさとなる。"
9981
9982 #. type: Plain text
9983 #: build/C/man2/shmget.2:91
9984 msgid ""
9985 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9986 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9987 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9988 "| O_EXCL> for B<open>(2).)"
9989 msgstr ""
9990 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9991 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9992 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9993 "O_EXCL> を指定した場合の動作と同じである)。"
9994
9995 #. type: Plain text
9996 #: build/C/man2/shmget.2:95
9997 msgid "The value I<shmflg> is composed of:"
9998 msgstr "I<shmflg> は以下の内容から構成される:"
9999
10000 #. type: TP
10001 #: build/C/man2/shmget.2:95
10002 #, no-wrap
10003 msgid "B<IPC_CREAT>"
10004 msgstr "B<IPC_CREAT>"
10005
10006 #. type: Plain text
10007 #: build/C/man2/shmget.2:102
10008 msgid ""
10009 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
10010 "the segment associated with I<key> and check to see if the user has "
10011 "permission to access the segment."
10012 msgstr ""
10013 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
10014 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
10015 "可があるかどうかをチェックする。"
10016
10017 #. type: TP
10018 #: build/C/man2/shmget.2:102
10019 #, no-wrap
10020 msgid "B<IPC_EXCL>"
10021 msgstr "B<IPC_EXCL>"
10022
10023 #. type: Plain text
10024 #: build/C/man2/shmget.2:108
10025 msgid ""
10026 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
10027 "segment.  If the segment already exists, the call fails."
10028 msgstr ""
10029 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
10030 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
10031
10032 #. type: TP
10033 #: build/C/man2/shmget.2:108
10034 #, no-wrap
10035 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10036 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10037
10038 #. type: Plain text
10039 #: build/C/man2/shmget.2:114
10040 msgid ""
10041 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10042 "I<Documentation/vm/hugetlbpage.txt> for further information."
10043 msgstr ""
10044 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10045 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10046
10047 #. type: TP
10048 #: build/C/man2/shmget.2:114
10049 #, no-wrap
10050 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10051 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10052
10053 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10054 #.  specified.
10055 #. type: Plain text
10056 #: build/C/man2/shmget.2:133
10057 msgid ""
10058 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
10059 "Do not reserve swap space for this segment.  When swap space is reserved, "
10060 "one has the guarantee that it is possible to modify the segment.  When swap "
10061 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10062 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
10063 "overcommit_memory> in B<proc>(5)."
10064 msgstr ""
10065 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10066 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10067 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10068 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
10069 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
10070 "ルに関する議論も参照のこと。"
10071
10072 #. type: Plain text
10073 #: build/C/man2/shmget.2:143
10074 msgid ""
10075 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10076 "specify the permissions granted to the owner, group, and others.  These bits "
10077 "have the same format, and the same meaning, as the I<mode> argument of "
10078 "B<open>(2).  Presently, execute permissions are not used by the system."
10079 msgstr ""
10080 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10081 "への許可を指定する。 これらのビットは B<open>(2)  の I<mode> 引き数と同じ形式"
10082 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10083
10084 #. type: Plain text
10085 #: build/C/man2/shmget.2:151
10086 msgid ""
10087 "When a new shared memory segment is created, its contents are initialized to "
10088 "zero values, and its associated data structure, I<shmid_ds> (see "
10089 "B<shmctl>(2)), is initialized as follows:"
10090 msgstr ""
10091 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
10092 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10093 "期化される。"
10094
10095 #. type: Plain text
10096 #: build/C/man2/shmget.2:156
10097 msgid ""
10098 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10099 "calling process."
10100 msgstr ""
10101 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10102 "ユーザーID を設定する。"
10103
10104 #. type: Plain text
10105 #: build/C/man2/shmget.2:161
10106 msgid ""
10107 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10108 "the calling process."
10109 msgstr ""
10110 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10111 "定する。"
10112
10113 #. type: Plain text
10114 #: build/C/man2/shmget.2:166
10115 msgid ""
10116 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10117 "significant 9 bit of I<shmflg>."
10118 msgstr ""
10119 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10120
10121 #. type: Plain text
10122 #: build/C/man2/shmget.2:170
10123 msgid "I<shm_segsz> is set to the value of I<size>."
10124 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10125
10126 #. type: Plain text
10127 #: build/C/man2/shmget.2:177
10128 msgid ""
10129 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10130 msgstr ""
10131 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10132
10133 #. type: Plain text
10134 #: build/C/man2/shmget.2:180
10135 msgid "I<shm_ctime> is set to the current time."
10136 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10137
10138 #. type: Plain text
10139 #: build/C/man2/shmget.2:183
10140 msgid ""
10141 "If the shared memory segment already exists, the permissions are verified, "
10142 "and a check is made to see if it is marked for destruction."
10143 msgstr ""
10144 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10145 "(destruction) マークがつけられていないかのチェックが行われる。"
10146
10147 #. type: Plain text
10148 #: build/C/man2/shmget.2:188
10149 msgid ""
10150 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10151 "returned, and I<errno> is set to indicate the error."
10152 msgstr ""
10153 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
10154 "-1 が返り、 I<errno> にエラーを示す値が設定される。"
10155
10156 #. type: Plain text
10157 #: build/C/man2/shmget.2:192
10158 msgid "On failure, I<errno> is set to one of the following:"
10159 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10160
10161 #. type: Plain text
10162 #: build/C/man2/shmget.2:198
10163 msgid ""
10164 "The user does not have permission to access the shared memory segment, and "
10165 "does not have the B<CAP_IPC_OWNER> capability."
10166 msgstr ""
10167 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
10168 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10169
10170 #. type: Plain text
10171 #: build/C/man2/shmget.2:207
10172 msgid ""
10173 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10174 "memory segment already exists for I<key>."
10175 msgstr ""
10176 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10177 "有メモリセグメントはすでに存在する。"
10178
10179 #. type: Plain text
10180 #: build/C/man2/shmget.2:215
10181 msgid ""
10182 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10183 "greater than B<SHMMAX>."
10184 msgstr ""
10185 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10186 "B<SHMMAX> よりも大きかった。"
10187
10188 #. type: Plain text
10189 #: build/C/man2/shmget.2:221
10190 msgid ""
10191 "A segment for the given I<key> exists, but I<size> is greater than the size "
10192 "of that segment."
10193 msgstr ""
10194 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10195 "ントのサイズよりも大きかった。"
10196
10197 #. type: Plain text
10198 #: build/C/man2/shmget.2:230
10199 msgid ""
10200 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10201 msgstr ""
10202 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10203 "いなかった。"
10204
10205 #. type: Plain text
10206 #: build/C/man2/shmget.2:233
10207 msgid "No memory could be allocated for segment overhead."
10208 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
10209
10210 #. type: Plain text
10211 #: build/C/man2/shmget.2:241
10212 msgid ""
10213 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10214 "segment of the requested I<size> would cause the system to exceed the system-"
10215 "wide limit on shared memory (B<SHMALL>)."
10216 msgstr ""
10217 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
10218 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
10219 "限 (B<SHMALL>)  を超過した。"
10220
10221 #. type: Plain text
10222 #: build/C/man2/shmget.2:248
10223 msgid ""
10224 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10225 "(did not have the B<CAP_IPC_LOCK> capability)."
10226 msgstr ""
10227 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10228 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10229
10230 #. type: Plain text
10231 #: build/C/man2/shmget.2:256
10232 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10233 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10234
10235 #. type: Plain text
10236 #: build/C/man2/shmget.2:280
10237 msgid ""
10238 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10239 "value is used for I<key>, the system call ignores all but the least "
10240 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10241 msgstr ""
10242 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10243 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10244 "視し、 新しい共有メモリ・セグメントを作成する。"
10245
10246 #. type: SS
10247 #: build/C/man2/shmget.2:280
10248 #, no-wrap
10249 msgid "Shared memory limits"
10250 msgstr "共有メモリの上限"
10251
10252 #. type: Plain text
10253 #: build/C/man2/shmget.2:284
10254 msgid ""
10255 "The following limits on shared memory segment resources affect the "
10256 "B<shmget>()  call:"
10257 msgstr ""
10258 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
10259 "る:"
10260
10261 #. type: TP
10262 #: build/C/man2/shmget.2:284
10263 #, no-wrap
10264 msgid "B<SHMALL>"
10265 msgstr "B<SHMALL>"
10266
10267 #. type: Plain text
10268 #: build/C/man2/shmget.2:288
10269 msgid ""
10270 "System-wide limit on the total amount of shared memory, measured in units of "
10271 "the system page size."
10272 msgstr ""
10273 "共有メモリの全使用量のシステム全体での上限値。 システムページサイズが単位であ"
10274 "る。"
10275
10276 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10277 #. type: Plain text
10278 #: build/C/man2/shmget.2:294
10279 msgid ""
10280 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10281 "shmall>.  Since Linux 3.16, the default value for this limit is:"
10282 msgstr ""
10283 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10284 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10285 "る。"
10286
10287 #. type: Plain text
10288 #: build/C/man2/shmget.2:296 build/C/man2/shmget.2:331
10289 #, no-wrap
10290 msgid "    ULONG_MAX - 2^24\n"
10291 msgstr "    ULONG_MAX - 2^24\n"
10292
10293 #. type: Plain text
10294 #: build/C/man2/shmget.2:307
10295 msgid ""
10296 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10297 "systems)  is to impose no limitation on allocations.  This value, rather "
10298 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10299 "historical applications simply raised the existing limit without first "
10300 "checking its current value.  Such applications would cause the value to "
10301 "overflow if the limit was set at B<ULONG_MAX>."
10302 msgstr ""
10303 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10304 "ステムにも 64 ビットシステムにも適したものになっている)。 B<ULONG_MAX> ではな"
10305 "く、この値が選ばれたのは、 古いアプリケーションが最初に現在の値を確認せずに既"
10306 "存の上限をそのまま増やしてしまっても問題が起こらないようなデフォルト値を選ん"
10307 "だからである。 このようなアプリケーションでは、 上限を B<ULONG_MAX> に設定す"
10308 "ると値がオーバーフローしてしまうことになる。"
10309
10310 #. type: Plain text
10311 #: build/C/man2/shmget.2:310
10312 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10313 msgstr "Linux 2.4 から Linux 3.15 では、この上限のデフォルト値は以下であった。"
10314
10315 #. type: Plain text
10316 #: build/C/man2/shmget.2:312
10317 #, no-wrap
10318 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10319 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10320
10321 #. type: Plain text
10322 #: build/C/man2/shmget.2:320
10323 msgid ""
10324 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10325 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10326 "GB as the limit on the total memory used by all shared memory segments."
10327 msgstr ""
10328 "B<SHMMAX> と B<SHMMNI> が変更されないとすると、 この式の結果に (バイト単位の"
10329 "値を得るために) ページサイズを掛け算すると、 全ての共有メモリセグメントで使用"
10330 "される全メモリの上限として、 8 GB という値が得られる。"
10331
10332 #. type: TP
10333 #: build/C/man2/shmget.2:320
10334 #, no-wrap
10335 msgid "B<SHMMAX>"
10336 msgstr "B<SHMMAX>"
10337
10338 #. type: Plain text
10339 #: build/C/man2/shmget.2:323
10340 msgid "Maximum size in bytes for a shared memory segment."
10341 msgstr "1 つの共有メモリセグメントの最大サイズ (バイト数)。"
10342
10343 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10344 #. type: Plain text
10345 #: build/C/man2/shmget.2:329
10346 msgid ""
10347 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10348 "shmmax>.  Since Linux 3.16, the default value for this limit is:"
10349 msgstr ""
10350 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10351 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10352 "る。"
10353
10354 #. type: Plain text
10355 #: build/C/man2/shmget.2:340
10356 msgid ""
10357 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10358 "systems)  is to impose no limitation on allocations.  See the description of "
10359 "B<SHMALL> for a discussion of why this default value (rather than "
10360 "B<ULONG_MAX>)  is used."
10361 msgstr ""
10362 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10363 "ステムにも 64 ビットシステムにも適したものになっている)。 (B<ULONG_MAX> では"
10364 "なく) このデフォルト値が使われている理由については B<SHMALL> の説明を参照。"
10365
10366 #. type: Plain text
10367 #: build/C/man2/shmget.2:343
10368 msgid ""
10369 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10370 "0x2000000 (32MB)."
10371 msgstr ""
10372 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10373 "(32MB) であった。"
10374
10375 #. type: Plain text
10376 #: build/C/man2/shmget.2:349
10377 msgid ""
10378 "Because it is not possible to map just part of a shared memory segment, the "
10379 "amount of virtual memory places another limit on the maximum size of a "
10380 "usable segment: for example, on i386 the largest segments that can be mapped "
10381 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10382 msgstr ""
10383 "共有メモリセグメントの一部分だけをマッピングすることはできないので、 使用可能"
10384 "なセグメントの最大サイズには仮想メモリの総量という別の上限が適用される。 例え"
10385 "ば、i386 ではマッピング可能な最大セグメントの大きさはおおよそ 2.8GB で、 "
10386 "x86_64 では上限はおおよそ 127TB である。"
10387
10388 #. type: TP
10389 #: build/C/man2/shmget.2:349
10390 #, no-wrap
10391 msgid "B<SHMMIN>"
10392 msgstr "B<SHMMIN>"
10393
10394 #. type: Plain text
10395 #: build/C/man2/shmget.2:355
10396 msgid ""
10397 "Minimum size in bytes for a shared memory segment: implementation dependent "
10398 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10399 msgstr ""
10400 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10401 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10402
10403 #. type: TP
10404 #: build/C/man2/shmget.2:355
10405 #, no-wrap
10406 msgid "B<SHMMNI>"
10407 msgstr "B<SHMMNI>"
10408
10409 #. type: Plain text
10410 #: build/C/man2/shmget.2:360
10411 msgid ""
10412 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10413 "the default value for this limit was 128; since Linux 2.4, the default value "
10414 "is 4096."
10415 msgstr ""
10416 "システム全体の共有メモリ・セグメント数の上限値。 この上限値のデフォルトは、 "
10417 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10418
10419 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10420 #.  that we could create one more segment than SHMMNI -- MTK
10421 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10422 #. type: Plain text
10423 #: build/C/man2/shmget.2:366
10424 msgid ""
10425 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10426 msgstr ""
10427 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10428 "たりできる。"
10429
10430 #. type: Plain text
10431 #: build/C/man2/shmget.2:370
10432 msgid ""
10433 "The implementation has no specific limits for the per-process maximum number "
10434 "of shared memory segments (B<SHMSEG>)."
10435 msgstr ""
10436 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10437 "上の制限はない。"
10438
10439 #. type: Plain text
10440 #: build/C/man2/shmget.2:376
10441 msgid ""
10442 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10443 "shared memory segment scheduled for deletion."
10444 msgstr ""
10445 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10446 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10447
10448 #. type: Plain text
10449 #: build/C/man2/shmget.2:382
10450 msgid ""
10451 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10452 "more clearly show its function."
10453 msgstr ""
10454 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10455 "より明確にその機能を表しているだろう。"
10456
10457 #. type: Plain text
10458 #: build/C/man2/shmget.2:391
10459 msgid ""
10460 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10461 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10462 msgstr ""
10463 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10464 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10465
10466 #. type: TH
10467 #: build/C/man2/shmop.2:41
10468 #, no-wrap
10469 msgid "SHMOP"
10470 msgstr "SHMOP"
10471
10472 #. type: Plain text
10473 #: build/C/man2/shmop.2:44
10474 msgid "shmat, shmdt - System V shared memory operations"
10475 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10476
10477 #. type: Plain text
10478 #: build/C/man2/shmop.2:48
10479 #, no-wrap
10480 msgid ""
10481 "B<#include E<lt>sys/types.hE<gt>>\n"
10482 "B<#include E<lt>sys/shm.hE<gt>>\n"
10483 msgstr ""
10484 "B<#include E<lt>sys/types.hE<gt>>\n"
10485 "B<#include E<lt>sys/shm.hE<gt>>\n"
10486
10487 #. type: Plain text
10488 #: build/C/man2/shmop.2:50
10489 #, no-wrap
10490 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10491 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10492
10493 #. type: Plain text
10494 #: build/C/man2/shmop.2:52
10495 #, no-wrap
10496 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10497 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10498
10499 #. type: SS
10500 #: build/C/man2/shmop.2:54
10501 #, no-wrap
10502 msgid "shmat()"
10503 msgstr "shmat()"
10504
10505 #. type: Plain text
10506 #: build/C/man2/shmop.2:62
10507 msgid ""
10508 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10509 "I<shmid> to the address space of the calling process.  The attaching address "
10510 "is specified by I<shmaddr> with one of the following criteria:"
10511 msgstr ""
10512 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリ・セグメント "
10513 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10514 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10515
10516 #. type: Plain text
10517 #: build/C/man2/shmop.2:68
10518 msgid ""
10519 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10520 "which to attach the segment."
10521 msgstr ""
10522 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10523 "されていない) アドレスを選択する。"
10524
10525 #. type: Plain text
10526 #: build/C/man2/shmop.2:80
10527 msgid ""
10528 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10529 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10530 "multiple of B<SHMLBA>."
10531 msgstr ""
10532 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10533 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10534 "スへ付加する。"
10535
10536 #. type: Plain text
10537 #: build/C/man2/shmop.2:84
10538 msgid ""
10539 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10540 "occurs."
10541 msgstr ""
10542 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10543 "要がある。"
10544
10545 #. type: Plain text
10546 #: build/C/man2/shmop.2:90
10547 msgid ""
10548 "In addition to B<SHM_RND>, the following flags may be specified in the "
10549 "I<shmflg> bit-mask argument:"
10550 msgstr ""
10551 "B<SHM_RND> に加えて、以下のフラグを I<shmflg> ビットマスク引き数に指定でき"
10552 "る。"
10553
10554 #. type: TP
10555 #: build/C/man2/shmop.2:90
10556 #, no-wrap
10557 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10558 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10559
10560 #. type: Plain text
10561 #: build/C/man2/shmop.2:94
10562 msgid ""
10563 "Allow the contents of the segment to be executed.  The caller must have "
10564 "execute permission on the segment."
10565 msgstr ""
10566 "セグメントの内容を実行できる。 呼び出し元はセグメントに対する実行許可を持って"
10567 "いなければならない。"
10568
10569 #. type: TP
10570 #: build/C/man2/shmop.2:94
10571 #, no-wrap
10572 msgid "B<SHM_RDONLY>"
10573 msgstr "B<SHM_RDONLY>"
10574
10575 #. type: Plain text
10576 #: build/C/man2/shmop.2:102
10577 msgid ""
10578 "Attach the segment for read-only access.  The process must have read "
10579 "permission for the segment.  If this flag is not specified, the segment is "
10580 "attached for read and write access, and the process must have read and write "
10581 "permission for the segment.  There is no notion of a write-only shared "
10582 "memory segment."
10583 msgstr ""
10584 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10585 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10586 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10587 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリ・セ"
10588 "グメントという概念は存在しない。"
10589
10590 #. type: TP
10591 #: build/C/man2/shmop.2:102
10592 #, no-wrap
10593 msgid "B<SHM_REMAP> (Linux-specific)"
10594 msgstr "B<SHM_REMAP> (Linux 固有)"
10595
10596 #. type: Plain text
10597 #: build/C/man2/shmop.2:115
10598 msgid ""
10599 "This flag specifies that the mapping of the segment should replace any "
10600 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10601 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10602 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10603 "must not be NULL."
10604 msgstr ""
10605 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10606 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10607 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10608 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10609
10610 #. type: Plain text
10611 #: build/C/man2/shmop.2:122
10612 msgid ""
10613 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10614 "The segment will automatically be detached at process exit.  The same "
10615 "segment may be attached as a read and as a read-write one, and more than "
10616 "once, in the process's address space."
10617 msgstr ""
10618 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10619 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10620 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10621 "複数回付加することもできる。"
10622
10623 #. type: Plain text
10624 #: build/C/man2/shmop.2:130
10625 msgid ""
10626 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10627 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10628 "follows:"
10629 msgstr ""
10630 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10631 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10632
10633 #. type: Plain text
10634 #: build/C/man2/shmop.2:133
10635 msgid "I<shm_atime> is set to the current time."
10636 msgstr "I<shm_atime> には現在の時刻を設定する。"
10637
10638 #. type: Plain text
10639 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10640 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10641 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10642
10643 #. type: Plain text
10644 #: build/C/man2/shmop.2:140
10645 msgid "I<shm_nattch> is incremented by one."
10646 msgstr "I<shm_nattch> を 1 増加させる。"
10647
10648 #. type: SS
10649 #: build/C/man2/shmop.2:140
10650 #, no-wrap
10651 msgid "shmdt()"
10652 msgstr "shmdt()"
10653
10654 #. type: Plain text
10655 #: build/C/man2/shmop.2:151
10656 msgid ""
10657 "B<shmdt>()  detaches the shared memory segment located at the address "
10658 "specified by I<shmaddr> from the address space of the calling process.  The "
10659 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10660 "the value returned by the attaching B<shmat>()  call."
10661 msgstr ""
10662 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10663 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10664 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10665 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10666 "ない。"
10667
10668 #. type: Plain text
10669 #: build/C/man2/shmop.2:157
10670 msgid ""
10671 "On a successful B<shmdt>()  call, the system updates the members of the "
10672 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10673 msgstr ""
10674 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10675 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10676
10677 #. type: Plain text
10678 #: build/C/man2/shmop.2:160
10679 msgid "I<shm_dtime> is set to the current time."
10680 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10681
10682 #. type: Plain text
10683 #: build/C/man2/shmop.2:168
10684 msgid ""
10685 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10686 "marked for deletion, the segment is deleted."
10687 msgstr ""
10688 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10689 "セグメントは削除される。"
10690
10691 #. type: Plain text
10692 #: build/C/man2/shmop.2:176
10693 msgid ""
10694 "On success, B<shmat>()  returns the address of the attached shared memory "
10695 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10696 "indicate the cause of the error."
10697 msgstr ""
10698 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10699 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10700 "値を設定する。"
10701
10702 #. type: Plain text
10703 #: build/C/man2/shmop.2:182
10704 msgid ""
10705 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10706 "set to indicate the cause of the error."
10707 msgstr ""
10708 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10709 "ラーの原因を示す値を設定する。"
10710
10711 #. type: Plain text
10712 #: build/C/man2/shmop.2:188
10713 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10714 msgstr ""
10715 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10716
10717 #. type: Plain text
10718 #: build/C/man2/shmop.2:194
10719 msgid ""
10720 "The calling process does not have the required permissions for the requested "
10721 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10722 msgstr ""
10723 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10724 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10725
10726 #. type: Plain text
10727 #: build/C/man2/shmop.2:211
10728 msgid ""
10729 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10730 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10731 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10732 msgstr ""
10733 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10734 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10735 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10736 "れているが、 I<shmaddr> が NULL であった。"
10737
10738 #. type: Plain text
10739 #: build/C/man2/shmop.2:214
10740 msgid "Could not allocate memory for the descriptor or for the page tables."
10741 msgstr ""
10742 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10743 "とができない。"
10744
10745 #. type: Plain text
10746 #: build/C/man2/shmop.2:220
10747 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10748 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10749
10750 #.  The following since 2.6.17-rc1:
10751 #. type: Plain text
10752 #: build/C/man2/shmop.2:228
10753 msgid ""
10754 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10755 "not aligned on a page boundary."
10756 msgstr ""
10757 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10758 "I<shmaddr> がページ境界に合っていない。"
10759
10760 #. type: Plain text
10761 #: build/C/man2/shmop.2:243
10762 msgid ""
10763 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10764 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10765 "B<shmat>()  from I<char\\ *> into I<void\\ *>."
10766 msgstr ""
10767 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10768 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10769 "\\ *> に変更された。"
10770
10771 #. type: Plain text
10772 #: build/C/man2/shmop.2:248
10773 msgid ""
10774 "After a B<fork>(2), the child inherits the attached shared memory segments."
10775 msgstr ""
10776 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10777
10778 #. type: Plain text
10779 #: build/C/man2/shmop.2:252
10780 msgid ""
10781 "After an B<execve>(2), all attached shared memory segments are detached from "
10782 "the process."
10783 msgstr ""
10784 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10785 "される。"
10786
10787 #. type: Plain text
10788 #: build/C/man2/shmop.2:256
10789 msgid ""
10790 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10791 "process."
10792 msgstr ""
10793 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10794 "離される。"
10795
10796 #. type: Plain text
10797 #: build/C/man2/shmop.2:268
10798 msgid ""
10799 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10800 "way of attaching a shared memory segment.  Be aware that the shared memory "
10801 "segment attached in this way may be attached at different addresses in "
10802 "different processes.  Therefore, any pointers maintained within the shared "
10803 "memory must be made relative (typically to the starting address of the "
10804 "segment), rather than absolute."
10805 msgstr ""
10806 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10807 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10808 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10809 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10810 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10811 "る。"
10812
10813 #. type: Plain text
10814 #: build/C/man2/shmop.2:273
10815 msgid ""
10816 "On Linux, it is possible to attach a shared memory segment even if it is "
10817 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10818 "behavior and many other implementations do not support it."
10819 msgstr ""
10820 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10821 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10822 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10823
10824 #. type: Plain text
10825 #: build/C/man2/shmop.2:276
10826 msgid "The following system parameter affects B<shmat>():"
10827 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10828
10829 #. type: TP
10830 #: build/C/man2/shmop.2:276
10831 #, no-wrap
10832 msgid "B<SHMLBA>"
10833 msgstr "B<SHMLBA>"
10834
10835 #. type: Plain text
10836 #: build/C/man2/shmop.2:289
10837 msgid ""
10838 "Segment low boundary address multiple.  When explicitly specifying an attach "
10839 "address in a call to B<shmat>(), the caller should ensure that the address "
10840 "is a multiple of this value.  This is necessary on some architectures, in "
10841 "order either to ensure good CPU cache performance or to ensure that "
10842 "different attaches of the same segment have consistent views within the CPU "
10843 "cache.  B<SHMLBA> is normally some multiple of the system page size (on many "
10844 "Linux architectures, it is the same as the system page size)."
10845 msgstr ""
10846 "セグメントの下限アドレス倍数 (Segment low boundary address multiple)。 "
10847 "B<shmat>() の呼び出しにおいて付加するアドレスを明示的に指定する際、 呼び出し"
10848 "元は指定するアドレスがこの値の倍数になるように保証しなければならない。 これは"
10849 "いくつかのアーキテクチャーでは必要なことで、 CPU キャッシュの性能を保証するた"
10850 "めであったり、 同じセグメントの別の付与を CPU キャッシュ内部で一貫して扱える"
10851 "ようにするためだったりする。 B<SHMLBA> は通常はシステムページサイズの倍数であ"
10852 "る (Linux の多くのアーキテクチャーではシステムページサイズと同じである)。"
10853
10854 #. type: Plain text
10855 #: build/C/man2/shmop.2:293
10856 msgid ""
10857 "The implementation places no intrinsic per-process limit on the number of "
10858 "shared memory segments (B<SHMSEG>)."
10859 msgstr ""
10860 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10861 "関する実装依存の制限はない。"
10862
10863 #. type: Plain text
10864 #: build/C/man2/shmop.2:301
10865 msgid ""
10866 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10867 "B<shm_overview>(7), B<svipc>(7)"
10868 msgstr ""
10869 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10870 "B<shm_overview>(7), B<svipc>(7)"
10871
10872 #. type: TH
10873 #: build/C/man2/subpage_prot.2:30
10874 #, no-wrap
10875 msgid "SUBPAGE_PROT"
10876 msgstr "SUBPAGE_PROT"
10877
10878 #. type: TH
10879 #: build/C/man2/subpage_prot.2:30
10880 #, no-wrap
10881 msgid "2012-07-13"
10882 msgstr "2012-07-13"
10883
10884 #. type: Plain text
10885 #: build/C/man2/subpage_prot.2:33
10886 msgid "subpage_prot - define a subpage protection for an address range"
10887 msgstr ""
10888
10889 #. type: Plain text
10890 #: build/C/man2/subpage_prot.2:37
10891 #, no-wrap
10892 msgid ""
10893 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10894 "B<                  uint32_t *>I<map>B<);>\n"
10895 msgstr ""
10896 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10897 "B<                  uint32_t *>I<map>B<);>\n"
10898
10899 #. type: Plain text
10900 #: build/C/man2/subpage_prot.2:41
10901 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10902 msgstr ""
10903 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10904 "を参照。"
10905
10906 #. type: Plain text
10907 #: build/C/man2/subpage_prot.2:47
10908 msgid ""
10909 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10910 "control the access permissions on individual 4kB subpages on systems "
10911 "configured with a page size of 64kB."
10912 msgstr ""
10913
10914 #. type: Plain text
10915 #: build/C/man2/subpage_prot.2:54
10916 msgid ""
10917 "The protection map is applied to the memory pages in the region starting at "
10918 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10919 "aligned to a 64-kB boundary."
10920 msgstr ""
10921
10922 #. type: Plain text
10923 #: build/C/man2/subpage_prot.2:66
10924 msgid ""
10925 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10926 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10927 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10928 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10929 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10930 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10931 msgstr ""
10932
10933 #. type: Plain text
10934 #: build/C/man2/subpage_prot.2:71
10935 msgid ""
10936 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10937 "specified below is returned."
10938 msgstr ""
10939
10940 #. type: Plain text
10941 #: build/C/man2/subpage_prot.2:77
10942 msgid "The buffer referred to by I<map> is not accessible."
10943 msgstr ""
10944
10945 #. type: Plain text
10946 #: build/C/man2/subpage_prot.2:87
10947 msgid ""
10948 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10949 "be aligned to a multiple of the system page size, and they must not refer to "
10950 "a region outside of the address space of the process or to a region that "
10951 "consists of huge pages."
10952 msgstr ""
10953
10954 #. type: Plain text
10955 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10956 msgid "Out of memory."
10957 msgstr "メモリ不足である。"
10958
10959 #. type: Plain text
10960 #: build/C/man2/subpage_prot.2:96
10961 msgid ""
10962 "This system call is provided on the PowerPC architecture since Linux "
10963 "2.6.25.  The system call is provided only if the kernel is configured with "
10964 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10965 msgstr ""
10966
10967 #. type: Plain text
10968 #: build/C/man2/subpage_prot.2:101
10969 msgid ""
10970 "Glibc does not provide a wrapper for this system call; call it using "
10971 "B<syscall>(2)."
10972 msgstr ""
10973
10974 #. type: Plain text
10975 #: build/C/man2/subpage_prot.2:106
10976 msgid ""
10977 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10978 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10979 "field won't allow writes to a page that is otherwise write-protected."
10980 msgstr ""
10981
10982 #. type: SS
10983 #: build/C/man2/subpage_prot.2:106
10984 #, no-wrap
10985 msgid "Rationale"
10986 msgstr ""
10987
10988 #.  In the initial implementation, it was the case that:
10989 #.      In fact the whole process is switched to use 4k hardware pages when the
10990 #.      subpage_prot system call is used, but this could be improved in future
10991 #.      to switch only the affected segments.
10992 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10993 #.  the affected segment, not the whole process.
10994 #. type: Plain text
10995 #: build/C/man2/subpage_prot.2:128
10996 msgid ""
10997 "This system call is provided to assist writing emulators that operate using "
10998 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10999 "uses a smaller page size, the emulator can no longer use the memory-"
11000 "management unit (MMU)  and normal system calls for controlling page "
11001 "protections.  (The emulator could emulate the MMU by checking and possibly "
11002 "remapping the address for each memory access in software, but that is "
11003 "slow.)  The idea is that the emulator supplies an array of protection masks "
11004 "to apply to a specified range of virtual addresses.  These masks are applied "
11005 "at the level where hardware page-table entries (PTEs)  are inserted into the "
11006 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
11007 "affected.  Implicit in this is that the regions of the address space that "
11008 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
11009 "hardware pages (on machines with hardware 64-kB page support)."
11010 msgstr ""
11011
11012 #. type: Plain text
11013 #: build/C/man2/subpage_prot.2:131
11014 msgid "B<mprotect>(2), B<syscall>(2)"
11015 msgstr "B<mprotect>(2), B<syscall>(2)"
11016
11017 #. type: Plain text
11018 #: build/C/man2/subpage_prot.2:134
11019 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
11020 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
11021
11022 #. type: TH
11023 #: build/C/man2/sync_file_range.2:30
11024 #, no-wrap
11025 msgid "SYNC_FILE_RANGE"
11026 msgstr "SYNC_FILE_RANGE"
11027
11028 #. type: TH
11029 #: build/C/man2/sync_file_range.2:30
11030 #, no-wrap
11031 msgid "2014-08-19"
11032 msgstr "2014-08-19"
11033
11034 #. type: Plain text
11035 #: build/C/man2/sync_file_range.2:33
11036 msgid "sync_file_range - sync a file segment with disk"
11037 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
11038
11039 #. type: Plain text
11040 #: build/C/man2/sync_file_range.2:37
11041 #, no-wrap
11042 msgid ""
11043 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
11044 "B<#include E<lt>fcntl.hE<gt>>\n"
11045 msgstr ""
11046 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
11047 "B<#include E<lt>fcntl.hE<gt>>\n"
11048
11049 #. type: Plain text
11050 #: build/C/man2/sync_file_range.2:40
11051 #, no-wrap
11052 msgid ""
11053 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11054 "B<                    unsigned int >I<flags>B<);>\n"
11055 msgstr ""
11056 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11057 "B<                    unsigned int >I<flags>B<);>\n"
11058
11059 #. type: Plain text
11060 #: build/C/man2/sync_file_range.2:47
11061 msgid ""
11062 "B<sync_file_range>()  permits fine control when synchronizing the open file "
11063 "referred to by the file descriptor I<fd> with disk."
11064 msgstr ""
11065 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
11066 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
11067
11068 #. type: Plain text
11069 #: build/C/man2/sync_file_range.2:61
11070 msgid ""
11071 "I<offset> is the starting byte of the file range to be synchronized.  "
11072 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11073 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11074 "are synchronized.  Synchronization is in units of the system page size: "
11075 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11076 "rounded up to a page boundary."
11077 msgstr ""
11078 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11079 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11080 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11081 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11082 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11083
11084 #. type: Plain text
11085 #: build/C/man2/sync_file_range.2:65
11086 msgid "The I<flags> bit-mask argument can include any of the following values:"
11087 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11088
11089 #. type: TP
11090 #: build/C/man2/sync_file_range.2:65
11091 #, no-wrap
11092 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11093 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11094
11095 #. type: Plain text
11096 #: build/C/man2/sync_file_range.2:70
11097 msgid ""
11098 "Wait upon write-out of all pages in the specified range that have already "
11099 "been submitted to the device driver for write-out before performing any "
11100 "write."
11101 msgstr ""
11102 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11103 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11104 "つ。"
11105
11106 #. type: TP
11107 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11108 #, no-wrap
11109 msgid "B<SYNC_FILE_RANGE_WRITE>"
11110 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11111
11112 #. type: Plain text
11113 #: build/C/man2/sync_file_range.2:76
11114 msgid ""
11115 "Initiate write-out of all dirty pages in the specified range which are not "
11116 "presently submitted write-out.  Note that even this may block if you attempt "
11117 "to write more than request queue size."
11118 msgstr ""
11119 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11120 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11121 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11122 "る点に注意すること。"
11123
11124 #. type: TP
11125 #: build/C/man2/sync_file_range.2:76
11126 #, no-wrap
11127 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11128 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11129
11130 #. type: Plain text
11131 #: build/C/man2/sync_file_range.2:80
11132 msgid ""
11133 "Wait upon write-out of all pages in the range after performing any write."
11134 msgstr ""
11135 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11136 "つ。"
11137
11138 #. type: Plain text
11139 #: build/C/man2/sync_file_range.2:84
11140 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11141 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11142
11143 #. type: SS
11144 #: build/C/man2/sync_file_range.2:84
11145 #, no-wrap
11146 msgid "Warning"
11147 msgstr "警告"
11148
11149 #. type: Plain text
11150 #: build/C/man2/sync_file_range.2:100
11151 msgid ""
11152 "This system call is extremely dangerous and should not be used in portable "
11153 "programs.  None of these operations writes out the file's metadata.  "
11154 "Therefore, unless the application is strictly performing overwrites of "
11155 "already-instantiated disk blocks, there are no guarantees that the data will "
11156 "be available after a crash.  There is no user interface to know if a write "
11157 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11158 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11159 "writing into preallocated space, many filesystems also require calls into "
11160 "the block allocator, which this system call does not sync out to disk.  This "
11161 "system call does not flush disk write caches and thus does not provide any "
11162 "data integrity on systems with volatile disk write caches."
11163 msgstr ""
11164 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11165 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11166 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11167 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11168 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
11169 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11170 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11171 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11172 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11173 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11174 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11175 "コールではデータの一貫性を確保できないことになる。"
11176
11177 #. type: SS
11178 #: build/C/man2/sync_file_range.2:100
11179 #, no-wrap
11180 msgid "Some details"
11181 msgstr "詳細"
11182
11183 #. type: Plain text
11184 #: build/C/man2/sync_file_range.2:108
11185 msgid ""
11186 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11187 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11188 msgstr ""
11189 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11190 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11191
11192 #. type: Plain text
11193 #: build/C/man2/sync_file_range.2:112
11194 msgid "Useful combinations of the I<flags> bits are:"
11195 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11196
11197 #. type: TP
11198 #: build/C/man2/sync_file_range.2:112
11199 #, no-wrap
11200 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11201 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11202
11203 #. type: Plain text
11204 #: build/C/man2/sync_file_range.2:120
11205 msgid ""
11206 "Ensures that all pages in the specified range which were dirty when "
11207 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11208 "start-write-for-data-integrity operation."
11209 msgstr ""
11210 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11211 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11212 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11213 "ある。"
11214
11215 #. type: Plain text
11216 #: build/C/man2/sync_file_range.2:127
11217 msgid ""
11218 "Start write-out of all dirty pages in the specified range which are not "
11219 "presently under write-out.  This is an asynchronous flush-to-disk "
11220 "operation.  This is not suitable for data integrity operations."
11221 msgstr ""
11222 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11223 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11224 "る。データ完全性確保が必要な操作としては適切ではない。"
11225
11226 #. type: TP
11227 #: build/C/man2/sync_file_range.2:127
11228 #, no-wrap
11229 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11230 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11231
11232 #. type: Plain text
11233 #: build/C/man2/sync_file_range.2:134
11234 msgid ""
11235 "Wait for completion of write-out of all pages in the specified range.  This "
11236 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11237 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11238 "and obtain its result."
11239 msgstr ""
11240 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11241 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11242 "き、この操作の完了を待ち、結果を取得することができる。"
11243
11244 #. type: TP
11245 #: build/C/man2/sync_file_range.2:134
11246 #, no-wrap
11247 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11248 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11249
11250 #. type: Plain text
11251 #: build/C/man2/sync_file_range.2:141
11252 msgid ""
11253 "This is a write-for-data-integrity operation that will ensure that all pages "
11254 "in the specified range which were dirty when B<sync_file_range>()  was "
11255 "called are committed to disk."
11256 msgstr ""
11257 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11258 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11259 "のページが ディスクに格納されることが保証される。"
11260
11261 #. type: Plain text
11262 #: build/C/man2/sync_file_range.2:147
11263 msgid ""
11264 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11265 "I<errno> is set to indicate the error."
11266 msgstr ""
11267 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11268 "I<errno> にエラーを示す値を設定する。"
11269
11270 #. type: Plain text
11271 #: build/C/man2/sync_file_range.2:152
11272 msgid "I<fd> is not a valid file descriptor."
11273 msgstr "I<fd> が有効なファイルディスクリプタではない。"
11274
11275 #. type: Plain text
11276 #: build/C/man2/sync_file_range.2:160
11277 msgid ""
11278 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11279 msgstr ""
11280 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11281 "である。"
11282
11283 #. type: Plain text
11284 #: build/C/man2/sync_file_range.2:163
11285 msgid "I/O error."
11286 msgstr "I/O エラー。"
11287
11288 #. type: Plain text
11289 #: build/C/man2/sync_file_range.2:169
11290 msgid "Out of disk space."
11291 msgstr "ディスク領域不足である。"
11292
11293 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11294 #.  (In user space at least) it isn't possible to obtain a file descriptor
11295 #.  for a symbolic link.
11296 #. type: Plain text
11297 #: build/C/man2/sync_file_range.2:177
11298 msgid ""
11299 "I<fd> refers to something other than a regular file, a block device, a "
11300 "directory, or a symbolic link."
11301 msgstr ""
11302 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11303 "以外のものを指している。"
11304
11305 #. type: Plain text
11306 #: build/C/man2/sync_file_range.2:180
11307 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11308 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11309
11310 #. type: Plain text
11311 #: build/C/man2/sync_file_range.2:183
11312 msgid ""
11313 "This system call is Linux-specific, and should be avoided in portable "
11314 "programs."
11315 msgstr ""
11316 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11317 "けるべきである。"
11318
11319 #. type: SS
11320 #: build/C/man2/sync_file_range.2:184
11321 #, no-wrap
11322 msgid "sync_file_range2()"
11323 msgstr "sync_file_range2()"
11324
11325 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11326 #. type: Plain text
11327 #: build/C/man2/sync_file_range.2:201
11328 msgid ""
11329 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11330 "in a suitable pair of registers.  On such architectures, the call signature "
11331 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11332 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11333 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11334 "different system call that orders the arguments suitably:"
11335 msgstr ""
11336 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
11337 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
11338 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
11339 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
11340 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
11341 "き数が適切な順序になった別のシステムコールが定義されている。"
11342
11343 #. type: Plain text
11344 #: build/C/man2/sync_file_range.2:206
11345 #, no-wrap
11346 msgid ""
11347 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11348 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11349 msgstr ""
11350 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11351 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11352
11353 #. type: Plain text
11354 #: build/C/man2/sync_file_range.2:211
11355 msgid ""
11356 "The behavior of this system call is otherwise exactly the same as "
11357 "B<sync_file_range>()."
11358 msgstr ""
11359 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11360 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11361 "glibc では提供されていない。"
11362
11363 #. type: Plain text
11364 #: build/C/man2/sync_file_range.2:222
11365 msgid ""
11366 "A system call with this signature first appeared on the ARM architecture in "
11367 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11368 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11369 "architectures where glibc support is provided, glibc transparently wraps "
11370 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11371 msgstr ""
11372 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
11373 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11374 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11375 "システムコールの名前が変更された。\n"
11376 "glibc によるサポートが提供されているアーキテクチャでは、\n"
11377 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11378 "B<sync_file_range2>() を適切に使用するようになっている。"
11379
11380 #. type: Plain text
11381 #: build/C/man2/sync_file_range.2:227
11382 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11383 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11384
11385 #. type: TH
11386 #: build/C/man2/memfd_create.2:21
11387 #, no-wrap
11388 msgid "MEMFD_CREATE"
11389 msgstr "MEMFD_CREATE"
11390
11391 #. type: Plain text
11392 #: build/C/man2/memfd_create.2:24
11393 msgid "memfd_create - create an anonymous file"
11394 msgstr "memfd_create - 無名ファイル (anonymous file) を作成する"
11395
11396 #. type: Plain text
11397 #: build/C/man2/memfd_create.2:26
11398 msgid "B<#include E<lt>sys/memfd.hE<gt>>"
11399 msgstr "B<#include E<lt>sys/memfd.hE<gt>>"
11400
11401 #. type: Plain text
11402 #: build/C/man2/memfd_create.2:28
11403 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11404 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11405
11406 #.  David Herrmann:
11407 #.      memfd uses VM_NORESERVE so each page is accounted on first access.
11408 #.      This means, the overcommit-limits (see __vm_enough_memory()) and the
11409 #.      memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
11410 #.      those are accounted on "current" and "current->mm", that is, the
11411 #.      process doing the first page access.
11412 #. type: Plain text
11413 #: build/C/man2/memfd_create.2:51
11414 msgid ""
11415 "B<memfd_create>()  creates an anonymous file and returns a file descriptor "
11416 "that refers to it.  The file behaves like a regular file, and so can be "
11417 "modified, truncated, memory-mapped, and so on.  However, unlike a regular "
11418 "file, it lives in RAM and has a volatile backing storage.  Once all "
11419 "references to the file are dropped, it is automatically released.  Anonymous "
11420 "memory is used for all backing pages of the file.  Therefore, files created "
11421 "by B<memfd_create>()  have the same semantics as other anonymous memory "
11422 "allocations such as those allocated using B<mmap>(2)  with the "
11423 "B<MAP_ANONYMOUS> flag."
11424 msgstr ""
11425 "B<memfd_create>() は、 無名ファイル (anonymous file) を作成し、 そのファイル"
11426 "を参照するファイルディスクリプターを返す。 このファイルは通常のファイルと同様"
11427 "に振る舞い、 変更、切り詰め (truncate)、 メモリーマップなどを行うことができ"
11428 "る。 しかし、 通常のファイルとは違い、 このファイルは RAM 上に置かれ、 格納さ"
11429 "れるストレージは揮発性である。 このファイルへの参照がすべてなくなると、 ファ"
11430 "イルは自動的に解放される。 このファイルが置かれるページには無名メモリー "
11431 "(anonymous memory) が使用される。 したがって、 B<memfd_create>() で作成された"
11432 "フィアルは、 他の無名メモリーの割り当て (B<MAP_ANONYMOUS> フラグ付きの "
11433 "B<mmap>(2) を使って割り当てられた無名メモリーなど) と同じ動作をする。"
11434
11435 #. type: Plain text
11436 #: build/C/man2/memfd_create.2:58
11437 msgid ""
11438 "The initial size of the file is set to 0.  Following the call, the file size "
11439 "should be set using B<ftruncate>(2).  (Alternatively, the file may be "
11440 "populated by calls to B<write>(2)  or similar.)"
11441 msgstr ""
11442 "ファイルの初期サイズは 0 に設定される。 呼び出しの後に、 B<ftruncate>(2) を"
11443 "使ってファイルサイズを設定すべきである (代わりに、 B<write>(2) や同様の関数を"
11444 "呼び出してファイルにデータを書き込むこともできる)。"
11445
11446 #. type: Plain text
11447 #: build/C/man2/memfd_create.2:69
11448 msgid ""
11449 "The name supplied in I<name> is used as a filename and will be displayed as "
11450 "the target of the corresponding symbolic link in the directory I</proc/self/"
11451 "fd/>.  The displayed name is always prefixed with I<memfd:> and serves only "
11452 "for debugging purposes.  Names do not affect the behavior of the file "
11453 "descriptor, and as such multiple files can have the same name without any "
11454 "side effects."
11455 msgstr ""
11456 "I<name> に指定された名前はファイル名として使用され、 ディレクトリ I</proc/"
11457 "self/fd/> で対応するシンボリックリンクのリンク先として表示される。 表示される"
11458 "名前の前には常に I<memfd:> が付き、 この名前はデバッグ用途としてのみ機能す"
11459 "る。 名前はファイルディスクリプターの動作には影響せず、 複数のファイルが同じ"
11460 "名前を持っても副作用はない。"
11461
11462 #. type: Plain text
11463 #: build/C/man2/memfd_create.2:74
11464 msgid ""
11465 "The following values may be bitwise ORed in I<flags> to change the behaviour "
11466 "of B<memfd_create>():"
11467 msgstr ""
11468 "以下の値をビット論理和で I<flags> に指定して、 B<memfd_create>() の動作を変更"
11469 "できる。"
11470
11471 #. type: TP
11472 #: build/C/man2/memfd_create.2:74
11473 #, no-wrap
11474 msgid "B<MFD_CLOEXEC>"
11475 msgstr "B<MFD_CLOEXEC>"
11476
11477 #. type: Plain text
11478 #: build/C/man2/memfd_create.2:84
11479 msgid ""
11480 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
11481 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
11482 "may be useful."
11483 msgstr ""
11484 "新しいファイルディスクリプターに close-on-exec (B<FD_CLOEXEC>) フラグをセット"
11485 "する。 これが有用な理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参"
11486 "照のこと。"
11487
11488 #. type: TP
11489 #: build/C/man2/memfd_create.2:84
11490 #, no-wrap
11491 msgid "B<MFD_ALLOW_SEALING>"
11492 msgstr "B<MFD_ALLOW_SEALING>"
11493
11494 #.  FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
11495 #.        Is it worth adding some text explaining this?
11496 #. type: Plain text
11497 #: build/C/man2/memfd_create.2:100
11498 msgid ""
11499 "Allow sealing operations on this file.  See the discussion of the "
11500 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
11501 "below.  The initial set of seals is empty.  If this flag is not set, the "
11502 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
11503 "be set on the file."
11504 msgstr ""
11505 "このファイルに対して sealing 操作を許可する。 B<fcntl>(2) の B<F_ADD_SEALS> "
11506 "と B<F_GET_SEALS> 操作の議論を参照。 下記の「注意」も参照。 初期の seal 集合"
11507 "は空となる。 このフラグを指定しなかった場合、 初期の seal 集合は "
11508 "B<F_SEAL_SEAL> となり、 これはこのファイルには他の seal をセットできないこと"
11509 "ということである。"
11510
11511 #. type: Plain text
11512 #: build/C/man2/memfd_create.2:104
11513 msgid "Unused bits in I<flags> must be 0."
11514 msgstr "I<flags> の未使用のビットは 0 でなければならない。"
11515
11516 #. type: Plain text
11517 #: build/C/man2/memfd_create.2:113
11518 msgid ""
11519 "As its return value, B<memfd_create>()  returns a new file descriptor that "
11520 "can be used to refer to the file.  This file descriptor is opened for both "
11521 "reading and writing (B<O_RDWR>)  and B<O_LARGEFILE> is set for the "
11522 "descriptor."
11523 msgstr ""
11524 "返り値として B<memfd_create>() は、 作成したファイルを参照するのに使用できる"
11525 "新しいファイルディスクリプターを返す。 このファイルディスクリプターは読み書き"
11526 "両用 (B<O_RDWR>) でオープンされ、 B<O_LARGEFILE> がこのファイルディスクリプ"
11527 "ターにセットされる。"
11528
11529 #. type: Plain text
11530 #: build/C/man2/memfd_create.2:126
11531 msgid ""
11532 "With respect to B<fork>(2)  and B<execve>(2), the usual semantics apply for "
11533 "the file descriptor created by B<memfd_create>().  A copy of the file "
11534 "descriptor is inherited by the child produced by B<fork>(2)  and refers to "
11535 "the same file.  The file descriptor is preserved across B<execve>(2), unless "
11536 "the close-on-exec flag has been set."
11537 msgstr ""
11538 "B<fork>(2) と B<execve>(2) に関しては、 B<memfd_create>() で作成したファイル"
11539 "ディスクリプターについても通常の動作が適用される。 ファイルディスクリプターの"
11540 "コピーは B<fork>(2) で生成される子プロセスに継承され、 同じファイルを参照す"
11541 "る。 close-on-exec フラグがセットされていない限り、 B<execve>(2) の前後でファ"
11542 "イルディスクリプターは保持される。"
11543
11544 #. type: Plain text
11545 #: build/C/man2/memfd_create.2:133
11546 msgid ""
11547 "On success, B<memfd_create>()  returns a new file descriptor.  On error, -1 "
11548 "is returned and I<errno> is set to indicate the error."
11549 msgstr ""
11550 "成功の場合、 B<memfd_create>() は新しいファイルディスクリプターを返す。 エ"
11551 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11552
11553 #. type: Plain text
11554 #: build/C/man2/memfd_create.2:139
11555 msgid "The address in I<name> points to invalid memory."
11556 msgstr "I<name> のアドレスが無効なメモリーを指している。"
11557
11558 #. type: Plain text
11559 #: build/C/man2/memfd_create.2:146
11560 msgid ""
11561 "An unsupported value was specified in one of the arguments: I<flags> "
11562 "included unknown bits, or I<name> was too long."
11563 msgstr ""
11564 "サポートされていない値がいずれかの引き数で指定された。 I<flags> に未知のビッ"
11565 "トが含まれていたか、 I<name> が長過ぎた。"
11566
11567 #. type: Plain text
11568 #: build/C/man2/memfd_create.2:149
11569 msgid "The per-process limit on open file descriptors has been reached."
11570 msgstr ""
11571 "オープンされているファイルディスクリプターのプロセス単位の上限に達した。"
11572
11573 #. type: Plain text
11574 #: build/C/man2/memfd_create.2:152
11575 msgid ""
11576 "The system-wide limit on the total number of open files has been reached."
11577 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
11578
11579 #. type: Plain text
11580 #: build/C/man2/memfd_create.2:155
11581 msgid "There was insufficient memory to create a new anonymous file."
11582 msgstr "新しい無名ファイルを作成するのに十分なメモリがなかった。"
11583
11584 #.  FIXME . When glibc support appears, update the following sentence:
11585 #. type: Plain text
11586 #: build/C/man2/memfd_create.2:161
11587 msgid ""
11588 "The B<memfd_create>()  system call first appeared in Linux 3.17.  Support in "
11589 "the GNU C library is pending."
11590 msgstr ""
11591 "B<memfd_create>() システムコールは Linux 3.17 で初めて登場した。 GNU C ライブ"
11592 "ラリでのサポートは検討中である。"
11593
11594 #. type: Plain text
11595 #: build/C/man2/memfd_create.2:165
11596 msgid "The B<memfd_create>()  system call is Linux-specific."
11597 msgstr "B<memfd_create>()  システムコールは Linux 固有である。"
11598
11599 #.  See also http://lwn.net/Articles/593918/
11600 #.  and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
11601 #. type: Plain text
11602 #: build/C/man2/memfd_create.2:178
11603 msgid ""
11604 "The B<memfd_create>()  system call provides a simple alternative to manually "
11605 "mounting a I<tmpfs> filesystem and creating and opening a file in that "
11606 "filesystem.  The primary purpose of B<memfd_create>()  is to create files "
11607 "and associated file descriptors that are used with the file-sealing APIs "
11608 "provided by B<fcntl>(2)."
11609 msgstr ""
11610 "B<memfd_create>() システムコールは、 手動で I<tmpfs> ファイルシステムをマウン"
11611 "トして、 そのファイルシステムにファイルをオープンするという操作の、 簡単な代"
11612 "替手段を提供している。 B<memfd_create>() の主な目的は、 B<fcntl>(2) が提供す"
11613 "る file-sealing API で使用できる、 ファイルとそれに関連付けられるファイルディ"
11614 "スクリプターを作成することである。"
11615
11616 #. type: Plain text
11617 #: build/C/man2/memfd_create.2:192
11618 msgid ""
11619 "The B<memfd_create>()  system call also has uses without file sealing (which "
11620 "is why file-sealing is disabled, unless explicitly requested with the "
11621 "B<MFD_ALLOW_SEALING> flag).  In particular, it can be used as an alternative "
11622 "to creating files in I<tmp> or as an alternative to using the B<open>(2)  "
11623 "B<O_TMPFILE> in cases where there is no intention to actually link the "
11624 "resulting file into the filesystem."
11625 msgstr ""
11626 "B<memfd_create>() システムコールは、 file sealing なしでも用途がある (これが"
11627 "明示的に B<MFD_ALLOW_SEALING> フラグが要求されない限り、 file-sealing が無効"
11628 "になる理由である)。 特に、 ファイルシステムに実際にファイルを残す意図がない場"
11629 "合、 I<tmp> にファイルを作成したり B<open>(2) B<O_TMPFILE> を使ったりする際の"
11630 "代替手段として使用できる。"
11631
11632 #. type: SS
11633 #: build/C/man2/memfd_create.2:192
11634 #, no-wrap
11635 msgid "File sealing"
11636 msgstr "file sealing"
11637
11638 #. type: Plain text
11639 #: build/C/man2/memfd_create.2:210
11640 msgid ""
11641 "In the absence of file sealing, processes that communicate via shared memory "
11642 "must either trust each other, or take measures to deal with the possibility "
11643 "that an untrusted peer may manipulate the shared memory region in "
11644 "problematic ways.  For example, an untrusted peer might modify the contents "
11645 "of the shared memory at any time, or shrink the shared memory region.  The "
11646 "former possibility leaves the local process vulnerable to time-of-check-to-"
11647 "time-of-use race conditions (typically dealt with by copying data from the "
11648 "shared memory region before checking and using it).  The latter possibility "
11649 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
11650 "made to access a now-nonexistent location in the shared memory region.  "
11651 "(Dealing with this possibility necessitates the use of a handler for the "
11652 "B<SIGBUS> signal.)"
11653 msgstr ""
11654 "file sealing がない場合、 共有メモリ経由で通信するプロセスは、 互いに信頼する"
11655 "か、 信頼していない相手が共有メモリ領域を問題がある方法で操作する可能性に対処"
11656 "するための対策を講じなければならない。\n"
11657 "例えば、 信頼していない相手は、 いつでも共有メモリの内容を変更したり、 共有メ"
11658 "モリ領域を縮小したりする可能性がある。 前者の場合は、 ローカルプロセスでは、 "
11659 "データの確認時点と使用時点の競合条件の問題が起こり得る (通常はこの問題への対"
11660 "処は共有メモリ領域からデータをこぴーしてからデータを確認、使用することであ"
11661 "る)。 後者の場合は、 ローカルプロセスでは、 共有メモリ領域の存在しなくなった"
11662 "場所にアクセスしようとした際にシグナル B<SIGBUS> が発生する可能性がある (この"
11663 "可能性に対処するにはシグナル B<SIGBUS> に対してハンドラーを使用する必要があ"
11664 "る)。"
11665
11666 #. type: Plain text
11667 #: build/C/man2/memfd_create.2:216
11668 msgid ""
11669 "Dealing with untrusted peers imposes extra complexity on code that employs "
11670 "shared memory.  Memory sealing enables that extra complexity to be "
11671 "eliminated, by allowing a process to operate secure in the knowledge that "
11672 "its peer can't modify the shared memory in an undesired fashion."
11673 msgstr ""
11674 "信頼していない相手への対処により、 共有メモリを利用するコードに余計な複雑性が"
11675 "増すことになる。 メモリー sealing により余計な複雑性をなくすことができる。 相"
11676 "手が望まない方法で共有メモリを変更できないことを知っていることで、 プロセスは"
11677 "安全に動作できるようになる。"
11678
11679 #. type: Plain text
11680 #: build/C/man2/memfd_create.2:218
11681 msgid "An example of the usage of the sealing mechanism is as follows:"
11682 msgstr "sealing 機構の使い方の例は以下のとおりである。"
11683
11684 #. type: Plain text
11685 #: build/C/man2/memfd_create.2:225
11686 msgid ""
11687 "The first process creates a I<tmpfs> file using B<memfd_create>().  The call "
11688 "yields a file descriptor used in subsequent steps."
11689 msgstr ""
11690 "最初のプロセスは B<memfd_create>() を使って I<tmpfs> ファイルを作成する。 "
11691 "B<memfd_create>() はこれ以降のステップで使用するファイルディスクリプターを返"
11692 "す。"
11693
11694 #. type: Plain text
11695 #: build/C/man2/memfd_create.2:232
11696 msgid ""
11697 "The first process sizes the file created in the previous step using "
11698 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
11699 "with the desired data."
11700 msgstr ""
11701 "最初のプロセスは B<ftruncate>(2) を使って直前のステップで作成したファイルのサ"
11702 "イズを変更し、 B<mmap>(2) を使ってそのファイルをマッピングし、 共有メモリに所"
11703 "望のデータを配置する。"
11704
11705 #. type: IP
11706 #: build/C/man2/memfd_create.2:232
11707 #, no-wrap
11708 msgid "3."
11709 msgstr "3."
11710
11711 #. type: Plain text
11712 #: build/C/man2/memfd_create.2:242
11713 msgid ""
11714 "The first process uses the B<fcntl>(2)  B<F_ADD_SEALS> operation to place "
11715 "one or more seals on the file, in order to restrict further modifications on "
11716 "the file.  (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
11717 "to first unmap the shared writable mapping created in the previous step.)"
11718 msgstr ""
11719 "最初のプロセスは、 このファイルに対する今後の変更を制限するために、 "
11720 "B<fcntl>(2) の B<F_ADD_SEALS> 操作を使って、 そのファイルに seal をいくつか設"
11721 "定する。 (seal B<F_SEAL_WRITE> を設定する場合、 直前のステップで作成した書き"
11722 "込み可能な共有マッピングをまずアンマップする必要が出てくる。)"
11723
11724 #. type: IP
11725 #: build/C/man2/memfd_create.2:242
11726 #, no-wrap
11727 msgid "4."
11728 msgstr "4."
11729
11730 #. type: Plain text
11731 #: build/C/man2/memfd_create.2:247
11732 msgid ""
11733 "A second process obtains a file descriptor for the I<tmpfs> file and maps "
11734 "it.  Among the possible ways in which this could happen are the following:"
11735 msgstr ""
11736 "二つ目のプロセスは I<tmpfs> ファイルのファイルディスクリプターを入手し、 その"
11737 "ファイルをマップする。 以下に示す方法を使用することができる。"
11738
11739 #. type: Plain text
11740 #: build/C/man2/memfd_create.2:258
11741 msgid ""
11742 "The process that called B<memfd_create>()  could transfer the resulting file "
11743 "descriptor to the second process via a UNIX domain socket (see B<unix>(7)  "
11744 "and B<cmsg>(3)).  The second process then maps the file using B<mmap>(2)."
11745 msgstr ""
11746 "B<memfd_create>() を呼び出したプロセスは、 得られたファイルディスクリプターを"
11747 "二つ目のプロセスに UNIX ドメインソケット経由で渡すことができる (B<unix>(7) "
11748 "と B<cmsg>(3) を参照)。 それから、二つ目のプロセスは B<mmap>(2) を使ってファ"
11749 "イルをマップする。"
11750
11751 #. type: Plain text
11752 #: build/C/man2/memfd_create.2:266
11753 msgid ""
11754 "The second process is created via B<fork>(2)  and thus automatically "
11755 "inherits the file descriptor and mapping.  (Note that in this case and the "
11756 "next, there is a natural trust relationship between the two processes, since "
11757 "they are running under the same user ID.  Therefore, file sealing would not "
11758 "normally be necessary.)"
11759 msgstr ""
11760 "二つ目のプロセスを B<fork>(2) を使って作成する。 そうすると、 自動的にファイ"
11761 "ルディスクリプターとマッピングが継承される。 (この方法と次の方法では、 二つの"
11762 "プロセス間で自然な信頼関係が存在することになる。 なぜなら、 二つのプロセスは"
11763 "同じユーザー ID。 の元で実行されているからである。 したがって、 file sealing "
11764 "は通常は不要であろう。)"
11765
11766 #. type: Plain text
11767 #: build/C/man2/memfd_create.2:280
11768 msgid ""
11769 "The second process opens the file I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>>, "
11770 "where I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
11771 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
11772 "returned by the call to B<memfd_create>()  in that process.  The second "
11773 "process then maps the file using B<mmap>(2)."
11774 msgstr ""
11775 "二つ目のプロセスは I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>> をオープンする。 "
11776 "I<E<lt>pidE<gt>> は最初のプロセス (B<memfd_create>() を呼び出したプロセス) "
11777 "の PID で、 I<E<lt>fdE<gt>> は最初のプロセスでの B<memfd_create>() の呼び出し"
11778 "で返されたファイルディスクリプター番号である。 それからこのファイルを "
11779 "B<mmap>(2) を使ってマッピングする。"
11780
11781 #. type: IP
11782 #: build/C/man2/memfd_create.2:281
11783 #, no-wrap
11784 msgid "5."
11785 msgstr "5."
11786
11787 #. type: Plain text
11788 #: build/C/man2/memfd_create.2:293
11789 msgid ""
11790 "The second process uses the B<fcntl>(2)  B<F_GET_SEALS> operation to "
11791 "retrieve the bit mask of seals that has been applied to the file.  This bit "
11792 "mask can be inspected in order to determine what kinds of restrictions have "
11793 "been placed on file modifications.  If desired, the second process can apply "
11794 "further seals to impose additional restrictions (so long as the "
11795 "B<F_SEAL_SEAL> seal has not yet been applied)."
11796 msgstr ""
11797 "二つ目のプロセスは B<fcntl>(2) の B<F_GET_SEALS> 操作を使って、 そのファイル"
11798 "に適用されている seal のビットマスクを取得する。 このビットマスクを調べて、 "
11799 "ファイルの変更に関してどのような制限が適用されているかを知ることができる。 "
11800 "(B<F_SEAL_SEAL> seal がそれまでに適用されていない限りは) 必要であれば、 二つ"
11801 "目のプロセスはさらに seal を設定して追加の制限をかけることができる。"
11802
11803 #. type: Plain text
11804 #: build/C/man2/memfd_create.2:297
11805 msgid ""
11806 "Below are shown two example programs that demonstrate the use of "
11807 "B<memfd_create>()  and the file sealing API."
11808 msgstr ""
11809 "以下では B<memfd_create>() と file sealing API の使用例を示すサンプルプログラ"
11810 "ムを 2 つとりあげる。"
11811
11812 #. type: Plain text
11813 #: build/C/man2/memfd_create.2:312
11814 msgid ""
11815 "The first program, I<t_memfd_create.c>, creates a I<tmpfs> file using "
11816 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
11817 "optionally places some seals on the file.  The program accepts up to three "
11818 "command-line arguments, of which the first two are required.  The first "
11819 "argument is the name to associate with the file, the second argument is the "
11820 "size to be set for the file, and the optional third is a string of "
11821 "characters that specify seals to be set on file."
11822 msgstr ""
11823 "最初のプログラム I<t_memfd_create.c> は、 B<memfd_create>() を使って "
11824 "I<tmpfs> ファイルを作成し、 そのファイルのサイズを設定し、 メモリにマッピング"
11825 "し、 要求された場合にはそのファイルに seal を設定する。 このプログラムは最大"
11826 "で 3 つのコマンドライン引き数を取り、 最初の 2 つは必須である。 最初の引き数"
11827 "はファイルに関連付けられる名前で、 2 番目の引き数はファイルに設定されるサイズ"
11828 "である。 省略可能な 3 番目の引き数は、 このファイルに設定する seal を指定する"
11829 "文字列である。"
11830
11831 #. type: Plain text
11832 #: build/C/man2/memfd_create.2:318
11833 msgid ""
11834 "The second program, I<t_get_seals.c>, can be used to open an existing file "
11835 "that was created via B<memfd_create>()  and inspect the set of seals that "
11836 "have been applied to that file."
11837 msgstr ""
11838 "2 つめのプログラム I<t_get_seals.c> を使うと、 B<memfd_create>() を使って作成"
11839 "された既存のファイルをオープンし、 そのファイルに適用されている seal の集合を"
11840 "調査できる。"
11841
11842 #. type: Plain text
11843 #: build/C/man2/memfd_create.2:323
11844 msgid ""
11845 "The following shell session demonstrates the use of these programs.  First "
11846 "we create a I<tmpfs> file and set some seals on it:"
11847 msgstr ""
11848 "以下のシェルのセッションはこれらのプログラムの使用例を示したものである。 ま"
11849 "ず I<tmpfs> ファイルを作成し、そのファイルに seal をいくつか設定している。"
11850
11851 #. type: Plain text
11852 #: build/C/man2/memfd_create.2:329
11853 #, no-wrap
11854 msgid ""
11855 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11856 "[1] 11775\n"
11857 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11858 msgstr ""
11859 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11860 "[1] 11775\n"
11861 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11862
11863 #. type: Plain text
11864 #: build/C/man2/memfd_create.2:347
11865 msgid ""
11866 "At this point, the I<t_memfd_create> program continues to run in the "
11867 "background.  From another program, we can obtain a file descriptor for the "
11868 "file created by B<memfd_create>()  by opening the I</proc/PID/fd> file that "
11869 "corresponds to the descriptor opened by B<memfd_create>().  Using that "
11870 "pathname, we inspect the content of the I</proc/PID/fd> symbolic link, and "
11871 "use our I<t_get_seals> program to view the seals that have been placed on "
11872 "the file:"
11873 msgstr ""
11874 "この時点では、 I<t_memfd_create> プログラムはバックグラウンドで動作し続け"
11875 "る。 もう一つのプログラムから、 B<memfd_create>() がオープンしたディスクリプ"
11876 "ターに対応する I</proc/PID/fd> ファイルをオープンすることで、 "
11877 "B<memfd_create>() で作成されたファイルのファイルディスクリプターを取得でき"
11878 "る。\n"
11879 "そのパス名を使って、 I</proc/PID/fd> シンボリックリンクの内容を調査し、 "
11880 "I<t_get_seals> プログラムを使ってそのファイルに設定されている seal を見ること"
11881 "ができる。"
11882
11883 #. type: Plain text
11884 #: build/C/man2/memfd_create.2:354
11885 #, no-wrap
11886 msgid ""
11887 "$ B<readlink /proc/11775/fd/3>\n"
11888 "/memfd:my_memfd_file (deleted)\n"
11889 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11890 "Existing seals: WRITE SHRINK\n"
11891 msgstr ""
11892 "$ B<readlink /proc/11775/fd/3>\n"
11893 "/memfd:my_memfd_file (deleted)\n"
11894 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11895 "Existing seals: WRITE SHRINK\n"
11896
11897 #. type: SS
11898 #: build/C/man2/memfd_create.2:356
11899 #, no-wrap
11900 msgid "Program source: t_memfd_create.c"
11901 msgstr "プログラムのソース: t_memfd_create.c"
11902
11903 #. type: Plain text
11904 #: build/C/man2/memfd_create.2:365
11905 #, no-wrap
11906 msgid ""
11907 "#include E<lt>sys/memfd.hE<gt>\n"
11908 "#include E<lt>fcntl.hE<gt>\n"
11909 "#include E<lt>stdlib.hE<gt>\n"
11910 "#include E<lt>unistd.hE<gt>\n"
11911 "#include E<lt>string.hE<gt>\n"
11912 "#include E<lt>stdio.hE<gt>\n"
11913 msgstr ""
11914 "#include E<lt>sys/memfd.hE<gt>\n"
11915 "#include E<lt>fcntl.hE<gt>\n"
11916 "#include E<lt>stdlib.hE<gt>\n"
11917 "#include E<lt>unistd.hE<gt>\n"
11918 "#include E<lt>string.hE<gt>\n"
11919 "#include E<lt>stdio.hE<gt>\n"
11920
11921 #. type: Plain text
11922 #: build/C/man2/memfd_create.2:377
11923 #, no-wrap
11924 msgid ""
11925 "int\n"
11926 "main(int argc, char *argv[])\n"
11927 "{\n"
11928 "    int fd;\n"
11929 "    unsigned int seals;\n"
11930 "    char *addr;\n"
11931 "    char *name, *seals_arg;\n"
11932 "    ssize_t len;\n"
11933 msgstr ""
11934 "int\n"
11935 "main(int argc, char *argv[])\n"
11936 "{\n"
11937 "    int fd;\n"
11938 "    unsigned int seals;\n"
11939 "    char *addr;\n"
11940 "    char *name, *seals_arg;\n"
11941 "    ssize_t len;\n"
11942
11943 #. type: Plain text
11944 #: build/C/man2/memfd_create.2:388
11945 #, no-wrap
11946 msgid ""
11947 "    if (argc E<lt> 3) {\n"
11948 "        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
11949 "        fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
11950 "                \"following characters:\\en\");\n"
11951 "        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
11952 "        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
11953 "        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
11954 "        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
11955 "        exit(EXIT_FAILURE);\n"
11956 "    }\n"
11957 msgstr ""
11958 "    if (argc E<lt> 3) {\n"
11959 "        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
11960 "        fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
11961 "                \"following characters:\\en\");\n"
11962 "        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
11963 "        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
11964 "        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
11965 "        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
11966 "        exit(EXIT_FAILURE);\n"
11967 "    }\n"
11968
11969 #. type: Plain text
11970 #: build/C/man2/memfd_create.2:392
11971 #, no-wrap
11972 msgid ""
11973 "    name = argv[1];\n"
11974 "    len = atoi(argv[2]);\n"
11975 "    seals_arg = argv[3];\n"
11976 msgstr ""
11977 "    name = argv[1];\n"
11978 "    len = atoi(argv[2]);\n"
11979 "    seals_arg = argv[3];\n"
11980
11981 #. type: Plain text
11982 #: build/C/man2/memfd_create.2:395
11983 #, no-wrap
11984 msgid ""
11985 "    /* Create an anonymous file in tmpfs; allow seals to be\n"
11986 "       placed on the file */\n"
11987 msgstr ""
11988 "    /* Create an anonymous file in tmpfs; allow seals to be\n"
11989 "       placed on the file */\n"
11990
11991 #. type: Plain text
11992 #: build/C/man2/memfd_create.2:399
11993 #, no-wrap
11994 msgid ""
11995 "    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
11996 "    if (fd == -1)\n"
11997 "        errExit(\"memfd_create\");\n"
11998 msgstr ""
11999 "    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12000 "    if (fd == -1)\n"
12001 "        errExit(\"memfd_create\");\n"
12002
12003 #. type: Plain text
12004 #: build/C/man2/memfd_create.2:401
12005 #, no-wrap
12006 msgid "    /* Size the file as specified on the command line */\n"
12007 msgstr "    /* Size the file as specified on the command line */\n"
12008
12009 #. type: Plain text
12010 #: build/C/man2/memfd_create.2:404
12011 #, no-wrap
12012 msgid ""
12013 "    if (ftruncate(fd, len) == -1)\n"
12014 "        errExit(\"truncate\");\n"
12015 msgstr ""
12016 "    if (ftruncate(fd, len) == -1)\n"
12017 "        errExit(\"truncate\");\n"
12018
12019 #. type: Plain text
12020 #: build/C/man2/memfd_create.2:407
12021 #, no-wrap
12022 msgid ""
12023 "    printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12024 "            (long) getpid(), fd, (long) getpid(), fd);\n"
12025 msgstr ""
12026 "    printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12027 "            (long) getpid(), fd, (long) getpid(), fd);\n"
12028
12029 #. type: Plain text
12030 #: build/C/man2/memfd_create.2:410
12031 #, no-wrap
12032 msgid ""
12033 "    /* Code to map the file and populate the mapping with data\n"
12034 "       omitted */\n"
12035 msgstr ""
12036 "    /* Code to map the file and populate the mapping with data\n"
12037 "       omitted */\n"
12038
12039 #. type: Plain text
12040 #: build/C/man2/memfd_create.2:413
12041 #, no-wrap
12042 msgid ""
12043 "    /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12044 "       seals on the file */\n"
12045 msgstr ""
12046 "    /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12047 "       seals on the file */\n"
12048
12049 #. type: Plain text
12050 #: build/C/man2/memfd_create.2:416
12051 #, no-wrap
12052 msgid ""
12053 "    if (seals_arg != NULL) {\n"
12054 "        seals = 0;\n"
12055 msgstr ""
12056 "    if (seals_arg != NULL) {\n"
12057 "        seals = 0;\n"
12058
12059 #. type: Plain text
12060 #: build/C/man2/memfd_create.2:425
12061 #, no-wrap
12062 msgid ""
12063 "        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12064 "            seals |= F_SEAL_GROW;\n"
12065 "        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12066 "            seals |= F_SEAL_SHRINK;\n"
12067 "        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12068 "            seals |= F_SEAL_WRITE;\n"
12069 "        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12070 "            seals |= F_SEAL_SEAL;\n"
12071 msgstr ""
12072 "        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12073 "            seals |= F_SEAL_GROW;\n"
12074 "        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12075 "            seals |= F_SEAL_SHRINK;\n"
12076 "        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12077 "            seals |= F_SEAL_WRITE;\n"
12078 "        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12079 "            seals |= F_SEAL_SEAL;\n"
12080
12081 #. type: Plain text
12082 #: build/C/man2/memfd_create.2:429
12083 #, no-wrap
12084 msgid ""
12085 "        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12086 "            errExit(\"fcntl\");\n"
12087 "    }\n"
12088 msgstr ""
12089 "        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12090 "            errExit(\"fcntl\");\n"
12091 "    }\n"
12092
12093 #. type: Plain text
12094 #: build/C/man2/memfd_create.2:432
12095 #, no-wrap
12096 msgid ""
12097 "    /* Keep running, so that the file created by memfd_create()\n"
12098 "       continues to exist */\n"
12099 msgstr ""
12100 "    /* Keep running, so that the file created by memfd_create()\n"
12101 "       continues to exist */\n"
12102
12103 #. type: Plain text
12104 #: build/C/man2/memfd_create.2:434
12105 #, no-wrap
12106 msgid "    pause();\n"
12107 msgstr "    pause();\n"
12108
12109 #. type: SS
12110 #: build/C/man2/memfd_create.2:438
12111 #, no-wrap
12112 msgid "Program source: t_get_seals.c"
12113 msgstr "プログラムのソース: t_get_seals.c"
12114
12115 #. type: Plain text
12116 #: build/C/man2/memfd_create.2:447
12117 #, no-wrap
12118 msgid ""
12119 "#include E<lt>sys/memfd.hE<gt>\n"
12120 "#include E<lt>fcntl.hE<gt>\n"
12121 "#include E<lt>unistd.hE<gt>\n"
12122 "#include E<lt>stdlib.hE<gt>\n"
12123 "#include E<lt>string.hE<gt>\n"
12124 "#include E<lt>stdio.hE<gt>\n"
12125 msgstr ""
12126 "#include E<lt>sys/memfd.hE<gt>\n"
12127 "#include E<lt>fcntl.hE<gt>\n"
12128 "#include E<lt>unistd.hE<gt>\n"
12129 "#include E<lt>stdlib.hE<gt>\n"
12130 "#include E<lt>string.hE<gt>\n"
12131 "#include E<lt>stdio.hE<gt>\n"
12132
12133 #. type: Plain text
12134 #: build/C/man2/memfd_create.2:456
12135 #, no-wrap
12136 msgid ""
12137 "int\n"
12138 "main(int argc, char *argv[])\n"
12139 "{\n"
12140 "    int fd;\n"
12141 "    unsigned int seals;\n"
12142 msgstr ""
12143 "int\n"
12144 "main(int argc, char *argv[])\n"
12145 "{\n"
12146 "    int fd;\n"
12147 "    unsigned int seals;\n"
12148
12149 #. type: Plain text
12150 #: build/C/man2/memfd_create.2:461
12151 #, no-wrap
12152 msgid ""
12153 "    if (argc != 2) {\n"
12154 "        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12155 "        exit(EXIT_FAILURE);\n"
12156 "    }\n"
12157 msgstr ""
12158 "    if (argc != 2) {\n"
12159 "        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12160 "        exit(EXIT_FAILURE);\n"
12161 "    }\n"
12162
12163 #. type: Plain text
12164 #: build/C/man2/memfd_create.2:465
12165 #, no-wrap
12166 msgid ""
12167 "    fd = open(argv[1], O_RDWR);\n"
12168 "    if (fd == -1)\n"
12169 "        errExit(\"open\");\n"
12170 msgstr ""
12171 "    fd = open(argv[1], O_RDWR);\n"
12172 "    if (fd == -1)\n"
12173 "        errExit(\"open\");\n"
12174
12175 #. type: Plain text
12176 #: build/C/man2/memfd_create.2:469
12177 #, no-wrap
12178 msgid ""
12179 "    seals = fcntl(fd, F_GET_SEALS);\n"
12180 "    if (seals == -1)\n"
12181 "        errExit(\"fcntl\");\n"
12182 msgstr ""
12183 "    seals = fcntl(fd, F_GET_SEALS);\n"
12184 "    if (seals == -1)\n"
12185 "        errExit(\"fcntl\");\n"
12186
12187 #. type: Plain text
12188 #: build/C/man2/memfd_create.2:480
12189 #, no-wrap
12190 msgid ""
12191 "    printf(\"Existing seals:\");\n"
12192 "    if (seals & F_SEAL_SEAL)\n"
12193 "        printf(\" SEAL\");\n"
12194 "    if (seals & F_SEAL_GROW)\n"
12195 "        printf(\" GROW\");\n"
12196 "    if (seals & F_SEAL_WRITE)\n"
12197 "        printf(\" WRITE\");\n"
12198 "    if (seals & F_SEAL_SHRINK)\n"
12199 "        printf(\" SHRINK\");\n"
12200 "    printf(\"\\en\");\n"
12201 msgstr ""
12202 "    printf(\"Existing seals:\");\n"
12203 "    if (seals & F_SEAL_SEAL)\n"
12204 "        printf(\" SEAL\");\n"
12205 "    if (seals & F_SEAL_GROW)\n"
12206 "        printf(\" GROW\");\n"
12207 "    if (seals & F_SEAL_WRITE)\n"
12208 "        printf(\" WRITE\");\n"
12209 "    if (seals & F_SEAL_SHRINK)\n"
12210 "        printf(\" SHRINK\");\n"
12211 "    printf(\"\\en\");\n"
12212
12213 #. type: Plain text
12214 #: build/C/man2/memfd_create.2:483
12215 #, no-wrap
12216 msgid ""
12217 "    /* Code to map the file and access the contents of the\n"
12218 "       resulting mapping omitted */\n"
12219 msgstr ""
12220 "    /* Code to map the file and access the contents of the\n"
12221 "       resulting mapping omitted */\n"
12222
12223 #. type: Plain text
12224 #: build/C/man2/memfd_create.2:493
12225 msgid "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12226 msgstr "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12227
12228 #. type: TH
12229 #: build/C/man2/s390_pci_mmio_write.2:25
12230 #, no-wrap
12231 msgid "S390_PCI_MMIO_WRITE"
12232 msgstr "S390_PCI_MMIO_WRITE"
12233
12234 #. type: TH
12235 #: build/C/man2/s390_pci_mmio_write.2:25
12236 #, no-wrap
12237 msgid "2015-01-15"
12238 msgstr "2015-01-15"
12239
12240 #. type: Plain text
12241 #: build/C/man2/s390_pci_mmio_write.2:29
12242 msgid ""
12243 "s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO "
12244 "memory page"
12245 msgstr ""
12246
12247 #. type: Plain text
12248 #: build/C/man2/s390_pci_mmio_write.2:32
12249 #, no-wrap
12250 msgid "B<#include E<lt>asm/unistd.hE<gt>>\n"
12251 msgstr "B<#include E<lt>asm/unistd.hE<gt>>\n"
12252
12253 #. type: Plain text
12254 #: build/C/man2/s390_pci_mmio_write.2:35
12255 #, no-wrap
12256 msgid ""
12257 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12258 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12259 msgstr ""
12260 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12261 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12262
12263 #. type: Plain text
12264 #: build/C/man2/s390_pci_mmio_write.2:38
12265 #, no-wrap
12266 msgid ""
12267 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12268 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12269 msgstr ""
12270 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12271 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12272
12273 #. type: Plain text
12274 #: build/C/man2/s390_pci_mmio_write.2:57
12275 msgid ""
12276 "The B<s390_pci_mmio_write>()  system call writes I<length> bytes of data "
12277 "from the user-space buffer I<user_buffer> to the PCI MMIO memory location "
12278 "specified by I<mmio_addr>.  The B<s390_pci_mmio_read>()  system call reads "
12279 "I<length> bytes of data from the PCI MMIO memory location specified by "
12280 "I<mmio_addr> to the user-space buffer I<user_buffer>."
12281 msgstr ""
12282
12283 #. type: Plain text
12284 #: build/C/man2/s390_pci_mmio_write.2:68
12285 msgid ""
12286 "These system calls must be used instead of the simple assignment or data-"
12287 "transfer operations that are used to access the PCI MMIO memory areas mapped "
12288 "to user space on the Linux System z platform.  The address specified by "
12289 "I<mmio_addr> must belong to a PCI MMIO memory page mapping in the caller's "
12290 "address space, and the data being written or read must not cross a page "
12291 "boundary.  The I<length> value cannot be greater than the system page size."
12292 msgstr ""
12293
12294 #. type: Plain text
12295 #: build/C/man2/s390_pci_mmio_write.2:77
12296 msgid ""
12297 "On success, B<s390_pci_mmio_write>()  and B<s390_pci_mmio_read>()  return "
12298 "0.  On error, -1 is returned and I<errno> is set to one of the error codes "
12299 "listed below."
12300 msgstr ""
12301 "成功すると、 B<s390_pci_mmio_write>() と B<s390_pci_mmio_read>() は 0 を返"
12302 "す。 エラーの場合、-1 を返し、 I<errno> に以下のリストにあるエラーコードのい"
12303 "ずれかを設定する。"
12304
12305 #. type: Plain text
12306 #: build/C/man2/s390_pci_mmio_write.2:83
12307 msgid "The address in I<mmio_addr> is invalid."
12308 msgstr ""
12309
12310 #. type: Plain text
12311 #: build/C/man2/s390_pci_mmio_write.2:87
12312 msgid ""
12313 "I<user_buffer> does not point to a valid location in the caller's address "
12314 "space."
12315 msgstr ""
12316
12317 #. type: Plain text
12318 #: build/C/man2/s390_pci_mmio_write.2:92
12319 msgid "Invalid I<length> argument."
12320 msgstr ""
12321
12322 #. type: Plain text
12323 #: build/C/man2/s390_pci_mmio_write.2:95
12324 msgid "PCI support is not enabled."
12325 msgstr ""
12326
12327 #. type: Plain text
12328 #: build/C/man2/s390_pci_mmio_write.2:98
12329 msgid "Insufficient memory."
12330 msgstr ""
12331
12332 #. type: Plain text
12333 #: build/C/man2/s390_pci_mmio_write.2:100
12334 msgid "These system calls are available since Linux 3.19."
12335 msgstr "これらのシステムコールは Linux 3.19 以降で使用可能である。"
12336
12337 #. type: Plain text
12338 #: build/C/man2/s390_pci_mmio_write.2:103
12339 msgid ""
12340 "This Linux-specific system call is available only on the s390 architecture.  "
12341 "The required PCI support is available beginning with System z EC12."
12342 msgstr ""
12343
12344 #. type: Plain text
12345 #: build/C/man2/s390_pci_mmio_write.2:107
12346 msgid ""
12347 "Glibc does not provide a wrapper for this system call, use B<syscall>(2)  to "
12348 "call it."
12349 msgstr ""
12350
12351 #. type: Plain text
12352 #: build/C/man2/s390_pci_mmio_write.2:109
12353 msgid "B<syscall>(2)"
12354 msgstr "B<syscall>(2)"
12355
12356 #~ msgid "2013-04-19"
12357 #~ msgstr "2013-04-19"
12358
12359 #~ msgid "2014-06-03"
12360 #~ msgstr "2014-06-03"
12361
12362 #~ msgid "2009-02-25"
12363 #~ msgstr "2009-02-25"
12364
12365 #~ msgid "System-wide limit on the number of pages of shared memory."
12366 #~ msgstr "共有メモリのページ数のシステム全体での上限値。"
12367
12368 #~ msgid ""
12369 #~ "Segment low boundary address multiple.  Must be page aligned.  For the "
12370 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
12371 #~ msgstr ""
12372 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
12373 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
12374
12375 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
12376 #~ msgstr ""
12377 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
12378
12379 #~ msgid ""
12380 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
12381 #~ "2^20 (2,097,152)."
12382 #~ msgstr ""
12383 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
12384 #~ "(2,097,152) になる。"
12385
12386 #~ msgid ""
12387 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
12388 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
12389 #~ "shmmax>)."
12390 #~ msgstr ""
12391 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
12392 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
12393 #~ "る)。"
12394
12395 #~ msgid ""
12396 #~ "System wide maximum number of shared memory segments: implementation "
12397 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
12398 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
12399 #~ msgstr ""
12400 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
12401 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
12402 #~ "で参照したり、変更したりできる)。"
12403
12404 #~ msgid ""
12405 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
12406 #~ msgstr ""
12407 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
12408 #~ "-1 が返される。"
12409
12410 #~ msgid ""
12411 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
12412 #~ "pair of registers.  On this architecture, the call signature of "
12413 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
12414 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
12415 #~ "2.6.14, ARM defines a different system call that orders the arguments "
12416 #~ "suitably:"
12417 #~ msgstr ""
12418 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
12419 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
12420 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
12421 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
12422 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
12423 #~ "システムコールが定義されている。"
12424
12425 #~ msgid ""
12426 #~ "The behavior of this system call is otherwise exactly the same as "
12427 #~ "B<posix_fadvise>().  No library support is provided for this system call "
12428 #~ "in glibc."
12429 #~ msgstr ""
12430 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
12431 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
12432 #~ "では提供されていない。"
12433
12434 #~ msgid ""
12435 #~ "The I<mode> is not supported by the file system containing the file "
12436 #~ "referred to by I<fd>."
12437 #~ msgstr ""
12438 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
12439 #~ "ない。"
12440
12441 #~ msgid ""
12442 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
12443 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
12444 #~ "these handlers."
12445 #~ msgstr ""
12446 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
12447 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
12448
12449 #~ msgid ""
12450 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
12451 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
12452 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
12453 #~ "truncated."
12454 #~ msgstr ""
12455 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
12456 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
12457 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
12458 #~ "イルの元の内容を上書きする。"
12459
12460 #~ msgid ""
12461 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
12462 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
12463 #~ msgstr ""
12464 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
12465 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
12466 #~ "リプトが付属している。"
12467
12468 #~ msgid ""
12469 #~ "This flag allocates and initializes to zero the disk space within the "
12470 #~ "range specified by I<offset> and I<len>.  After a successful call, "
12471 #~ "subsequent writes into this range are guaranteed not to fail because of "
12472 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
12473 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
12474 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
12475 #~ "less than I<offset>+I<len>."
12476 #~ msgstr ""
12477 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
12478 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
12479 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
12480 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
12481 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
12482 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
12483 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
12484 #~ "は変更されることはない。"