OSDN Git Service

LDP: Update POT and ja.po to LDP v3.79
[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-02-04 23:30+0900\n"
10 "PO-Revision-Date: 2015-01-28 15:24+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
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.78 of the Linux I<man-pages> project.  A "
444 #| "description of the project, information about reporting bugs, and the "
445 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
446 #| "man-pages/."
447 msgid ""
448 "This page is part of release 3.79 of the Linux I<man-pages> project.  A "
449 "description of the project, information about reporting bugs, and the latest "
450 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
451 "pages/."
452 msgstr ""
453 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\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 ""
828 "I<cache> パラメーターが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
829
830 #.  FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
831 #.  but by now it is on a number of other architectures (but not i386).
832 #.  Investigate the details and update this page.
833 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
834 #. type: Plain text
835 #: build/C/man2/cacheflush.2:82
836 msgid ""
837 "This Linux-specific system call is available only on MIPS-based systems.  It "
838 "should not be used in programs intended to be portable."
839 msgstr ""
840 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
841 "植を意図したプログラムで使用すべきではない。"
842
843 #. type: Plain text
844 #: build/C/man2/cacheflush.2:89
845 msgid ""
846 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
847 "Therefore, the whole cache is always flushed."
848 msgstr ""
849 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
850 "のキャッシュがフラッシュされる。"
851
852 #. type: TH
853 #: build/C/man2/fallocate.2:11
854 #, no-wrap
855 msgid "FALLOCATE"
856 msgstr "FALLOCATE"
857
858 #. type: TH
859 #: build/C/man2/fallocate.2:11 build/C/man3/malloc_info.3:25
860 #: build/C/man2/mmap.2:40 build/C/man3/posix_fallocate.3:25
861 #: build/C/man3/shm_open.3:26 build/C/man2/memfd_create.2:21
862 #, no-wrap
863 msgid "2015-01-22"
864 msgstr "2015-01-22"
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
1524 #. type: Plain text
1525 #: build/C/man2/madvise.2:72
1526 msgid "The advice is indicated in the I<advice> argument which can be"
1527 msgstr ""
1528 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1529
1530 #. type: TP
1531 #: build/C/man2/madvise.2:72
1532 #, no-wrap
1533 msgid "B<MADV_NORMAL>"
1534 msgstr "B<MADV_NORMAL>"
1535
1536 #. type: Plain text
1537 #: build/C/man2/madvise.2:76
1538 msgid "No special treatment.  This is the default."
1539 msgstr "特別な扱いは行わない。これがデフォルトである。"
1540
1541 #. type: TP
1542 #: build/C/man2/madvise.2:76
1543 #, no-wrap
1544 msgid "B<MADV_RANDOM>"
1545 msgstr "B<MADV_RANDOM>"
1546
1547 #. type: Plain text
1548 #: build/C/man2/madvise.2:80
1549 msgid ""
1550 "Expect page references in random order.  (Hence, read ahead may be less "
1551 "useful than normally.)"
1552 msgstr ""
1553 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1554 "なさそうだ。)"
1555
1556 #. type: TP
1557 #: build/C/man2/madvise.2:80
1558 #, no-wrap
1559 msgid "B<MADV_SEQUENTIAL>"
1560 msgstr "B<MADV_SEQUENTIAL>"
1561
1562 #. type: Plain text
1563 #: build/C/man2/madvise.2:85
1564 msgid ""
1565 "Expect page references in sequential order.  (Hence, pages in the given "
1566 "range can be aggressively read ahead, and may be freed soon after they are "
1567 "accessed.)"
1568 msgstr ""
1569 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1570 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1571 "して良い。)"
1572
1573 #. type: TP
1574 #: build/C/man2/madvise.2:85
1575 #, no-wrap
1576 msgid "B<MADV_WILLNEED>"
1577 msgstr "B<MADV_WILLNEED>"
1578
1579 #. type: Plain text
1580 #: build/C/man2/madvise.2:89
1581 msgid ""
1582 "Expect access in the near future.  (Hence, it might be a good idea to read "
1583 "some pages ahead.)"
1584 msgstr ""
1585 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1586 "ておくといいだろう。)"
1587
1588 #. type: TP
1589 #: build/C/man2/madvise.2:89
1590 #, no-wrap
1591 msgid "B<MADV_DONTNEED>"
1592 msgstr "B<MADV_DONTNEED>"
1593
1594 #. type: Plain text
1595 #: build/C/man2/madvise.2:100
1596 msgid ""
1597 "Do not expect access in the near future.  (For the time being, the "
1598 "application is finished with the given range, so the kernel can free "
1599 "resources associated with it.)  Subsequent accesses of pages in this range "
1600 "will succeed, but will result either in reloading of the memory contents "
1601 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1602 "pages for mappings without an underlying file."
1603 msgstr ""
1604 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1605 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1606 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリーの内容を"
1607 "マップ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または"
1608 "元ファイルがないマップページでは アクセスがあったときに 0 埋めが行われること"
1609 "になる。"
1610
1611 #. type: TP
1612 #: build/C/man2/madvise.2:100
1613 #, no-wrap
1614 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1615 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1616
1617 #.  2.6.18-rc5
1618 #.  Databases want to use this feature to drop a section of their
1619 #.  bufferpool (shared memory segments) - without writing back to
1620 #.  disk/swap space.  This feature is also useful for supporting
1621 #.  hot-plug memory on UML.
1622 #. type: Plain text
1623 #: build/C/man2/madvise.2:113
1624 msgid ""
1625 "Free up a given range of pages and its associated backing store.  Currently, "
1626 "only shmfs/tmpfs supports this; other filesystems return with the error "
1627 "B<ENOSYS>."
1628 msgstr ""
1629 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1630 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1631 "返される。"
1632
1633 #. type: TP
1634 #: build/C/man2/madvise.2:113
1635 #, no-wrap
1636 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1637 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1638
1639 #.  See http://lwn.net/Articles/171941/
1640 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1641 #.  Currently, copy-on-write may change the physical address of
1642 #.  a page even if the user requested that the page is pinned in
1643 #.  memory (either by mlock or by get_user_pages).  This happens
1644 #.  if the process forks meanwhile, and the parent writes to that
1645 #.  page.  As a result, the page is orphaned: in case of
1646 #.  get_user_pages, the application will never see any data hardware
1647 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1648 #.  the parent is not getting the realtime/security benefits of mlock.
1649 #.  In particular, this affects the Infiniband modules which do DMA from
1650 #.  and into user pages all the time.
1651 #.  This patch adds madvise options to control whether memory range is
1652 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1653 #.  from/into these pages.  Could also be useful to an application
1654 #.  wanting to speed up its forks by cutting large areas out of
1655 #.  consideration.
1656 #.  SEE ALSO: http://lwn.net/Articles/171941/
1657 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1658 #. type: Plain text
1659 #: build/C/man2/madvise.2:144
1660 msgid ""
1661 "Do not make the pages in this range available to the child after a "
1662 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1663 "the physical location of a page(s) if the parent writes to it after a "
1664 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1665 "into the page(s).)"
1666 msgstr ""
1667 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1668 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1669 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1670 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1671 "を行うような場合に 問題を起こすことがある)。"
1672
1673 #. type: TP
1674 #: build/C/man2/madvise.2:144
1675 #, no-wrap
1676 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1677 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1678
1679 #. type: Plain text
1680 #: build/C/man2/madvise.2:150
1681 msgid ""
1682 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1683 "a mapping is inherited across B<fork>(2)."
1684 msgstr ""
1685 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1686 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1687
1688 #. type: TP
1689 #: build/C/man2/madvise.2:150
1690 #, no-wrap
1691 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1692 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1693
1694 #. type: Plain text
1695 #: build/C/man2/madvise.2:162
1696 msgid ""
1697 "Poison a page and handle it like a hardware memory corruption.  This "
1698 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1699 "This operation may result in the calling process receiving a B<SIGBUS> and "
1700 "the page being unmapped.  This feature is intended for testing of memory "
1701 "error-handling code; it is available only if the kernel was configured with "
1702 "B<CONFIG_MEMORY_FAILURE>."
1703 msgstr ""
1704 "ページに毒入れを行い、ハードウェアメモリーの破損のようにそのページを取り扱"
1705 "う。 この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 こ"
1706 "の操作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマッ"
1707 "プされる。 この機能はメモリーのエラー処理コードをテストするためのものであ"
1708 "る。 カーネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能"
1709 "である。"
1710
1711 #. type: TP
1712 #: build/C/man2/madvise.2:162
1713 #, no-wrap
1714 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1715 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1716
1717 #. type: Plain text
1718 #: build/C/man2/madvise.2:180
1719 msgid ""
1720 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1721 "memory of each page in the specified range is preserved (i.e., when next "
1722 "accessed, the same content will be visible, but in a new physical page "
1723 "frame), and the original page is offlined (i.e., no longer used, and taken "
1724 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1725 "operation is invisible to (i.e., does not change the semantics of)  the "
1726 "calling process.  This feature is intended for testing of memory error-"
1727 "handling code; it is available only if the kernel was configured with "
1728 "B<CONFIG_MEMORY_FAILURE>."
1729 msgstr ""
1730 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1731 "された範囲の各ページのメモリーの内容は保持され (すなわち、次にアクセスされた"
1732 "際に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオ"
1733 "フラインになる (すなわち、 そのフレームは使用される、通常のメモリー管理からは"
1734 "取り除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えな"
1735 "い (つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリーのエラー"
1736 "処理コードをテストすることを目的に作られた。 カーネルで "
1737 "B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1738
1739 #. type: TP
1740 #: build/C/man2/madvise.2:180
1741 #, no-wrap
1742 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1743 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1744
1745 #. type: Plain text
1746 #: build/C/man2/madvise.2:205
1747 msgid ""
1748 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1749 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1750 "memory that have been marked as mergeable, looking for pages with identical "
1751 "content.  These are replaced by a single write-protected page (which is "
1752 "automatically copied if a process later wants to update the content of the "
1753 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1754 "feature is intended for applications that generate many instances of the "
1755 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1756 "of processing power; use with care.  See the Linux kernel source file "
1757 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1758 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1759 "configured with B<CONFIG_KSM>."
1760 msgstr ""
1761 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1762 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1763 "いたユーザーメモリーの領域を定期的にスキャンし、内容が全く同じページを探す。 "
1764 "内容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) "
1765 "がかかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよ"
1766 "うとした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名"
1767 "ページ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じ"
1768 "データのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システ"
1769 "ム) での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合"
1770 "があり、注意して使用すること。 詳細は Linux カーネルソースファイル "
1771 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1772 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1773 "る場合にのみ利用できる。"
1774
1775 #. type: TP
1776 #: build/C/man2/madvise.2:205
1777 #, no-wrap
1778 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1779 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1780
1781 #. type: Plain text
1782 #: build/C/man2/madvise.2:214
1783 msgid ""
1784 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1785 "address range; KSM unmerges whatever pages it had merged in the address "
1786 "range specified by I<addr> and I<length>."
1787 msgstr ""
1788 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1789 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1790 "済みのすべてのページの統合解除を行う。"
1791
1792 #. type: TP
1793 #: build/C/man2/madvise.2:214
1794 #, no-wrap
1795 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1796 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1797
1798 #.  http://lwn.net/Articles/358904/
1799 #.  https://lwn.net/Articles/423584/
1800 #. type: Plain text
1801 #: build/C/man2/madvise.2:243
1802 msgid ""
1803 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1804 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1805 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1806 "the areas marked as huge page candidates to replace them with huge pages.  "
1807 "The kernel will also allocate huge pages directly when the region is "
1808 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1809 "feature is primarily aimed at applications that use large mappings of data "
1810 "and access large regions of that memory at a time (e.g., virtualization "
1811 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1812 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1813 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1814 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1815 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1816 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1817 msgstr ""
1818 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1819 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1820 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1821 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1822 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1823 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1824 "マッピングを使用し、一度にそのメモリーの大きな範囲にアクセスするようなアプリ"
1825 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1826 "る。 この機能は非常に簡単にメモリーを浪費してしまう (例えば、1 バイトしかアク"
1827 "セスしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリーを使っ"
1828 "てしまう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1829 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1830 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1831 "る。"
1832
1833 #. type: TP
1834 #: build/C/man2/madvise.2:243
1835 #, no-wrap
1836 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1837 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1838
1839 #. type: Plain text
1840 #: build/C/man2/madvise.2:250
1841 msgid ""
1842 "Ensures that memory in the address range specified by I<addr> and I<length> "
1843 "will not be collapsed into huge pages."
1844 msgstr ""
1845 "I<addr> と I<length> で指定されたアドレス範囲のメモリーがヒュージページに組み"
1846 "込まれないようにする。"
1847
1848 #. type: TP
1849 #: build/C/man2/madvise.2:250
1850 #, no-wrap
1851 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1852 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1853
1854 #. type: Plain text
1855 #: build/C/man2/madvise.2:264
1856 msgid ""
1857 "Exclude from a core dump those pages in the range specified by I<addr> and "
1858 "I<length>.  This is useful in applications that have large areas of memory "
1859 "that are known not to be useful in a core dump.  The effect of "
1860 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1861 "proc/PID/coredump_filter> file (see B<core>(5))."
1862 msgstr ""
1863 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1864 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリー領域があ"
1865 "るアプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1866 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1867 "(B<core>(5) 参照)。"
1868
1869 #. type: TP
1870 #: build/C/man2/madvise.2:264
1871 #, no-wrap
1872 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1873 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1874
1875 #. type: Plain text
1876 #: build/C/man2/madvise.2:268
1877 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1878 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1879
1880 #. type: Plain text
1881 #: build/C/man2/madvise.2:275
1882 msgid ""
1883 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1884 "is set appropriately."
1885 msgstr ""
1886 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1887 "を適切な値に設定する。"
1888
1889 #. type: TP
1890 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1891 #: build/C/man2/mremap.2:136
1892 #, no-wrap
1893 msgid "B<EAGAIN>"
1894 msgstr "B<EAGAIN>"
1895
1896 #. type: Plain text
1897 #: build/C/man2/madvise.2:279
1898 msgid "A kernel resource was temporarily unavailable."
1899 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1900
1901 #. type: Plain text
1902 #: build/C/man2/madvise.2:282
1903 msgid "The map exists, but the area maps something that isn't a file."
1904 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1905
1906 #. type: Plain text
1907 #: build/C/man2/madvise.2:285
1908 msgid "This error can occur for the following reasons:"
1909 msgstr "このエラーは以下の理由で発生する。"
1910
1911 #.  .I len
1912 #.  is zero,
1913 #. type: Plain text
1914 #: build/C/man2/madvise.2:292
1915 msgid "The value I<len> is negative."
1916 msgstr "I<len> が負の値である。"
1917
1918 #. type: Plain text
1919 #: build/C/man2/madvise.2:295
1920 msgid "I<addr> is not page-aligned."
1921 msgstr "I<addr> がページ境界ではない。"
1922
1923 #. type: Plain text
1924 #: build/C/man2/madvise.2:298
1925 msgid "I<advice> is not a valid value"
1926 msgstr "I<advice> が有効な値でない。"
1927
1928 #. type: Plain text
1929 #: build/C/man2/madvise.2:301
1930 msgid ""
1931 "The application is attempting to release locked or shared pages (with "
1932 "B<MADV_DONTNEED>)."
1933 msgstr ""
1934 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1935 "放\n"
1936 "しようとしている。"
1937
1938 #. type: Plain text
1939 #: build/C/man2/madvise.2:309
1940 msgid ""
1941 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1942 "kernel was not configured with B<CONFIG_KSM>."
1943 msgstr ""
1944 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1945 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1946
1947 #. type: Plain text
1948 #: build/C/man2/madvise.2:316
1949 msgid ""
1950 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1951 "maximum resident set size."
1952 msgstr ""
1953 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1954 "(resident set size) の最大値を越えてしまう。"
1955
1956 #. type: TP
1957 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1958 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1959 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1960 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1961 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1962 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1963 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1964 #: build/C/man2/sync_file_range.2:163 build/C/man2/memfd_create.2:152
1965 #: build/C/man2/s390_pci_mmio_write.2:95
1966 #, no-wrap
1967 msgid "B<ENOMEM>"
1968 msgstr "B<ENOMEM>"
1969
1970 #. type: Plain text
1971 #: build/C/man2/madvise.2:321
1972 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1973 msgstr "(B<MADV_WILLNEED> の場合) メモリーが足りず、ページングに失敗した。"
1974
1975 #. type: Plain text
1976 #: build/C/man2/madvise.2:325
1977 msgid ""
1978 "Addresses in the specified range are not currently mapped, or are outside "
1979 "the address space of the process."
1980 msgstr ""
1981 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1982 "空間の内部にない。"
1983
1984 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1985 #. type: Plain text
1986 #: build/C/man2/madvise.2:332
1987 msgid ""
1988 "Since Linux 3.18, support for this system call is optional, depending on the "
1989 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1990 msgstr ""
1991 "Linux 3.18 以降では、このシステムコールのサポートは任意となり、利用できるかは"
1992 "カーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされてい"
1993 "るかに依存する。"
1994
1995 #.  FIXME . Write a posix_madvise(3) page.
1996 #. type: Plain text
1997 #: build/C/man2/madvise.2:345
1998 msgid ""
1999 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
2000 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
2001 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
2002 "access."
2003 msgstr ""
2004 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
2005 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
2006 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
2007 "類似の関数が存在する。"
2008
2009 #. type: Plain text
2010 #: build/C/man2/madvise.2:354
2011 msgid ""
2012 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
2013 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
2014 msgstr ""
2015 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
2016 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
2017
2018 #. type: SS
2019 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
2020 #: build/C/man2/shmget.2:370
2021 #, no-wrap
2022 msgid "Linux notes"
2023 msgstr "Linux での注意"
2024
2025 #. type: Plain text
2026 #: build/C/man2/madvise.2:363
2027 msgid ""
2028 "The current Linux implementation (2.4.0) views this system call more as a "
2029 "command than as advice and hence may return an error when it cannot do what "
2030 "it usually would do in response to this advice.  (See the ERRORS description "
2031 "above.)  This is nonstandard behavior."
2032 msgstr ""
2033 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2034 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2035 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2036 "とは異なる。"
2037
2038 #.  .SH HISTORY
2039 #.  The
2040 #.  .BR madvise ()
2041 #.  function first appeared in 4.4BSD.
2042 #. type: Plain text
2043 #: build/C/man2/madvise.2:379
2044 msgid ""
2045 "The Linux implementation requires that the address I<addr> be page-aligned, "
2046 "and allows I<length> to be zero.  If there are some parts of the specified "
2047 "address range that are not mapped, the Linux version of B<madvise>()  "
2048 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2049 "the system call, as it should)."
2050 msgstr ""
2051 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2052 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2053 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2054 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2055 "返す)。"
2056
2057 #. type: Plain text
2058 #: build/C/man2/madvise.2:388
2059 msgid ""
2060 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2061 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2062 msgstr ""
2063 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2064 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2065
2066 #. type: TH
2067 #: build/C/man3/mallinfo.3:26
2068 #, no-wrap
2069 msgid "MALLINFO"
2070 msgstr "MALLINFO"
2071
2072 #. type: TH
2073 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2074 #, no-wrap
2075 msgid "2012-05-06"
2076 msgstr "2012-05-06"
2077
2078 #. type: Plain text
2079 #: build/C/man3/mallinfo.3:29
2080 msgid "mallinfo - obtain memory allocation information"
2081 msgstr "mallinfo - メモリー割り当て情報を取得する"
2082
2083 #. type: Plain text
2084 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2085 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2086 #: build/C/man3/mallopt.3:31
2087 msgid "B<#include E<lt>malloc.hE<gt>>"
2088 msgstr "B<#include E<lt>malloc.hE<gt>>"
2089
2090 #. type: Plain text
2091 #: build/C/man3/mallinfo.3:33
2092 msgid "B<struct mallinfo mallinfo(void);>"
2093 msgstr "B<struct mallinfo mallinfo(void);>"
2094
2095 #. type: Plain text
2096 #: build/C/man3/mallinfo.3:41
2097 msgid ""
2098 "The B<mallinfo>()  function returns a copy of a structure containing "
2099 "information about memory allocations performed by B<malloc>(3)  and related "
2100 "functions.  This structure is defined as follows:"
2101 msgstr ""
2102 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリー\n"
2103 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2104 "この構造体は以下のように定義されている。"
2105
2106 #. type: Plain text
2107 #: build/C/man3/mallinfo.3:56
2108 #, no-wrap
2109 msgid ""
2110 "struct mallinfo {\n"
2111 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2112 "    int ordblks;   /* Number of free chunks */\n"
2113 "    int smblks;    /* Number of free fastbin blocks */\n"
2114 "    int hblks;     /* Number of mmapped regions */\n"
2115 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2116 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2117 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2118 "    int uordblks;  /* Total allocated space (bytes) */\n"
2119 "    int fordblks;  /* Total free space (bytes) */\n"
2120 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2121 "};\n"
2122 msgstr ""
2123 "struct mallinfo {\n"
2124 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2125 "    int ordblks;   /* Number of free chunks */\n"
2126 "    int smblks;    /* Number of free fastbin blocks */\n"
2127 "    int hblks;     /* Number of mmapped regions */\n"
2128 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2129 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2130 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2131 "    int uordblks;  /* Total allocated space (bytes) */\n"
2132 "    int fordblks;  /* Total free space (bytes) */\n"
2133 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2134 "};\n"
2135
2136 #. type: Plain text
2137 #: build/C/man3/mallinfo.3:62
2138 msgid ""
2139 "The fields of the I<mallinfo> structure contain the following information:"
2140 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2141
2142 #. type: TP
2143 #: build/C/man3/mallinfo.3:62
2144 #, no-wrap
2145 msgid "I<arena>"
2146 msgstr "I<arena>"
2147
2148 #. type: Plain text
2149 #: build/C/man3/mallinfo.3:68
2150 msgid ""
2151 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2152 "memory allocated on the heap).  This figure includes both in-use blocks and "
2153 "blocks on the free list."
2154 msgstr ""
2155 "B<mmap>(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられ"
2156 "たメモリー) 。 この数字には使用中のブロックやフリーリスト上のブロックも含まれ"
2157 "る。"
2158
2159 #. type: TP
2160 #: build/C/man3/mallinfo.3:68
2161 #, no-wrap
2162 msgid "I<ordblks>"
2163 msgstr "I<ordblks>"
2164
2165 #. type: Plain text
2166 #: build/C/man3/mallinfo.3:71
2167 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2168 msgstr "通常の (つまり fastbin ではない) 未使用ブロック数。"
2169
2170 #. type: TP
2171 #: build/C/man3/mallinfo.3:71
2172 #, no-wrap
2173 msgid "I<smblks>"
2174 msgstr "I<smblks>"
2175
2176 #. type: Plain text
2177 #: build/C/man3/mallinfo.3:75
2178 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2179 msgstr "fastbin 未使用ブロック数 (B<mallopt>(3) 参照)。"
2180
2181 #. type: TP
2182 #: build/C/man3/mallinfo.3:75
2183 #, no-wrap
2184 msgid "I<hblks>"
2185 msgstr "I<hblks>"
2186
2187 #. type: Plain text
2188 #: build/C/man3/mallinfo.3:83
2189 msgid ""
2190 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2191 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2192 msgstr ""
2193 "B<mmap>(2) を使って現在割り当てられているブロック数 (B<mallopt>(3) の "
2194 "B<M_MMAP_THRESHOLD> の議論を参照)。"
2195
2196 #. type: TP
2197 #: build/C/man3/mallinfo.3:83
2198 #, no-wrap
2199 msgid "I<hblkhd>"
2200 msgstr "I<hblkhd>"
2201
2202 #. type: Plain text
2203 #: build/C/man3/mallinfo.3:87
2204 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2205 msgstr "B<mmap>(2) を使って現在割り当てられているブロックのバイト数。"
2206
2207 #. type: TP
2208 #: build/C/man3/mallinfo.3:87
2209 #, no-wrap
2210 msgid "I<usmblks>"
2211 msgstr "I<usmblks>"
2212
2213 #. type: Plain text
2214 #: build/C/man3/mallinfo.3:92
2215 msgid ""
2216 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2217 "of space that was ever allocated.  This field is maintained only in "
2218 "nonthreading environments."
2219 msgstr ""
2220 "割り当てた空間の最高点 (\"highwater mark\")、 つまり、 これまでの中での最大の"
2221 "割り当て量。 このフィールドはスレッド化されていない環境でのみ収集される。"
2222
2223 #. type: TP
2224 #: build/C/man3/mallinfo.3:92
2225 #, no-wrap
2226 msgid "I<fsmblks>"
2227 msgstr "I<fsmblks>"
2228
2229 #. type: Plain text
2230 #: build/C/man3/mallinfo.3:95
2231 msgid "The total number of bytes in fastbin free blocks."
2232 msgstr "fastbin フリーブロックの総バイト数。"
2233
2234 #. type: TP
2235 #: build/C/man3/mallinfo.3:95
2236 #, no-wrap
2237 msgid "I<uordblks>"
2238 msgstr "I<uordblks>"
2239
2240 #. type: Plain text
2241 #: build/C/man3/mallinfo.3:98
2242 msgid "The total number of bytes used by in-use allocations."
2243 msgstr "使用中の割り当てメモリーで使われているバイト数。"
2244
2245 #. type: TP
2246 #: build/C/man3/mallinfo.3:98
2247 #, no-wrap
2248 msgid "I<fordblks>"
2249 msgstr "I<fordblks>"
2250
2251 #. type: Plain text
2252 #: build/C/man3/mallinfo.3:101
2253 msgid "The total number of bytes in free blocks."
2254 msgstr "フリーブロックの総バイト数。"
2255
2256 #. type: TP
2257 #: build/C/man3/mallinfo.3:101
2258 #, no-wrap
2259 msgid "I<keepcost>"
2260 msgstr "I<keepcost>"
2261
2262 #.  .SH VERSIONS
2263 #.  Available already in glibc 2.0, possibly earlier
2264 #. type: Plain text
2265 #: build/C/man3/mallinfo.3:110
2266 msgid ""
2267 "The total amount of releasable free space at the top of the heap.  This is "
2268 "the maximum number of bytes that could ideally (i.e., ignoring page "
2269 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2270 msgstr ""
2271 "ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は "
2272 "B<malloc_trim>(3) で理想的な場合に解放できる最大のバイト数である (理想的とい"
2273 "うのは、 ページ境界の制限などを無視した場合である。"
2274
2275 #. type: Plain text
2276 #: build/C/man3/mallinfo.3:114
2277 msgid ""
2278 "This function is not specified by POSIX or the C standards.  A similar "
2279 "function exists on many System V derivatives, and was specified in the SVID."
2280 msgstr ""
2281 "この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステ"
2282 "ムに同様の関数が存在し、 SVID では同様の関数が規定されていた。 "
2283
2284 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2285 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2286 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2287 #.  on libc-alpha@sourceware.org
2288 #. type: Plain text
2289 #: build/C/man3/mallinfo.3:126
2290 msgid ""
2291 "B<Information is returned for only the main memory allocation area.> "
2292 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2293 "B<malloc_info>(3)  for alternatives that include information about other "
2294 "arenas."
2295 msgstr ""
2296 "B<これらの情報はメインのメモリー割り当て領域に対するもののみである。> 他の領"
2297 "域の割り当ては対象にならない。 他の領域の情報も取得できる別の手段については "
2298 "B<malloc_stats>(3) や B<malloc_info>(3) を参照。"
2299
2300 #. type: Plain text
2301 #: build/C/man3/mallinfo.3:134
2302 msgid ""
2303 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2304 "because some internal bookkeeping values may be of type I<long>, the "
2305 "reported values may wrap around zero and thus be inaccurate."
2306 msgstr ""
2307 "I<mallinfo> 構造体の各フィールドは I<int> 型である。 しかし、 いくつかの内部"
2308 "管理用の値は I<long> 型の場合もあるので、 報告される値が一周してしまい、 不正"
2309 "確になる可能性がある。"
2310
2311 #. type: SH
2312 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2313 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2314 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:633
2315 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2316 #: build/C/man2/memfd_create.2:293
2317 #, no-wrap
2318 msgid "EXAMPLE"
2319 msgstr "例"
2320
2321 #. type: Plain text
2322 #: build/C/man3/mallinfo.3:140
2323 msgid ""
2324 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2325 "statistics before and after allocating and freeing some blocks of memory.  "
2326 "The statistics are displayed on standard output."
2327 msgstr ""
2328 "以下のプログラムは B<mallinfo>() を利用して、 メモリーブロックの割り当て、解"
2329 "放のそれぞれ前後でメモリー割り当ての統計情報を取得する。 統計情報は標準出力に"
2330 "表示される。"
2331
2332 #. type: Plain text
2333 #: build/C/man3/mallinfo.3:144
2334 msgid ""
2335 "The first two command-line arguments specify the number and size of blocks "
2336 "to be allocated with B<malloc>(3)."
2337 msgstr ""
2338 "最初の 2 つのコマンドライン引き数は B<malloc>(3) で割り当てるブロック数とサイ"
2339 "ズを指定する。"
2340
2341 #. type: Plain text
2342 #: build/C/man3/mallinfo.3:158
2343 msgid ""
2344 "The remaining three arguments specify which of the allocated blocks should "
2345 "be freed with B<free>(3).  These three arguments are optional, and specify "
2346 "(in order): the step size to be used in the loop that frees blocks (the "
2347 "default is 1, meaning free all blocks in the range); the ordinal position of "
2348 "the first block to be freed (default 0, meaning the first allocated block); "
2349 "and a number one greater than the ordinal position of the last block to be "
2350 "freed (default is one greater than the maximum block number).  If these "
2351 "three arguments are omitted, then the defaults cause all allocated blocks to "
2352 "be freed."
2353 msgstr ""
2354 "残りの 3 つの引き数は、どの割り当てられたブロックを B<free>(3) で解放すべきか"
2355 "を指定する。 これらの 3 つの引き数の指定は任意で、 最初のものから順に以下の情"
2356 "報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップ"
2357 "サイズを指定する (デフォルト値は 1 で、 1 は指定した範囲のすべてのブロックを"
2358 "解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を"
2359 "指定する (デフォルト値は 0 で、 0 は先頭の割り当て済みブロックを意味する)。 "
2360 "3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定す"
2361 "る (デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つ"
2362 "の引き数が省略された場合、 デフォルトではすべての割り当てられたブロックが解放"
2363 "される。"
2364
2365 #. type: Plain text
2366 #: build/C/man3/mallinfo.3:162
2367 msgid ""
2368 "In the following example run of the program, 1000 allocations of 100 bytes "
2369 "are performed, and then every second allocated block is freed:"
2370 msgstr ""
2371 "以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当"
2372 "てたブロックの 2 つに 1 つを解放する。"
2373
2374 #. type: Plain text
2375 #: build/C/man3/mallinfo.3:177
2376 #, no-wrap
2377 msgid ""
2378 "$ B<./a.out 1000 100 2>\n"
2379 "============== Before allocating blocks ==============\n"
2380 "Total non-mmapped bytes (arena):       0\n"
2381 "# of free chunks (ordblks):            1\n"
2382 "# of free fastbin blocks (smblks):     0\n"
2383 "# of mapped regions (hblks):           0\n"
2384 "Bytes in mapped regions (hblkhd):      0\n"
2385 "Max. total allocated space (usmblks):  0\n"
2386 "Free bytes held in fastbins (fsmblks): 0\n"
2387 "Total allocated space (uordblks):      0\n"
2388 "Total free space (fordblks):           0\n"
2389 "Topmost releasable block (keepcost):   0\n"
2390 msgstr ""
2391 "$ B<./a.out 1000 100 2>\n"
2392 "============== Before allocating blocks ==============\n"
2393 "Total non-mmapped bytes (arena):       0\n"
2394 "# of free chunks (ordblks):            1\n"
2395 "# of free fastbin blocks (smblks):     0\n"
2396 "# of mapped regions (hblks):           0\n"
2397 "Bytes in mapped regions (hblkhd):      0\n"
2398 "Max. total allocated space (usmblks):  0\n"
2399 "Free bytes held in fastbins (fsmblks): 0\n"
2400 "Total allocated space (uordblks):      0\n"
2401 "Total free space (fordblks):           0\n"
2402 "Topmost releasable block (keepcost):   0\n"
2403
2404 #. type: Plain text
2405 #: build/C/man3/mallinfo.3:189
2406 #, no-wrap
2407 msgid ""
2408 "============== After allocating blocks ==============\n"
2409 "Total non-mmapped bytes (arena):       135168\n"
2410 "# of free chunks (ordblks):            1\n"
2411 "# of free fastbin blocks (smblks):     0\n"
2412 "# of mapped regions (hblks):           0\n"
2413 "Bytes in mapped regions (hblkhd):      0\n"
2414 "Max. total allocated space (usmblks):  0\n"
2415 "Free bytes held in fastbins (fsmblks): 0\n"
2416 "Total allocated space (uordblks):      104000\n"
2417 "Total free space (fordblks):           31168\n"
2418 "Topmost releasable block (keepcost):   31168\n"
2419 msgstr ""
2420 "============== After allocating blocks ==============\n"
2421 "Total non-mmapped bytes (arena):       135168\n"
2422 "# of free chunks (ordblks):            1\n"
2423 "# of free fastbin blocks (smblks):     0\n"
2424 "# of mapped regions (hblks):           0\n"
2425 "Bytes in mapped regions (hblkhd):      0\n"
2426 "Max. total allocated space (usmblks):  0\n"
2427 "Free bytes held in fastbins (fsmblks): 0\n"
2428 "Total allocated space (uordblks):      104000\n"
2429 "Total free space (fordblks):           31168\n"
2430 "Topmost releasable block (keepcost):   31168\n"
2431
2432 #. type: Plain text
2433 #: build/C/man3/mallinfo.3:201
2434 #, no-wrap
2435 msgid ""
2436 "============== After freeing blocks ==============\n"
2437 "Total non-mmapped bytes (arena):       135168\n"
2438 "# of free chunks (ordblks):            501\n"
2439 "# of free fastbin blocks (smblks):     0\n"
2440 "# of mapped regions (hblks):           0\n"
2441 "Bytes in mapped regions (hblkhd):      0\n"
2442 "Max. total allocated space (usmblks):  0\n"
2443 "Free bytes held in fastbins (fsmblks): 0\n"
2444 "Total allocated space (uordblks):      52000\n"
2445 "Total free space (fordblks):           83168\n"
2446 "Topmost releasable block (keepcost):   31168\n"
2447 msgstr ""
2448 "============== After freeing blocks ==============\n"
2449 "Total non-mmapped bytes (arena):       135168\n"
2450 "# of free chunks (ordblks):            501\n"
2451 "# of free fastbin blocks (smblks):     0\n"
2452 "# of mapped regions (hblks):           0\n"
2453 "Bytes in mapped regions (hblkhd):      0\n"
2454 "Max. total allocated space (usmblks):  0\n"
2455 "Free bytes held in fastbins (fsmblks): 0\n"
2456 "Total allocated space (uordblks):      52000\n"
2457 "Total free space (fordblks):           83168\n"
2458 "Topmost releasable block (keepcost):   31168\n"
2459
2460 #. type: SS
2461 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2462 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2463 #: build/C/man2/mmap.2:645 build/C/man2/mprotect.2:164
2464 #, no-wrap
2465 msgid "Program source"
2466 msgstr "プログラムのソース"
2467
2468 #. type: Plain text
2469 #: build/C/man3/mallinfo.3:208
2470 #, no-wrap
2471 msgid ""
2472 "#include E<lt>malloc.hE<gt>\n"
2473 "#include \"tlpi_hdr.h\"\n"
2474 msgstr ""
2475 "#include E<lt>malloc.hE<gt>\n"
2476 "#include \"tlpi_hdr.h\"\n"
2477
2478 #. type: Plain text
2479 #: build/C/man3/mallinfo.3:213
2480 #, no-wrap
2481 msgid ""
2482 "static void\n"
2483 "display_mallinfo(void)\n"
2484 "{\n"
2485 "    struct mallinfo mi;\n"
2486 msgstr ""
2487 "static void\n"
2488 "display_mallinfo(void)\n"
2489 "{\n"
2490 "    struct mallinfo mi;\n"
2491
2492 #. type: Plain text
2493 #: build/C/man3/mallinfo.3:215
2494 #, no-wrap
2495 msgid "    mi = mallinfo();\n"
2496 msgstr "    mi = mallinfo();\n"
2497
2498 #. type: Plain text
2499 #: build/C/man3/mallinfo.3:227
2500 #, no-wrap
2501 msgid ""
2502 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2503 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2504 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2505 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2506 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2507 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2508 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2509 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2510 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2511 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2512 "}\n"
2513 msgstr ""
2514 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2515 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2516 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2517 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2518 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2519 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2520 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2521 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2522 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2523 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2524 "}\n"
2525
2526 #. type: Plain text
2527 #: build/C/man3/mallinfo.3:235
2528 #, no-wrap
2529 msgid ""
2530 "int\n"
2531 "main(int argc, char *argv[])\n"
2532 "{\n"
2533 "#define MAX_ALLOCS 2000000\n"
2534 "    char *alloc[MAX_ALLOCS];\n"
2535 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2536 "    size_t blockSize;\n"
2537 msgstr ""
2538 "int\n"
2539 "main(int argc, char *argv[])\n"
2540 "{\n"
2541 "#define MAX_ALLOCS 2000000\n"
2542 "    char *alloc[MAX_ALLOCS];\n"
2543 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2544 "    size_t blockSize;\n"
2545
2546 #. type: Plain text
2547 #: build/C/man3/mallinfo.3:239
2548 #, no-wrap
2549 msgid ""
2550 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2551 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2552 "                \"[end-free]]]\\en\", argv[0]);\n"
2553 msgstr ""
2554 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2555 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2556 "                \"[end-free]]]\\en\", argv[0]);\n"
2557
2558 #. type: Plain text
2559 #: build/C/man3/mallinfo.3:245
2560 #, no-wrap
2561 msgid ""
2562 "    numBlocks = atoi(argv[1]);\n"
2563 "    blockSize = atoi(argv[2]);\n"
2564 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2565 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2566 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2567 msgstr ""
2568 "    numBlocks = atoi(argv[1]);\n"
2569 "    blockSize = atoi(argv[2]);\n"
2570 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2571 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2572 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2573
2574 #. type: Plain text
2575 #: build/C/man3/mallinfo.3:248
2576 #, no-wrap
2577 msgid ""
2578 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2579 "    display_mallinfo();\n"
2580 msgstr ""
2581 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2582 "    display_mallinfo();\n"
2583
2584 #. type: Plain text
2585 #: build/C/man3/mallinfo.3:252
2586 #, no-wrap
2587 msgid ""
2588 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2589 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2590 "            fatal(\"Too many allocations\");\n"
2591 msgstr ""
2592 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2593 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2594 "            fatal(\"Too many allocations\");\n"
2595
2596 #. type: Plain text
2597 #: build/C/man3/mallinfo.3:257
2598 #, no-wrap
2599 msgid ""
2600 "        alloc[j] = malloc(blockSize);\n"
2601 "        if (alloc[j] == NULL)\n"
2602 "            errExit(\"malloc\");\n"
2603 "    }\n"
2604 msgstr ""
2605 "        alloc[j] = malloc(blockSize);\n"
2606 "        if (alloc[j] == NULL)\n"
2607 "            errExit(\"malloc\");\n"
2608 "    }\n"
2609
2610 #. type: Plain text
2611 #: build/C/man3/mallinfo.3:260
2612 #, no-wrap
2613 msgid ""
2614 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2615 "    display_mallinfo();\n"
2616 msgstr ""
2617 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2618 "    display_mallinfo();\n"
2619
2620 #. type: Plain text
2621 #: build/C/man3/mallinfo.3:263
2622 #, no-wrap
2623 msgid ""
2624 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2625 "        free(alloc[j]);\n"
2626 msgstr ""
2627 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2628 "        free(alloc[j]);\n"
2629
2630 #. type: Plain text
2631 #: build/C/man3/mallinfo.3:266
2632 #, no-wrap
2633 msgid ""
2634 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2635 "    display_mallinfo();\n"
2636 msgstr ""
2637 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2638 "    display_mallinfo();\n"
2639
2640 #. type: Plain text
2641 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2642 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2643 #: build/C/man2/mmap.2:714 build/C/man2/memfd_create.2:437
2644 #: build/C/man2/memfd_create.2:486
2645 #, no-wrap
2646 msgid ""
2647 "    exit(EXIT_SUCCESS);\n"
2648 "}\n"
2649 msgstr ""
2650 "    exit(EXIT_SUCCESS);\n"
2651 "}\n"
2652
2653 #. type: Plain text
2654 #: build/C/man3/mallinfo.3:279
2655 msgid ""
2656 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2657 "B<malloc_trim>(3), B<mallopt>(3)"
2658 msgstr ""
2659 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2660 "B<malloc_trim>(3), B<mallopt>(3)"
2661
2662 #. type: TH
2663 #: build/C/man3/malloc_get_state.3:25
2664 #, no-wrap
2665 msgid "MALLOC_GET_STATE"
2666 msgstr "MALLOC_GET_STATE"
2667
2668 #. type: TH
2669 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2670 #, no-wrap
2671 msgid "2014-06-13"
2672 msgstr "2014-06-13"
2673
2674 #. type: Plain text
2675 #: build/C/man3/malloc_get_state.3:28
2676 msgid ""
2677 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2678 "implementation"
2679 msgstr "malloc_get_state, malloc_set_state - malloc 実装の状態を保存/復元する"
2680
2681 #. type: Plain text
2682 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2683 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2684 #, no-wrap
2685 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2686 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2687
2688 #. type: Plain text
2689 #: build/C/man3/malloc_get_state.3:33
2690 #, no-wrap
2691 msgid "B<void* malloc_get_state(void);>\n"
2692 msgstr "B<void* malloc_get_state(void);>\n"
2693
2694 #. type: Plain text
2695 #: build/C/man3/malloc_get_state.3:35
2696 #, no-wrap
2697 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2698 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2699
2700 #. type: Plain text
2701 #: build/C/man3/malloc_get_state.3:53
2702 msgid ""
2703 "The B<malloc_get_state>()  function records the current state of all "
2704 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2705 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2706 "is recorded in a system-dependent opaque data structure dynamically "
2707 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2708 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2709 "this memory.)"
2710 msgstr ""
2711 "B<malloc_get_state>() 関数は B<malloc>(3) 内部のすべての管理用変数を記録する "
2712 "(ただし、 ヒープの実際の内容と B<malloc_hook>(3) 関数ポインターの状態は記録さ"
2713 "れない)。 状態は B<malloc>(3) で動的に確保されたシステム依存の opaque な (内"
2714 "部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体"
2715 "へのポインターが返される (このメモリーは呼び出し元が責任をもって B<free>(3) "
2716 "する必要がある)。"
2717
2718 #. type: Plain text
2719 #: build/C/man3/malloc_get_state.3:61
2720 msgid ""
2721 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2722 "internal bookkeeping variables to the values recorded in the opaque data "
2723 "structure pointed to by I<state>."
2724 msgstr ""
2725 "B<malloc_set_state>() 関数は、 B<malloc>(3) 内部のすべての管理用変数を "
2726 "I<state> が指す opaque なデータ構造体から復元する。"
2727
2728 #. type: Plain text
2729 #: build/C/man3/malloc_get_state.3:68
2730 msgid ""
2731 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2732 "opaque data structure.  On error (for example, memory could not be allocated "
2733 "for the data structure), B<malloc_get_state>()  returns NULL."
2734 msgstr ""
2735 "成功すると、 B<malloc_get_state>() は新しく割り当てられたデータ構造体へのポイ"
2736 "ンターを返す。 エラーの場合 (例えば、データ構造体に必要なメモリーが割り当てら"
2737 "れなかったなど)、 B<malloc_get_state>() は NULL を返す。"
2738
2739 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2740 #.  /* Must fail if the major version is too high. */
2741 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2742 #. type: Plain text
2743 #: build/C/man3/malloc_get_state.3:86
2744 msgid ""
2745 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2746 "that I<state> does not point to a correctly formed data structure, "
2747 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2748 "version of the data structure referred to by I<state> is a more recent "
2749 "version than this implementation knows about, B<malloc_set_state>()  returns "
2750 "-2."
2751 msgstr ""
2752 "成功すると、 B<malloc_set_state>() は 0 を返す。 実装が I<state> が正しく作成"
2753 "されたデータ構造体を指していないと検出した場合、 B<malloc_set_state>() は -1 "
2754 "を返す。 I<state> が参照するデータ構造体のバージョンがこの実装が認識するバー"
2755 "ジョンよりも新しいと実装が検出した場合、 B<malloc_set_state>() は -2 を返す。"
2756
2757 #. type: Plain text
2758 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2759 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2760 msgid "These functions are GNU extensions."
2761 msgstr "これらの関数は GNU による拡張である。"
2762
2763 #. type: Plain text
2764 #: build/C/man3/malloc_get_state.3:94
2765 msgid ""
2766 "These functions are useful when using this B<malloc>(3)  implementation as "
2767 "part of a shared library, and the heap contents are saved/restored via some "
2768 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2769 "\" function."
2770 msgstr ""
2771 "これらの関数が役に立つのは、 この B<malloc>(3) の実装が共有ライブラリの一部と"
2772 "して使用され、 ヒープの内容が何か他の方法で保存/復元される場合である。 この手"
2773 "法は GNU Emacs が「ダンプ」関数 (\"dumping\" function) を実装するのに使用され"
2774 "ている。"
2775
2776 #.  i.e., calls __malloc_check_init()
2777 #.  i.e., malloc checking is not already in use
2778 #.  and the caller requested malloc checking
2779 #. type: Plain text
2780 #: build/C/man3/malloc_get_state.3:111
2781 msgid ""
2782 "Hook function pointers are never saved or restored by these functions, with "
2783 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2784 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2785 "checking hooks if possible; if malloc checking was not in use in the "
2786 "recorded state, but the caller has requested malloc checking, then the hooks "
2787 "are reset to 0."
2788 msgstr ""
2789 "これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 "
2790 "つ例外がある。 B<malloc_get_state>() が呼び出された際に malloc チェック "
2791 "(B<mallopt>(3) 参照) が使用中の場合、 B<malloc_set_state>() は可能なら "
2792 "malloc チェックフックをリセットする。 また、 保存された状態の malloc チェック"
2793 "が使用中でないが、 呼び出し元が malloc チェックを要求していた場合、 フックは "
2794 "0 にリセットされる。"
2795
2796 #. type: Plain text
2797 #: build/C/man3/malloc_get_state.3:114
2798 msgid "B<malloc>(3), B<mallopt>(3)"
2799 msgstr "B<malloc>(3), B<mallopt>(3)"
2800
2801 #. type: TH
2802 #: build/C/man3/malloc_hook.3:10
2803 #, no-wrap
2804 msgid "MALLOC_HOOK"
2805 msgstr "MALLOC_HOOK"
2806
2807 #. type: TH
2808 #: build/C/man3/malloc_hook.3:10
2809 #, no-wrap
2810 msgid "2010-10-13"
2811 msgstr "2010-10-13"
2812
2813 #. type: Plain text
2814 #: build/C/man3/malloc_hook.3:15
2815 msgid ""
2816 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2817 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2818 msgstr ""
2819 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2820 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2821
2822 #. type: Plain text
2823 #: build/C/man3/malloc_hook.3:20
2824 #, no-wrap
2825 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2826 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2827
2828 #. type: Plain text
2829 #: build/C/man3/malloc_hook.3:23
2830 #, no-wrap
2831 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2832 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2833
2834 #. type: Plain text
2835 #: build/C/man3/malloc_hook.3:26
2836 #, no-wrap
2837 msgid ""
2838 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2839 "B<                         const void *>I<caller>B<);>\n"
2840 msgstr ""
2841 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2842 "B<                         const void *>I<caller>B<);>\n"
2843
2844 #. type: Plain text
2845 #: build/C/man3/malloc_hook.3:28
2846 #, no-wrap
2847 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2848 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2849
2850 #. type: Plain text
2851 #: build/C/man3/malloc_hook.3:30
2852 #, no-wrap
2853 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2854 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2855
2856 #. type: Plain text
2857 #: build/C/man3/malloc_hook.3:32
2858 #, no-wrap
2859 msgid "B<void (*__after_morecore_hook)(void);>\n"
2860 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2861
2862 #. type: Plain text
2863 #: build/C/man3/malloc_hook.3:43
2864 msgid ""
2865 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2866 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2867 "You can use these hooks to help you debug programs that use dynamic memory "
2868 "allocation, for example."
2869 msgstr ""
2870 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2871 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2872 "ば、動的にメモリー割り当てを行う プログラムのデバッグにこれらのフックを使うこ"
2873 "とができる。"
2874
2875 #. type: Plain text
2876 #: build/C/man3/malloc_hook.3:50
2877 msgid ""
2878 "The variable B<__malloc_initialize_hook> points at a function that is called "
2879 "once when the malloc implementation is initialized.  This is a weak "
2880 "variable, so it can be overridden in the application with a definition like "
2881 "the following:"
2882 msgstr ""
2883 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2884 "ばれる関数へのポインターである。 この変数は書き換え可能 (weak) であり、アプリ"
2885 "ケーション内で 以下のような定義で上書きできる:"
2886
2887 #. type: Plain text
2888 #: build/C/man3/malloc_hook.3:53
2889 #, no-wrap
2890 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2891 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2892
2893 #. type: Plain text
2894 #: build/C/man3/malloc_hook.3:58
2895 msgid ""
2896 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2897 msgstr ""
2898 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2899
2900 #. type: Plain text
2901 #: build/C/man3/malloc_hook.3:74
2902 msgid ""
2903 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2904 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2905 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2906 "except that they have a final argument I<caller> that gives the address of "
2907 "the caller of B<malloc>(3), etc."
2908 msgstr ""
2909 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2910 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2911 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2912 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2913 "出し元 (caller) のアドレスが格納される。"
2914
2915 #. type: Plain text
2916 #: build/C/man3/malloc_hook.3:80
2917 msgid ""
2918 "The variable B<__after_morecore_hook> points at a function that is called "
2919 "each time after B<sbrk>(2)  was asked for more memory."
2920 msgstr ""
2921 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2922 "後で毎回呼び出される関数へのポインターである。"
2923
2924 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2925 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2926 #. type: Plain text
2927 #: build/C/man3/malloc_hook.3:89
2928 msgid ""
2929 "The use of these hook functions is not safe in multithreaded programs, and "
2930 "they are now deprecated.  Programmers should instead preempt calls to the "
2931 "relevant functions by defining and exporting functions such as \"malloc\" "
2932 "and \"free\"."
2933 msgstr ""
2934 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2935 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2936 "公開して、 関連する関数を呼び出すようにすべきである。"
2937
2938 #. type: Plain text
2939 #: build/C/man3/malloc_hook.3:91
2940 msgid "Here is a short example of how to use these variables."
2941 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2942
2943 #. type: Plain text
2944 #: build/C/man3/malloc_hook.3:95
2945 #, no-wrap
2946 msgid ""
2947 "#include E<lt>stdio.hE<gt>\n"
2948 "#include E<lt>malloc.hE<gt>\n"
2949 msgstr ""
2950 "#include E<lt>stdio.hE<gt>\n"
2951 "#include E<lt>malloc.hE<gt>\n"
2952
2953 #. type: Plain text
2954 #: build/C/man3/malloc_hook.3:99
2955 #, no-wrap
2956 msgid ""
2957 "/* Prototypes for our hooks.  */\n"
2958 "static void my_init_hook(void);\n"
2959 "static void *my_malloc_hook(size_t, const void *);\n"
2960 msgstr ""
2961 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2962 "static void my_init_hook(void);\n"
2963 "static void *my_malloc_hook(size_t, const void *);\n"
2964
2965 #. type: Plain text
2966 #: build/C/man3/malloc_hook.3:102
2967 #, no-wrap
2968 msgid ""
2969 "/* Variables to save original hooks. */\n"
2970 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2971 msgstr ""
2972 "/* 元々のフックを保存するための変数 */\n"
2973 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2974
2975 #. type: Plain text
2976 #: build/C/man3/malloc_hook.3:105
2977 #, no-wrap
2978 msgid ""
2979 "/* Override initializing hook from the C library. */\n"
2980 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2981 msgstr ""
2982 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2983 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2984
2985 #. type: Plain text
2986 #: build/C/man3/malloc_hook.3:112
2987 #, no-wrap
2988 msgid ""
2989 "static void\n"
2990 "my_init_hook(void)\n"
2991 "{\n"
2992 "    old_malloc_hook = __malloc_hook;\n"
2993 "    __malloc_hook = my_malloc_hook;\n"
2994 "}\n"
2995 msgstr ""
2996 "static void\n"
2997 "my_init_hook(void)\n"
2998 "{\n"
2999 "    old_malloc_hook = __malloc_hook;\n"
3000 "    __malloc_hook = my_malloc_hook;\n"
3001 "}\n"
3002
3003 #. type: Plain text
3004 #: build/C/man3/malloc_hook.3:117
3005 #, no-wrap
3006 msgid ""
3007 "static void *\n"
3008 "my_malloc_hook(size_t size, const void *caller)\n"
3009 "{\n"
3010 "    void *result;\n"
3011 msgstr ""
3012 "static void *\n"
3013 "my_malloc_hook(size_t size, const void *caller)\n"
3014 "{\n"
3015 "    void *result;\n"
3016
3017 #. type: Plain text
3018 #: build/C/man3/malloc_hook.3:120
3019 #, no-wrap
3020 msgid ""
3021 "    /* Restore all old hooks */\n"
3022 "    __malloc_hook = old_malloc_hook;\n"
3023 msgstr ""
3024 "    /* 元々のフックを全て戻す */\n"
3025 "    __malloc_hook = old_malloc_hook;\n"
3026
3027 #. type: Plain text
3028 #: build/C/man3/malloc_hook.3:123
3029 #, no-wrap
3030 msgid ""
3031 "    /* Call recursively */\n"
3032 "    result = malloc(size);\n"
3033 msgstr ""
3034 "    /* malloc の再帰的呼び出し */\n"
3035 "    result = malloc(size);\n"
3036
3037 #. type: Plain text
3038 #: build/C/man3/malloc_hook.3:126
3039 #, no-wrap
3040 msgid ""
3041 "    /* Save underlying hooks */\n"
3042 "    old_malloc_hook = __malloc_hook;\n"
3043 msgstr ""
3044 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
3045 "    old_malloc_hook = __malloc_hook;\n"
3046
3047 #. type: Plain text
3048 #: build/C/man3/malloc_hook.3:130
3049 #, no-wrap
3050 msgid ""
3051 "    /* printf() might call malloc(), so protect it too. */\n"
3052 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3053 "            (unsigned int) size, caller, result);\n"
3054 msgstr ""
3055 "    /* printf() は malloc() を呼び出す可能性があるので\n"
3056 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
3057 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3058 "            (unsigned int) size, caller, result);\n"
3059
3060 #. type: Plain text
3061 #: build/C/man3/malloc_hook.3:133
3062 #, no-wrap
3063 msgid ""
3064 "    /* Restore our own hooks */\n"
3065 "    __malloc_hook = my_malloc_hook;\n"
3066 msgstr ""
3067 "    /* ユーザーが使おうとするフックを再設定する */\n"
3068 "    __malloc_hook = my_malloc_hook;\n"
3069
3070 #. type: Plain text
3071 #: build/C/man3/malloc_hook.3:136
3072 #, no-wrap
3073 msgid ""
3074 "    return result;\n"
3075 "}\n"
3076 msgstr ""
3077 "    return result;\n"
3078 "}\n"
3079
3080 #. type: Plain text
3081 #: build/C/man3/malloc_hook.3:142
3082 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3083 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3084
3085 #. type: TH
3086 #: build/C/man3/malloc_info.3:25
3087 #, no-wrap
3088 msgid "MALLOC_INFO"
3089 msgstr "MALLOC_INFO"
3090
3091 #. type: Plain text
3092 #: build/C/man3/malloc_info.3:28
3093 msgid "malloc_info - export malloc state to a stream"
3094 msgstr "malloc_info - malloc の状態をストリームに出力する"
3095
3096 #. type: Plain text
3097 #: build/C/man3/malloc_info.3:33
3098 #, no-wrap
3099 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3100 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3101
3102 #. type: Plain text
3103 #: build/C/man3/malloc_info.3:44
3104 msgid ""
3105 "The B<malloc_info>()  function exports an XML string that describes the "
3106 "current state of the memory-allocation implementation in the caller.  The "
3107 "string is printed on the file stream I<stream>.  The exported string "
3108 "includes information about all arenas (see B<malloc>(3))."
3109 msgstr ""
3110 "B<malloc_info>() 関数は、 呼び出し元のメモリー割り当て実装の現在の状態を表す "
3111 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<stream> に出力され"
3112 "る。 出力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) "
3113 "参照)。"
3114
3115 #. type: Plain text
3116 #: build/C/man3/malloc_info.3:48
3117 msgid "As currently implemented, I<options> must be zero."
3118 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3119
3120 #. type: Plain text
3121 #: build/C/man3/malloc_info.3:55
3122 msgid ""
3123 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3124 "I<errno> set to indicate the cause."
3125 msgstr ""
3126 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3127 "I<errno> にエラーの原因を示す値を設定する。"
3128
3129 #. type: Plain text
3130 #: build/C/man3/malloc_info.3:60
3131 msgid "I<options> was nonzero."
3132 msgstr "I<options> が 0 でなかった。"
3133
3134 #. type: Plain text
3135 #: build/C/man3/malloc_info.3:63
3136 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3137 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3138
3139 #. type: Plain text
3140 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3141 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3142 msgid "This function is a GNU extension."
3143 msgstr "この関数は GNU による拡張である。"
3144
3145 #. type: Plain text
3146 #: build/C/man3/malloc_info.3:71
3147 msgid ""
3148 "The memory-allocation information is provided as an XML string (rather than "
3149 "a C structure)  because the information may change over time (according to "
3150 "changes in the underlying implementation).  The output XML string includes a "
3151 "version field."
3152 msgstr ""
3153 "メモリー割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3154 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3155 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3156
3157 #. type: Plain text
3158 #: build/C/man3/malloc_info.3:77
3159 msgid ""
3160 "The B<open_memstream>(3)  function can be used to send the output of "
3161 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3162 msgstr ""
3163 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3164 "なくメモリー内のバッファーに直接送ることができる。"
3165
3166 #. type: Plain text
3167 #: build/C/man3/malloc_info.3:84
3168 msgid ""
3169 "The B<malloc_info>()  function is designed to address deficiencies in "
3170 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3171 msgstr ""
3172 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3173 "るために設定された。"
3174
3175 #. type: Plain text
3176 #: build/C/man3/malloc_info.3:95
3177 msgid ""
3178 "The program below takes up to four command-line arguments, of which the "
3179 "first three are mandatory.  The first argument specifies the number of "
3180 "threads that the program should create.  All of the threads, including the "
3181 "main thread, allocate the number of blocks of memory specified by the second "
3182 "argument.  The third argument controls the size of the blocks to be "
3183 "allocated.  The main thread creates blocks of this size, the second thread "
3184 "created by the program allocates blocks of twice this size, the third thread "
3185 "allocates blocks of three times this size, and so on."
3186 msgstr ""
3187 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3188 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3189 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリーブロックの割り当て"
3190 "を行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこ"
3191 "のサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこの"
3192 "サイズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイ"
3193 "ズのブロックを割り当て、 以下同様である。"
3194
3195 #. type: Plain text
3196 #: build/C/man3/malloc_info.3:102
3197 msgid ""
3198 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3199 "state.  The first call takes place before any threads are created or memory "
3200 "allocated.  The second call is performed after all threads have allocated "
3201 "memory."
3202 msgstr ""
3203 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリー割り当て状態を表示"
3204 "する。 最初の呼び出しはスレッドの生成もメモリーの割り当ても行われる前に実行さ"
3205 "れる。 2 回目の呼び出しは全てのスレッドがメモリー割り当てを行った後に実行され"
3206 "る。"
3207
3208 #. type: Plain text
3209 #: build/C/man3/malloc_info.3:110
3210 msgid ""
3211 "In the following example, the command-line arguments specify the creation of "
3212 "one additional thread, and both the main thread and the additional thread "
3213 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3214 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3215 msgstr ""
3216 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3217 "レッドと追加のスレッドの両方が 10000 個のメモリーブロックを割り当てるように指"
3218 "定している。 メモリーブロックの割り当て後の B<malloc_info>() では、 2 つの割"
3219 "り当て領域の状態が表示されている。"
3220
3221 #. type: Plain text
3222 #: build/C/man3/malloc_info.3:135
3223 #, no-wrap
3224 msgid ""
3225 "$ B<getconf GNU_LIBC_VERSION>\n"
3226 "glibc 2.13\n"
3227 "$ B<./a.out 1 10000 100>\n"
3228 "============ Before allocating blocks ============\n"
3229 "E<lt>malloc version=\"1\"E<gt>\n"
3230 "E<lt>heap nr=\"0\"E<gt>\n"
3231 "E<lt>sizesE<gt>\n"
3232 "E<lt>/sizesE<gt>\n"
3233 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3234 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3235 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3236 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3237 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3238 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3239 "E<lt>/heapE<gt>\n"
3240 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3241 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3242 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3243 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3244 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3245 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3246 "E<lt>/mallocE<gt>\n"
3247 msgstr ""
3248 "$ B<getconf GNU_LIBC_VERSION>\n"
3249 "glibc 2.13\n"
3250 "$ B<./a.out 1 10000 100>\n"
3251 "============ Before allocating blocks ============\n"
3252 "E<lt>malloc version=\"1\"E<gt>\n"
3253 "E<lt>heap nr=\"0\"E<gt>\n"
3254 "E<lt>sizesE<gt>\n"
3255 "E<lt>/sizesE<gt>\n"
3256 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3257 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3258 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3259 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3260 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3261 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3262 "E<lt>/heapE<gt>\n"
3263 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3264 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3265 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3266 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3267 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3268 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3269 "E<lt>/mallocE<gt>\n"
3270
3271 #. type: Plain text
3272 #: build/C/man3/malloc_info.3:165
3273 #, no-wrap
3274 msgid ""
3275 "============ After allocating blocks ============\n"
3276 "E<lt>malloc version=\"1\"E<gt>\n"
3277 "E<lt>heap nr=\"0\"E<gt>\n"
3278 "E<lt>sizesE<gt>\n"
3279 "E<lt>/sizesE<gt>\n"
3280 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3281 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3282 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3283 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3284 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3285 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3286 "E<lt>/heapE<gt>\n"
3287 "E<lt>heap nr=\"1\"E<gt>\n"
3288 "E<lt>sizesE<gt>\n"
3289 "E<lt>/sizesE<gt>\n"
3290 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3291 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3292 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3293 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3294 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3295 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3296 "E<lt>/heapE<gt>\n"
3297 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3298 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3299 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3300 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3301 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3302 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3303 "E<lt>/mallocE<gt>\n"
3304 msgstr ""
3305 "============ After allocating blocks ============\n"
3306 "E<lt>malloc version=\"1\"E<gt>\n"
3307 "E<lt>heap nr=\"0\"E<gt>\n"
3308 "E<lt>sizesE<gt>\n"
3309 "E<lt>/sizesE<gt>\n"
3310 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3311 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3312 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3313 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3314 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3315 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3316 "E<lt>/heapE<gt>\n"
3317 "E<lt>heap nr=\"1\"E<gt>\n"
3318 "E<lt>sizesE<gt>\n"
3319 "E<lt>/sizesE<gt>\n"
3320 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3321 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3322 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3323 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3324 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3325 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3326 "E<lt>/heapE<gt>\n"
3327 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3328 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3329 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3330 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3331 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3332 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3333 "E<lt>/mallocE<gt>\n"
3334
3335 #. type: Plain text
3336 #: build/C/man3/malloc_info.3:175
3337 #, no-wrap
3338 msgid ""
3339 "#include E<lt>unistd.hE<gt>\n"
3340 "#include E<lt>stdlib.hE<gt>\n"
3341 "#include E<lt>pthread.hE<gt>\n"
3342 "#include E<lt>malloc.hE<gt>\n"
3343 "#include E<lt>errno.hE<gt>\n"
3344 msgstr ""
3345 "#include E<lt>unistd.hE<gt>\n"
3346 "#include E<lt>stdlib.hE<gt>\n"
3347 "#include E<lt>pthread.hE<gt>\n"
3348 "#include E<lt>malloc.hE<gt>\n"
3349 "#include E<lt>errno.hE<gt>\n"
3350
3351 #. type: Plain text
3352 #: build/C/man3/malloc_info.3:178
3353 #, no-wrap
3354 msgid ""
3355 "static size_t blockSize;\n"
3356 "static int numThreads, numBlocks;\n"
3357 msgstr ""
3358 "static size_t blockSize;\n"
3359 "static int numThreads, numBlocks;\n"
3360
3361 #. type: Plain text
3362 #: build/C/man3/malloc_info.3:181 build/C/man2/memfd_create.2:368
3363 #: build/C/man2/memfd_create.2:450
3364 #, no-wrap
3365 msgid ""
3366 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3367 "                        } while (0)\n"
3368 msgstr ""
3369 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3370 "                        } while (0)\n"
3371
3372 #. type: Plain text
3373 #: build/C/man3/malloc_info.3:187
3374 #, no-wrap
3375 msgid ""
3376 "static void *\n"
3377 "thread_func(void *arg)\n"
3378 "{\n"
3379 "    int j;\n"
3380 "    int tn = (int) arg;\n"
3381 msgstr ""
3382 "static void *\n"
3383 "thread_func(void *arg)\n"
3384 "{\n"
3385 "    int j;\n"
3386 "    int tn = (int) arg;\n"
3387
3388 #. type: Plain text
3389 #: build/C/man3/malloc_info.3:190
3390 #, no-wrap
3391 msgid ""
3392 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3393 "       the main thread) allocates a different amount of memory */\n"
3394 msgstr ""
3395 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3396 "       the main thread) allocates a different amount of memory */\n"
3397
3398 #. type: Plain text
3399 #: build/C/man3/malloc_info.3:194
3400 #, no-wrap
3401 msgid ""
3402 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3403 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3404 "            errExit(\"malloc-thread\");\n"
3405 msgstr ""
3406 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3407 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3408 "            errExit(\"malloc-thread\");\n"
3409
3410 #. type: Plain text
3411 #: build/C/man3/malloc_info.3:198
3412 #, no-wrap
3413 msgid ""
3414 "    sleep(100);         /* Sleep until main thread terminates */\n"
3415 "    return NULL;\n"
3416 "}\n"
3417 msgstr ""
3418 "    sleep(100);         /* Sleep until main thread terminates */\n"
3419 "    return NULL;\n"
3420 "}\n"
3421
3422 #. type: Plain text
3423 #: build/C/man3/malloc_info.3:204
3424 #, no-wrap
3425 msgid ""
3426 "int\n"
3427 "main(int argc, char *argv[])\n"
3428 "{\n"
3429 "    int j, tn, sleepTime;\n"
3430 "    pthread_t *thr;\n"
3431 msgstr ""
3432 "int\n"
3433 "main(int argc, char *argv[])\n"
3434 "{\n"
3435 "    int j, tn, sleepTime;\n"
3436 "    pthread_t *thr;\n"
3437
3438 #. type: Plain text
3439 #: build/C/man3/malloc_info.3:211
3440 #, no-wrap
3441 msgid ""
3442 "    if (argc E<lt> 4) {\n"
3443 "        fprintf(stderr,\n"
3444 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3445 "                argv[0]);\n"
3446 "        exit(EXIT_FAILURE);\n"
3447 "    }\n"
3448 msgstr ""
3449 "    if (argc E<lt> 4) {\n"
3450 "        fprintf(stderr,\n"
3451 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3452 "                argv[0]);\n"
3453 "        exit(EXIT_FAILURE);\n"
3454 "    }\n"
3455
3456 #. type: Plain text
3457 #: build/C/man3/malloc_info.3:216
3458 #, no-wrap
3459 msgid ""
3460 "    numThreads = atoi(argv[1]);\n"
3461 "    numBlocks = atoi(argv[2]);\n"
3462 "    blockSize = atoi(argv[3]);\n"
3463 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3464 msgstr ""
3465 "    numThreads = atoi(argv[1]);\n"
3466 "    numBlocks = atoi(argv[2]);\n"
3467 "    blockSize = atoi(argv[3]);\n"
3468 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3469
3470 #. type: Plain text
3471 #: build/C/man3/malloc_info.3:220
3472 #, no-wrap
3473 msgid ""
3474 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3475 "    if (thr == NULL)\n"
3476 "        errExit(\"calloc\");\n"
3477 msgstr ""
3478 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3479 "    if (thr == NULL)\n"
3480 "        errExit(\"calloc\");\n"
3481
3482 #. type: Plain text
3483 #: build/C/man3/malloc_info.3:223
3484 #, no-wrap
3485 msgid ""
3486 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3487 "    malloc_info(0, stdout);\n"
3488 msgstr ""
3489 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3490 "    malloc_info(0, stdout);\n"
3491
3492 #. type: Plain text
3493 #: build/C/man3/malloc_info.3:225
3494 #, no-wrap
3495 msgid "    /* Create threads that allocate different amounts of memory */\n"
3496 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3497
3498 #. type: Plain text
3499 #: build/C/man3/malloc_info.3:231
3500 #, no-wrap
3501 msgid ""
3502 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3503 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3504 "                               (void *) tn);\n"
3505 "        if (errno != 0)\n"
3506 "            errExit(\"pthread_create\");\n"
3507 msgstr ""
3508 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3509 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3510 "                               (void *) tn);\n"
3511 "        if (errno != 0)\n"
3512 "            errExit(\"pthread_create\");\n"
3513
3514 #. type: Plain text
3515 #: build/C/man3/malloc_info.3:236
3516 #, no-wrap
3517 msgid ""
3518 "        /* If we add a sleep interval after the start-up of each\n"
3519 "           thread, the threads likely won\\(aqt contend for malloc\n"
3520 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3521 "           allocated (see malloc(3)). */\n"
3522 msgstr ""
3523 "        /* If we add a sleep interval after the start-up of each\n"
3524 "           thread, the threads likely won\\(aqt contend for malloc\n"
3525 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3526 "           allocated (see malloc(3)). */\n"
3527
3528 #. type: Plain text
3529 #: build/C/man3/malloc_info.3:240
3530 #, no-wrap
3531 msgid ""
3532 "        if (sleepTime E<gt> 0)\n"
3533 "            sleep(sleepTime);\n"
3534 "    }\n"
3535 msgstr ""
3536 "        if (sleepTime E<gt> 0)\n"
3537 "            sleep(sleepTime);\n"
3538 "    }\n"
3539
3540 #. type: Plain text
3541 #: build/C/man3/malloc_info.3:242
3542 #, no-wrap
3543 msgid "    /* The main thread also allocates some memory */\n"
3544 msgstr "    /* The main thread also allocates some memory */\n"
3545
3546 #. type: Plain text
3547 #: build/C/man3/malloc_info.3:246
3548 #, no-wrap
3549 msgid ""
3550 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3551 "        if (malloc(blockSize) == NULL)\n"
3552 "            errExit(\"malloc\");\n"
3553 msgstr ""
3554 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3555 "        if (malloc(blockSize) == NULL)\n"
3556 "            errExit(\"malloc\");\n"
3557
3558 #. type: Plain text
3559 #: build/C/man3/malloc_info.3:249
3560 #, no-wrap
3561 msgid ""
3562 "    sleep(2);           /* Give all threads a chance to\n"
3563 "                           complete allocations */\n"
3564 msgstr ""
3565 "    sleep(2);           /* Give all threads a chance to\n"
3566 "                           complete allocations */\n"
3567
3568 #. type: Plain text
3569 #: build/C/man3/malloc_info.3:252
3570 #, no-wrap
3571 msgid ""
3572 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3573 "    malloc_info(0, stdout);\n"
3574 msgstr ""
3575 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3576 "    malloc_info(0, stdout);\n"
3577
3578 #. type: Plain text
3579 #: build/C/man3/malloc_info.3:262
3580 msgid ""
3581 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3582 "B<open_memstream>(3)"
3583 msgstr ""
3584 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3585 "B<open_memstream>(3)"
3586
3587 #. type: TH
3588 #: build/C/man3/malloc_stats.3:26
3589 #, no-wrap
3590 msgid "MALLOC_STATS"
3591 msgstr "MALLOC_STATS"
3592
3593 #. type: Plain text
3594 #: build/C/man3/malloc_stats.3:29
3595 msgid "malloc_stats - print memory allocation statistics"
3596 msgstr "malloc_stats - メモリー割り当ての統計を表示する"
3597
3598 #. type: Plain text
3599 #: build/C/man3/malloc_stats.3:33
3600 msgid "B<void malloc_stats(void);>"
3601 msgstr "B<void malloc_stats(void);>"
3602
3603 #.  .SH VERSIONS
3604 #.  Available already in glibc 2.0, possibly earlier
3605 #. type: Plain text
3606 #: build/C/man3/malloc_stats.3:55
3607 msgid ""
3608 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3609 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3610 "(allocation area), this function prints the total amount of memory allocated "
3611 "and the total number of bytes consumed by in-use allocations.  (These two "
3612 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3613 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3614 "statistics for all arenas, and the maximum number of blocks and bytes that "
3615 "were ever simultaneously allocated using B<mmap>(2)."
3616 msgstr ""
3617 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3618 "リーに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3619 "て、 この関数は割り当てられているメモリーの総量と現在の割り当てが使用している"
3620 "総バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる "
3621 "I<arena> と I<uordblks> フィールドに対応している)。 また、この関数は、 すべて"
3622 "の領域のこれら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てら"
3623 "れたブロック数とバイト数の最大値を表示する。"
3624
3625 #. type: Plain text
3626 #: build/C/man3/malloc_stats.3:61
3627 msgid ""
3628 "More detailed information about memory allocations in the main arena can be "
3629 "obtained using B<mallinfo>(3)."
3630 msgstr ""
3631 "B<mallinfo>(3) を使用すると、 メイン領域のメモリー割り当てに関するより詳細な"
3632 "情報を取得できる。"
3633
3634 #. type: Plain text
3635 #: build/C/man3/malloc_stats.3:67
3636 msgid ""
3637 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3638 msgstr ""
3639 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3640
3641 #. type: TH
3642 #: build/C/man3/malloc_trim.3:26
3643 #, no-wrap
3644 msgid "MALLOC_TRIM"
3645 msgstr "MALLOC_TRIM"
3646
3647 #. type: TH
3648 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3649 #, no-wrap
3650 msgid "2014-05-28"
3651 msgstr "2014-05-28"
3652
3653 #. type: Plain text
3654 #: build/C/man3/malloc_trim.3:29
3655 msgid "malloc_trim - release free memory from the top of the heap"
3656 msgstr "malloc_trim - ヒープの一番上から未使用メモリーを解放する"
3657
3658 #. type: Plain text
3659 #: build/C/man3/malloc_trim.3:33
3660 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3661 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3662
3663 #. type: Plain text
3664 #: build/C/man3/malloc_trim.3:40
3665 msgid ""
3666 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3667 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3668 msgstr ""
3669 "B<malloc_trim>() 関数は (適切な引き数で B<sbrk>(2) を呼び出して) ヒープの一番"
3670 "上の未使用メモリーの解放を試みる。"
3671
3672 #. type: Plain text
3673 #: build/C/man3/malloc_trim.3:51
3674 msgid ""
3675 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3676 "the top of the heap.  If this argument is 0, only the minimum amount of "
3677 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3678 "nonzero argument can be used to maintain some trailing space at the top of "
3679 "the heap in order to allow future allocations to be made without having to "
3680 "extend the heap with B<sbrk>(2)."
3681 msgstr ""
3682 "I<pad> 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定す"
3683 "る。 この引き数が 0 の場合、 ヒープの一番上の最小量のメモリーだけを維持でき"
3684 "る (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、 ヒープの一番上"
3685 "にある程度の量の未使用領域を残し、 将来の割り当てを B<sbrk>(2) でヒープを拡張"
3686 "せずに行えるようにできる。"
3687
3688 #. type: Plain text
3689 #: build/C/man3/malloc_trim.3:56
3690 msgid ""
3691 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3692 "back to the system, or 0 if it was not possible to release any memory."
3693 msgstr ""
3694 "B<malloc_trim>() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を"
3695 "返し、 どのメモリーも解放できなかった場合は 0 を返す。"
3696
3697 #.  .SH VERSIONS
3698 #.  Available already in glibc 2.0, possibly earlier
3699 #. type: Plain text
3700 #: build/C/man3/malloc_trim.3:60
3701 msgid "No errors are defined."
3702 msgstr "エラーは定義されていない。"
3703
3704 #. type: Plain text
3705 #: build/C/man3/malloc_trim.3:71
3706 msgid ""
3707 "This function is automatically called by B<free>(3)  in certain "
3708 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3709 "B<mallopt>(3)."
3710 msgstr ""
3711 "この関数は、 特定の状況では B<free>(3) により自動的に呼び出される。 "
3712 "B<mallopt>(3) の B<M_TOP_PAD> と B<M_TRIM_THRESHOLD> の議論を参照。"
3713
3714 #. type: Plain text
3715 #: build/C/man3/malloc_trim.3:74
3716 msgid ""
3717 "This function cannot release free memory located at places other than the "
3718 "top of the heap."
3719 msgstr ""
3720 "この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはでき"
3721 "ない。"
3722
3723 #.  malloc/malloc.c::mTRIm():
3724 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3725 #. type: Plain text
3726 #: build/C/man3/malloc_trim.3:78
3727 msgid "This function releases only memory in the main arena."
3728 msgstr "この関数はメイン領域のメモリーだけを解放する。"
3729
3730 #. type: Plain text
3731 #: build/C/man3/malloc_trim.3:82
3732 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3733 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3734
3735 #. type: TH
3736 #: build/C/man3/malloc_usable_size.3:25
3737 #, no-wrap
3738 msgid "MALLOC_USABLE_SIZE"
3739 msgstr "MALLOC_USABLE_SIZE"
3740
3741 #. type: Plain text
3742 #: build/C/man3/malloc_usable_size.3:28
3743 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3744 msgstr ""
3745 "malloc_usable_size - ヒープから確保したメモリーブロックのサイズを取得する"
3746
3747 #. type: Plain text
3748 #: build/C/man3/malloc_usable_size.3:32
3749 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3750 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3751
3752 #. type: Plain text
3753 #: build/C/man3/malloc_usable_size.3:40
3754 msgid ""
3755 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3756 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3757 "B<malloc>(3)  or a related function."
3758 msgstr ""
3759 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3760 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリーブロックへ"
3761 "のポインターである。"
3762
3763 #. type: Plain text
3764 #: build/C/man3/malloc_usable_size.3:48
3765 msgid ""
3766 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3767 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3768 msgstr ""
3769 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリーブロックで使用可"
3770 "能なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3771
3772 #. type: Plain text
3773 #: build/C/man3/malloc_usable_size.3:53
3774 msgid "The B<malloc_usable_size>()  function is thread-safe."
3775 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3776
3777 #. type: Plain text
3778 #: build/C/man3/malloc_usable_size.3:65
3779 msgid ""
3780 "The value returned by B<malloc_usable_size>()  may be greater than the "
3781 "requested size of the allocation because of alignment and minimum size "
3782 "constraints.  Although the excess bytes can be overwritten by the "
3783 "application without ill effects, this is not good programming practice: the "
3784 "number of excess bytes in an allocation depends on the underlying "
3785 "implementation."
3786 msgstr ""
3787 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3788 "がある。 これは、メモリーアラインメントと最小サイズの制約のためである。 この"
3789 "超過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行"
3790 "うのはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超"
3791 "過バイトの量は、内部の実装に依存する。"
3792
3793 #. type: Plain text
3794 #: build/C/man3/malloc_usable_size.3:67
3795 msgid "The main use of this function is for debugging and introspection."
3796 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3797
3798 #. type: Plain text
3799 #: build/C/man3/malloc_usable_size.3:69
3800 msgid "B<malloc>(3)"
3801 msgstr "B<malloc>(3)"
3802
3803 #. type: TH
3804 #: build/C/man3/mallopt.3:26
3805 #, no-wrap
3806 msgid "MALLOPT"
3807 msgstr "MALLOPT"
3808
3809 #. type: TH
3810 #: build/C/man3/mallopt.3:26 build/C/man2/shmop.2:41
3811 #, no-wrap
3812 msgid "2014-07-08"
3813 msgstr "2014-07-08"
3814
3815 #. type: Plain text
3816 #: build/C/man3/mallopt.3:29
3817 msgid "mallopt - set memory allocation parameters"
3818 msgstr "mallopt - メモリー割り当てパラメーターを設定する"
3819
3820 #. type: Plain text
3821 #: build/C/man3/mallopt.3:33
3822 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3823 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3824
3825 #. type: Plain text
3826 #: build/C/man3/mallopt.3:44
3827 msgid ""
3828 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3829 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3830 "specifies the parameter to be modified, and I<value> specifies the new value "
3831 "for that parameter."
3832 msgstr ""
3833 "B<mallopt>() 関数は、メモリー割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3834 "制御するパラメーターの調整を行う。\n"
3835 "I<param> 引き数で変更するパラメーターを指定し、\n"
3836 "I<value> 引き数でそのパラメーターの新しい値を指定する。"
3837
3838 #. type: Plain text
3839 #: build/C/man3/mallopt.3:47
3840 msgid "The following values can be specified for I<param>:"
3841 msgstr "I<param> には以下の値を指定することができる。"
3842
3843 #. type: TP
3844 #: build/C/man3/mallopt.3:47
3845 #, no-wrap
3846 msgid "B<M_CHECK_ACTION>"
3847 msgstr "B<M_CHECK_ACTION>"
3848
3849 #. type: Plain text
3850 #: build/C/man3/mallopt.3:53
3851 msgid ""
3852 "Setting this parameter controls how glibc responds when various kinds of "
3853 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3854 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3855 "parameter determine the glibc behavior, as follows:"
3856 msgstr ""
3857
3858 #. type: TP
3859 #: build/C/man3/mallopt.3:54
3860 #, no-wrap
3861 msgid "Bit 0"
3862 msgstr "Bit 0"
3863
3864 #. type: Plain text
3865 #: build/C/man3/mallopt.3:64
3866 msgid ""
3867 "If this bit is set, then print a one-line message on I<stderr> that provides "
3868 "details about the error.  The message starts with the string \"***\\ glibc "
3869 "detected\\ ***\", followed by the program name, the name of the memory-"
3870 "allocation function in which the error was detected, a brief description of "
3871 "the error, and the memory address where the error was detected."
3872 msgstr ""
3873
3874 #. type: TP
3875 #: build/C/man3/mallopt.3:64
3876 #, no-wrap
3877 msgid "Bit 1"
3878 msgstr "Bit 1"
3879
3880 #. type: Plain text
3881 #: build/C/man3/mallopt.3:79
3882 msgid ""
3883 "If this bit is set, then, after printing any error message specified by bit "
3884 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3885 "since 2.4, if bit 0 is also set, then, between printing the error message "
3886 "and aborting, the program also prints a stack trace in the manner of "
3887 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3888 "proc/[pid]/maps> (see B<proc>(5))."
3889 msgstr ""
3890
3891 #. type: TP
3892 #: build/C/man3/mallopt.3:79
3893 #, no-wrap
3894 msgid "Bit 2 (since glibc 2.4)"
3895 msgstr "Bit 2 (glibc 2.4 以降)"
3896
3897 #. type: Plain text
3898 #: build/C/man3/mallopt.3:86
3899 msgid ""
3900 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3901 "the one-line message describing the error is simplified to contain just the "
3902 "name of the function where the error was detected and the brief description "
3903 "of the error."
3904 msgstr ""
3905
3906 #. type: Plain text
3907 #: build/C/man3/mallopt.3:91
3908 msgid "The remaining bits in I<value> are ignored."
3909 msgstr ""
3910
3911 #. type: Plain text
3912 #: build/C/man3/mallopt.3:95
3913 msgid ""
3914 "Combining the above details, the following numeric values are meaningful for "
3915 "B<M_CHECK_ACTION>:"
3916 msgstr ""
3917
3918 #. type: IP
3919 #: build/C/man3/mallopt.3:96
3920 #, no-wrap
3921 msgid "0"
3922 msgstr "0"
3923
3924 #. type: Plain text
3925 #: build/C/man3/mallopt.3:98
3926 msgid "Ignore error conditions; continue execution (with undefined results)."
3927 msgstr ""
3928
3929 #. type: IP
3930 #: build/C/man3/mallopt.3:98
3931 #, no-wrap
3932 msgid "1"
3933 msgstr "1"
3934
3935 #. type: Plain text
3936 #: build/C/man3/mallopt.3:100
3937 msgid "Print a detailed error message and continue execution."
3938 msgstr ""
3939
3940 #. type: IP
3941 #: build/C/man3/mallopt.3:100
3942 #, no-wrap
3943 msgid "2"
3944 msgstr "2"
3945
3946 #. type: Plain text
3947 #: build/C/man3/mallopt.3:102
3948 msgid "Abort the program."
3949 msgstr ""
3950
3951 #. type: IP
3952 #: build/C/man3/mallopt.3:102
3953 #, no-wrap
3954 msgid "3"
3955 msgstr "3"
3956
3957 #. type: Plain text
3958 #: build/C/man3/mallopt.3:105
3959 msgid ""
3960 "Print detailed error message, stack trace, and memory mappings, and abort "
3961 "the program."
3962 msgstr ""
3963
3964 #. type: IP
3965 #: build/C/man3/mallopt.3:105
3966 #, no-wrap
3967 msgid "5"
3968 msgstr "5"
3969
3970 #. type: Plain text
3971 #: build/C/man3/mallopt.3:107
3972 msgid "Print a simple error message and continue execution."
3973 msgstr ""
3974
3975 #. type: IP
3976 #: build/C/man3/mallopt.3:107
3977 #, no-wrap
3978 msgid "7"
3979 msgstr "7"
3980
3981 #. type: Plain text
3982 #: build/C/man3/mallopt.3:110
3983 msgid ""
3984 "Print simple error message, stack trace, and memory mappings, and abort the "
3985 "program."
3986 msgstr ""
3987
3988 #. type: Plain text
3989 #: build/C/man3/mallopt.3:116
3990 msgid ""
3991 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3992 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3993 msgstr ""
3994
3995 #. type: Plain text
3996 #: build/C/man3/mallopt.3:121
3997 msgid ""
3998 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3999 "crash may happen much later, and the true cause of the problem is then very "
4000 "hard to track down."
4001 msgstr ""
4002
4003 #. type: TP
4004 #: build/C/man3/mallopt.3:121
4005 #, no-wrap
4006 msgid "B<M_MMAP_MAX>"
4007 msgstr "B<M_MMAP_MAX>"
4008
4009 #.  The following text adapted from comments in the glibc source:
4010 #. type: Plain text
4011 #: build/C/man3/mallopt.3:131
4012 msgid ""
4013 "This parameter specifies the maximum number of allocation requests that may "
4014 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
4015 "some systems have a limited number of internal tables for use by B<mmap>(2), "
4016 "and using more than a few of them may degrade performance."
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: build/C/man3/mallopt.3:138
4021 msgid ""
4022 "The default value is 65,536, a value which has no special significance and "
4023 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
4024 "use of B<mmap>(2)  for servicing large allocation requests."
4025 msgstr ""
4026
4027 #. type: TP
4028 #: build/C/man3/mallopt.3:138
4029 #, no-wrap
4030 msgid "B<M_MMAP_THRESHOLD>"
4031 msgstr "B<M_MMAP_THRESHOLD>"
4032
4033 #. type: Plain text
4034 #: build/C/man3/mallopt.3:147
4035 msgid ""
4036 "For allocations greater than or equal to the limit specified (in bytes) by "
4037 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
4038 "allocation functions employ B<mmap>(2)  instead of increasing the program "
4039 "break using B<sbrk>(2)."
4040 msgstr ""
4041
4042 #. type: Plain text
4043 #: build/C/man3/mallopt.3:167
4044 msgid ""
4045 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
4046 "allocated memory blocks can always be independently released back to the "
4047 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
4048 "the top end.)  On the other hand, there are some disadvantages to the use of "
4049 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
4050 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
4051 "be page-aligned; and the kernel must perform the expensive task of zeroing "
4052 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
4053 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
4054 msgstr ""
4055
4056 #. type: Plain text
4057 #: build/C/man3/mallopt.3:174
4058 msgid ""
4059 "The lower limit for this parameter is 0.  The upper limit is "
4060 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
4061 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
4062 msgstr ""
4063
4064 #. type: Plain text
4065 #: build/C/man3/mallopt.3:192
4066 msgid ""
4067 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
4068 "initial value of the threshold is 128*1024, but when blocks larger than the "
4069 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
4070 "are freed, the threshold is adjusted upward to the size of the freed block.  "
4071 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
4072 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
4073 "Dynamic adjustment of the mmap threshold is disabled if any of the "
4074 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
4075 "parameters is set."
4076 msgstr ""
4077
4078 #. type: TP
4079 #: build/C/man3/mallopt.3:192
4080 #, no-wrap
4081 msgid "B<M_MXFAST> (since glibc 2.3)"
4082 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
4083
4084 #.  The following text adapted from comments in the glibc sources:
4085 #. type: Plain text
4086 #: build/C/man3/mallopt.3:212
4087 msgid ""
4088 "Set the upper limit for memory allocation requests that are satisfied using "
4089 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
4090 "are storage areas that hold deallocated blocks of memory of the same size "
4091 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
4092 "the same size can be handled very quickly by allocating from the fastbin, "
4093 "although memory fragmentation and the overall memory footprint of the "
4094 "program can increase.  The default value for this parameter is "
4095 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
4096 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
4097 "disables the use of fastbins."
4098 msgstr ""
4099
4100 #. type: TP
4101 #: build/C/man3/mallopt.3:212
4102 #, no-wrap
4103 msgid "B<M_PERTURB> (since glibc 2.4)"
4104 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4105
4106 #. type: Plain text
4107 #: build/C/man3/mallopt.3:227
4108 msgid ""
4109 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4110 "(other than allocations via B<calloc>(3))  are initialized to the complement "
4111 "of the value in the least significant byte of I<value>, and when allocated "
4112 "memory is released using B<free>(3), the freed bytes are set to the least "
4113 "significant byte of I<value>.  This can be useful for detecting errors where "
4114 "programs incorrectly rely on allocated memory being initialized to zero, or "
4115 "reuse values in memory that has already been freed."
4116 msgstr ""
4117
4118 #. type: TP
4119 #: build/C/man3/mallopt.3:227
4120 #, no-wrap
4121 msgid "B<M_TOP_PAD>"
4122 msgstr "B<M_TOP_PAD>"
4123
4124 #. type: Plain text
4125 #: build/C/man3/mallopt.3:234
4126 msgid ""
4127 "This parameter defines the amount of padding to employ when calling "
4128 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4129 "parameter is bytes.)  This parameter has an effect in the following "
4130 "circumstances:"
4131 msgstr ""
4132
4133 #. type: Plain text
4134 #: build/C/man3/mallopt.3:241
4135 msgid ""
4136 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4137 "the B<sbrk>(2)  request."
4138 msgstr ""
4139
4140 #. type: Plain text
4141 #: build/C/man3/mallopt.3:247
4142 msgid ""
4143 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4144 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4145 "top of the heap."
4146 msgstr ""
4147
4148 #. type: Plain text
4149 #: build/C/man3/mallopt.3:251
4150 msgid ""
4151 "In either case, the amount of padding is always rounded to a system page "
4152 "boundary."
4153 msgstr ""
4154
4155 #. type: Plain text
4156 #: build/C/man3/mallopt.3:258
4157 msgid ""
4158 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4159 "system calls (when the parameter is set low)  and wasting unused memory at "
4160 "the top of the heap (when the parameter is set high)."
4161 msgstr ""
4162
4163 #.  DEFAULT_TOP_PAD in glibc source
4164 #. type: Plain text
4165 #: build/C/man3/mallopt.3:261
4166 msgid "The default value for this parameter is 128*1024."
4167 msgstr ""
4168
4169 #. type: TP
4170 #: build/C/man3/mallopt.3:261
4171 #, no-wrap
4172 msgid "B<M_TRIM_THRESHOLD>"
4173 msgstr "B<M_TRIM_THRESHOLD>"
4174
4175 #. type: Plain text
4176 #: build/C/man3/mallopt.3:277
4177 msgid ""
4178 "When the amount of contiguous free memory at the top of the heap grows "
4179 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4180 "back to the system.  (This can be useful in programs that continue to "
4181 "execute for a long period after freeing a significant amount of memory.)  "
4182 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4183 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4184 msgstr ""
4185
4186 #. type: Plain text
4187 #: build/C/man3/mallopt.3:282
4188 msgid ""
4189 "The default value for this parameter is 128*1024.  Setting "
4190 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4191 msgstr ""
4192
4193 #
4194 #
4195 #
4196 #.  FIXME Do the arena parameters need to be documented?
4197 #.  .TP
4198 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4199 #.  .TP
4200 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4201 #.  Environment variables
4202 #.      MALLOC_ARENA_MAX_
4203 #.      MALLOC_ARENA_TEST_
4204 #.  http://udrepper.livejournal.com/20948.html describes some details
4205 #.      of the MALLOC_ARENA_* environment variables.
4206 #.  These macros aren't enabled in production releases until 2.15?
4207 #.  (see glibc malloc/Makefile)
4208 #. type: Plain text
4209 #: build/C/man3/mallopt.3:305
4210 msgid ""
4211 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4212 "of system calls (when the parameter is set low)  and wasting unused memory "
4213 "at the top of the heap (when the parameter is set high)."
4214 msgstr ""
4215
4216 #. type: SS
4217 #: build/C/man3/mallopt.3:305
4218 #, no-wrap
4219 msgid "Environment variables"
4220 msgstr "環境変数"
4221
4222 #. type: Plain text
4223 #: build/C/man3/mallopt.3:320
4224 msgid ""
4225 "A number of environment variables can be defined to modify some of the same "
4226 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4227 "advantage that the source code of the program need not be changed.  To be "
4228 "effective, these variables must be defined before the first call to a memory-"
4229 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4230 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4231 "these variables are ignored in set-user-ID and set-group-ID programs."
4232 msgstr ""
4233
4234 #. type: Plain text
4235 #: build/C/man3/mallopt.3:323
4236 msgid ""
4237 "The environment variables are as follows (note the trailing underscore at "
4238 "the end of the name of each variable):"
4239 msgstr ""
4240
4241 #. type: TP
4242 #: build/C/man3/mallopt.3:323
4243 #, no-wrap
4244 msgid "B<MALLOC_CHECK_>"
4245 msgstr "B<MALLOC_CHECK_>"
4246
4247 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4248 #.  when MALLOC_CHECK_ was set.
4249 #. type: Plain text
4250 #: build/C/man3/mallopt.3:340
4251 msgid ""
4252 "This environment variable controls the same parameter as B<mallopt>()  "
4253 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4254 "special implementation of the memory-allocation functions is used.  (This is "
4255 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4256 "performs additional error checking, but is slower than the standard set of "
4257 "memory-allocation functions.  (This implementation does not detect all "
4258 "possible errors; memory leaks can still occur.)"
4259 msgstr ""
4260
4261 #. type: Plain text
4262 #: build/C/man3/mallopt.3:345
4263 msgid ""
4264 "The value assigned to this environment variable should be a single digit, "
4265 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4266 "the initial digit are ignored."
4267 msgstr ""
4268
4269 #. type: Plain text
4270 #: build/C/man3/mallopt.3:354
4271 msgid ""
4272 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4273 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4274 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4275 "also has an effect for set-user-ID and set-group-ID programs."
4276 msgstr ""
4277
4278 #. type: TP
4279 #: build/C/man3/mallopt.3:354
4280 #, no-wrap
4281 msgid "B<MALLOC_MMAP_MAX_>"
4282 msgstr "B<MALLOC_MMAP_MAX_>"
4283
4284 #. type: Plain text
4285 #: build/C/man3/mallopt.3:359
4286 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4287 msgstr ""
4288
4289 #. type: TP
4290 #: build/C/man3/mallopt.3:359
4291 #, no-wrap
4292 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4293 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4294
4295 #. type: Plain text
4296 #: build/C/man3/mallopt.3:364
4297 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4298 msgstr ""
4299
4300 #. type: TP
4301 #: build/C/man3/mallopt.3:364
4302 #, no-wrap
4303 msgid "B<MALLOC_PERTURB_>"
4304 msgstr "B<MALLOC_PERTURB_>"
4305
4306 #. type: Plain text
4307 #: build/C/man3/mallopt.3:369
4308 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4309 msgstr ""
4310
4311 #. type: TP
4312 #: build/C/man3/mallopt.3:369
4313 #, no-wrap
4314 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4315 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4316
4317 #. type: Plain text
4318 #: build/C/man3/mallopt.3:374
4319 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4320 msgstr ""
4321
4322 #. type: TP
4323 #: build/C/man3/mallopt.3:374
4324 #, no-wrap
4325 msgid "B<MALLOC_TOP_PAD_>"
4326 msgstr "B<MALLOC_TOP_PAD_>"
4327
4328 #. type: Plain text
4329 #: build/C/man3/mallopt.3:379
4330 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4331 msgstr ""
4332
4333 #. type: Plain text
4334 #: build/C/man3/mallopt.3:384
4335 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4336 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4337
4338 #.  .SH VERSIONS
4339 #.  Available already in glibc 2.0, possibly earlier
4340 #. type: Plain text
4341 #: build/C/man3/mallopt.3:392
4342 msgid "On error, I<errno> is I<not> set."
4343 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4344
4345 #.  .SH NOTES
4346 #. type: Plain text
4347 #: build/C/man3/mallopt.3:406
4348 msgid ""
4349 "This function is not specified by POSIX or the C standards.  A similar "
4350 "function exists on many System V derivatives, but the range of values for "
4351 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4352 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4353 "implemented in glibc."
4354 msgstr ""
4355
4356 #. type: Plain text
4357 #: build/C/man3/mallopt.3:410
4358 msgid "Specifying an invalid value for I<param> does not generate an error."
4359 msgstr ""
4360
4361 #.  FIXME . This looks buggy:
4362 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4363 #.  malloc requests are rounded up:
4364 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4365 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4366 #. type: Plain text
4367 #: build/C/man3/mallopt.3:418
4368 msgid ""
4369 "A calculation error within the glibc implementation means that a call of the "
4370 "form:"
4371 msgstr ""
4372
4373 #. type: Plain text
4374 #: build/C/man3/mallopt.3:421
4375 #, no-wrap
4376 msgid "    mallopt(M_MXFAST, n)\n"
4377 msgstr "    mallopt(M_MXFAST, n)\n"
4378
4379 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4380 #. type: Plain text
4381 #: build/C/man3/mallopt.3:433
4382 msgid ""
4383 "does not result in fastbins being employed for all allocations of size up to "
4384 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4385 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4386 "integer."
4387 msgstr ""
4388
4389 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4390 #. type: Plain text
4391 #: build/C/man3/mallopt.3:454
4392 msgid ""
4393 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4394 "of allocated memory are initialized to the complement of the byte in "
4395 "I<value>, and when that memory is freed, the bytes of the region are "
4396 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4397 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4398 "precisely the block of memory being freed by the call I<free(p)>, the block "
4399 "starting at I<p+sizeof(size_t)> is initialized."
4400 msgstr ""
4401
4402 #. type: Plain text
4403 #: build/C/man3/mallopt.3:463
4404 msgid ""
4405 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4406 "is supplied with an (integer) command-line argument, then that argument is "
4407 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4408 "block of memory, and frees it twice (an error)."
4409 msgstr ""
4410
4411 #. type: Plain text
4412 #: build/C/man3/mallopt.3:467
4413 msgid ""
4414 "The following shell session shows what happens when we run this program "
4415 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4416 msgstr ""
4417
4418 #. type: Plain text
4419 #: build/C/man3/mallopt.3:487
4420 #, no-wrap
4421 msgid ""
4422 "$ B<./a.out>\n"
4423 "main(): returned from first free() call\n"
4424 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4425 "======= Backtrace: =========\n"
4426 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4427 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4428 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4429 "\\&./a.out[0x80485db]\n"
4430 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4431 "\\&./a.out[0x8048471]\n"
4432 "======= Memory map: ========\n"
4433 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4434 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4435 "[some lines omitted]\n"
4436 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4437 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4438 "Aborted (core dumped)\n"
4439 msgstr ""
4440 "$ B<./a.out>\n"
4441 "main(): returned from first free() call\n"
4442 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4443 "======= Backtrace: =========\n"
4444 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4445 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4446 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4447 "\\&./a.out[0x80485db]\n"
4448 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4449 "\\&./a.out[0x8048471]\n"
4450 "======= Memory map: ========\n"
4451 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4452 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4453 "[some lines omitted]\n"
4454 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4455 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4456 "Aborted (core dumped)\n"
4457
4458 #. type: Plain text
4459 #: build/C/man3/mallopt.3:492
4460 msgid ""
4461 "The following runs show the results when employing other values for "
4462 "B<M_CHECK_ACTION>:"
4463 msgstr ""
4464
4465 #. type: Plain text
4466 #: build/C/man3/mallopt.3:505
4467 #, no-wrap
4468 msgid ""
4469 "$ B<./a.out 1>             # Diagnose error and continue\n"
4470 "main(): returned from first free() call\n"
4471 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4472 "main(): returned from second free() call\n"
4473 "$ B<./a.out 2>             # Abort without error message\n"
4474 "main(): returned from first free() call\n"
4475 "Aborted (core dumped)\n"
4476 "$ B<./a.out 0>             # Ignore error and continue\n"
4477 "main(): returned from first free() call\n"
4478 "main(): returned from second free() call\n"
4479 msgstr ""
4480 "$ B<./a.out 1>             # Diagnose error and continue\n"
4481 "main(): returned from first free() call\n"
4482 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4483 "main(): returned from second free() call\n"
4484 "$ B<./a.out 2>             # Abort without error message\n"
4485 "main(): returned from first free() call\n"
4486 "Aborted (core dumped)\n"
4487 "$ B<./a.out 0>             # Ignore error and continue\n"
4488 "main(): returned from first free() call\n"
4489 "main(): returned from second free() call\n"
4490
4491 #. type: Plain text
4492 #: build/C/man3/mallopt.3:511
4493 msgid ""
4494 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4495 "environment variable:"
4496 msgstr ""
4497
4498 #. type: Plain text
4499 #: build/C/man3/mallopt.3:518
4500 #, no-wrap
4501 msgid ""
4502 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4503 "main(): returned from first free() call\n"
4504 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4505 "main(): returned from second free() call\n"
4506 msgstr ""
4507 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4508 "main(): returned from first free() call\n"
4509 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4510 "main(): returned from second free() call\n"
4511
4512 #. type: Plain text
4513 #: build/C/man3/mallopt.3:526
4514 #, no-wrap
4515 msgid ""
4516 "#include E<lt>malloc.hE<gt>\n"
4517 "#include E<lt>stdio.hE<gt>\n"
4518 "#include E<lt>stdlib.hE<gt>\n"
4519 msgstr ""
4520 "#include E<lt>malloc.hE<gt>\n"
4521 "#include E<lt>stdio.hE<gt>\n"
4522 "#include E<lt>stdlib.hE<gt>\n"
4523
4524 #. type: Plain text
4525 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4526 #, no-wrap
4527 msgid ""
4528 "int\n"
4529 "main(int argc, char *argv[])\n"
4530 "{\n"
4531 "    char *p;\n"
4532 msgstr ""
4533 "int\n"
4534 "main(int argc, char *argv[])\n"
4535 "{\n"
4536 "    char *p;\n"
4537
4538 #. type: Plain text
4539 #: build/C/man3/mallopt.3:538
4540 #, no-wrap
4541 msgid ""
4542 "    if (argc E<gt> 1) {\n"
4543 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4544 "            fprintf(stderr, \"mallopt() failed\");\n"
4545 "            exit(EXIT_FAILURE);\n"
4546 "        }\n"
4547 "    }\n"
4548 msgstr ""
4549 "    if (argc E<gt> 1) {\n"
4550 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4551 "            fprintf(stderr, \"mallopt() failed\");\n"
4552 "            exit(EXIT_FAILURE);\n"
4553 "        }\n"
4554 "    }\n"
4555
4556 #. type: Plain text
4557 #: build/C/man3/mallopt.3:544
4558 #, no-wrap
4559 msgid ""
4560 "    p = malloc(1000);\n"
4561 "    if (p == NULL) {\n"
4562 "        fprintf(stderr, \"malloc() failed\");\n"
4563 "        exit(EXIT_FAILURE);\n"
4564 "    }\n"
4565 msgstr ""
4566 "    p = malloc(1000);\n"
4567 "    if (p == NULL) {\n"
4568 "        fprintf(stderr, \"malloc() failed\");\n"
4569 "        exit(EXIT_FAILURE);\n"
4570 "    }\n"
4571
4572 #. type: Plain text
4573 #: build/C/man3/mallopt.3:547
4574 #, no-wrap
4575 msgid ""
4576 "    free(p);\n"
4577 "    printf(\"main(): returned from first free() call\\en\");\n"
4578 msgstr ""
4579 "    free(p);\n"
4580 "    printf(\"main(): returned from first free() call\\en\");\n"
4581
4582 #. type: Plain text
4583 #: build/C/man3/mallopt.3:550
4584 #, no-wrap
4585 msgid ""
4586 "    free(p);\n"
4587 "    printf(\"main(): returned from second free() call\\en\");\n"
4588 msgstr ""
4589 "    free(p);\n"
4590 "    printf(\"main(): returned from second free() call\\en\");\n"
4591
4592 #. type: Plain text
4593 #: build/C/man3/mallopt.3:568
4594 msgid ""
4595 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4596 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4597 "B<mtrace>(3), B<posix_memalign>(3)"
4598 msgstr ""
4599 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4600 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4601 "B<mtrace>(3), B<posix_memalign>(3)"
4602
4603 #. type: TH
4604 #: build/C/man3/mcheck.3:25
4605 #, no-wrap
4606 msgid "MCHECK"
4607 msgstr "MCHECK"
4608
4609 #. type: TH
4610 #: build/C/man3/mcheck.3:25
4611 #, no-wrap
4612 msgid "2014-01-11"
4613 msgstr "2014-01-11"
4614
4615 #. type: Plain text
4616 #: build/C/man3/mcheck.3:28
4617 msgid ""
4618 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4619 msgstr ""
4620
4621 #. type: Plain text
4622 #: build/C/man3/mcheck.3:31
4623 #, no-wrap
4624 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4625 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4626
4627 #. type: Plain text
4628 #: build/C/man3/mcheck.3:33
4629 #, no-wrap
4630 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4631 msgstr ""
4632
4633 #. type: Plain text
4634 #: build/C/man3/mcheck.3:35
4635 #, no-wrap
4636 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4637 msgstr ""
4638
4639 #. type: Plain text
4640 #: build/C/man3/mcheck.3:37
4641 #, no-wrap
4642 msgid "B<void mcheck_check_all(void);>\n"
4643 msgstr "B<void mcheck_check_all(void);>\n"
4644
4645 #. type: Plain text
4646 #: build/C/man3/mcheck.3:39
4647 #, no-wrap
4648 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4649 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4650
4651 #. type: Plain text
4652 #: build/C/man3/mcheck.3:51
4653 msgid ""
4654 "The B<mcheck>()  function installs a set of debugging hooks for the "
4655 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4656 "certain consistency checks to be performed on the state of the heap.  The "
4657 "checks can detect application errors such as freeing a block of memory more "
4658 "than once or corrupting the bookkeeping data structures that immediately "
4659 "precede a block of allocated memory."
4660 msgstr ""
4661
4662 #. type: Plain text
4663 #: build/C/man3/mcheck.3:63
4664 msgid ""
4665 "To be effective, the B<mcheck>()  function must be called before the first "
4666 "call to B<malloc>(3)  or a related function.  In cases where this is "
4667 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4668 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4669 "to a memory-allocation function."
4670 msgstr ""
4671
4672 #. type: Plain text
4673 #: build/C/man3/mcheck.3:71
4674 msgid ""
4675 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4676 "checks on all allocated blocks whenever one of the memory-allocation "
4677 "functions is called.  This can be very slow!"
4678 msgstr ""
4679
4680 #. type: Plain text
4681 #: build/C/man3/mcheck.3:78
4682 msgid ""
4683 "The B<mcheck_check_all>()  function causes an immediate check on all "
4684 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4685 "beforehand."
4686 msgstr ""
4687
4688 #. type: Plain text
4689 #: build/C/man3/mcheck.3:91
4690 msgid ""
4691 "If the system detects an inconsistency in the heap, the caller-supplied "
4692 "function pointed to by I<abortfunc> is invoked with a single argument "
4693 "argument, I<mstatus>, that indicates what type of inconsistency was "
4694 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4695 "message on I<stderr> and calls B<abort>(3)."
4696 msgstr ""
4697
4698 #. type: Plain text
4699 #: build/C/man3/mcheck.3:103
4700 msgid ""
4701 "The B<mprobe>()  function performs a consistency check on the block of "
4702 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4703 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4704 msgstr ""
4705
4706 #. type: Plain text
4707 #: build/C/man3/mcheck.3:111
4708 msgid ""
4709 "The following list describes the values returned by B<mprobe>()  or passed "
4710 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4711 msgstr ""
4712
4713 #. type: TP
4714 #: build/C/man3/mcheck.3:111
4715 #, no-wrap
4716 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4717 msgstr ""
4718
4719 #. type: Plain text
4720 #: build/C/man3/mcheck.3:116
4721 msgid ""
4722 "B<mcheck>()  was not called before the first memory allocation function was "
4723 "called.  Consistency checking is not possible."
4724 msgstr ""
4725
4726 #. type: TP
4727 #: build/C/man3/mcheck.3:116
4728 #, no-wrap
4729 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4730 msgstr ""
4731
4732 #. type: Plain text
4733 #: build/C/man3/mcheck.3:119
4734 msgid "No inconsistency detected."
4735 msgstr ""
4736
4737 #. type: TP
4738 #: build/C/man3/mcheck.3:119
4739 #, no-wrap
4740 msgid "B<MCHECK_HEAD>"
4741 msgstr "B<MCHECK_HEAD>"
4742
4743 #. type: Plain text
4744 #: build/C/man3/mcheck.3:122
4745 msgid "Memory preceding an allocated block was clobbered."
4746 msgstr ""
4747
4748 #. type: TP
4749 #: build/C/man3/mcheck.3:122
4750 #, no-wrap
4751 msgid "B<MCHECK_TAIL>"
4752 msgstr "B<MCHECK_TAIL>"
4753
4754 #. type: Plain text
4755 #: build/C/man3/mcheck.3:125
4756 msgid "Memory following an allocated block was clobbered."
4757 msgstr ""
4758
4759 #. type: TP
4760 #: build/C/man3/mcheck.3:125
4761 #, no-wrap
4762 msgid "B<MCHECK_FREE>"
4763 msgstr "B<MCHECK_FREE>"
4764
4765 #. type: Plain text
4766 #: build/C/man3/mcheck.3:129
4767 msgid "A block of memory was freed twice."
4768 msgstr ""
4769
4770 #. type: Plain text
4771 #: build/C/man3/mcheck.3:134
4772 msgid ""
4773 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4774 msgstr ""
4775
4776 #. type: Plain text
4777 #: build/C/man3/mcheck.3:145
4778 msgid ""
4779 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4780 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4781 "since at least glibc 2.0"
4782 msgstr ""
4783
4784 #.  But is MALLOC_CHECK_ slower?
4785 #. type: Plain text
4786 #: build/C/man3/mcheck.3:159
4787 msgid ""
4788 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4789 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4790 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4791 "application to be relinked."
4792 msgstr ""
4793
4794 #. type: Plain text
4795 #: build/C/man3/mcheck.3:165
4796 msgid ""
4797 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4798 "same block of memory twice.  The following shell session demonstrates what "
4799 "happens when running the program:"
4800 msgstr ""
4801
4802 #. type: Plain text
4803 #: build/C/man3/mcheck.3:170
4804 #, no-wrap
4805 msgid ""
4806 "$B< ./a.out>\n"
4807 "About to free\n"
4808 msgstr ""
4809
4810 #. type: Plain text
4811 #: build/C/man3/mcheck.3:174
4812 #, no-wrap
4813 msgid ""
4814 "About to free a second time\n"
4815 "block freed twice\n"
4816 "Aborted (core dumped)\n"
4817 msgstr ""
4818
4819 #. type: Plain text
4820 #: build/C/man3/mcheck.3:182
4821 #, no-wrap
4822 msgid ""
4823 "#include E<lt>stdlib.hE<gt>\n"
4824 "#include E<lt>stdio.hE<gt>\n"
4825 "#include E<lt>mcheck.hE<gt>\n"
4826 msgstr ""
4827 "#include E<lt>stdlib.hE<gt>\n"
4828 "#include E<lt>stdio.hE<gt>\n"
4829 "#include E<lt>mcheck.hE<gt>\n"
4830
4831 #. type: Plain text
4832 #: build/C/man3/mcheck.3:190
4833 #, no-wrap
4834 msgid ""
4835 "    if (mcheck(NULL) != 0) {\n"
4836 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4837 msgstr ""
4838
4839 #. type: Plain text
4840 #: build/C/man3/mcheck.3:193
4841 #, no-wrap
4842 msgid ""
4843 "        exit(EXIT_FAILURE);\n"
4844 "    }\n"
4845 msgstr ""
4846 "        exit(EXIT_FAILURE);\n"
4847 "    }\n"
4848
4849 #. type: Plain text
4850 #: build/C/man3/mcheck.3:195
4851 #, no-wrap
4852 msgid "    p = malloc(1000);\n"
4853 msgstr "    p = malloc(1000);\n"
4854
4855 #. type: Plain text
4856 #: build/C/man3/mcheck.3:200
4857 #, no-wrap
4858 msgid ""
4859 "    fprintf(stderr, \"About to free\\en\");\n"
4860 "    free(p);\n"
4861 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4862 "    free(p);\n"
4863 msgstr ""
4864
4865 #. type: Plain text
4866 #: build/C/man3/mcheck.3:208
4867 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4868 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4869
4870 #. type: TH
4871 #: build/C/man2/mlock.2:26
4872 #, no-wrap
4873 msgid "MLOCK"
4874 msgstr "MLOCK"
4875
4876 #. type: TH
4877 #: build/C/man2/mlock.2:26
4878 #, no-wrap
4879 msgid "2014-04-14"
4880 msgstr "2014-04-14"
4881
4882 #. type: Plain text
4883 #: build/C/man2/mlock.2:29
4884 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4885 msgstr "mlock - メモリーのロックとロック解除を行う"
4886
4887 #. type: Plain text
4888 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4889 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4890 #, no-wrap
4891 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4892 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4893
4894 #. type: Plain text
4895 #: build/C/man2/mlock.2:35
4896 #, no-wrap
4897 msgid ""
4898 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4899 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4900 msgstr ""
4901 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4902 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4903
4904 #. type: Plain text
4905 #: build/C/man2/mlock.2:38
4906 #, no-wrap
4907 msgid ""
4908 "B<int mlockall(int >I<flags>B<);>\n"
4909 "B<int munlockall(void);>\n"
4910 msgstr ""
4911 "B<int mlockall(int >I<flags>B<);>\n"
4912 "B<int munlockall(void);>\n"
4913
4914 #. type: Plain text
4915 #: build/C/man2/mlock.2:54
4916 msgid ""
4917 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4918 "process's virtual address space into RAM, preventing that memory from being "
4919 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4920 "converse operation, respectively unlocking part or all of the calling "
4921 "process's virtual address space, so that pages in the specified virtual "
4922 "address range may once more to be swapped out if required by the kernel "
4923 "memory manager.  Memory locking and unlocking are performed in units of "
4924 "whole pages."
4925 msgstr ""
4926 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4927 "間の一部または全部を RAM 上にロックし、メモリーがスワップエリアにページングさ"
4928 "れるのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出"
4929 "し元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定"
4930 "された仮想アドレス範囲のページは カーネルメモリーマネージャーから要求されれば"
4931 "スワップアウトするようになる。 メモリーのロックとロック解除はページ単位で行わ"
4932 "れる。"
4933
4934 #. type: SS
4935 #: build/C/man2/mlock.2:54
4936 #, no-wrap
4937 msgid "mlock() and munlock()"
4938 msgstr "mlock() と munlock()"
4939
4940 #. type: Plain text
4941 #: build/C/man2/mlock.2:64
4942 msgid ""
4943 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4944 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4945 "address range are guaranteed to be resident in RAM when the call returns "
4946 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4947 msgstr ""
4948 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4949 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4950 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4951 "れるまで RAM に残り続けることが保証される。"
4952
4953 #. type: Plain text
4954 #: build/C/man2/mlock.2:73
4955 msgid ""
4956 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4957 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4958 "of the specified memory range can be moved to external swap space again by "
4959 "the kernel."
4960 msgstr ""
4961 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4962 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリー"
4963 "範囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4964
4965 #. type: SS
4966 #: build/C/man2/mlock.2:73
4967 #, no-wrap
4968 msgid "mlockall() and munlockall()"
4969 msgstr "mlockall() と munlockall()"
4970
4971 #. type: Plain text
4972 #: build/C/man2/mlock.2:83
4973 msgid ""
4974 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4975 "process.  This includes the pages of the code, data and stack segment, as "
4976 "well as shared libraries, user space kernel data, shared memory, and memory-"
4977 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4978 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4979 "later unlocked."
4980 msgstr ""
4981 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4982 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4983 "ラリ、カーネルのユーザー空間データ、 共有メモリー、メモリーマップされたファイ"
4984 "ルが含まれる。 システムコールが成功した場合には全てのマップされたページは "
4985 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4986 "残り続けることが保証される。"
4987
4988 #. type: Plain text
4989 #: build/C/man2/mlock.2:88
4990 msgid ""
4991 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4992 "following constants:"
4993 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4994
4995 #. type: TP
4996 #: build/C/man2/mlock.2:88
4997 #, no-wrap
4998 msgid "B<MCL_CURRENT>"
4999 msgstr "B<MCL_CURRENT>"
5000
5001 #. type: Plain text
5002 #: build/C/man2/mlock.2:92
5003 msgid ""
5004 "Lock all pages which are currently mapped into the address space of the "
5005 "process."
5006 msgstr ""
5007 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
5008
5009 #. type: TP
5010 #: build/C/man2/mlock.2:92
5011 #, no-wrap
5012 msgid "B<MCL_FUTURE>"
5013 msgstr "B<MCL_FUTURE>"
5014
5015 #. type: Plain text
5016 #: build/C/man2/mlock.2:99
5017 msgid ""
5018 "Lock all pages which will become mapped into the address space of the "
5019 "process in the future.  These could be for instance new pages required by a "
5020 "growing heap and stack as well as new memory-mapped files or shared memory "
5021 "regions."
5022 msgstr ""
5023 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
5024 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
5025 "くメモリーマップされたファイルや共有メモリー領域もロックされる。"
5026
5027 #. type: Plain text
5028 #: build/C/man2/mlock.2:112
5029 msgid ""
5030 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
5031 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
5032 "of locked bytes to exceed the permitted maximum (see below).  In the same "
5033 "circumstances, stack growth may likewise fail: the kernel will deny stack "
5034 "expansion and deliver a B<SIGSEGV> signal to the process."
5035 msgstr ""
5036 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
5037 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
5038 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
5039 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
5040 "スに送る。"
5041
5042 #. type: Plain text
5043 #: build/C/man2/mlock.2:116
5044 msgid ""
5045 "B<munlockall>()  unlocks all pages mapped into the address space of the "
5046 "calling process."
5047 msgstr ""
5048 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
5049 "全てのページをロック解除する。"
5050
5051 #. type: Plain text
5052 #: build/C/man2/mlock.2:122
5053 msgid ""
5054 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
5055 "is set appropriately, and no changes are made to any locks in the address "
5056 "space of the process."
5057 msgstr ""
5058 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
5059 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
5060 "れない。"
5061
5062 #. type: Plain text
5063 #: build/C/man2/mlock.2:131
5064 msgid ""
5065 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
5066 "resource limit, but tried to lock more memory than the limit permitted.  "
5067 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
5068 msgstr ""
5069 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
5070 "つが、制限が許可している以上のメモリーをロックしようとした。 この制限は、プロ"
5071 "セスが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
5072
5073 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
5074 #.  take into account whether the to-be-locked range overlaps with
5075 #.  already locked pages.  Thus, suppose we allocate
5076 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
5077 #.  mlock(), and then lock the *same* page range a second time.
5078 #.  In the case, the second mlock() call will fail, since the check
5079 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
5080 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
5081 #. type: Plain text
5082 #: build/C/man2/mlock.2:143
5083 msgid ""
5084 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
5085 "RAM."
5086 msgstr ""
5087 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
5088
5089 #. SVr4 documents an additional EAGAIN error code.
5090 #. type: Plain text
5091 #: build/C/man2/mlock.2:149
5092 msgid ""
5093 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
5094 "perform the requested operation."
5095 msgstr ""
5096 "呼び出し側が特権を持っていないが、\n"
5097 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5098
5099 #. type: Plain text
5100 #: build/C/man2/mlock.2:154
5101 msgid "For B<mlock>()  and B<munlock>():"
5102 msgstr "B<mlock>()  と B<munlock>()  用として:"
5103
5104 #. type: Plain text
5105 #: build/C/man2/mlock.2:157
5106 msgid "Some or all of the specified address range could not be locked."
5107 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5108
5109 #. type: Plain text
5110 #: build/C/man2/mlock.2:164
5111 msgid ""
5112 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5113 "addition may have resulted in an overflow)."
5114 msgstr ""
5115 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5116 "(例えば、加算でオーバーフローが発生したなど)。"
5117
5118 #. type: Plain text
5119 #: build/C/man2/mlock.2:169
5120 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5121 msgstr ""
5122 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5123
5124 #. type: Plain text
5125 #: build/C/man2/mlock.2:173
5126 msgid ""
5127 "Some of the specified address range does not correspond to mapped pages in "
5128 "the address space of the process."
5129 msgstr ""
5130 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5131 "い。"
5132
5133 #. type: Plain text
5134 #: build/C/man2/mlock.2:176
5135 msgid "For B<mlockall>():"
5136 msgstr "B<mlockall>()  用として:"
5137
5138 #. type: Plain text
5139 #: build/C/man2/mlock.2:179
5140 msgid "Unknown I<flags> were specified."
5141 msgstr "未知の I<flags> が指定された。"
5142
5143 #. type: Plain text
5144 #: build/C/man2/mlock.2:182
5145 msgid "For B<munlockall>():"
5146 msgstr "B<munlockall>()  用として:"
5147
5148 #. type: Plain text
5149 #: build/C/man2/mlock.2:186
5150 msgid ""
5151 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5152 msgstr ""
5153 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5154
5155 #. type: Plain text
5156 #: build/C/man2/mlock.2:188
5157 msgid "POSIX.1-2001, SVr4."
5158 msgstr "POSIX.1-2001, SVr4."
5159
5160 #. type: SH
5161 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:503 build/C/man2/msync.2:105
5162 #, no-wrap
5163 msgid "AVAILABILITY"
5164 msgstr "可用性"
5165
5166 #. type: Plain text
5167 #: build/C/man2/mlock.2:200
5168 msgid ""
5169 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5170 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5171 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5172 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5173 msgstr ""
5174 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5175 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5176 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5177 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5178 "び出すことで決定できる。"
5179
5180 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5181 #.  -1: unavailable, 0: ask using sysconf().
5182 #.  glibc defines it to 1.
5183 #. type: Plain text
5184 #: build/C/man2/mlock.2:213
5185 msgid ""
5186 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5187 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5188 "than 0.  (See also B<sysconf>(3).)"
5189 msgstr ""
5190 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5191 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5192 "(B<sysconf>(3)  も参照のこと)。"
5193
5194 #. type: Plain text
5195 #: build/C/man2/mlock.2:231
5196 msgid ""
5197 "Memory locking has two main applications: real-time algorithms and high-"
5198 "security data processing.  Real-time applications require deterministic "
5199 "timing, and, like scheduling, paging is one major cause of unexpected "
5200 "program execution delays.  Real-time applications will usually also switch "
5201 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5202 "security software often handles critical bytes like passwords or secret keys "
5203 "as data structures.  As a result of paging, these secrets could be "
5204 "transferred onto a persistent swap store medium, where they might be "
5205 "accessible to the enemy long after the security software has erased the "
5206 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5207 "laptops and some desktop computers will save a copy of the system's RAM to "
5208 "disk, regardless of memory locks.)"
5209 msgstr ""
5210 "メモリーのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5211 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5212 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5213 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5214 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5215 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5216 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5217 "されるかもしれない。そして、セキュリティ ソフトウェアが RAM 上の秘密を削除し"
5218 "て終了したずっと後になっても、 このスワップされたデータには敵がアクセスできる"
5219 "可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サス"
5220 "ペンドモードはシステムの RAM の内容をメモリーのロックに関わらず ディスクに保"
5221 "存することに注意)。"
5222
5223 #. type: Plain text
5224 #: build/C/man2/mlock.2:244
5225 msgid ""
5226 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5227 "faults should reserve enough locked stack pages before entering the time-"
5228 "critical section, so that no page fault can be caused by function calls.  "
5229 "This can be achieved by calling a function that allocates a sufficiently "
5230 "large automatic variable (an array) and writes to the memory occupied by "
5231 "this array in order to touch these stack pages.  This way, enough pages will "
5232 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5233 "that not even copy-on-write page faults can occur in the critical section."
5234 msgstr ""
5235 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5236 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5237 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5238 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5239 "数 (の配列) を確保し、 これらのスタック用のページがメモリー上に確保されるよう"
5240 "にこの配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5241 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5242 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5243 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5244
5245 #. type: Plain text
5246 #: build/C/man2/mlock.2:257
5247 msgid ""
5248 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5249 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5250 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5251 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5252 msgstr ""
5253 "メモリーロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5254 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5255 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5256 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5257
5258 #. type: Plain text
5259 #: build/C/man2/mlock.2:261
5260 msgid ""
5261 "The memory lock on an address range is automatically removed if the address "
5262 "range is unmapped via B<munmap>(2)."
5263 msgstr ""
5264 "あるアドレス範囲に対するメモリーロックは、そのアドレス範囲が B<munmap>(2)  に"
5265 "よってアンマップされた場合は削除される。"
5266
5267 #. type: Plain text
5268 #: build/C/man2/mlock.2:274
5269 msgid ""
5270 "Memory locks do not stack, that is, pages which have been locked several "
5271 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5272 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5273 "Pages which are mapped to several locations or by several processes stay "
5274 "locked into RAM as long as they are locked at least at one location or by at "
5275 "least one process."
5276 msgstr ""
5277 "メモリーのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  "
5278 "を呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 "
5279 "回呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複"
5280 "数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一"
5281 "つのプロセスでロックされている限りは RAM に残り続ける。"
5282
5283 #. type: Plain text
5284 #: build/C/man2/mlock.2:285
5285 msgid ""
5286 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5287 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5288 "implementation to require that I<addr> is page aligned, so portable "
5289 "applications should ensure this."
5290 msgstr ""
5291 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5292 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5293 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5294 "ケーションではきちんと境界に合わせた方が良い。"
5295
5296 #. type: Plain text
5297 #: build/C/man2/mlock.2:298
5298 msgid ""
5299 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5300 "many kilobytes of memory the process with ID I<PID> has locked using "
5301 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5302 msgstr ""
5303 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5304 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5305 "ID が I<PID> のプロセスがロックしているメモリー量 (キロバイト単位) が\n"
5306 "表示される。"
5307
5308 #. type: SS
5309 #: build/C/man2/mlock.2:298
5310 #, no-wrap
5311 msgid "Limits and permissions"
5312 msgstr "制限と権限"
5313
5314 #. type: Plain text
5315 #: build/C/man2/mlock.2:305
5316 msgid ""
5317 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5318 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5319 "defines a limit on how much memory the process may lock."
5320 msgstr ""
5321 "Linux 2.6.8 以前では、メモリーをロックするためには特権 (B<CAP_IPC_LOCK>)  が"
5322 "必要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリーを"
5323 "ロックできるかの制限を定義する。"
5324
5325 #. type: Plain text
5326 #: build/C/man2/mlock.2:311
5327 msgid ""
5328 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5329 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5330 "instead defines a limit on how much memory an unprivileged process may lock."
5331 msgstr ""
5332 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリー量は無制限とな"
5333 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5334 "クできるメモリー量の制限を定義する。"
5335
5336 #. type: Plain text
5337 #: build/C/man2/mlock.2:319
5338 msgid ""
5339 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5340 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5341 "was rectified in kernel 2.4.18."
5342 msgstr ""
5343 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5344 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5345 "ネル 2.4.18 で修正された。"
5346
5347 #.  See the following LKML thread:
5348 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5349 #.  "Rationale for RLIMIT_MEMLOCK"
5350 #.  23 Jan 2006
5351 #. type: Plain text
5352 #: build/C/man2/mlock.2:336
5353 msgid ""
5354 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5355 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5356 "example, setting its effective UID to a nonzero value), then subsequent "
5357 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5358 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5359 msgstr ""
5360 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5361 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5362 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5363 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリー割り当て (例えば B<mmap>(2), "
5364 "B<brk>(2))  は失敗する。"
5365
5366 #. type: Plain text
5367 #: build/C/man2/mlock.2:343
5368 msgid ""
5369 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5370 "B<capabilities>(7)"
5371 msgstr ""
5372 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5373 "B<capabilities>(7)"
5374
5375 #. type: TH
5376 #: build/C/man2/mmap.2:40
5377 #, no-wrap
5378 msgid "MMAP"
5379 msgstr "MMAP"
5380
5381 #. type: Plain text
5382 #: build/C/man2/mmap.2:43
5383 msgid "mmap, munmap - map or unmap files or devices into memory"
5384 msgstr "mmap, munmap - ファイルやデバイスをメモリーにマップ/アンマップする"
5385
5386 #. type: Plain text
5387 #: build/C/man2/mmap.2:51
5388 #, no-wrap
5389 msgid ""
5390 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5391 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5392 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5393 msgstr ""
5394 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5395 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5396 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5397
5398 #. type: Plain text
5399 #: build/C/man2/mmap.2:54
5400 msgid "See NOTES for information on feature test macro requirements."
5401 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5402
5403 #. type: Plain text
5404 #: build/C/man2/mmap.2:63
5405 msgid ""
5406 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5407 "process.  The starting address for the new mapping is specified in I<addr>.  "
5408 "The I<length> argument specifies the length of the mapping."
5409 msgstr ""
5410 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5411 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5412 "は I<length> 引き数で指定される。"
5413
5414 #.  Before Linux 2.6.24, the address was rounded up to the next page
5415 #.  boundary; since 2.6.24, it is rounded down!
5416 #. type: Plain text
5417 #: build/C/man2/mmap.2:77
5418 msgid ""
5419 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5420 "the mapping; this is the most portable method of creating a new mapping.  If "
5421 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5422 "the mapping; on Linux, the mapping will be created at a nearby page "
5423 "boundary.  The address of the new mapping is returned as the result of the "
5424 "call."
5425 msgstr ""
5426 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5427 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5428 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5429 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5430 "ングのアドレスは、呼び出しの返り値として返される。"
5431
5432 #. type: Plain text
5433 #: build/C/man2/mmap.2:89
5434 msgid ""
5435 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5436 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5437 "offset I<offset> in the file (or other object) referred to by the file "
5438 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5439 "by I<sysconf(_SC_PAGE_SIZE)>."
5440 msgstr ""
5441 "ファイルマッピングの内容は、 ファイルディスクリプター I<fd> で参照されるファ"
5442 "イル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5443 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5444 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5445 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5446
5447 #. type: Plain text
5448 #: build/C/man2/mmap.2:97
5449 msgid ""
5450 "The I<prot> argument describes the desired memory protection of the mapping "
5451 "(and must not conflict with the open mode of the file).  It is either "
5452 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5453 msgstr ""
5454 "引き数 I<prot> には、マッピングのメモリー保護をどのように行なうかを指定する "
5455 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5456 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5457
5458 #. type: TP
5459 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5460 #, no-wrap
5461 msgid "B<PROT_EXEC>"
5462 msgstr "B<PROT_EXEC>"
5463
5464 #. type: Plain text
5465 #: build/C/man2/mmap.2:100
5466 msgid "Pages may be executed."
5467 msgstr "ページは実行可能である。"
5468
5469 #. type: TP
5470 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5471 #, no-wrap
5472 msgid "B<PROT_READ>"
5473 msgstr "B<PROT_READ>"
5474
5475 #. type: Plain text
5476 #: build/C/man2/mmap.2:103
5477 msgid "Pages may be read."
5478 msgstr "ページは読み込み可能である。"
5479
5480 #. type: TP
5481 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5482 #, no-wrap
5483 msgid "B<PROT_WRITE>"
5484 msgstr "B<PROT_WRITE>"
5485
5486 #. type: Plain text
5487 #: build/C/man2/mmap.2:106
5488 msgid "Pages may be written."
5489 msgstr "ページに書き込み可能である。"
5490
5491 #. type: TP
5492 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5493 #, no-wrap
5494 msgid "B<PROT_NONE>"
5495 msgstr "B<PROT_NONE>"
5496
5497 #. type: Plain text
5498 #: build/C/man2/mmap.2:109
5499 msgid "Pages may not be accessed."
5500 msgstr "ページにはアクセスできない。"
5501
5502 #. type: Plain text
5503 #: build/C/man2/mmap.2:118
5504 msgid ""
5505 "The I<flags> argument determines whether updates to the mapping are visible "
5506 "to other processes mapping the same region, and whether updates are carried "
5507 "through to the underlying file.  This behavior is determined by including "
5508 "exactly one of the following values in I<flags>:"
5509 msgstr ""
5510 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5511 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5512 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5513 "I<flags> に含めることで指定する。"
5514
5515 #. type: TP
5516 #: build/C/man2/mmap.2:118
5517 #, no-wrap
5518 msgid "B<MAP_SHARED>"
5519 msgstr "B<MAP_SHARED>"
5520
5521 #. type: Plain text
5522 #: build/C/man2/mmap.2:128
5523 msgid ""
5524 "Share this mapping.  Updates to the mapping are visible to other processes "
5525 "that map this file, and are carried through to the underlying file.  The "
5526 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5527 "called."
5528 msgstr ""
5529 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5530 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5531 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5532 "るまで行われないこともある。"
5533
5534 #. type: TP
5535 #: build/C/man2/mmap.2:128
5536 #, no-wrap
5537 msgid "B<MAP_PRIVATE>"
5538 msgstr "B<MAP_PRIVATE>"
5539
5540 #. type: Plain text
5541 #: build/C/man2/mmap.2:137
5542 msgid ""
5543 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5544 "visible to other processes mapping the same file, and are not carried "
5545 "through to the underlying file.  It is unspecified whether changes made to "
5546 "the file after the B<mmap>()  call are visible in the mapped region."
5547 msgstr ""
5548 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5549 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5550 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5551 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5552 "かは規定されていない。"
5553
5554 #. type: Plain text
5555 #: build/C/man2/mmap.2:139
5556 msgid "Both of these flags are described in POSIX.1-2001."
5557 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5558
5559 #. type: Plain text
5560 #: build/C/man2/mmap.2:142
5561 msgid ""
5562 "In addition, zero or more of the following values can be ORed in I<flags>:"
5563 msgstr ""
5564 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5565 "ことができる。"
5566
5567 #. type: TP
5568 #: build/C/man2/mmap.2:142
5569 #, no-wrap
5570 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5571 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5572
5573 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5574 #. type: Plain text
5575 #: build/C/man2/mmap.2:158
5576 msgid ""
5577 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5578 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5579 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5580 "as to improve context-switch performance on some early 64-bit processors.  "
5581 "Modern x86-64 processors no longer have this performance problem, so use of "
5582 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5583 "ignored when B<MAP_FIXED> is set."
5584 msgstr ""
5585 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5586 "ラグがサポートされているのは x86-64 アーキテクチャー上の 64 ビットプログラム"
5587 "のみである。 このフラグが追加されたのは、スレッドのスタックをメモリーの先頭 "
5588 "2GB 以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにお"
5589 "ける コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5590 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5591 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5592 "グは無視される。"
5593
5594 #. type: TP
5595 #: build/C/man2/mmap.2:158
5596 #, no-wrap
5597 msgid "B<MAP_ANON>"
5598 msgstr "B<MAP_ANON>"
5599
5600 #. type: Plain text
5601 #: build/C/man2/mmap.2:163
5602 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5603 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5604
5605 #. type: TP
5606 #: build/C/man2/mmap.2:163
5607 #, no-wrap
5608 msgid "B<MAP_ANONYMOUS>"
5609 msgstr "B<MAP_ANONYMOUS>"
5610
5611 #. type: Plain text
5612 #: build/C/man2/mmap.2:185
5613 msgid ""
5614 "The mapping is not backed by any file; its contents are initialized to "
5615 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5616 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5617 "is specified, and portable applications should ensure this.  The use of "
5618 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5619 "only since kernel 2.4."
5620 msgstr ""
5621 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5622 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5623 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5624 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5625 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5626 "以降の Linux でのみサポートされている。"
5627
5628 #. type: TP
5629 #: build/C/man2/mmap.2:185
5630 #, no-wrap
5631 msgid "B<MAP_DENYWRITE>"
5632 msgstr "B<MAP_DENYWRITE>"
5633
5634 #.  Introduced in 1.1.36, removed in 1.3.24.
5635 #. type: Plain text
5636 #: build/C/man2/mmap.2:193
5637 msgid ""
5638 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5639 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5640 "denial-of-service attacks.)"
5641 msgstr ""
5642 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5643 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5644 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5645
5646 #. type: TP
5647 #: build/C/man2/mmap.2:193
5648 #, no-wrap
5649 msgid "B<MAP_EXECUTABLE>"
5650 msgstr "B<MAP_EXECUTABLE>"
5651
5652 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5653 #.  (Long ago, it signaled that the underlying file is an executable.
5654 #.  However, that information was not really used anywhere.)
5655 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5656 #.  MAP_DENYWRITE?
5657 #. type: Plain text
5658 #: build/C/man2/mmap.2:201
5659 msgid "This flag is ignored."
5660 msgstr "このフラグは無視される。"
5661
5662 #. type: TP
5663 #: build/C/man2/mmap.2:201
5664 #, no-wrap
5665 msgid "B<MAP_FILE>"
5666 msgstr "B<MAP_FILE>"
5667
5668 #.  On some systems, this was required as the opposite of
5669 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5670 #. type: Plain text
5671 #: build/C/man2/mmap.2:207
5672 msgid "Compatibility flag.  Ignored."
5673 msgstr "互換性のためのフラグ。無視される。"
5674
5675 #. type: TP
5676 #: build/C/man2/mmap.2:207
5677 #, no-wrap
5678 msgid "B<MAP_FIXED>"
5679 msgstr "B<MAP_FIXED>"
5680
5681 #. type: Plain text
5682 #: build/C/man2/mmap.2:225
5683 msgid ""
5684 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5685 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5686 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5687 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5688 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5689 "requiring a fixed address for a mapping is less portable, the use of this "
5690 "option is discouraged."
5691 msgstr ""
5692 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5693 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5694 "ければならない。 I<addr> と I<len> で指定されたメモリー領域が既存のマッピング"
5695 "のページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定"
5696 "されたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して"
5697 "固定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこ"
5698 "とを推奨する。"
5699
5700 #. type: TP
5701 #: build/C/man2/mmap.2:225
5702 #, no-wrap
5703 msgid "B<MAP_GROWSDOWN>"
5704 msgstr "B<MAP_GROWSDOWN>"
5705
5706 #. type: Plain text
5707 #: build/C/man2/mmap.2:230
5708 msgid ""
5709 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5710 "mapping should extend downward in memory."
5711 msgstr ""
5712 "スタック用に使用される。マッピングをメモリー内で逆向きに行うことを カーネル仮"
5713 "想メモリーシステムに指示する。 (訳注:マッピングは通常はメモリーアドレスが増"
5714 "加する向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5715
5716 #. type: TP
5717 #: build/C/man2/mmap.2:230
5718 #, no-wrap
5719 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5720 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5721
5722 #. type: Plain text
5723 #: build/C/man2/mmap.2:236
5724 msgid ""
5725 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5726 "I<Documentation/vm/hugetlbpage.txt> for further information."
5727 msgstr ""
5728 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5729 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5730
5731 #. type: TP
5732 #: build/C/man2/mmap.2:236
5733 #, no-wrap
5734 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5735 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5736
5737 #.  If set, the mapped pages will not be swapped out.
5738 #. type: Plain text
5739 #: build/C/man2/mmap.2:242
5740 msgid ""
5741 "Lock the pages of the mapped region into memory in the manner of "
5742 "B<mlock>(2).  This flag is ignored in older kernels."
5743 msgstr ""
5744 "マップされた領域のページを B<mlock>(2)  の方法でメモリー内にロックする。 それ"
5745 "以前のカーネルでは、このフラグは無視される。"
5746
5747 #. type: TP
5748 #: build/C/man2/mmap.2:242
5749 #, no-wrap
5750 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5751 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5752
5753 #. type: Plain text
5754 #: build/C/man2/mmap.2:257
5755 msgid ""
5756 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5757 "ahead: create page tables entries only for pages that are already present in "
5758 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5759 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5760 "reimplemented."
5761 msgstr ""
5762 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5763 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5764 "テーブルエントリーを作成する。 Linux 2.6.23 以降では、このフラグは "
5765 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5766 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5767
5768 #. type: TP
5769 #: build/C/man2/mmap.2:257
5770 #, no-wrap
5771 msgid "B<MAP_NORESERVE>"
5772 msgstr "B<MAP_NORESERVE>"
5773
5774 #. type: Plain text
5775 #: build/C/man2/mmap.2:272
5776 msgid ""
5777 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5778 "one has the guarantee that it is possible to modify the mapping.  When swap "
5779 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5780 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5781 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5782 "effect only for private writable mappings."
5783 msgstr ""
5784 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5785 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5786 "合、物理メモリーに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることが"
5787 "ある。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議"
5788 "論も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プ"
5789 "ライベートマッピングについてのみ効果があった。"
5790
5791 #. type: TP
5792 #: build/C/man2/mmap.2:272
5793 #, no-wrap
5794 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5795 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5796
5797 #. type: Plain text
5798 #: build/C/man2/mmap.2:279
5799 msgid ""
5800 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5801 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5802 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5803 "only since Linux 2.6.23."
5804 msgstr ""
5805 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5806 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5807 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5808 "2.6.23 以降でのみプライベートマッピングについて B<MAP_POPULATE> がサポートさ"
5809 "れている。"
5810
5811 #. type: TP
5812 #: build/C/man2/mmap.2:279
5813 #, no-wrap
5814 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5815 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5816
5817 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5818 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5819 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5820 #.  "pthread_create() slow for many threads; also time to revisit 64b
5821 #.   context switch optimization?"
5822 #. type: Plain text
5823 #: build/C/man2/mmap.2:292
5824 msgid ""
5825 "Allocate the mapping at an address suitable for a process or thread stack.  "
5826 "This flag is currently a no-op, but is used in the glibc threading "
5827 "implementation so that if some architectures require special treatment for "
5828 "stack allocations, support can later be transparently implemented for glibc."
5829 msgstr ""
5830 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5831 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5832 "これは、いくつかのアーキテクチャーではスタックの割り当てに関して特別な扱い が"
5833 "必要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5834 "る。"
5835
5836 #. type: TP
5837 #: build/C/man2/mmap.2:292
5838 #, no-wrap
5839 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5840 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5841
5842 #. type: Plain text
5843 #: build/C/man2/mmap.2:302
5844 msgid ""
5845 "Don't clear anonymous pages.  This flag is intended to improve performance "
5846 "on embedded devices.  This flag is honored only if the kernel was configured "
5847 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5848 "implications, that option is normally enabled only on embedded devices (i."
5849 "e., devices where one has complete control of the contents of user memory)."
5850 msgstr ""
5851 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5852 "ス\n"
5853 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5854 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5855 "このフラグは効果を持つ。\n"
5856 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5857 "ユーザーメモリーの内容を完全に制御化におけるデバイス) においてのみ有効にされ"
5858 "る。"
5859
5860 #. type: Plain text
5861 #: build/C/man2/mmap.2:310
5862 msgid ""
5863 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5864 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5865 "B<MAP_ANON>)."
5866 msgstr ""
5867 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5868 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5869 "B<MAP_ANON>)  もサポートされている。"
5870
5871 #. type: Plain text
5872 #: build/C/man2/mmap.2:317
5873 msgid ""
5874 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5875 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5876 msgstr ""
5877 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5878 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5879
5880 #. type: Plain text
5881 #: build/C/man2/mmap.2:323
5882 msgid ""
5883 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5884 "attributes."
5885 msgstr ""
5886 "B<mmap>()  によってマップされたメモリーの属性は B<fork>(2)  の際に継承され"
5887 "る。"
5888
5889 #. type: Plain text
5890 #: build/C/man2/mmap.2:331
5891 msgid ""
5892 "A file is mapped in multiples of the page size.  For a file that is not a "
5893 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5894 "writes to that region are not written out to the file.  The effect of "
5895 "changing the size of the underlying file of a mapping on the pages that "
5896 "correspond to added or removed regions of the file is unspecified."
5897 msgstr ""
5898 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5899 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5900 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5901 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5902 "マップされたページに対してどのような影響があるかは規定されていない。"
5903
5904 #. type: SS
5905 #: build/C/man2/mmap.2:331
5906 #, no-wrap
5907 msgid "munmap()"
5908 msgstr "munmap()"
5909
5910 #. type: Plain text
5911 #: build/C/man2/mmap.2:341
5912 msgid ""
5913 "The B<munmap>()  system call deletes the mappings for the specified address "
5914 "range, and causes further references to addresses within the range to "
5915 "generate invalid memory references.  The region is also automatically "
5916 "unmapped when the process is terminated.  On the other hand, closing the "
5917 "file descriptor does not unmap the region."
5918 msgstr ""
5919 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5920 "降のその範囲内へのメモリー参照は不正となる。 この領域は、プロセスが終了したと"
5921 "きにも自動的にアンマップされる。 一方、ファイルディスクリプターをクローズして"
5922 "も、この領域はアンマップされない。"
5923
5924 #. type: Plain text
5925 #: build/C/man2/mmap.2:351
5926 msgid ""
5927 "The address I<addr> must be a multiple of the page size.  All pages "
5928 "containing a part of the indicated range are unmapped, and subsequent "
5929 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5930 "the indicated range does not contain any mapped pages."
5931 msgstr ""
5932 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5933 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5934 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5935 "ていない場合でも エラーにならない。"
5936
5937 #. type: SS
5938 #: build/C/man2/mmap.2:351
5939 #, no-wrap
5940 msgid "Timestamps changes for file-backed mappings"
5941 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5942
5943 #. type: Plain text
5944 #: build/C/man2/mmap.2:358
5945 msgid ""
5946 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5947 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5948 "the first reference to a mapped page will update the field if it has not "
5949 "been already."
5950 msgstr ""
5951 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5952 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5953 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5954 "ページへの最初の参照があった 際に更新される。"
5955
5956 #. type: Plain text
5957 #: build/C/man2/mmap.2:375
5958 msgid ""
5959 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5960 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5961 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5962 "one occurs."
5963 msgstr ""
5964 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5965 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5966 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5967 "B<msync>(2)  が呼ばれる前までに更新される。"
5968
5969 #. type: Plain text
5970 #: build/C/man2/mmap.2:392
5971 msgid ""
5972 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5973 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5974 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5975 "and I<errno> is set (probably to B<EINVAL>)."
5976 msgstr ""
5977 "B<mmap>()  は成功するとマップされた領域へのポインターを返す。 失敗すると値 "
5978 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5979 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5980 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5981
5982 #. type: TP
5983 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5984 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5985 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5986 #: build/C/man2/shmop.2:188
5987 #, no-wrap
5988 msgid "B<EACCES>"
5989 msgstr "B<EACCES>"
5990
5991 #. type: Plain text
5992 #: build/C/man2/mmap.2:411
5993 msgid ""
5994 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5995 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5996 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5997 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5998 msgstr ""
5999 "以下のいずれかの場合。 ファイルディスクリプターの参照先が通常のファイルではな"
6000 "い (non-regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用に"
6001 "オープンされていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが "
6002 "I<fd> は読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> を"
6003 "セットしたが、ファイルは追加 (append) 専用である。"
6004
6005 #. type: Plain text
6006 #: build/C/man2/mmap.2:415
6007 msgid ""
6008 "The file has been locked, or too much memory has been locked (see "
6009 "B<setrlimit>(2))."
6010 msgstr ""
6011 "ファイルがロックされている。またはロックされているメモリーが多すぎる "
6012 "(B<setrlimit>(2)  を参照)。"
6013
6014 #. type: Plain text
6015 #: build/C/man2/mmap.2:421
6016 msgid ""
6017 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
6018 msgstr ""
6019 "I<fd> が有効なファイルディスクリプター (file descriptor) ではない (かつ "
6020 "B<MAP_ANONYMOUS> がセットされていない)。"
6021
6022 #. type: Plain text
6023 #: build/C/man2/mmap.2:429
6024 msgid ""
6025 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
6026 "not aligned on a page boundary)."
6027 msgstr ""
6028 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
6029 "ジ境界にアラインメントされていない)。"
6030
6031 #. type: Plain text
6032 #: build/C/man2/mmap.2:434
6033 msgid "(since Linux 2.6.12)  I<length> was 0."
6034 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
6035
6036 #. type: Plain text
6037 #: build/C/man2/mmap.2:442
6038 msgid ""
6039 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
6040 "both of these values."
6041 msgstr ""
6042 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
6043 "しくは その両方が含まれていた。"
6044
6045 #. type: TP
6046 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
6047 #: build/C/man2/shmget.2:221 build/C/man2/memfd_create.2:149
6048 #, no-wrap
6049 msgid "B<ENFILE>"
6050 msgstr "B<ENFILE>"
6051
6052 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
6053 #. type: Plain text
6054 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
6055 msgid "The system limit on the total number of open files has been reached."
6056 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
6057
6058 #. type: Plain text
6059 #: build/C/man2/mmap.2:454
6060 msgid ""
6061 "The underlying filesystem of the specified file does not support memory "
6062 "mapping."
6063 msgstr ""
6064 "指定されたファイルが置かれているファイルシステムがメモリーマッピングをサポー"
6065 "ト していない。"
6066
6067 #. type: Plain text
6068 #: build/C/man2/mmap.2:458
6069 msgid ""
6070 "No memory is available, or the process's maximum number of mappings would "
6071 "have been exceeded."
6072 msgstr ""
6073 "メモリーに空きがない、または処理中のプロセスのマッピング数が最大数を超過し"
6074 "た。"
6075
6076 #.  (Since 2.4.25 / 2.6.0.)
6077 #. type: Plain text
6078 #: build/C/man2/mmap.2:467
6079 msgid ""
6080 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
6081 "file on a filesystem that was mounted no-exec."
6082 msgstr ""
6083 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
6084 "トされたファイルシステム上のファイルに マップ領域が対応している。"
6085
6086 #. type: Plain text
6087 #: build/C/man2/mmap.2:477
6088 msgid ""
6089 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
6090 "writing."
6091 msgstr ""
6092 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
6093 "き込み用に開かれている。"
6094
6095 #. type: TP
6096 #: build/C/man2/mmap.2:477 build/C/man2/shmctl.2:348
6097 #, no-wrap
6098 msgid "B<EOVERFLOW>"
6099 msgstr "B<EOVERFLOW>"
6100
6101 #. type: Plain text
6102 #: build/C/man2/mmap.2:489
6103 msgid ""
6104 "On 32-bit architecture together with the large file extension (i.e., using "
6105 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6106 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6107 msgstr ""
6108 "32 ビットアーキテクチャーで large file 拡張を使っている場合 (つまり 64 ビット"
6109 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6110 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6111 "しまう) 場合がある。"
6112
6113 #. type: Plain text
6114 #: build/C/man2/mmap.2:491
6115 msgid "Use of a mapped region can result in these signals:"
6116 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6117
6118 #. type: TP
6119 #: build/C/man2/mmap.2:491
6120 #, no-wrap
6121 msgid "B<SIGSEGV>"
6122 msgstr "B<SIGSEGV>"
6123
6124 #. type: Plain text
6125 #: build/C/man2/mmap.2:494
6126 msgid "Attempted write into a region mapped as read-only."
6127 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6128
6129 #. type: TP
6130 #: build/C/man2/mmap.2:494
6131 #, no-wrap
6132 msgid "B<SIGBUS>"
6133 msgstr "B<SIGBUS>"
6134
6135 #. type: Plain text
6136 #: build/C/man2/mmap.2:499
6137 msgid ""
6138 "Attempted access to a portion of the buffer that does not correspond to the "
6139 "file (for example, beyond the end of the file, including the case where "
6140 "another process has truncated the file)."
6141 msgstr ""
6142 "バッファーのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越"
6143 "えた部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれ"
6144 "る)  にアクセスしようとした。"
6145
6146 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6147 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6148 #. type: Plain text
6149 #: build/C/man2/mmap.2:503
6150 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6151 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6152
6153 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6154 #.  -1: unavailable, 0: ask using sysconf().
6155 #.  glibc defines it to 1.
6156 #. type: Plain text
6157 #: build/C/man2/mmap.2:517
6158 msgid ""
6159 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>()  are "
6160 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6161 "value greater than 0.  (See also B<sysconf>(3).)"
6162 msgstr ""
6163 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6164 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6165 "(B<sysconf>(3)  も参照のこと)。"
6166
6167 #. type: Plain text
6168 #: build/C/man2/mmap.2:530
6169 msgid ""
6170 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6171 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6172 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6173 "they intend to execute code in the new mapping."
6174 msgstr ""
6175 "(i386 などの) いくつかのアーキテクチャーでは、 B<PROT_WRITE> をセットすると、"
6176 "暗黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙"
6177 "のうちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャー依存である。 "
6178 "移植性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合"
6179 "は、常に B<PROT_EXEC> をセットすべきである。"
6180
6181 #. type: Plain text
6182 #: build/C/man2/mmap.2:545
6183 msgid ""
6184 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6185 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6186 "address for the mapping; the address is chosen so as not to conflict with "
6187 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6188 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6189 msgstr ""
6190 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6191 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6192 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6193 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6194 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6195
6196 #. type: Plain text
6197 #: build/C/man2/mmap.2:575
6198 msgid ""
6199 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6200 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6201 "requiring that macro specifically would have been more logical, since these "
6202 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6203 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6204 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6205 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6206 "B<MAP_STACK>."
6207 msgstr ""
6208 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6209 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6210 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6211 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6212 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6213 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6214 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6215 "B<MAP_STACK> である。"
6216
6217 #. type: SS
6218 #: build/C/man2/mmap.2:575
6219 #, no-wrap
6220 msgid "C library/kernel ABI differences"
6221 msgstr "C ライブラリとカーネル ABI の違い"
6222
6223 #.  Since around glibc 2.1/2.2, depending on the platform.
6224 #. type: Plain text
6225 #: build/C/man2/mmap.2:590
6226 msgid ""
6227 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6228 "function.  Originally, this function invoked a system call of the same "
6229 "name.  Since kernel 2.4, that system call has been superseded by "
6230 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6231 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6232 msgstr ""
6233 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6234 "に\n"
6235 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6236 "た。\n"
6237 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6238 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6239 "B<mmap2>(2) を起動する。"
6240
6241 #. type: Plain text
6242 #: build/C/man2/mmap.2:595
6243 msgid ""
6244 "On Linux there are no guarantees like those suggested above under "
6245 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6246 "the system runs out of memory."
6247 msgstr ""
6248 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6249 "デフォルトでは、システムがメモリーを使い切った場合には、 どのプロセスがいつ強"
6250 "制終了されるか分からないからである。"
6251
6252 #. type: Plain text
6253 #: build/C/man2/mmap.2:602
6254 msgid ""
6255 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6256 "is specified as B<PROT_NONE>."
6257 msgstr ""
6258 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6259 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6260
6261 #. type: Plain text
6262 #: build/C/man2/mmap.2:617
6263 msgid ""
6264 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6265 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6266 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6267 "fails with the error B<EINVAL> for this case."
6268 msgstr ""
6269 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6270 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6271 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6272 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6273
6274 #. type: Plain text
6275 #: build/C/man2/mmap.2:633
6276 msgid ""
6277 "POSIX specifies that the system shall always zero fill any partial page at "
6278 "the end of the object and that system will never write any modification of "
6279 "the object beyond its end.  On Linux, when you write data to such partial "
6280 "page after the end of the object, the data stays in the page cache even "
6281 "after the file is closed and unmapped and even though the data is never "
6282 "written to the file itself, subsequent mappings may see the modified "
6283 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6284 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6285 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6286 msgstr ""
6287 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6288 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6289 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6290 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6291 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6292 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6293 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6294 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6295 "共有メモリーインターフェースを使った場合)。"
6296
6297 #. type: Plain text
6298 #: build/C/man2/mmap.2:645
6299 msgid ""
6300 "The following program prints part of the file specified in its first command-"
6301 "line argument to standard output.  The range of bytes to be printed is "
6302 "specified via offset and length values in the second and third command-line "
6303 "arguments.  The program creates a memory mapping of the required pages of "
6304 "the file and then uses B<write>(2)  to output the desired bytes."
6305 msgstr ""
6306 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6307 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6308 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6309 "必要なページのメモリー マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6310 "を出力する。"
6311
6312 #. type: Plain text
6313 #: build/C/man2/mmap.2:653
6314 #, no-wrap
6315 msgid ""
6316 "#include E<lt>sys/mman.hE<gt>\n"
6317 "#include E<lt>sys/stat.hE<gt>\n"
6318 "#include E<lt>fcntl.hE<gt>\n"
6319 "#include E<lt>stdio.hE<gt>\n"
6320 "#include E<lt>stdlib.hE<gt>\n"
6321 "#include E<lt>unistd.hE<gt>\n"
6322 msgstr ""
6323 "#include E<lt>sys/mman.hE<gt>\n"
6324 "#include E<lt>sys/stat.hE<gt>\n"
6325 "#include E<lt>fcntl.hE<gt>\n"
6326 "#include E<lt>stdio.hE<gt>\n"
6327 "#include E<lt>stdlib.hE<gt>\n"
6328 "#include E<lt>unistd.hE<gt>\n"
6329
6330 #. type: Plain text
6331 #: build/C/man2/mmap.2:656 build/C/man2/mprotect.2:177
6332 #, no-wrap
6333 msgid ""
6334 "#define handle_error(msg) \\e\n"
6335 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6336 msgstr ""
6337 "#define handle_error(msg) \\e\n"
6338 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6339
6340 #. type: Plain text
6341 #: build/C/man2/mmap.2:666
6342 #, no-wrap
6343 msgid ""
6344 "int\n"
6345 "main(int argc, char *argv[])\n"
6346 "{\n"
6347 "    char *addr;\n"
6348 "    int fd;\n"
6349 "    struct stat sb;\n"
6350 "    off_t offset, pa_offset;\n"
6351 "    size_t length;\n"
6352 "    ssize_t s;\n"
6353 msgstr ""
6354 "int\n"
6355 "main(int argc, char *argv[])\n"
6356 "{\n"
6357 "    char *addr;\n"
6358 "    int fd;\n"
6359 "    struct stat sb;\n"
6360 "    off_t offset, pa_offset;\n"
6361 "    size_t length;\n"
6362 "    ssize_t s;\n"
6363
6364 #. type: Plain text
6365 #: build/C/man2/mmap.2:671
6366 #, no-wrap
6367 msgid ""
6368 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6369 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6370 "        exit(EXIT_FAILURE);\n"
6371 "    }\n"
6372 msgstr ""
6373 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6374 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6375 "        exit(EXIT_FAILURE);\n"
6376 "    }\n"
6377
6378 #. type: Plain text
6379 #: build/C/man2/mmap.2:675
6380 #, no-wrap
6381 msgid ""
6382 "    fd = open(argv[1], O_RDONLY);\n"
6383 "    if (fd == -1)\n"
6384 "        handle_error(\"open\");\n"
6385 msgstr ""
6386 "    fd = open(argv[1], O_RDONLY);\n"
6387 "    if (fd == -1)\n"
6388 "        handle_error(\"open\");\n"
6389
6390 #. type: Plain text
6391 #: build/C/man2/mmap.2:678
6392 #, no-wrap
6393 msgid ""
6394 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6395 "        handle_error(\"fstat\");\n"
6396 msgstr ""
6397 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6398 "        handle_error(\"fstat\");\n"
6399
6400 #. type: Plain text
6401 #: build/C/man2/mmap.2:682
6402 #, no-wrap
6403 msgid ""
6404 "    offset = atoi(argv[2]);\n"
6405 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6406 "        /* offset for mmap() must be page aligned */\n"
6407 msgstr ""
6408 "    offset = atoi(argv[2]);\n"
6409 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6410 "        /* offset for mmap() must be page aligned */\n"
6411
6412 #. type: Plain text
6413 #: build/C/man2/mmap.2:687
6414 #, no-wrap
6415 msgid ""
6416 "    if (offset E<gt>= sb.st_size) {\n"
6417 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6418 "        exit(EXIT_FAILURE);\n"
6419 "    }\n"
6420 msgstr ""
6421 "    if (offset E<gt>= sb.st_size) {\n"
6422 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6423 "        exit(EXIT_FAILURE);\n"
6424 "    }\n"
6425
6426 #. type: Plain text
6427 #: build/C/man2/mmap.2:693
6428 #, no-wrap
6429 msgid ""
6430 "    if (argc == 4) {\n"
6431 "        length = atoi(argv[3]);\n"
6432 "        if (offset + length E<gt> sb.st_size)\n"
6433 "            length = sb.st_size - offset;\n"
6434 "                /* Can\\(aqt display bytes past end of file */\n"
6435 msgstr ""
6436 "    if (argc == 4) {\n"
6437 "        length = atoi(argv[3]);\n"
6438 "        if (offset + length E<gt> sb.st_size)\n"
6439 "            length = sb.st_size - offset;\n"
6440 "                /* Can\\(aqt display bytes past end of file */\n"
6441
6442 #. type: Plain text
6443 #: build/C/man2/mmap.2:697
6444 #, no-wrap
6445 msgid ""
6446 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6447 "        length = sb.st_size - offset;\n"
6448 "    }\n"
6449 msgstr ""
6450 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6451 "        length = sb.st_size - offset;\n"
6452 "    }\n"
6453
6454 #. type: Plain text
6455 #: build/C/man2/mmap.2:702
6456 #, no-wrap
6457 msgid ""
6458 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6459 "                MAP_PRIVATE, fd, pa_offset);\n"
6460 "    if (addr == MAP_FAILED)\n"
6461 "        handle_error(\"mmap\");\n"
6462 msgstr ""
6463 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6464 "                MAP_PRIVATE, fd, pa_offset);\n"
6465 "    if (addr == MAP_FAILED)\n"
6466 "        handle_error(\"mmap\");\n"
6467
6468 #. type: Plain text
6469 #: build/C/man2/mmap.2:707
6470 #, no-wrap
6471 msgid ""
6472 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6473 "    if (s != length) {\n"
6474 "        if (s == -1)\n"
6475 "            handle_error(\"write\");\n"
6476 msgstr ""
6477 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6478 "    if (s != length) {\n"
6479 "        if (s == -1)\n"
6480 "            handle_error(\"write\");\n"
6481
6482 #. type: Plain text
6483 #: build/C/man2/mmap.2:711
6484 #, no-wrap
6485 msgid ""
6486 "        fprintf(stderr, \"partial write\");\n"
6487 "        exit(EXIT_FAILURE);\n"
6488 "    }\n"
6489 msgstr ""
6490 "        fprintf(stderr, \"partial write\");\n"
6491 "        exit(EXIT_FAILURE);\n"
6492 "    }\n"
6493
6494 #. type: Plain text
6495 #: build/C/man2/mmap.2:729
6496 msgid ""
6497 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6498 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6499 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6500 "B<shm_overview>(7)"
6501 msgstr ""
6502 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6503 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6504 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6505 "B<shm_overview>(7)"
6506
6507 #. type: Plain text
6508 #: build/C/man2/mmap.2:736
6509 msgid ""
6510 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6511 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6512 msgstr ""
6513 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6514 "smaps> の説明。"
6515
6516 #. type: Plain text
6517 #: build/C/man2/mmap.2:741 build/C/man2/msync.2:151
6518 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6519 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6520
6521 #. type: TH
6522 #: build/C/man2/mmap2.2:29
6523 #, no-wrap
6524 msgid "MMAP2"
6525 msgstr "MMAP2"
6526
6527 #. type: TH
6528 #: build/C/man2/mmap2.2:29
6529 #, no-wrap
6530 msgid "2014-02-25"
6531 msgstr "2014-02-25"
6532
6533 #. type: Plain text
6534 #: build/C/man2/mmap2.2:32
6535 msgid "mmap2 - map files or devices into memory"
6536 msgstr "mmap2 - ファイルやデバイスをメモリーにマップする"
6537
6538 #. type: Plain text
6539 #: build/C/man2/mmap2.2:38
6540 #, no-wrap
6541 msgid ""
6542 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6543 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6544 msgstr ""
6545 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6546 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6547
6548 #. type: Plain text
6549 #: build/C/man2/mmap2.2:43
6550 msgid ""
6551 "This is probably not the system call that you are interested in; instead, "
6552 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6553 "system call."
6554 msgstr ""
6555 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6556 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6557 "の\n"
6558 "ラッパー関数についての説明がある。"
6559
6560 #. type: Plain text
6561 #: build/C/man2/mmap2.2:54
6562 msgid ""
6563 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6564 "except that the final argument specifies the offset into the file in 4096-"
6565 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6566 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6567 "bytes)."
6568 msgstr ""
6569 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6570 "だ\n"
6571 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6572 "ト\n"
6573 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6574 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6575 "プ\n"
6576 "できるようになる。"
6577
6578 #. type: Plain text
6579 #: build/C/man2/mmap2.2:61
6580 msgid ""
6581 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6582 "is returned and I<errno> is set appropriately."
6583 msgstr ""
6584 "成功した場合、 B<mmap2>()  はマップされた領域へのポインターを返す。 エラーの"
6585 "場合は -1 が返されて、 I<errno> が適切に設定される。"
6586
6587 #. type: Plain text
6588 #: build/C/man2/mmap2.2:65
6589 msgid "Problem with getting the data from user space."
6590 msgstr "ユーザー空間からデータを取得するときに問題があった。"
6591
6592 #. type: Plain text
6593 #: build/C/man2/mmap2.2:70
6594 msgid ""
6595 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6596 "4096> is not a multiple of the system page size."
6597 msgstr ""
6598 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6599 "4096> がシステムのページサイズの倍数ではない。"
6600
6601 #. type: Plain text
6602 #: build/C/man2/mmap2.2:74
6603 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6604 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6605
6606 #. type: Plain text
6607 #: build/C/man2/mmap2.2:77
6608 msgid "B<mmap2>()  is available since Linux 2.3.31."
6609 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6610
6611 #. type: Plain text
6612 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6613 msgid "This system call is Linux-specific."
6614 msgstr "このシステムコールは Linux 独自である。"
6615
6616 #. type: Plain text
6617 #: build/C/man2/mmap2.2:86
6618 msgid ""
6619 "On architectures where this system call is present, the glibc B<mmap>()  "
6620 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6621 "call."
6622 msgstr ""
6623 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6624 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6625 "(B<mmap2>(2))  を起動する。"
6626
6627 #. type: Plain text
6628 #: build/C/man2/mmap2.2:88
6629 msgid "This system call does not exist on x86-64."
6630 msgstr "このシステムコールは x86-64 には存在しない。"
6631
6632 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6633 #.  On cris, it looks like the unit might also be the page size,
6634 #.  which is 8192 bytes. -- mtk, June 2007
6635 #. type: Plain text
6636 #: build/C/man2/mmap2.2:95
6637 msgid ""
6638 "On ia64, the unit for I<offset> is actually the system page size, rather "
6639 "than 4096 bytes."
6640 msgstr ""
6641 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6642 "バイトではない。"
6643
6644 #. type: Plain text
6645 #: build/C/man2/mmap2.2:101
6646 msgid ""
6647 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6648 msgstr ""
6649 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6650
6651 #. type: TH
6652 #: build/C/man2/mprotect.2:39
6653 #, no-wrap
6654 msgid "MPROTECT"
6655 msgstr "MPROTECT"
6656
6657 #. type: TH
6658 #: build/C/man2/mprotect.2:39
6659 #, no-wrap
6660 msgid "2014-01-05"
6661 msgstr "2014-01-05"
6662
6663 #. type: Plain text
6664 #: build/C/man2/mprotect.2:42
6665 msgid "mprotect - set protection on a region of memory"
6666 msgstr "mprotect - メモリー領域の保護を設定する"
6667
6668 #. type: Plain text
6669 #: build/C/man2/mprotect.2:47
6670 #, no-wrap
6671 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6672 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6673
6674 #. type: Plain text
6675 #: build/C/man2/mprotect.2:55
6676 msgid ""
6677 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6678 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6679 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6680 msgstr ""
6681 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6682 "び出し元のプロセスのメモリーページのアクセス保護を変更する。 I<addr> はページ"
6683 "境界に一致していなければならない。"
6684
6685 #. type: Plain text
6686 #: build/C/man2/mprotect.2:60
6687 msgid ""
6688 "If the calling process tries to access memory in a manner that violates the "
6689 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6690 msgstr ""
6691 "呼び出し元のプロセスがアクセス保護に違反するようなメモリーアクセスを 行おうと"
6692 "すると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6693
6694 #. type: Plain text
6695 #: build/C/man2/mprotect.2:65
6696 msgid ""
6697 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6698 "following list:"
6699 msgstr ""
6700 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6701 "毎の論理和 (bitwize-or) で指定する:"
6702
6703 #. type: Plain text
6704 #: build/C/man2/mprotect.2:68
6705 msgid "The memory cannot be accessed at all."
6706 msgstr "そのメモリーには全くアクセスできない。"
6707
6708 #. type: Plain text
6709 #: build/C/man2/mprotect.2:71
6710 msgid "The memory can be read."
6711 msgstr "そのメモリーを読み取ることができる。"
6712
6713 #. type: Plain text
6714 #: build/C/man2/mprotect.2:74
6715 msgid "The memory can be modified."
6716 msgstr "そのメモリーを変更できる。"
6717
6718 #. type: Plain text
6719 #: build/C/man2/mprotect.2:77
6720 msgid "The memory can be executed."
6721 msgstr "そのメモリーは実行可能である。"
6722
6723 #. type: Plain text
6724 #: build/C/man2/mprotect.2:84
6725 msgid ""
6726 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6727 "I<errno> is set appropriately."
6728 msgstr ""
6729 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6730 "I<errno> が適切に設定される。"
6731
6732 #. type: Plain text
6733 #: build/C/man2/mprotect.2:94
6734 msgid ""
6735 "The memory cannot be given the specified access.  This can happen, for "
6736 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6737 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6738 msgstr ""
6739 "指定されたアクセスをメモリーに設定することができない。 これは、例えば ファイ"
6740 "ルを読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼"
6741 "び出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6742
6743 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6744 #. type: Plain text
6745 #: build/C/man2/mprotect.2:99
6746 msgid ""
6747 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6748 msgstr ""
6749 "I<addr> が有効なポインターでないか、 システムのページサイズの倍数でない。"
6750
6751 #. type: Plain text
6752 #: build/C/man2/mprotect.2:102
6753 msgid "Internal kernel structures could not be allocated."
6754 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6755
6756 #. type: Plain text
6757 #: build/C/man2/mprotect.2:112
6758 msgid ""
6759 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6760 "address space of the process, or specify one or more pages that are not "
6761 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6762 "for these cases.)"
6763 msgstr ""
6764 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6765 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6766 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6767 "成されていた)。"
6768
6769 #.  SVr4 defines an additional error
6770 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6771 #. type: Plain text
6772 #: build/C/man2/mprotect.2:121
6773 msgid ""
6774 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6775 "unspecified if it is applied to a region of memory that was not obtained via "
6776 "B<mmap>(2)."
6777 msgstr ""
6778 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリー領"
6779 "域に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義である"
6780 "とされている。"
6781
6782 #. type: Plain text
6783 #: build/C/man2/mprotect.2:128
6784 msgid ""
6785 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6786 "process's address space (except for the kernel vsyscall area).  In "
6787 "particular it can be used to change existing code mappings to be writable."
6788 msgstr ""
6789 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6790 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6791 "マッピングを書き込み可能にするために使われる。"
6792
6793 #. type: Plain text
6794 #: build/C/man2/mprotect.2:138
6795 msgid ""
6796 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6797 "architecture- and kernel version-dependent.  On some hardware architectures "
6798 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6799 msgstr ""
6800 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャーと"
6801 "カーネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャーで"
6802 "は、 B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6803
6804 #. type: Plain text
6805 #: build/C/man2/mprotect.2:147
6806 msgid ""
6807 "POSIX.1-2001 says that an implementation may permit access other than that "
6808 "specified in I<prot>, but at a minimum can allow write access only if "
6809 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6810 "has been set."
6811 msgstr ""
6812 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6813 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6814 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6815 "ない点だけは 満たす必要がある。"
6816
6817 #. type: Plain text
6818 #: build/C/man2/mprotect.2:153
6819 msgid ""
6820 "The program below allocates four pages of memory, makes the third of these "
6821 "pages read-only, and then executes a loop that walks upward through the "
6822 "allocated region modifying bytes."
6823 msgstr ""
6824 "以下のプログラムは、メモリーページを 4つ確保し、そのうち 3番目のページを 読み"
6825 "込み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に"
6826 "向かって順番にバイト値を変更するループを実行する。"
6827
6828 #. type: Plain text
6829 #: build/C/man2/mprotect.2:156
6830 msgid ""
6831 "An example of what we might see when running the program is the following:"
6832 msgstr "プログラムを実行した場合の一例を以下に示す。"
6833
6834 #. type: Plain text
6835 #: build/C/man2/mprotect.2:162
6836 #, no-wrap
6837 msgid ""
6838 "$B< ./a.out>\n"
6839 "Start of region:        0x804c000\n"
6840 "Got SIGSEGV at address: 0x804e000\n"
6841 msgstr ""
6842 "$B< ./a.out>\n"
6843 "Start of region:        0x804c000\n"
6844 "Got SIGSEGV at address: 0x804e000\n"
6845
6846 #. type: Plain text
6847 #: build/C/man2/mprotect.2:174
6848 #, no-wrap
6849 msgid ""
6850 "#include E<lt>unistd.hE<gt>\n"
6851 "#include E<lt>signal.hE<gt>\n"
6852 "#include E<lt>stdio.hE<gt>\n"
6853 "#include E<lt>malloc.hE<gt>\n"
6854 "#include E<lt>stdlib.hE<gt>\n"
6855 "#include E<lt>errno.hE<gt>\n"
6856 "#include E<lt>sys/mman.hE<gt>\n"
6857 msgstr ""
6858 "#include E<lt>unistd.hE<gt>\n"
6859 "#include E<lt>signal.hE<gt>\n"
6860 "#include E<lt>stdio.hE<gt>\n"
6861 "#include E<lt>malloc.hE<gt>\n"
6862 "#include E<lt>stdlib.hE<gt>\n"
6863 "#include E<lt>errno.hE<gt>\n"
6864 "#include E<lt>sys/mman.hE<gt>\n"
6865
6866 #. type: Plain text
6867 #: build/C/man2/mprotect.2:179
6868 #, no-wrap
6869 msgid "static char *buffer;\n"
6870 msgstr "static char *buffer;\n"
6871
6872 #. type: Plain text
6873 #: build/C/man2/mprotect.2:187
6874 #, no-wrap
6875 msgid ""
6876 "static void\n"
6877 "handler(int sig, siginfo_t *si, void *unused)\n"
6878 "{\n"
6879 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6880 "            (long) si-E<gt>si_addr);\n"
6881 "    exit(EXIT_FAILURE);\n"
6882 "}\n"
6883 msgstr ""
6884 "static void\n"
6885 "handler(int sig, siginfo_t *si, void *unused)\n"
6886 "{\n"
6887 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6888 "            (long) si-E<gt>si_addr);\n"
6889 "    exit(EXIT_FAILURE);\n"
6890 "}\n"
6891
6892 #. type: Plain text
6893 #: build/C/man2/mprotect.2:194
6894 #, no-wrap
6895 msgid ""
6896 "int\n"
6897 "main(int argc, char *argv[])\n"
6898 "{\n"
6899 "    char *p;\n"
6900 "    int pagesize;\n"
6901 "    struct sigaction sa;\n"
6902 msgstr ""
6903 "int\n"
6904 "main(void)\n"
6905 "{\n"
6906 "    char *p;\n"
6907 "    int pagesize;\n"
6908 "    struct sigaction sa;\n"
6909
6910 #. type: Plain text
6911 #: build/C/man2/mprotect.2:200
6912 #, no-wrap
6913 msgid ""
6914 "    sa.sa_flags = SA_SIGINFO;\n"
6915 "    sigemptyset(&sa.sa_mask);\n"
6916 "    sa.sa_sigaction = handler;\n"
6917 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6918 "        handle_error(\"sigaction\");\n"
6919 msgstr ""
6920 "    sa.sa_flags = SA_SIGINFO;\n"
6921 "    sigemptyset(&sa.sa_mask);\n"
6922 "    sa.sa_sigaction = handler;\n"
6923 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6924 "        handle_error(\"sigaction\");\n"
6925
6926 #. type: Plain text
6927 #: build/C/man2/mprotect.2:204
6928 #, no-wrap
6929 msgid ""
6930 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6931 "    if (pagesize == -1)\n"
6932 "        handle_error(\"sysconf\");\n"
6933 msgstr ""
6934 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6935 "    if (pagesize == -1)\n"
6936 "        handle_error(\"sysconf\");\n"
6937
6938 #. type: Plain text
6939 #: build/C/man2/mprotect.2:207
6940 #, no-wrap
6941 msgid ""
6942 "    /* Allocate a buffer aligned on a page boundary;\n"
6943 "       initial protection is PROT_READ | PROT_WRITE */\n"
6944 msgstr ""
6945 "    /* Allocate a buffer aligned on a page boundary;\n"
6946 "       initial protection is PROT_READ | PROT_WRITE */\n"
6947
6948 #. type: Plain text
6949 #: build/C/man2/mprotect.2:211
6950 #, no-wrap
6951 msgid ""
6952 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6953 "    if (buffer == NULL)\n"
6954 "        handle_error(\"memalign\");\n"
6955 msgstr ""
6956 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6957 "    if (buffer == NULL)\n"
6958 "        handle_error(\"memalign\");\n"
6959
6960 #. type: Plain text
6961 #: build/C/man2/mprotect.2:213
6962 #, no-wrap
6963 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6964 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6965
6966 #. type: Plain text
6967 #: build/C/man2/mprotect.2:217
6968 #, no-wrap
6969 msgid ""
6970 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6971 "                PROT_READ) == -1)\n"
6972 "        handle_error(\"mprotect\");\n"
6973 msgstr ""
6974 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6975 "                PROT_READ) == -1)\n"
6976 "        handle_error(\"mprotect\");\n"
6977
6978 #. type: Plain text
6979 #: build/C/man2/mprotect.2:220
6980 #, no-wrap
6981 msgid ""
6982 "    for (p = buffer ; ; )\n"
6983 "        *(p++) = \\(aqa\\(aq;\n"
6984 msgstr ""
6985 "    for (p = buffer ; ; )\n"
6986 "        *(p++) = \\(aqa\\(aq;\n"
6987
6988 #. type: Plain text
6989 #: build/C/man2/mprotect.2:224
6990 #, no-wrap
6991 msgid ""
6992 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6993 "    exit(EXIT_SUCCESS);\n"
6994 "}\n"
6995 msgstr ""
6996 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6997 "    exit(EXIT_SUCCESS);\n"
6998 "}\n"
6999
7000 #. type: Plain text
7001 #: build/C/man2/mprotect.2:228
7002 msgid "B<mmap>(2), B<sysconf>(3)"
7003 msgstr "B<mmap>(2), B<sysconf>(3)"
7004
7005 #. type: TH
7006 #: build/C/man2/mremap.2:30
7007 #, no-wrap
7008 msgid "MREMAP"
7009 msgstr "MREMAP"
7010
7011 #. type: TH
7012 #: build/C/man2/mremap.2:30
7013 #, no-wrap
7014 msgid "2010-06-10"
7015 msgstr "2010-06-10"
7016
7017 #. type: Plain text
7018 #: build/C/man2/mremap.2:33
7019 msgid "mremap - remap a virtual memory address"
7020 msgstr "mremap - 仮想メモリーアドレスを再マッピングする"
7021
7022 #. type: Plain text
7023 #: build/C/man2/mremap.2:36
7024 #, no-wrap
7025 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7026 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7027
7028 #. type: Plain text
7029 #: build/C/man2/mremap.2:41
7030 #, no-wrap
7031 msgid ""
7032 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7033 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7034 msgstr ""
7035 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7036 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7037
7038 #. type: Plain text
7039 #: build/C/man2/mremap.2:47
7040 msgid ""
7041 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
7042 "moving it at the same time (controlled by the I<flags> argument and the "
7043 "available virtual address space)."
7044 msgstr ""
7045 "B<mremap>()  は既存のメモリーマッピングの拡張 (または縮小) を行う。 同時に移"
7046 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
7047 "る)。"
7048
7049 #. type: Plain text
7050 #: build/C/man2/mremap.2:61
7051 msgid ""
7052 "I<old_address> is the old address of the virtual memory block that you want "
7053 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
7054 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
7055 "requested size of the virtual memory block after the resize.  An optional "
7056 "fifth argument, I<new_address>, may be provided; see the description of "
7057 "B<MREMAP_FIXED> below."
7058 msgstr ""
7059 "I<old_address> は拡張 (または縮小) しようとする仮想メモリーブロック の元のア"
7060 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
7061 "すること。I<old_size> は元の仮想メモリーブロックの サイズである。 "
7062 "I<new_size> は要求する変更後の仮想メモリーブロックのサイズである。 5 番目の引"
7063 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
7064 "明を参照のこと。"
7065
7066 #. type: Plain text
7067 #: build/C/man2/mremap.2:73
7068 msgid ""
7069 "In Linux the memory is divided into pages.  A user process has (one or)  "
7070 "several linear virtual memory segments.  Each virtual memory segment has one "
7071 "or more mappings to real memory pages (in the page table).  Each virtual "
7072 "memory segment has its own protection (access rights), which may cause a "
7073 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
7074 "to a read-only segment).  Accessing virtual memory outside of the segments "
7075 "will also cause a segmentation violation."
7076 msgstr ""
7077 "Linux ではメモリーはページに分割される。ユーザープロセスは (一つまたは)  複数"
7078 "のリニアな仮想メモリーセグメントを持つ。 それぞれの仮想メモリーセグメントは一"
7079 "つ以上の実メモリーページ にマッピングされている (マッピング情報はページテーブ"
7080 "ルで管理される)。 仮想メモリーセグメントにはセグメント毎の保護 (アクセス権) "
7081 "が設定されており、 メモリーが不正にアクセスされた場合 (例えば読み込み専用のセ"
7082 "グメントに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) "
7083 "を 引き起こす。また、セグメント外の仮想メモリーにアクセスした場合にも セグメ"
7084 "ンテーション侵害が発生する。"
7085
7086 #. type: Plain text
7087 #: build/C/man2/mremap.2:81
7088 msgid ""
7089 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
7090 "mapping between virtual addresses and memory pages.  This can be used to "
7091 "implement a very efficient B<realloc>(3)."
7092 msgstr ""
7093 "B<mremap>()  は Linux のページテーブル方式を使用する。 B<mremap>()  は仮想ア"
7094 "ドレスとメモリーページのマッピングを変更する。これは非常に効率的な "
7095 "B<realloc>(3)  を実装するのに使用されている。"
7096
7097 #. type: Plain text
7098 #: build/C/man2/mremap.2:83
7099 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7100 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7101
7102 #. type: TP
7103 #: build/C/man2/mremap.2:83
7104 #, no-wrap
7105 msgid "B<MREMAP_MAYMOVE>"
7106 msgstr "B<MREMAP_MAYMOVE>"
7107
7108 #. type: Plain text
7109 #: build/C/man2/mremap.2:95
7110 msgid ""
7111 "By default, if there is not sufficient space to expand a mapping at its "
7112 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7113 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7114 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7115 "mapping location become invalid (offsets relative to the starting address of "
7116 "the mapping should be employed)."
7117 msgstr ""
7118 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7119 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7120 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7121 "れると、古いマッピング位置への絶対ポインターは 無効になる (マッピングの開始ア"
7122 "ドレスからの相対オフセットは有効のままである)。"
7123
7124 #. type: TP
7125 #: build/C/man2/mremap.2:95
7126 #, no-wrap
7127 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7128 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7129
7130 #. type: Plain text
7131 #: build/C/man2/mremap.2:117
7132 msgid ""
7133 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7134 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7135 "\\ *new_address>, which specifies a page-aligned address to which the "
7136 "mapping must be moved.  Any previous mapping at the address range specified "
7137 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7138 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7139 msgstr ""
7140 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7141 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7142 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7143 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7144 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7145 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7146 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7147
7148 #. type: Plain text
7149 #: build/C/man2/mremap.2:127
7150 msgid ""
7151 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7152 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7153 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7154 "locked by the process may change."
7155 msgstr ""
7156 "I<old_address> と I<old_size> で指定されるメモリーセグメントが (B<mlock>(2)  "
7157 "や同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置さ"
7158 "れたりした時にロックも維持される。 その結果、プロセスによってロックされるメモ"
7159 "リーの量は変化する。"
7160
7161 #. type: Plain text
7162 #: build/C/man2/mremap.2:135
7163 msgid ""
7164 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7165 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7166 "and I<errno> is set appropriately."
7167 msgstr ""
7168 "成功した場合は B<mremap>()  は新しい仮想メモリー領域へのポインターを返す。 エ"
7169 "ラーの場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> "
7170 "が適切に設定される。"
7171
7172 #. type: Plain text
7173 #: build/C/man2/mremap.2:142
7174 msgid ""
7175 "The caller tried to expand a memory segment that is locked, but this was not "
7176 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7177 msgstr ""
7178 "呼び出し元がロックされているメモリーセグメントを拡張しようとしたが、 "
7179 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7180
7181 #. type: Plain text
7182 #: build/C/man2/mremap.2:151
7183 msgid ""
7184 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7185 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7186 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7187 "the whole address space requested, but those mappings are of different types."
7188 msgstr ""
7189 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7190 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7191 "正な仮想メモリーアドレスである。 たとえ要求したアドレス空間全体を含むような"
7192 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7193 "を受け取るだろう。"
7194
7195 #. type: Plain text
7196 #: build/C/man2/mremap.2:179
7197 msgid ""
7198 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7199 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7200 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7201 "was invalid; or the new address range specified by I<new_address> and "
7202 "I<new_size> overlapped the old address range specified by I<old_address> and "
7203 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7204 "B<MREMAP_MAYMOVE>."
7205 msgstr ""
7206 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7207 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7208 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7209 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7210 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7211 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7212 "されていない。"
7213
7214 #. type: Plain text
7215 #: build/C/man2/mremap.2:185
7216 msgid ""
7217 "The memory area cannot be expanded at the current virtual address, and the "
7218 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7219 "(virtual) memory available."
7220 msgstr ""
7221 "現在の仮想アドレスではメモリー領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7222 "I<flags> に設定されていない。 または十分な (仮想) メモリーが存在しない。"
7223
7224 #.  4.2BSD had a (never actually implemented)
7225 #.  .BR mremap (2)
7226 #.  call with completely different semantics.
7227 #. type: Plain text
7228 #: build/C/man2/mremap.2:191
7229 msgid ""
7230 "This call is Linux-specific, and should not be used in programs intended to "
7231 "be portable."
7232 msgstr ""
7233 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7234 "い。"
7235
7236 #. type: Plain text
7237 #: build/C/man2/mremap.2:199
7238 msgid ""
7239 "Prior to version 2.4, glibc did not expose the definition of "
7240 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7241 "I<new_address> argument."
7242 msgstr ""
7243 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7244 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7245
7246 #. type: Plain text
7247 #: build/C/man2/mremap.2:208
7248 msgid ""
7249 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7250 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7251 msgstr ""
7252 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7253 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7254
7255 #. type: Plain text
7256 #: build/C/man2/mremap.2:214
7257 msgid ""
7258 "Your favorite text book on operating systems for more information on paged "
7259 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7260 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7261 "Maurice J. Bach)"
7262 msgstr ""
7263 "ページ分割されたメモリーについてもっと詳しく知りたいならば、あなたのお気に入"
7264 "りのオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7265 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7266 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7267
7268 #. type: TH
7269 #: build/C/man2/msync.2:25
7270 #, no-wrap
7271 msgid "MSYNC"
7272 msgstr "MSYNC"
7273
7274 #. type: TH
7275 #: build/C/man2/msync.2:25
7276 #, no-wrap
7277 msgid "2014-04-20"
7278 msgstr "2014-04-20"
7279
7280 #. type: Plain text
7281 #: build/C/man2/msync.2:28
7282 msgid "msync - synchronize a file with a memory map"
7283 msgstr "msync - ファイルをマップしたメモリーと同期させる"
7284
7285 #. type: Plain text
7286 #: build/C/man2/msync.2:32
7287 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7288 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7289
7290 #. type: Plain text
7291 #: build/C/man2/msync.2:48
7292 msgid ""
7293 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7294 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7295 "this call there is no guarantee that changes are written back before "
7296 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7297 "corresponds to the memory area starting at I<addr> and having length "
7298 "I<length> is updated."
7299 msgstr ""
7300 "B<msync>()  は B<mmap>(2)  を使ってメモリーにマップされたファイルの、 メモ"
7301 "リー上のコピーになされた変更をファイルシステムに反映させる。 この関数を使用し"
7302 "ないと、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より"
7303 "正確には、ファイルのうち I<addr> から始まり長さ I<length> のメモリー領域に対"
7304 "応する部分が更新される。"
7305
7306 #. type: Plain text
7307 #: build/C/man2/msync.2:68
7308 msgid ""
7309 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7310 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7311 "specifies that an update be scheduled, but the call returns immediately.  "
7312 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7313 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7314 "they can be updated with the fresh values just written)."
7315 msgstr ""
7316 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7317 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7318 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7319 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7320 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7321 "に対する他のマッピングを無効にすることを要求する。"
7322
7323 #. type: Plain text
7324 #: build/C/man2/msync.2:73
7325 msgid ""
7326 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7327 "appropriately."
7328 msgstr ""
7329 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7330 "る。"
7331
7332 #. type: TP
7333 #: build/C/man2/msync.2:74
7334 #, no-wrap
7335 msgid "B<EBUSY>"
7336 msgstr "B<EBUSY>"
7337
7338 #. type: Plain text
7339 #: build/C/man2/msync.2:80
7340 msgid ""
7341 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7342 "specified address range."
7343 msgstr ""
7344 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7345 "存在する。"
7346
7347 #. type: Plain text
7348 #: build/C/man2/msync.2:93
7349 msgid ""
7350 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7351 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7352 "B<MS_ASYNC> are set in I<flags>."
7353 msgstr ""
7354 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7355 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7356 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7357
7358 #. type: Plain text
7359 #: build/C/man2/msync.2:96
7360 msgid "The indicated memory (or part of it) was not mapped."
7361 msgstr "指定されたメモリー (またはその一部) がマップされていない。"
7362
7363 #. type: Plain text
7364 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7365 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7366 msgid "POSIX.1-2001."
7367 msgstr "POSIX.1-2001."
7368
7369 #. type: Plain text
7370 #: build/C/man2/msync.2:105
7371 msgid ""
7372 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7373 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7374 msgstr ""
7375 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7376 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7377
7378 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7379 #.  -1: unavailable, 0: ask using sysconf().
7380 #.  glibc defines them to 1.
7381 #. type: Plain text
7382 #: build/C/man2/msync.2:120
7383 msgid ""
7384 "On POSIX systems on which B<msync>()  is available, both "
7385 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7386 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7387 msgstr ""
7388 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7389 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7390 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7391
7392 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7393 #. type: Plain text
7394 #: build/C/man2/msync.2:147
7395 msgid ""
7396 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7397 "I<flags>, and indeed failure to include one of these flags will cause "
7398 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7399 "B<msync>()  that specifies neither of these flags, with semantics that are "
7400 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7401 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7402 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7403 "behavior, portable, future-proof applications should ensure that they "
7404 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7405 msgstr ""
7406 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7407 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7408 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7409 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7410 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7411 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7412 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7413 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7414 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7415 "指定するようにすべきである。"
7416
7417 #. type: TP
7418 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7419 #, no-wrap
7420 msgid "B<mmap>(2)"
7421 msgstr "B<mmap>(2)"
7422
7423 #. type: TH
7424 #: build/C/man3/mtrace.3:25
7425 #, no-wrap
7426 msgid "MTRACE"
7427 msgstr "MTRACE"
7428
7429 #. type: TH
7430 #: build/C/man3/mtrace.3:25
7431 #, no-wrap
7432 msgid "2012-04-18"
7433 msgstr "2012-04-18"
7434
7435 #. type: Plain text
7436 #: build/C/man3/mtrace.3:28
7437 msgid "mtrace, muntrace - malloc tracing"
7438 msgstr "mtrace, muntrace - malloc のトレース"
7439
7440 #. type: Plain text
7441 #: build/C/man3/mtrace.3:30
7442 msgid "B<#include E<lt>mcheck.hE<gt>>"
7443 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7444
7445 #. type: Plain text
7446 #: build/C/man3/mtrace.3:32
7447 msgid "B<void mtrace(void);>"
7448 msgstr "B<void mtrace(void);>"
7449
7450 #. type: Plain text
7451 #: build/C/man3/mtrace.3:34
7452 msgid "B<void muntrace(void);>"
7453 msgstr "B<void muntrace(void);>"
7454
7455 #. type: Plain text
7456 #: build/C/man3/mtrace.3:46
7457 msgid ""
7458 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7459 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7460 "hook functions record tracing information about memory allocation and "
7461 "deallocation.  The tracing information can be used to discover memory leaks "
7462 "and attempts to free nonallocated memory in a program."
7463 msgstr ""
7464
7465 #. type: Plain text
7466 #: build/C/man3/mtrace.3:57
7467 msgid ""
7468 "The B<muntrace>()  function disables the hook functions installed by "
7469 "B<mtrace>(), so that tracing information is no longer recorded for the "
7470 "memory-allocation functions.  If no hook functions were successfully "
7471 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7472 msgstr ""
7473
7474 #. type: Plain text
7475 #: build/C/man3/mtrace.3:65
7476 msgid ""
7477 "When B<mtrace>()  is called, it checks the value of the environment variable "
7478 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7479 "tracing information is to be recorded.  If the pathname is successfully "
7480 "opened, it is truncated to zero length."
7481 msgstr ""
7482
7483 #. type: Plain text
7484 #: build/C/man3/mtrace.3:78
7485 msgid ""
7486 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7487 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7488 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7489 "ignored, and B<mtrace>()  has no effect."
7490 msgstr ""
7491
7492 #. type: Plain text
7493 #: build/C/man3/mtrace.3:86
7494 msgid ""
7495 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7496 "program, and B<muntrace>()  is never called."
7497 msgstr ""
7498
7499 #. type: Plain text
7500 #: build/C/man3/mtrace.3:96
7501 msgid ""
7502 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7503 "designed to be human readable.  The GNU C library provides a Perl script, "
7504 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7505 "output.  For best results, the traced program should be compiled with "
7506 "debugging enabled, so that line-number information is recorded in the "
7507 "executable."
7508 msgstr ""
7509
7510 #. type: Plain text
7511 #: build/C/man3/mtrace.3:102
7512 msgid ""
7513 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7514 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7515 msgstr ""
7516
7517 #. type: Plain text
7518 #: build/C/man3/mtrace.3:108
7519 msgid ""
7520 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7521 "the line number references may refer to the previous or following "
7522 "(nonblank)  line of the source code."
7523 msgstr ""
7524
7525 #. type: Plain text
7526 #: build/C/man3/mtrace.3:115
7527 msgid ""
7528 "The shell session below demonstrates the use of the B<mtrace>()  function "
7529 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7530 "different locations.  The demonstration uses the following program:"
7531 msgstr ""
7532
7533 #. type: Plain text
7534 #: build/C/man3/mtrace.3:122
7535 #, no-wrap
7536 msgid ""
7537 "$ B<cat t_mtrace.c>\n"
7538 "#include E<lt>mcheck.hE<gt>\n"
7539 "#include E<lt>stdlib.hE<gt>\n"
7540 "#include E<lt>stdio.hE<gt>\n"
7541 msgstr ""
7542 "$ B<cat t_mtrace.c>\n"
7543 "#include E<lt>mcheck.hE<gt>\n"
7544 "#include E<lt>stdlib.hE<gt>\n"
7545 "#include E<lt>stdio.hE<gt>\n"
7546
7547 #. type: Plain text
7548 #: build/C/man3/mtrace.3:127
7549 #, no-wrap
7550 msgid ""
7551 "int\n"
7552 "main(int argc, char *argv[])\n"
7553 "{\n"
7554 "    int j;\n"
7555 msgstr ""
7556 "int\n"
7557 "main(int argc, char *argv[])\n"
7558 "{\n"
7559 "    int j;\n"
7560
7561 #. type: Plain text
7562 #: build/C/man3/mtrace.3:129
7563 #, no-wrap
7564 msgid "    mtrace();\n"
7565 msgstr "    mtrace();\n"
7566
7567 #. type: Plain text
7568 #: build/C/man3/mtrace.3:132
7569 #, no-wrap
7570 msgid ""
7571 "    for (j = 0; j E<lt> 2; j++)\n"
7572 "        malloc(100);            /* Never freed--a memory leak */\n"
7573 msgstr ""
7574 "    for (j = 0; j E<lt> 2; j++)\n"
7575 "        malloc(100);            /* Never freed--a memory leak */\n"
7576
7577 #. type: Plain text
7578 #: build/C/man3/mtrace.3:136
7579 #, no-wrap
7580 msgid ""
7581 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7582 "    exit(EXIT_SUCCESS);\n"
7583 "}\n"
7584 msgstr ""
7585 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7586 "    exit(EXIT_SUCCESS);\n"
7587 "}\n"
7588
7589 #. type: Plain text
7590 #: build/C/man3/mtrace.3:142
7591 msgid ""
7592 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7593 "memory leaks at two different locations in the program:"
7594 msgstr ""
7595
7596 #. type: Plain text
7597 #: build/C/man3/mtrace.3:155
7598 #, no-wrap
7599 msgid ""
7600 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7601 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7602 "$ B<./t_mtrace>\n"
7603 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7604 "Memory not freed:\n"
7605 "-----------------\n"
7606 "   Address     Size     Caller\n"
7607 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7608 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7609 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7610 msgstr ""
7611 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7612 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7613 "$ B<./t_mtrace>\n"
7614 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7615 "Memory not freed:\n"
7616 "-----------------\n"
7617 "   Address     Size     Caller\n"
7618 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7619 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7620 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7621
7622 #. type: Plain text
7623 #: build/C/man3/mtrace.3:167
7624 msgid ""
7625 "The first two messages about unfreed memory correspond to the two "
7626 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7627 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7628 msgstr ""
7629
7630 #. type: Plain text
7631 #: build/C/man3/mtrace.3:172
7632 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7633 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7634
7635 #. type: TH
7636 #: build/C/man2/posix_fadvise.2:28
7637 #, no-wrap
7638 msgid "POSIX_FADVISE"
7639 msgstr "POSIX_FADVISE"
7640
7641 #. type: Plain text
7642 #: build/C/man2/posix_fadvise.2:31
7643 msgid "posix_fadvise - predeclare an access pattern for file data"
7644 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7645
7646 #. type: Plain text
7647 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7648 #, no-wrap
7649 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7650 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7651
7652 #. type: Plain text
7653 #: build/C/man2/posix_fadvise.2:37
7654 #, no-wrap
7655 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7656 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7657
7658 #. type: Plain text
7659 #: build/C/man2/posix_fadvise.2:46
7660 msgid "B<posix_fadvise>():"
7661 msgstr "B<posix_fadvise>():"
7662
7663 #. type: Plain text
7664 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7665 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7666 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7667
7668 #. type: Plain text
7669 #: build/C/man2/posix_fadvise.2:56
7670 msgid ""
7671 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7672 "data in a specific pattern in the future, thus allowing the kernel to "
7673 "perform appropriate optimizations."
7674 msgstr ""
7675 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7676 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7677 "適化を実行することが可能になる。"
7678
7679 #. type: Plain text
7680 #: build/C/man2/posix_fadvise.2:63
7681 msgid ""
7682 "The I<advice> applies to a (not necessarily existent) region starting at "
7683 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7684 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7685 "binding; it merely constitutes an expectation on behalf of the application."
7686 msgstr ""
7687 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7688 "イ\n"
7689 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7690 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7691 "ケー\n"
7692 "ションのために可能性を構成するだけである。"
7693
7694 #. type: Plain text
7695 #: build/C/man2/posix_fadvise.2:65
7696 msgid "Permissible values for I<advice> include:"
7697 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7698
7699 #. type: TP
7700 #: build/C/man2/posix_fadvise.2:65
7701 #, no-wrap
7702 msgid "B<POSIX_FADV_NORMAL>"
7703 msgstr "B<POSIX_FADV_NORMAL>"
7704
7705 #. type: Plain text
7706 #: build/C/man2/posix_fadvise.2:71
7707 msgid ""
7708 "Indicates that the application has no advice to give about its access "
7709 "pattern for the specified data.  If no advice is given for an open file, "
7710 "this is the default assumption."
7711 msgstr ""
7712 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7713 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7714 "合、 これがデフォルトで仮定される。"
7715
7716 #. type: TP
7717 #: build/C/man2/posix_fadvise.2:71
7718 #, no-wrap
7719 msgid "B<POSIX_FADV_SEQUENTIAL>"
7720 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7721
7722 #. type: Plain text
7723 #: build/C/man2/posix_fadvise.2:75
7724 msgid ""
7725 "The application expects to access the specified data sequentially (with "
7726 "lower offsets read before higher ones)."
7727 msgstr ""
7728 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7729 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7730
7731 #. type: TP
7732 #: build/C/man2/posix_fadvise.2:75
7733 #, no-wrap
7734 msgid "B<POSIX_FADV_RANDOM>"
7735 msgstr "B<POSIX_FADV_RANDOM>"
7736
7737 #. type: Plain text
7738 #: build/C/man2/posix_fadvise.2:78
7739 msgid "The specified data will be accessed in random order."
7740 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7741
7742 #. type: TP
7743 #: build/C/man2/posix_fadvise.2:78
7744 #, no-wrap
7745 msgid "B<POSIX_FADV_NOREUSE>"
7746 msgstr "B<POSIX_FADV_NOREUSE>"
7747
7748 #. type: Plain text
7749 #: build/C/man2/posix_fadvise.2:81
7750 msgid "The specified data will be accessed only once."
7751 msgstr "指定されたデータは 1 度しかアクセスされない。"
7752
7753 #. type: TP
7754 #: build/C/man2/posix_fadvise.2:81
7755 #, no-wrap
7756 msgid "B<POSIX_FADV_WILLNEED>"
7757 msgstr "B<POSIX_FADV_WILLNEED>"
7758
7759 #. type: Plain text
7760 #: build/C/man2/posix_fadvise.2:84
7761 msgid "The specified data will be accessed in the near future."
7762 msgstr "指定されたデータは近い将来アクセスされる。"
7763
7764 #. type: TP
7765 #: build/C/man2/posix_fadvise.2:84
7766 #, no-wrap
7767 msgid "B<POSIX_FADV_DONTNEED>"
7768 msgstr "B<POSIX_FADV_DONTNEED>"
7769
7770 #. type: Plain text
7771 #: build/C/man2/posix_fadvise.2:87
7772 msgid "The specified data will not be accessed in the near future."
7773 msgstr "指定されたデータは近い将来アクセスされない。"
7774
7775 #. type: Plain text
7776 #: build/C/man2/posix_fadvise.2:90
7777 msgid "On success, zero is returned.  On error, an error number is returned."
7778 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7779
7780 #. type: Plain text
7781 #: build/C/man2/posix_fadvise.2:94
7782 msgid "The I<fd> argument was not a valid file descriptor."
7783 msgstr "I<fd> 引き数が有効なファイルディスクリプターでない。"
7784
7785 #. type: Plain text
7786 #: build/C/man2/posix_fadvise.2:97
7787 msgid "An invalid value was specified for I<advice>."
7788 msgstr "無効な値が I<advice> に指定された。"
7789
7790 #.  commit 87ba81dba431232548ce29d5d224115d0c2355ac
7791 #. type: Plain text
7792 #: build/C/man2/posix_fadvise.2:107
7793 msgid ""
7794 "The specified file descriptor refers to a pipe or FIFO.  (B<ESPIPE> is the "
7795 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7796 "B<EINVAL> in this case.)"
7797 msgstr ""
7798 "指定されたファイルディスクリプターがパイプまたは FIFO を参照している "
7799 "(B<ESPIPE> は POSIX で規定されているエラーだが、 バージョン 2.16 より前のカー"
7800 "ネルでは、 この場合に B<EINVAL> を返していた。)"
7801
7802 #.  of fadvise64_64()
7803 #. type: Plain text
7804 #: build/C/man2/posix_fadvise.2:115
7805 msgid ""
7806 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7807 "called B<fadvise64>().  Library support has been provided since glibc "
7808 "version 2.2, via the wrapper function B<posix_fadvise>()."
7809 msgstr ""
7810 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7811 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7812 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7813 "ラッパー関数は B<posix_fadvise>() という名前である。"
7814
7815 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7816 #. type: Plain text
7817 #: build/C/man2/posix_fadvise.2:122
7818 msgid ""
7819 "Since Linux 3.18, support for the underlying system call is optional, "
7820 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7821 "option."
7822 msgstr ""
7823 "Linux 3.18 以降では、対応するシステムコールのサポートは任意となり、利用できる"
7824 "かはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされ"
7825 "ているかに依存する。"
7826
7827 #. type: Plain text
7828 #: build/C/man2/posix_fadvise.2:131
7829 msgid ""
7830 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7831 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7832 msgstr ""
7833 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7834 "I<off_t> に変更された点に注意すること。"
7835
7836 #. type: Plain text
7837 #: build/C/man2/posix_fadvise.2:137
7838 msgid ""
7839 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7840 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7841 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7842 "the entire file, not just the specified region (but other open file handles "
7843 "to the same file are unaffected)."
7844 msgstr ""
7845 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7846 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7847 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7848 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7849 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7850
7851 #. type: Plain text
7852 #: build/C/man2/posix_fadvise.2:144
7853 msgid ""
7854 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7855 "into the page cache.  The amount of data read may be decreased by the kernel "
7856 "depending on virtual memory load.  (A few megabytes will usually be fully "
7857 "satisfied, and more is rarely useful.)"
7858 msgstr ""
7859 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7860 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリーの負荷に依ってカー"
7861 "ネルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより"
7862 "多くてもめったに役に立たない)。"
7863
7864 #. type: Plain text
7865 #: build/C/man2/posix_fadvise.2:148
7866 msgid ""
7867 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7868 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7869 "flag is a no-op."
7870 msgstr ""
7871 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7872 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7873 "フラグは何も行わない。"
7874
7875 #. type: Plain text
7876 #: build/C/man2/posix_fadvise.2:156
7877 msgid ""
7878 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7879 "specified region.  This is useful, for example, while streaming large "
7880 "files.  A program may periodically request the kernel to free cached data "
7881 "that has already been used, so that more useful cached pages are not "
7882 "discarded instead."
7883 msgstr ""
7884 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7885 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7886 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7887 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7888 "されたページが、 代わりに破棄されることはない。"
7889
7890 #. type: Plain text
7891 #: build/C/man2/posix_fadvise.2:164
7892 msgid ""
7893 "Requests to discard partial pages are ignored.  It is preferable to preserve "
7894 "needed data than discard unneeded data.  If the application requires that "
7895 "data be considered for discarding then I<offset> and I<len> must be page-"
7896 "aligned."
7897 msgstr ""
7898 "ページの一部分の破棄要求は無視される。 不要なデータを破棄するよりも必要なデー"
7899 "タを保持する方がよい。 アプリケーションがデータを破棄した方がよいと思う場合"
7900 "は、 I<offset> と I<len> がページ境界に合っていなければならない。"
7901
7902 #. type: Plain text
7903 #: build/C/man2/posix_fadvise.2:172
7904 msgid ""
7905 "Pages that have not yet been written out will be unaffected, so if the "
7906 "application wishes to guarantee that pages will be released, it should call "
7907 "B<fsync>(2)  or B<fdatasync>(2)  first."
7908 msgstr ""
7909 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7910 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7911 "B<fdatasync>(2)  を呼ぶべきである。"
7912
7913 #. type: SS
7914 #: build/C/man2/posix_fadvise.2:172
7915 #, no-wrap
7916 msgid "Architecture-specific variants"
7917 msgstr "アーキテクチャー固有の派生バージョン"
7918
7919 #. type: Plain text
7920 #: build/C/man2/posix_fadvise.2:189
7921 msgid ""
7922 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7923 "of registers (see B<syscall>(2)  for further detail).  On such "
7924 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7925 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7926 "and I<offset> arguments.  Therefore, these architectures define a version of "
7927 "the system call that orders the arguments suitably, but otherwise is "
7928 "otherwise exactly the same as B<posix_fadvise>()."
7929 msgstr ""
7930 "いくつかのアーキテクチャーでは、 64 ビットの引き数は適切なレジスターの組に割"
7931 "り当てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャーでは、 "
7932 "「書式」に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 "
7933 "I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費されてし"
7934 "まう。 そのため、 これらのアーキテクチャーでは引き数が適切な順序になった別の"
7935 "システムコールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じで"
7936 "ある。"
7937
7938 #. type: Plain text
7939 #: build/C/man2/posix_fadvise.2:191
7940 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7941 msgstr ""
7942 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7943
7944 #. type: Plain text
7945 #: build/C/man2/posix_fadvise.2:196
7946 #, no-wrap
7947 msgid ""
7948 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7949 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7950 msgstr ""
7951 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7952 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7953
7954 #. type: Plain text
7955 #: build/C/man2/posix_fadvise.2:204
7956 msgid ""
7957 "These architecture-specific details are generally hidden from applications "
7958 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7959 "appropriate architecture-specific system call."
7960 msgstr ""
7961 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7962 "チャー固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適"
7963 "切なアーキテクチャー固有のシステムコールが呼び出される。"
7964
7965 #. type: Plain text
7966 #: build/C/man2/posix_fadvise.2:209
7967 msgid ""
7968 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7969 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7970 "through to the end of the file\"."
7971 msgstr ""
7972 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7973 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7974 "いた。"
7975
7976 #.  FIXME . Write a posix_fadvise(3) page.
7977 #. type: Plain text
7978 #: build/C/man2/posix_fadvise.2:215
7979 msgid ""
7980 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7981 "B<posix_madvise>(3)"
7982 msgstr ""
7983 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7984 "B<posix_madvise>(3)"
7985
7986 #. type: TH
7987 #: build/C/man3/posix_fallocate.3:25
7988 #, no-wrap
7989 msgid "POSIX_FALLOCATE"
7990 msgstr "POSIX_FALLOCATE"
7991
7992 #. type: Plain text
7993 #: build/C/man3/posix_fallocate.3:28
7994 msgid "posix_fallocate - allocate file space"
7995 msgstr "posix_fallocate - ファイルのスペースを確保する"
7996
7997 #. type: Plain text
7998 #: build/C/man3/posix_fallocate.3:33
7999 #, no-wrap
8000 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
8001 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
8002
8003 #. type: Plain text
8004 #: build/C/man3/posix_fallocate.3:42
8005 msgid "B<posix_fallocate>():"
8006 msgstr "B<posix_fallocate>():"
8007
8008 #. type: Plain text
8009 #: build/C/man3/posix_fallocate.3:61
8010 msgid ""
8011 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
8012 "the file referred to by the descriptor I<fd> for the bytes in the range "
8013 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
8014 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
8015 "range are guaranteed not to fail because of lack of disk space."
8016 msgstr ""
8017 "関数 B<posix_fallocate>()  は、ディスクリプター I<fd> で参照されるファイルに"
8018 "対して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から"
8019 "始まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが"
8020 "成功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足"
8021 "で失敗しないことが保証される。"
8022
8023 #. type: Plain text
8024 #: build/C/man3/posix_fallocate.3:66
8025 msgid ""
8026 "If the size of the file is less than I<offset>+I<len>, then the file is "
8027 "increased to this size; otherwise the file size is left unchanged."
8028 msgstr ""
8029 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
8030 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
8031
8032 #. type: Plain text
8033 #: build/C/man3/posix_fallocate.3:72
8034 msgid ""
8035 "B<posix_fallocate>()  returns zero on success, or an error number on "
8036 "failure.  Note that I<errno> is not set."
8037 msgstr ""
8038 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
8039 "す。 I<errno> が設定されない点に注意すること。"
8040
8041 #. type: Plain text
8042 #: build/C/man3/posix_fallocate.3:81
8043 msgid "I<offset+len> exceeds the maximum file size."
8044 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
8045
8046 #. type: Plain text
8047 #: build/C/man3/posix_fallocate.3:91
8048 msgid "I<fd> does not refer to a regular file."
8049 msgstr "I<fd> が通常のファイルとして参照されていない。"
8050
8051 #. type: Plain text
8052 #: build/C/man3/posix_fallocate.3:100
8053 msgid "I<fd> refers to a pipe."
8054 msgstr "I<fd> がパイプを参照している。"
8055
8056 #. type: Plain text
8057 #: build/C/man3/posix_fallocate.3:103
8058 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
8059 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
8060
8061 #. type: Plain text
8062 #: build/C/man3/posix_fallocate.3:108
8063 msgid "The B<posix_fallocate>()  function is thread-safe."
8064 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
8065
8066 #. type: Plain text
8067 #: build/C/man3/posix_fallocate.3:133
8068 msgid ""
8069 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
8070 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
8071 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
8072 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
8073 "zero."
8074 msgstr ""
8075 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
8076 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
8077 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
8078 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
8079 "る。"
8080
8081 #. type: Plain text
8082 #: build/C/man3/posix_fallocate.3:138
8083 msgid ""
8084 "In the glibc implementation, B<posix_fallocate>()  is implemented using "
8085 "B<fallocate>(2)."
8086 msgstr ""
8087 "glibc の実装では、 B<posix_fallocate>() は B<fallocate>() を使って実装されて"
8088 "いる。"
8089
8090 #. type: Plain text
8091 #: build/C/man3/posix_fallocate.3:143
8092 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8093 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8094
8095 #. type: TH
8096 #: build/C/man3/posix_memalign.3:29
8097 #, no-wrap
8098 msgid "POSIX_MEMALIGN"
8099 msgstr "POSIX_MEMALIGN"
8100
8101 #. type: TH
8102 #: build/C/man3/posix_memalign.3:29
8103 #, no-wrap
8104 msgid "2013-09-02"
8105 msgstr "2013-09-02"
8106
8107 #. type: Plain text
8108 #: build/C/man3/posix_memalign.3:32
8109 msgid ""
8110 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8111 "memory"
8112 msgstr ""
8113 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8114 "されたメモリーの割り当てを行う"
8115
8116 #. type: Plain text
8117 #: build/C/man3/posix_memalign.3:35
8118 #, no-wrap
8119 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8120 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8121
8122 #. type: Plain text
8123 #: build/C/man3/posix_memalign.3:39
8124 #, no-wrap
8125 msgid ""
8126 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8127 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8128 "B<void *valloc(size_t >I<size>B<);>\n"
8129 msgstr ""
8130 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8131 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8132 "B<void *valloc(size_t >I<size>B<);>\n"
8133
8134 #. type: Plain text
8135 #: build/C/man3/posix_memalign.3:44
8136 #, no-wrap
8137 msgid ""
8138 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8139 "B<void *pvalloc(size_t >I<size>B<);>\n"
8140 msgstr ""
8141 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8142 "B<void *pvalloc(size_t >I<size>B<);>\n"
8143
8144 #. type: Plain text
8145 #: build/C/man3/posix_memalign.3:54
8146 msgid ""
8147 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8148 "E<gt>=\\ 600"
8149 msgstr ""
8150 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8151 "E<gt>=\\ 600"
8152
8153 #. type: Plain text
8154 #: build/C/man3/posix_memalign.3:57
8155 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8156 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8157
8158 #. type: Plain text
8159 #: build/C/man3/posix_memalign.3:59
8160 msgid "B<valloc>():"
8161 msgstr "B<valloc>():"
8162
8163 #. type: TP
8164 #: build/C/man3/posix_memalign.3:62
8165 #, no-wrap
8166 msgid "Since glibc 2.12:"
8167 msgstr "glibc 2.12 以降:"
8168
8169 #. type: Plain text
8170 #: build/C/man3/posix_memalign.3:69
8171 #, no-wrap
8172 msgid ""
8173 "_BSD_SOURCE ||\n"
8174 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8175 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8176 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8177 msgstr ""
8178 "_BSD_SOURCE ||\n"
8179 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8180 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8181 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8182
8183 #. type: TP
8184 #: build/C/man3/posix_memalign.3:71
8185 #, no-wrap
8186 msgid "Before glibc 2.12:"
8187 msgstr "glibc 2.12 より前:"
8188
8189 #. type: Plain text
8190 #: build/C/man3/posix_memalign.3:75
8191 msgid ""
8192 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8193 "_XOPEN_SOURCE_EXTENDED"
8194 msgstr ""
8195 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8196 "_XOPEN_SOURCE_EXTENDED"
8197
8198 #. type: Plain text
8199 #: build/C/man3/posix_memalign.3:82
8200 msgid ""
8201 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8202 "declaration of B<valloc>(); no feature test macros are required.)"
8203 msgstr ""
8204 "((非標準の) ヘッダーファイル I<E<lt>malloc.hE<gt>> も\n"
8205 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8206
8207 #.  glibc does this:
8208 #. type: Plain text
8209 #: build/C/man3/posix_memalign.3:104
8210 msgid ""
8211 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8212 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8213 "memory will be a multiple of I<alignment>, which must be a power of two and "
8214 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8215 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8216 "successfully passed to B<free>(3)."
8217 msgstr ""
8218 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリーを割り当て、割り当てら"
8219 "れたメモリーのアドレスを I<*memptr> に設定する。 割り当てられたメモリーのアド"
8220 "レスは I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗"
8221 "で、かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場"
8222 "合、 I<*memptr> には NULL か一意なポインター値が書かれる。 このポインター値"
8223 "は、後で B<free>(3)  に問題なく渡すことができる。"
8224
8225 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8226 #.  but no standards govern this.
8227 #. type: Plain text
8228 #: build/C/man3/posix_memalign.3:115
8229 msgid ""
8230 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8231 "pointer to the allocated memory.  The memory address will be a multiple of "
8232 "I<alignment>, which must be a power of two."
8233 msgstr ""
8234 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリーを割り当"
8235 "て、\n"
8236 "割り当てられたメモリーへのポインターを返す。 メモリーのアドレスは "
8237 "I<alignment> \n"
8238 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8239
8240 #. type: Plain text
8241 #: build/C/man3/posix_memalign.3:124
8242 msgid ""
8243 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8244 "the added restriction that I<size> should be a multiple of I<alignment>."
8245 msgstr ""
8246 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8247 "I<alignment>\n"
8248 "の倍数でなければならないという追加の制限がある点が異なる。"
8249
8250 #. type: Plain text
8251 #: build/C/man3/posix_memalign.3:133
8252 msgid ""
8253 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8254 "pointer to the allocated memory.  The memory address will be a multiple of "
8255 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8256 msgstr ""
8257 "廃止された関数である B<valloc>()  は I<size> バイトのメモリーを割り当て、割り"
8258 "当てられたメモリーへのポインターを返す。 メモリーのアドレスはページサイズの倍"
8259 "数になっているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と"
8260 "等価である。"
8261
8262 #. type: Plain text
8263 #: build/C/man3/posix_memalign.3:140
8264 msgid ""
8265 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8266 "the size of the allocation up to the next multiple of the system page size."
8267 msgstr ""
8268 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8269 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8270
8271 #. type: Plain text
8272 #: build/C/man3/posix_memalign.3:142
8273 msgid "For all of these functions, the memory is not zeroed."
8274 msgstr "これらの関数はいずれもメモリーのゼロクリアを行わない。"
8275
8276 #. type: Plain text
8277 #: build/C/man3/posix_memalign.3:149
8278 msgid ""
8279 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8280 "pointer to the allocated memory, or NULL if the request fails."
8281 msgstr ""
8282 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8283 "た\n"
8284 "メモリーへのポインターを返す。 割り当てに失敗した場合は NULL を返す。"
8285
8286 #. type: Plain text
8287 #: build/C/man3/posix_memalign.3:157
8288 msgid ""
8289 "B<posix_memalign>()  returns zero on success, or one of the error values "
8290 "listed in the next section on failure.  The value of I<errno> is "
8291 "indeterminate after a call to B<posix_memalign>()."
8292 msgstr ""
8293 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8294 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8295 "I<errno> の値は不定である。"
8296
8297 #. type: Plain text
8298 #: build/C/man3/posix_memalign.3:164
8299 msgid ""
8300 "The I<alignment> argument was not a power of two, or was not a multiple of "
8301 "I<sizeof(void\\ *)>."
8302 msgstr ""
8303 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8304 "かった。"
8305
8306 #. type: Plain text
8307 #: build/C/man3/posix_memalign.3:167
8308 msgid "There was insufficient memory to fulfill the allocation request."
8309 msgstr "割り当て要求を満たすのに十分なメモリーがなかった。"
8310
8311 #. type: Plain text
8312 #: build/C/man3/posix_memalign.3:174
8313 msgid ""
8314 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8315 "available in all Linux libc libraries."
8316 msgstr ""
8317 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8318 "すべての Linux libc ライブラリで使用可能である。"
8319
8320 #. type: Plain text
8321 #: build/C/man3/posix_memalign.3:178
8322 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8323 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8324
8325 #. type: Plain text
8326 #: build/C/man3/posix_memalign.3:182
8327 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8328 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8329
8330 #. type: Plain text
8331 #: build/C/man3/posix_memalign.3:189
8332 msgid ""
8333 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8334 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8335 "POSIX.1-2001."
8336 msgstr ""
8337 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8338 "り、\n"
8339 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8340
8341 #. type: Plain text
8342 #: build/C/man3/posix_memalign.3:193
8343 msgid "The function B<pvalloc>()  is a GNU extension."
8344 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8345
8346 #. type: Plain text
8347 #: build/C/man3/posix_memalign.3:197
8348 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8349 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8350
8351 #. type: Plain text
8352 #: build/C/man3/posix_memalign.3:201
8353 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8354 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8355
8356 #. type: Plain text
8357 #: build/C/man3/posix_memalign.3:206
8358 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8359 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8360
8361 #. type: SS
8362 #: build/C/man3/posix_memalign.3:206
8363 #, no-wrap
8364 msgid "Headers"
8365 msgstr "ヘッダー"
8366
8367 #. type: Plain text
8368 #: build/C/man3/posix_memalign.3:210
8369 msgid ""
8370 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8371 "hE<gt>>."
8372 msgstr ""
8373 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8374 "の意見が一致している。"
8375
8376 #. type: Plain text
8377 #: build/C/man3/posix_memalign.3:214
8378 msgid ""
8379 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8380 "of I<E<lt>malloc.hE<gt>>."
8381 msgstr ""
8382 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8383 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8384
8385 #. type: Plain text
8386 #: build/C/man3/posix_memalign.3:221
8387 msgid ""
8388 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8389 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8390 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8391 "above)."
8392 msgstr ""
8393 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8394 "libc4,5\n"
8395 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8396 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8397
8398 #. type: Plain text
8399 #: build/C/man3/posix_memalign.3:230
8400 msgid ""
8401 "On many systems there are alignment restrictions, for example, on buffers "
8402 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8403 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8404 "use B<posix_memalign>()  to satisfy this requirement."
8405 msgstr ""
8406 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8407 "スに対するダイレクト I/O に使用するバッファーには アラインメントに関する制限"
8408 "がある。 POSIX では、どんなアラインメントが必要かを知るために "
8409 "I<pathconf(path,_PC_REC_XFER_ALIGN)> コールを規定している。ここで "
8410 "B<posix_memalign>()  を使うと、この必要条件を満たすことができる。"
8411
8412 #. type: Plain text
8413 #: build/C/man3/posix_memalign.3:239
8414 msgid ""
8415 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8416 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8417 "is correct."
8418 msgstr ""
8419 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8420 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8421 "確認を行わないかもしれない。"
8422
8423 #.  Other systems allow passing the result of
8424 #.  .IR valloc ()
8425 #.  to
8426 #.  .IR free (3),
8427 #.  but not to
8428 #.  .IR realloc (3).
8429 #. type: Plain text
8430 #: build/C/man3/posix_memalign.3:267
8431 msgid ""
8432 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8433 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8434 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8435 "only a pointer obtained from B<malloc>(3), while, for example, "
8436 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8437 "The glibc implementation allows memory obtained from any of these functions "
8438 "to be reclaimed with B<free>(3)."
8439 msgstr ""
8440 "POSIX では B<posix_memalign>() によって獲得したメモリーは B<free>(3) を\n"
8441 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8442 "B<memalign>() やB<valloc>() で割り当てられたメモリーを再利用する手段が\n"
8443 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8444 "B<malloc>(3) から受け取ったポインターだけだが、例えば B<memalign>() は\n"
8445 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8446 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリーも\n"
8447 "B<free>(3) で再利用することができる。"
8448
8449 #. type: Plain text
8450 #: build/C/man3/posix_memalign.3:272
8451 msgid ""
8452 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8453 "these functions are needed only if you require larger alignment values."
8454 msgstr ""
8455 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリーアドレス"
8456 "を\n"
8457 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8458 "ト\n"
8459 "が必要な場合だけである。"
8460
8461 #. type: Plain text
8462 #: build/C/man3/posix_memalign.3:277
8463 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8464 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8465
8466 #. type: TH
8467 #: build/C/man2/readahead.2:28
8468 #, no-wrap
8469 msgid "READAHEAD"
8470 msgstr "READAHEAD"
8471
8472 #. type: TH
8473 #: build/C/man2/readahead.2:28
8474 #, no-wrap
8475 msgid "2014-03-15"
8476 msgstr "2014-03-15"
8477
8478 #. type: Plain text
8479 #: build/C/man2/readahead.2:31
8480 msgid "readahead - initiate file readahead into page cache"
8481 msgstr "readahead - 前もってファイルをページキャッシュに読み込む"
8482
8483 #. type: Plain text
8484 #: build/C/man2/readahead.2:37
8485 #, no-wrap
8486 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8487 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8488
8489 #. type: Plain text
8490 #: build/C/man2/readahead.2:44
8491 msgid ""
8492 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8493 "that file will be satisfied from the cache, and not block on disk I/O "
8494 "(assuming the readahead was initiated early enough and that other activity "
8495 "on the system did not in the meantime flush pages from the cache)."
8496 msgstr ""
8497 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8498 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8499 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8500 "ページがフラッシュされない場合である)。"
8501
8502 #. type: Plain text
8503 #: build/C/man2/readahead.2:66
8504 msgid ""
8505 "The I<fd> argument is a file descriptor identifying the file which is to be "
8506 "read.  The I<offset> argument specifies the starting point from which data "
8507 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8508 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8509 "page boundary and bytes are read up to the next page boundary greater than "
8510 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8511 "of the file.  The current file offset of the open file referred to by I<fd> "
8512 "is left unchanged."
8513 msgstr ""
8514 "I<fd> 引き数は読み込みを行うファイルを識別するファイルディスクリプターであ"
8515 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8516 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8517 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8518 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8519 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8520 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8521
8522 #. type: Plain text
8523 #: build/C/man2/readahead.2:72
8524 msgid ""
8525 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8526 "I<errno> set to indicate the cause of the error."
8527 msgstr ""
8528 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8529 "ラーの原因を示す値を設定する。"
8530
8531 #. type: Plain text
8532 #: build/C/man2/readahead.2:77
8533 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8534 msgstr ""
8535 "I<fd> が有効なファイルディスクリプターでない、または 読み込み用にオープンされ"
8536 "ていない。"
8537
8538 #. type: Plain text
8539 #: build/C/man2/readahead.2:83
8540 msgid ""
8541 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8542 msgstr ""
8543 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8544 "ファイルであった。"
8545
8546 #. type: Plain text
8547 #: build/C/man2/readahead.2:88
8548 msgid ""
8549 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8550 "been provided since version 2.3."
8551 msgstr ""
8552 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8553 "は glibc バージョン 2.3 以降で行われている。"
8554
8555 #. type: Plain text
8556 #: build/C/man2/readahead.2:93
8557 msgid ""
8558 "The B<readahead>()  system call is Linux-specific, and its use should be "
8559 "avoided in portable applications."
8560 msgstr ""
8561 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8562 "は 使用を避けるべきである。"
8563
8564 #. type: Plain text
8565 #: build/C/man2/readahead.2:98
8566 msgid ""
8567 "On some 32-bit architectures, the calling signature for this system call "
8568 "differs, for the reasons described in B<syscall>(2)."
8569 msgstr ""
8570 "いくつかの 32 ビットアーキテクチャーでは、このシステムコールの呼び出しシグネ"
8571 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8572
8573 #. type: Plain text
8574 #: build/C/man2/readahead.2:107
8575 msgid ""
8576 "B<readahead>()  attempts to schedule the reads in the background and return "
8577 "immediately.  However, it may block while it reads the filesystem metadata "
8578 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8579 "on large files using indirect blocks instead of extents, giving the "
8580 "appearance that the call blocks until the requested data has been read."
8581 msgstr ""
8582 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8583 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8584 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8585 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8586 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8587 "に見える。"
8588
8589 #. type: Plain text
8590 #: build/C/man2/readahead.2:113
8591 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8592 msgstr ""
8593 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8594
8595 #. type: TH
8596 #: build/C/man2/remap_file_pages.2:28
8597 #, no-wrap
8598 msgid "REMAP_FILE_PAGES"
8599 msgstr "REMAP_FILE_PAGES"
8600
8601 #. type: Plain text
8602 #: build/C/man2/remap_file_pages.2:31
8603 msgid "remap_file_pages - create a nonlinear file mapping"
8604 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8605
8606 #. type: Plain text
8607 #: build/C/man2/remap_file_pages.2:35
8608 #, no-wrap
8609 msgid ""
8610 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8611 "B<#include E<lt>sys/mman.hE<gt>>\n"
8612 msgstr ""
8613 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8614 "B<#include E<lt>sys/mman.hE<gt>>\n"
8615
8616 #. type: Plain text
8617 #: build/C/man2/remap_file_pages.2:38
8618 #, no-wrap
8619 msgid ""
8620 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8621 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8622 msgstr ""
8623 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8624 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8625
8626 #.  commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8627 #.  http://lwn.net/Articles/597632/
8628 #. type: Plain text
8629 #: build/C/man2/remap_file_pages.2:47
8630 msgid ""
8631 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8632 "eventually be replaced by a slower in-kernel emulation.  Those few "
8633 "applications that use this system call should consider migrating to "
8634 "alternatives."
8635 msgstr ""
8636 "B<注意>: このシステムコールは (Linux 3.16 以降で) 非推奨となっており、 やがて"
8637 "より低速なカーネル内でのエミュレーションに置き換えられる予定である。 このシス"
8638 "テムコールを使用しているアプリケーションは少ないが、こうしたアプリケーション"
8639 "は代替手段への移行を検討すべきである。"
8640
8641 #. type: Plain text
8642 #: build/C/man2/remap_file_pages.2:59
8643 msgid ""
8644 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8645 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8646 "nonsequential order in memory.  The advantage of using "
8647 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8648 "former approach does not require the kernel to create additional VMA "
8649 "(Virtual Memory Area) data structures."
8650 msgstr ""
8651 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8652 "ページがメモリー上で連続しない順番でマップされる マッピングを作成するために使"
8653 "われる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優"
8654 "れている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモ"
8655 "リー領域)  データ構造体を追加で作成する必要がないことである。"
8656
8657 #. type: Plain text
8658 #: build/C/man2/remap_file_pages.2:61
8659 msgid "To create a nonlinear mapping we perform the following steps:"
8660 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8661
8662 #. type: IP
8663 #: build/C/man2/remap_file_pages.2:61 build/C/man2/memfd_create.2:219
8664 #, no-wrap
8665 msgid "1."
8666 msgstr "1."
8667
8668 #. type: Plain text
8669 #: build/C/man2/remap_file_pages.2:69
8670 msgid ""
8671 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8672 "mapping must be created with the B<MAP_SHARED> flag."
8673 msgstr ""
8674 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8675 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8676 "い。"
8677
8678 #. type: IP
8679 #: build/C/man2/remap_file_pages.2:69 build/C/man2/memfd_create.2:225
8680 #, no-wrap
8681 msgid "2."
8682 msgstr "2."
8683
8684 #. type: Plain text
8685 #: build/C/man2/remap_file_pages.2:77
8686 msgid ""
8687 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8688 "correspondence between the pages of the mapping and the pages of the file.  "
8689 "It is possible to map the same page of a file into multiple locations within "
8690 "the mapped region."
8691 msgstr ""
8692 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8693 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8694 "所に マップすることが可能である。"
8695
8696 #. type: Plain text
8697 #: build/C/man2/remap_file_pages.2:88
8698 msgid ""
8699 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8700 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8701 "system page size; I<size> is the length of the region in bytes."
8702 msgstr ""
8703 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8704 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8705 "る。 I<size> は領域の長さであり、単位はバイトである。"
8706
8707 #. type: Plain text
8708 #: build/C/man2/remap_file_pages.2:106
8709 msgid ""
8710 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8711 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8712 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8713 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8714 "and I<size> will be placed."
8715 msgstr ""
8716 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8717 "成したいページの マッピングを識別することである。 よって I<addr> は "
8718 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8719 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8720 "予定のアドレスを、 I<addr> によって指定することである。"
8721
8722 #.  This rounding is weird, and not consistent with the treatment of
8723 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8724 #.  MTK, 14 Sep 2005
8725 #. type: Plain text
8726 #: build/C/man2/remap_file_pages.2:120
8727 msgid ""
8728 "The values specified in I<addr> and I<size> should be multiples of the "
8729 "system page size.  If they are not, then the kernel rounds I<both> values "
8730 "I<down> to the nearest multiple of the page size."
8731 msgstr ""
8732 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8733 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8734 "「切り下げる」。"
8735
8736 #. type: Plain text
8737 #: build/C/man2/remap_file_pages.2:124
8738 msgid "The I<prot> argument must be specified as 0."
8739 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8740
8741 #. type: Plain text
8742 #: build/C/man2/remap_file_pages.2:132
8743 msgid ""
8744 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8745 "other than B<MAP_NONBLOCK> are ignored."
8746 msgstr ""
8747 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8748 "の全てのフラグは無視される。"
8749
8750 #. type: Plain text
8751 #: build/C/man2/remap_file_pages.2:139
8752 msgid ""
8753 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8754 "I<errno> is set appropriately."
8755 msgstr ""
8756 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8757 "れ、 I<errno> が適切に設定される。"
8758
8759 #. type: Plain text
8760 #: build/C/man2/remap_file_pages.2:147
8761 msgid ""
8762 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8763 "flag."
8764 msgstr ""
8765 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8766 "いない。"
8767
8768 #.  And possibly others from vma->vm_ops->populate()
8769 #. type: Plain text
8770 #: build/C/man2/remap_file_pages.2:156
8771 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8772 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8773
8774 #. type: Plain text
8775 #: build/C/man2/remap_file_pages.2:161
8776 msgid ""
8777 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8778 "support was added in version 2.3.3."
8779 msgstr ""
8780 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8781 "サポートは glibc バージョン 2.3.3 で追加された。"
8782
8783 #. type: Plain text
8784 #: build/C/man2/remap_file_pages.2:165
8785 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8786 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8787
8788 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8789 #. type: Plain text
8790 #: build/C/man2/remap_file_pages.2:176
8791 msgid ""
8792 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8793 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8794 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8795 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8796 "addresses."
8797 msgstr ""
8798 "Linux 2.6.23 以降、 B<remap_file_pages>() は tmpfs, hugetlbfs, ramfs などのイ"
8799 "ンメモリーファイルシステム上にのみ非線形マッピングを作成する。 裏にデータスト"
8800 "アを持つファイルシステム上では、 B<remap_file_pages>() は、 ファイルのどの部"
8801 "分がどのアドレスにマッピングされているかの調整が、 B<mmap>(2) を使った場合ほ"
8802 "ど効率的ではない。"
8803
8804 #. type: Plain text
8805 #: build/C/man2/remap_file_pages.2:183
8806 msgid ""
8807 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8808 "B<msync>(2)"
8809 msgstr ""
8810 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8811 "B<msync>(2)"
8812
8813 #. type: TH
8814 #: build/C/man3/shm_open.3:26
8815 #, no-wrap
8816 msgid "SHM_OPEN"
8817 msgstr "SHM_OPEN"
8818
8819 #. type: Plain text
8820 #: build/C/man3/shm_open.3:29
8821 msgid ""
8822 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8823 msgstr ""
8824 "shm_open, shm_unlink - POSIX 共有メモリーオブジェクトの作成/オープン/削除を行"
8825 "う"
8826
8827 #. type: Plain text
8828 #: build/C/man3/shm_open.3:33
8829 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8830 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8831
8832 #. type: Plain text
8833 #: build/C/man3/shm_open.3:35
8834 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8835 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8836
8837 #. type: Plain text
8838 #: build/C/man3/shm_open.3:37
8839 msgid ""
8840 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8841 msgstr ""
8842 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8843
8844 #. type: Plain text
8845 #: build/C/man3/shm_open.3:39
8846 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8847 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8848
8849 #. type: Plain text
8850 #: build/C/man3/shm_open.3:41
8851 msgid "Link with I<-lrt>."
8852 msgstr "I<-lrt> でリンクする。"
8853
8854 #. type: Plain text
8855 #: build/C/man3/shm_open.3:53
8856 msgid ""
8857 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8858 "memory object.  A POSIX shared memory object is in effect a handle which can "
8859 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8860 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8861 "removing an object previously created by B<shm_open>()."
8862 msgstr ""
8863 "B<shm_open>()  は、POSIX 共有メモリーオブジェクトを新規に作成/オープンした"
8864 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリーオブ"
8865 "ジェクトは、実際には、関係のないプロセスが 共有メモリーの同じ領域を "
8866 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8867 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8868
8869 #.  glibc allows the initial slash to be omitted, and makes
8870 #.  multiple initial slashes equivalent to a single slash.
8871 #.  This differs from the implementation of POSIX message queues.
8872 #.  glibc allows subdirectory components in the name, in which
8873 #.  case the subdirectory must exist under /dev/shm, and allow the
8874 #.  required permissions if a user wants to create a shared memory
8875 #.  object in that subdirectory.
8876 #. type: Plain text
8877 #: build/C/man3/shm_open.3:74
8878 msgid ""
8879 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8880 "specifies the shared memory object to be created or opened.  For portable "
8881 "use, a shared memory object should be identified by a name of the form I</"
8882 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8883 "255) characters consisting of an initial slash, followed by one or more "
8884 "characters, none of which are slashes."
8885 msgstr ""
8886 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8887 "プンしたりする共有メモリーオブジェクトを指定する。 移植性を持たせるためには、"
8888 "共有メモリーオブジェクトは I</somename> という形式の名前で識別し、 その名前"
8889 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8890 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8891
8892 #. type: Plain text
8893 #: build/C/man3/shm_open.3:81
8894 msgid ""
8895 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8896 "or B<O_RDWR> and any of the other flags listed here:"
8897 msgstr ""
8898 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8899 "述べる他のフラグの論理和をとったもの を指定する。"
8900
8901 #. type: TP
8902 #: build/C/man3/shm_open.3:81
8903 #, no-wrap
8904 msgid "B<O_RDONLY>"
8905 msgstr "B<O_RDONLY>"
8906
8907 #. type: Plain text
8908 #: build/C/man3/shm_open.3:89
8909 msgid ""
8910 "Open the object for read access.  A shared memory object opened in this way "
8911 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8912 msgstr ""
8913 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8914 "された共有メモリーオブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8915 "B<mmap>(2)  することができる。"
8916
8917 #. type: TP
8918 #: build/C/man3/shm_open.3:89
8919 #, no-wrap
8920 msgid "B<O_RDWR>"
8921 msgstr "B<O_RDWR>"
8922
8923 #. type: Plain text
8924 #: build/C/man3/shm_open.3:92
8925 msgid "Open the object for read-write access."
8926 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8927
8928 #. type: TP
8929 #: build/C/man3/shm_open.3:92
8930 #, no-wrap
8931 msgid "B<O_CREAT>"
8932 msgstr "B<O_CREAT>"
8933
8934 #.  In truth it is actually the filesystem IDs on Linux, but these
8935 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8936 #. type: Plain text
8937 #: build/C/man3/shm_open.3:112
8938 msgid ""
8939 "Create the shared memory object if it does not exist.  The user and group "
8940 "ownership of the object are taken from the corresponding effective IDs of "
8941 "the calling process, and the object's permission bits are set according to "
8942 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8943 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8944 "A set of macro constants which can be used to define I<mode> is listed in "
8945 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8946 "including I<E<lt>sys/stat.hE<gt>>.)"
8947 msgstr ""
8948 "存在しない場合、共有メモリーオブジェクトを作成する。 オブジェクトのユーザーと"
8949 "グループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェ"
8950 "クトの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファ"
8951 "イルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェク"
8952 "トに関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)"
8953 "は B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/"
8954 "stat.hE<gt>> のインクルードにより得られる)。"
8955
8956 #. type: Plain text
8957 #: build/C/man3/shm_open.3:118
8958 msgid ""
8959 "A new shared memory object initially has zero length\\(emthe size of the "
8960 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8961 "shared memory object are automatically initialized to 0."
8962 msgstr ""
8963 "新規に作成された共有メモリーオブジェクトは長さ 0 で初期化される。 オブジェク"
8964 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリーオブジェクトと"
8965 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8966
8967 #. type: TP
8968 #: build/C/man3/shm_open.3:118
8969 #, no-wrap
8970 msgid "B<O_EXCL>"
8971 msgstr "B<O_EXCL>"
8972
8973 #. type: Plain text
8974 #: build/C/man3/shm_open.3:127
8975 msgid ""
8976 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8977 "I<name> already exists, return an error.  The check for the existence of the "
8978 "object, and its creation if it does not exist, are performed atomically."
8979 msgstr ""
8980 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリーオブジェ"
8981 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8982 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8983 "atomically)。"
8984
8985 #. type: TP
8986 #: build/C/man3/shm_open.3:127
8987 #, no-wrap
8988 msgid "B<O_TRUNC>"
8989 msgstr "B<O_TRUNC>"
8990
8991 #. type: Plain text
8992 #: build/C/man3/shm_open.3:130
8993 msgid "If the shared memory object already exists, truncate it to zero bytes."
8994 msgstr ""
8995 "共有メモリーオブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8996 "切り詰める。"
8997
8998 #. type: Plain text
8999 #: build/C/man3/shm_open.3:133
9000 msgid ""
9001 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
9002 "hE<gt>>."
9003 msgstr ""
9004 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
9005
9006 #. type: Plain text
9007 #: build/C/man3/shm_open.3:144
9008 msgid ""
9009 "On successful completion B<shm_open>()  returns a new file descriptor "
9010 "referring to the shared memory object.  This file descriptor is guaranteed "
9011 "to be the lowest-numbered file descriptor not previously opened within the "
9012 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
9013 "descriptor."
9014 msgstr ""
9015 "成功して完了した場合、 B<shm_open>()  は共有メモリーオブジェクトを参照する新"
9016 "しいファイルディスクリプターを返す。 このファイルディスクリプターは、そのプロ"
9017 "セス内で過去にオープンされていない ファイルディスクリプターの中で最も小さな数"
9018 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
9019 "ファイルディスクリプターに設定される。"
9020
9021 #. type: Plain text
9022 #: build/C/man3/shm_open.3:153
9023 msgid ""
9024 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
9025 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
9026 "the file descriptor may be closed without affecting the memory mapping."
9027 msgstr ""
9028 "通常、これらのファイルディスクリプターは、この後続けて実行される "
9029 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
9030 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイルディスクリプターを"
9031 "クローズしてもよく、 クローズしてもメモリーマッピングに影響を与えることはな"
9032 "い。"
9033
9034 #. type: Plain text
9035 #: build/C/man3/shm_open.3:171
9036 msgid ""
9037 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
9038 "shared memory object name, and, once all processes have unmapped the object, "
9039 "de-allocates and destroys the contents of the associated memory region.  "
9040 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
9041 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
9042 "case a new, distinct object is created)."
9043 msgstr ""
9044 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリーオブジェ"
9045 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
9046 "でオブジェクトの割り当てを解除し、 対応するメモリー領域の内容を破棄する。 "
9047 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
9048 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
9049 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
9050
9051 #. type: Plain text
9052 #: build/C/man3/shm_open.3:180
9053 msgid ""
9054 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
9055 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
9056 "or -1 on error."
9057 msgstr ""
9058 "成功した場合、 B<shm_open>()  は非負のファイルディスクリプターを返す。 失敗し"
9059 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
9060 "を、エラーが起こった場合 -1 を返す。"
9061
9062 #. type: Plain text
9063 #: build/C/man3/shm_open.3:187
9064 msgid ""
9065 "On failure, I<errno> is set to indicate the cause of the error.  Values "
9066 "which may appear in I<errno> include the following:"
9067 msgstr ""
9068 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
9069 "される値は以下の通りである:"
9070
9071 #. type: Plain text
9072 #: build/C/man3/shm_open.3:192
9073 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
9074 msgstr "共有メモリーオブジェクトを B<shm_unlink>()  する権限がなかった。"
9075
9076 #. type: Plain text
9077 #: build/C/man3/shm_open.3:202
9078 msgid ""
9079 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
9080 "B<O_TRUNC> was specified and the caller does not have write permission on "
9081 "the object."
9082 msgstr ""
9083 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
9084 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
9085 "み権限が なかった。"
9086
9087 #. type: TP
9088 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
9089 #, no-wrap
9090 msgid "B<EEXIST>"
9091 msgstr "B<EEXIST>"
9092
9093 #. type: Plain text
9094 #: build/C/man3/shm_open.3:213
9095 msgid ""
9096 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
9097 "shared memory object specified by I<name> already exists."
9098 msgstr ""
9099 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
9100 "定された共有メモリーオブジェクトが既に存在した。"
9101
9102 #. type: Plain text
9103 #: build/C/man3/shm_open.3:220
9104 msgid "The I<name> argument to B<shm_open>()  was invalid."
9105 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
9106
9107 #. type: TP
9108 #: build/C/man3/shm_open.3:220 build/C/man2/memfd_create.2:146
9109 #, no-wrap
9110 msgid "B<EMFILE>"
9111 msgstr "B<EMFILE>"
9112
9113 #. type: Plain text
9114 #: build/C/man3/shm_open.3:223
9115 msgid "The process already has the maximum number of files open."
9116 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9117
9118 #. type: TP
9119 #: build/C/man3/shm_open.3:223
9120 #, no-wrap
9121 msgid "B<ENAMETOOLONG>"
9122 msgstr "B<ENAMETOOLONG>"
9123
9124 #. type: Plain text
9125 #: build/C/man3/shm_open.3:229
9126 msgid "The length of I<name> exceeds B<PATH_MAX>."
9127 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9128
9129 #. type: Plain text
9130 #: build/C/man3/shm_open.3:233
9131 msgid ""
9132 "The limit on the total number of files open on the system has been reached."
9133 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9134
9135 #. type: TP
9136 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9137 #: build/C/man2/shmget.2:225
9138 #, no-wrap
9139 msgid "B<ENOENT>"
9140 msgstr "B<ENOENT>"
9141
9142 #. type: Plain text
9143 #: build/C/man3/shm_open.3:242
9144 msgid ""
9145 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
9146 "B<O_CREAT> was not specified."
9147 msgstr ""
9148 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
9149 "B<O_CREAT> が指定されていなかった。"
9150
9151 #. type: Plain text
9152 #: build/C/man3/shm_open.3:249
9153 msgid ""
9154 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9155 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9156
9157 #. type: Plain text
9158 #: build/C/man3/shm_open.3:251
9159 msgid "These functions are provided in glibc 2.2 and later."
9160 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9161
9162 #. type: Plain text
9163 #: build/C/man3/shm_open.3:257
9164 msgid ""
9165 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9166 "object is set to either the calling process's effective group ID or \"a "
9167 "system default group ID\"."
9168 msgstr ""
9169 "POSIX.1-2001 には、新規に作成される共有メモリーオブジェクトのグループ所有権"
9170 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9171 "ID」 のどちらかに設定される、と書かれている。"
9172
9173 #. type: Plain text
9174 #: build/C/man3/shm_open.3:266
9175 msgid ""
9176 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9177 "unspecified.  On Linux, this will successfully truncate an existing shared "
9178 "memory object\\(emthis may not be so on other UNIX systems."
9179 msgstr ""
9180 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9181 "いる。Linux では、 既存の共有メモリーオブジェクトに対する切り詰め (truncate) "
9182 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9183
9184 #. type: Plain text
9185 #: build/C/man3/shm_open.3:271
9186 msgid ""
9187 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9188 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9189 msgstr ""
9190 "Linux 2.4 における POSIX 共有メモリーオブジェクトの実装は 専用のファイルシス"
9191 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9192
9193 #. type: Plain text
9194 #: build/C/man3/shm_open.3:283
9195 msgid ""
9196 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9197 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9198 "B<shm_overview>(7)"
9199 msgstr ""
9200 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9201 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9202 "B<shm_overview>(7)"
9203
9204 #. type: TH
9205 #: build/C/man7/shm_overview.7:27
9206 #, no-wrap
9207 msgid "SHM_OVERVIEW"
9208 msgstr "SHM_OVERVIEW"
9209
9210 #. type: TH
9211 #: build/C/man7/shm_overview.7:27
9212 #, no-wrap
9213 msgid "2010-09-10"
9214 msgstr "2010-09-10"
9215
9216 #. type: Plain text
9217 #: build/C/man7/shm_overview.7:30
9218 msgid "shm_overview - overview of POSIX shared memory"
9219 msgstr "shm_overview - POSIX 共有メモリーの概要"
9220
9221 #. type: Plain text
9222 #: build/C/man7/shm_overview.7:33
9223 msgid ""
9224 "The POSIX shared memory API allows processes to communicate information by "
9225 "sharing a region of memory."
9226 msgstr ""
9227 "POSIX 共有メモリー API を使用すると、メモリーのある領域を共有して、 プロセス"
9228 "間で情報をやり取りすることができる。"
9229
9230 #. type: Plain text
9231 #: build/C/man7/shm_overview.7:35
9232 msgid "The interfaces employed in the API are:"
9233 msgstr "この API では以下のインターフェースが採用されている。"
9234
9235 #. type: TP
9236 #: build/C/man7/shm_overview.7:35
9237 #, no-wrap
9238 msgid "B<shm_open>(3)"
9239 msgstr "B<shm_open>(3)"
9240
9241 #. type: Plain text
9242 #: build/C/man7/shm_overview.7:42
9243 msgid ""
9244 "Create and open a new object, or open an existing object.  This is analogous "
9245 "to B<open>(2).  The call returns a file descriptor for use by the other "
9246 "interfaces listed below."
9247 msgstr ""
9248 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9249 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9250 "る ファイルディスクリプターを返す。"
9251
9252 #. type: TP
9253 #: build/C/man7/shm_overview.7:42
9254 #, no-wrap
9255 msgid "B<ftruncate>(2)"
9256 msgstr "B<ftruncate>(2)"
9257
9258 #. type: Plain text
9259 #: build/C/man7/shm_overview.7:46
9260 msgid ""
9261 "Set the size of the shared memory object.  (A newly created shared memory "
9262 "object has a length of zero.)"
9263 msgstr "共有メモリーオブジェクトの大きさを設定する。"
9264
9265 #. type: Plain text
9266 #: build/C/man7/shm_overview.7:50
9267 msgid ""
9268 "Map the shared memory object into the virtual address space of the calling "
9269 "process."
9270 msgstr ""
9271 "呼び出したプロセスの仮想アドレス空間に共有メモリーオブジェクトを マップする。"
9272
9273 #. type: TP
9274 #: build/C/man7/shm_overview.7:50
9275 #, no-wrap
9276 msgid "B<munmap>(2)"
9277 msgstr "B<munmap>(2)"
9278
9279 #. type: Plain text
9280 #: build/C/man7/shm_overview.7:54
9281 msgid ""
9282 "Unmap the shared memory object from the virtual address space of the calling "
9283 "process."
9284 msgstr ""
9285 "呼び出したプロセスの仮想アドレス空間から 共有メモリーオブジェクトをアンマップ"
9286 "する。"
9287
9288 #. type: TP
9289 #: build/C/man7/shm_overview.7:54
9290 #, no-wrap
9291 msgid "B<shm_unlink>(3)"
9292 msgstr "B<shm_unlink>(3)"
9293
9294 #. type: Plain text
9295 #: build/C/man7/shm_overview.7:57
9296 msgid "Remove a shared memory object name."
9297 msgstr "共有メモリーオブジェクト名を削除する。"
9298
9299 #. type: TP
9300 #: build/C/man7/shm_overview.7:57
9301 #, no-wrap
9302 msgid "B<close>(2)"
9303 msgstr "B<close>(2)"
9304
9305 #. type: Plain text
9306 #: build/C/man7/shm_overview.7:62
9307 msgid ""
9308 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9309 "needed."
9310 msgstr ""
9311 "B<shm_open>(3)  で割り当てられたファイルディスクリプターが不要になった際に、 "
9312 "そのファイルディスクリプターをクローズする。"
9313
9314 #. type: TP
9315 #: build/C/man7/shm_overview.7:62
9316 #, no-wrap
9317 msgid "B<fstat>(2)"
9318 msgstr "B<fstat>(2)"
9319
9320 #. type: Plain text
9321 #: build/C/man7/shm_overview.7:76
9322 msgid ""
9323 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9324 "the information returned by this call are the object's size (I<st_size>), "
9325 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9326 msgstr ""
9327 "その共有メモリーオブジェクトについての情報が入った I<stat> 構造体を取得す"
9328 "る。 このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許"
9329 "可属性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9330
9331 #. type: TP
9332 #: build/C/man7/shm_overview.7:76
9333 #, no-wrap
9334 msgid "B<fchown>(2)"
9335 msgstr "B<fchown>(2)"
9336
9337 #. type: Plain text
9338 #: build/C/man7/shm_overview.7:79
9339 msgid "To change the ownership of a shared memory object."
9340 msgstr "共有メモリーオブジェクトの所有権を変更する。"
9341
9342 #. type: TP
9343 #: build/C/man7/shm_overview.7:79
9344 #, no-wrap
9345 msgid "B<fchmod>(2)"
9346 msgstr "B<fchmod>(2)"
9347
9348 #. type: Plain text
9349 #: build/C/man7/shm_overview.7:82
9350 msgid "To change the permissions of a shared memory object."
9351 msgstr "共有メモリーオブジェクトの許可属性を変更する。"
9352
9353 #. type: SS
9354 #: build/C/man7/shm_overview.7:82
9355 #, no-wrap
9356 msgid "Versions"
9357 msgstr "Versions"
9358
9359 #. type: Plain text
9360 #: build/C/man7/shm_overview.7:84
9361 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9362 msgstr "POSIX 共有メモリーは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9363
9364 #. type: SS
9365 #: build/C/man7/shm_overview.7:84
9366 #, no-wrap
9367 msgid "Persistence"
9368 msgstr "持続性"
9369
9370 #. type: Plain text
9371 #: build/C/man7/shm_overview.7:89
9372 msgid ""
9373 "POSIX shared memory objects have kernel persistence: a shared memory object "
9374 "will exist until the system is shut down, or until all processes have "
9375 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9376 msgstr ""
9377 "POSIX 共有メモリーオブジェクトはカーネル内で保持される。 共有メモリーオブジェ"
9378 "クトは、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトを"
9379 "アンマップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9380
9381 #. type: SS
9382 #: build/C/man7/shm_overview.7:89
9383 #, no-wrap
9384 msgid "Linking"
9385 msgstr "リンク"
9386
9387 #. type: Plain text
9388 #: build/C/man7/shm_overview.7:94
9389 msgid ""
9390 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9391 "to link against the real-time library, I<librt>."
9392 msgstr ""
9393 "POSIX 共有メモリー API を使用したプログラムは I<cc -lrt> でコンパイルし、リア"
9394 "ルタイムライブラリ I<librt> とリンクしなければならない。"
9395
9396 #. type: SS
9397 #: build/C/man7/shm_overview.7:94
9398 #, no-wrap
9399 msgid "Accessing shared memory objects via the filesystem"
9400 msgstr "ファイルシステム経由での共有メモリーオブジェクトへのアクセス"
9401
9402 #. type: Plain text
9403 #: build/C/man7/shm_overview.7:101
9404 msgid ""
9405 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9406 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9407 "supports the use of access control lists (ACLs)  to control the permissions "
9408 "of objects in the virtual filesystem."
9409 msgstr ""
9410 "Linux では、共有メモリーオブジェクトは通常 I</dev/shm> 以下にマウントされる仮"
9411 "想ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux "
9412 "では、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御"
9413 "リスト (ACL; access control lists) を使うことができる。"
9414
9415 #. type: Plain text
9416 #: build/C/man7/shm_overview.7:106
9417 msgid ""
9418 "Typically, processes must synchronize their access to a shared memory "
9419 "object, using, for example, POSIX semaphores."
9420 msgstr ""
9421 "通常は、共有メモリーオブジェクトにアクセスするプロセスは、 POSIX セマフォなど"
9422 "を使ってプロセス間で同期をとらなければならない。"
9423
9424 #. type: Plain text
9425 #: build/C/man7/shm_overview.7:114
9426 msgid ""
9427 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9428 "memory API.  POSIX shared memory provides a simpler, and better designed "
9429 "interface; on the other hand POSIX shared memory is somewhat less widely "
9430 "available (especially on older systems) than System V shared memory."
9431 msgstr ""
9432 "System V 共有メモリー (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリー "
9433 "API である。 POSIX 共有メモリーは、より簡単で、うまく設計されたインターフェー"
9434 "スを提供している。 一方で、POSIX 共有メモリーは System V 共有メモリーと比べる"
9435 "と 利用できるシステムが少ない (特に、古いシステムでは少ない)。"
9436
9437 #. type: Plain text
9438 #: build/C/man7/shm_overview.7:127
9439 msgid ""
9440 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9441 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9442 "B<shm_unlink>(3), B<sem_overview>(7)"
9443 msgstr ""
9444 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9445 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9446 "B<shm_unlink>(3), B<sem_overview>(7)"
9447
9448 #. type: TH
9449 #: build/C/man2/shmctl.2:45
9450 #, no-wrap
9451 msgid "SHMCTL"
9452 msgstr "SHMCTL"
9453
9454 #. type: TH
9455 #: build/C/man2/shmctl.2:45
9456 #, no-wrap
9457 msgid "2014-02-07"
9458 msgstr "2014-02-07"
9459
9460 #. type: Plain text
9461 #: build/C/man2/shmctl.2:48
9462 msgid "shmctl - System V shared memory control"
9463 msgstr "shmctl - System V 共有メモリー (shared memory) を制御する"
9464
9465 #. type: Plain text
9466 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9467 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9468 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9469
9470 #. type: Plain text
9471 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9472 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9473 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9474
9475 #. type: Plain text
9476 #: build/C/man2/shmctl.2:55
9477 msgid ""
9478 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9479 msgstr ""
9480 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9481
9482 #. type: Plain text
9483 #: build/C/man2/shmctl.2:62
9484 msgid ""
9485 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9486 "\\ V shared memory segment whose identifier is given in I<shmid>."
9487 msgstr ""
9488 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリーセグメントに対し"
9489 "て I<cmd> で指示した制御命令を実行する。"
9490
9491 #. type: Plain text
9492 #: build/C/man2/shmctl.2:67
9493 msgid ""
9494 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9495 "I<E<lt>sys/shm.hE<gt>> as follows:"
9496 msgstr ""
9497 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインターである。 この構造体は "
9498 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9499
9500 #. type: Plain text
9501 #: build/C/man2/shmctl.2:81
9502 #, no-wrap
9503 msgid ""
9504 "struct shmid_ds {\n"
9505 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9506 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9507 "    time_t          shm_atime;   /* Last attach time */\n"
9508 "    time_t          shm_dtime;   /* Last detach time */\n"
9509 "    time_t          shm_ctime;   /* Last change time */\n"
9510 "    pid_t           shm_cpid;    /* PID of creator */\n"
9511 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9512 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9513 "    ...\n"
9514 "};\n"
9515 msgstr ""
9516 "struct shmid_ds {\n"
9517 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9518 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9519 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9520 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9521 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9522 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9523 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9524 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9525 "    ...\n"
9526 "};\n"
9527
9528 #. type: Plain text
9529 #: build/C/man2/shmctl.2:89
9530 msgid ""
9531 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9532 "settable using B<IPC_SET>):"
9533 msgstr ""
9534 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9535 "B<IPC_SET> を使って設定可能である):"
9536
9537 #. type: Plain text
9538 #: build/C/man2/shmctl.2:102
9539 #, no-wrap
9540 msgid ""
9541 "struct ipc_perm {\n"
9542 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9543 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9544 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9545 "    uid_t          cuid;     /* Effective UID of creator */\n"
9546 "    gid_t          cgid;     /* Effective GID of creator */\n"
9547 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9548 "                                SHM_LOCKED flags */\n"
9549 "    unsigned short __seq;    /* Sequence number */\n"
9550 "};\n"
9551 msgstr ""
9552 "struct ipc_perm {\n"
9553 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9554 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9555 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9556 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9557 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9558 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9559 "                                SHM_LOCKED フラグ */\n"
9560 "    unsigned short __seq;    /* シーケンス番号 */\n"
9561 "};\n"
9562
9563 #. type: Plain text
9564 #: build/C/man2/shmctl.2:108
9565 msgid "Valid values for I<cmd> are:"
9566 msgstr "I<cmd> として有効な値は以下の通り:"
9567
9568 #. type: TP
9569 #: build/C/man2/shmctl.2:109
9570 #, no-wrap
9571 msgid "B<IPC_STAT>"
9572 msgstr "B<IPC_STAT>"
9573
9574 #. type: Plain text
9575 #: build/C/man2/shmctl.2:118
9576 msgid ""
9577 "Copy information from the kernel data structure associated with I<shmid> "
9578 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9579 "read permission on the shared memory segment."
9580 msgstr ""
9581 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9582 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリーセグメントに対する "
9583 "読み込み許可を持たなければならない。"
9584
9585 #. type: TP
9586 #: build/C/man2/shmctl.2:118
9587 #, no-wrap
9588 msgid "B<IPC_SET>"
9589 msgstr "B<IPC_SET>"
9590
9591 #. type: Plain text
9592 #: build/C/man2/shmctl.2:136
9593 msgid ""
9594 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9595 "I<buf> to the kernel data structure associated with this shared memory "
9596 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9597 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9598 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9599 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9600 "memory segment, or the caller must be privileged."
9601 msgstr ""
9602 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9603 "有メモリーセグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9604 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9605 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9606 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9607 "と一致するか、呼び出し元が特権を持たなければならない。"
9608
9609 #. type: TP
9610 #: build/C/man2/shmctl.2:136
9611 #, no-wrap
9612 msgid "B<IPC_RMID>"
9613 msgstr "B<IPC_RMID>"
9614
9615 #. type: Plain text
9616 #: build/C/man2/shmctl.2:149
9617 #, fuzzy
9618 #| msgid ""
9619 #| "Mark the segment to be destroyed.  The segment will only actually be "
9620 #| "destroyed after the last process detaches it (i.e., when the "
9621 #| "I<shm_nattch> member of the associated structure I<shmid_ds> is zero).  "
9622 #| "The caller must be the owner or creator of the segment, or be "
9623 #| "privileged.  The I<buf> argument is ignored."
9624 msgid ""
9625 "Mark the segment to be destroyed.  The segment will actually be destroyed "
9626 "only after the last process detaches it (i.e., when the I<shm_nattch> member "
9627 "of the associated structure I<shmid_ds> is zero).  The caller must be the "
9628 "owner or creator of the segment, or be privileged.  The I<buf> argument is "
9629 "ignored."
9630 msgstr ""
9631 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9632 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9633 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9634 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9635
9636 #. type: Plain text
9637 #: build/C/man2/shmctl.2:157
9638 msgid ""
9639 "If a segment has been marked for destruction, then the (nonstandard)  "
9640 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9641 "structure retrieved by B<IPC_STAT> will be set."
9642 msgstr ""
9643 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9644 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9645 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9646
9647 #. type: Plain text
9648 #: build/C/man2/shmctl.2:160
9649 msgid ""
9650 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9651 "its pages that were faulted in will remain in memory or swap."
9652 msgstr ""
9653 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9654 "なれば、フォールト (fault) されたページは メモリーかスワップ (swap) に残り続"
9655 "ける。"
9656
9657 #. type: Plain text
9658 #: build/C/man2/shmctl.2:165
9659 msgid ""
9660 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9661 "B<proc>(5)."
9662 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9663
9664 #. type: TP
9665 #: build/C/man2/shmctl.2:165
9666 #, no-wrap
9667 msgid "B<IPC_INFO> (Linux-specific)"
9668 msgstr "B<IPC_INFO> (Linux 固有)"
9669
9670 #. type: Plain text
9671 #: build/C/man2/shmctl.2:178
9672 msgid ""
9673 "Return information about system-wide shared memory limits and parameters in "
9674 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9675 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9676 "B<_GNU_SOURCE> feature test macro is defined:"
9677 msgstr ""
9678 "システム全体での共有メモリーの制限とパラメーターに関する情報を、 I<buf> が指"
9679 "す構造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必"
9680 "要である)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9681 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9682
9683 #. type: Plain text
9684 #: build/C/man2/shmctl.2:192
9685 #, no-wrap
9686 msgid ""
9687 "struct shminfo {\n"
9688 "    unsigned long shmmax; /* Maximum segment size */\n"
9689 "    unsigned long shmmin; /* Minimum segment size;\n"
9690 "                             always 1 */\n"
9691 "    unsigned long shmmni; /* Maximum number of segments */\n"
9692 "    unsigned long shmseg; /* Maximum number of segments\n"
9693 "                             that a process can attach;\n"
9694 "                             unused within kernel */\n"
9695 "    unsigned long shmall; /* Maximum number of pages of\n"
9696 "                             shared memory, system-wide */\n"
9697 "};\n"
9698 msgstr ""
9699 "struct  shminfo {\n"
9700 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9701 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9702 "                             常に 1 */\n"
9703 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9704 "    unsigned long shmseg; /* プロセスが付加できる\n"
9705 "                             セグメントの最大数。\n"
9706 "                             カーネル内では未使用 */\n"
9707 "    unsigned long shmall; /* 共有メモリーの最大ページ数。\n"
9708 "                             システム全体での値 */\n"
9709 "};\n"
9710
9711 #. type: Plain text
9712 #: build/C/man2/shmctl.2:205
9713 msgid ""
9714 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9715 "files of the same name; see B<proc>(5)  for details."
9716 msgstr ""
9717 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9718 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9719
9720 #. type: TP
9721 #: build/C/man2/shmctl.2:205
9722 #, no-wrap
9723 msgid "B<SHM_INFO> (Linux-specific)"
9724 msgstr "B<SHM_INFO> (Linux 固有)"
9725
9726 #. type: Plain text
9727 #: build/C/man2/shmctl.2:216
9728 msgid ""
9729 "Return a I<shm_info> structure whose fields contain information about system "
9730 "resources consumed by shared memory.  This structure is defined in "
9731 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9732 msgstr ""
9733 "共有メモリーが消費しているシステム資源に関する情報を 格納した I<shm_info> 構"
9734 "造体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9735 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9736
9737 #. type: Plain text
9738 #: build/C/man2/shmctl.2:233
9739 #, no-wrap
9740 msgid ""
9741 "struct shm_info {\n"
9742 "    int           used_ids; /* # of currently existing\n"
9743 "                               segments */\n"
9744 "    unsigned long shm_tot;  /* Total number of shared\n"
9745 "                               memory pages */\n"
9746 "    unsigned long shm_rss;  /* # of resident shared\n"
9747 "                               memory pages */\n"
9748 "    unsigned long shm_swp;  /* # of swapped shared\n"
9749 "                               memory pages */\n"
9750 "    unsigned long swap_attempts;\n"
9751 "                            /* Unused since Linux 2.4 */\n"
9752 "    unsigned long swap_successes;\n"
9753 "                            /* Unused since Linux 2.4 */\n"
9754 "};\n"
9755 msgstr ""
9756 "struct shm_info {\n"
9757 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9758 "    unsigned long shm_tot;  /* 共有メモリーのページ総数 */\n"
9759 "    unsigned long shm_rss;  /* メモリー上にある (スワップされて\n"
9760 "                               いない) 共有メモリーページ数 */\n"
9761 "    unsigned long shm_swp;  /* スワップされている共有メモリー\n"
9762 "                               ページ数 */\n"
9763 "    unsigned long swap_attempts;\n"
9764 "                            /* Linux 2.4 以降では未使用 */\n"
9765 "    unsigned long swap_successes;\n"
9766 "                            /* Linux 2.4 以降では未使用 */\n"
9767 "};\n"
9768
9769 #. type: TP
9770 #: build/C/man2/shmctl.2:235
9771 #, no-wrap
9772 msgid "B<SHM_STAT> (Linux-specific)"
9773 msgstr "B<SHM_STAT> (Linux 固有)"
9774
9775 #. type: Plain text
9776 #: build/C/man2/shmctl.2:246
9777 msgid ""
9778 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9779 "argument is not a segment identifier, but instead an index into the kernel's "
9780 "internal array that maintains information about all shared memory segments "
9781 "on the system."
9782 msgstr ""
9783 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9784 "グメント識別子ではなく、システム上の全ての共有メモリー セグメントに関する情報"
9785 "を管理するカーネルの内部配列へのインデックス である。"
9786
9787 #. type: Plain text
9788 #: build/C/man2/shmctl.2:249
9789 msgid ""
9790 "The caller can prevent or allow swapping of a shared memory segment with the "
9791 "following I<cmd> values:"
9792 msgstr ""
9793 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリーセグメントが ス"
9794 "ワップされることを防止したり、許可したりできる:"
9795
9796 #. type: TP
9797 #: build/C/man2/shmctl.2:250
9798 #, no-wrap
9799 msgid "B<SHM_LOCK> (Linux-specific)"
9800 msgstr "B<SHM_LOCK> (Linux 固有)"
9801
9802 #. type: Plain text
9803 #: build/C/man2/shmctl.2:262
9804 msgid ""
9805 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9806 "pages that are required to be present after locking is enabled.  If a "
9807 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9808 "I<shm_perm.mode> field in the associated data structure retrieved by "
9809 "B<IPC_STAT> will be set."
9810 msgstr ""
9811 "共有メモリーセグメントをスワップすることを防止する。 ロックが有効になった後、"
9812 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9813 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9814 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9815 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9816
9817 #. type: TP
9818 #: build/C/man2/shmctl.2:262
9819 #, no-wrap
9820 msgid "B<SHM_UNLOCK> (Linux-specific)"
9821 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9822
9823 #. type: Plain text
9824 #: build/C/man2/shmctl.2:265
9825 msgid "Unlock the segment, allowing it to be swapped out."
9826 msgstr "セグメントのロックを解除し、スワップアウトすることを可能にする。"
9827
9828 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9829 #.  be applied to a segment, regardless of ownership of the segment.
9830 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9831 #.  in 2.6.10.  MTK, May 2005
9832 #. type: Plain text
9833 #: build/C/man2/shmctl.2:283
9834 msgid ""
9835 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9836 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9837 "these operations if its effective UID matches the owner or creator UID of "
9838 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9839 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9840 msgstr ""
9841 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9842 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9843 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9844 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9845 "(B<SHM_LOCK> の場合には) ロックするメモリーの合計が B<RLIMIT_MEMLOCK> リソー"
9846 "ス上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9847
9848 #. type: Plain text
9849 #: build/C/man2/shmctl.2:301
9850 msgid ""
9851 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9852 "highest used entry in the kernel's internal array recording information "
9853 "about all shared memory segments.  (This information can be used with "
9854 "repeated B<SHM_STAT> operations to obtain information about all shared "
9855 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9856 "the identifier of the shared memory segment whose index was given in "
9857 "I<shmid>.  Other operations return 0 on success."
9858 msgstr ""
9859 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリーセグメントに"
9860 "関する情報を 管理しているカーネルの内部配列の使用中エントリーのインデックス"
9861 "の うち最大値を返す (この情報は、システムの全ての共有メモリーセグメントに関す"
9862 "る情報を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用でき"
9863 "る)。 B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持"
9864 "つ共有メモリーセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9865
9866 #. type: Plain text
9867 #: build/C/man2/shmctl.2:305
9868 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9869 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9870
9871 #. type: Plain text
9872 #: build/C/man2/shmctl.2:314
9873 msgid ""
9874 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9875 "read access for I<shmid>, and the calling process does not have the "
9876 "B<CAP_IPC_OWNER> capability."
9877 msgstr ""
9878 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9879 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9880 "ケーパビリティ (capability) を持っていない。"
9881
9882 #. type: Plain text
9883 #: build/C/man2/shmctl.2:325
9884 msgid ""
9885 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9886 "pointed to by I<buf> isn't accessible."
9887 msgstr ""
9888 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9889 "るアドレスにアクセスできない。"
9890
9891 #. type: TP
9892 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9893 #, no-wrap
9894 msgid "B<EIDRM>"
9895 msgstr "B<EIDRM>"
9896
9897 #. type: Plain text
9898 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9899 msgid "I<shmid> points to a removed identifier."
9900 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9901
9902 #. type: Plain text
9903 #: build/C/man2/shmctl.2:337
9904 msgid ""
9905 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9906 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9907 "to an array slot that is currently unused."
9908 msgstr ""
9909 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9910 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9911 "配列のスロットを参照していた。"
9912
9913 #. type: Plain text
9914 #: build/C/man2/shmctl.2:348
9915 msgid ""
9916 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9917 "be-locked segment would mean that the total bytes in locked shared memory "
9918 "segments would exceed the limit for the real user ID of the calling "
9919 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9920 "(see B<setrlimit>(2))."
9921 msgstr ""
9922 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9923 "グメントのサイズ (ロックされる共有メモリーセグメントの合計バイト数) が、 呼び"
9924 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9925 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9926
9927 #. type: Plain text
9928 #: build/C/man2/shmctl.2:353
9929 msgid ""
9930 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9931 "in the structure pointed to by I<buf>."
9932 msgstr ""
9933 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9934 "には大き過ぎる。"
9935
9936 #. type: Plain text
9937 #: build/C/man2/shmctl.2:365
9938 msgid ""
9939 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9940 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9941 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9942 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9943 msgstr ""
9944 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9945 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9946 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9947
9948 #. type: Plain text
9949 #: build/C/man2/shmctl.2:377
9950 msgid ""
9951 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9952 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9953 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9954 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9955 msgstr ""
9956 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9957 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9958 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9959 "が特権を持たない場合にも、このエラーが起こる。)"
9960
9961 #.  SVr4 documents an additional error condition EMFILE.
9962 #. type: Plain text
9963 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9964 #: build/C/man2/shmop.2:231
9965 msgid "SVr4, POSIX.1-2001."
9966 msgstr "SVr4, POSIX.1-2001."
9967
9968 #.  Like Linux, the FreeBSD man pages still document
9969 #.  the inclusion of these header files.
9970 #. type: Plain text
9971 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9972 msgid ""
9973 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9974 "required on Linux or by any version of POSIX.  However, some old "
9975 "implementations required the inclusion of these header files, and the SVID "
9976 "also documented their inclusion.  Applications intended to be portable to "
9977 "such old systems may need to include these header files."
9978 msgstr ""
9979 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9980 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9981 "実装ではこれらのヘッダーファイルのインクルードが必要であり、 SVID でもこれら"
9982 "のインクルードをするように記載されている。このような古いシステムへの移植性を"
9983 "意図したアプリケーションではこれらのファイルをインクルードする必要があるかも"
9984 "しれない。"
9985
9986 #. type: Plain text
9987 #: build/C/man2/shmctl.2:407
9988 msgid ""
9989 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9990 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9991 "future, these may modified or moved to a I</proc> filesystem interface."
9992 msgstr ""
9993 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9994 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9995 "更されたり、 I</proc> ファイルシステムのインターフェースに移動されるかもしれ"
9996 "ない。"
9997
9998 #. type: Plain text
9999 #: build/C/man2/shmctl.2:415
10000 msgid ""
10001 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
10002 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
10003 "feature is not available on other UNIX implementations; portable "
10004 "applications should avoid relying on it."
10005 msgstr ""
10006 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
10007 "メモリーセグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
10008 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
10009 "プリケーションではこれに依存しないようにすべきである。"
10010
10011 #. type: Plain text
10012 #: build/C/man2/shmctl.2:428
10013 msgid ""
10014 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
10015 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
10016 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
10017 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
10018 msgstr ""
10019 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
10020 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
10021 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
10022 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
10023
10024 #. type: Plain text
10025 #: build/C/man2/shmctl.2:435
10026 msgid ""
10027 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10028 "B<svipc>(7)"
10029 msgstr ""
10030 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10031 "B<shm_overview>(7), B<svipc>(7)"
10032
10033 #. type: TH
10034 #: build/C/man2/shmget.2:38
10035 #, no-wrap
10036 msgid "SHMGET"
10037 msgstr "SHMGET"
10038
10039 #. type: TH
10040 #: build/C/man2/shmget.2:38
10041 #, no-wrap
10042 msgid "2015-01-10"
10043 msgstr "2015-01-10"
10044
10045 #. type: Plain text
10046 #: build/C/man2/shmget.2:41
10047 msgid "shmget - allocates a System V shared memory segment"
10048 msgstr "shmget - System V 共有メモリーセグメントを割り当てる"
10049
10050 #. type: Plain text
10051 #: build/C/man2/shmget.2:48
10052 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10053 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10054
10055 #. type: Plain text
10056 #: build/C/man2/shmget.2:72
10057 msgid ""
10058 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
10059 "associated with the value of the argument I<key>.  A new shared memory "
10060 "segment, with size equal to the value of I<size> rounded up to a multiple of "
10061 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
10062 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
10063 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
10064 msgstr ""
10065 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリーセグメントの識"
10066 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
10067 "共有メモリーセグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
10068 "場合、 新しい共有メモリーセグメントを作成する。 作成される共有メモリーセグメ"
10069 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
10070 "きさとなる。"
10071
10072 #. type: Plain text
10073 #: build/C/man2/shmget.2:91
10074 msgid ""
10075 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
10076 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
10077 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
10078 "| O_EXCL> for B<open>(2).)"
10079 msgstr ""
10080 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
10081 "応する共有メモリーセグメントが既に存在すると、 B<shmget>()  は失敗し、 "
10082 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
10083 "O_EXCL> を指定した場合の動作と同じである)。"
10084
10085 #. type: Plain text
10086 #: build/C/man2/shmget.2:95
10087 msgid "The value I<shmflg> is composed of:"
10088 msgstr "I<shmflg> は以下の内容から構成される:"
10089
10090 #. type: TP
10091 #: build/C/man2/shmget.2:95
10092 #, no-wrap
10093 msgid "B<IPC_CREAT>"
10094 msgstr "B<IPC_CREAT>"
10095
10096 #. type: Plain text
10097 #: build/C/man2/shmget.2:102
10098 msgid ""
10099 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
10100 "the segment associated with I<key> and check to see if the user has "
10101 "permission to access the segment."
10102 msgstr ""
10103 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
10104 "は I<key> に対応するセグメントを探し、 ユーザーがそのセグメントにアクセスする"
10105 "許可があるかどうかをチェックする。"
10106
10107 #. type: TP
10108 #: build/C/man2/shmget.2:102
10109 #, no-wrap
10110 msgid "B<IPC_EXCL>"
10111 msgstr "B<IPC_EXCL>"
10112
10113 #. type: Plain text
10114 #: build/C/man2/shmget.2:108
10115 msgid ""
10116 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
10117 "segment.  If the segment already exists, the call fails."
10118 msgstr ""
10119 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
10120 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
10121
10122 #. type: TP
10123 #: build/C/man2/shmget.2:108
10124 #, no-wrap
10125 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10126 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10127
10128 #. type: Plain text
10129 #: build/C/man2/shmget.2:114
10130 msgid ""
10131 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10132 "I<Documentation/vm/hugetlbpage.txt> for further information."
10133 msgstr ""
10134 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10135 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10136
10137 #. type: TP
10138 #: build/C/man2/shmget.2:114
10139 #, no-wrap
10140 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10141 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10142
10143 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10144 #.  specified.
10145 #. type: Plain text
10146 #: build/C/man2/shmget.2:133
10147 msgid ""
10148 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
10149 "Do not reserve swap space for this segment.  When swap space is reserved, "
10150 "one has the guarantee that it is possible to modify the segment.  When swap "
10151 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10152 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
10153 "overcommit_memory> in B<proc>(5)."
10154 msgstr ""
10155 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10156 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10157 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10158 "行わなかった場合は、物理メモリーに空きが ないと書き込み時に B<SIGSEGV> を受け"
10159 "取る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファ"
10160 "イルに関する議論も参照のこと。"
10161
10162 #. type: Plain text
10163 #: build/C/man2/shmget.2:143
10164 msgid ""
10165 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10166 "specify the permissions granted to the owner, group, and others.  These bits "
10167 "have the same format, and the same meaning, as the I<mode> argument of "
10168 "B<open>(2).  Presently, execute permissions are not used by the system."
10169 msgstr ""
10170 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10171 "への許可を指定する。 これらのビットは B<open>(2)  の I<mode> 引き数と同じ形式"
10172 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10173
10174 #. type: Plain text
10175 #: build/C/man2/shmget.2:151
10176 msgid ""
10177 "When a new shared memory segment is created, its contents are initialized to "
10178 "zero values, and its associated data structure, I<shmid_ds> (see "
10179 "B<shmctl>(2)), is initialized as follows:"
10180 msgstr ""
10181 "共有メモリーセグメントが新たに作成される際、 共有メモリーセグメントの内容は "
10182 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10183 "期化される。"
10184
10185 #. type: Plain text
10186 #: build/C/man2/shmget.2:156
10187 msgid ""
10188 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10189 "calling process."
10190 msgstr ""
10191 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10192 "ユーザーID を設定する。"
10193
10194 #. type: Plain text
10195 #: build/C/man2/shmget.2:161
10196 msgid ""
10197 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10198 "the calling process."
10199 msgstr ""
10200 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10201 "定する。"
10202
10203 #. type: Plain text
10204 #: build/C/man2/shmget.2:166
10205 msgid ""
10206 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10207 "significant 9 bit of I<shmflg>."
10208 msgstr ""
10209 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10210
10211 #. type: Plain text
10212 #: build/C/man2/shmget.2:170
10213 msgid "I<shm_segsz> is set to the value of I<size>."
10214 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10215
10216 #. type: Plain text
10217 #: build/C/man2/shmget.2:177
10218 msgid ""
10219 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10220 msgstr ""
10221 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10222
10223 #. type: Plain text
10224 #: build/C/man2/shmget.2:180
10225 msgid "I<shm_ctime> is set to the current time."
10226 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10227
10228 #. type: Plain text
10229 #: build/C/man2/shmget.2:183
10230 msgid ""
10231 "If the shared memory segment already exists, the permissions are verified, "
10232 "and a check is made to see if it is marked for destruction."
10233 msgstr ""
10234 "共有メモリーセグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10235 "(destruction) マークがつけられていないかのチェックが行われる。"
10236
10237 #. type: Plain text
10238 #: build/C/man2/shmget.2:188
10239 msgid ""
10240 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10241 "returned, and I<errno> is set to indicate the error."
10242 msgstr ""
10243 "成功の場合、有効な共有メモリーセグメントの識別子が返される。 エラーの場合、 "
10244 "-1 が返り、 I<errno> にエラーを示す値が設定される。"
10245
10246 #. type: Plain text
10247 #: build/C/man2/shmget.2:192
10248 msgid "On failure, I<errno> is set to one of the following:"
10249 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10250
10251 #. type: Plain text
10252 #: build/C/man2/shmget.2:198
10253 msgid ""
10254 "The user does not have permission to access the shared memory segment, and "
10255 "does not have the B<CAP_IPC_OWNER> capability."
10256 msgstr ""
10257 "ユーザーはその共有メモリーセグメントへのアクセス許可を持たず、 "
10258 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10259
10260 #. type: Plain text
10261 #: build/C/man2/shmget.2:207
10262 msgid ""
10263 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10264 "memory segment already exists for I<key>."
10265 msgstr ""
10266 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10267 "有メモリーセグメントはすでに存在する。"
10268
10269 #. type: Plain text
10270 #: build/C/man2/shmget.2:215
10271 msgid ""
10272 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10273 "greater than B<SHMMAX>."
10274 msgstr ""
10275 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10276 "B<SHMMAX> よりも大きかった。"
10277
10278 #. type: Plain text
10279 #: build/C/man2/shmget.2:221
10280 msgid ""
10281 "A segment for the given I<key> exists, but I<size> is greater than the size "
10282 "of that segment."
10283 msgstr ""
10284 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10285 "ントのサイズよりも大きかった。"
10286
10287 #. type: Plain text
10288 #: build/C/man2/shmget.2:230
10289 msgid ""
10290 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10291 msgstr ""
10292 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10293 "いなかった。"
10294
10295 #. type: Plain text
10296 #: build/C/man2/shmget.2:233
10297 msgid "No memory could be allocated for segment overhead."
10298 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリーがなかった。"
10299
10300 #. type: Plain text
10301 #: build/C/man2/shmget.2:241
10302 msgid ""
10303 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10304 "segment of the requested I<size> would cause the system to exceed the system-"
10305 "wide limit on shared memory (B<SHMALL>)."
10306 msgstr ""
10307 "システム全体の共有メモリーセグメント数の制限 (B<SHMMNI>)  に達した、または要"
10308 "求された I<size> のセグメントの割り当てが システム全体の共有メモリーサイズの"
10309 "制限 (B<SHMALL>)  を超過した。"
10310
10311 #. type: Plain text
10312 #: build/C/man2/shmget.2:248
10313 msgid ""
10314 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10315 "(did not have the B<CAP_IPC_LOCK> capability)."
10316 msgstr ""
10317 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10318 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10319
10320 #. type: Plain text
10321 #: build/C/man2/shmget.2:256
10322 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10323 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10324
10325 #. type: Plain text
10326 #: build/C/man2/shmget.2:280
10327 msgid ""
10328 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10329 "value is used for I<key>, the system call ignores all but the least "
10330 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10331 msgstr ""
10332 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10333 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10334 "視し、 新しい共有メモリーセグメントを作成する。"
10335
10336 #. type: SS
10337 #: build/C/man2/shmget.2:280
10338 #, no-wrap
10339 msgid "Shared memory limits"
10340 msgstr "共有メモリーの上限"
10341
10342 #. type: Plain text
10343 #: build/C/man2/shmget.2:284
10344 msgid ""
10345 "The following limits on shared memory segment resources affect the "
10346 "B<shmget>()  call:"
10347 msgstr ""
10348 "B<shmget>()  コールに影響する共有メモリーセグメント資源の制限は以下の通りであ"
10349 "る:"
10350
10351 #. type: TP
10352 #: build/C/man2/shmget.2:284
10353 #, no-wrap
10354 msgid "B<SHMALL>"
10355 msgstr "B<SHMALL>"
10356
10357 #. type: Plain text
10358 #: build/C/man2/shmget.2:288
10359 msgid ""
10360 "System-wide limit on the total amount of shared memory, measured in units of "
10361 "the system page size."
10362 msgstr ""
10363 "共有メモリーの全使用量のシステム全体での上限値。 システムページサイズが単位で"
10364 "ある。"
10365
10366 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10367 #. type: Plain text
10368 #: build/C/man2/shmget.2:294
10369 msgid ""
10370 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10371 "shmall>.  Since Linux 3.16, the default value for this limit is:"
10372 msgstr ""
10373 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10374 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10375 "る。"
10376
10377 #. type: Plain text
10378 #: build/C/man2/shmget.2:296 build/C/man2/shmget.2:331
10379 #, no-wrap
10380 msgid "    ULONG_MAX - 2^24\n"
10381 msgstr "    ULONG_MAX - 2^24\n"
10382
10383 #. type: Plain text
10384 #: build/C/man2/shmget.2:307
10385 msgid ""
10386 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10387 "systems)  is to impose no limitation on allocations.  This value, rather "
10388 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10389 "historical applications simply raised the existing limit without first "
10390 "checking its current value.  Such applications would cause the value to "
10391 "overflow if the limit was set at B<ULONG_MAX>."
10392 msgstr ""
10393 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10394 "ステムにも 64 ビットシステムにも適したものになっている)。 B<ULONG_MAX> ではな"
10395 "く、この値が選ばれたのは、 古いアプリケーションが最初に現在の値を確認せずに既"
10396 "存の上限をそのまま増やしてしまっても問題が起こらないようなデフォルト値を選ん"
10397 "だからである。 このようなアプリケーションでは、 上限を B<ULONG_MAX> に設定す"
10398 "ると値がオーバーフローしてしまうことになる。"
10399
10400 #. type: Plain text
10401 #: build/C/man2/shmget.2:310
10402 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10403 msgstr "Linux 2.4 から Linux 3.15 では、この上限のデフォルト値は以下であった。"
10404
10405 #. type: Plain text
10406 #: build/C/man2/shmget.2:312
10407 #, no-wrap
10408 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10409 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10410
10411 #. type: Plain text
10412 #: build/C/man2/shmget.2:320
10413 msgid ""
10414 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10415 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10416 "GB as the limit on the total memory used by all shared memory segments."
10417 msgstr ""
10418 "B<SHMMAX> と B<SHMMNI> が変更されないとすると、 この式の結果に (バイト単位の"
10419 "値を得るために) ページサイズを掛け算すると、 全ての共有メモリーセグメントで使"
10420 "用される全メモリーの上限として、 8 GB という値が得られる。"
10421
10422 #. type: TP
10423 #: build/C/man2/shmget.2:320
10424 #, no-wrap
10425 msgid "B<SHMMAX>"
10426 msgstr "B<SHMMAX>"
10427
10428 #. type: Plain text
10429 #: build/C/man2/shmget.2:323
10430 msgid "Maximum size in bytes for a shared memory segment."
10431 msgstr "1 つの共有メモリーセグメントの最大サイズ (バイト数)。"
10432
10433 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10434 #. type: Plain text
10435 #: build/C/man2/shmget.2:329
10436 msgid ""
10437 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10438 "shmmax>.  Since Linux 3.16, the default value for this limit is:"
10439 msgstr ""
10440 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10441 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10442 "る。"
10443
10444 #. type: Plain text
10445 #: build/C/man2/shmget.2:340
10446 msgid ""
10447 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10448 "systems)  is to impose no limitation on allocations.  See the description of "
10449 "B<SHMALL> for a discussion of why this default value (rather than "
10450 "B<ULONG_MAX>)  is used."
10451 msgstr ""
10452 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10453 "ステムにも 64 ビットシステムにも適したものになっている)。 (B<ULONG_MAX> では"
10454 "なく) このデフォルト値が使われている理由については B<SHMALL> の説明を参照。"
10455
10456 #. type: Plain text
10457 #: build/C/man2/shmget.2:343
10458 msgid ""
10459 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10460 "0x2000000 (32MB)."
10461 msgstr ""
10462 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10463 "(32MB) であった。"
10464
10465 #. type: Plain text
10466 #: build/C/man2/shmget.2:349
10467 msgid ""
10468 "Because it is not possible to map just part of a shared memory segment, the "
10469 "amount of virtual memory places another limit on the maximum size of a "
10470 "usable segment: for example, on i386 the largest segments that can be mapped "
10471 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10472 msgstr ""
10473 "共有メモリーセグメントの一部分だけをマッピングすることはできないので、 使用可"
10474 "能なセグメントの最大サイズには仮想メモリーの総量という別の上限が適用される。 "
10475 "例えば、i386 ではマッピング可能な最大セグメントの大きさはおおよそ 2.8GB で、 "
10476 "x86_64 では上限はおおよそ 127TB である。"
10477
10478 #. type: TP
10479 #: build/C/man2/shmget.2:349
10480 #, no-wrap
10481 msgid "B<SHMMIN>"
10482 msgstr "B<SHMMIN>"
10483
10484 #. type: Plain text
10485 #: build/C/man2/shmget.2:355
10486 msgid ""
10487 "Minimum size in bytes for a shared memory segment: implementation dependent "
10488 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10489 msgstr ""
10490 "共有メモリーセグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10491 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10492
10493 #. type: TP
10494 #: build/C/man2/shmget.2:355
10495 #, no-wrap
10496 msgid "B<SHMMNI>"
10497 msgstr "B<SHMMNI>"
10498
10499 #. type: Plain text
10500 #: build/C/man2/shmget.2:360
10501 msgid ""
10502 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10503 "the default value for this limit was 128; since Linux 2.4, the default value "
10504 "is 4096."
10505 msgstr ""
10506 "システム全体の共有メモリーセグメント数の上限値。 この上限値のデフォルトは、 "
10507 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10508
10509 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10510 #.  that we could create one more segment than SHMMNI -- MTK
10511 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10512 #. type: Plain text
10513 #: build/C/man2/shmget.2:366
10514 msgid ""
10515 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10516 msgstr ""
10517 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10518 "たりできる。"
10519
10520 #. type: Plain text
10521 #: build/C/man2/shmget.2:370
10522 msgid ""
10523 "The implementation has no specific limits for the per-process maximum number "
10524 "of shared memory segments (B<SHMSEG>)."
10525 msgstr ""
10526 "プロセス当りの共有メモリーセグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10527 "上の制限はない。"
10528
10529 #. type: Plain text
10530 #: build/C/man2/shmget.2:376
10531 msgid ""
10532 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10533 "shared memory segment scheduled for deletion."
10534 msgstr ""
10535 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリーセグメント"
10536 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10537
10538 #. type: Plain text
10539 #: build/C/man2/shmget.2:382
10540 msgid ""
10541 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10542 "more clearly show its function."
10543 msgstr ""
10544 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10545 "より明確にその機能を表しているだろう。"
10546
10547 #. type: Plain text
10548 #: build/C/man2/shmget.2:391
10549 msgid ""
10550 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10551 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10552 msgstr ""
10553 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10554 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10555
10556 #. type: TH
10557 #: build/C/man2/shmop.2:41
10558 #, no-wrap
10559 msgid "SHMOP"
10560 msgstr "SHMOP"
10561
10562 #. type: Plain text
10563 #: build/C/man2/shmop.2:44
10564 msgid "shmat, shmdt - System V shared memory operations"
10565 msgstr "shmat, shmdt - System V 共有メモリー (shared memory) の操作"
10566
10567 #. type: Plain text
10568 #: build/C/man2/shmop.2:48
10569 #, no-wrap
10570 msgid ""
10571 "B<#include E<lt>sys/types.hE<gt>>\n"
10572 "B<#include E<lt>sys/shm.hE<gt>>\n"
10573 msgstr ""
10574 "B<#include E<lt>sys/types.hE<gt>>\n"
10575 "B<#include E<lt>sys/shm.hE<gt>>\n"
10576
10577 #. type: Plain text
10578 #: build/C/man2/shmop.2:50
10579 #, no-wrap
10580 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10581 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10582
10583 #. type: Plain text
10584 #: build/C/man2/shmop.2:52
10585 #, no-wrap
10586 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10587 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10588
10589 #. type: SS
10590 #: build/C/man2/shmop.2:54
10591 #, no-wrap
10592 msgid "shmat()"
10593 msgstr "shmat()"
10594
10595 #. type: Plain text
10596 #: build/C/man2/shmop.2:62
10597 msgid ""
10598 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10599 "I<shmid> to the address space of the calling process.  The attaching address "
10600 "is specified by I<shmaddr> with one of the following criteria:"
10601 msgstr ""
10602 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリーセグメント "
10603 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10604 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10605
10606 #. type: Plain text
10607 #: build/C/man2/shmop.2:68
10608 msgid ""
10609 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10610 "which to attach the segment."
10611 msgstr ""
10612 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10613 "されていない) アドレスを選択する。"
10614
10615 #. type: Plain text
10616 #: build/C/man2/shmop.2:80
10617 msgid ""
10618 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10619 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10620 "multiple of B<SHMLBA>."
10621 msgstr ""
10622 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10623 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10624 "スへ付加する。"
10625
10626 #. type: Plain text
10627 #: build/C/man2/shmop.2:84
10628 msgid ""
10629 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10630 "occurs."
10631 msgstr ""
10632 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10633 "要がある。"
10634
10635 #. type: Plain text
10636 #: build/C/man2/shmop.2:90
10637 msgid ""
10638 "In addition to B<SHM_RND>, the following flags may be specified in the "
10639 "I<shmflg> bit-mask argument:"
10640 msgstr ""
10641 "B<SHM_RND> に加えて、以下のフラグを I<shmflg> ビットマスク引き数に指定でき"
10642 "る。"
10643
10644 #. type: TP
10645 #: build/C/man2/shmop.2:90
10646 #, no-wrap
10647 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10648 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10649
10650 #. type: Plain text
10651 #: build/C/man2/shmop.2:94
10652 msgid ""
10653 "Allow the contents of the segment to be executed.  The caller must have "
10654 "execute permission on the segment."
10655 msgstr ""
10656 "セグメントの内容を実行できる。 呼び出し元はセグメントに対する実行許可を持って"
10657 "いなければならない。"
10658
10659 #. type: TP
10660 #: build/C/man2/shmop.2:94
10661 #, no-wrap
10662 msgid "B<SHM_RDONLY>"
10663 msgstr "B<SHM_RDONLY>"
10664
10665 #. type: Plain text
10666 #: build/C/man2/shmop.2:102
10667 msgid ""
10668 "Attach the segment for read-only access.  The process must have read "
10669 "permission for the segment.  If this flag is not specified, the segment is "
10670 "attached for read and write access, and the process must have read and write "
10671 "permission for the segment.  There is no notion of a write-only shared "
10672 "memory segment."
10673 msgstr ""
10674 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10675 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10676 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10677 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリーセ"
10678 "グメントという概念は存在しない。"
10679
10680 #. type: TP
10681 #: build/C/man2/shmop.2:102
10682 #, no-wrap
10683 msgid "B<SHM_REMAP> (Linux-specific)"
10684 msgstr "B<SHM_REMAP> (Linux 固有)"
10685
10686 #. type: Plain text
10687 #: build/C/man2/shmop.2:115
10688 msgid ""
10689 "This flag specifies that the mapping of the segment should replace any "
10690 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10691 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10692 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10693 "must not be NULL."
10694 msgstr ""
10695 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10696 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10697 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10698 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10699
10700 #. type: Plain text
10701 #: build/C/man2/shmop.2:122
10702 msgid ""
10703 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10704 "The segment will automatically be detached at process exit.  The same "
10705 "segment may be attached as a read and as a read-write one, and more than "
10706 "once, in the process's address space."
10707 msgstr ""
10708 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10709 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10710 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10711 "複数回付加することもできる。"
10712
10713 #. type: Plain text
10714 #: build/C/man2/shmop.2:130
10715 msgid ""
10716 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10717 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10718 "follows:"
10719 msgstr ""
10720 "成功した B<shmat>()  コールは共有メモリーセグメントに関連する I<shmid_ds> 構"
10721 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10722
10723 #. type: Plain text
10724 #: build/C/man2/shmop.2:133
10725 msgid "I<shm_atime> is set to the current time."
10726 msgstr "I<shm_atime> には現在の時刻を設定する。"
10727
10728 #. type: Plain text
10729 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10730 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10731 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10732
10733 #. type: Plain text
10734 #: build/C/man2/shmop.2:140
10735 msgid "I<shm_nattch> is incremented by one."
10736 msgstr "I<shm_nattch> を 1 増加させる。"
10737
10738 #. type: SS
10739 #: build/C/man2/shmop.2:140
10740 #, no-wrap
10741 msgid "shmdt()"
10742 msgstr "shmdt()"
10743
10744 #. type: Plain text
10745 #: build/C/man2/shmop.2:151
10746 msgid ""
10747 "B<shmdt>()  detaches the shared memory segment located at the address "
10748 "specified by I<shmaddr> from the address space of the calling process.  The "
10749 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10750 "the value returned by the attaching B<shmat>()  call."
10751 msgstr ""
10752 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10753 "ドレスに配置された共有メモリーセグメントを分離 (detach) する。 分離する共有メ"
10754 "モリーセグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10755 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10756 "ない。"
10757
10758 #. type: Plain text
10759 #: build/C/man2/shmop.2:157
10760 msgid ""
10761 "On a successful B<shmdt>()  call, the system updates the members of the "
10762 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10763 msgstr ""
10764 "成功した B<shmdt>()  コールはその共有メモリーセグメントに関連する "
10765 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10766
10767 #. type: Plain text
10768 #: build/C/man2/shmop.2:160
10769 msgid "I<shm_dtime> is set to the current time."
10770 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10771
10772 #. type: Plain text
10773 #: build/C/man2/shmop.2:168
10774 msgid ""
10775 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10776 "marked for deletion, the segment is deleted."
10777 msgstr ""
10778 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10779 "セグメントは削除される。"
10780
10781 #. type: Plain text
10782 #: build/C/man2/shmop.2:176
10783 msgid ""
10784 "On success, B<shmat>()  returns the address of the attached shared memory "
10785 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10786 "indicate the cause of the error."
10787 msgstr ""
10788 "B<shmat>()  は、成功した場合、 付加された共有メモリーセグメントのアドレスを返"
10789 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10790 "値を設定する。"
10791
10792 #. type: Plain text
10793 #: build/C/man2/shmop.2:182
10794 msgid ""
10795 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10796 "set to indicate the cause of the error."
10797 msgstr ""
10798 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10799 "ラーの原因を示す値を設定する。"
10800
10801 #. type: Plain text
10802 #: build/C/man2/shmop.2:188
10803 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10804 msgstr ""
10805 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10806
10807 #. type: Plain text
10808 #: build/C/man2/shmop.2:194
10809 msgid ""
10810 "The calling process does not have the required permissions for the requested "
10811 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10812 msgstr ""
10813 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10814 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10815
10816 #. type: Plain text
10817 #: build/C/man2/shmop.2:211
10818 msgid ""
10819 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10820 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10821 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10822 msgstr ""
10823 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10824 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10825 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10826 "れているが、 I<shmaddr> が NULL であった。"
10827
10828 #. type: Plain text
10829 #: build/C/man2/shmop.2:214
10830 msgid "Could not allocate memory for the descriptor or for the page tables."
10831 msgstr ""
10832 "ディスクリプター (descriptor) やページテーブルのためのメモリーを 割り当てるこ"
10833 "とができない。"
10834
10835 #. type: Plain text
10836 #: build/C/man2/shmop.2:220
10837 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10838 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10839
10840 #.  The following since 2.6.17-rc1:
10841 #. type: Plain text
10842 #: build/C/man2/shmop.2:228
10843 msgid ""
10844 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10845 "not aligned on a page boundary."
10846 msgstr ""
10847 "I<shmaddr> に付加された共有メモリーセグメントが存在しない。 もしくは、 "
10848 "I<shmaddr> がページ境界に合っていない。"
10849
10850 #. type: Plain text
10851 #: build/C/man2/shmop.2:243
10852 msgid ""
10853 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10854 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10855 "B<shmat>()  from I<char\\ *> into I<void\\ *>."
10856 msgstr ""
10857 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10858 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10859 "\\ *> に変更された。"
10860
10861 #. type: Plain text
10862 #: build/C/man2/shmop.2:248
10863 msgid ""
10864 "After a B<fork>(2), the child inherits the attached shared memory segments."
10865 msgstr ""
10866 "B<fork>(2)  した後、子プロセスは付加された共有メモリーセグメントを継承する。"
10867
10868 #. type: Plain text
10869 #: build/C/man2/shmop.2:252
10870 msgid ""
10871 "After an B<execve>(2), all attached shared memory segments are detached from "
10872 "the process."
10873 msgstr ""
10874 "B<exec>(2)  した後、全ての付加された共有メモリーセグメントはプロセスから分離"
10875 "される。"
10876
10877 #. type: Plain text
10878 #: build/C/man2/shmop.2:256
10879 msgid ""
10880 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10881 "process."
10882 msgstr ""
10883 "B<exit>(2)  において、全ての付加された共有メモリーセグメントはプロセスから分"
10884 "離される。"
10885
10886 #. type: Plain text
10887 #: build/C/man2/shmop.2:268
10888 msgid ""
10889 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10890 "way of attaching a shared memory segment.  Be aware that the shared memory "
10891 "segment attached in this way may be attached at different addresses in "
10892 "different processes.  Therefore, any pointers maintained within the shared "
10893 "memory must be made relative (typically to the starting address of the "
10894 "segment), rather than absolute."
10895 msgstr ""
10896 "共有メモリーセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> "
10897 "を NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共"
10898 "有メモリーセグメントは、 プロセスが異なれば別のアドレスに付加される、という点"
10899 "に注意すること。 よって共有メモリー内で管理されるポインターは、 絶対アドレス"
10900 "ではなく、 (一般的にはセグメントの開始アドレスからの)  相対アドレスで作成する"
10901 "べきである。"
10902
10903 #. type: Plain text
10904 #: build/C/man2/shmop.2:273
10905 msgid ""
10906 "On Linux, it is possible to attach a shared memory segment even if it is "
10907 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10908 "behavior and many other implementations do not support it."
10909 msgstr ""
10910 "Linux では共有メモリーセグメントに既に削除マークが付けられていても、 その共有"
10911 "メモリーセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような"
10912 "動作を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10913
10914 #. type: Plain text
10915 #: build/C/man2/shmop.2:276
10916 msgid "The following system parameter affects B<shmat>():"
10917 msgstr "以下のシステムパラメーターは、 B<shmat>()  に影響する:"
10918
10919 #. type: TP
10920 #: build/C/man2/shmop.2:276
10921 #, no-wrap
10922 msgid "B<SHMLBA>"
10923 msgstr "B<SHMLBA>"
10924
10925 #. type: Plain text
10926 #: build/C/man2/shmop.2:289
10927 msgid ""
10928 "Segment low boundary address multiple.  When explicitly specifying an attach "
10929 "address in a call to B<shmat>(), the caller should ensure that the address "
10930 "is a multiple of this value.  This is necessary on some architectures, in "
10931 "order either to ensure good CPU cache performance or to ensure that "
10932 "different attaches of the same segment have consistent views within the CPU "
10933 "cache.  B<SHMLBA> is normally some multiple of the system page size (on many "
10934 "Linux architectures, it is the same as the system page size)."
10935 msgstr ""
10936 "セグメントの下限アドレス倍数 (Segment low boundary address multiple)。 "
10937 "B<shmat>() の呼び出しにおいて付加するアドレスを明示的に指定する際、 呼び出し"
10938 "元は指定するアドレスがこの値の倍数になるように保証しなければならない。 これは"
10939 "いくつかのアーキテクチャーでは必要なことで、 CPU キャッシュの性能を保証するた"
10940 "めであったり、 同じセグメントの別の付与を CPU キャッシュ内部で一貫して扱える"
10941 "ようにするためだったりする。 B<SHMLBA> は通常はシステムページサイズの倍数であ"
10942 "る (Linux の多くのアーキテクチャーではシステムページサイズと同じである)。"
10943
10944 #. type: Plain text
10945 #: build/C/man2/shmop.2:293
10946 msgid ""
10947 "The implementation places no intrinsic per-process limit on the number of "
10948 "shared memory segments (B<SHMSEG>)."
10949 msgstr ""
10950 "現在の実装では、プロセスごとの 共有メモリーセグメントの最大数 (B<SHMSEG>)  に"
10951 "関する実装依存の制限はない。"
10952
10953 #. type: Plain text
10954 #: build/C/man2/shmop.2:301
10955 msgid ""
10956 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10957 "B<shm_overview>(7), B<svipc>(7)"
10958 msgstr ""
10959 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10960 "B<shm_overview>(7), B<svipc>(7)"
10961
10962 #. type: TH
10963 #: build/C/man2/subpage_prot.2:30
10964 #, no-wrap
10965 msgid "SUBPAGE_PROT"
10966 msgstr "SUBPAGE_PROT"
10967
10968 #. type: TH
10969 #: build/C/man2/subpage_prot.2:30
10970 #, no-wrap
10971 msgid "2012-07-13"
10972 msgstr "2012-07-13"
10973
10974 #. type: Plain text
10975 #: build/C/man2/subpage_prot.2:33
10976 msgid "subpage_prot - define a subpage protection for an address range"
10977 msgstr ""
10978
10979 #. type: Plain text
10980 #: build/C/man2/subpage_prot.2:37
10981 #, no-wrap
10982 msgid ""
10983 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10984 "B<                  uint32_t *>I<map>B<);>\n"
10985 msgstr ""
10986 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10987 "B<                  uint32_t *>I<map>B<);>\n"
10988
10989 #. type: Plain text
10990 #: build/C/man2/subpage_prot.2:41
10991 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10992 msgstr ""
10993 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10994 "を参照。"
10995
10996 #. type: Plain text
10997 #: build/C/man2/subpage_prot.2:47
10998 msgid ""
10999 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
11000 "control the access permissions on individual 4kB subpages on systems "
11001 "configured with a page size of 64kB."
11002 msgstr ""
11003
11004 #. type: Plain text
11005 #: build/C/man2/subpage_prot.2:54
11006 msgid ""
11007 "The protection map is applied to the memory pages in the region starting at "
11008 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
11009 "aligned to a 64-kB boundary."
11010 msgstr ""
11011
11012 #. type: Plain text
11013 #: build/C/man2/subpage_prot.2:66
11014 msgid ""
11015 "The protection map is specified in the buffer pointed to by I<map>.  The map "
11016 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
11017 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
11018 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
11019 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
11020 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
11021 msgstr ""
11022
11023 #. type: Plain text
11024 #: build/C/man2/subpage_prot.2:71
11025 msgid ""
11026 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
11027 "specified below is returned."
11028 msgstr ""
11029
11030 #. type: Plain text
11031 #: build/C/man2/subpage_prot.2:77
11032 msgid "The buffer referred to by I<map> is not accessible."
11033 msgstr ""
11034
11035 #. type: Plain text
11036 #: build/C/man2/subpage_prot.2:87
11037 msgid ""
11038 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
11039 "be aligned to a multiple of the system page size, and they must not refer to "
11040 "a region outside of the address space of the process or to a region that "
11041 "consists of huge pages."
11042 msgstr ""
11043
11044 #. type: Plain text
11045 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
11046 msgid "Out of memory."
11047 msgstr "メモリー不足である。"
11048
11049 #. type: Plain text
11050 #: build/C/man2/subpage_prot.2:96
11051 msgid ""
11052 "This system call is provided on the PowerPC architecture since Linux "
11053 "2.6.25.  The system call is provided only if the kernel is configured with "
11054 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
11055 msgstr ""
11056
11057 #. type: Plain text
11058 #: build/C/man2/subpage_prot.2:101
11059 msgid ""
11060 "Glibc does not provide a wrapper for this system call; call it using "
11061 "B<syscall>(2)."
11062 msgstr ""
11063
11064 #. type: Plain text
11065 #: build/C/man2/subpage_prot.2:106
11066 msgid ""
11067 "Normal page protections (at the 64-kB page level) also apply; the subpage "
11068 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
11069 "field won't allow writes to a page that is otherwise write-protected."
11070 msgstr ""
11071
11072 #. type: SS
11073 #: build/C/man2/subpage_prot.2:106
11074 #, no-wrap
11075 msgid "Rationale"
11076 msgstr ""
11077
11078 #.  In the initial implementation, it was the case that:
11079 #.      In fact the whole process is switched to use 4k hardware pages when the
11080 #.      subpage_prot system call is used, but this could be improved in future
11081 #.      to switch only the affected segments.
11082 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
11083 #.  the affected segment, not the whole process.
11084 #. type: Plain text
11085 #: build/C/man2/subpage_prot.2:128
11086 msgid ""
11087 "This system call is provided to assist writing emulators that operate using "
11088 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
11089 "uses a smaller page size, the emulator can no longer use the memory-"
11090 "management unit (MMU)  and normal system calls for controlling page "
11091 "protections.  (The emulator could emulate the MMU by checking and possibly "
11092 "remapping the address for each memory access in software, but that is "
11093 "slow.)  The idea is that the emulator supplies an array of protection masks "
11094 "to apply to a specified range of virtual addresses.  These masks are applied "
11095 "at the level where hardware page-table entries (PTEs)  are inserted into the "
11096 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
11097 "affected.  Implicit in this is that the regions of the address space that "
11098 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
11099 "hardware pages (on machines with hardware 64-kB page support)."
11100 msgstr ""
11101
11102 #. type: Plain text
11103 #: build/C/man2/subpage_prot.2:131
11104 msgid "B<mprotect>(2), B<syscall>(2)"
11105 msgstr "B<mprotect>(2), B<syscall>(2)"
11106
11107 #. type: Plain text
11108 #: build/C/man2/subpage_prot.2:134
11109 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
11110 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
11111
11112 #. type: TH
11113 #: build/C/man2/sync_file_range.2:30
11114 #, no-wrap
11115 msgid "SYNC_FILE_RANGE"
11116 msgstr "SYNC_FILE_RANGE"
11117
11118 #. type: TH
11119 #: build/C/man2/sync_file_range.2:30
11120 #, no-wrap
11121 msgid "2014-08-19"
11122 msgstr "2014-08-19"
11123
11124 #. type: Plain text
11125 #: build/C/man2/sync_file_range.2:33
11126 msgid "sync_file_range - sync a file segment with disk"
11127 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
11128
11129 #. type: Plain text
11130 #: build/C/man2/sync_file_range.2:37
11131 #, no-wrap
11132 msgid ""
11133 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
11134 "B<#include E<lt>fcntl.hE<gt>>\n"
11135 msgstr ""
11136 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
11137 "B<#include E<lt>fcntl.hE<gt>>\n"
11138
11139 #. type: Plain text
11140 #: build/C/man2/sync_file_range.2:40
11141 #, no-wrap
11142 msgid ""
11143 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11144 "B<                    unsigned int >I<flags>B<);>\n"
11145 msgstr ""
11146 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11147 "B<                    unsigned int >I<flags>B<);>\n"
11148
11149 #. type: Plain text
11150 #: build/C/man2/sync_file_range.2:47
11151 msgid ""
11152 "B<sync_file_range>()  permits fine control when synchronizing the open file "
11153 "referred to by the file descriptor I<fd> with disk."
11154 msgstr ""
11155 "B<sync_file_range>()  を使うと、ファイルディスクリプター I<fd> で参照される"
11156 "オープンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能とな"
11157 "る。"
11158
11159 #. type: Plain text
11160 #: build/C/man2/sync_file_range.2:61
11161 msgid ""
11162 "I<offset> is the starting byte of the file range to be synchronized.  "
11163 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11164 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11165 "are synchronized.  Synchronization is in units of the system page size: "
11166 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11167 "rounded up to a page boundary."
11168 msgstr ""
11169 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11170 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11171 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11172 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11173 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11174
11175 #. type: Plain text
11176 #: build/C/man2/sync_file_range.2:65
11177 msgid "The I<flags> bit-mask argument can include any of the following values:"
11178 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11179
11180 #. type: TP
11181 #: build/C/man2/sync_file_range.2:65
11182 #, no-wrap
11183 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11184 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11185
11186 #. type: Plain text
11187 #: build/C/man2/sync_file_range.2:70
11188 msgid ""
11189 "Wait upon write-out of all pages in the specified range that have already "
11190 "been submitted to the device driver for write-out before performing any "
11191 "write."
11192 msgstr ""
11193 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11194 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11195 "つ。"
11196
11197 #. type: TP
11198 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11199 #, no-wrap
11200 msgid "B<SYNC_FILE_RANGE_WRITE>"
11201 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11202
11203 #. type: Plain text
11204 #: build/C/man2/sync_file_range.2:76
11205 msgid ""
11206 "Initiate write-out of all dirty pages in the specified range which are not "
11207 "presently submitted write-out.  Note that even this may block if you attempt "
11208 "to write more than request queue size."
11209 msgstr ""
11210 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11211 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11212 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11213 "る点に注意すること。"
11214
11215 #. type: TP
11216 #: build/C/man2/sync_file_range.2:76
11217 #, no-wrap
11218 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11219 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11220
11221 #. type: Plain text
11222 #: build/C/man2/sync_file_range.2:80
11223 msgid ""
11224 "Wait upon write-out of all pages in the range after performing any write."
11225 msgstr ""
11226 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11227 "つ。"
11228
11229 #. type: Plain text
11230 #: build/C/man2/sync_file_range.2:84
11231 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11232 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11233
11234 #. type: SS
11235 #: build/C/man2/sync_file_range.2:84
11236 #, no-wrap
11237 msgid "Warning"
11238 msgstr "警告"
11239
11240 #. type: Plain text
11241 #: build/C/man2/sync_file_range.2:100
11242 msgid ""
11243 "This system call is extremely dangerous and should not be used in portable "
11244 "programs.  None of these operations writes out the file's metadata.  "
11245 "Therefore, unless the application is strictly performing overwrites of "
11246 "already-instantiated disk blocks, there are no guarantees that the data will "
11247 "be available after a crash.  There is no user interface to know if a write "
11248 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11249 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11250 "writing into preallocated space, many filesystems also require calls into "
11251 "the block allocator, which this system call does not sync out to disk.  This "
11252 "system call does not flush disk write caches and thus does not provide any "
11253 "data integrity on systems with volatile disk write caches."
11254 msgstr ""
11255 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11256 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11257 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11258 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11259 "みが上書きだけであるかを知るためのユーザーインターフェースは存在しない。 "
11260 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11261 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11262 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11263 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11264 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11265 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11266 "コールではデータの一貫性を確保できないことになる。"
11267
11268 #. type: SS
11269 #: build/C/man2/sync_file_range.2:100
11270 #, no-wrap
11271 msgid "Some details"
11272 msgstr "詳細"
11273
11274 #. type: Plain text
11275 #: build/C/man2/sync_file_range.2:108
11276 msgid ""
11277 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11278 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11279 msgstr ""
11280 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11281 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11282
11283 #. type: Plain text
11284 #: build/C/man2/sync_file_range.2:112
11285 msgid "Useful combinations of the I<flags> bits are:"
11286 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11287
11288 #. type: TP
11289 #: build/C/man2/sync_file_range.2:112
11290 #, no-wrap
11291 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11292 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11293
11294 #. type: Plain text
11295 #: build/C/man2/sync_file_range.2:120
11296 msgid ""
11297 "Ensures that all pages in the specified range which were dirty when "
11298 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11299 "start-write-for-data-integrity operation."
11300 msgstr ""
11301 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11302 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11303 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11304 "ある。"
11305
11306 #. type: Plain text
11307 #: build/C/man2/sync_file_range.2:127
11308 msgid ""
11309 "Start write-out of all dirty pages in the specified range which are not "
11310 "presently under write-out.  This is an asynchronous flush-to-disk "
11311 "operation.  This is not suitable for data integrity operations."
11312 msgstr ""
11313 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11314 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11315 "る。データ完全性確保が必要な操作としては適切ではない。"
11316
11317 #. type: TP
11318 #: build/C/man2/sync_file_range.2:127
11319 #, no-wrap
11320 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11321 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11322
11323 #. type: Plain text
11324 #: build/C/man2/sync_file_range.2:134
11325 msgid ""
11326 "Wait for completion of write-out of all pages in the specified range.  This "
11327 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11328 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11329 "and obtain its result."
11330 msgstr ""
11331 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11332 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11333 "き、この操作の完了を待ち、結果を取得することができる。"
11334
11335 #. type: TP
11336 #: build/C/man2/sync_file_range.2:134
11337 #, no-wrap
11338 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11339 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11340
11341 #. type: Plain text
11342 #: build/C/man2/sync_file_range.2:141
11343 msgid ""
11344 "This is a write-for-data-integrity operation that will ensure that all pages "
11345 "in the specified range which were dirty when B<sync_file_range>()  was "
11346 "called are committed to disk."
11347 msgstr ""
11348 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11349 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11350 "のページが ディスクに格納されることが保証される。"
11351
11352 #. type: Plain text
11353 #: build/C/man2/sync_file_range.2:147
11354 msgid ""
11355 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11356 "I<errno> is set to indicate the error."
11357 msgstr ""
11358 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11359 "I<errno> にエラーを示す値を設定する。"
11360
11361 #. type: Plain text
11362 #: build/C/man2/sync_file_range.2:152
11363 msgid "I<fd> is not a valid file descriptor."
11364 msgstr "I<fd> が有効なファイルディスクリプターではない。"
11365
11366 #. type: Plain text
11367 #: build/C/man2/sync_file_range.2:160
11368 msgid ""
11369 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11370 msgstr ""
11371 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11372 "である。"
11373
11374 #. type: Plain text
11375 #: build/C/man2/sync_file_range.2:163
11376 msgid "I/O error."
11377 msgstr "I/O エラー。"
11378
11379 #. type: Plain text
11380 #: build/C/man2/sync_file_range.2:169
11381 msgid "Out of disk space."
11382 msgstr "ディスク領域不足である。"
11383
11384 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11385 #.  (In user space at least) it isn't possible to obtain a file descriptor
11386 #.  for a symbolic link.
11387 #. type: Plain text
11388 #: build/C/man2/sync_file_range.2:177
11389 msgid ""
11390 "I<fd> refers to something other than a regular file, a block device, a "
11391 "directory, or a symbolic link."
11392 msgstr ""
11393 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11394 "以外のものを指している。"
11395
11396 #. type: Plain text
11397 #: build/C/man2/sync_file_range.2:180
11398 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11399 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11400
11401 #. type: Plain text
11402 #: build/C/man2/sync_file_range.2:183
11403 msgid ""
11404 "This system call is Linux-specific, and should be avoided in portable "
11405 "programs."
11406 msgstr ""
11407 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11408 "けるべきである。"
11409
11410 #. type: SS
11411 #: build/C/man2/sync_file_range.2:184
11412 #, no-wrap
11413 msgid "sync_file_range2()"
11414 msgstr "sync_file_range2()"
11415
11416 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11417 #. type: Plain text
11418 #: build/C/man2/sync_file_range.2:201
11419 msgid ""
11420 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11421 "in a suitable pair of registers.  On such architectures, the call signature "
11422 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11423 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11424 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11425 "different system call that orders the arguments suitably:"
11426 msgstr ""
11427 "いくつかのアーキテクチャー (例えば、 PowerPC や ARM) では、 64 ビットの引き数"
11428 "は適切なレジスターの組に割り当てる必要がある。 このようなアーキテクチャーで"
11429 "は、 「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 "
11430 "引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費"
11431 "されてしまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテク"
11432 "チャーでは引き数が適切な順序になった別のシステムコールが定義されている。"
11433
11434 #. type: Plain text
11435 #: build/C/man2/sync_file_range.2:206
11436 #, no-wrap
11437 msgid ""
11438 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11439 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11440 msgstr ""
11441 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11442 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11443
11444 #. type: Plain text
11445 #: build/C/man2/sync_file_range.2:211
11446 msgid ""
11447 "The behavior of this system call is otherwise exactly the same as "
11448 "B<sync_file_range>()."
11449 msgstr ""
11450 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11451 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11452 "glibc では提供されていない。"
11453
11454 #. type: Plain text
11455 #: build/C/man2/sync_file_range.2:222
11456 msgid ""
11457 "A system call with this signature first appeared on the ARM architecture in "
11458 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11459 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11460 "architectures where glibc support is provided, glibc transparently wraps "
11461 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11462 msgstr ""
11463 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャーで\n"
11464 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11465 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11466 "システムコールの名前が変更された。\n"
11467 "glibc によるサポートが提供されているアーキテクチャーでは、\n"
11468 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11469 "B<sync_file_range2>() を適切に使用するようになっている。"
11470
11471 #. type: Plain text
11472 #: build/C/man2/sync_file_range.2:227
11473 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11474 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11475
11476 #. type: TH
11477 #: build/C/man2/memfd_create.2:21
11478 #, no-wrap
11479 msgid "MEMFD_CREATE"
11480 msgstr "MEMFD_CREATE"
11481
11482 #. type: Plain text
11483 #: build/C/man2/memfd_create.2:24
11484 msgid "memfd_create - create an anonymous file"
11485 msgstr "memfd_create - 無名ファイル (anonymous file) を作成する"
11486
11487 #. type: Plain text
11488 #: build/C/man2/memfd_create.2:26
11489 msgid "B<#include E<lt>sys/memfd.hE<gt>>"
11490 msgstr "B<#include E<lt>sys/memfd.hE<gt>>"
11491
11492 #. type: Plain text
11493 #: build/C/man2/memfd_create.2:28
11494 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11495 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11496
11497 #.  David Herrmann:
11498 #.      memfd uses VM_NORESERVE so each page is accounted on first access.
11499 #.      This means, the overcommit-limits (see __vm_enough_memory()) and the
11500 #.      memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
11501 #.      those are accounted on "current" and "current->mm", that is, the
11502 #.      process doing the first page access.
11503 #. type: Plain text
11504 #: build/C/man2/memfd_create.2:51
11505 msgid ""
11506 "B<memfd_create>()  creates an anonymous file and returns a file descriptor "
11507 "that refers to it.  The file behaves like a regular file, and so can be "
11508 "modified, truncated, memory-mapped, and so on.  However, unlike a regular "
11509 "file, it lives in RAM and has a volatile backing storage.  Once all "
11510 "references to the file are dropped, it is automatically released.  Anonymous "
11511 "memory is used for all backing pages of the file.  Therefore, files created "
11512 "by B<memfd_create>()  have the same semantics as other anonymous memory "
11513 "allocations such as those allocated using B<mmap>(2)  with the "
11514 "B<MAP_ANONYMOUS> flag."
11515 msgstr ""
11516 "B<memfd_create>() は、 無名ファイル (anonymous file) を作成し、 そのファイル"
11517 "を参照するファイルディスクリプターを返す。 このファイルは通常のファイルと同様"
11518 "に振る舞い、 変更、切り詰め (truncate)、 メモリーマップなどを行うことができ"
11519 "る。 しかし、 通常のファイルとは違い、 このファイルは RAM 上に置かれ、 格納さ"
11520 "れるストレージは揮発性である。 このファイルへの参照がすべてなくなると、 ファ"
11521 "イルは自動的に解放される。 このファイルが置かれるページには無名メモリー "
11522 "(anonymous memory) が使用される。 したがって、 B<memfd_create>() で作成された"
11523 "フィアルは、 他の無名メモリーの割り当て (B<MAP_ANONYMOUS> フラグ付きの "
11524 "B<mmap>(2) を使って割り当てられた無名メモリーなど) と同じ動作をする。"
11525
11526 #. type: Plain text
11527 #: build/C/man2/memfd_create.2:58
11528 msgid ""
11529 "The initial size of the file is set to 0.  Following the call, the file size "
11530 "should be set using B<ftruncate>(2).  (Alternatively, the file may be "
11531 "populated by calls to B<write>(2)  or similar.)"
11532 msgstr ""
11533 "ファイルの初期サイズは 0 に設定される。 呼び出しの後に、 B<ftruncate>(2) を"
11534 "使ってファイルサイズを設定すべきである (代わりに、 B<write>(2) や同様の関数を"
11535 "呼び出してファイルにデータを書き込むこともできる)。"
11536
11537 #. type: Plain text
11538 #: build/C/man2/memfd_create.2:69
11539 msgid ""
11540 "The name supplied in I<name> is used as a filename and will be displayed as "
11541 "the target of the corresponding symbolic link in the directory I</proc/self/"
11542 "fd/>.  The displayed name is always prefixed with I<memfd:> and serves only "
11543 "for debugging purposes.  Names do not affect the behavior of the file "
11544 "descriptor, and as such multiple files can have the same name without any "
11545 "side effects."
11546 msgstr ""
11547 "I<name> に指定された名前はファイル名として使用され、 ディレクトリ I</proc/"
11548 "self/fd/> で対応するシンボリックリンクのリンク先として表示される。 表示される"
11549 "名前の前には常に I<memfd:> が付き、 この名前はデバッグ用途としてのみ機能す"
11550 "る。 名前はファイルディスクリプターの動作には影響せず、 複数のファイルが同じ"
11551 "名前を持っても副作用はない。"
11552
11553 #. type: Plain text
11554 #: build/C/man2/memfd_create.2:74
11555 msgid ""
11556 "The following values may be bitwise ORed in I<flags> to change the behaviour "
11557 "of B<memfd_create>():"
11558 msgstr ""
11559 "以下の値をビット論理和で I<flags> に指定して、 B<memfd_create>() の動作を変更"
11560 "できる。"
11561
11562 #. type: TP
11563 #: build/C/man2/memfd_create.2:74
11564 #, no-wrap
11565 msgid "B<MFD_CLOEXEC>"
11566 msgstr "B<MFD_CLOEXEC>"
11567
11568 #. type: Plain text
11569 #: build/C/man2/memfd_create.2:84
11570 msgid ""
11571 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
11572 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
11573 "may be useful."
11574 msgstr ""
11575 "新しいファイルディスクリプターに close-on-exec (B<FD_CLOEXEC>) フラグをセット"
11576 "する。 これが有用な理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参"
11577 "照のこと。"
11578
11579 #. type: TP
11580 #: build/C/man2/memfd_create.2:84
11581 #, no-wrap
11582 msgid "B<MFD_ALLOW_SEALING>"
11583 msgstr "B<MFD_ALLOW_SEALING>"
11584
11585 #.  FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
11586 #.        Is it worth adding some text explaining this?
11587 #. type: Plain text
11588 #: build/C/man2/memfd_create.2:100
11589 msgid ""
11590 "Allow sealing operations on this file.  See the discussion of the "
11591 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
11592 "below.  The initial set of seals is empty.  If this flag is not set, the "
11593 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
11594 "be set on the file."
11595 msgstr ""
11596 "このファイルに対して sealing 操作を許可する。 B<fcntl>(2) の B<F_ADD_SEALS> "
11597 "と B<F_GET_SEALS> 操作の議論を参照。 下記の「注意」も参照。 初期の seal 集合"
11598 "は空となる。 このフラグを指定しなかった場合、 初期の seal 集合は "
11599 "B<F_SEAL_SEAL> となり、 これはこのファイルには他の seal をセットできないこと"
11600 "ということである。"
11601
11602 #. type: Plain text
11603 #: build/C/man2/memfd_create.2:104
11604 msgid "Unused bits in I<flags> must be 0."
11605 msgstr "I<flags> の未使用のビットは 0 でなければならない。"
11606
11607 #. type: Plain text
11608 #: build/C/man2/memfd_create.2:113
11609 msgid ""
11610 "As its return value, B<memfd_create>()  returns a new file descriptor that "
11611 "can be used to refer to the file.  This file descriptor is opened for both "
11612 "reading and writing (B<O_RDWR>)  and B<O_LARGEFILE> is set for the "
11613 "descriptor."
11614 msgstr ""
11615 "返り値として B<memfd_create>() は、 作成したファイルを参照するのに使用できる"
11616 "新しいファイルディスクリプターを返す。 このファイルディスクリプターは読み書き"
11617 "両用 (B<O_RDWR>) でオープンされ、 B<O_LARGEFILE> がこのファイルディスクリプ"
11618 "ターにセットされる。"
11619
11620 #. type: Plain text
11621 #: build/C/man2/memfd_create.2:126
11622 msgid ""
11623 "With respect to B<fork>(2)  and B<execve>(2), the usual semantics apply for "
11624 "the file descriptor created by B<memfd_create>().  A copy of the file "
11625 "descriptor is inherited by the child produced by B<fork>(2)  and refers to "
11626 "the same file.  The file descriptor is preserved across B<execve>(2), unless "
11627 "the close-on-exec flag has been set."
11628 msgstr ""
11629 "B<fork>(2) と B<execve>(2) に関しては、 B<memfd_create>() で作成したファイル"
11630 "ディスクリプターについても通常の動作が適用される。 ファイルディスクリプターの"
11631 "コピーは B<fork>(2) で生成される子プロセスに継承され、 同じファイルを参照す"
11632 "る。 close-on-exec フラグがセットされていない限り、 B<execve>(2) の前後でファ"
11633 "イルディスクリプターは保持される。"
11634
11635 #. type: Plain text
11636 #: build/C/man2/memfd_create.2:133
11637 msgid ""
11638 "On success, B<memfd_create>()  returns a new file descriptor.  On error, -1 "
11639 "is returned and I<errno> is set to indicate the error."
11640 msgstr ""
11641 "成功の場合、 B<memfd_create>() は新しいファイルディスクリプターを返す。 エ"
11642 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11643
11644 #. type: Plain text
11645 #: build/C/man2/memfd_create.2:139
11646 msgid "The address in I<name> points to invalid memory."
11647 msgstr "I<name> のアドレスが無効なメモリーを指している。"
11648
11649 #. type: Plain text
11650 #: build/C/man2/memfd_create.2:146
11651 msgid ""
11652 "An unsupported value was specified in one of the arguments: I<flags> "
11653 "included unknown bits, or I<name> was too long."
11654 msgstr ""
11655 "サポートされていない値がいずれかの引き数で指定された。 I<flags> に未知のビッ"
11656 "トが含まれていたか、 I<name> が長過ぎた。"
11657
11658 #. type: Plain text
11659 #: build/C/man2/memfd_create.2:149
11660 msgid "The per-process limit on open file descriptors has been reached."
11661 msgstr ""
11662 "オープンされているファイルディスクリプターのプロセス単位の上限に達した。"
11663
11664 #. type: Plain text
11665 #: build/C/man2/memfd_create.2:152
11666 msgid ""
11667 "The system-wide limit on the total number of open files has been reached."
11668 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
11669
11670 #. type: Plain text
11671 #: build/C/man2/memfd_create.2:155
11672 msgid "There was insufficient memory to create a new anonymous file."
11673 msgstr "新しい無名ファイルを作成するのに十分なメモリーがなかった。"
11674
11675 #.  FIXME . When glibc support appears, update the following sentence:
11676 #. type: Plain text
11677 #: build/C/man2/memfd_create.2:161
11678 msgid ""
11679 "The B<memfd_create>()  system call first appeared in Linux 3.17.  Support in "
11680 "the GNU C library is pending."
11681 msgstr ""
11682 "B<memfd_create>() システムコールは Linux 3.17 で初めて登場した。 GNU C ライブ"
11683 "ラリでのサポートは検討中である。"
11684
11685 #. type: Plain text
11686 #: build/C/man2/memfd_create.2:165
11687 msgid "The B<memfd_create>()  system call is Linux-specific."
11688 msgstr "B<memfd_create>()  システムコールは Linux 固有である。"
11689
11690 #.  See also http://lwn.net/Articles/593918/
11691 #.  and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
11692 #. type: Plain text
11693 #: build/C/man2/memfd_create.2:178
11694 msgid ""
11695 "The B<memfd_create>()  system call provides a simple alternative to manually "
11696 "mounting a I<tmpfs> filesystem and creating and opening a file in that "
11697 "filesystem.  The primary purpose of B<memfd_create>()  is to create files "
11698 "and associated file descriptors that are used with the file-sealing APIs "
11699 "provided by B<fcntl>(2)."
11700 msgstr ""
11701 "B<memfd_create>() システムコールは、 手動で I<tmpfs> ファイルシステムをマウン"
11702 "トして、 そのファイルシステムにファイルをオープンするという操作の、 簡単な代"
11703 "替手段を提供している。 B<memfd_create>() の主な目的は、 B<fcntl>(2) が提供す"
11704 "る file-sealing API で使用できる、 ファイルとそれに関連付けられるファイルディ"
11705 "スクリプターを作成することである。"
11706
11707 #. type: Plain text
11708 #: build/C/man2/memfd_create.2:192
11709 msgid ""
11710 "The B<memfd_create>()  system call also has uses without file sealing (which "
11711 "is why file-sealing is disabled, unless explicitly requested with the "
11712 "B<MFD_ALLOW_SEALING> flag).  In particular, it can be used as an alternative "
11713 "to creating files in I<tmp> or as an alternative to using the B<open>(2)  "
11714 "B<O_TMPFILE> in cases where there is no intention to actually link the "
11715 "resulting file into the filesystem."
11716 msgstr ""
11717 "B<memfd_create>() システムコールは、 file sealing なしでも用途がある (これが"
11718 "明示的に B<MFD_ALLOW_SEALING> フラグが要求されない限り、 file-sealing が無効"
11719 "になる理由である)。 特に、 ファイルシステムに実際にファイルを残す意図がない場"
11720 "合、 I<tmp> にファイルを作成したり B<open>(2) B<O_TMPFILE> を使ったりする際の"
11721 "代替手段として使用できる。"
11722
11723 #. type: SS
11724 #: build/C/man2/memfd_create.2:192
11725 #, no-wrap
11726 msgid "File sealing"
11727 msgstr "file sealing"
11728
11729 #. type: Plain text
11730 #: build/C/man2/memfd_create.2:210
11731 msgid ""
11732 "In the absence of file sealing, processes that communicate via shared memory "
11733 "must either trust each other, or take measures to deal with the possibility "
11734 "that an untrusted peer may manipulate the shared memory region in "
11735 "problematic ways.  For example, an untrusted peer might modify the contents "
11736 "of the shared memory at any time, or shrink the shared memory region.  The "
11737 "former possibility leaves the local process vulnerable to time-of-check-to-"
11738 "time-of-use race conditions (typically dealt with by copying data from the "
11739 "shared memory region before checking and using it).  The latter possibility "
11740 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
11741 "made to access a now-nonexistent location in the shared memory region.  "
11742 "(Dealing with this possibility necessitates the use of a handler for the "
11743 "B<SIGBUS> signal.)"
11744 msgstr ""
11745 "file sealing がない場合、 共有メモリー経由で通信するプロセスは、 互いに信頼す"
11746 "るか、 信頼していない相手が共有メモリー領域を問題がある方法で操作する可能性に"
11747 "対処するための対策を講じなければならない。\n"
11748 "例えば、 信頼していない相手は、 いつでも共有メモリーの内容を変更したり、 共有"
11749 "メモリー領域を縮小したりする可能性がある。 前者の場合は、 ローカルプロセスで"
11750 "は、 データの確認時点と使用時点の競合条件の問題が起こり得る (通常はこの問題へ"
11751 "の対処は共有メモリー領域からデータをこぴーしてからデータを確認、使用すること"
11752 "である)。 後者の場合は、 ローカルプロセスでは、 共有メモリー領域の存在しなく"
11753 "なった場所にアクセスしようとした際にシグナル B<SIGBUS> が発生する可能性があ"
11754 "る (この可能性に対処するにはシグナル B<SIGBUS> に対してハンドラーを使用する必"
11755 "要がある)。"
11756
11757 #. type: Plain text
11758 #: build/C/man2/memfd_create.2:216
11759 msgid ""
11760 "Dealing with untrusted peers imposes extra complexity on code that employs "
11761 "shared memory.  Memory sealing enables that extra complexity to be "
11762 "eliminated, by allowing a process to operate secure in the knowledge that "
11763 "its peer can't modify the shared memory in an undesired fashion."
11764 msgstr ""
11765 "信頼していない相手への対処により、 共有メモリーを利用するコードに余計な複雑性"
11766 "が増すことになる。 メモリー sealing により余計な複雑性をなくすことができる。 "
11767 "相手が望まない方法で共有メモリーを変更できないことを知っていることで、 プロセ"
11768 "スは安全に動作できるようになる。"
11769
11770 #. type: Plain text
11771 #: build/C/man2/memfd_create.2:218
11772 msgid "An example of the usage of the sealing mechanism is as follows:"
11773 msgstr "sealing 機構の使い方の例は以下のとおりである。"
11774
11775 #. type: Plain text
11776 #: build/C/man2/memfd_create.2:225
11777 msgid ""
11778 "The first process creates a I<tmpfs> file using B<memfd_create>().  The call "
11779 "yields a file descriptor used in subsequent steps."
11780 msgstr ""
11781 "最初のプロセスは B<memfd_create>() を使って I<tmpfs> ファイルを作成する。 "
11782 "B<memfd_create>() はこれ以降のステップで使用するファイルディスクリプターを返"
11783 "す。"
11784
11785 #. type: Plain text
11786 #: build/C/man2/memfd_create.2:232
11787 msgid ""
11788 "The first process sizes the file created in the previous step using "
11789 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
11790 "with the desired data."
11791 msgstr ""
11792 "最初のプロセスは B<ftruncate>(2) を使って直前のステップで作成したファイルのサ"
11793 "イズを変更し、 B<mmap>(2) を使ってそのファイルをマッピングし、 共有メモリーに"
11794 "所望のデータを配置する。"
11795
11796 #. type: IP
11797 #: build/C/man2/memfd_create.2:232
11798 #, no-wrap
11799 msgid "3."
11800 msgstr "3."
11801
11802 #. type: Plain text
11803 #: build/C/man2/memfd_create.2:242
11804 msgid ""
11805 "The first process uses the B<fcntl>(2)  B<F_ADD_SEALS> operation to place "
11806 "one or more seals on the file, in order to restrict further modifications on "
11807 "the file.  (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
11808 "to first unmap the shared writable mapping created in the previous step.)"
11809 msgstr ""
11810 "最初のプロセスは、 このファイルに対する今後の変更を制限するために、 "
11811 "B<fcntl>(2) の B<F_ADD_SEALS> 操作を使って、 そのファイルに seal をいくつか設"
11812 "定する。 (seal B<F_SEAL_WRITE> を設定する場合、 直前のステップで作成した書き"
11813 "込み可能な共有マッピングをまずアンマップする必要が出てくる。)"
11814
11815 #. type: IP
11816 #: build/C/man2/memfd_create.2:242
11817 #, no-wrap
11818 msgid "4."
11819 msgstr "4."
11820
11821 #. type: Plain text
11822 #: build/C/man2/memfd_create.2:247
11823 msgid ""
11824 "A second process obtains a file descriptor for the I<tmpfs> file and maps "
11825 "it.  Among the possible ways in which this could happen are the following:"
11826 msgstr ""
11827 "二つ目のプロセスは I<tmpfs> ファイルのファイルディスクリプターを入手し、 その"
11828 "ファイルをマップする。 以下に示す方法を使用することができる。"
11829
11830 #. type: Plain text
11831 #: build/C/man2/memfd_create.2:258
11832 msgid ""
11833 "The process that called B<memfd_create>()  could transfer the resulting file "
11834 "descriptor to the second process via a UNIX domain socket (see B<unix>(7)  "
11835 "and B<cmsg>(3)).  The second process then maps the file using B<mmap>(2)."
11836 msgstr ""
11837 "B<memfd_create>() を呼び出したプロセスは、 得られたファイルディスクリプターを"
11838 "二つ目のプロセスに UNIX ドメインソケット経由で渡すことができる (B<unix>(7) "
11839 "と B<cmsg>(3) を参照)。 それから、二つ目のプロセスは B<mmap>(2) を使ってファ"
11840 "イルをマップする。"
11841
11842 #. type: Plain text
11843 #: build/C/man2/memfd_create.2:266
11844 msgid ""
11845 "The second process is created via B<fork>(2)  and thus automatically "
11846 "inherits the file descriptor and mapping.  (Note that in this case and the "
11847 "next, there is a natural trust relationship between the two processes, since "
11848 "they are running under the same user ID.  Therefore, file sealing would not "
11849 "normally be necessary.)"
11850 msgstr ""
11851 "二つ目のプロセスを B<fork>(2) を使って作成する。 そうすると、 自動的にファイ"
11852 "ルディスクリプターとマッピングが継承される。 (この方法と次の方法では、 二つの"
11853 "プロセス間で自然な信頼関係が存在することになる。 なぜなら、 二つのプロセスは"
11854 "同じユーザー ID。 の元で実行されているからである。 したがって、 file sealing "
11855 "は通常は不要であろう。)"
11856
11857 #. type: Plain text
11858 #: build/C/man2/memfd_create.2:280
11859 msgid ""
11860 "The second process opens the file I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>>, "
11861 "where I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
11862 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
11863 "returned by the call to B<memfd_create>()  in that process.  The second "
11864 "process then maps the file using B<mmap>(2)."
11865 msgstr ""
11866 "二つ目のプロセスは I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>> をオープンする。 "
11867 "I<E<lt>pidE<gt>> は最初のプロセス (B<memfd_create>() を呼び出したプロセス) "
11868 "の PID で、 I<E<lt>fdE<gt>> は最初のプロセスでの B<memfd_create>() の呼び出し"
11869 "で返されたファイルディスクリプター番号である。 それからこのファイルを "
11870 "B<mmap>(2) を使ってマッピングする。"
11871
11872 #. type: IP
11873 #: build/C/man2/memfd_create.2:281
11874 #, no-wrap
11875 msgid "5."
11876 msgstr "5."
11877
11878 #. type: Plain text
11879 #: build/C/man2/memfd_create.2:293
11880 msgid ""
11881 "The second process uses the B<fcntl>(2)  B<F_GET_SEALS> operation to "
11882 "retrieve the bit mask of seals that has been applied to the file.  This bit "
11883 "mask can be inspected in order to determine what kinds of restrictions have "
11884 "been placed on file modifications.  If desired, the second process can apply "
11885 "further seals to impose additional restrictions (so long as the "
11886 "B<F_SEAL_SEAL> seal has not yet been applied)."
11887 msgstr ""
11888 "二つ目のプロセスは B<fcntl>(2) の B<F_GET_SEALS> 操作を使って、 そのファイル"
11889 "に適用されている seal のビットマスクを取得する。 このビットマスクを調べて、 "
11890 "ファイルの変更に関してどのような制限が適用されているかを知ることができる。 "
11891 "(B<F_SEAL_SEAL> seal がそれまでに適用されていない限りは) 必要であれば、 二つ"
11892 "目のプロセスはさらに seal を設定して追加の制限をかけることができる。"
11893
11894 #. type: Plain text
11895 #: build/C/man2/memfd_create.2:297
11896 msgid ""
11897 "Below are shown two example programs that demonstrate the use of "
11898 "B<memfd_create>()  and the file sealing API."
11899 msgstr ""
11900 "以下では B<memfd_create>() と file sealing API の使用例を示すサンプルプログラ"
11901 "ムを 2 つとりあげる。"
11902
11903 #. type: Plain text
11904 #: build/C/man2/memfd_create.2:312
11905 msgid ""
11906 "The first program, I<t_memfd_create.c>, creates a I<tmpfs> file using "
11907 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
11908 "optionally places some seals on the file.  The program accepts up to three "
11909 "command-line arguments, of which the first two are required.  The first "
11910 "argument is the name to associate with the file, the second argument is the "
11911 "size to be set for the file, and the optional third is a string of "
11912 "characters that specify seals to be set on file."
11913 msgstr ""
11914 "最初のプログラム I<t_memfd_create.c> は、 B<memfd_create>() を使って "
11915 "I<tmpfs> ファイルを作成し、 そのファイルのサイズを設定し、 メモリーにマッピン"
11916 "グし、 要求された場合にはそのファイルに seal を設定する。 このプログラムは最"
11917 "大で 3 つのコマンドライン引き数を取り、 最初の 2 つは必須である。 最初の引き"
11918 "数はファイルに関連付けられる名前で、 2 番目の引き数はファイルに設定されるサイ"
11919 "ズである。 省略可能な 3 番目の引き数は、 このファイルに設定する seal を指定す"
11920 "る文字列である。"
11921
11922 #. type: Plain text
11923 #: build/C/man2/memfd_create.2:318
11924 msgid ""
11925 "The second program, I<t_get_seals.c>, can be used to open an existing file "
11926 "that was created via B<memfd_create>()  and inspect the set of seals that "
11927 "have been applied to that file."
11928 msgstr ""
11929 "2 つめのプログラム I<t_get_seals.c> を使うと、 B<memfd_create>() を使って作成"
11930 "された既存のファイルをオープンし、 そのファイルに適用されている seal の集合を"
11931 "調査できる。"
11932
11933 #. type: Plain text
11934 #: build/C/man2/memfd_create.2:323
11935 msgid ""
11936 "The following shell session demonstrates the use of these programs.  First "
11937 "we create a I<tmpfs> file and set some seals on it:"
11938 msgstr ""
11939 "以下のシェルのセッションはこれらのプログラムの使用例を示したものである。 ま"
11940 "ず I<tmpfs> ファイルを作成し、そのファイルに seal をいくつか設定している。"
11941
11942 #. type: Plain text
11943 #: build/C/man2/memfd_create.2:329
11944 #, no-wrap
11945 msgid ""
11946 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11947 "[1] 11775\n"
11948 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11949 msgstr ""
11950 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11951 "[1] 11775\n"
11952 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11953
11954 #. type: Plain text
11955 #: build/C/man2/memfd_create.2:347
11956 msgid ""
11957 "At this point, the I<t_memfd_create> program continues to run in the "
11958 "background.  From another program, we can obtain a file descriptor for the "
11959 "file created by B<memfd_create>()  by opening the I</proc/PID/fd> file that "
11960 "corresponds to the descriptor opened by B<memfd_create>().  Using that "
11961 "pathname, we inspect the content of the I</proc/PID/fd> symbolic link, and "
11962 "use our I<t_get_seals> program to view the seals that have been placed on "
11963 "the file:"
11964 msgstr ""
11965 "この時点では、 I<t_memfd_create> プログラムはバックグラウンドで動作し続け"
11966 "る。 もう一つのプログラムから、 B<memfd_create>() がオープンしたディスクリプ"
11967 "ターに対応する I</proc/PID/fd> ファイルをオープンすることで、 "
11968 "B<memfd_create>() で作成されたファイルのファイルディスクリプターを取得でき"
11969 "る。\n"
11970 "そのパス名を使って、 I</proc/PID/fd> シンボリックリンクの内容を調査し、 "
11971 "I<t_get_seals> プログラムを使ってそのファイルに設定されている seal を見ること"
11972 "ができる。"
11973
11974 #. type: Plain text
11975 #: build/C/man2/memfd_create.2:354
11976 #, no-wrap
11977 msgid ""
11978 "$ B<readlink /proc/11775/fd/3>\n"
11979 "/memfd:my_memfd_file (deleted)\n"
11980 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11981 "Existing seals: WRITE SHRINK\n"
11982 msgstr ""
11983 "$ B<readlink /proc/11775/fd/3>\n"
11984 "/memfd:my_memfd_file (deleted)\n"
11985 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11986 "Existing seals: WRITE SHRINK\n"
11987
11988 #. type: SS
11989 #: build/C/man2/memfd_create.2:356
11990 #, no-wrap
11991 msgid "Program source: t_memfd_create.c"
11992 msgstr "プログラムのソース: t_memfd_create.c"
11993
11994 #. type: Plain text
11995 #: build/C/man2/memfd_create.2:365
11996 #, no-wrap
11997 msgid ""
11998 "#include E<lt>sys/memfd.hE<gt>\n"
11999 "#include E<lt>fcntl.hE<gt>\n"
12000 "#include E<lt>stdlib.hE<gt>\n"
12001 "#include E<lt>unistd.hE<gt>\n"
12002 "#include E<lt>string.hE<gt>\n"
12003 "#include E<lt>stdio.hE<gt>\n"
12004 msgstr ""
12005 "#include E<lt>sys/memfd.hE<gt>\n"
12006 "#include E<lt>fcntl.hE<gt>\n"
12007 "#include E<lt>stdlib.hE<gt>\n"
12008 "#include E<lt>unistd.hE<gt>\n"
12009 "#include E<lt>string.hE<gt>\n"
12010 "#include E<lt>stdio.hE<gt>\n"
12011
12012 #. type: Plain text
12013 #: build/C/man2/memfd_create.2:377
12014 #, no-wrap
12015 msgid ""
12016 "int\n"
12017 "main(int argc, char *argv[])\n"
12018 "{\n"
12019 "    int fd;\n"
12020 "    unsigned int seals;\n"
12021 "    char *addr;\n"
12022 "    char *name, *seals_arg;\n"
12023 "    ssize_t len;\n"
12024 msgstr ""
12025 "int\n"
12026 "main(int argc, char *argv[])\n"
12027 "{\n"
12028 "    int fd;\n"
12029 "    unsigned int seals;\n"
12030 "    char *addr;\n"
12031 "    char *name, *seals_arg;\n"
12032 "    ssize_t len;\n"
12033
12034 #. type: Plain text
12035 #: build/C/man2/memfd_create.2:388
12036 #, no-wrap
12037 msgid ""
12038 "    if (argc E<lt> 3) {\n"
12039 "        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12040 "        fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12041 "                \"following characters:\\en\");\n"
12042 "        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12043 "        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12044 "        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12045 "        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12046 "        exit(EXIT_FAILURE);\n"
12047 "    }\n"
12048 msgstr ""
12049 "    if (argc E<lt> 3) {\n"
12050 "        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12051 "        fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12052 "                \"following characters:\\en\");\n"
12053 "        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12054 "        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12055 "        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12056 "        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12057 "        exit(EXIT_FAILURE);\n"
12058 "    }\n"
12059
12060 #. type: Plain text
12061 #: build/C/man2/memfd_create.2:392
12062 #, no-wrap
12063 msgid ""
12064 "    name = argv[1];\n"
12065 "    len = atoi(argv[2]);\n"
12066 "    seals_arg = argv[3];\n"
12067 msgstr ""
12068 "    name = argv[1];\n"
12069 "    len = atoi(argv[2]);\n"
12070 "    seals_arg = argv[3];\n"
12071
12072 #. type: Plain text
12073 #: build/C/man2/memfd_create.2:395
12074 #, no-wrap
12075 msgid ""
12076 "    /* Create an anonymous file in tmpfs; allow seals to be\n"
12077 "       placed on the file */\n"
12078 msgstr ""
12079 "    /* Create an anonymous file in tmpfs; allow seals to be\n"
12080 "       placed on the file */\n"
12081
12082 #. type: Plain text
12083 #: build/C/man2/memfd_create.2:399
12084 #, no-wrap
12085 msgid ""
12086 "    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12087 "    if (fd == -1)\n"
12088 "        errExit(\"memfd_create\");\n"
12089 msgstr ""
12090 "    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12091 "    if (fd == -1)\n"
12092 "        errExit(\"memfd_create\");\n"
12093
12094 #. type: Plain text
12095 #: build/C/man2/memfd_create.2:401
12096 #, no-wrap
12097 msgid "    /* Size the file as specified on the command line */\n"
12098 msgstr "    /* Size the file as specified on the command line */\n"
12099
12100 #. type: Plain text
12101 #: build/C/man2/memfd_create.2:404
12102 #, no-wrap
12103 msgid ""
12104 "    if (ftruncate(fd, len) == -1)\n"
12105 "        errExit(\"truncate\");\n"
12106 msgstr ""
12107 "    if (ftruncate(fd, len) == -1)\n"
12108 "        errExit(\"truncate\");\n"
12109
12110 #. type: Plain text
12111 #: build/C/man2/memfd_create.2:407
12112 #, no-wrap
12113 msgid ""
12114 "    printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12115 "            (long) getpid(), fd, (long) getpid(), fd);\n"
12116 msgstr ""
12117 "    printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12118 "            (long) getpid(), fd, (long) getpid(), fd);\n"
12119
12120 #. type: Plain text
12121 #: build/C/man2/memfd_create.2:410
12122 #, no-wrap
12123 msgid ""
12124 "    /* Code to map the file and populate the mapping with data\n"
12125 "       omitted */\n"
12126 msgstr ""
12127 "    /* Code to map the file and populate the mapping with data\n"
12128 "       omitted */\n"
12129
12130 #. type: Plain text
12131 #: build/C/man2/memfd_create.2:413
12132 #, no-wrap
12133 msgid ""
12134 "    /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12135 "       seals on the file */\n"
12136 msgstr ""
12137 "    /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12138 "       seals on the file */\n"
12139
12140 #. type: Plain text
12141 #: build/C/man2/memfd_create.2:416
12142 #, no-wrap
12143 msgid ""
12144 "    if (seals_arg != NULL) {\n"
12145 "        seals = 0;\n"
12146 msgstr ""
12147 "    if (seals_arg != NULL) {\n"
12148 "        seals = 0;\n"
12149
12150 #. type: Plain text
12151 #: build/C/man2/memfd_create.2:425
12152 #, no-wrap
12153 msgid ""
12154 "        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12155 "            seals |= F_SEAL_GROW;\n"
12156 "        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12157 "            seals |= F_SEAL_SHRINK;\n"
12158 "        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12159 "            seals |= F_SEAL_WRITE;\n"
12160 "        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12161 "            seals |= F_SEAL_SEAL;\n"
12162 msgstr ""
12163 "        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12164 "            seals |= F_SEAL_GROW;\n"
12165 "        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12166 "            seals |= F_SEAL_SHRINK;\n"
12167 "        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12168 "            seals |= F_SEAL_WRITE;\n"
12169 "        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12170 "            seals |= F_SEAL_SEAL;\n"
12171
12172 #. type: Plain text
12173 #: build/C/man2/memfd_create.2:429
12174 #, no-wrap
12175 msgid ""
12176 "        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12177 "            errExit(\"fcntl\");\n"
12178 "    }\n"
12179 msgstr ""
12180 "        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12181 "            errExit(\"fcntl\");\n"
12182 "    }\n"
12183
12184 #. type: Plain text
12185 #: build/C/man2/memfd_create.2:432
12186 #, no-wrap
12187 msgid ""
12188 "    /* Keep running, so that the file created by memfd_create()\n"
12189 "       continues to exist */\n"
12190 msgstr ""
12191 "    /* Keep running, so that the file created by memfd_create()\n"
12192 "       continues to exist */\n"
12193
12194 #. type: Plain text
12195 #: build/C/man2/memfd_create.2:434
12196 #, no-wrap
12197 msgid "    pause();\n"
12198 msgstr "    pause();\n"
12199
12200 #. type: SS
12201 #: build/C/man2/memfd_create.2:438
12202 #, no-wrap
12203 msgid "Program source: t_get_seals.c"
12204 msgstr "プログラムのソース: t_get_seals.c"
12205
12206 #. type: Plain text
12207 #: build/C/man2/memfd_create.2:447
12208 #, no-wrap
12209 msgid ""
12210 "#include E<lt>sys/memfd.hE<gt>\n"
12211 "#include E<lt>fcntl.hE<gt>\n"
12212 "#include E<lt>unistd.hE<gt>\n"
12213 "#include E<lt>stdlib.hE<gt>\n"
12214 "#include E<lt>string.hE<gt>\n"
12215 "#include E<lt>stdio.hE<gt>\n"
12216 msgstr ""
12217 "#include E<lt>sys/memfd.hE<gt>\n"
12218 "#include E<lt>fcntl.hE<gt>\n"
12219 "#include E<lt>unistd.hE<gt>\n"
12220 "#include E<lt>stdlib.hE<gt>\n"
12221 "#include E<lt>string.hE<gt>\n"
12222 "#include E<lt>stdio.hE<gt>\n"
12223
12224 #. type: Plain text
12225 #: build/C/man2/memfd_create.2:456
12226 #, no-wrap
12227 msgid ""
12228 "int\n"
12229 "main(int argc, char *argv[])\n"
12230 "{\n"
12231 "    int fd;\n"
12232 "    unsigned int seals;\n"
12233 msgstr ""
12234 "int\n"
12235 "main(int argc, char *argv[])\n"
12236 "{\n"
12237 "    int fd;\n"
12238 "    unsigned int seals;\n"
12239
12240 #. type: Plain text
12241 #: build/C/man2/memfd_create.2:461
12242 #, no-wrap
12243 msgid ""
12244 "    if (argc != 2) {\n"
12245 "        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12246 "        exit(EXIT_FAILURE);\n"
12247 "    }\n"
12248 msgstr ""
12249 "    if (argc != 2) {\n"
12250 "        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12251 "        exit(EXIT_FAILURE);\n"
12252 "    }\n"
12253
12254 #. type: Plain text
12255 #: build/C/man2/memfd_create.2:465
12256 #, no-wrap
12257 msgid ""
12258 "    fd = open(argv[1], O_RDWR);\n"
12259 "    if (fd == -1)\n"
12260 "        errExit(\"open\");\n"
12261 msgstr ""
12262 "    fd = open(argv[1], O_RDWR);\n"
12263 "    if (fd == -1)\n"
12264 "        errExit(\"open\");\n"
12265
12266 #. type: Plain text
12267 #: build/C/man2/memfd_create.2:469
12268 #, no-wrap
12269 msgid ""
12270 "    seals = fcntl(fd, F_GET_SEALS);\n"
12271 "    if (seals == -1)\n"
12272 "        errExit(\"fcntl\");\n"
12273 msgstr ""
12274 "    seals = fcntl(fd, F_GET_SEALS);\n"
12275 "    if (seals == -1)\n"
12276 "        errExit(\"fcntl\");\n"
12277
12278 #. type: Plain text
12279 #: build/C/man2/memfd_create.2:480
12280 #, no-wrap
12281 msgid ""
12282 "    printf(\"Existing seals:\");\n"
12283 "    if (seals & F_SEAL_SEAL)\n"
12284 "        printf(\" SEAL\");\n"
12285 "    if (seals & F_SEAL_GROW)\n"
12286 "        printf(\" GROW\");\n"
12287 "    if (seals & F_SEAL_WRITE)\n"
12288 "        printf(\" WRITE\");\n"
12289 "    if (seals & F_SEAL_SHRINK)\n"
12290 "        printf(\" SHRINK\");\n"
12291 "    printf(\"\\en\");\n"
12292 msgstr ""
12293 "    printf(\"Existing seals:\");\n"
12294 "    if (seals & F_SEAL_SEAL)\n"
12295 "        printf(\" SEAL\");\n"
12296 "    if (seals & F_SEAL_GROW)\n"
12297 "        printf(\" GROW\");\n"
12298 "    if (seals & F_SEAL_WRITE)\n"
12299 "        printf(\" WRITE\");\n"
12300 "    if (seals & F_SEAL_SHRINK)\n"
12301 "        printf(\" SHRINK\");\n"
12302 "    printf(\"\\en\");\n"
12303
12304 #. type: Plain text
12305 #: build/C/man2/memfd_create.2:483
12306 #, no-wrap
12307 msgid ""
12308 "    /* Code to map the file and access the contents of the\n"
12309 "       resulting mapping omitted */\n"
12310 msgstr ""
12311 "    /* Code to map the file and access the contents of the\n"
12312 "       resulting mapping omitted */\n"
12313
12314 #. type: Plain text
12315 #: build/C/man2/memfd_create.2:493
12316 msgid "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12317 msgstr "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12318
12319 #. type: TH
12320 #: build/C/man2/s390_pci_mmio_write.2:25
12321 #, no-wrap
12322 msgid "S390_PCI_MMIO_WRITE"
12323 msgstr "S390_PCI_MMIO_WRITE"
12324
12325 #. type: TH
12326 #: build/C/man2/s390_pci_mmio_write.2:25
12327 #, no-wrap
12328 msgid "2015-01-15"
12329 msgstr "2015-01-15"
12330
12331 #. type: Plain text
12332 #: build/C/man2/s390_pci_mmio_write.2:29
12333 msgid ""
12334 "s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO "
12335 "memory page"
12336 msgstr ""
12337
12338 #. type: Plain text
12339 #: build/C/man2/s390_pci_mmio_write.2:32
12340 #, no-wrap
12341 msgid "B<#include E<lt>asm/unistd.hE<gt>>\n"
12342 msgstr "B<#include E<lt>asm/unistd.hE<gt>>\n"
12343
12344 #. type: Plain text
12345 #: build/C/man2/s390_pci_mmio_write.2:35
12346 #, no-wrap
12347 msgid ""
12348 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12349 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12350 msgstr ""
12351 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12352 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12353
12354 #. type: Plain text
12355 #: build/C/man2/s390_pci_mmio_write.2:38
12356 #, no-wrap
12357 msgid ""
12358 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12359 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12360 msgstr ""
12361 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12362 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12363
12364 #. type: Plain text
12365 #: build/C/man2/s390_pci_mmio_write.2:57
12366 msgid ""
12367 "The B<s390_pci_mmio_write>()  system call writes I<length> bytes of data "
12368 "from the user-space buffer I<user_buffer> to the PCI MMIO memory location "
12369 "specified by I<mmio_addr>.  The B<s390_pci_mmio_read>()  system call reads "
12370 "I<length> bytes of data from the PCI MMIO memory location specified by "
12371 "I<mmio_addr> to the user-space buffer I<user_buffer>."
12372 msgstr ""
12373
12374 #. type: Plain text
12375 #: build/C/man2/s390_pci_mmio_write.2:68
12376 msgid ""
12377 "These system calls must be used instead of the simple assignment or data-"
12378 "transfer operations that are used to access the PCI MMIO memory areas mapped "
12379 "to user space on the Linux System z platform.  The address specified by "
12380 "I<mmio_addr> must belong to a PCI MMIO memory page mapping in the caller's "
12381 "address space, and the data being written or read must not cross a page "
12382 "boundary.  The I<length> value cannot be greater than the system page size."
12383 msgstr ""
12384
12385 #. type: Plain text
12386 #: build/C/man2/s390_pci_mmio_write.2:77
12387 msgid ""
12388 "On success, B<s390_pci_mmio_write>()  and B<s390_pci_mmio_read>()  return "
12389 "0.  On error, -1 is returned and I<errno> is set to one of the error codes "
12390 "listed below."
12391 msgstr ""
12392 "成功すると、 B<s390_pci_mmio_write>() と B<s390_pci_mmio_read>() は 0 を返"
12393 "す。 エラーの場合、-1 を返し、 I<errno> に以下のリストにあるエラーコードのい"
12394 "ずれかを設定する。"
12395
12396 #. type: Plain text
12397 #: build/C/man2/s390_pci_mmio_write.2:83
12398 msgid "The address in I<mmio_addr> is invalid."
12399 msgstr ""
12400
12401 #. type: Plain text
12402 #: build/C/man2/s390_pci_mmio_write.2:87
12403 msgid ""
12404 "I<user_buffer> does not point to a valid location in the caller's address "
12405 "space."
12406 msgstr ""
12407
12408 #. type: Plain text
12409 #: build/C/man2/s390_pci_mmio_write.2:92
12410 msgid "Invalid I<length> argument."
12411 msgstr ""
12412
12413 #. type: Plain text
12414 #: build/C/man2/s390_pci_mmio_write.2:95
12415 msgid "PCI support is not enabled."
12416 msgstr ""
12417
12418 #. type: Plain text
12419 #: build/C/man2/s390_pci_mmio_write.2:98
12420 msgid "Insufficient memory."
12421 msgstr ""
12422
12423 #. type: Plain text
12424 #: build/C/man2/s390_pci_mmio_write.2:100
12425 msgid "These system calls are available since Linux 3.19."
12426 msgstr "これらのシステムコールは Linux 3.19 以降で使用可能である。"
12427
12428 #. type: Plain text
12429 #: build/C/man2/s390_pci_mmio_write.2:103
12430 msgid ""
12431 "This Linux-specific system call is available only on the s390 architecture.  "
12432 "The required PCI support is available beginning with System z EC12."
12433 msgstr ""
12434
12435 #. type: Plain text
12436 #: build/C/man2/s390_pci_mmio_write.2:107
12437 msgid ""
12438 "Glibc does not provide a wrapper for this system call, use B<syscall>(2)  to "
12439 "call it."
12440 msgstr ""
12441
12442 #. type: Plain text
12443 #: build/C/man2/s390_pci_mmio_write.2:109
12444 msgid "B<syscall>(2)"
12445 msgstr "B<syscall>(2)"
12446
12447 #~ msgid "System-wide limit on the number of pages of shared memory."
12448 #~ msgstr "共有メモリーのページ数のシステム全体での上限値。"
12449
12450 #~ msgid ""
12451 #~ "Segment low boundary address multiple.  Must be page aligned.  For the "
12452 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
12453 #~ msgstr ""
12454 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
12455 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
12456
12457 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
12458 #~ msgstr ""
12459 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
12460
12461 #~ msgid ""
12462 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
12463 #~ "2^20 (2,097,152)."
12464 #~ msgstr ""
12465 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
12466 #~ "(2,097,152) になる。"
12467
12468 #~ msgid ""
12469 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
12470 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
12471 #~ "shmmax>)."
12472 #~ msgstr ""
12473 #~ "共有メモリーセグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
12474 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
12475 #~ "る)。"
12476
12477 #~ msgid ""
12478 #~ "System wide maximum number of shared memory segments: implementation "
12479 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
12480 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
12481 #~ msgstr ""
12482 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
12483 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
12484 #~ "で参照したり、変更したりできる)。"
12485
12486 #~ msgid ""
12487 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
12488 #~ msgstr ""
12489 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
12490 #~ "-1 が返される。"
12491
12492 #~ msgid ""
12493 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
12494 #~ "pair of registers.  On this architecture, the call signature of "
12495 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
12496 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
12497 #~ "2.6.14, ARM defines a different system call that orders the arguments "
12498 #~ "suitably:"
12499 #~ msgstr ""
12500 #~ "ARM アーキテクチャーでは、64 ビットの引き数は適切なレジスターの組に割り当"
12501 #~ "て\n"
12502 #~ "る必要がある。このアーキテクチャーでは、B<posix_fadvise>() の呼び出し方"
12503 #~ "に\n"
12504 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
12505 #~ "パディング (詰めもの) でレジスターが一つ消費されてしまうというものであ"
12506 #~ "る。\n"
12507 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
12508 #~ "システムコールが定義されている。"
12509
12510 #~ msgid ""
12511 #~ "The behavior of this system call is otherwise exactly the same as "
12512 #~ "B<posix_fadvise>().  No library support is provided for this system call "
12513 #~ "in glibc."
12514 #~ msgstr ""
12515 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
12516 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
12517 #~ "では提供されていない。"
12518
12519 #~ msgid ""
12520 #~ "The I<mode> is not supported by the file system containing the file "
12521 #~ "referred to by I<fd>."
12522 #~ msgstr ""
12523 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
12524 #~ "ない。"
12525
12526 #~ msgid ""
12527 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
12528 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
12529 #~ "these handlers."
12530 #~ msgstr ""
12531 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンド"
12532 #~ "ラーを組み込む。 関数 B<muntrace>()  はこれらのハンドラーを解除する。"
12533
12534 #~ msgid ""
12535 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
12536 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
12537 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
12538 #~ "truncated."
12539 #~ msgstr ""
12540 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
12541 #~ "る。 ユーザーが書き込み権限を持つファイルを指定しなければならない。 書き込"
12542 #~ "み権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、"
12543 #~ "ファイルの元の内容を上書きする。"
12544
12545 #~ msgid ""
12546 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
12547 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
12548 #~ msgstr ""
12549 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
12550 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
12551 #~ "リプトが付属している。"
12552
12553 #~ msgid ""
12554 #~ "This flag allocates and initializes to zero the disk space within the "
12555 #~ "range specified by I<offset> and I<len>.  After a successful call, "
12556 #~ "subsequent writes into this range are guaranteed not to fail because of "
12557 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
12558 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
12559 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
12560 #~ "less than I<offset>+I<len>."
12561 #~ msgstr ""
12562 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
12563 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
12564 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
12565 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
12566 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
12567 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
12568 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
12569 #~ "は変更されることはない。"