OSDN Git Service

Update README
[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-02-05 00:03+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 msgid ""
442 "This page is part of release 3.79 of the Linux I<man-pages> project.  A "
443 "description of the project, information about reporting bugs, and the latest "
444 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
445 "pages/."
446 msgstr ""
447 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.79 の一部\n"
448 "である。プロジェクトの説明とバグ報告に関する情報は\n"
449 "http://www.kernel.org/doc/man-pages/ に書かれている。"
450
451 #. type: TH
452 #: build/C/man3/alloca.3:43
453 #, no-wrap
454 msgid "ALLOCA"
455 msgstr "ALLOCA"
456
457 #. type: TH
458 #: build/C/man3/alloca.3:43
459 #, no-wrap
460 msgid "2013-10-07"
461 msgstr "2013-10-07"
462
463 #. type: TH
464 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
465 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
466 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
467 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
468 #: build/C/man3/posix_memalign.3:29
469 #, no-wrap
470 msgid "GNU"
471 msgstr "GNU"
472
473 #. type: Plain text
474 #: build/C/man3/alloca.3:46
475 msgid "alloca - allocate memory that is automatically freed"
476 msgstr "alloca - 自動的に解放されるメモリーを割り当てる"
477
478 #. type: Plain text
479 #: build/C/man3/alloca.3:48
480 msgid "B<#include E<lt>alloca.hE<gt>>"
481 msgstr "B<#include E<lt>alloca.hE<gt>>"
482
483 #. type: Plain text
484 #: build/C/man3/alloca.3:50
485 msgid "B<void *alloca(size_t >I<size>B<);>"
486 msgstr "B<void *alloca(size_t >I<size>B<);>"
487
488 #. type: Plain text
489 #: build/C/man3/alloca.3:60
490 msgid ""
491 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
492 "frame of the caller.  This temporary space is automatically freed when the "
493 "function that called B<alloca>()  returns to its caller."
494 msgstr ""
495 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタックフレームに割り付"
496 "ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るときに"
497 "自動的に解放される。"
498
499 #. type: Plain text
500 #: build/C/man3/alloca.3:65
501 msgid ""
502 "The B<alloca>()  function returns a pointer to the beginning of the "
503 "allocated space.  If the allocation causes stack overflow, program behavior "
504 "is undefined."
505 msgstr ""
506 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインターを返す。 割り付け"
507 "によってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
508 "い。"
509
510 #. type: SH
511 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
512 #: build/C/man3/posix_fallocate.3:103
513 #, no-wrap
514 msgid "ATTRIBUTES"
515 msgstr "属性"
516
517 #. type: SS
518 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
519 #: build/C/man3/posix_fallocate.3:104
520 #, no-wrap
521 msgid "Multithreading (see pthreads(7))"
522 msgstr "マルチスレッディング (pthreads(7) 参照)"
523
524 #. type: Plain text
525 #: build/C/man3/alloca.3:70
526 msgid "The B<alloca>()  function is thread-safe."
527 msgstr "B<alloca>() 関数はスレッドセーフである。"
528
529 #. type: Plain text
530 #: build/C/man3/alloca.3:72
531 msgid "This function is not in POSIX.1-2001."
532 msgstr "この関数は POSIX.1-2001 にはない。"
533
534 #. type: Plain text
535 #: build/C/man3/alloca.3:78
536 msgid ""
537 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
538 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
539 "the GNU version."
540 msgstr ""
541 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
542 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
543 "は POSIX.1-2001 にはない。"
544
545 #. type: Plain text
546 #: build/C/man3/alloca.3:93
547 msgid ""
548 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
549 "applications, its use can improve efficiency compared to the use of "
550 "B<malloc>(3)  plus B<free>(3).  In certain cases, it can also simplify "
551 "memory deallocation in applications that use B<longjmp>(3)  or "
552 "B<siglongjmp>(3).  Otherwise, its use is discouraged."
553 msgstr ""
554 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
555 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
556 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
557 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリーの開放"
558 "を簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
559
560 #. type: Plain text
561 #: build/C/man3/alloca.3:102
562 msgid ""
563 "Because the space allocated by B<alloca>()  is allocated within the stack "
564 "frame, that space is automatically freed if the function return is jumped "
565 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
566 msgstr ""
567 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
568 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
569 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
570
571 #. type: Plain text
572 #: build/C/man3/alloca.3:107
573 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
574 msgstr ""
575 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
576 "に!"
577
578 #. type: SS
579 #: build/C/man3/alloca.3:107
580 #, no-wrap
581 msgid "Notes on the GNU version"
582 msgstr "GNU 版についての注意"
583
584 #. type: Plain text
585 #: build/C/man3/alloca.3:129
586 msgid ""
587 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
588 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
589 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
590 "included.  Otherwise, (without an -ansi or -std=c* option) the glibc version "
591 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
592 "the lines:"
593 msgstr ""
594 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
595 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
596 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
597 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
598 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
599 "インクルードするが、このファイルには以下の行が含まれており、"
600
601 #. type: Plain text
602 #: build/C/man3/alloca.3:134
603 #, no-wrap
604 msgid ""
605 "    #ifdef  __GNUC__\n"
606 "    #define alloca(size)   __builtin_alloca (size)\n"
607 "    #endif\n"
608 msgstr ""
609 "    #ifdef  __GNUC__\n"
610 "    #define alloca(size)   __builtin_alloca (size)\n"
611 "    #endif\n"
612
613 #. type: Plain text
614 #: build/C/man3/alloca.3:137
615 msgid "with messy consequences if one has a private version of this function."
616 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
617
618 #. type: Plain text
619 #: build/C/man3/alloca.3:141
620 msgid ""
621 "The fact that the code is inlined means that it is impossible to take the "
622 "address of this function, or to change its behavior by linking with a "
623 "different library."
624 msgstr ""
625 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
626 "のライブラリをリンクして動作を変更することはできない。"
627
628 #. type: Plain text
629 #: build/C/man3/alloca.3:145
630 msgid ""
631 "The inlined code often consists of a single instruction adjusting the stack "
632 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
633 "error return."
634 msgstr ""
635 "通常このインラインコードはスタックポインターを移動する 1 つの命令 "
636 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
637 "よって NULL エラーが返されることはない。"
638
639 #. type: SH
640 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
641 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
642 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:590 build/C/man3/mtrace.3:102
643 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
644 #: build/C/man2/shmget.2:376
645 #, no-wrap
646 msgid "BUGS"
647 msgstr "バグ"
648
649 #. type: Plain text
650 #: build/C/man3/alloca.3:150
651 msgid ""
652 "There is no error indication if the stack frame cannot be extended.  "
653 "(However, after a failed allocation, the program is likely to receive a "
654 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
655 msgstr ""
656 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
657 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
658 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
659
660 #. type: Plain text
661 #: build/C/man3/alloca.3:158
662 msgid ""
663 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
664 "a function call, because the stack space reserved by B<alloca>()  would "
665 "appear on the stack in the middle of the space for the function arguments."
666 msgstr ""
667 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
668 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
669 "使われるスタック領域の中に現れてしまうためである。"
670
671 #. type: SH
672 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:378
673 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
674 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
675 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
676 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
677 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
678 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:715 build/C/man2/mmap2.2:95
679 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
680 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
681 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:138
682 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
683 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
684 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
685 #: build/C/man2/shmget.2:382 build/C/man2/shmop.2:293
686 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
687 #: build/C/man2/memfd_create.2:487 build/C/man2/s390_pci_mmio_write.2:107
688 #, no-wrap
689 msgid "SEE ALSO"
690 msgstr "関連項目"
691
692 #. type: Plain text
693 #: build/C/man3/alloca.3:162
694 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
695 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
696
697 #. type: TH
698 #: build/C/man2/cacheflush.2:25
699 #, no-wrap
700 msgid "CACHEFLUSH"
701 msgstr "CACHEFLUSH"
702
703 #. type: TH
704 #: build/C/man2/cacheflush.2:25
705 #, no-wrap
706 msgid "2007-05-26"
707 msgstr "2007-05-26"
708
709 #. type: Plain text
710 #: build/C/man2/cacheflush.2:28
711 msgid "cacheflush - flush contents of instruction and/or data cache"
712 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
713
714 #. type: Plain text
715 #: build/C/man2/cacheflush.2:31
716 #, no-wrap
717 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
718 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
719
720 #. type: Plain text
721 #: build/C/man2/cacheflush.2:33
722 #, no-wrap
723 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
724 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
725
726 #. type: Plain text
727 #: build/C/man2/cacheflush.2:43
728 msgid ""
729 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
730 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
731 "of:"
732 msgstr ""
733 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザーアドレス"
734 "に対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれか"
735 "を指定する:"
736
737 #. type: TP
738 #: build/C/man2/cacheflush.2:43
739 #, no-wrap
740 msgid "B<ICACHE>"
741 msgstr "B<ICACHE>"
742
743 #. type: Plain text
744 #: build/C/man2/cacheflush.2:46
745 msgid "Flush the instruction cache."
746 msgstr "命令 (instruction) キャッシュをフラッシュする。"
747
748 #. type: TP
749 #: build/C/man2/cacheflush.2:46
750 #, no-wrap
751 msgid "B<DCACHE>"
752 msgstr "B<DCACHE>"
753
754 #. type: Plain text
755 #: build/C/man2/cacheflush.2:49
756 msgid "Write back to memory and invalidate the affected valid cache lines."
757 msgstr "変更があったキャッシュラインをメモリーに書き戻し、無効にする。"
758
759 #. type: TP
760 #: build/C/man2/cacheflush.2:49
761 #, no-wrap
762 msgid "B<BCACHE>"
763 msgstr "B<BCACHE>"
764
765 #. type: Plain text
766 #: build/C/man2/cacheflush.2:53
767 msgid "Same as B<(ICACHE|DCACHE)>."
768 msgstr "B<(ICACHE|DCACHE)> と同じ。"
769
770 #. type: Plain text
771 #: build/C/man2/cacheflush.2:59
772 msgid ""
773 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
774 "detected, I<errno> will indicate the error."
775 msgstr ""
776 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
777 "出された場合は I<errno> にエラーが指示される。"
778
779 #. type: TP
780 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
781 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
782 #: build/C/man2/subpage_prot.2:72 build/C/man2/memfd_create.2:134
783 #: build/C/man2/s390_pci_mmio_write.2:78 build/C/man2/s390_pci_mmio_write.2:83
784 #, no-wrap
785 msgid "B<EFAULT>"
786 msgstr "B<EFAULT>"
787
788 #. type: Plain text
789 #: build/C/man2/cacheflush.2:67
790 msgid ""
791 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
792 "accessible."
793 msgstr ""
794 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
795 "能ではない。"
796
797 #. type: TP
798 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
799 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
800 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
801 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
802 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
803 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
804 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
805 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
806 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
807 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
808 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
809 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
810 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
811 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
812 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
813 #: build/C/man2/memfd_create.2:139 build/C/man2/s390_pci_mmio_write.2:87
814 #, no-wrap
815 msgid "B<EINVAL>"
816 msgstr "B<EINVAL>"
817
818 #. type: Plain text
819 #: build/C/man2/cacheflush.2:75
820 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
821 msgstr ""
822 "I<cache> パラメーターが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
823
824 #.  FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
825 #.  but by now it is on a number of other architectures (but not i386).
826 #.  Investigate the details and update this page.
827 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
828 #. type: Plain text
829 #: build/C/man2/cacheflush.2:82
830 msgid ""
831 "This Linux-specific system call is available only on MIPS-based systems.  It "
832 "should not be used in programs intended to be portable."
833 msgstr ""
834 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
835 "植を意図したプログラムで使用すべきではない。"
836
837 #. type: Plain text
838 #: build/C/man2/cacheflush.2:89
839 msgid ""
840 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
841 "Therefore, the whole cache is always flushed."
842 msgstr ""
843 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
844 "のキャッシュがフラッシュされる。"
845
846 #. type: TH
847 #: build/C/man2/fallocate.2:11
848 #, no-wrap
849 msgid "FALLOCATE"
850 msgstr "FALLOCATE"
851
852 #. type: TH
853 #: build/C/man2/fallocate.2:11 build/C/man3/malloc_info.3:25
854 #: build/C/man2/mmap.2:40 build/C/man3/posix_fallocate.3:25
855 #: build/C/man3/shm_open.3:26 build/C/man2/memfd_create.2:21
856 #, no-wrap
857 msgid "2015-01-22"
858 msgstr "2015-01-22"
859
860 #. type: Plain text
861 #: build/C/man2/fallocate.2:14
862 msgid "fallocate - manipulate file space"
863 msgstr "fallocate - ファイル空間の操作"
864
865 #. type: Plain text
866 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
867 #, no-wrap
868 msgid ""
869 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
870 "B<#include E<lt>fcntl.hE<gt>>\n"
871 msgstr ""
872 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
873 "B<#include E<lt>fcntl.hE<gt>>\n"
874
875 #. type: Plain text
876 #: build/C/man2/fallocate.2:21
877 #, no-wrap
878 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
879 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
880
881 #. type: Plain text
882 #: build/C/man2/fallocate.2:27
883 msgid ""
884 "This is a nonportable, Linux-specific system call.  For the portable, "
885 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
886 "B<posix_fallocate>(3)."
887 msgstr ""
888 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
889 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
890 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
891
892 #. type: Plain text
893 #: build/C/man2/fallocate.2:37
894 msgid ""
895 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
896 "space for the file referred to by I<fd> for the byte range starting at "
897 "I<offset> and continuing for I<len> bytes."
898 msgstr ""
899 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
900 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
901 "域である。"
902
903 #. type: Plain text
904 #: build/C/man2/fallocate.2:42
905 msgid ""
906 "The I<mode> argument determines the operation to be performed on the given "
907 "range.  Details of the supported operations are given in the subsections "
908 "below."
909 msgstr ""
910 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
911 "サポートされている操作の詳細は以下のサブセクションで説明する。"
912
913 #. type: SS
914 #: build/C/man2/fallocate.2:42
915 #, no-wrap
916 msgid "Allocating disk space"
917 msgstr "ディスク領域の割り当て"
918
919 #. type: Plain text
920 #: build/C/man2/fallocate.2:65
921 msgid ""
922 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
923 "the disk space within the range specified by I<offset> and I<len>.  The file "
924 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
925 "greater than the file size.  Any subregion within the range specified by "
926 "I<offset> and I<len> that did not contain data before the call will be "
927 "initialized to zero.  This default behavior closely resembles the behavior "
928 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
929 "of optimally implementing that function."
930 msgstr ""
931 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
932 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
933 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
934 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
935 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
936 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
937 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
938 "適に実装する手段を提供することを目的としているからである。"
939
940 #. type: Plain text
941 #: build/C/man2/fallocate.2:71
942 msgid ""
943 "After a successful call, subsequent writes into the range specified by "
944 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
945 "space."
946 msgstr ""
947 "呼び出しが成功した場合、\n"
948 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
949 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
950
951 #. type: Plain text
952 #: build/C/man2/fallocate.2:82
953 msgid ""
954 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
955 "the call is similar, but the file size will not be changed even if I<offset>"
956 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
957 "the end of the file in this manner is useful for optimizing append workloads."
958 msgstr ""
959 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
960 "ル\n"
961 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
962 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
963 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
964 "追記を最適化したい場合に役に立つ。"
965
966 #. type: Plain text
967 #: build/C/man2/fallocate.2:86
968 msgid ""
969 "Because allocation is done in block size chunks, B<fallocate>()  may "
970 "allocate a larger range of disk space than was specified."
971 msgstr ""
972 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
973 "り\n"
974 "も大きなディスク領域を割り当てることがある。"
975
976 #. type: SS
977 #: build/C/man2/fallocate.2:86
978 #, no-wrap
979 msgid "Deallocating file space"
980 msgstr "ファイル空間の割り当て解除"
981
982 #. type: Plain text
983 #: build/C/man2/fallocate.2:101
984 msgid ""
985 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
986 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
987 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
988 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
989 "removed from the file.  After a successful call, subsequent reads from this "
990 "range will return zeroes."
991 msgstr ""
992 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
993 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
994 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
995 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
996 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
997 "を返す。"
998
999 #. type: Plain text
1000 #: build/C/man2/fallocate.2:112
1001 msgid ""
1002 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
1003 "I<mode>; in other words, even when punching off the end of the file, the "
1004 "file size (as reported by B<stat>(2))  does not change."
1005 msgstr ""
1006 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
1007 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
1008 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
1009
1010 #. type: Plain text
1011 #: build/C/man2/fallocate.2:117
1012 msgid ""
1013 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1014 "support the operation, an error is returned.  The operation is supported on "
1015 "at least the following filesystems:"
1016 msgstr ""
1017 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1018 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1019 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1020
1021 #. type: IP
1022 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1023 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1024 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1025 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1026 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1027 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1028 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1029 #: build/C/man2/shmop.2:80 build/C/man2/memfd_create.2:248
1030 #: build/C/man2/memfd_create.2:258 build/C/man2/memfd_create.2:266
1031 #, no-wrap
1032 msgid "*"
1033 msgstr "*"
1034
1035 #. type: Plain text
1036 #: build/C/man2/fallocate.2:119
1037 msgid "XFS (since Linux 2.6.38)"
1038 msgstr "XFS (Linux 2.6.38 以降)"
1039
1040 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1041 #. type: Plain text
1042 #: build/C/man2/fallocate.2:122
1043 msgid "ext4 (since Linux 3.0)"
1044 msgstr "ext4 (Linux 3.0 以降)"
1045
1046 #. type: Plain text
1047 #: build/C/man2/fallocate.2:124
1048 msgid "Btrfs (since Linux 3.7)"
1049 msgstr "Btrfs (Linux 3.7 以降)"
1050
1051 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1052 #. type: Plain text
1053 #: build/C/man2/fallocate.2:127
1054 msgid "tmpfs (since Linux 3.5)"
1055 msgstr "tmpfs (Linux 3.5 以降)"
1056
1057 #. type: SS
1058 #: build/C/man2/fallocate.2:127
1059 #, no-wrap
1060 msgid "Collapsing file space"
1061 msgstr "ファイル空間の一部削除"
1062
1063 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1064 #. type: Plain text
1065 #: build/C/man2/fallocate.2:147
1066 msgid ""
1067 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1068 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1069 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1070 "bytes.  At the completion of the operation, the contents of the file "
1071 "starting at the location I<offset+len> will be appended at the location "
1072 "I<offset>, and the file will be I<len> bytes smaller."
1073 msgstr ""
1074 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1075 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残さ"
1076 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1077 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1078 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1079 "くなる。"
1080
1081 #. type: Plain text
1082 #: build/C/man2/fallocate.2:161
1083 msgid ""
1084 "A filesystem may place limitations on the granularity of the operation, in "
1085 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1086 "must be a multiple of the filesystem logical block size, which varies "
1087 "according to the filesystem type and configuration.  If a filesystem has "
1088 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1089 "this requirement is violated."
1090 msgstr ""
1091 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1092 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1093 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1094 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1095 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1096
1097 #. type: Plain text
1098 #: build/C/man2/fallocate.2:170
1099 msgid ""
1100 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1101 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1102 "file."
1103 msgstr ""
1104 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1105 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1106 "B<ftruncate>(2) を使用すること。"
1107
1108 #. type: Plain text
1109 #: build/C/man2/fallocate.2:175
1110 msgid ""
1111 "No other flags may be specified in I<mode> in conjunction with "
1112 "B<FALLOC_FL_COLLAPSE_RANGE>."
1113 msgstr ""
1114 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1115 "ない。"
1116
1117 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1118 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1119 #. type: Plain text
1120 #: build/C/man2/fallocate.2:183
1121 msgid ""
1122 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1123 "extent-based files)  and XFS."
1124 msgstr ""
1125 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1126 "ファイル) と XFS でサポートされている。"
1127
1128 #. type: SS
1129 #: build/C/man2/fallocate.2:183
1130 #, no-wrap
1131 msgid "Zeroing file space"
1132 msgstr "ファイル空間のゼロ埋め"
1133
1134 #.  commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1135 #. type: Plain text
1136 #: build/C/man2/fallocate.2:199
1137 msgid ""
1138 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14)  in "
1139 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1140 "for I<len> bytes.  Within the specified range, blocks are preallocated for "
1141 "the regions that span the holes in the file.  After a successful call, "
1142 "subsequent reads from this range will return zeroes."
1143 msgstr ""
1144 "B<FALLOC_FL_ZERO_RANGE> フラグ (Linux 3.14 以降で利用可能) を I<mode> に指定"
1145 "すると、 I<offset> で始まる I<len> バイト範囲の空間をゼロ埋めする。 指定され"
1146 "た範囲の中では、ブロックは、そのファイル内のホールが広がる領域にあらかじめ割"
1147 "り当てられたものである。 呼び出しが成功すると、 これ以降のこの範囲からの読み"
1148 "出しでは 0 を返す。"
1149
1150 #. type: Plain text
1151 #: build/C/man2/fallocate.2:205
1152 msgid ""
1153 "Zeroing is done within the filesystem preferably by converting the range "
1154 "into unwritten extents.  This approach means that the specified range will "
1155 "not be physically zeroed out on the device (except for partial blocks at the "
1156 "either end of the range), and I/O is (otherwise) required only to update "
1157 "metadata."
1158 msgstr ""
1159 "ゼロ埋めは、ファイルシステム内部では、指定された範囲を書き込みを伴わないエク"
1160 "ステントに変換する方法をできるだけ使って行われる。 この方法は、指定された範囲"
1161 "について物理的にゼロ埋めしたデータがデバイスに書き込まれるのではないことを意"
1162 "味する (例外は指定された範囲の端の部分的に使用しているブロックである)。 (これ"
1163 "以外で) I/O が必要なのはメタデータの更新だけである。"
1164
1165 #. type: Plain text
1166 #: build/C/man2/fallocate.2:217
1167 msgid ""
1168 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1169 "behavior of the call is similar, but the file size will not be changed even "
1170 "if I<offset>+I<len> is greater than the file size.  This behavior is the "
1171 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1172 msgstr ""
1173 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に追加で指定された場合、 このシステム"
1174 "コールの動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合"
1175 "であってもファイルサイズは変更されない点が異なる。 この動作は "
1176 "B<FALLOC_FL_KEEP_SIZE> を指定してスペースを前もって割り当てた場合と同じであ"
1177 "る。"
1178
1179 #. type: Plain text
1180 #: build/C/man2/fallocate.2:222
1181 msgid ""
1182 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1183 "support the operation, an error is returned.  The operation is supported on "
1184 "at least the following filesystems:"
1185 msgstr ""
1186 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1187 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1188 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1189
1190 #.  commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1191 #. type: Plain text
1192 #: build/C/man2/fallocate.2:225
1193 msgid "XFS (since Linux 3.14)"
1194 msgstr "XFS (Linux 3.14 以降)"
1195
1196 #.  commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1197 #. type: Plain text
1198 #: build/C/man2/fallocate.2:228
1199 msgid "ext4, for extent-based files (since Linux 3.14)"
1200 msgstr "ext4 のエクステントベースのファイル (Linux 3.14 以降)"
1201
1202 #. type: Plain text
1203 #: build/C/man2/fallocate.2:235
1204 msgid ""
1205 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1206 "I<errno> is set to indicate the error."
1207 msgstr ""
1208 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> "
1209 "にエラーを示す値を設定する。"
1210
1211 #. type: TP
1212 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1213 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1214 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1215 #: build/C/man2/sync_file_range.2:148
1216 #, no-wrap
1217 msgid "B<EBADF>"
1218 msgstr "B<EBADF>"
1219
1220 #. type: Plain text
1221 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1222 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1223 msgstr ""
1224 "I<fd> が有効なファイルディスクリプターでないか、 書き込み用としてオープンされ"
1225 "ていない。"
1226
1227 #. type: TP
1228 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1229 #, no-wrap
1230 msgid "B<EFBIG>"
1231 msgstr "B<EFBIG>"
1232
1233 #. type: Plain text
1234 #: build/C/man2/fallocate.2:244
1235 msgid "I<offset>+I<len> exceeds the maximum file size."
1236 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1237
1238 #. type: TP
1239 #: build/C/man2/fallocate.2:244
1240 #, no-wrap
1241 msgid "B<EINTR>"
1242 msgstr "B<EINTR>"
1243
1244 #. type: Plain text
1245 #: build/C/man2/fallocate.2:247
1246 msgid "A signal was caught during execution."
1247 msgstr "実行中にシグナルが捕捉された。"
1248
1249 #. type: Plain text
1250 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1251 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1252 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1253
1254 #. type: Plain text
1255 #: build/C/man2/fallocate.2:269
1256 msgid ""
1257 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1258 "plus I<len> reaches or passes the end of the file."
1259 msgstr ""
1260 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1261 "範囲がファイルの末尾かそれより先まで達している。"
1262
1263 #. type: Plain text
1264 #: build/C/man2/fallocate.2:279
1265 msgid ""
1266 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1267 "not a multiple of the filesystem block size."
1268 msgstr ""
1269 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1270 "がファイルシステムのブロックサイズの倍数ではない。"
1271
1272 #. type: Plain text
1273 #: build/C/man2/fallocate.2:287
1274 msgid ""
1275 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1276 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1277 msgstr ""
1278 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1279 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1280
1281 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1282 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1283 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1284 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1285 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1286 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1287 #.  Date: 2014-04-17 13:40:05 GMT
1288 #. type: Plain text
1289 #: build/C/man2/fallocate.2:304
1290 msgid ""
1291 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1292 "file referred to by I<fd> is not a regular file."
1293 msgstr ""
1294 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1295 "I<fd> が参照しているファイルが通常のファイルではない。"
1296
1297 #. type: TP
1298 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1299 #: build/C/man2/sync_file_range.2:160
1300 #, no-wrap
1301 msgid "B<EIO>"
1302 msgstr "B<EIO>"
1303
1304 #. type: Plain text
1305 #: build/C/man2/fallocate.2:307
1306 msgid "An I/O error occurred while reading from or writing to a filesystem."
1307 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1308
1309 #. type: TP
1310 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1311 #: build/C/man3/posix_fallocate.3:87 build/C/man2/s390_pci_mmio_write.2:92
1312 #, no-wrap
1313 msgid "B<ENODEV>"
1314 msgstr "B<ENODEV>"
1315
1316 #. type: Plain text
1317 #: build/C/man2/fallocate.2:314
1318 msgid ""
1319 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1320 "or FIFO, a different error results.)"
1321 msgstr ""
1322 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1323 "を参照している場合、別のエラーが発生する)。"
1324
1325 #. type: TP
1326 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1327 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1328 #, no-wrap
1329 msgid "B<ENOSPC>"
1330 msgstr "B<ENOSPC>"
1331
1332 #. type: Plain text
1333 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1334 msgid ""
1335 "There is not enough space left on the device containing the file referred to "
1336 "by I<fd>."
1337 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1338
1339 #. type: Plain text
1340 #: build/C/man2/fallocate.2:323
1341 msgid "This kernel does not implement B<fallocate>()."
1342 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1343
1344 #. type: TP
1345 #: build/C/man2/fallocate.2:323
1346 #, no-wrap
1347 msgid "B<EOPNOTSUPP>"
1348 msgstr "B<EOPNOTSUPP>"
1349
1350 #. type: Plain text
1351 #: build/C/man2/fallocate.2:332
1352 msgid ""
1353 "The filesystem containing the file referred to by I<fd> does not support "
1354 "this operation; or the I<mode> is not supported by the filesystem containing "
1355 "the file referred to by I<fd>."
1356 msgstr ""
1357 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1358 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1359 "I<mode> をサポートしていない。"
1360
1361 #. type: TP
1362 #: build/C/man2/fallocate.2:332 build/C/man2/fallocate.2:338
1363 #: build/C/man2/fallocate.2:351 build/C/man2/mlock.2:143
1364 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/mmap.2:467
1365 #: build/C/man2/shmctl.2:353 build/C/man2/shmget.2:241
1366 #, no-wrap
1367 msgid "B<EPERM>"
1368 msgstr "B<EPERM>"
1369
1370 #. type: Plain text
1371 #: build/C/man2/fallocate.2:338
1372 msgid "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
1373 msgstr ""
1374 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1375 "(B<chattr>(1) 参照)。"
1376
1377 #. type: Plain text
1378 #: build/C/man2/fallocate.2:351
1379 msgid ""
1380 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1381 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1382 msgstr ""
1383 "I<mode> に B<FALLOC_FL_PUNCH_HOLE> か B<FALLOC_FL_COLLAPSE_RANGE> が指定され"
1384 "たが、 I<fd> が参照するファイルに追加のみ (append-only) の属性が付いている "
1385 "(B<chattr>(1) 参照)。"
1386
1387 #. type: Plain text
1388 #: build/C/man2/fallocate.2:355 build/C/man2/mmap.2:471
1389 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
1390 msgstr "操作が file seal により禁止されている。 B<fcntl>(2) 参照。"
1391
1392 #. type: TP
1393 #: build/C/man2/fallocate.2:355 build/C/man2/posix_fadvise.2:97
1394 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1395 #, no-wrap
1396 msgid "B<ESPIPE>"
1397 msgstr "B<ESPIPE>"
1398
1399 #. type: Plain text
1400 #: build/C/man2/fallocate.2:359
1401 msgid "I<fd> refers to a pipe or FIFO."
1402 msgstr "I<fd> がパイプか FIFO を参照している。"
1403
1404 #. type: TP
1405 #: build/C/man2/fallocate.2:359 build/C/man2/mmap.2:471
1406 #, no-wrap
1407 msgid "B<ETXTBSY>"
1408 msgstr "B<ETXTBSY>"
1409
1410 #. type: Plain text
1411 #: build/C/man2/fallocate.2:367
1412 msgid ""
1413 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1414 "I<fd> is currently being executed."
1415 msgstr ""
1416 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1417 "イルは現在実行中である。"
1418
1419 #. type: SH
1420 #: build/C/man2/fallocate.2:367 build/C/man2/madvise.2:325
1421 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1422 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1423 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1424 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1425 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1426 #: build/C/man2/sync_file_range.2:177 build/C/man2/memfd_create.2:155
1427 #: build/C/man2/s390_pci_mmio_write.2:98
1428 #, no-wrap
1429 msgid "VERSIONS"
1430 msgstr "バージョン"
1431
1432 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1433 #. type: Plain text
1434 #: build/C/man2/fallocate.2:375
1435 msgid ""
1436 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1437 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1438 "in glibc headers only since version 2.18."
1439 msgstr ""
1440 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1441 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダー"
1442 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1443
1444 #. type: Plain text
1445 #: build/C/man2/fallocate.2:378
1446 msgid "B<fallocate>()  is Linux-specific."
1447 msgstr "B<fallocate>()  は Linux 固有である。"
1448
1449 #. type: Plain text
1450 #: build/C/man2/fallocate.2:383
1451 msgid ""
1452 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1453 msgstr ""
1454 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1455
1456 #. type: TH
1457 #: build/C/man2/madvise.2:35
1458 #, no-wrap
1459 msgid "MADVISE"
1460 msgstr "MADVISE"
1461
1462 #. type: TH
1463 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1464 #, no-wrap
1465 msgid "2014-12-31"
1466 msgstr "2014-12-31"
1467
1468 #. type: Plain text
1469 #: build/C/man2/madvise.2:38
1470 msgid "madvise - give advice about use of memory"
1471 msgstr "madvise - メモリー利用に関するアドバイスを与える"
1472
1473 #. type: Plain text
1474 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1475 #: build/C/man3/shm_open.3:31
1476 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1477 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1478
1479 #. type: Plain text
1480 #: build/C/man2/madvise.2:42
1481 msgid ""
1482 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1483 msgstr ""
1484 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1485
1486 #. type: Plain text
1487 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1488 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1489 msgid ""
1490 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1491 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1492
1493 #. type: Plain text
1494 #: build/C/man2/madvise.2:50
1495 msgid "B<madvise>(): _BSD_SOURCE"
1496 msgstr "B<madvise>(): _BSD_SOURCE"
1497
1498 #. type: Plain text
1499 #: build/C/man2/madvise.2:68
1500 msgid ""
1501 "The B<madvise>()  system call advises the kernel about how to handle paging "
1502 "input/output in the address range beginning at address I<addr> and with size "
1503 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1504 "to use some mapped or shared memory areas, so that the kernel can choose "
1505 "appropriate read-ahead and caching techniques.  This call does not influence "
1506 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1507 "but may influence its performance.  The kernel is free to ignore the advice."
1508 msgstr ""
1509 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1510 "トのメモリーブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイ"
1511 "スする。 これを用いると、 アプリケーションからカーネルに、 マップされたメモ"
1512 "リーや共有メモリーをどのように扱ってほしいか伝えることができ、 カーネルはそれ"
1513 "に応じて先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリ"
1514 "ケーションの動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性"
1515 "能には影響しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任され"
1516 "る。"
1517
1518 #. type: Plain text
1519 #: build/C/man2/madvise.2:72
1520 msgid "The advice is indicated in the I<advice> argument which can be"
1521 msgstr ""
1522 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1523
1524 #. type: TP
1525 #: build/C/man2/madvise.2:72
1526 #, no-wrap
1527 msgid "B<MADV_NORMAL>"
1528 msgstr "B<MADV_NORMAL>"
1529
1530 #. type: Plain text
1531 #: build/C/man2/madvise.2:76
1532 msgid "No special treatment.  This is the default."
1533 msgstr "特別な扱いは行わない。これがデフォルトである。"
1534
1535 #. type: TP
1536 #: build/C/man2/madvise.2:76
1537 #, no-wrap
1538 msgid "B<MADV_RANDOM>"
1539 msgstr "B<MADV_RANDOM>"
1540
1541 #. type: Plain text
1542 #: build/C/man2/madvise.2:80
1543 msgid ""
1544 "Expect page references in random order.  (Hence, read ahead may be less "
1545 "useful than normally.)"
1546 msgstr ""
1547 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1548 "なさそうだ。)"
1549
1550 #. type: TP
1551 #: build/C/man2/madvise.2:80
1552 #, no-wrap
1553 msgid "B<MADV_SEQUENTIAL>"
1554 msgstr "B<MADV_SEQUENTIAL>"
1555
1556 #. type: Plain text
1557 #: build/C/man2/madvise.2:85
1558 msgid ""
1559 "Expect page references in sequential order.  (Hence, pages in the given "
1560 "range can be aggressively read ahead, and may be freed soon after they are "
1561 "accessed.)"
1562 msgstr ""
1563 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1564 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1565 "して良い。)"
1566
1567 #. type: TP
1568 #: build/C/man2/madvise.2:85
1569 #, no-wrap
1570 msgid "B<MADV_WILLNEED>"
1571 msgstr "B<MADV_WILLNEED>"
1572
1573 #. type: Plain text
1574 #: build/C/man2/madvise.2:89
1575 msgid ""
1576 "Expect access in the near future.  (Hence, it might be a good idea to read "
1577 "some pages ahead.)"
1578 msgstr ""
1579 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1580 "ておくといいだろう。)"
1581
1582 #. type: TP
1583 #: build/C/man2/madvise.2:89
1584 #, no-wrap
1585 msgid "B<MADV_DONTNEED>"
1586 msgstr "B<MADV_DONTNEED>"
1587
1588 #. type: Plain text
1589 #: build/C/man2/madvise.2:100
1590 msgid ""
1591 "Do not expect access in the near future.  (For the time being, the "
1592 "application is finished with the given range, so the kernel can free "
1593 "resources associated with it.)  Subsequent accesses of pages in this range "
1594 "will succeed, but will result either in reloading of the memory contents "
1595 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1596 "pages for mappings without an underlying file."
1597 msgstr ""
1598 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1599 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1600 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリーの内容を"
1601 "マップ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または"
1602 "元ファイルがないマップページでは アクセスがあったときに 0 埋めが行われること"
1603 "になる。"
1604
1605 #. type: TP
1606 #: build/C/man2/madvise.2:100
1607 #, no-wrap
1608 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1609 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1610
1611 #.  2.6.18-rc5
1612 #.  Databases want to use this feature to drop a section of their
1613 #.  bufferpool (shared memory segments) - without writing back to
1614 #.  disk/swap space.  This feature is also useful for supporting
1615 #.  hot-plug memory on UML.
1616 #. type: Plain text
1617 #: build/C/man2/madvise.2:113
1618 msgid ""
1619 "Free up a given range of pages and its associated backing store.  Currently, "
1620 "only shmfs/tmpfs supports this; other filesystems return with the error "
1621 "B<ENOSYS>."
1622 msgstr ""
1623 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1624 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1625 "返される。"
1626
1627 #. type: TP
1628 #: build/C/man2/madvise.2:113
1629 #, no-wrap
1630 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1631 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1632
1633 #.  See http://lwn.net/Articles/171941/
1634 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1635 #.  Currently, copy-on-write may change the physical address of
1636 #.  a page even if the user requested that the page is pinned in
1637 #.  memory (either by mlock or by get_user_pages).  This happens
1638 #.  if the process forks meanwhile, and the parent writes to that
1639 #.  page.  As a result, the page is orphaned: in case of
1640 #.  get_user_pages, the application will never see any data hardware
1641 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1642 #.  the parent is not getting the realtime/security benefits of mlock.
1643 #.  In particular, this affects the Infiniband modules which do DMA from
1644 #.  and into user pages all the time.
1645 #.  This patch adds madvise options to control whether memory range is
1646 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1647 #.  from/into these pages.  Could also be useful to an application
1648 #.  wanting to speed up its forks by cutting large areas out of
1649 #.  consideration.
1650 #.  SEE ALSO: http://lwn.net/Articles/171941/
1651 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1652 #. type: Plain text
1653 #: build/C/man2/madvise.2:144
1654 msgid ""
1655 "Do not make the pages in this range available to the child after a "
1656 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1657 "the physical location of a page(s) if the parent writes to it after a "
1658 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1659 "into the page(s).)"
1660 msgstr ""
1661 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1662 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1663 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1664 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1665 "を行うような場合に 問題を起こすことがある)。"
1666
1667 #. type: TP
1668 #: build/C/man2/madvise.2:144
1669 #, no-wrap
1670 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1671 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1672
1673 #. type: Plain text
1674 #: build/C/man2/madvise.2:150
1675 msgid ""
1676 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1677 "a mapping is inherited across B<fork>(2)."
1678 msgstr ""
1679 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1680 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1681
1682 #. type: TP
1683 #: build/C/man2/madvise.2:150
1684 #, no-wrap
1685 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1686 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1687
1688 #. type: Plain text
1689 #: build/C/man2/madvise.2:162
1690 msgid ""
1691 "Poison a page and handle it like a hardware memory corruption.  This "
1692 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1693 "This operation may result in the calling process receiving a B<SIGBUS> and "
1694 "the page being unmapped.  This feature is intended for testing of memory "
1695 "error-handling code; it is available only if the kernel was configured with "
1696 "B<CONFIG_MEMORY_FAILURE>."
1697 msgstr ""
1698 "ページに毒入れを行い、ハードウェアメモリーの破損のようにそのページを取り扱"
1699 "う。 この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 こ"
1700 "の操作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマッ"
1701 "プされる。 この機能はメモリーのエラー処理コードをテストするためのものであ"
1702 "る。 カーネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能"
1703 "である。"
1704
1705 #. type: TP
1706 #: build/C/man2/madvise.2:162
1707 #, no-wrap
1708 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1709 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1710
1711 #. type: Plain text
1712 #: build/C/man2/madvise.2:180
1713 msgid ""
1714 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1715 "memory of each page in the specified range is preserved (i.e., when next "
1716 "accessed, the same content will be visible, but in a new physical page "
1717 "frame), and the original page is offlined (i.e., no longer used, and taken "
1718 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1719 "operation is invisible to (i.e., does not change the semantics of)  the "
1720 "calling process.  This feature is intended for testing of memory error-"
1721 "handling code; it is available only if the kernel was configured with "
1722 "B<CONFIG_MEMORY_FAILURE>."
1723 msgstr ""
1724 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1725 "された範囲の各ページのメモリーの内容は保持され (すなわち、次にアクセスされた"
1726 "際に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオ"
1727 "フラインになる (すなわち、 そのフレームは使用される、通常のメモリー管理からは"
1728 "取り除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えな"
1729 "い (つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリーのエラー"
1730 "処理コードをテストすることを目的に作られた。 カーネルで "
1731 "B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1732
1733 #. type: TP
1734 #: build/C/man2/madvise.2:180
1735 #, no-wrap
1736 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1737 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1738
1739 #. type: Plain text
1740 #: build/C/man2/madvise.2:205
1741 msgid ""
1742 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1743 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1744 "memory that have been marked as mergeable, looking for pages with identical "
1745 "content.  These are replaced by a single write-protected page (which is "
1746 "automatically copied if a process later wants to update the content of the "
1747 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1748 "feature is intended for applications that generate many instances of the "
1749 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1750 "of processing power; use with care.  See the Linux kernel source file "
1751 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1752 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1753 "configured with B<CONFIG_KSM>."
1754 msgstr ""
1755 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1756 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1757 "いたユーザーメモリーの領域を定期的にスキャンし、内容が全く同じページを探す。 "
1758 "内容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) "
1759 "がかかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよ"
1760 "うとした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名"
1761 "ページ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じ"
1762 "データのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システ"
1763 "ム) での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合"
1764 "があり、注意して使用すること。 詳細は Linux カーネルソースファイル "
1765 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1766 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1767 "る場合にのみ利用できる。"
1768
1769 #. type: TP
1770 #: build/C/man2/madvise.2:205
1771 #, no-wrap
1772 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1773 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1774
1775 #. type: Plain text
1776 #: build/C/man2/madvise.2:214
1777 msgid ""
1778 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1779 "address range; KSM unmerges whatever pages it had merged in the address "
1780 "range specified by I<addr> and I<length>."
1781 msgstr ""
1782 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1783 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1784 "済みのすべてのページの統合解除を行う。"
1785
1786 #. type: TP
1787 #: build/C/man2/madvise.2:214
1788 #, no-wrap
1789 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1790 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1791
1792 #.  http://lwn.net/Articles/358904/
1793 #.  https://lwn.net/Articles/423584/
1794 #. type: Plain text
1795 #: build/C/man2/madvise.2:243
1796 msgid ""
1797 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1798 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1799 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1800 "the areas marked as huge page candidates to replace them with huge pages.  "
1801 "The kernel will also allocate huge pages directly when the region is "
1802 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1803 "feature is primarily aimed at applications that use large mappings of data "
1804 "and access large regions of that memory at a time (e.g., virtualization "
1805 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1806 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1807 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1808 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1809 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1810 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1811 msgstr ""
1812 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1813 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1814 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1815 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1816 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1817 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1818 "マッピングを使用し、一度にそのメモリーの大きな範囲にアクセスするようなアプリ"
1819 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1820 "る。 この機能は非常に簡単にメモリーを浪費してしまう (例えば、1 バイトしかアク"
1821 "セスしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリーを使っ"
1822 "てしまう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1823 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1824 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1825 "る。"
1826
1827 #. type: TP
1828 #: build/C/man2/madvise.2:243
1829 #, no-wrap
1830 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1831 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1832
1833 #. type: Plain text
1834 #: build/C/man2/madvise.2:250
1835 msgid ""
1836 "Ensures that memory in the address range specified by I<addr> and I<length> "
1837 "will not be collapsed into huge pages."
1838 msgstr ""
1839 "I<addr> と I<length> で指定されたアドレス範囲のメモリーがヒュージページに組み"
1840 "込まれないようにする。"
1841
1842 #. type: TP
1843 #: build/C/man2/madvise.2:250
1844 #, no-wrap
1845 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1846 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1847
1848 #. type: Plain text
1849 #: build/C/man2/madvise.2:264
1850 msgid ""
1851 "Exclude from a core dump those pages in the range specified by I<addr> and "
1852 "I<length>.  This is useful in applications that have large areas of memory "
1853 "that are known not to be useful in a core dump.  The effect of "
1854 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1855 "proc/PID/coredump_filter> file (see B<core>(5))."
1856 msgstr ""
1857 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1858 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリー領域があ"
1859 "るアプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1860 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1861 "(B<core>(5) 参照)。"
1862
1863 #. type: TP
1864 #: build/C/man2/madvise.2:264
1865 #, no-wrap
1866 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1867 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1868
1869 #. type: Plain text
1870 #: build/C/man2/madvise.2:268
1871 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1872 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1873
1874 #. type: Plain text
1875 #: build/C/man2/madvise.2:275
1876 msgid ""
1877 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1878 "is set appropriately."
1879 msgstr ""
1880 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1881 "を適切な値に設定する。"
1882
1883 #. type: TP
1884 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1885 #: build/C/man2/mremap.2:136
1886 #, no-wrap
1887 msgid "B<EAGAIN>"
1888 msgstr "B<EAGAIN>"
1889
1890 #. type: Plain text
1891 #: build/C/man2/madvise.2:279
1892 msgid "A kernel resource was temporarily unavailable."
1893 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1894
1895 #. type: Plain text
1896 #: build/C/man2/madvise.2:282
1897 msgid "The map exists, but the area maps something that isn't a file."
1898 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1899
1900 #. type: Plain text
1901 #: build/C/man2/madvise.2:285
1902 msgid "This error can occur for the following reasons:"
1903 msgstr "このエラーは以下の理由で発生する。"
1904
1905 #.  .I len
1906 #.  is zero,
1907 #. type: Plain text
1908 #: build/C/man2/madvise.2:292
1909 msgid "The value I<len> is negative."
1910 msgstr "I<len> が負の値である。"
1911
1912 #. type: Plain text
1913 #: build/C/man2/madvise.2:295
1914 msgid "I<addr> is not page-aligned."
1915 msgstr "I<addr> がページ境界ではない。"
1916
1917 #. type: Plain text
1918 #: build/C/man2/madvise.2:298
1919 msgid "I<advice> is not a valid value"
1920 msgstr "I<advice> が有効な値でない。"
1921
1922 #. type: Plain text
1923 #: build/C/man2/madvise.2:301
1924 msgid ""
1925 "The application is attempting to release locked or shared pages (with "
1926 "B<MADV_DONTNEED>)."
1927 msgstr ""
1928 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1929 "放\n"
1930 "しようとしている。"
1931
1932 #. type: Plain text
1933 #: build/C/man2/madvise.2:309
1934 msgid ""
1935 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1936 "kernel was not configured with B<CONFIG_KSM>."
1937 msgstr ""
1938 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1939 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1940
1941 #. type: Plain text
1942 #: build/C/man2/madvise.2:316
1943 msgid ""
1944 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1945 "maximum resident set size."
1946 msgstr ""
1947 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1948 "(resident set size) の最大値を越えてしまう。"
1949
1950 #. type: TP
1951 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1952 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1953 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1954 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1955 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1956 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1957 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1958 #: build/C/man2/sync_file_range.2:163 build/C/man2/memfd_create.2:152
1959 #: build/C/man2/s390_pci_mmio_write.2:95
1960 #, no-wrap
1961 msgid "B<ENOMEM>"
1962 msgstr "B<ENOMEM>"
1963
1964 #. type: Plain text
1965 #: build/C/man2/madvise.2:321
1966 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1967 msgstr "(B<MADV_WILLNEED> の場合) メモリーが足りず、ページングに失敗した。"
1968
1969 #. type: Plain text
1970 #: build/C/man2/madvise.2:325
1971 msgid ""
1972 "Addresses in the specified range are not currently mapped, or are outside "
1973 "the address space of the process."
1974 msgstr ""
1975 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1976 "空間の内部にない。"
1977
1978 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1979 #. type: Plain text
1980 #: build/C/man2/madvise.2:332
1981 msgid ""
1982 "Since Linux 3.18, support for this system call is optional, depending on the "
1983 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1984 msgstr ""
1985 "Linux 3.18 以降では、このシステムコールのサポートは任意となり、利用できるかは"
1986 "カーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされてい"
1987 "るかに依存する。"
1988
1989 #.  FIXME . Write a posix_madvise(3) page.
1990 #. type: Plain text
1991 #: build/C/man2/madvise.2:345
1992 msgid ""
1993 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1994 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1995 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1996 "access."
1997 msgstr ""
1998 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1999 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
2000 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
2001 "類似の関数が存在する。"
2002
2003 #. type: Plain text
2004 #: build/C/man2/madvise.2:354
2005 msgid ""
2006 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
2007 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
2008 msgstr ""
2009 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
2010 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
2011
2012 #. type: SS
2013 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
2014 #: build/C/man2/shmget.2:370
2015 #, no-wrap
2016 msgid "Linux notes"
2017 msgstr "Linux での注意"
2018
2019 #. type: Plain text
2020 #: build/C/man2/madvise.2:363
2021 msgid ""
2022 "The current Linux implementation (2.4.0) views this system call more as a "
2023 "command than as advice and hence may return an error when it cannot do what "
2024 "it usually would do in response to this advice.  (See the ERRORS description "
2025 "above.)  This is nonstandard behavior."
2026 msgstr ""
2027 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2028 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2029 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2030 "とは異なる。"
2031
2032 #.  .SH HISTORY
2033 #.  The
2034 #.  .BR madvise ()
2035 #.  function first appeared in 4.4BSD.
2036 #. type: Plain text
2037 #: build/C/man2/madvise.2:379
2038 msgid ""
2039 "The Linux implementation requires that the address I<addr> be page-aligned, "
2040 "and allows I<length> to be zero.  If there are some parts of the specified "
2041 "address range that are not mapped, the Linux version of B<madvise>()  "
2042 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2043 "the system call, as it should)."
2044 msgstr ""
2045 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2046 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2047 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2048 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2049 "返す)。"
2050
2051 #. type: Plain text
2052 #: build/C/man2/madvise.2:388
2053 msgid ""
2054 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2055 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2056 msgstr ""
2057 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2058 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2059
2060 #. type: TH
2061 #: build/C/man3/mallinfo.3:26
2062 #, no-wrap
2063 msgid "MALLINFO"
2064 msgstr "MALLINFO"
2065
2066 #. type: TH
2067 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2068 #, no-wrap
2069 msgid "2012-05-06"
2070 msgstr "2012-05-06"
2071
2072 #. type: Plain text
2073 #: build/C/man3/mallinfo.3:29
2074 msgid "mallinfo - obtain memory allocation information"
2075 msgstr "mallinfo - メモリー割り当て情報を取得する"
2076
2077 #. type: Plain text
2078 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2079 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2080 #: build/C/man3/mallopt.3:31
2081 msgid "B<#include E<lt>malloc.hE<gt>>"
2082 msgstr "B<#include E<lt>malloc.hE<gt>>"
2083
2084 #. type: Plain text
2085 #: build/C/man3/mallinfo.3:33
2086 msgid "B<struct mallinfo mallinfo(void);>"
2087 msgstr "B<struct mallinfo mallinfo(void);>"
2088
2089 #. type: Plain text
2090 #: build/C/man3/mallinfo.3:41
2091 msgid ""
2092 "The B<mallinfo>()  function returns a copy of a structure containing "
2093 "information about memory allocations performed by B<malloc>(3)  and related "
2094 "functions.  This structure is defined as follows:"
2095 msgstr ""
2096 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリー\n"
2097 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2098 "この構造体は以下のように定義されている。"
2099
2100 #. type: Plain text
2101 #: build/C/man3/mallinfo.3:56
2102 #, no-wrap
2103 msgid ""
2104 "struct mallinfo {\n"
2105 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2106 "    int ordblks;   /* Number of free chunks */\n"
2107 "    int smblks;    /* Number of free fastbin blocks */\n"
2108 "    int hblks;     /* Number of mmapped regions */\n"
2109 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2110 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2111 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2112 "    int uordblks;  /* Total allocated space (bytes) */\n"
2113 "    int fordblks;  /* Total free space (bytes) */\n"
2114 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2115 "};\n"
2116 msgstr ""
2117 "struct mallinfo {\n"
2118 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2119 "    int ordblks;   /* Number of free chunks */\n"
2120 "    int smblks;    /* Number of free fastbin blocks */\n"
2121 "    int hblks;     /* Number of mmapped regions */\n"
2122 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2123 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2124 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2125 "    int uordblks;  /* Total allocated space (bytes) */\n"
2126 "    int fordblks;  /* Total free space (bytes) */\n"
2127 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2128 "};\n"
2129
2130 #. type: Plain text
2131 #: build/C/man3/mallinfo.3:62
2132 msgid ""
2133 "The fields of the I<mallinfo> structure contain the following information:"
2134 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2135
2136 #. type: TP
2137 #: build/C/man3/mallinfo.3:62
2138 #, no-wrap
2139 msgid "I<arena>"
2140 msgstr "I<arena>"
2141
2142 #. type: Plain text
2143 #: build/C/man3/mallinfo.3:68
2144 msgid ""
2145 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2146 "memory allocated on the heap).  This figure includes both in-use blocks and "
2147 "blocks on the free list."
2148 msgstr ""
2149 "B<mmap>(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられ"
2150 "たメモリー) 。 この数字には使用中のブロックやフリーリスト上のブロックも含まれ"
2151 "る。"
2152
2153 #. type: TP
2154 #: build/C/man3/mallinfo.3:68
2155 #, no-wrap
2156 msgid "I<ordblks>"
2157 msgstr "I<ordblks>"
2158
2159 #. type: Plain text
2160 #: build/C/man3/mallinfo.3:71
2161 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2162 msgstr "通常の (つまり fastbin ではない) 未使用ブロック数。"
2163
2164 #. type: TP
2165 #: build/C/man3/mallinfo.3:71
2166 #, no-wrap
2167 msgid "I<smblks>"
2168 msgstr "I<smblks>"
2169
2170 #. type: Plain text
2171 #: build/C/man3/mallinfo.3:75
2172 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2173 msgstr "fastbin 未使用ブロック数 (B<mallopt>(3) 参照)。"
2174
2175 #. type: TP
2176 #: build/C/man3/mallinfo.3:75
2177 #, no-wrap
2178 msgid "I<hblks>"
2179 msgstr "I<hblks>"
2180
2181 #. type: Plain text
2182 #: build/C/man3/mallinfo.3:83
2183 msgid ""
2184 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2185 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2186 msgstr ""
2187 "B<mmap>(2) を使って現在割り当てられているブロック数 (B<mallopt>(3) の "
2188 "B<M_MMAP_THRESHOLD> の議論を参照)。"
2189
2190 #. type: TP
2191 #: build/C/man3/mallinfo.3:83
2192 #, no-wrap
2193 msgid "I<hblkhd>"
2194 msgstr "I<hblkhd>"
2195
2196 #. type: Plain text
2197 #: build/C/man3/mallinfo.3:87
2198 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2199 msgstr "B<mmap>(2) を使って現在割り当てられているブロックのバイト数。"
2200
2201 #. type: TP
2202 #: build/C/man3/mallinfo.3:87
2203 #, no-wrap
2204 msgid "I<usmblks>"
2205 msgstr "I<usmblks>"
2206
2207 #. type: Plain text
2208 #: build/C/man3/mallinfo.3:92
2209 msgid ""
2210 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2211 "of space that was ever allocated.  This field is maintained only in "
2212 "nonthreading environments."
2213 msgstr ""
2214 "割り当てた空間の最高点 (\"highwater mark\")、 つまり、 これまでの中での最大の"
2215 "割り当て量。 このフィールドはスレッド化されていない環境でのみ収集される。"
2216
2217 #. type: TP
2218 #: build/C/man3/mallinfo.3:92
2219 #, no-wrap
2220 msgid "I<fsmblks>"
2221 msgstr "I<fsmblks>"
2222
2223 #. type: Plain text
2224 #: build/C/man3/mallinfo.3:95
2225 msgid "The total number of bytes in fastbin free blocks."
2226 msgstr "fastbin フリーブロックの総バイト数。"
2227
2228 #. type: TP
2229 #: build/C/man3/mallinfo.3:95
2230 #, no-wrap
2231 msgid "I<uordblks>"
2232 msgstr "I<uordblks>"
2233
2234 #. type: Plain text
2235 #: build/C/man3/mallinfo.3:98
2236 msgid "The total number of bytes used by in-use allocations."
2237 msgstr "使用中の割り当てメモリーで使われているバイト数。"
2238
2239 #. type: TP
2240 #: build/C/man3/mallinfo.3:98
2241 #, no-wrap
2242 msgid "I<fordblks>"
2243 msgstr "I<fordblks>"
2244
2245 #. type: Plain text
2246 #: build/C/man3/mallinfo.3:101
2247 msgid "The total number of bytes in free blocks."
2248 msgstr "フリーブロックの総バイト数。"
2249
2250 #. type: TP
2251 #: build/C/man3/mallinfo.3:101
2252 #, no-wrap
2253 msgid "I<keepcost>"
2254 msgstr "I<keepcost>"
2255
2256 #.  .SH VERSIONS
2257 #.  Available already in glibc 2.0, possibly earlier
2258 #. type: Plain text
2259 #: build/C/man3/mallinfo.3:110
2260 msgid ""
2261 "The total amount of releasable free space at the top of the heap.  This is "
2262 "the maximum number of bytes that could ideally (i.e., ignoring page "
2263 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2264 msgstr ""
2265 "ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は "
2266 "B<malloc_trim>(3) で理想的な場合に解放できる最大のバイト数である (理想的とい"
2267 "うのは、 ページ境界の制限などを無視した場合である。"
2268
2269 #. type: Plain text
2270 #: build/C/man3/mallinfo.3:114
2271 msgid ""
2272 "This function is not specified by POSIX or the C standards.  A similar "
2273 "function exists on many System V derivatives, and was specified in the SVID."
2274 msgstr ""
2275 "この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステ"
2276 "ムに同様の関数が存在し、 SVID では同様の関数が規定されていた。 "
2277
2278 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2279 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2280 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2281 #.  on libc-alpha@sourceware.org
2282 #. type: Plain text
2283 #: build/C/man3/mallinfo.3:126
2284 msgid ""
2285 "B<Information is returned for only the main memory allocation area.> "
2286 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2287 "B<malloc_info>(3)  for alternatives that include information about other "
2288 "arenas."
2289 msgstr ""
2290 "B<これらの情報はメインのメモリー割り当て領域に対するもののみである。> 他の領"
2291 "域の割り当ては対象にならない。 他の領域の情報も取得できる別の手段については "
2292 "B<malloc_stats>(3) や B<malloc_info>(3) を参照。"
2293
2294 #. type: Plain text
2295 #: build/C/man3/mallinfo.3:134
2296 msgid ""
2297 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2298 "because some internal bookkeeping values may be of type I<long>, the "
2299 "reported values may wrap around zero and thus be inaccurate."
2300 msgstr ""
2301 "I<mallinfo> 構造体の各フィールドは I<int> 型である。 しかし、 いくつかの内部"
2302 "管理用の値は I<long> 型の場合もあるので、 報告される値が一周してしまい、 不正"
2303 "確になる可能性がある。"
2304
2305 #. type: SH
2306 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2307 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2308 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:633
2309 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2310 #: build/C/man2/memfd_create.2:293
2311 #, no-wrap
2312 msgid "EXAMPLE"
2313 msgstr "例"
2314
2315 #. type: Plain text
2316 #: build/C/man3/mallinfo.3:140
2317 msgid ""
2318 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2319 "statistics before and after allocating and freeing some blocks of memory.  "
2320 "The statistics are displayed on standard output."
2321 msgstr ""
2322 "以下のプログラムは B<mallinfo>() を利用して、 メモリーブロックの割り当て、解"
2323 "放のそれぞれ前後でメモリー割り当ての統計情報を取得する。 統計情報は標準出力に"
2324 "表示される。"
2325
2326 #. type: Plain text
2327 #: build/C/man3/mallinfo.3:144
2328 msgid ""
2329 "The first two command-line arguments specify the number and size of blocks "
2330 "to be allocated with B<malloc>(3)."
2331 msgstr ""
2332 "最初の 2 つのコマンドライン引き数は B<malloc>(3) で割り当てるブロック数とサイ"
2333 "ズを指定する。"
2334
2335 #. type: Plain text
2336 #: build/C/man3/mallinfo.3:158
2337 msgid ""
2338 "The remaining three arguments specify which of the allocated blocks should "
2339 "be freed with B<free>(3).  These three arguments are optional, and specify "
2340 "(in order): the step size to be used in the loop that frees blocks (the "
2341 "default is 1, meaning free all blocks in the range); the ordinal position of "
2342 "the first block to be freed (default 0, meaning the first allocated block); "
2343 "and a number one greater than the ordinal position of the last block to be "
2344 "freed (default is one greater than the maximum block number).  If these "
2345 "three arguments are omitted, then the defaults cause all allocated blocks to "
2346 "be freed."
2347 msgstr ""
2348 "残りの 3 つの引き数は、どの割り当てられたブロックを B<free>(3) で解放すべきか"
2349 "を指定する。 これらの 3 つの引き数の指定は任意で、 最初のものから順に以下の情"
2350 "報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップ"
2351 "サイズを指定する (デフォルト値は 1 で、 1 は指定した範囲のすべてのブロックを"
2352 "解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を"
2353 "指定する (デフォルト値は 0 で、 0 は先頭の割り当て済みブロックを意味する)。 "
2354 "3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定す"
2355 "る (デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つ"
2356 "の引き数が省略された場合、 デフォルトではすべての割り当てられたブロックが解放"
2357 "される。"
2358
2359 #. type: Plain text
2360 #: build/C/man3/mallinfo.3:162
2361 msgid ""
2362 "In the following example run of the program, 1000 allocations of 100 bytes "
2363 "are performed, and then every second allocated block is freed:"
2364 msgstr ""
2365 "以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当"
2366 "てたブロックの 2 つに 1 つを解放する。"
2367
2368 #. type: Plain text
2369 #: build/C/man3/mallinfo.3:177
2370 #, no-wrap
2371 msgid ""
2372 "$ B<./a.out 1000 100 2>\n"
2373 "============== Before allocating blocks ==============\n"
2374 "Total non-mmapped bytes (arena):       0\n"
2375 "# of free chunks (ordblks):            1\n"
2376 "# of free fastbin blocks (smblks):     0\n"
2377 "# of mapped regions (hblks):           0\n"
2378 "Bytes in mapped regions (hblkhd):      0\n"
2379 "Max. total allocated space (usmblks):  0\n"
2380 "Free bytes held in fastbins (fsmblks): 0\n"
2381 "Total allocated space (uordblks):      0\n"
2382 "Total free space (fordblks):           0\n"
2383 "Topmost releasable block (keepcost):   0\n"
2384 msgstr ""
2385 "$ B<./a.out 1000 100 2>\n"
2386 "============== Before allocating blocks ==============\n"
2387 "Total non-mmapped bytes (arena):       0\n"
2388 "# of free chunks (ordblks):            1\n"
2389 "# of free fastbin blocks (smblks):     0\n"
2390 "# of mapped regions (hblks):           0\n"
2391 "Bytes in mapped regions (hblkhd):      0\n"
2392 "Max. total allocated space (usmblks):  0\n"
2393 "Free bytes held in fastbins (fsmblks): 0\n"
2394 "Total allocated space (uordblks):      0\n"
2395 "Total free space (fordblks):           0\n"
2396 "Topmost releasable block (keepcost):   0\n"
2397
2398 #. type: Plain text
2399 #: build/C/man3/mallinfo.3:189
2400 #, no-wrap
2401 msgid ""
2402 "============== After allocating blocks ==============\n"
2403 "Total non-mmapped bytes (arena):       135168\n"
2404 "# of free chunks (ordblks):            1\n"
2405 "# of free fastbin blocks (smblks):     0\n"
2406 "# of mapped regions (hblks):           0\n"
2407 "Bytes in mapped regions (hblkhd):      0\n"
2408 "Max. total allocated space (usmblks):  0\n"
2409 "Free bytes held in fastbins (fsmblks): 0\n"
2410 "Total allocated space (uordblks):      104000\n"
2411 "Total free space (fordblks):           31168\n"
2412 "Topmost releasable block (keepcost):   31168\n"
2413 msgstr ""
2414 "============== After allocating blocks ==============\n"
2415 "Total non-mmapped bytes (arena):       135168\n"
2416 "# of free chunks (ordblks):            1\n"
2417 "# of free fastbin blocks (smblks):     0\n"
2418 "# of mapped regions (hblks):           0\n"
2419 "Bytes in mapped regions (hblkhd):      0\n"
2420 "Max. total allocated space (usmblks):  0\n"
2421 "Free bytes held in fastbins (fsmblks): 0\n"
2422 "Total allocated space (uordblks):      104000\n"
2423 "Total free space (fordblks):           31168\n"
2424 "Topmost releasable block (keepcost):   31168\n"
2425
2426 #. type: Plain text
2427 #: build/C/man3/mallinfo.3:201
2428 #, no-wrap
2429 msgid ""
2430 "============== After freeing blocks ==============\n"
2431 "Total non-mmapped bytes (arena):       135168\n"
2432 "# of free chunks (ordblks):            501\n"
2433 "# of free fastbin blocks (smblks):     0\n"
2434 "# of mapped regions (hblks):           0\n"
2435 "Bytes in mapped regions (hblkhd):      0\n"
2436 "Max. total allocated space (usmblks):  0\n"
2437 "Free bytes held in fastbins (fsmblks): 0\n"
2438 "Total allocated space (uordblks):      52000\n"
2439 "Total free space (fordblks):           83168\n"
2440 "Topmost releasable block (keepcost):   31168\n"
2441 msgstr ""
2442 "============== After freeing blocks ==============\n"
2443 "Total non-mmapped bytes (arena):       135168\n"
2444 "# of free chunks (ordblks):            501\n"
2445 "# of free fastbin blocks (smblks):     0\n"
2446 "# of mapped regions (hblks):           0\n"
2447 "Bytes in mapped regions (hblkhd):      0\n"
2448 "Max. total allocated space (usmblks):  0\n"
2449 "Free bytes held in fastbins (fsmblks): 0\n"
2450 "Total allocated space (uordblks):      52000\n"
2451 "Total free space (fordblks):           83168\n"
2452 "Topmost releasable block (keepcost):   31168\n"
2453
2454 #. type: SS
2455 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2456 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2457 #: build/C/man2/mmap.2:645 build/C/man2/mprotect.2:164
2458 #, no-wrap
2459 msgid "Program source"
2460 msgstr "プログラムのソース"
2461
2462 #. type: Plain text
2463 #: build/C/man3/mallinfo.3:208
2464 #, no-wrap
2465 msgid ""
2466 "#include E<lt>malloc.hE<gt>\n"
2467 "#include \"tlpi_hdr.h\"\n"
2468 msgstr ""
2469 "#include E<lt>malloc.hE<gt>\n"
2470 "#include \"tlpi_hdr.h\"\n"
2471
2472 #. type: Plain text
2473 #: build/C/man3/mallinfo.3:213
2474 #, no-wrap
2475 msgid ""
2476 "static void\n"
2477 "display_mallinfo(void)\n"
2478 "{\n"
2479 "    struct mallinfo mi;\n"
2480 msgstr ""
2481 "static void\n"
2482 "display_mallinfo(void)\n"
2483 "{\n"
2484 "    struct mallinfo mi;\n"
2485
2486 #. type: Plain text
2487 #: build/C/man3/mallinfo.3:215
2488 #, no-wrap
2489 msgid "    mi = mallinfo();\n"
2490 msgstr "    mi = mallinfo();\n"
2491
2492 #. type: Plain text
2493 #: build/C/man3/mallinfo.3:227
2494 #, no-wrap
2495 msgid ""
2496 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2497 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2498 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2499 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2500 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2501 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2502 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2503 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2504 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2505 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2506 "}\n"
2507 msgstr ""
2508 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2509 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2510 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2511 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2512 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2513 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2514 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2515 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2516 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2517 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2518 "}\n"
2519
2520 #. type: Plain text
2521 #: build/C/man3/mallinfo.3:235
2522 #, no-wrap
2523 msgid ""
2524 "int\n"
2525 "main(int argc, char *argv[])\n"
2526 "{\n"
2527 "#define MAX_ALLOCS 2000000\n"
2528 "    char *alloc[MAX_ALLOCS];\n"
2529 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2530 "    size_t blockSize;\n"
2531 msgstr ""
2532 "int\n"
2533 "main(int argc, char *argv[])\n"
2534 "{\n"
2535 "#define MAX_ALLOCS 2000000\n"
2536 "    char *alloc[MAX_ALLOCS];\n"
2537 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2538 "    size_t blockSize;\n"
2539
2540 #. type: Plain text
2541 #: build/C/man3/mallinfo.3:239
2542 #, no-wrap
2543 msgid ""
2544 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2545 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2546 "                \"[end-free]]]\\en\", argv[0]);\n"
2547 msgstr ""
2548 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2549 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2550 "                \"[end-free]]]\\en\", argv[0]);\n"
2551
2552 #. type: Plain text
2553 #: build/C/man3/mallinfo.3:245
2554 #, no-wrap
2555 msgid ""
2556 "    numBlocks = atoi(argv[1]);\n"
2557 "    blockSize = atoi(argv[2]);\n"
2558 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2559 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2560 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2561 msgstr ""
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
2568 #. type: Plain text
2569 #: build/C/man3/mallinfo.3:248
2570 #, no-wrap
2571 msgid ""
2572 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2573 "    display_mallinfo();\n"
2574 msgstr ""
2575 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2576 "    display_mallinfo();\n"
2577
2578 #. type: Plain text
2579 #: build/C/man3/mallinfo.3:252
2580 #, no-wrap
2581 msgid ""
2582 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2583 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2584 "            fatal(\"Too many allocations\");\n"
2585 msgstr ""
2586 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2587 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2588 "            fatal(\"Too many allocations\");\n"
2589
2590 #. type: Plain text
2591 #: build/C/man3/mallinfo.3:257
2592 #, no-wrap
2593 msgid ""
2594 "        alloc[j] = malloc(blockSize);\n"
2595 "        if (alloc[j] == NULL)\n"
2596 "            errExit(\"malloc\");\n"
2597 "    }\n"
2598 msgstr ""
2599 "        alloc[j] = malloc(blockSize);\n"
2600 "        if (alloc[j] == NULL)\n"
2601 "            errExit(\"malloc\");\n"
2602 "    }\n"
2603
2604 #. type: Plain text
2605 #: build/C/man3/mallinfo.3:260
2606 #, no-wrap
2607 msgid ""
2608 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2609 "    display_mallinfo();\n"
2610 msgstr ""
2611 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2612 "    display_mallinfo();\n"
2613
2614 #. type: Plain text
2615 #: build/C/man3/mallinfo.3:263
2616 #, no-wrap
2617 msgid ""
2618 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2619 "        free(alloc[j]);\n"
2620 msgstr ""
2621 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2622 "        free(alloc[j]);\n"
2623
2624 #. type: Plain text
2625 #: build/C/man3/mallinfo.3:266
2626 #, no-wrap
2627 msgid ""
2628 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2629 "    display_mallinfo();\n"
2630 msgstr ""
2631 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2632 "    display_mallinfo();\n"
2633
2634 #. type: Plain text
2635 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2636 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2637 #: build/C/man2/mmap.2:714 build/C/man2/memfd_create.2:437
2638 #: build/C/man2/memfd_create.2:486
2639 #, no-wrap
2640 msgid ""
2641 "    exit(EXIT_SUCCESS);\n"
2642 "}\n"
2643 msgstr ""
2644 "    exit(EXIT_SUCCESS);\n"
2645 "}\n"
2646
2647 #. type: Plain text
2648 #: build/C/man3/mallinfo.3:279
2649 msgid ""
2650 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2651 "B<malloc_trim>(3), B<mallopt>(3)"
2652 msgstr ""
2653 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2654 "B<malloc_trim>(3), B<mallopt>(3)"
2655
2656 #. type: TH
2657 #: build/C/man3/malloc_get_state.3:25
2658 #, no-wrap
2659 msgid "MALLOC_GET_STATE"
2660 msgstr "MALLOC_GET_STATE"
2661
2662 #. type: TH
2663 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2664 #, no-wrap
2665 msgid "2014-06-13"
2666 msgstr "2014-06-13"
2667
2668 #. type: Plain text
2669 #: build/C/man3/malloc_get_state.3:28
2670 msgid ""
2671 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2672 "implementation"
2673 msgstr "malloc_get_state, malloc_set_state - malloc 実装の状態を保存/復元する"
2674
2675 #. type: Plain text
2676 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2677 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2678 #, no-wrap
2679 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2680 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2681
2682 #. type: Plain text
2683 #: build/C/man3/malloc_get_state.3:33
2684 #, no-wrap
2685 msgid "B<void* malloc_get_state(void);>\n"
2686 msgstr "B<void* malloc_get_state(void);>\n"
2687
2688 #. type: Plain text
2689 #: build/C/man3/malloc_get_state.3:35
2690 #, no-wrap
2691 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2692 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2693
2694 #. type: Plain text
2695 #: build/C/man3/malloc_get_state.3:53
2696 msgid ""
2697 "The B<malloc_get_state>()  function records the current state of all "
2698 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2699 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2700 "is recorded in a system-dependent opaque data structure dynamically "
2701 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2702 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2703 "this memory.)"
2704 msgstr ""
2705 "B<malloc_get_state>() 関数は B<malloc>(3) 内部のすべての管理用変数を記録する "
2706 "(ただし、 ヒープの実際の内容と B<malloc_hook>(3) 関数ポインターの状態は記録さ"
2707 "れない)。 状態は B<malloc>(3) で動的に確保されたシステム依存の opaque な (内"
2708 "部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体"
2709 "へのポインターが返される (このメモリーは呼び出し元が責任をもって B<free>(3) "
2710 "する必要がある)。"
2711
2712 #. type: Plain text
2713 #: build/C/man3/malloc_get_state.3:61
2714 msgid ""
2715 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2716 "internal bookkeeping variables to the values recorded in the opaque data "
2717 "structure pointed to by I<state>."
2718 msgstr ""
2719 "B<malloc_set_state>() 関数は、 B<malloc>(3) 内部のすべての管理用変数を "
2720 "I<state> が指す opaque なデータ構造体から復元する。"
2721
2722 #. type: Plain text
2723 #: build/C/man3/malloc_get_state.3:68
2724 msgid ""
2725 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2726 "opaque data structure.  On error (for example, memory could not be allocated "
2727 "for the data structure), B<malloc_get_state>()  returns NULL."
2728 msgstr ""
2729 "成功すると、 B<malloc_get_state>() は新しく割り当てられたデータ構造体へのポイ"
2730 "ンターを返す。 エラーの場合 (例えば、データ構造体に必要なメモリーが割り当てら"
2731 "れなかったなど)、 B<malloc_get_state>() は NULL を返す。"
2732
2733 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2734 #.  /* Must fail if the major version is too high. */
2735 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2736 #. type: Plain text
2737 #: build/C/man3/malloc_get_state.3:86
2738 msgid ""
2739 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2740 "that I<state> does not point to a correctly formed data structure, "
2741 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2742 "version of the data structure referred to by I<state> is a more recent "
2743 "version than this implementation knows about, B<malloc_set_state>()  returns "
2744 "-2."
2745 msgstr ""
2746 "成功すると、 B<malloc_set_state>() は 0 を返す。 実装が I<state> が正しく作成"
2747 "されたデータ構造体を指していないと検出した場合、 B<malloc_set_state>() は -1 "
2748 "を返す。 I<state> が参照するデータ構造体のバージョンがこの実装が認識するバー"
2749 "ジョンよりも新しいと実装が検出した場合、 B<malloc_set_state>() は -2 を返す。"
2750
2751 #. type: Plain text
2752 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2753 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2754 msgid "These functions are GNU extensions."
2755 msgstr "これらの関数は GNU による拡張である。"
2756
2757 #. type: Plain text
2758 #: build/C/man3/malloc_get_state.3:94
2759 msgid ""
2760 "These functions are useful when using this B<malloc>(3)  implementation as "
2761 "part of a shared library, and the heap contents are saved/restored via some "
2762 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2763 "\" function."
2764 msgstr ""
2765 "これらの関数が役に立つのは、 この B<malloc>(3) の実装が共有ライブラリの一部と"
2766 "して使用され、 ヒープの内容が何か他の方法で保存/復元される場合である。 この手"
2767 "法は GNU Emacs が「ダンプ」関数 (\"dumping\" function) を実装するのに使用され"
2768 "ている。"
2769
2770 #.  i.e., calls __malloc_check_init()
2771 #.  i.e., malloc checking is not already in use
2772 #.  and the caller requested malloc checking
2773 #. type: Plain text
2774 #: build/C/man3/malloc_get_state.3:111
2775 msgid ""
2776 "Hook function pointers are never saved or restored by these functions, with "
2777 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2778 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2779 "checking hooks if possible; if malloc checking was not in use in the "
2780 "recorded state, but the caller has requested malloc checking, then the hooks "
2781 "are reset to 0."
2782 msgstr ""
2783 "これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 "
2784 "つ例外がある。 B<malloc_get_state>() が呼び出された際に malloc チェック "
2785 "(B<mallopt>(3) 参照) が使用中の場合、 B<malloc_set_state>() は可能なら "
2786 "malloc チェックフックをリセットする。 また、 保存された状態の malloc チェック"
2787 "が使用中でないが、 呼び出し元が malloc チェックを要求していた場合、 フックは "
2788 "0 にリセットされる。"
2789
2790 #. type: Plain text
2791 #: build/C/man3/malloc_get_state.3:114
2792 msgid "B<malloc>(3), B<mallopt>(3)"
2793 msgstr "B<malloc>(3), B<mallopt>(3)"
2794
2795 #. type: TH
2796 #: build/C/man3/malloc_hook.3:10
2797 #, no-wrap
2798 msgid "MALLOC_HOOK"
2799 msgstr "MALLOC_HOOK"
2800
2801 #. type: TH
2802 #: build/C/man3/malloc_hook.3:10
2803 #, no-wrap
2804 msgid "2010-10-13"
2805 msgstr "2010-10-13"
2806
2807 #. type: Plain text
2808 #: build/C/man3/malloc_hook.3:15
2809 msgid ""
2810 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2811 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2812 msgstr ""
2813 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2814 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2815
2816 #. type: Plain text
2817 #: build/C/man3/malloc_hook.3:20
2818 #, no-wrap
2819 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2820 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2821
2822 #. type: Plain text
2823 #: build/C/man3/malloc_hook.3:23
2824 #, no-wrap
2825 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2826 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2827
2828 #. type: Plain text
2829 #: build/C/man3/malloc_hook.3:26
2830 #, no-wrap
2831 msgid ""
2832 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2833 "B<                         const void *>I<caller>B<);>\n"
2834 msgstr ""
2835 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2836 "B<                         const void *>I<caller>B<);>\n"
2837
2838 #. type: Plain text
2839 #: build/C/man3/malloc_hook.3:28
2840 #, no-wrap
2841 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2842 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2843
2844 #. type: Plain text
2845 #: build/C/man3/malloc_hook.3:30
2846 #, no-wrap
2847 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2848 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2849
2850 #. type: Plain text
2851 #: build/C/man3/malloc_hook.3:32
2852 #, no-wrap
2853 msgid "B<void (*__after_morecore_hook)(void);>\n"
2854 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2855
2856 #. type: Plain text
2857 #: build/C/man3/malloc_hook.3:43
2858 msgid ""
2859 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2860 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2861 "You can use these hooks to help you debug programs that use dynamic memory "
2862 "allocation, for example."
2863 msgstr ""
2864 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2865 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2866 "ば、動的にメモリー割り当てを行う プログラムのデバッグにこれらのフックを使うこ"
2867 "とができる。"
2868
2869 #. type: Plain text
2870 #: build/C/man3/malloc_hook.3:50
2871 msgid ""
2872 "The variable B<__malloc_initialize_hook> points at a function that is called "
2873 "once when the malloc implementation is initialized.  This is a weak "
2874 "variable, so it can be overridden in the application with a definition like "
2875 "the following:"
2876 msgstr ""
2877 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2878 "ばれる関数へのポインターである。 この変数は書き換え可能 (weak) であり、アプリ"
2879 "ケーション内で 以下のような定義で上書きできる:"
2880
2881 #. type: Plain text
2882 #: build/C/man3/malloc_hook.3:53
2883 #, no-wrap
2884 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2885 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2886
2887 #. type: Plain text
2888 #: build/C/man3/malloc_hook.3:58
2889 msgid ""
2890 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2891 msgstr ""
2892 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2893
2894 #. type: Plain text
2895 #: build/C/man3/malloc_hook.3:74
2896 msgid ""
2897 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2898 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2899 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2900 "except that they have a final argument I<caller> that gives the address of "
2901 "the caller of B<malloc>(3), etc."
2902 msgstr ""
2903 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2904 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2905 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2906 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2907 "出し元 (caller) のアドレスが格納される。"
2908
2909 #. type: Plain text
2910 #: build/C/man3/malloc_hook.3:80
2911 msgid ""
2912 "The variable B<__after_morecore_hook> points at a function that is called "
2913 "each time after B<sbrk>(2)  was asked for more memory."
2914 msgstr ""
2915 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2916 "後で毎回呼び出される関数へのポインターである。"
2917
2918 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2919 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2920 #. type: Plain text
2921 #: build/C/man3/malloc_hook.3:89
2922 msgid ""
2923 "The use of these hook functions is not safe in multithreaded programs, and "
2924 "they are now deprecated.  Programmers should instead preempt calls to the "
2925 "relevant functions by defining and exporting functions such as \"malloc\" "
2926 "and \"free\"."
2927 msgstr ""
2928 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2929 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2930 "公開して、 関連する関数を呼び出すようにすべきである。"
2931
2932 #. type: Plain text
2933 #: build/C/man3/malloc_hook.3:91
2934 msgid "Here is a short example of how to use these variables."
2935 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2936
2937 #. type: Plain text
2938 #: build/C/man3/malloc_hook.3:95
2939 #, no-wrap
2940 msgid ""
2941 "#include E<lt>stdio.hE<gt>\n"
2942 "#include E<lt>malloc.hE<gt>\n"
2943 msgstr ""
2944 "#include E<lt>stdio.hE<gt>\n"
2945 "#include E<lt>malloc.hE<gt>\n"
2946
2947 #. type: Plain text
2948 #: build/C/man3/malloc_hook.3:99
2949 #, no-wrap
2950 msgid ""
2951 "/* Prototypes for our hooks.  */\n"
2952 "static void my_init_hook(void);\n"
2953 "static void *my_malloc_hook(size_t, const void *);\n"
2954 msgstr ""
2955 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2956 "static void my_init_hook(void);\n"
2957 "static void *my_malloc_hook(size_t, const void *);\n"
2958
2959 #. type: Plain text
2960 #: build/C/man3/malloc_hook.3:102
2961 #, no-wrap
2962 msgid ""
2963 "/* Variables to save original hooks. */\n"
2964 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2965 msgstr ""
2966 "/* 元々のフックを保存するための変数 */\n"
2967 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2968
2969 #. type: Plain text
2970 #: build/C/man3/malloc_hook.3:105
2971 #, no-wrap
2972 msgid ""
2973 "/* Override initializing hook from the C library. */\n"
2974 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2975 msgstr ""
2976 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2977 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2978
2979 #. type: Plain text
2980 #: build/C/man3/malloc_hook.3:112
2981 #, no-wrap
2982 msgid ""
2983 "static void\n"
2984 "my_init_hook(void)\n"
2985 "{\n"
2986 "    old_malloc_hook = __malloc_hook;\n"
2987 "    __malloc_hook = my_malloc_hook;\n"
2988 "}\n"
2989 msgstr ""
2990 "static void\n"
2991 "my_init_hook(void)\n"
2992 "{\n"
2993 "    old_malloc_hook = __malloc_hook;\n"
2994 "    __malloc_hook = my_malloc_hook;\n"
2995 "}\n"
2996
2997 #. type: Plain text
2998 #: build/C/man3/malloc_hook.3:117
2999 #, no-wrap
3000 msgid ""
3001 "static void *\n"
3002 "my_malloc_hook(size_t size, const void *caller)\n"
3003 "{\n"
3004 "    void *result;\n"
3005 msgstr ""
3006 "static void *\n"
3007 "my_malloc_hook(size_t size, const void *caller)\n"
3008 "{\n"
3009 "    void *result;\n"
3010
3011 #. type: Plain text
3012 #: build/C/man3/malloc_hook.3:120
3013 #, no-wrap
3014 msgid ""
3015 "    /* Restore all old hooks */\n"
3016 "    __malloc_hook = old_malloc_hook;\n"
3017 msgstr ""
3018 "    /* 元々のフックを全て戻す */\n"
3019 "    __malloc_hook = old_malloc_hook;\n"
3020
3021 #. type: Plain text
3022 #: build/C/man3/malloc_hook.3:123
3023 #, no-wrap
3024 msgid ""
3025 "    /* Call recursively */\n"
3026 "    result = malloc(size);\n"
3027 msgstr ""
3028 "    /* malloc の再帰的呼び出し */\n"
3029 "    result = malloc(size);\n"
3030
3031 #. type: Plain text
3032 #: build/C/man3/malloc_hook.3:126
3033 #, no-wrap
3034 msgid ""
3035 "    /* Save underlying hooks */\n"
3036 "    old_malloc_hook = __malloc_hook;\n"
3037 msgstr ""
3038 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
3039 "    old_malloc_hook = __malloc_hook;\n"
3040
3041 #. type: Plain text
3042 #: build/C/man3/malloc_hook.3:130
3043 #, no-wrap
3044 msgid ""
3045 "    /* printf() might call malloc(), so protect it too. */\n"
3046 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3047 "            (unsigned int) size, caller, result);\n"
3048 msgstr ""
3049 "    /* printf() は malloc() を呼び出す可能性があるので\n"
3050 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
3051 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
3052 "            (unsigned int) size, caller, result);\n"
3053
3054 #. type: Plain text
3055 #: build/C/man3/malloc_hook.3:133
3056 #, no-wrap
3057 msgid ""
3058 "    /* Restore our own hooks */\n"
3059 "    __malloc_hook = my_malloc_hook;\n"
3060 msgstr ""
3061 "    /* ユーザーが使おうとするフックを再設定する */\n"
3062 "    __malloc_hook = my_malloc_hook;\n"
3063
3064 #. type: Plain text
3065 #: build/C/man3/malloc_hook.3:136
3066 #, no-wrap
3067 msgid ""
3068 "    return result;\n"
3069 "}\n"
3070 msgstr ""
3071 "    return result;\n"
3072 "}\n"
3073
3074 #. type: Plain text
3075 #: build/C/man3/malloc_hook.3:142
3076 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3077 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3078
3079 #. type: TH
3080 #: build/C/man3/malloc_info.3:25
3081 #, no-wrap
3082 msgid "MALLOC_INFO"
3083 msgstr "MALLOC_INFO"
3084
3085 #. type: Plain text
3086 #: build/C/man3/malloc_info.3:28
3087 msgid "malloc_info - export malloc state to a stream"
3088 msgstr "malloc_info - malloc の状態をストリームに出力する"
3089
3090 #. type: Plain text
3091 #: build/C/man3/malloc_info.3:33
3092 #, no-wrap
3093 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3094 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
3095
3096 #. type: Plain text
3097 #: build/C/man3/malloc_info.3:44
3098 msgid ""
3099 "The B<malloc_info>()  function exports an XML string that describes the "
3100 "current state of the memory-allocation implementation in the caller.  The "
3101 "string is printed on the file stream I<stream>.  The exported string "
3102 "includes information about all arenas (see B<malloc>(3))."
3103 msgstr ""
3104 "B<malloc_info>() 関数は、 呼び出し元のメモリー割り当て実装の現在の状態を表す "
3105 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<stream> に出力され"
3106 "る。 出力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) "
3107 "参照)。"
3108
3109 #. type: Plain text
3110 #: build/C/man3/malloc_info.3:48
3111 msgid "As currently implemented, I<options> must be zero."
3112 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3113
3114 #. type: Plain text
3115 #: build/C/man3/malloc_info.3:55
3116 msgid ""
3117 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3118 "I<errno> set to indicate the cause."
3119 msgstr ""
3120 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3121 "I<errno> にエラーの原因を示す値を設定する。"
3122
3123 #. type: Plain text
3124 #: build/C/man3/malloc_info.3:60
3125 msgid "I<options> was nonzero."
3126 msgstr "I<options> が 0 でなかった。"
3127
3128 #. type: Plain text
3129 #: build/C/man3/malloc_info.3:63
3130 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3131 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3132
3133 #. type: Plain text
3134 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3135 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3136 msgid "This function is a GNU extension."
3137 msgstr "この関数は GNU による拡張である。"
3138
3139 #. type: Plain text
3140 #: build/C/man3/malloc_info.3:71
3141 msgid ""
3142 "The memory-allocation information is provided as an XML string (rather than "
3143 "a C structure)  because the information may change over time (according to "
3144 "changes in the underlying implementation).  The output XML string includes a "
3145 "version field."
3146 msgstr ""
3147 "メモリー割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3148 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3149 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3150
3151 #. type: Plain text
3152 #: build/C/man3/malloc_info.3:77
3153 msgid ""
3154 "The B<open_memstream>(3)  function can be used to send the output of "
3155 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3156 msgstr ""
3157 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3158 "なくメモリー内のバッファーに直接送ることができる。"
3159
3160 #. type: Plain text
3161 #: build/C/man3/malloc_info.3:84
3162 msgid ""
3163 "The B<malloc_info>()  function is designed to address deficiencies in "
3164 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3165 msgstr ""
3166 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3167 "るために設定された。"
3168
3169 #. type: Plain text
3170 #: build/C/man3/malloc_info.3:95
3171 msgid ""
3172 "The program below takes up to four command-line arguments, of which the "
3173 "first three are mandatory.  The first argument specifies the number of "
3174 "threads that the program should create.  All of the threads, including the "
3175 "main thread, allocate the number of blocks of memory specified by the second "
3176 "argument.  The third argument controls the size of the blocks to be "
3177 "allocated.  The main thread creates blocks of this size, the second thread "
3178 "created by the program allocates blocks of twice this size, the third thread "
3179 "allocates blocks of three times this size, and so on."
3180 msgstr ""
3181 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3182 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3183 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリーブロックの割り当て"
3184 "を行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこ"
3185 "のサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこの"
3186 "サイズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイ"
3187 "ズのブロックを割り当て、 以下同様である。"
3188
3189 #. type: Plain text
3190 #: build/C/man3/malloc_info.3:102
3191 msgid ""
3192 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3193 "state.  The first call takes place before any threads are created or memory "
3194 "allocated.  The second call is performed after all threads have allocated "
3195 "memory."
3196 msgstr ""
3197 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリー割り当て状態を表示"
3198 "する。 最初の呼び出しはスレッドの生成もメモリーの割り当ても行われる前に実行さ"
3199 "れる。 2 回目の呼び出しは全てのスレッドがメモリー割り当てを行った後に実行され"
3200 "る。"
3201
3202 #. type: Plain text
3203 #: build/C/man3/malloc_info.3:110
3204 msgid ""
3205 "In the following example, the command-line arguments specify the creation of "
3206 "one additional thread, and both the main thread and the additional thread "
3207 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3208 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3209 msgstr ""
3210 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3211 "レッドと追加のスレッドの両方が 10000 個のメモリーブロックを割り当てるように指"
3212 "定している。 メモリーブロックの割り当て後の B<malloc_info>() では、 2 つの割"
3213 "り当て領域の状態が表示されている。"
3214
3215 #. type: Plain text
3216 #: build/C/man3/malloc_info.3:135
3217 #, no-wrap
3218 msgid ""
3219 "$ B<getconf GNU_LIBC_VERSION>\n"
3220 "glibc 2.13\n"
3221 "$ B<./a.out 1 10000 100>\n"
3222 "============ Before allocating blocks ============\n"
3223 "E<lt>malloc version=\"1\"E<gt>\n"
3224 "E<lt>heap nr=\"0\"E<gt>\n"
3225 "E<lt>sizesE<gt>\n"
3226 "E<lt>/sizesE<gt>\n"
3227 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3228 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3229 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3230 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3231 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3232 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3233 "E<lt>/heapE<gt>\n"
3234 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3235 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3236 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3237 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3238 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3239 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3240 "E<lt>/mallocE<gt>\n"
3241 msgstr ""
3242 "$ B<getconf GNU_LIBC_VERSION>\n"
3243 "glibc 2.13\n"
3244 "$ B<./a.out 1 10000 100>\n"
3245 "============ Before allocating blocks ============\n"
3246 "E<lt>malloc version=\"1\"E<gt>\n"
3247 "E<lt>heap nr=\"0\"E<gt>\n"
3248 "E<lt>sizesE<gt>\n"
3249 "E<lt>/sizesE<gt>\n"
3250 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3251 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3252 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3253 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3254 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3255 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3256 "E<lt>/heapE<gt>\n"
3257 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3258 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3259 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3260 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3261 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3262 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3263 "E<lt>/mallocE<gt>\n"
3264
3265 #. type: Plain text
3266 #: build/C/man3/malloc_info.3:165
3267 #, no-wrap
3268 msgid ""
3269 "============ After allocating blocks ============\n"
3270 "E<lt>malloc version=\"1\"E<gt>\n"
3271 "E<lt>heap nr=\"0\"E<gt>\n"
3272 "E<lt>sizesE<gt>\n"
3273 "E<lt>/sizesE<gt>\n"
3274 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3275 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3276 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3277 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3278 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3279 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3280 "E<lt>/heapE<gt>\n"
3281 "E<lt>heap nr=\"1\"E<gt>\n"
3282 "E<lt>sizesE<gt>\n"
3283 "E<lt>/sizesE<gt>\n"
3284 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3285 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3286 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3287 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3288 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3289 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3290 "E<lt>/heapE<gt>\n"
3291 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3292 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3293 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3294 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3295 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3296 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3297 "E<lt>/mallocE<gt>\n"
3298 msgstr ""
3299 "============ After allocating blocks ============\n"
3300 "E<lt>malloc version=\"1\"E<gt>\n"
3301 "E<lt>heap nr=\"0\"E<gt>\n"
3302 "E<lt>sizesE<gt>\n"
3303 "E<lt>/sizesE<gt>\n"
3304 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3305 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3306 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3307 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3308 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3309 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3310 "E<lt>/heapE<gt>\n"
3311 "E<lt>heap nr=\"1\"E<gt>\n"
3312 "E<lt>sizesE<gt>\n"
3313 "E<lt>/sizesE<gt>\n"
3314 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3315 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3316 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3317 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3318 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3319 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3320 "E<lt>/heapE<gt>\n"
3321 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3322 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3323 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3324 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3325 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3326 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3327 "E<lt>/mallocE<gt>\n"
3328
3329 #. type: Plain text
3330 #: build/C/man3/malloc_info.3:175
3331 #, no-wrap
3332 msgid ""
3333 "#include E<lt>unistd.hE<gt>\n"
3334 "#include E<lt>stdlib.hE<gt>\n"
3335 "#include E<lt>pthread.hE<gt>\n"
3336 "#include E<lt>malloc.hE<gt>\n"
3337 "#include E<lt>errno.hE<gt>\n"
3338 msgstr ""
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
3345 #. type: Plain text
3346 #: build/C/man3/malloc_info.3:178
3347 #, no-wrap
3348 msgid ""
3349 "static size_t blockSize;\n"
3350 "static int numThreads, numBlocks;\n"
3351 msgstr ""
3352 "static size_t blockSize;\n"
3353 "static int numThreads, numBlocks;\n"
3354
3355 #. type: Plain text
3356 #: build/C/man3/malloc_info.3:181 build/C/man2/memfd_create.2:368
3357 #: build/C/man2/memfd_create.2:450
3358 #, no-wrap
3359 msgid ""
3360 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3361 "                        } while (0)\n"
3362 msgstr ""
3363 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3364 "                        } while (0)\n"
3365
3366 #. type: Plain text
3367 #: build/C/man3/malloc_info.3:187
3368 #, no-wrap
3369 msgid ""
3370 "static void *\n"
3371 "thread_func(void *arg)\n"
3372 "{\n"
3373 "    int j;\n"
3374 "    int tn = (int) arg;\n"
3375 msgstr ""
3376 "static void *\n"
3377 "thread_func(void *arg)\n"
3378 "{\n"
3379 "    int j;\n"
3380 "    int tn = (int) arg;\n"
3381
3382 #. type: Plain text
3383 #: build/C/man3/malloc_info.3:190
3384 #, no-wrap
3385 msgid ""
3386 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3387 "       the main thread) allocates a different amount of memory */\n"
3388 msgstr ""
3389 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3390 "       the main thread) allocates a different amount of memory */\n"
3391
3392 #. type: Plain text
3393 #: build/C/man3/malloc_info.3:194
3394 #, no-wrap
3395 msgid ""
3396 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3397 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3398 "            errExit(\"malloc-thread\");\n"
3399 msgstr ""
3400 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3401 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3402 "            errExit(\"malloc-thread\");\n"
3403
3404 #. type: Plain text
3405 #: build/C/man3/malloc_info.3:198
3406 #, no-wrap
3407 msgid ""
3408 "    sleep(100);         /* Sleep until main thread terminates */\n"
3409 "    return NULL;\n"
3410 "}\n"
3411 msgstr ""
3412 "    sleep(100);         /* Sleep until main thread terminates */\n"
3413 "    return NULL;\n"
3414 "}\n"
3415
3416 #. type: Plain text
3417 #: build/C/man3/malloc_info.3:204
3418 #, no-wrap
3419 msgid ""
3420 "int\n"
3421 "main(int argc, char *argv[])\n"
3422 "{\n"
3423 "    int j, tn, sleepTime;\n"
3424 "    pthread_t *thr;\n"
3425 msgstr ""
3426 "int\n"
3427 "main(int argc, char *argv[])\n"
3428 "{\n"
3429 "    int j, tn, sleepTime;\n"
3430 "    pthread_t *thr;\n"
3431
3432 #. type: Plain text
3433 #: build/C/man3/malloc_info.3:211
3434 #, no-wrap
3435 msgid ""
3436 "    if (argc E<lt> 4) {\n"
3437 "        fprintf(stderr,\n"
3438 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3439 "                argv[0]);\n"
3440 "        exit(EXIT_FAILURE);\n"
3441 "    }\n"
3442 msgstr ""
3443 "    if (argc E<lt> 4) {\n"
3444 "        fprintf(stderr,\n"
3445 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3446 "                argv[0]);\n"
3447 "        exit(EXIT_FAILURE);\n"
3448 "    }\n"
3449
3450 #. type: Plain text
3451 #: build/C/man3/malloc_info.3:216
3452 #, no-wrap
3453 msgid ""
3454 "    numThreads = atoi(argv[1]);\n"
3455 "    numBlocks = atoi(argv[2]);\n"
3456 "    blockSize = atoi(argv[3]);\n"
3457 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3458 msgstr ""
3459 "    numThreads = atoi(argv[1]);\n"
3460 "    numBlocks = atoi(argv[2]);\n"
3461 "    blockSize = atoi(argv[3]);\n"
3462 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3463
3464 #. type: Plain text
3465 #: build/C/man3/malloc_info.3:220
3466 #, no-wrap
3467 msgid ""
3468 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3469 "    if (thr == NULL)\n"
3470 "        errExit(\"calloc\");\n"
3471 msgstr ""
3472 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3473 "    if (thr == NULL)\n"
3474 "        errExit(\"calloc\");\n"
3475
3476 #. type: Plain text
3477 #: build/C/man3/malloc_info.3:223
3478 #, no-wrap
3479 msgid ""
3480 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3481 "    malloc_info(0, stdout);\n"
3482 msgstr ""
3483 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3484 "    malloc_info(0, stdout);\n"
3485
3486 #. type: Plain text
3487 #: build/C/man3/malloc_info.3:225
3488 #, no-wrap
3489 msgid "    /* Create threads that allocate different amounts of memory */\n"
3490 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3491
3492 #. type: Plain text
3493 #: build/C/man3/malloc_info.3:231
3494 #, no-wrap
3495 msgid ""
3496 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3497 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3498 "                               (void *) tn);\n"
3499 "        if (errno != 0)\n"
3500 "            errExit(\"pthread_create\");\n"
3501 msgstr ""
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
3508 #. type: Plain text
3509 #: build/C/man3/malloc_info.3:236
3510 #, no-wrap
3511 msgid ""
3512 "        /* If we add a sleep interval after the start-up of each\n"
3513 "           thread, the threads likely won\\(aqt contend for malloc\n"
3514 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3515 "           allocated (see malloc(3)). */\n"
3516 msgstr ""
3517 "        /* If we add a sleep interval after the start-up of each\n"
3518 "           thread, the threads likely won\\(aqt contend for malloc\n"
3519 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3520 "           allocated (see malloc(3)). */\n"
3521
3522 #. type: Plain text
3523 #: build/C/man3/malloc_info.3:240
3524 #, no-wrap
3525 msgid ""
3526 "        if (sleepTime E<gt> 0)\n"
3527 "            sleep(sleepTime);\n"
3528 "    }\n"
3529 msgstr ""
3530 "        if (sleepTime E<gt> 0)\n"
3531 "            sleep(sleepTime);\n"
3532 "    }\n"
3533
3534 #. type: Plain text
3535 #: build/C/man3/malloc_info.3:242
3536 #, no-wrap
3537 msgid "    /* The main thread also allocates some memory */\n"
3538 msgstr "    /* The main thread also allocates some memory */\n"
3539
3540 #. type: Plain text
3541 #: build/C/man3/malloc_info.3:246
3542 #, no-wrap
3543 msgid ""
3544 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3545 "        if (malloc(blockSize) == NULL)\n"
3546 "            errExit(\"malloc\");\n"
3547 msgstr ""
3548 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3549 "        if (malloc(blockSize) == NULL)\n"
3550 "            errExit(\"malloc\");\n"
3551
3552 #. type: Plain text
3553 #: build/C/man3/malloc_info.3:249
3554 #, no-wrap
3555 msgid ""
3556 "    sleep(2);           /* Give all threads a chance to\n"
3557 "                           complete allocations */\n"
3558 msgstr ""
3559 "    sleep(2);           /* Give all threads a chance to\n"
3560 "                           complete allocations */\n"
3561
3562 #. type: Plain text
3563 #: build/C/man3/malloc_info.3:252
3564 #, no-wrap
3565 msgid ""
3566 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3567 "    malloc_info(0, stdout);\n"
3568 msgstr ""
3569 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3570 "    malloc_info(0, stdout);\n"
3571
3572 #. type: Plain text
3573 #: build/C/man3/malloc_info.3:262
3574 msgid ""
3575 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3576 "B<open_memstream>(3)"
3577 msgstr ""
3578 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3579 "B<open_memstream>(3)"
3580
3581 #. type: TH
3582 #: build/C/man3/malloc_stats.3:26
3583 #, no-wrap
3584 msgid "MALLOC_STATS"
3585 msgstr "MALLOC_STATS"
3586
3587 #. type: Plain text
3588 #: build/C/man3/malloc_stats.3:29
3589 msgid "malloc_stats - print memory allocation statistics"
3590 msgstr "malloc_stats - メモリー割り当ての統計を表示する"
3591
3592 #. type: Plain text
3593 #: build/C/man3/malloc_stats.3:33
3594 msgid "B<void malloc_stats(void);>"
3595 msgstr "B<void malloc_stats(void);>"
3596
3597 #.  .SH VERSIONS
3598 #.  Available already in glibc 2.0, possibly earlier
3599 #. type: Plain text
3600 #: build/C/man3/malloc_stats.3:55
3601 msgid ""
3602 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3603 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3604 "(allocation area), this function prints the total amount of memory allocated "
3605 "and the total number of bytes consumed by in-use allocations.  (These two "
3606 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3607 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3608 "statistics for all arenas, and the maximum number of blocks and bytes that "
3609 "were ever simultaneously allocated using B<mmap>(2)."
3610 msgstr ""
3611 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3612 "リーに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3613 "て、 この関数は割り当てられているメモリーの総量と現在の割り当てが使用している"
3614 "総バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる "
3615 "I<arena> と I<uordblks> フィールドに対応している)。 また、この関数は、 すべて"
3616 "の領域のこれら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てら"
3617 "れたブロック数とバイト数の最大値を表示する。"
3618
3619 #. type: Plain text
3620 #: build/C/man3/malloc_stats.3:61
3621 msgid ""
3622 "More detailed information about memory allocations in the main arena can be "
3623 "obtained using B<mallinfo>(3)."
3624 msgstr ""
3625 "B<mallinfo>(3) を使用すると、 メイン領域のメモリー割り当てに関するより詳細な"
3626 "情報を取得できる。"
3627
3628 #. type: Plain text
3629 #: build/C/man3/malloc_stats.3:67
3630 msgid ""
3631 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3632 msgstr ""
3633 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3634
3635 #. type: TH
3636 #: build/C/man3/malloc_trim.3:26
3637 #, no-wrap
3638 msgid "MALLOC_TRIM"
3639 msgstr "MALLOC_TRIM"
3640
3641 #. type: TH
3642 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3643 #, no-wrap
3644 msgid "2014-05-28"
3645 msgstr "2014-05-28"
3646
3647 #. type: Plain text
3648 #: build/C/man3/malloc_trim.3:29
3649 msgid "malloc_trim - release free memory from the top of the heap"
3650 msgstr "malloc_trim - ヒープの一番上から未使用メモリーを解放する"
3651
3652 #. type: Plain text
3653 #: build/C/man3/malloc_trim.3:33
3654 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3655 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3656
3657 #. type: Plain text
3658 #: build/C/man3/malloc_trim.3:40
3659 msgid ""
3660 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3661 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3662 msgstr ""
3663 "B<malloc_trim>() 関数は (適切な引き数で B<sbrk>(2) を呼び出して) ヒープの一番"
3664 "上の未使用メモリーの解放を試みる。"
3665
3666 #. type: Plain text
3667 #: build/C/man3/malloc_trim.3:51
3668 msgid ""
3669 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3670 "the top of the heap.  If this argument is 0, only the minimum amount of "
3671 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3672 "nonzero argument can be used to maintain some trailing space at the top of "
3673 "the heap in order to allow future allocations to be made without having to "
3674 "extend the heap with B<sbrk>(2)."
3675 msgstr ""
3676 "I<pad> 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定す"
3677 "る。 この引き数が 0 の場合、 ヒープの一番上の最小量のメモリーだけを維持でき"
3678 "る (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、 ヒープの一番上"
3679 "にある程度の量の未使用領域を残し、 将来の割り当てを B<sbrk>(2) でヒープを拡張"
3680 "せずに行えるようにできる。"
3681
3682 #. type: Plain text
3683 #: build/C/man3/malloc_trim.3:56
3684 msgid ""
3685 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3686 "back to the system, or 0 if it was not possible to release any memory."
3687 msgstr ""
3688 "B<malloc_trim>() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を"
3689 "返し、 どのメモリーも解放できなかった場合は 0 を返す。"
3690
3691 #.  .SH VERSIONS
3692 #.  Available already in glibc 2.0, possibly earlier
3693 #. type: Plain text
3694 #: build/C/man3/malloc_trim.3:60
3695 msgid "No errors are defined."
3696 msgstr "エラーは定義されていない。"
3697
3698 #. type: Plain text
3699 #: build/C/man3/malloc_trim.3:71
3700 msgid ""
3701 "This function is automatically called by B<free>(3)  in certain "
3702 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3703 "B<mallopt>(3)."
3704 msgstr ""
3705 "この関数は、 特定の状況では B<free>(3) により自動的に呼び出される。 "
3706 "B<mallopt>(3) の B<M_TOP_PAD> と B<M_TRIM_THRESHOLD> の議論を参照。"
3707
3708 #. type: Plain text
3709 #: build/C/man3/malloc_trim.3:74
3710 msgid ""
3711 "This function cannot release free memory located at places other than the "
3712 "top of the heap."
3713 msgstr ""
3714 "この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはでき"
3715 "ない。"
3716
3717 #.  malloc/malloc.c::mTRIm():
3718 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3719 #. type: Plain text
3720 #: build/C/man3/malloc_trim.3:78
3721 msgid "This function releases only memory in the main arena."
3722 msgstr "この関数はメイン領域のメモリーだけを解放する。"
3723
3724 #. type: Plain text
3725 #: build/C/man3/malloc_trim.3:82
3726 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3727 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3728
3729 #. type: TH
3730 #: build/C/man3/malloc_usable_size.3:25
3731 #, no-wrap
3732 msgid "MALLOC_USABLE_SIZE"
3733 msgstr "MALLOC_USABLE_SIZE"
3734
3735 #. type: Plain text
3736 #: build/C/man3/malloc_usable_size.3:28
3737 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3738 msgstr ""
3739 "malloc_usable_size - ヒープから確保したメモリーブロックのサイズを取得する"
3740
3741 #. type: Plain text
3742 #: build/C/man3/malloc_usable_size.3:32
3743 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3744 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3745
3746 #. type: Plain text
3747 #: build/C/man3/malloc_usable_size.3:40
3748 msgid ""
3749 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3750 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3751 "B<malloc>(3)  or a related function."
3752 msgstr ""
3753 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3754 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリーブロックへ"
3755 "のポインターである。"
3756
3757 #. type: Plain text
3758 #: build/C/man3/malloc_usable_size.3:48
3759 msgid ""
3760 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3761 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3762 msgstr ""
3763 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリーブロックで使用可"
3764 "能なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3765
3766 #. type: Plain text
3767 #: build/C/man3/malloc_usable_size.3:53
3768 msgid "The B<malloc_usable_size>()  function is thread-safe."
3769 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3770
3771 #. type: Plain text
3772 #: build/C/man3/malloc_usable_size.3:65
3773 msgid ""
3774 "The value returned by B<malloc_usable_size>()  may be greater than the "
3775 "requested size of the allocation because of alignment and minimum size "
3776 "constraints.  Although the excess bytes can be overwritten by the "
3777 "application without ill effects, this is not good programming practice: the "
3778 "number of excess bytes in an allocation depends on the underlying "
3779 "implementation."
3780 msgstr ""
3781 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3782 "がある。 これは、メモリーアラインメントと最小サイズの制約のためである。 この"
3783 "超過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行"
3784 "うのはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超"
3785 "過バイトの量は、内部の実装に依存する。"
3786
3787 #. type: Plain text
3788 #: build/C/man3/malloc_usable_size.3:67
3789 msgid "The main use of this function is for debugging and introspection."
3790 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3791
3792 #. type: Plain text
3793 #: build/C/man3/malloc_usable_size.3:69
3794 msgid "B<malloc>(3)"
3795 msgstr "B<malloc>(3)"
3796
3797 #. type: TH
3798 #: build/C/man3/mallopt.3:26
3799 #, no-wrap
3800 msgid "MALLOPT"
3801 msgstr "MALLOPT"
3802
3803 #. type: TH
3804 #: build/C/man3/mallopt.3:26 build/C/man2/shmop.2:41
3805 #, no-wrap
3806 msgid "2014-07-08"
3807 msgstr "2014-07-08"
3808
3809 #. type: Plain text
3810 #: build/C/man3/mallopt.3:29
3811 msgid "mallopt - set memory allocation parameters"
3812 msgstr "mallopt - メモリー割り当てパラメーターを設定する"
3813
3814 #. type: Plain text
3815 #: build/C/man3/mallopt.3:33
3816 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3817 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3818
3819 #. type: Plain text
3820 #: build/C/man3/mallopt.3:44
3821 msgid ""
3822 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3823 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3824 "specifies the parameter to be modified, and I<value> specifies the new value "
3825 "for that parameter."
3826 msgstr ""
3827 "B<mallopt>() 関数は、メモリー割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3828 "制御するパラメーターの調整を行う。\n"
3829 "I<param> 引き数で変更するパラメーターを指定し、\n"
3830 "I<value> 引き数でそのパラメーターの新しい値を指定する。"
3831
3832 #. type: Plain text
3833 #: build/C/man3/mallopt.3:47
3834 msgid "The following values can be specified for I<param>:"
3835 msgstr "I<param> には以下の値を指定することができる。"
3836
3837 #. type: TP
3838 #: build/C/man3/mallopt.3:47
3839 #, no-wrap
3840 msgid "B<M_CHECK_ACTION>"
3841 msgstr "B<M_CHECK_ACTION>"
3842
3843 #. type: Plain text
3844 #: build/C/man3/mallopt.3:53
3845 msgid ""
3846 "Setting this parameter controls how glibc responds when various kinds of "
3847 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3848 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3849 "parameter determine the glibc behavior, as follows:"
3850 msgstr ""
3851
3852 #. type: TP
3853 #: build/C/man3/mallopt.3:54
3854 #, no-wrap
3855 msgid "Bit 0"
3856 msgstr "Bit 0"
3857
3858 #. type: Plain text
3859 #: build/C/man3/mallopt.3:64
3860 msgid ""
3861 "If this bit is set, then print a one-line message on I<stderr> that provides "
3862 "details about the error.  The message starts with the string \"***\\ glibc "
3863 "detected\\ ***\", followed by the program name, the name of the memory-"
3864 "allocation function in which the error was detected, a brief description of "
3865 "the error, and the memory address where the error was detected."
3866 msgstr ""
3867
3868 #. type: TP
3869 #: build/C/man3/mallopt.3:64
3870 #, no-wrap
3871 msgid "Bit 1"
3872 msgstr "Bit 1"
3873
3874 #. type: Plain text
3875 #: build/C/man3/mallopt.3:79
3876 msgid ""
3877 "If this bit is set, then, after printing any error message specified by bit "
3878 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3879 "since 2.4, if bit 0 is also set, then, between printing the error message "
3880 "and aborting, the program also prints a stack trace in the manner of "
3881 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3882 "proc/[pid]/maps> (see B<proc>(5))."
3883 msgstr ""
3884
3885 #. type: TP
3886 #: build/C/man3/mallopt.3:79
3887 #, no-wrap
3888 msgid "Bit 2 (since glibc 2.4)"
3889 msgstr "Bit 2 (glibc 2.4 以降)"
3890
3891 #. type: Plain text
3892 #: build/C/man3/mallopt.3:86
3893 msgid ""
3894 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3895 "the one-line message describing the error is simplified to contain just the "
3896 "name of the function where the error was detected and the brief description "
3897 "of the error."
3898 msgstr ""
3899
3900 #. type: Plain text
3901 #: build/C/man3/mallopt.3:91
3902 msgid "The remaining bits in I<value> are ignored."
3903 msgstr ""
3904
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:95
3907 msgid ""
3908 "Combining the above details, the following numeric values are meaningful for "
3909 "B<M_CHECK_ACTION>:"
3910 msgstr ""
3911
3912 #. type: IP
3913 #: build/C/man3/mallopt.3:96
3914 #, no-wrap
3915 msgid "0"
3916 msgstr "0"
3917
3918 #. type: Plain text
3919 #: build/C/man3/mallopt.3:98
3920 msgid "Ignore error conditions; continue execution (with undefined results)."
3921 msgstr ""
3922
3923 #. type: IP
3924 #: build/C/man3/mallopt.3:98
3925 #, no-wrap
3926 msgid "1"
3927 msgstr "1"
3928
3929 #. type: Plain text
3930 #: build/C/man3/mallopt.3:100
3931 msgid "Print a detailed error message and continue execution."
3932 msgstr ""
3933
3934 #. type: IP
3935 #: build/C/man3/mallopt.3:100
3936 #, no-wrap
3937 msgid "2"
3938 msgstr "2"
3939
3940 #. type: Plain text
3941 #: build/C/man3/mallopt.3:102
3942 msgid "Abort the program."
3943 msgstr ""
3944
3945 #. type: IP
3946 #: build/C/man3/mallopt.3:102
3947 #, no-wrap
3948 msgid "3"
3949 msgstr "3"
3950
3951 #. type: Plain text
3952 #: build/C/man3/mallopt.3:105
3953 msgid ""
3954 "Print detailed error message, stack trace, and memory mappings, and abort "
3955 "the program."
3956 msgstr ""
3957
3958 #. type: IP
3959 #: build/C/man3/mallopt.3:105
3960 #, no-wrap
3961 msgid "5"
3962 msgstr "5"
3963
3964 #. type: Plain text
3965 #: build/C/man3/mallopt.3:107
3966 msgid "Print a simple error message and continue execution."
3967 msgstr ""
3968
3969 #. type: IP
3970 #: build/C/man3/mallopt.3:107
3971 #, no-wrap
3972 msgid "7"
3973 msgstr "7"
3974
3975 #. type: Plain text
3976 #: build/C/man3/mallopt.3:110
3977 msgid ""
3978 "Print simple error message, stack trace, and memory mappings, and abort the "
3979 "program."
3980 msgstr ""
3981
3982 #. type: Plain text
3983 #: build/C/man3/mallopt.3:116
3984 msgid ""
3985 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3986 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3987 msgstr ""
3988
3989 #. type: Plain text
3990 #: build/C/man3/mallopt.3:121
3991 msgid ""
3992 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3993 "crash may happen much later, and the true cause of the problem is then very "
3994 "hard to track down."
3995 msgstr ""
3996
3997 #. type: TP
3998 #: build/C/man3/mallopt.3:121
3999 #, no-wrap
4000 msgid "B<M_MMAP_MAX>"
4001 msgstr "B<M_MMAP_MAX>"
4002
4003 #.  The following text adapted from comments in the glibc source:
4004 #. type: Plain text
4005 #: build/C/man3/mallopt.3:131
4006 msgid ""
4007 "This parameter specifies the maximum number of allocation requests that may "
4008 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
4009 "some systems have a limited number of internal tables for use by B<mmap>(2), "
4010 "and using more than a few of them may degrade performance."
4011 msgstr ""
4012
4013 #. type: Plain text
4014 #: build/C/man3/mallopt.3:138
4015 msgid ""
4016 "The default value is 65,536, a value which has no special significance and "
4017 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
4018 "use of B<mmap>(2)  for servicing large allocation requests."
4019 msgstr ""
4020
4021 #. type: TP
4022 #: build/C/man3/mallopt.3:138
4023 #, no-wrap
4024 msgid "B<M_MMAP_THRESHOLD>"
4025 msgstr "B<M_MMAP_THRESHOLD>"
4026
4027 #. type: Plain text
4028 #: build/C/man3/mallopt.3:147
4029 msgid ""
4030 "For allocations greater than or equal to the limit specified (in bytes) by "
4031 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
4032 "allocation functions employ B<mmap>(2)  instead of increasing the program "
4033 "break using B<sbrk>(2)."
4034 msgstr ""
4035
4036 #. type: Plain text
4037 #: build/C/man3/mallopt.3:167
4038 msgid ""
4039 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
4040 "allocated memory blocks can always be independently released back to the "
4041 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
4042 "the top end.)  On the other hand, there are some disadvantages to the use of "
4043 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
4044 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
4045 "be page-aligned; and the kernel must perform the expensive task of zeroing "
4046 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
4047 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
4048 msgstr ""
4049
4050 #. type: Plain text
4051 #: build/C/man3/mallopt.3:174
4052 msgid ""
4053 "The lower limit for this parameter is 0.  The upper limit is "
4054 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
4055 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
4056 msgstr ""
4057
4058 #. type: Plain text
4059 #: build/C/man3/mallopt.3:192
4060 msgid ""
4061 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
4062 "initial value of the threshold is 128*1024, but when blocks larger than the "
4063 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
4064 "are freed, the threshold is adjusted upward to the size of the freed block.  "
4065 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
4066 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
4067 "Dynamic adjustment of the mmap threshold is disabled if any of the "
4068 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
4069 "parameters is set."
4070 msgstr ""
4071
4072 #. type: TP
4073 #: build/C/man3/mallopt.3:192
4074 #, no-wrap
4075 msgid "B<M_MXFAST> (since glibc 2.3)"
4076 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
4077
4078 #.  The following text adapted from comments in the glibc sources:
4079 #. type: Plain text
4080 #: build/C/man3/mallopt.3:212
4081 msgid ""
4082 "Set the upper limit for memory allocation requests that are satisfied using "
4083 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
4084 "are storage areas that hold deallocated blocks of memory of the same size "
4085 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
4086 "the same size can be handled very quickly by allocating from the fastbin, "
4087 "although memory fragmentation and the overall memory footprint of the "
4088 "program can increase.  The default value for this parameter is "
4089 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
4090 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
4091 "disables the use of fastbins."
4092 msgstr ""
4093
4094 #. type: TP
4095 #: build/C/man3/mallopt.3:212
4096 #, no-wrap
4097 msgid "B<M_PERTURB> (since glibc 2.4)"
4098 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4099
4100 #. type: Plain text
4101 #: build/C/man3/mallopt.3:227
4102 msgid ""
4103 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4104 "(other than allocations via B<calloc>(3))  are initialized to the complement "
4105 "of the value in the least significant byte of I<value>, and when allocated "
4106 "memory is released using B<free>(3), the freed bytes are set to the least "
4107 "significant byte of I<value>.  This can be useful for detecting errors where "
4108 "programs incorrectly rely on allocated memory being initialized to zero, or "
4109 "reuse values in memory that has already been freed."
4110 msgstr ""
4111
4112 #. type: TP
4113 #: build/C/man3/mallopt.3:227
4114 #, no-wrap
4115 msgid "B<M_TOP_PAD>"
4116 msgstr "B<M_TOP_PAD>"
4117
4118 #. type: Plain text
4119 #: build/C/man3/mallopt.3:234
4120 msgid ""
4121 "This parameter defines the amount of padding to employ when calling "
4122 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4123 "parameter is bytes.)  This parameter has an effect in the following "
4124 "circumstances:"
4125 msgstr ""
4126
4127 #. type: Plain text
4128 #: build/C/man3/mallopt.3:241
4129 msgid ""
4130 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4131 "the B<sbrk>(2)  request."
4132 msgstr ""
4133
4134 #. type: Plain text
4135 #: build/C/man3/mallopt.3:247
4136 msgid ""
4137 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4138 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4139 "top of the heap."
4140 msgstr ""
4141
4142 #. type: Plain text
4143 #: build/C/man3/mallopt.3:251
4144 msgid ""
4145 "In either case, the amount of padding is always rounded to a system page "
4146 "boundary."
4147 msgstr ""
4148
4149 #. type: Plain text
4150 #: build/C/man3/mallopt.3:258
4151 msgid ""
4152 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4153 "system calls (when the parameter is set low)  and wasting unused memory at "
4154 "the top of the heap (when the parameter is set high)."
4155 msgstr ""
4156
4157 #.  DEFAULT_TOP_PAD in glibc source
4158 #. type: Plain text
4159 #: build/C/man3/mallopt.3:261
4160 msgid "The default value for this parameter is 128*1024."
4161 msgstr ""
4162
4163 #. type: TP
4164 #: build/C/man3/mallopt.3:261
4165 #, no-wrap
4166 msgid "B<M_TRIM_THRESHOLD>"
4167 msgstr "B<M_TRIM_THRESHOLD>"
4168
4169 #. type: Plain text
4170 #: build/C/man3/mallopt.3:277
4171 msgid ""
4172 "When the amount of contiguous free memory at the top of the heap grows "
4173 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4174 "back to the system.  (This can be useful in programs that continue to "
4175 "execute for a long period after freeing a significant amount of memory.)  "
4176 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4177 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4178 msgstr ""
4179
4180 #. type: Plain text
4181 #: build/C/man3/mallopt.3:282
4182 msgid ""
4183 "The default value for this parameter is 128*1024.  Setting "
4184 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4185 msgstr ""
4186
4187 #
4188 #
4189 #
4190 #.  FIXME Do the arena parameters need to be documented?
4191 #.  .TP
4192 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4193 #.  .TP
4194 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4195 #.  Environment variables
4196 #.      MALLOC_ARENA_MAX_
4197 #.      MALLOC_ARENA_TEST_
4198 #.  http://udrepper.livejournal.com/20948.html describes some details
4199 #.      of the MALLOC_ARENA_* environment variables.
4200 #.  These macros aren't enabled in production releases until 2.15?
4201 #.  (see glibc malloc/Makefile)
4202 #. type: Plain text
4203 #: build/C/man3/mallopt.3:305
4204 msgid ""
4205 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4206 "of system calls (when the parameter is set low)  and wasting unused memory "
4207 "at the top of the heap (when the parameter is set high)."
4208 msgstr ""
4209
4210 #. type: SS
4211 #: build/C/man3/mallopt.3:305
4212 #, no-wrap
4213 msgid "Environment variables"
4214 msgstr "環境変数"
4215
4216 #. type: Plain text
4217 #: build/C/man3/mallopt.3:320
4218 msgid ""
4219 "A number of environment variables can be defined to modify some of the same "
4220 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4221 "advantage that the source code of the program need not be changed.  To be "
4222 "effective, these variables must be defined before the first call to a memory-"
4223 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4224 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4225 "these variables are ignored in set-user-ID and set-group-ID programs."
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man3/mallopt.3:323
4230 msgid ""
4231 "The environment variables are as follows (note the trailing underscore at "
4232 "the end of the name of each variable):"
4233 msgstr ""
4234
4235 #. type: TP
4236 #: build/C/man3/mallopt.3:323
4237 #, no-wrap
4238 msgid "B<MALLOC_CHECK_>"
4239 msgstr "B<MALLOC_CHECK_>"
4240
4241 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4242 #.  when MALLOC_CHECK_ was set.
4243 #. type: Plain text
4244 #: build/C/man3/mallopt.3:340
4245 msgid ""
4246 "This environment variable controls the same parameter as B<mallopt>()  "
4247 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4248 "special implementation of the memory-allocation functions is used.  (This is "
4249 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4250 "performs additional error checking, but is slower than the standard set of "
4251 "memory-allocation functions.  (This implementation does not detect all "
4252 "possible errors; memory leaks can still occur.)"
4253 msgstr ""
4254
4255 #. type: Plain text
4256 #: build/C/man3/mallopt.3:345
4257 msgid ""
4258 "The value assigned to this environment variable should be a single digit, "
4259 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4260 "the initial digit are ignored."
4261 msgstr ""
4262
4263 #. type: Plain text
4264 #: build/C/man3/mallopt.3:354
4265 msgid ""
4266 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4267 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4268 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4269 "also has an effect for set-user-ID and set-group-ID programs."
4270 msgstr ""
4271
4272 #. type: TP
4273 #: build/C/man3/mallopt.3:354
4274 #, no-wrap
4275 msgid "B<MALLOC_MMAP_MAX_>"
4276 msgstr "B<MALLOC_MMAP_MAX_>"
4277
4278 #. type: Plain text
4279 #: build/C/man3/mallopt.3:359
4280 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4281 msgstr ""
4282
4283 #. type: TP
4284 #: build/C/man3/mallopt.3:359
4285 #, no-wrap
4286 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4287 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4288
4289 #. type: Plain text
4290 #: build/C/man3/mallopt.3:364
4291 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4292 msgstr ""
4293
4294 #. type: TP
4295 #: build/C/man3/mallopt.3:364
4296 #, no-wrap
4297 msgid "B<MALLOC_PERTURB_>"
4298 msgstr "B<MALLOC_PERTURB_>"
4299
4300 #. type: Plain text
4301 #: build/C/man3/mallopt.3:369
4302 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4303 msgstr ""
4304
4305 #. type: TP
4306 #: build/C/man3/mallopt.3:369
4307 #, no-wrap
4308 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4309 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4310
4311 #. type: Plain text
4312 #: build/C/man3/mallopt.3:374
4313 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4314 msgstr ""
4315
4316 #. type: TP
4317 #: build/C/man3/mallopt.3:374
4318 #, no-wrap
4319 msgid "B<MALLOC_TOP_PAD_>"
4320 msgstr "B<MALLOC_TOP_PAD_>"
4321
4322 #. type: Plain text
4323 #: build/C/man3/mallopt.3:379
4324 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4325 msgstr ""
4326
4327 #. type: Plain text
4328 #: build/C/man3/mallopt.3:384
4329 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4330 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4331
4332 #.  .SH VERSIONS
4333 #.  Available already in glibc 2.0, possibly earlier
4334 #. type: Plain text
4335 #: build/C/man3/mallopt.3:392
4336 msgid "On error, I<errno> is I<not> set."
4337 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4338
4339 #.  .SH NOTES
4340 #. type: Plain text
4341 #: build/C/man3/mallopt.3:406
4342 msgid ""
4343 "This function is not specified by POSIX or the C standards.  A similar "
4344 "function exists on many System V derivatives, but the range of values for "
4345 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4346 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4347 "implemented in glibc."
4348 msgstr ""
4349
4350 #. type: Plain text
4351 #: build/C/man3/mallopt.3:410
4352 msgid "Specifying an invalid value for I<param> does not generate an error."
4353 msgstr ""
4354
4355 #.  FIXME . This looks buggy:
4356 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4357 #.  malloc requests are rounded up:
4358 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4359 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4360 #. type: Plain text
4361 #: build/C/man3/mallopt.3:418
4362 msgid ""
4363 "A calculation error within the glibc implementation means that a call of the "
4364 "form:"
4365 msgstr ""
4366
4367 #. type: Plain text
4368 #: build/C/man3/mallopt.3:421
4369 #, no-wrap
4370 msgid "    mallopt(M_MXFAST, n)\n"
4371 msgstr "    mallopt(M_MXFAST, n)\n"
4372
4373 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4374 #. type: Plain text
4375 #: build/C/man3/mallopt.3:433
4376 msgid ""
4377 "does not result in fastbins being employed for all allocations of size up to "
4378 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4379 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4380 "integer."
4381 msgstr ""
4382
4383 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4384 #. type: Plain text
4385 #: build/C/man3/mallopt.3:454
4386 msgid ""
4387 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4388 "of allocated memory are initialized to the complement of the byte in "
4389 "I<value>, and when that memory is freed, the bytes of the region are "
4390 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4391 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4392 "precisely the block of memory being freed by the call I<free(p)>, the block "
4393 "starting at I<p+sizeof(size_t)> is initialized."
4394 msgstr ""
4395
4396 #. type: Plain text
4397 #: build/C/man3/mallopt.3:463
4398 msgid ""
4399 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4400 "is supplied with an (integer) command-line argument, then that argument is "
4401 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4402 "block of memory, and frees it twice (an error)."
4403 msgstr ""
4404
4405 #. type: Plain text
4406 #: build/C/man3/mallopt.3:467
4407 msgid ""
4408 "The following shell session shows what happens when we run this program "
4409 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4410 msgstr ""
4411
4412 #. type: Plain text
4413 #: build/C/man3/mallopt.3:487
4414 #, no-wrap
4415 msgid ""
4416 "$ B<./a.out>\n"
4417 "main(): returned from first free() call\n"
4418 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4419 "======= Backtrace: =========\n"
4420 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4421 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4422 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4423 "\\&./a.out[0x80485db]\n"
4424 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4425 "\\&./a.out[0x8048471]\n"
4426 "======= Memory map: ========\n"
4427 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4428 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4429 "[some lines omitted]\n"
4430 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4431 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4432 "Aborted (core dumped)\n"
4433 msgstr ""
4434 "$ B<./a.out>\n"
4435 "main(): returned from first free() call\n"
4436 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4437 "======= Backtrace: =========\n"
4438 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4439 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4440 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4441 "\\&./a.out[0x80485db]\n"
4442 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4443 "\\&./a.out[0x8048471]\n"
4444 "======= Memory map: ========\n"
4445 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4446 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4447 "[some lines omitted]\n"
4448 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4449 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4450 "Aborted (core dumped)\n"
4451
4452 #. type: Plain text
4453 #: build/C/man3/mallopt.3:492
4454 msgid ""
4455 "The following runs show the results when employing other values for "
4456 "B<M_CHECK_ACTION>:"
4457 msgstr ""
4458
4459 #. type: Plain text
4460 #: build/C/man3/mallopt.3:505
4461 #, no-wrap
4462 msgid ""
4463 "$ B<./a.out 1>             # Diagnose error and continue\n"
4464 "main(): returned from first free() call\n"
4465 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4466 "main(): returned from second free() call\n"
4467 "$ B<./a.out 2>             # Abort without error message\n"
4468 "main(): returned from first free() call\n"
4469 "Aborted (core dumped)\n"
4470 "$ B<./a.out 0>             # Ignore error and continue\n"
4471 "main(): returned from first free() call\n"
4472 "main(): returned from second free() call\n"
4473 msgstr ""
4474 "$ B<./a.out 1>             # Diagnose error and continue\n"
4475 "main(): returned from first free() call\n"
4476 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4477 "main(): returned from second free() call\n"
4478 "$ B<./a.out 2>             # Abort without error message\n"
4479 "main(): returned from first free() call\n"
4480 "Aborted (core dumped)\n"
4481 "$ B<./a.out 0>             # Ignore error and continue\n"
4482 "main(): returned from first free() call\n"
4483 "main(): returned from second free() call\n"
4484
4485 #. type: Plain text
4486 #: build/C/man3/mallopt.3:511
4487 msgid ""
4488 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4489 "environment variable:"
4490 msgstr ""
4491
4492 #. type: Plain text
4493 #: build/C/man3/mallopt.3:518
4494 #, no-wrap
4495 msgid ""
4496 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4497 "main(): returned from first free() call\n"
4498 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4499 "main(): returned from second free() call\n"
4500 msgstr ""
4501 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4502 "main(): returned from first free() call\n"
4503 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4504 "main(): returned from second free() call\n"
4505
4506 #. type: Plain text
4507 #: build/C/man3/mallopt.3:526
4508 #, no-wrap
4509 msgid ""
4510 "#include E<lt>malloc.hE<gt>\n"
4511 "#include E<lt>stdio.hE<gt>\n"
4512 "#include E<lt>stdlib.hE<gt>\n"
4513 msgstr ""
4514 "#include E<lt>malloc.hE<gt>\n"
4515 "#include E<lt>stdio.hE<gt>\n"
4516 "#include E<lt>stdlib.hE<gt>\n"
4517
4518 #. type: Plain text
4519 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4520 #, no-wrap
4521 msgid ""
4522 "int\n"
4523 "main(int argc, char *argv[])\n"
4524 "{\n"
4525 "    char *p;\n"
4526 msgstr ""
4527 "int\n"
4528 "main(int argc, char *argv[])\n"
4529 "{\n"
4530 "    char *p;\n"
4531
4532 #. type: Plain text
4533 #: build/C/man3/mallopt.3:538
4534 #, no-wrap
4535 msgid ""
4536 "    if (argc E<gt> 1) {\n"
4537 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4538 "            fprintf(stderr, \"mallopt() failed\");\n"
4539 "            exit(EXIT_FAILURE);\n"
4540 "        }\n"
4541 "    }\n"
4542 msgstr ""
4543 "    if (argc E<gt> 1) {\n"
4544 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4545 "            fprintf(stderr, \"mallopt() failed\");\n"
4546 "            exit(EXIT_FAILURE);\n"
4547 "        }\n"
4548 "    }\n"
4549
4550 #. type: Plain text
4551 #: build/C/man3/mallopt.3:544
4552 #, no-wrap
4553 msgid ""
4554 "    p = malloc(1000);\n"
4555 "    if (p == NULL) {\n"
4556 "        fprintf(stderr, \"malloc() failed\");\n"
4557 "        exit(EXIT_FAILURE);\n"
4558 "    }\n"
4559 msgstr ""
4560 "    p = malloc(1000);\n"
4561 "    if (p == NULL) {\n"
4562 "        fprintf(stderr, \"malloc() failed\");\n"
4563 "        exit(EXIT_FAILURE);\n"
4564 "    }\n"
4565
4566 #. type: Plain text
4567 #: build/C/man3/mallopt.3:547
4568 #, no-wrap
4569 msgid ""
4570 "    free(p);\n"
4571 "    printf(\"main(): returned from first free() call\\en\");\n"
4572 msgstr ""
4573 "    free(p);\n"
4574 "    printf(\"main(): returned from first free() call\\en\");\n"
4575
4576 #. type: Plain text
4577 #: build/C/man3/mallopt.3:550
4578 #, no-wrap
4579 msgid ""
4580 "    free(p);\n"
4581 "    printf(\"main(): returned from second free() call\\en\");\n"
4582 msgstr ""
4583 "    free(p);\n"
4584 "    printf(\"main(): returned from second free() call\\en\");\n"
4585
4586 #. type: Plain text
4587 #: build/C/man3/mallopt.3:568
4588 msgid ""
4589 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4590 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4591 "B<mtrace>(3), B<posix_memalign>(3)"
4592 msgstr ""
4593 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4594 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4595 "B<mtrace>(3), B<posix_memalign>(3)"
4596
4597 #. type: TH
4598 #: build/C/man3/mcheck.3:25
4599 #, no-wrap
4600 msgid "MCHECK"
4601 msgstr "MCHECK"
4602
4603 #. type: TH
4604 #: build/C/man3/mcheck.3:25
4605 #, no-wrap
4606 msgid "2014-01-11"
4607 msgstr "2014-01-11"
4608
4609 #. type: Plain text
4610 #: build/C/man3/mcheck.3:28
4611 msgid ""
4612 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4613 msgstr ""
4614
4615 #. type: Plain text
4616 #: build/C/man3/mcheck.3:31
4617 #, no-wrap
4618 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4619 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4620
4621 #. type: Plain text
4622 #: build/C/man3/mcheck.3:33
4623 #, no-wrap
4624 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4625 msgstr ""
4626
4627 #. type: Plain text
4628 #: build/C/man3/mcheck.3:35
4629 #, no-wrap
4630 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4631 msgstr ""
4632
4633 #. type: Plain text
4634 #: build/C/man3/mcheck.3:37
4635 #, no-wrap
4636 msgid "B<void mcheck_check_all(void);>\n"
4637 msgstr "B<void mcheck_check_all(void);>\n"
4638
4639 #. type: Plain text
4640 #: build/C/man3/mcheck.3:39
4641 #, no-wrap
4642 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4643 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4644
4645 #. type: Plain text
4646 #: build/C/man3/mcheck.3:51
4647 msgid ""
4648 "The B<mcheck>()  function installs a set of debugging hooks for the "
4649 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4650 "certain consistency checks to be performed on the state of the heap.  The "
4651 "checks can detect application errors such as freeing a block of memory more "
4652 "than once or corrupting the bookkeeping data structures that immediately "
4653 "precede a block of allocated memory."
4654 msgstr ""
4655
4656 #. type: Plain text
4657 #: build/C/man3/mcheck.3:63
4658 msgid ""
4659 "To be effective, the B<mcheck>()  function must be called before the first "
4660 "call to B<malloc>(3)  or a related function.  In cases where this is "
4661 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4662 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4663 "to a memory-allocation function."
4664 msgstr ""
4665
4666 #. type: Plain text
4667 #: build/C/man3/mcheck.3:71
4668 msgid ""
4669 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4670 "checks on all allocated blocks whenever one of the memory-allocation "
4671 "functions is called.  This can be very slow!"
4672 msgstr ""
4673
4674 #. type: Plain text
4675 #: build/C/man3/mcheck.3:78
4676 msgid ""
4677 "The B<mcheck_check_all>()  function causes an immediate check on all "
4678 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4679 "beforehand."
4680 msgstr ""
4681
4682 #. type: Plain text
4683 #: build/C/man3/mcheck.3:91
4684 msgid ""
4685 "If the system detects an inconsistency in the heap, the caller-supplied "
4686 "function pointed to by I<abortfunc> is invoked with a single argument "
4687 "argument, I<mstatus>, that indicates what type of inconsistency was "
4688 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4689 "message on I<stderr> and calls B<abort>(3)."
4690 msgstr ""
4691
4692 #. type: Plain text
4693 #: build/C/man3/mcheck.3:103
4694 msgid ""
4695 "The B<mprobe>()  function performs a consistency check on the block of "
4696 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4697 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4698 msgstr ""
4699
4700 #. type: Plain text
4701 #: build/C/man3/mcheck.3:111
4702 msgid ""
4703 "The following list describes the values returned by B<mprobe>()  or passed "
4704 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4705 msgstr ""
4706
4707 #. type: TP
4708 #: build/C/man3/mcheck.3:111
4709 #, no-wrap
4710 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4711 msgstr ""
4712
4713 #. type: Plain text
4714 #: build/C/man3/mcheck.3:116
4715 msgid ""
4716 "B<mcheck>()  was not called before the first memory allocation function was "
4717 "called.  Consistency checking is not possible."
4718 msgstr ""
4719
4720 #. type: TP
4721 #: build/C/man3/mcheck.3:116
4722 #, no-wrap
4723 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4724 msgstr ""
4725
4726 #. type: Plain text
4727 #: build/C/man3/mcheck.3:119
4728 msgid "No inconsistency detected."
4729 msgstr ""
4730
4731 #. type: TP
4732 #: build/C/man3/mcheck.3:119
4733 #, no-wrap
4734 msgid "B<MCHECK_HEAD>"
4735 msgstr "B<MCHECK_HEAD>"
4736
4737 #. type: Plain text
4738 #: build/C/man3/mcheck.3:122
4739 msgid "Memory preceding an allocated block was clobbered."
4740 msgstr ""
4741
4742 #. type: TP
4743 #: build/C/man3/mcheck.3:122
4744 #, no-wrap
4745 msgid "B<MCHECK_TAIL>"
4746 msgstr "B<MCHECK_TAIL>"
4747
4748 #. type: Plain text
4749 #: build/C/man3/mcheck.3:125
4750 msgid "Memory following an allocated block was clobbered."
4751 msgstr ""
4752
4753 #. type: TP
4754 #: build/C/man3/mcheck.3:125
4755 #, no-wrap
4756 msgid "B<MCHECK_FREE>"
4757 msgstr "B<MCHECK_FREE>"
4758
4759 #. type: Plain text
4760 #: build/C/man3/mcheck.3:129
4761 msgid "A block of memory was freed twice."
4762 msgstr ""
4763
4764 #. type: Plain text
4765 #: build/C/man3/mcheck.3:134
4766 msgid ""
4767 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4768 msgstr ""
4769
4770 #. type: Plain text
4771 #: build/C/man3/mcheck.3:145
4772 msgid ""
4773 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4774 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4775 "since at least glibc 2.0"
4776 msgstr ""
4777
4778 #.  But is MALLOC_CHECK_ slower?
4779 #. type: Plain text
4780 #: build/C/man3/mcheck.3:159
4781 msgid ""
4782 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4783 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4784 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4785 "application to be relinked."
4786 msgstr ""
4787
4788 #. type: Plain text
4789 #: build/C/man3/mcheck.3:165
4790 msgid ""
4791 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4792 "same block of memory twice.  The following shell session demonstrates what "
4793 "happens when running the program:"
4794 msgstr ""
4795
4796 #. type: Plain text
4797 #: build/C/man3/mcheck.3:170
4798 #, no-wrap
4799 msgid ""
4800 "$B< ./a.out>\n"
4801 "About to free\n"
4802 msgstr ""
4803
4804 #. type: Plain text
4805 #: build/C/man3/mcheck.3:174
4806 #, no-wrap
4807 msgid ""
4808 "About to free a second time\n"
4809 "block freed twice\n"
4810 "Aborted (core dumped)\n"
4811 msgstr ""
4812
4813 #. type: Plain text
4814 #: build/C/man3/mcheck.3:182
4815 #, no-wrap
4816 msgid ""
4817 "#include E<lt>stdlib.hE<gt>\n"
4818 "#include E<lt>stdio.hE<gt>\n"
4819 "#include E<lt>mcheck.hE<gt>\n"
4820 msgstr ""
4821 "#include E<lt>stdlib.hE<gt>\n"
4822 "#include E<lt>stdio.hE<gt>\n"
4823 "#include E<lt>mcheck.hE<gt>\n"
4824
4825 #. type: Plain text
4826 #: build/C/man3/mcheck.3:190
4827 #, no-wrap
4828 msgid ""
4829 "    if (mcheck(NULL) != 0) {\n"
4830 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4831 msgstr ""
4832
4833 #. type: Plain text
4834 #: build/C/man3/mcheck.3:193
4835 #, no-wrap
4836 msgid ""
4837 "        exit(EXIT_FAILURE);\n"
4838 "    }\n"
4839 msgstr ""
4840 "        exit(EXIT_FAILURE);\n"
4841 "    }\n"
4842
4843 #. type: Plain text
4844 #: build/C/man3/mcheck.3:195
4845 #, no-wrap
4846 msgid "    p = malloc(1000);\n"
4847 msgstr "    p = malloc(1000);\n"
4848
4849 #. type: Plain text
4850 #: build/C/man3/mcheck.3:200
4851 #, no-wrap
4852 msgid ""
4853 "    fprintf(stderr, \"About to free\\en\");\n"
4854 "    free(p);\n"
4855 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4856 "    free(p);\n"
4857 msgstr ""
4858
4859 #. type: Plain text
4860 #: build/C/man3/mcheck.3:208
4861 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4862 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4863
4864 #. type: TH
4865 #: build/C/man2/mlock.2:26
4866 #, no-wrap
4867 msgid "MLOCK"
4868 msgstr "MLOCK"
4869
4870 #. type: TH
4871 #: build/C/man2/mlock.2:26
4872 #, no-wrap
4873 msgid "2014-04-14"
4874 msgstr "2014-04-14"
4875
4876 #. type: Plain text
4877 #: build/C/man2/mlock.2:29
4878 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4879 msgstr "mlock - メモリーのロックとロック解除を行う"
4880
4881 #. type: Plain text
4882 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4883 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4884 #, no-wrap
4885 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4886 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4887
4888 #. type: Plain text
4889 #: build/C/man2/mlock.2:35
4890 #, no-wrap
4891 msgid ""
4892 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4893 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4894 msgstr ""
4895 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4896 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4897
4898 #. type: Plain text
4899 #: build/C/man2/mlock.2:38
4900 #, no-wrap
4901 msgid ""
4902 "B<int mlockall(int >I<flags>B<);>\n"
4903 "B<int munlockall(void);>\n"
4904 msgstr ""
4905 "B<int mlockall(int >I<flags>B<);>\n"
4906 "B<int munlockall(void);>\n"
4907
4908 #. type: Plain text
4909 #: build/C/man2/mlock.2:54
4910 msgid ""
4911 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4912 "process's virtual address space into RAM, preventing that memory from being "
4913 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4914 "converse operation, respectively unlocking part or all of the calling "
4915 "process's virtual address space, so that pages in the specified virtual "
4916 "address range may once more to be swapped out if required by the kernel "
4917 "memory manager.  Memory locking and unlocking are performed in units of "
4918 "whole pages."
4919 msgstr ""
4920 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4921 "間の一部または全部を RAM 上にロックし、メモリーがスワップエリアにページングさ"
4922 "れるのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出"
4923 "し元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定"
4924 "された仮想アドレス範囲のページは カーネルメモリーマネージャーから要求されれば"
4925 "スワップアウトするようになる。 メモリーのロックとロック解除はページ単位で行わ"
4926 "れる。"
4927
4928 #. type: SS
4929 #: build/C/man2/mlock.2:54
4930 #, no-wrap
4931 msgid "mlock() and munlock()"
4932 msgstr "mlock() と munlock()"
4933
4934 #. type: Plain text
4935 #: build/C/man2/mlock.2:64
4936 msgid ""
4937 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4938 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4939 "address range are guaranteed to be resident in RAM when the call returns "
4940 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4941 msgstr ""
4942 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4943 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4944 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4945 "れるまで RAM に残り続けることが保証される。"
4946
4947 #. type: Plain text
4948 #: build/C/man2/mlock.2:73
4949 msgid ""
4950 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4951 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4952 "of the specified memory range can be moved to external swap space again by "
4953 "the kernel."
4954 msgstr ""
4955 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4956 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリー"
4957 "範囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4958
4959 #. type: SS
4960 #: build/C/man2/mlock.2:73
4961 #, no-wrap
4962 msgid "mlockall() and munlockall()"
4963 msgstr "mlockall() と munlockall()"
4964
4965 #. type: Plain text
4966 #: build/C/man2/mlock.2:83
4967 msgid ""
4968 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4969 "process.  This includes the pages of the code, data and stack segment, as "
4970 "well as shared libraries, user space kernel data, shared memory, and memory-"
4971 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4972 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4973 "later unlocked."
4974 msgstr ""
4975 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4976 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4977 "ラリ、カーネルのユーザー空間データ、 共有メモリー、メモリーマップされたファイ"
4978 "ルが含まれる。 システムコールが成功した場合には全てのマップされたページは "
4979 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4980 "残り続けることが保証される。"
4981
4982 #. type: Plain text
4983 #: build/C/man2/mlock.2:88
4984 msgid ""
4985 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4986 "following constants:"
4987 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4988
4989 #. type: TP
4990 #: build/C/man2/mlock.2:88
4991 #, no-wrap
4992 msgid "B<MCL_CURRENT>"
4993 msgstr "B<MCL_CURRENT>"
4994
4995 #. type: Plain text
4996 #: build/C/man2/mlock.2:92
4997 msgid ""
4998 "Lock all pages which are currently mapped into the address space of the "
4999 "process."
5000 msgstr ""
5001 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
5002
5003 #. type: TP
5004 #: build/C/man2/mlock.2:92
5005 #, no-wrap
5006 msgid "B<MCL_FUTURE>"
5007 msgstr "B<MCL_FUTURE>"
5008
5009 #. type: Plain text
5010 #: build/C/man2/mlock.2:99
5011 msgid ""
5012 "Lock all pages which will become mapped into the address space of the "
5013 "process in the future.  These could be for instance new pages required by a "
5014 "growing heap and stack as well as new memory-mapped files or shared memory "
5015 "regions."
5016 msgstr ""
5017 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
5018 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
5019 "くメモリーマップされたファイルや共有メモリー領域もロックされる。"
5020
5021 #. type: Plain text
5022 #: build/C/man2/mlock.2:112
5023 msgid ""
5024 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
5025 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
5026 "of locked bytes to exceed the permitted maximum (see below).  In the same "
5027 "circumstances, stack growth may likewise fail: the kernel will deny stack "
5028 "expansion and deliver a B<SIGSEGV> signal to the process."
5029 msgstr ""
5030 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
5031 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
5032 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
5033 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
5034 "スに送る。"
5035
5036 #. type: Plain text
5037 #: build/C/man2/mlock.2:116
5038 msgid ""
5039 "B<munlockall>()  unlocks all pages mapped into the address space of the "
5040 "calling process."
5041 msgstr ""
5042 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
5043 "全てのページをロック解除する。"
5044
5045 #. type: Plain text
5046 #: build/C/man2/mlock.2:122
5047 msgid ""
5048 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
5049 "is set appropriately, and no changes are made to any locks in the address "
5050 "space of the process."
5051 msgstr ""
5052 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
5053 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
5054 "れない。"
5055
5056 #. type: Plain text
5057 #: build/C/man2/mlock.2:131
5058 msgid ""
5059 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
5060 "resource limit, but tried to lock more memory than the limit permitted.  "
5061 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
5062 msgstr ""
5063 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
5064 "つが、制限が許可している以上のメモリーをロックしようとした。 この制限は、プロ"
5065 "セスが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
5066
5067 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
5068 #.  take into account whether the to-be-locked range overlaps with
5069 #.  already locked pages.  Thus, suppose we allocate
5070 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
5071 #.  mlock(), and then lock the *same* page range a second time.
5072 #.  In the case, the second mlock() call will fail, since the check
5073 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
5074 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
5075 #. type: Plain text
5076 #: build/C/man2/mlock.2:143
5077 msgid ""
5078 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
5079 "RAM."
5080 msgstr ""
5081 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
5082
5083 #. SVr4 documents an additional EAGAIN error code.
5084 #. type: Plain text
5085 #: build/C/man2/mlock.2:149
5086 msgid ""
5087 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
5088 "perform the requested operation."
5089 msgstr ""
5090 "呼び出し側が特権を持っていないが、\n"
5091 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5092
5093 #. type: Plain text
5094 #: build/C/man2/mlock.2:154
5095 msgid "For B<mlock>()  and B<munlock>():"
5096 msgstr "B<mlock>()  と B<munlock>()  用として:"
5097
5098 #. type: Plain text
5099 #: build/C/man2/mlock.2:157
5100 msgid "Some or all of the specified address range could not be locked."
5101 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5102
5103 #. type: Plain text
5104 #: build/C/man2/mlock.2:164
5105 msgid ""
5106 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5107 "addition may have resulted in an overflow)."
5108 msgstr ""
5109 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5110 "(例えば、加算でオーバーフローが発生したなど)。"
5111
5112 #. type: Plain text
5113 #: build/C/man2/mlock.2:169
5114 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5115 msgstr ""
5116 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5117
5118 #. type: Plain text
5119 #: build/C/man2/mlock.2:173
5120 msgid ""
5121 "Some of the specified address range does not correspond to mapped pages in "
5122 "the address space of the process."
5123 msgstr ""
5124 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5125 "い。"
5126
5127 #. type: Plain text
5128 #: build/C/man2/mlock.2:176
5129 msgid "For B<mlockall>():"
5130 msgstr "B<mlockall>()  用として:"
5131
5132 #. type: Plain text
5133 #: build/C/man2/mlock.2:179
5134 msgid "Unknown I<flags> were specified."
5135 msgstr "未知の I<flags> が指定された。"
5136
5137 #. type: Plain text
5138 #: build/C/man2/mlock.2:182
5139 msgid "For B<munlockall>():"
5140 msgstr "B<munlockall>()  用として:"
5141
5142 #. type: Plain text
5143 #: build/C/man2/mlock.2:186
5144 msgid ""
5145 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5146 msgstr ""
5147 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5148
5149 #. type: Plain text
5150 #: build/C/man2/mlock.2:188
5151 msgid "POSIX.1-2001, SVr4."
5152 msgstr "POSIX.1-2001, SVr4."
5153
5154 #. type: SH
5155 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:503 build/C/man2/msync.2:105
5156 #, no-wrap
5157 msgid "AVAILABILITY"
5158 msgstr "可用性"
5159
5160 #. type: Plain text
5161 #: build/C/man2/mlock.2:200
5162 msgid ""
5163 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5164 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5165 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5166 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5167 msgstr ""
5168 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5169 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5170 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5171 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5172 "び出すことで決定できる。"
5173
5174 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5175 #.  -1: unavailable, 0: ask using sysconf().
5176 #.  glibc defines it to 1.
5177 #. type: Plain text
5178 #: build/C/man2/mlock.2:213
5179 msgid ""
5180 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5181 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5182 "than 0.  (See also B<sysconf>(3).)"
5183 msgstr ""
5184 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5185 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5186 "(B<sysconf>(3)  も参照のこと)。"
5187
5188 #. type: Plain text
5189 #: build/C/man2/mlock.2:231
5190 msgid ""
5191 "Memory locking has two main applications: real-time algorithms and high-"
5192 "security data processing.  Real-time applications require deterministic "
5193 "timing, and, like scheduling, paging is one major cause of unexpected "
5194 "program execution delays.  Real-time applications will usually also switch "
5195 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5196 "security software often handles critical bytes like passwords or secret keys "
5197 "as data structures.  As a result of paging, these secrets could be "
5198 "transferred onto a persistent swap store medium, where they might be "
5199 "accessible to the enemy long after the security software has erased the "
5200 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5201 "laptops and some desktop computers will save a copy of the system's RAM to "
5202 "disk, regardless of memory locks.)"
5203 msgstr ""
5204 "メモリーのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5205 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5206 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5207 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5208 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5209 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5210 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5211 "されるかもしれない。そして、セキュリティ ソフトウェアが RAM 上の秘密を削除し"
5212 "て終了したずっと後になっても、 このスワップされたデータには敵がアクセスできる"
5213 "可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サス"
5214 "ペンドモードはシステムの RAM の内容をメモリーのロックに関わらず ディスクに保"
5215 "存することに注意)。"
5216
5217 #. type: Plain text
5218 #: build/C/man2/mlock.2:244
5219 msgid ""
5220 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5221 "faults should reserve enough locked stack pages before entering the time-"
5222 "critical section, so that no page fault can be caused by function calls.  "
5223 "This can be achieved by calling a function that allocates a sufficiently "
5224 "large automatic variable (an array) and writes to the memory occupied by "
5225 "this array in order to touch these stack pages.  This way, enough pages will "
5226 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5227 "that not even copy-on-write page faults can occur in the critical section."
5228 msgstr ""
5229 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5230 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5231 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5232 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5233 "数 (の配列) を確保し、 これらのスタック用のページがメモリー上に確保されるよう"
5234 "にこの配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5235 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5236 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5237 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5238
5239 #. type: Plain text
5240 #: build/C/man2/mlock.2:257
5241 msgid ""
5242 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5243 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5244 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5245 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5246 msgstr ""
5247 "メモリーロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5248 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5249 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5250 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5251
5252 #. type: Plain text
5253 #: build/C/man2/mlock.2:261
5254 msgid ""
5255 "The memory lock on an address range is automatically removed if the address "
5256 "range is unmapped via B<munmap>(2)."
5257 msgstr ""
5258 "あるアドレス範囲に対するメモリーロックは、そのアドレス範囲が B<munmap>(2)  に"
5259 "よってアンマップされた場合は削除される。"
5260
5261 #. type: Plain text
5262 #: build/C/man2/mlock.2:274
5263 msgid ""
5264 "Memory locks do not stack, that is, pages which have been locked several "
5265 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5266 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5267 "Pages which are mapped to several locations or by several processes stay "
5268 "locked into RAM as long as they are locked at least at one location or by at "
5269 "least one process."
5270 msgstr ""
5271 "メモリーのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  "
5272 "を呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 "
5273 "回呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複"
5274 "数の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一"
5275 "つのプロセスでロックされている限りは RAM に残り続ける。"
5276
5277 #. type: Plain text
5278 #: build/C/man2/mlock.2:285
5279 msgid ""
5280 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5281 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5282 "implementation to require that I<addr> is page aligned, so portable "
5283 "applications should ensure this."
5284 msgstr ""
5285 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5286 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5287 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5288 "ケーションではきちんと境界に合わせた方が良い。"
5289
5290 #. type: Plain text
5291 #: build/C/man2/mlock.2:298
5292 msgid ""
5293 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5294 "many kilobytes of memory the process with ID I<PID> has locked using "
5295 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5296 msgstr ""
5297 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5298 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5299 "ID が I<PID> のプロセスがロックしているメモリー量 (キロバイト単位) が\n"
5300 "表示される。"
5301
5302 #. type: SS
5303 #: build/C/man2/mlock.2:298
5304 #, no-wrap
5305 msgid "Limits and permissions"
5306 msgstr "制限と権限"
5307
5308 #. type: Plain text
5309 #: build/C/man2/mlock.2:305
5310 msgid ""
5311 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5312 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5313 "defines a limit on how much memory the process may lock."
5314 msgstr ""
5315 "Linux 2.6.8 以前では、メモリーをロックするためには特権 (B<CAP_IPC_LOCK>)  が"
5316 "必要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリーを"
5317 "ロックできるかの制限を定義する。"
5318
5319 #. type: Plain text
5320 #: build/C/man2/mlock.2:311
5321 msgid ""
5322 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5323 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5324 "instead defines a limit on how much memory an unprivileged process may lock."
5325 msgstr ""
5326 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリー量は無制限とな"
5327 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5328 "クできるメモリー量の制限を定義する。"
5329
5330 #. type: Plain text
5331 #: build/C/man2/mlock.2:319
5332 msgid ""
5333 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5334 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5335 "was rectified in kernel 2.4.18."
5336 msgstr ""
5337 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5338 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5339 "ネル 2.4.18 で修正された。"
5340
5341 #.  See the following LKML thread:
5342 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5343 #.  "Rationale for RLIMIT_MEMLOCK"
5344 #.  23 Jan 2006
5345 #. type: Plain text
5346 #: build/C/man2/mlock.2:336
5347 msgid ""
5348 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5349 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5350 "example, setting its effective UID to a nonzero value), then subsequent "
5351 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5352 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5353 msgstr ""
5354 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5355 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5356 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5357 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリー割り当て (例えば B<mmap>(2), "
5358 "B<brk>(2))  は失敗する。"
5359
5360 #. type: Plain text
5361 #: build/C/man2/mlock.2:343
5362 msgid ""
5363 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5364 "B<capabilities>(7)"
5365 msgstr ""
5366 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5367 "B<capabilities>(7)"
5368
5369 #. type: TH
5370 #: build/C/man2/mmap.2:40
5371 #, no-wrap
5372 msgid "MMAP"
5373 msgstr "MMAP"
5374
5375 #. type: Plain text
5376 #: build/C/man2/mmap.2:43
5377 msgid "mmap, munmap - map or unmap files or devices into memory"
5378 msgstr "mmap, munmap - ファイルやデバイスをメモリーにマップ/アンマップする"
5379
5380 #. type: Plain text
5381 #: build/C/man2/mmap.2:51
5382 #, no-wrap
5383 msgid ""
5384 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5385 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5386 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5387 msgstr ""
5388 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5389 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5390 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5391
5392 #. type: Plain text
5393 #: build/C/man2/mmap.2:54
5394 msgid "See NOTES for information on feature test macro requirements."
5395 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5396
5397 #. type: Plain text
5398 #: build/C/man2/mmap.2:63
5399 msgid ""
5400 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5401 "process.  The starting address for the new mapping is specified in I<addr>.  "
5402 "The I<length> argument specifies the length of the mapping."
5403 msgstr ""
5404 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5405 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5406 "は I<length> 引き数で指定される。"
5407
5408 #.  Before Linux 2.6.24, the address was rounded up to the next page
5409 #.  boundary; since 2.6.24, it is rounded down!
5410 #. type: Plain text
5411 #: build/C/man2/mmap.2:77
5412 msgid ""
5413 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5414 "the mapping; this is the most portable method of creating a new mapping.  If "
5415 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5416 "the mapping; on Linux, the mapping will be created at a nearby page "
5417 "boundary.  The address of the new mapping is returned as the result of the "
5418 "call."
5419 msgstr ""
5420 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5421 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5422 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5423 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5424 "ングのアドレスは、呼び出しの返り値として返される。"
5425
5426 #. type: Plain text
5427 #: build/C/man2/mmap.2:89
5428 msgid ""
5429 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5430 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5431 "offset I<offset> in the file (or other object) referred to by the file "
5432 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5433 "by I<sysconf(_SC_PAGE_SIZE)>."
5434 msgstr ""
5435 "ファイルマッピングの内容は、 ファイルディスクリプター I<fd> で参照されるファ"
5436 "イル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5437 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5438 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5439 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5440
5441 #. type: Plain text
5442 #: build/C/man2/mmap.2:97
5443 msgid ""
5444 "The I<prot> argument describes the desired memory protection of the mapping "
5445 "(and must not conflict with the open mode of the file).  It is either "
5446 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5447 msgstr ""
5448 "引き数 I<prot> には、マッピングのメモリー保護をどのように行なうかを指定する "
5449 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5450 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5451
5452 #. type: TP
5453 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5454 #, no-wrap
5455 msgid "B<PROT_EXEC>"
5456 msgstr "B<PROT_EXEC>"
5457
5458 #. type: Plain text
5459 #: build/C/man2/mmap.2:100
5460 msgid "Pages may be executed."
5461 msgstr "ページは実行可能である。"
5462
5463 #. type: TP
5464 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5465 #, no-wrap
5466 msgid "B<PROT_READ>"
5467 msgstr "B<PROT_READ>"
5468
5469 #. type: Plain text
5470 #: build/C/man2/mmap.2:103
5471 msgid "Pages may be read."
5472 msgstr "ページは読み込み可能である。"
5473
5474 #. type: TP
5475 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5476 #, no-wrap
5477 msgid "B<PROT_WRITE>"
5478 msgstr "B<PROT_WRITE>"
5479
5480 #. type: Plain text
5481 #: build/C/man2/mmap.2:106
5482 msgid "Pages may be written."
5483 msgstr "ページに書き込み可能である。"
5484
5485 #. type: TP
5486 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5487 #, no-wrap
5488 msgid "B<PROT_NONE>"
5489 msgstr "B<PROT_NONE>"
5490
5491 #. type: Plain text
5492 #: build/C/man2/mmap.2:109
5493 msgid "Pages may not be accessed."
5494 msgstr "ページにはアクセスできない。"
5495
5496 #. type: Plain text
5497 #: build/C/man2/mmap.2:118
5498 msgid ""
5499 "The I<flags> argument determines whether updates to the mapping are visible "
5500 "to other processes mapping the same region, and whether updates are carried "
5501 "through to the underlying file.  This behavior is determined by including "
5502 "exactly one of the following values in I<flags>:"
5503 msgstr ""
5504 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5505 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5506 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5507 "I<flags> に含めることで指定する。"
5508
5509 #. type: TP
5510 #: build/C/man2/mmap.2:118
5511 #, no-wrap
5512 msgid "B<MAP_SHARED>"
5513 msgstr "B<MAP_SHARED>"
5514
5515 #. type: Plain text
5516 #: build/C/man2/mmap.2:128
5517 msgid ""
5518 "Share this mapping.  Updates to the mapping are visible to other processes "
5519 "that map this file, and are carried through to the underlying file.  The "
5520 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5521 "called."
5522 msgstr ""
5523 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5524 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5525 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5526 "るまで行われないこともある。"
5527
5528 #. type: TP
5529 #: build/C/man2/mmap.2:128
5530 #, no-wrap
5531 msgid "B<MAP_PRIVATE>"
5532 msgstr "B<MAP_PRIVATE>"
5533
5534 #. type: Plain text
5535 #: build/C/man2/mmap.2:137
5536 msgid ""
5537 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5538 "visible to other processes mapping the same file, and are not carried "
5539 "through to the underlying file.  It is unspecified whether changes made to "
5540 "the file after the B<mmap>()  call are visible in the mapped region."
5541 msgstr ""
5542 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5543 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5544 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5545 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5546 "かは規定されていない。"
5547
5548 #. type: Plain text
5549 #: build/C/man2/mmap.2:139
5550 msgid "Both of these flags are described in POSIX.1-2001."
5551 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5552
5553 #. type: Plain text
5554 #: build/C/man2/mmap.2:142
5555 msgid ""
5556 "In addition, zero or more of the following values can be ORed in I<flags>:"
5557 msgstr ""
5558 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5559 "ことができる。"
5560
5561 #. type: TP
5562 #: build/C/man2/mmap.2:142
5563 #, no-wrap
5564 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5565 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5566
5567 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5568 #. type: Plain text
5569 #: build/C/man2/mmap.2:158
5570 msgid ""
5571 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5572 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5573 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5574 "as to improve context-switch performance on some early 64-bit processors.  "
5575 "Modern x86-64 processors no longer have this performance problem, so use of "
5576 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5577 "ignored when B<MAP_FIXED> is set."
5578 msgstr ""
5579 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5580 "ラグがサポートされているのは x86-64 アーキテクチャー上の 64 ビットプログラム"
5581 "のみである。 このフラグが追加されたのは、スレッドのスタックをメモリーの先頭 "
5582 "2GB 以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにお"
5583 "ける コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5584 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5585 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5586 "グは無視される。"
5587
5588 #. type: TP
5589 #: build/C/man2/mmap.2:158
5590 #, no-wrap
5591 msgid "B<MAP_ANON>"
5592 msgstr "B<MAP_ANON>"
5593
5594 #. type: Plain text
5595 #: build/C/man2/mmap.2:163
5596 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5597 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5598
5599 #. type: TP
5600 #: build/C/man2/mmap.2:163
5601 #, no-wrap
5602 msgid "B<MAP_ANONYMOUS>"
5603 msgstr "B<MAP_ANONYMOUS>"
5604
5605 #. type: Plain text
5606 #: build/C/man2/mmap.2:185
5607 msgid ""
5608 "The mapping is not backed by any file; its contents are initialized to "
5609 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5610 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5611 "is specified, and portable applications should ensure this.  The use of "
5612 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5613 "only since kernel 2.4."
5614 msgstr ""
5615 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5616 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5617 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5618 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5619 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5620 "以降の Linux でのみサポートされている。"
5621
5622 #. type: TP
5623 #: build/C/man2/mmap.2:185
5624 #, no-wrap
5625 msgid "B<MAP_DENYWRITE>"
5626 msgstr "B<MAP_DENYWRITE>"
5627
5628 #.  Introduced in 1.1.36, removed in 1.3.24.
5629 #. type: Plain text
5630 #: build/C/man2/mmap.2:193
5631 msgid ""
5632 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5633 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5634 "denial-of-service attacks.)"
5635 msgstr ""
5636 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5637 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5638 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5639
5640 #. type: TP
5641 #: build/C/man2/mmap.2:193
5642 #, no-wrap
5643 msgid "B<MAP_EXECUTABLE>"
5644 msgstr "B<MAP_EXECUTABLE>"
5645
5646 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5647 #.  (Long ago, it signaled that the underlying file is an executable.
5648 #.  However, that information was not really used anywhere.)
5649 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5650 #.  MAP_DENYWRITE?
5651 #. type: Plain text
5652 #: build/C/man2/mmap.2:201
5653 msgid "This flag is ignored."
5654 msgstr "このフラグは無視される。"
5655
5656 #. type: TP
5657 #: build/C/man2/mmap.2:201
5658 #, no-wrap
5659 msgid "B<MAP_FILE>"
5660 msgstr "B<MAP_FILE>"
5661
5662 #.  On some systems, this was required as the opposite of
5663 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5664 #. type: Plain text
5665 #: build/C/man2/mmap.2:207
5666 msgid "Compatibility flag.  Ignored."
5667 msgstr "互換性のためのフラグ。無視される。"
5668
5669 #. type: TP
5670 #: build/C/man2/mmap.2:207
5671 #, no-wrap
5672 msgid "B<MAP_FIXED>"
5673 msgstr "B<MAP_FIXED>"
5674
5675 #. type: Plain text
5676 #: build/C/man2/mmap.2:225
5677 msgid ""
5678 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5679 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5680 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5681 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5682 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5683 "requiring a fixed address for a mapping is less portable, the use of this "
5684 "option is discouraged."
5685 msgstr ""
5686 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5687 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5688 "ければならない。 I<addr> と I<len> で指定されたメモリー領域が既存のマッピング"
5689 "のページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定"
5690 "されたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して"
5691 "固定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこ"
5692 "とを推奨する。"
5693
5694 #. type: TP
5695 #: build/C/man2/mmap.2:225
5696 #, no-wrap
5697 msgid "B<MAP_GROWSDOWN>"
5698 msgstr "B<MAP_GROWSDOWN>"
5699
5700 #. type: Plain text
5701 #: build/C/man2/mmap.2:230
5702 msgid ""
5703 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5704 "mapping should extend downward in memory."
5705 msgstr ""
5706 "スタック用に使用される。マッピングをメモリー内で逆向きに行うことを カーネル仮"
5707 "想メモリーシステムに指示する。 (訳注:マッピングは通常はメモリーアドレスが増"
5708 "加する向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5709
5710 #. type: TP
5711 #: build/C/man2/mmap.2:230
5712 #, no-wrap
5713 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5714 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5715
5716 #. type: Plain text
5717 #: build/C/man2/mmap.2:236
5718 msgid ""
5719 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5720 "I<Documentation/vm/hugetlbpage.txt> for further information."
5721 msgstr ""
5722 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5723 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5724
5725 #. type: TP
5726 #: build/C/man2/mmap.2:236
5727 #, no-wrap
5728 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5729 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5730
5731 #.  If set, the mapped pages will not be swapped out.
5732 #. type: Plain text
5733 #: build/C/man2/mmap.2:242
5734 msgid ""
5735 "Lock the pages of the mapped region into memory in the manner of "
5736 "B<mlock>(2).  This flag is ignored in older kernels."
5737 msgstr ""
5738 "マップされた領域のページを B<mlock>(2)  の方法でメモリー内にロックする。 それ"
5739 "以前のカーネルでは、このフラグは無視される。"
5740
5741 #. type: TP
5742 #: build/C/man2/mmap.2:242
5743 #, no-wrap
5744 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5745 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5746
5747 #. type: Plain text
5748 #: build/C/man2/mmap.2:257
5749 msgid ""
5750 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5751 "ahead: create page tables entries only for pages that are already present in "
5752 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5753 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5754 "reimplemented."
5755 msgstr ""
5756 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5757 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5758 "テーブルエントリーを作成する。 Linux 2.6.23 以降では、このフラグは "
5759 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5760 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5761
5762 #. type: TP
5763 #: build/C/man2/mmap.2:257
5764 #, no-wrap
5765 msgid "B<MAP_NORESERVE>"
5766 msgstr "B<MAP_NORESERVE>"
5767
5768 #. type: Plain text
5769 #: build/C/man2/mmap.2:272
5770 msgid ""
5771 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5772 "one has the guarantee that it is possible to modify the mapping.  When swap "
5773 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5774 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5775 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5776 "effect only for private writable mappings."
5777 msgstr ""
5778 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5779 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5780 "合、物理メモリーに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることが"
5781 "ある。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議"
5782 "論も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プ"
5783 "ライベートマッピングについてのみ効果があった。"
5784
5785 #. type: TP
5786 #: build/C/man2/mmap.2:272
5787 #, no-wrap
5788 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5789 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5790
5791 #. type: Plain text
5792 #: build/C/man2/mmap.2:279
5793 msgid ""
5794 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5795 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5796 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5797 "only since Linux 2.6.23."
5798 msgstr ""
5799 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5800 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5801 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5802 "2.6.23 以降でのみプライベートマッピングについて B<MAP_POPULATE> がサポートさ"
5803 "れている。"
5804
5805 #. type: TP
5806 #: build/C/man2/mmap.2:279
5807 #, no-wrap
5808 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5809 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5810
5811 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5812 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5813 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5814 #.  "pthread_create() slow for many threads; also time to revisit 64b
5815 #.   context switch optimization?"
5816 #. type: Plain text
5817 #: build/C/man2/mmap.2:292
5818 msgid ""
5819 "Allocate the mapping at an address suitable for a process or thread stack.  "
5820 "This flag is currently a no-op, but is used in the glibc threading "
5821 "implementation so that if some architectures require special treatment for "
5822 "stack allocations, support can later be transparently implemented for glibc."
5823 msgstr ""
5824 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5825 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5826 "これは、いくつかのアーキテクチャーではスタックの割り当てに関して特別な扱い が"
5827 "必要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5828 "る。"
5829
5830 #. type: TP
5831 #: build/C/man2/mmap.2:292
5832 #, no-wrap
5833 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5834 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5835
5836 #. type: Plain text
5837 #: build/C/man2/mmap.2:302
5838 msgid ""
5839 "Don't clear anonymous pages.  This flag is intended to improve performance "
5840 "on embedded devices.  This flag is honored only if the kernel was configured "
5841 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5842 "implications, that option is normally enabled only on embedded devices (i."
5843 "e., devices where one has complete control of the contents of user memory)."
5844 msgstr ""
5845 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5846 "ス\n"
5847 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5848 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5849 "このフラグは効果を持つ。\n"
5850 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5851 "ユーザーメモリーの内容を完全に制御化におけるデバイス) においてのみ有効にされ"
5852 "る。"
5853
5854 #. type: Plain text
5855 #: build/C/man2/mmap.2:310
5856 msgid ""
5857 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5858 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5859 "B<MAP_ANON>)."
5860 msgstr ""
5861 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5862 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5863 "B<MAP_ANON>)  もサポートされている。"
5864
5865 #. type: Plain text
5866 #: build/C/man2/mmap.2:317
5867 msgid ""
5868 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5869 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5870 msgstr ""
5871 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5872 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5873
5874 #. type: Plain text
5875 #: build/C/man2/mmap.2:323
5876 msgid ""
5877 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5878 "attributes."
5879 msgstr ""
5880 "B<mmap>()  によってマップされたメモリーの属性は B<fork>(2)  の際に継承され"
5881 "る。"
5882
5883 #. type: Plain text
5884 #: build/C/man2/mmap.2:331
5885 msgid ""
5886 "A file is mapped in multiples of the page size.  For a file that is not a "
5887 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5888 "writes to that region are not written out to the file.  The effect of "
5889 "changing the size of the underlying file of a mapping on the pages that "
5890 "correspond to added or removed regions of the file is unspecified."
5891 msgstr ""
5892 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5893 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5894 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5895 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5896 "マップされたページに対してどのような影響があるかは規定されていない。"
5897
5898 #. type: SS
5899 #: build/C/man2/mmap.2:331
5900 #, no-wrap
5901 msgid "munmap()"
5902 msgstr "munmap()"
5903
5904 #. type: Plain text
5905 #: build/C/man2/mmap.2:341
5906 msgid ""
5907 "The B<munmap>()  system call deletes the mappings for the specified address "
5908 "range, and causes further references to addresses within the range to "
5909 "generate invalid memory references.  The region is also automatically "
5910 "unmapped when the process is terminated.  On the other hand, closing the "
5911 "file descriptor does not unmap the region."
5912 msgstr ""
5913 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5914 "降のその範囲内へのメモリー参照は不正となる。 この領域は、プロセスが終了したと"
5915 "きにも自動的にアンマップされる。 一方、ファイルディスクリプターをクローズして"
5916 "も、この領域はアンマップされない。"
5917
5918 #. type: Plain text
5919 #: build/C/man2/mmap.2:351
5920 msgid ""
5921 "The address I<addr> must be a multiple of the page size.  All pages "
5922 "containing a part of the indicated range are unmapped, and subsequent "
5923 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5924 "the indicated range does not contain any mapped pages."
5925 msgstr ""
5926 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5927 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5928 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5929 "ていない場合でも エラーにならない。"
5930
5931 #. type: SS
5932 #: build/C/man2/mmap.2:351
5933 #, no-wrap
5934 msgid "Timestamps changes for file-backed mappings"
5935 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5936
5937 #. type: Plain text
5938 #: build/C/man2/mmap.2:358
5939 msgid ""
5940 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5941 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5942 "the first reference to a mapped page will update the field if it has not "
5943 "been already."
5944 msgstr ""
5945 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5946 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5947 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5948 "ページへの最初の参照があった 際に更新される。"
5949
5950 #. type: Plain text
5951 #: build/C/man2/mmap.2:375
5952 msgid ""
5953 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5954 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5955 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5956 "one occurs."
5957 msgstr ""
5958 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5959 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5960 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5961 "B<msync>(2)  が呼ばれる前までに更新される。"
5962
5963 #. type: Plain text
5964 #: build/C/man2/mmap.2:392
5965 msgid ""
5966 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5967 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5968 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5969 "and I<errno> is set (probably to B<EINVAL>)."
5970 msgstr ""
5971 "B<mmap>()  は成功するとマップされた領域へのポインターを返す。 失敗すると値 "
5972 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5973 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5974 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5975
5976 #. type: TP
5977 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5978 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5979 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5980 #: build/C/man2/shmop.2:188
5981 #, no-wrap
5982 msgid "B<EACCES>"
5983 msgstr "B<EACCES>"
5984
5985 #. type: Plain text
5986 #: build/C/man2/mmap.2:411
5987 msgid ""
5988 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5989 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5990 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5991 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5992 msgstr ""
5993 "以下のいずれかの場合。 ファイルディスクリプターの参照先が通常のファイルではな"
5994 "い (non-regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用に"
5995 "オープンされていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが "
5996 "I<fd> は読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> を"
5997 "セットしたが、ファイルは追加 (append) 専用である。"
5998
5999 #. type: Plain text
6000 #: build/C/man2/mmap.2:415
6001 msgid ""
6002 "The file has been locked, or too much memory has been locked (see "
6003 "B<setrlimit>(2))."
6004 msgstr ""
6005 "ファイルがロックされている。またはロックされているメモリーが多すぎる "
6006 "(B<setrlimit>(2)  を参照)。"
6007
6008 #. type: Plain text
6009 #: build/C/man2/mmap.2:421
6010 msgid ""
6011 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
6012 msgstr ""
6013 "I<fd> が有効なファイルディスクリプター (file descriptor) ではない (かつ "
6014 "B<MAP_ANONYMOUS> がセットされていない)。"
6015
6016 #. type: Plain text
6017 #: build/C/man2/mmap.2:429
6018 msgid ""
6019 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
6020 "not aligned on a page boundary)."
6021 msgstr ""
6022 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
6023 "ジ境界にアラインメントされていない)。"
6024
6025 #. type: Plain text
6026 #: build/C/man2/mmap.2:434
6027 msgid "(since Linux 2.6.12)  I<length> was 0."
6028 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
6029
6030 #. type: Plain text
6031 #: build/C/man2/mmap.2:442
6032 msgid ""
6033 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
6034 "both of these values."
6035 msgstr ""
6036 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
6037 "しくは その両方が含まれていた。"
6038
6039 #. type: TP
6040 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
6041 #: build/C/man2/shmget.2:221 build/C/man2/memfd_create.2:149
6042 #, no-wrap
6043 msgid "B<ENFILE>"
6044 msgstr "B<ENFILE>"
6045
6046 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
6047 #. type: Plain text
6048 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
6049 msgid "The system limit on the total number of open files has been reached."
6050 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
6051
6052 #. type: Plain text
6053 #: build/C/man2/mmap.2:454
6054 msgid ""
6055 "The underlying filesystem of the specified file does not support memory "
6056 "mapping."
6057 msgstr ""
6058 "指定されたファイルが置かれているファイルシステムがメモリーマッピングをサポー"
6059 "ト していない。"
6060
6061 #. type: Plain text
6062 #: build/C/man2/mmap.2:458
6063 msgid ""
6064 "No memory is available, or the process's maximum number of mappings would "
6065 "have been exceeded."
6066 msgstr ""
6067 "メモリーに空きがない、または処理中のプロセスのマッピング数が最大数を超過し"
6068 "た。"
6069
6070 #.  (Since 2.4.25 / 2.6.0.)
6071 #. type: Plain text
6072 #: build/C/man2/mmap.2:467
6073 msgid ""
6074 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
6075 "file on a filesystem that was mounted no-exec."
6076 msgstr ""
6077 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
6078 "トされたファイルシステム上のファイルに マップ領域が対応している。"
6079
6080 #. type: Plain text
6081 #: build/C/man2/mmap.2:477
6082 msgid ""
6083 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
6084 "writing."
6085 msgstr ""
6086 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
6087 "き込み用に開かれている。"
6088
6089 #. type: TP
6090 #: build/C/man2/mmap.2:477 build/C/man2/shmctl.2:348
6091 #, no-wrap
6092 msgid "B<EOVERFLOW>"
6093 msgstr "B<EOVERFLOW>"
6094
6095 #. type: Plain text
6096 #: build/C/man2/mmap.2:489
6097 msgid ""
6098 "On 32-bit architecture together with the large file extension (i.e., using "
6099 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6100 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6101 msgstr ""
6102 "32 ビットアーキテクチャーで large file 拡張を使っている場合 (つまり 64 ビット"
6103 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6104 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6105 "しまう) 場合がある。"
6106
6107 #. type: Plain text
6108 #: build/C/man2/mmap.2:491
6109 msgid "Use of a mapped region can result in these signals:"
6110 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6111
6112 #. type: TP
6113 #: build/C/man2/mmap.2:491
6114 #, no-wrap
6115 msgid "B<SIGSEGV>"
6116 msgstr "B<SIGSEGV>"
6117
6118 #. type: Plain text
6119 #: build/C/man2/mmap.2:494
6120 msgid "Attempted write into a region mapped as read-only."
6121 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6122
6123 #. type: TP
6124 #: build/C/man2/mmap.2:494
6125 #, no-wrap
6126 msgid "B<SIGBUS>"
6127 msgstr "B<SIGBUS>"
6128
6129 #. type: Plain text
6130 #: build/C/man2/mmap.2:499
6131 msgid ""
6132 "Attempted access to a portion of the buffer that does not correspond to the "
6133 "file (for example, beyond the end of the file, including the case where "
6134 "another process has truncated the file)."
6135 msgstr ""
6136 "バッファーのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越"
6137 "えた部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれ"
6138 "る)  にアクセスしようとした。"
6139
6140 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6141 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6142 #. type: Plain text
6143 #: build/C/man2/mmap.2:503
6144 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6145 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6146
6147 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6148 #.  -1: unavailable, 0: ask using sysconf().
6149 #.  glibc defines it to 1.
6150 #. type: Plain text
6151 #: build/C/man2/mmap.2:517
6152 msgid ""
6153 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>()  are "
6154 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6155 "value greater than 0.  (See also B<sysconf>(3).)"
6156 msgstr ""
6157 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6158 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6159 "(B<sysconf>(3)  も参照のこと)。"
6160
6161 #. type: Plain text
6162 #: build/C/man2/mmap.2:530
6163 msgid ""
6164 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6165 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6166 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6167 "they intend to execute code in the new mapping."
6168 msgstr ""
6169 "(i386 などの) いくつかのアーキテクチャーでは、 B<PROT_WRITE> をセットすると、"
6170 "暗黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙"
6171 "のうちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャー依存である。 "
6172 "移植性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合"
6173 "は、常に B<PROT_EXEC> をセットすべきである。"
6174
6175 #. type: Plain text
6176 #: build/C/man2/mmap.2:545
6177 msgid ""
6178 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6179 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6180 "address for the mapping; the address is chosen so as not to conflict with "
6181 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6182 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6183 msgstr ""
6184 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6185 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6186 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6187 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6188 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6189
6190 #. type: Plain text
6191 #: build/C/man2/mmap.2:575
6192 msgid ""
6193 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6194 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6195 "requiring that macro specifically would have been more logical, since these "
6196 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6197 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6198 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6199 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6200 "B<MAP_STACK>."
6201 msgstr ""
6202 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6203 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6204 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6205 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6206 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6207 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6208 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6209 "B<MAP_STACK> である。"
6210
6211 #. type: SS
6212 #: build/C/man2/mmap.2:575
6213 #, no-wrap
6214 msgid "C library/kernel ABI differences"
6215 msgstr "C ライブラリとカーネル ABI の違い"
6216
6217 #.  Since around glibc 2.1/2.2, depending on the platform.
6218 #. type: Plain text
6219 #: build/C/man2/mmap.2:590
6220 msgid ""
6221 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6222 "function.  Originally, this function invoked a system call of the same "
6223 "name.  Since kernel 2.4, that system call has been superseded by "
6224 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6225 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6226 msgstr ""
6227 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6228 "に\n"
6229 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6230 "た。\n"
6231 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6232 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6233 "B<mmap2>(2) を起動する。"
6234
6235 #. type: Plain text
6236 #: build/C/man2/mmap.2:595
6237 msgid ""
6238 "On Linux there are no guarantees like those suggested above under "
6239 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6240 "the system runs out of memory."
6241 msgstr ""
6242 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6243 "デフォルトでは、システムがメモリーを使い切った場合には、 どのプロセスがいつ強"
6244 "制終了されるか分からないからである。"
6245
6246 #. type: Plain text
6247 #: build/C/man2/mmap.2:602
6248 msgid ""
6249 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6250 "is specified as B<PROT_NONE>."
6251 msgstr ""
6252 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6253 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6254
6255 #. type: Plain text
6256 #: build/C/man2/mmap.2:617
6257 msgid ""
6258 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6259 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6260 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6261 "fails with the error B<EINVAL> for this case."
6262 msgstr ""
6263 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6264 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6265 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6266 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6267
6268 #. type: Plain text
6269 #: build/C/man2/mmap.2:633
6270 msgid ""
6271 "POSIX specifies that the system shall always zero fill any partial page at "
6272 "the end of the object and that system will never write any modification of "
6273 "the object beyond its end.  On Linux, when you write data to such partial "
6274 "page after the end of the object, the data stays in the page cache even "
6275 "after the file is closed and unmapped and even though the data is never "
6276 "written to the file itself, subsequent mappings may see the modified "
6277 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6278 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6279 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6280 msgstr ""
6281 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6282 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6283 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6284 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6285 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6286 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6287 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6288 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6289 "共有メモリーインターフェースを使った場合)。"
6290
6291 #. type: Plain text
6292 #: build/C/man2/mmap.2:645
6293 msgid ""
6294 "The following program prints part of the file specified in its first command-"
6295 "line argument to standard output.  The range of bytes to be printed is "
6296 "specified via offset and length values in the second and third command-line "
6297 "arguments.  The program creates a memory mapping of the required pages of "
6298 "the file and then uses B<write>(2)  to output the desired bytes."
6299 msgstr ""
6300 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6301 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6302 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6303 "必要なページのメモリー マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6304 "を出力する。"
6305
6306 #. type: Plain text
6307 #: build/C/man2/mmap.2:653
6308 #, no-wrap
6309 msgid ""
6310 "#include E<lt>sys/mman.hE<gt>\n"
6311 "#include E<lt>sys/stat.hE<gt>\n"
6312 "#include E<lt>fcntl.hE<gt>\n"
6313 "#include E<lt>stdio.hE<gt>\n"
6314 "#include E<lt>stdlib.hE<gt>\n"
6315 "#include E<lt>unistd.hE<gt>\n"
6316 msgstr ""
6317 "#include E<lt>sys/mman.hE<gt>\n"
6318 "#include E<lt>sys/stat.hE<gt>\n"
6319 "#include E<lt>fcntl.hE<gt>\n"
6320 "#include E<lt>stdio.hE<gt>\n"
6321 "#include E<lt>stdlib.hE<gt>\n"
6322 "#include E<lt>unistd.hE<gt>\n"
6323
6324 #. type: Plain text
6325 #: build/C/man2/mmap.2:656 build/C/man2/mprotect.2:177
6326 #, no-wrap
6327 msgid ""
6328 "#define handle_error(msg) \\e\n"
6329 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6330 msgstr ""
6331 "#define handle_error(msg) \\e\n"
6332 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6333
6334 #. type: Plain text
6335 #: build/C/man2/mmap.2:666
6336 #, no-wrap
6337 msgid ""
6338 "int\n"
6339 "main(int argc, char *argv[])\n"
6340 "{\n"
6341 "    char *addr;\n"
6342 "    int fd;\n"
6343 "    struct stat sb;\n"
6344 "    off_t offset, pa_offset;\n"
6345 "    size_t length;\n"
6346 "    ssize_t s;\n"
6347 msgstr ""
6348 "int\n"
6349 "main(int argc, char *argv[])\n"
6350 "{\n"
6351 "    char *addr;\n"
6352 "    int fd;\n"
6353 "    struct stat sb;\n"
6354 "    off_t offset, pa_offset;\n"
6355 "    size_t length;\n"
6356 "    ssize_t s;\n"
6357
6358 #. type: Plain text
6359 #: build/C/man2/mmap.2:671
6360 #, no-wrap
6361 msgid ""
6362 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6363 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6364 "        exit(EXIT_FAILURE);\n"
6365 "    }\n"
6366 msgstr ""
6367 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6368 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6369 "        exit(EXIT_FAILURE);\n"
6370 "    }\n"
6371
6372 #. type: Plain text
6373 #: build/C/man2/mmap.2:675
6374 #, no-wrap
6375 msgid ""
6376 "    fd = open(argv[1], O_RDONLY);\n"
6377 "    if (fd == -1)\n"
6378 "        handle_error(\"open\");\n"
6379 msgstr ""
6380 "    fd = open(argv[1], O_RDONLY);\n"
6381 "    if (fd == -1)\n"
6382 "        handle_error(\"open\");\n"
6383
6384 #. type: Plain text
6385 #: build/C/man2/mmap.2:678
6386 #, no-wrap
6387 msgid ""
6388 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6389 "        handle_error(\"fstat\");\n"
6390 msgstr ""
6391 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6392 "        handle_error(\"fstat\");\n"
6393
6394 #. type: Plain text
6395 #: build/C/man2/mmap.2:682
6396 #, no-wrap
6397 msgid ""
6398 "    offset = atoi(argv[2]);\n"
6399 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6400 "        /* offset for mmap() must be page aligned */\n"
6401 msgstr ""
6402 "    offset = atoi(argv[2]);\n"
6403 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6404 "        /* offset for mmap() must be page aligned */\n"
6405
6406 #. type: Plain text
6407 #: build/C/man2/mmap.2:687
6408 #, no-wrap
6409 msgid ""
6410 "    if (offset E<gt>= sb.st_size) {\n"
6411 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6412 "        exit(EXIT_FAILURE);\n"
6413 "    }\n"
6414 msgstr ""
6415 "    if (offset E<gt>= sb.st_size) {\n"
6416 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6417 "        exit(EXIT_FAILURE);\n"
6418 "    }\n"
6419
6420 #. type: Plain text
6421 #: build/C/man2/mmap.2:693
6422 #, no-wrap
6423 msgid ""
6424 "    if (argc == 4) {\n"
6425 "        length = atoi(argv[3]);\n"
6426 "        if (offset + length E<gt> sb.st_size)\n"
6427 "            length = sb.st_size - offset;\n"
6428 "                /* Can\\(aqt display bytes past end of file */\n"
6429 msgstr ""
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
6436 #. type: Plain text
6437 #: build/C/man2/mmap.2:697
6438 #, no-wrap
6439 msgid ""
6440 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6441 "        length = sb.st_size - offset;\n"
6442 "    }\n"
6443 msgstr ""
6444 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6445 "        length = sb.st_size - offset;\n"
6446 "    }\n"
6447
6448 #. type: Plain text
6449 #: build/C/man2/mmap.2:702
6450 #, no-wrap
6451 msgid ""
6452 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6453 "                MAP_PRIVATE, fd, pa_offset);\n"
6454 "    if (addr == MAP_FAILED)\n"
6455 "        handle_error(\"mmap\");\n"
6456 msgstr ""
6457 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6458 "                MAP_PRIVATE, fd, pa_offset);\n"
6459 "    if (addr == MAP_FAILED)\n"
6460 "        handle_error(\"mmap\");\n"
6461
6462 #. type: Plain text
6463 #: build/C/man2/mmap.2:707
6464 #, no-wrap
6465 msgid ""
6466 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6467 "    if (s != length) {\n"
6468 "        if (s == -1)\n"
6469 "            handle_error(\"write\");\n"
6470 msgstr ""
6471 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6472 "    if (s != length) {\n"
6473 "        if (s == -1)\n"
6474 "            handle_error(\"write\");\n"
6475
6476 #. type: Plain text
6477 #: build/C/man2/mmap.2:711
6478 #, no-wrap
6479 msgid ""
6480 "        fprintf(stderr, \"partial write\");\n"
6481 "        exit(EXIT_FAILURE);\n"
6482 "    }\n"
6483 msgstr ""
6484 "        fprintf(stderr, \"partial write\");\n"
6485 "        exit(EXIT_FAILURE);\n"
6486 "    }\n"
6487
6488 #. type: Plain text
6489 #: build/C/man2/mmap.2:729
6490 msgid ""
6491 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6492 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6493 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6494 "B<shm_overview>(7)"
6495 msgstr ""
6496 "B<getpagesize>(2), B<memfd_create>(2), B<mincore>(2), B<mlock>(2), "
6497 "B<mmap2>(2), B<mprotect>(2), B<mremap>(2), B<msync>(2), "
6498 "B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>(2), B<shm_open>(3), "
6499 "B<shm_overview>(7)"
6500
6501 #. type: Plain text
6502 #: build/C/man2/mmap.2:736
6503 msgid ""
6504 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6505 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6506 msgstr ""
6507 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6508 "smaps> の説明。"
6509
6510 #. type: Plain text
6511 #: build/C/man2/mmap.2:741 build/C/man2/msync.2:151
6512 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6513 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6514
6515 #. type: TH
6516 #: build/C/man2/mmap2.2:29
6517 #, no-wrap
6518 msgid "MMAP2"
6519 msgstr "MMAP2"
6520
6521 #. type: TH
6522 #: build/C/man2/mmap2.2:29
6523 #, no-wrap
6524 msgid "2014-02-25"
6525 msgstr "2014-02-25"
6526
6527 #. type: Plain text
6528 #: build/C/man2/mmap2.2:32
6529 msgid "mmap2 - map files or devices into memory"
6530 msgstr "mmap2 - ファイルやデバイスをメモリーにマップする"
6531
6532 #. type: Plain text
6533 #: build/C/man2/mmap2.2:38
6534 #, no-wrap
6535 msgid ""
6536 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6537 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6538 msgstr ""
6539 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6540 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6541
6542 #. type: Plain text
6543 #: build/C/man2/mmap2.2:43
6544 msgid ""
6545 "This is probably not the system call that you are interested in; instead, "
6546 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6547 "system call."
6548 msgstr ""
6549 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6550 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6551 "の\n"
6552 "ラッパー関数についての説明がある。"
6553
6554 #. type: Plain text
6555 #: build/C/man2/mmap2.2:54
6556 msgid ""
6557 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6558 "except that the final argument specifies the offset into the file in 4096-"
6559 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6560 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6561 "bytes)."
6562 msgstr ""
6563 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6564 "だ\n"
6565 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6566 "ト\n"
6567 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6568 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6569 "プ\n"
6570 "できるようになる。"
6571
6572 #. type: Plain text
6573 #: build/C/man2/mmap2.2:61
6574 msgid ""
6575 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6576 "is returned and I<errno> is set appropriately."
6577 msgstr ""
6578 "成功した場合、 B<mmap2>()  はマップされた領域へのポインターを返す。 エラーの"
6579 "場合は -1 が返されて、 I<errno> が適切に設定される。"
6580
6581 #. type: Plain text
6582 #: build/C/man2/mmap2.2:65
6583 msgid "Problem with getting the data from user space."
6584 msgstr "ユーザー空間からデータを取得するときに問題があった。"
6585
6586 #. type: Plain text
6587 #: build/C/man2/mmap2.2:70
6588 msgid ""
6589 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6590 "4096> is not a multiple of the system page size."
6591 msgstr ""
6592 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6593 "4096> がシステムのページサイズの倍数ではない。"
6594
6595 #. type: Plain text
6596 #: build/C/man2/mmap2.2:74
6597 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6598 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6599
6600 #. type: Plain text
6601 #: build/C/man2/mmap2.2:77
6602 msgid "B<mmap2>()  is available since Linux 2.3.31."
6603 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6604
6605 #. type: Plain text
6606 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6607 msgid "This system call is Linux-specific."
6608 msgstr "このシステムコールは Linux 独自である。"
6609
6610 #. type: Plain text
6611 #: build/C/man2/mmap2.2:86
6612 msgid ""
6613 "On architectures where this system call is present, the glibc B<mmap>()  "
6614 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6615 "call."
6616 msgstr ""
6617 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6618 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6619 "(B<mmap2>(2))  を起動する。"
6620
6621 #. type: Plain text
6622 #: build/C/man2/mmap2.2:88
6623 msgid "This system call does not exist on x86-64."
6624 msgstr "このシステムコールは x86-64 には存在しない。"
6625
6626 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6627 #.  On cris, it looks like the unit might also be the page size,
6628 #.  which is 8192 bytes. -- mtk, June 2007
6629 #. type: Plain text
6630 #: build/C/man2/mmap2.2:95
6631 msgid ""
6632 "On ia64, the unit for I<offset> is actually the system page size, rather "
6633 "than 4096 bytes."
6634 msgstr ""
6635 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6636 "バイトではない。"
6637
6638 #. type: Plain text
6639 #: build/C/man2/mmap2.2:101
6640 msgid ""
6641 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6642 msgstr ""
6643 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6644
6645 #. type: TH
6646 #: build/C/man2/mprotect.2:39
6647 #, no-wrap
6648 msgid "MPROTECT"
6649 msgstr "MPROTECT"
6650
6651 #. type: TH
6652 #: build/C/man2/mprotect.2:39
6653 #, no-wrap
6654 msgid "2014-01-05"
6655 msgstr "2014-01-05"
6656
6657 #. type: Plain text
6658 #: build/C/man2/mprotect.2:42
6659 msgid "mprotect - set protection on a region of memory"
6660 msgstr "mprotect - メモリー領域の保護を設定する"
6661
6662 #. type: Plain text
6663 #: build/C/man2/mprotect.2:47
6664 #, no-wrap
6665 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6666 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6667
6668 #. type: Plain text
6669 #: build/C/man2/mprotect.2:55
6670 msgid ""
6671 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6672 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6673 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6674 msgstr ""
6675 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6676 "び出し元のプロセスのメモリーページのアクセス保護を変更する。 I<addr> はページ"
6677 "境界に一致していなければならない。"
6678
6679 #. type: Plain text
6680 #: build/C/man2/mprotect.2:60
6681 msgid ""
6682 "If the calling process tries to access memory in a manner that violates the "
6683 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6684 msgstr ""
6685 "呼び出し元のプロセスがアクセス保護に違反するようなメモリーアクセスを 行おうと"
6686 "すると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6687
6688 #. type: Plain text
6689 #: build/C/man2/mprotect.2:65
6690 msgid ""
6691 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6692 "following list:"
6693 msgstr ""
6694 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6695 "毎の論理和 (bitwize-or) で指定する:"
6696
6697 #. type: Plain text
6698 #: build/C/man2/mprotect.2:68
6699 msgid "The memory cannot be accessed at all."
6700 msgstr "そのメモリーには全くアクセスできない。"
6701
6702 #. type: Plain text
6703 #: build/C/man2/mprotect.2:71
6704 msgid "The memory can be read."
6705 msgstr "そのメモリーを読み取ることができる。"
6706
6707 #. type: Plain text
6708 #: build/C/man2/mprotect.2:74
6709 msgid "The memory can be modified."
6710 msgstr "そのメモリーを変更できる。"
6711
6712 #. type: Plain text
6713 #: build/C/man2/mprotect.2:77
6714 msgid "The memory can be executed."
6715 msgstr "そのメモリーは実行可能である。"
6716
6717 #. type: Plain text
6718 #: build/C/man2/mprotect.2:84
6719 msgid ""
6720 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6721 "I<errno> is set appropriately."
6722 msgstr ""
6723 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6724 "I<errno> が適切に設定される。"
6725
6726 #. type: Plain text
6727 #: build/C/man2/mprotect.2:94
6728 msgid ""
6729 "The memory cannot be given the specified access.  This can happen, for "
6730 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6731 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6732 msgstr ""
6733 "指定されたアクセスをメモリーに設定することができない。 これは、例えば ファイ"
6734 "ルを読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼"
6735 "び出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6736
6737 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6738 #. type: Plain text
6739 #: build/C/man2/mprotect.2:99
6740 msgid ""
6741 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6742 msgstr ""
6743 "I<addr> が有効なポインターでないか、 システムのページサイズの倍数でない。"
6744
6745 #. type: Plain text
6746 #: build/C/man2/mprotect.2:102
6747 msgid "Internal kernel structures could not be allocated."
6748 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6749
6750 #. type: Plain text
6751 #: build/C/man2/mprotect.2:112
6752 msgid ""
6753 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6754 "address space of the process, or specify one or more pages that are not "
6755 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6756 "for these cases.)"
6757 msgstr ""
6758 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6759 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6760 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6761 "成されていた)。"
6762
6763 #.  SVr4 defines an additional error
6764 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6765 #. type: Plain text
6766 #: build/C/man2/mprotect.2:121
6767 msgid ""
6768 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6769 "unspecified if it is applied to a region of memory that was not obtained via "
6770 "B<mmap>(2)."
6771 msgstr ""
6772 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリー領"
6773 "域に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義である"
6774 "とされている。"
6775
6776 #. type: Plain text
6777 #: build/C/man2/mprotect.2:128
6778 msgid ""
6779 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6780 "process's address space (except for the kernel vsyscall area).  In "
6781 "particular it can be used to change existing code mappings to be writable."
6782 msgstr ""
6783 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6784 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6785 "マッピングを書き込み可能にするために使われる。"
6786
6787 #. type: Plain text
6788 #: build/C/man2/mprotect.2:138
6789 msgid ""
6790 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6791 "architecture- and kernel version-dependent.  On some hardware architectures "
6792 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6793 msgstr ""
6794 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャーと"
6795 "カーネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャーで"
6796 "は、 B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6797
6798 #. type: Plain text
6799 #: build/C/man2/mprotect.2:147
6800 msgid ""
6801 "POSIX.1-2001 says that an implementation may permit access other than that "
6802 "specified in I<prot>, but at a minimum can allow write access only if "
6803 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6804 "has been set."
6805 msgstr ""
6806 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6807 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6808 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6809 "ない点だけは 満たす必要がある。"
6810
6811 #. type: Plain text
6812 #: build/C/man2/mprotect.2:153
6813 msgid ""
6814 "The program below allocates four pages of memory, makes the third of these "
6815 "pages read-only, and then executes a loop that walks upward through the "
6816 "allocated region modifying bytes."
6817 msgstr ""
6818 "以下のプログラムは、メモリーページを 4つ確保し、そのうち 3番目のページを 読み"
6819 "込み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に"
6820 "向かって順番にバイト値を変更するループを実行する。"
6821
6822 #. type: Plain text
6823 #: build/C/man2/mprotect.2:156
6824 msgid ""
6825 "An example of what we might see when running the program is the following:"
6826 msgstr "プログラムを実行した場合の一例を以下に示す。"
6827
6828 #. type: Plain text
6829 #: build/C/man2/mprotect.2:162
6830 #, no-wrap
6831 msgid ""
6832 "$B< ./a.out>\n"
6833 "Start of region:        0x804c000\n"
6834 "Got SIGSEGV at address: 0x804e000\n"
6835 msgstr ""
6836 "$B< ./a.out>\n"
6837 "Start of region:        0x804c000\n"
6838 "Got SIGSEGV at address: 0x804e000\n"
6839
6840 #. type: Plain text
6841 #: build/C/man2/mprotect.2:174
6842 #, no-wrap
6843 msgid ""
6844 "#include E<lt>unistd.hE<gt>\n"
6845 "#include E<lt>signal.hE<gt>\n"
6846 "#include E<lt>stdio.hE<gt>\n"
6847 "#include E<lt>malloc.hE<gt>\n"
6848 "#include E<lt>stdlib.hE<gt>\n"
6849 "#include E<lt>errno.hE<gt>\n"
6850 "#include E<lt>sys/mman.hE<gt>\n"
6851 msgstr ""
6852 "#include E<lt>unistd.hE<gt>\n"
6853 "#include E<lt>signal.hE<gt>\n"
6854 "#include E<lt>stdio.hE<gt>\n"
6855 "#include E<lt>malloc.hE<gt>\n"
6856 "#include E<lt>stdlib.hE<gt>\n"
6857 "#include E<lt>errno.hE<gt>\n"
6858 "#include E<lt>sys/mman.hE<gt>\n"
6859
6860 #. type: Plain text
6861 #: build/C/man2/mprotect.2:179
6862 #, no-wrap
6863 msgid "static char *buffer;\n"
6864 msgstr "static char *buffer;\n"
6865
6866 #. type: Plain text
6867 #: build/C/man2/mprotect.2:187
6868 #, no-wrap
6869 msgid ""
6870 "static void\n"
6871 "handler(int sig, siginfo_t *si, void *unused)\n"
6872 "{\n"
6873 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6874 "            (long) si-E<gt>si_addr);\n"
6875 "    exit(EXIT_FAILURE);\n"
6876 "}\n"
6877 msgstr ""
6878 "static void\n"
6879 "handler(int sig, siginfo_t *si, void *unused)\n"
6880 "{\n"
6881 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6882 "            (long) si-E<gt>si_addr);\n"
6883 "    exit(EXIT_FAILURE);\n"
6884 "}\n"
6885
6886 #. type: Plain text
6887 #: build/C/man2/mprotect.2:194
6888 #, no-wrap
6889 msgid ""
6890 "int\n"
6891 "main(int argc, char *argv[])\n"
6892 "{\n"
6893 "    char *p;\n"
6894 "    int pagesize;\n"
6895 "    struct sigaction sa;\n"
6896 msgstr ""
6897 "int\n"
6898 "main(void)\n"
6899 "{\n"
6900 "    char *p;\n"
6901 "    int pagesize;\n"
6902 "    struct sigaction sa;\n"
6903
6904 #. type: Plain text
6905 #: build/C/man2/mprotect.2:200
6906 #, no-wrap
6907 msgid ""
6908 "    sa.sa_flags = SA_SIGINFO;\n"
6909 "    sigemptyset(&sa.sa_mask);\n"
6910 "    sa.sa_sigaction = handler;\n"
6911 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6912 "        handle_error(\"sigaction\");\n"
6913 msgstr ""
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
6920 #. type: Plain text
6921 #: build/C/man2/mprotect.2:204
6922 #, no-wrap
6923 msgid ""
6924 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6925 "    if (pagesize == -1)\n"
6926 "        handle_error(\"sysconf\");\n"
6927 msgstr ""
6928 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6929 "    if (pagesize == -1)\n"
6930 "        handle_error(\"sysconf\");\n"
6931
6932 #. type: Plain text
6933 #: build/C/man2/mprotect.2:207
6934 #, no-wrap
6935 msgid ""
6936 "    /* Allocate a buffer aligned on a page boundary;\n"
6937 "       initial protection is PROT_READ | PROT_WRITE */\n"
6938 msgstr ""
6939 "    /* Allocate a buffer aligned on a page boundary;\n"
6940 "       initial protection is PROT_READ | PROT_WRITE */\n"
6941
6942 #. type: Plain text
6943 #: build/C/man2/mprotect.2:211
6944 #, no-wrap
6945 msgid ""
6946 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6947 "    if (buffer == NULL)\n"
6948 "        handle_error(\"memalign\");\n"
6949 msgstr ""
6950 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6951 "    if (buffer == NULL)\n"
6952 "        handle_error(\"memalign\");\n"
6953
6954 #. type: Plain text
6955 #: build/C/man2/mprotect.2:213
6956 #, no-wrap
6957 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6958 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6959
6960 #. type: Plain text
6961 #: build/C/man2/mprotect.2:217
6962 #, no-wrap
6963 msgid ""
6964 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6965 "                PROT_READ) == -1)\n"
6966 "        handle_error(\"mprotect\");\n"
6967 msgstr ""
6968 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6969 "                PROT_READ) == -1)\n"
6970 "        handle_error(\"mprotect\");\n"
6971
6972 #. type: Plain text
6973 #: build/C/man2/mprotect.2:220
6974 #, no-wrap
6975 msgid ""
6976 "    for (p = buffer ; ; )\n"
6977 "        *(p++) = \\(aqa\\(aq;\n"
6978 msgstr ""
6979 "    for (p = buffer ; ; )\n"
6980 "        *(p++) = \\(aqa\\(aq;\n"
6981
6982 #. type: Plain text
6983 #: build/C/man2/mprotect.2:224
6984 #, no-wrap
6985 msgid ""
6986 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6987 "    exit(EXIT_SUCCESS);\n"
6988 "}\n"
6989 msgstr ""
6990 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6991 "    exit(EXIT_SUCCESS);\n"
6992 "}\n"
6993
6994 #. type: Plain text
6995 #: build/C/man2/mprotect.2:228
6996 msgid "B<mmap>(2), B<sysconf>(3)"
6997 msgstr "B<mmap>(2), B<sysconf>(3)"
6998
6999 #. type: TH
7000 #: build/C/man2/mremap.2:30
7001 #, no-wrap
7002 msgid "MREMAP"
7003 msgstr "MREMAP"
7004
7005 #. type: TH
7006 #: build/C/man2/mremap.2:30
7007 #, no-wrap
7008 msgid "2010-06-10"
7009 msgstr "2010-06-10"
7010
7011 #. type: Plain text
7012 #: build/C/man2/mremap.2:33
7013 msgid "mremap - remap a virtual memory address"
7014 msgstr "mremap - 仮想メモリーアドレスを再マッピングする"
7015
7016 #. type: Plain text
7017 #: build/C/man2/mremap.2:36
7018 #, no-wrap
7019 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7020 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7021
7022 #. type: Plain text
7023 #: build/C/man2/mremap.2:41
7024 #, no-wrap
7025 msgid ""
7026 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7027 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7028 msgstr ""
7029 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
7030 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
7031
7032 #. type: Plain text
7033 #: build/C/man2/mremap.2:47
7034 msgid ""
7035 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
7036 "moving it at the same time (controlled by the I<flags> argument and the "
7037 "available virtual address space)."
7038 msgstr ""
7039 "B<mremap>()  は既存のメモリーマッピングの拡張 (または縮小) を行う。 同時に移"
7040 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
7041 "る)。"
7042
7043 #. type: Plain text
7044 #: build/C/man2/mremap.2:61
7045 msgid ""
7046 "I<old_address> is the old address of the virtual memory block that you want "
7047 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
7048 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
7049 "requested size of the virtual memory block after the resize.  An optional "
7050 "fifth argument, I<new_address>, may be provided; see the description of "
7051 "B<MREMAP_FIXED> below."
7052 msgstr ""
7053 "I<old_address> は拡張 (または縮小) しようとする仮想メモリーブロック の元のア"
7054 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
7055 "すること。I<old_size> は元の仮想メモリーブロックの サイズである。 "
7056 "I<new_size> は要求する変更後の仮想メモリーブロックのサイズである。 5 番目の引"
7057 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
7058 "明を参照のこと。"
7059
7060 #. type: Plain text
7061 #: build/C/man2/mremap.2:73
7062 msgid ""
7063 "In Linux the memory is divided into pages.  A user process has (one or)  "
7064 "several linear virtual memory segments.  Each virtual memory segment has one "
7065 "or more mappings to real memory pages (in the page table).  Each virtual "
7066 "memory segment has its own protection (access rights), which may cause a "
7067 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
7068 "to a read-only segment).  Accessing virtual memory outside of the segments "
7069 "will also cause a segmentation violation."
7070 msgstr ""
7071 "Linux ではメモリーはページに分割される。ユーザープロセスは (一つまたは)  複数"
7072 "のリニアな仮想メモリーセグメントを持つ。 それぞれの仮想メモリーセグメントは一"
7073 "つ以上の実メモリーページ にマッピングされている (マッピング情報はページテーブ"
7074 "ルで管理される)。 仮想メモリーセグメントにはセグメント毎の保護 (アクセス権) "
7075 "が設定されており、 メモリーが不正にアクセスされた場合 (例えば読み込み専用のセ"
7076 "グメントに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) "
7077 "を 引き起こす。また、セグメント外の仮想メモリーにアクセスした場合にも セグメ"
7078 "ンテーション侵害が発生する。"
7079
7080 #. type: Plain text
7081 #: build/C/man2/mremap.2:81
7082 msgid ""
7083 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
7084 "mapping between virtual addresses and memory pages.  This can be used to "
7085 "implement a very efficient B<realloc>(3)."
7086 msgstr ""
7087 "B<mremap>()  は Linux のページテーブル方式を使用する。 B<mremap>()  は仮想ア"
7088 "ドレスとメモリーページのマッピングを変更する。これは非常に効率的な "
7089 "B<realloc>(3)  を実装するのに使用されている。"
7090
7091 #. type: Plain text
7092 #: build/C/man2/mremap.2:83
7093 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7094 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7095
7096 #. type: TP
7097 #: build/C/man2/mremap.2:83
7098 #, no-wrap
7099 msgid "B<MREMAP_MAYMOVE>"
7100 msgstr "B<MREMAP_MAYMOVE>"
7101
7102 #. type: Plain text
7103 #: build/C/man2/mremap.2:95
7104 msgid ""
7105 "By default, if there is not sufficient space to expand a mapping at its "
7106 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7107 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7108 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7109 "mapping location become invalid (offsets relative to the starting address of "
7110 "the mapping should be employed)."
7111 msgstr ""
7112 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7113 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7114 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7115 "れると、古いマッピング位置への絶対ポインターは 無効になる (マッピングの開始ア"
7116 "ドレスからの相対オフセットは有効のままである)。"
7117
7118 #. type: TP
7119 #: build/C/man2/mremap.2:95
7120 #, no-wrap
7121 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7122 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7123
7124 #. type: Plain text
7125 #: build/C/man2/mremap.2:117
7126 msgid ""
7127 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7128 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7129 "\\ *new_address>, which specifies a page-aligned address to which the "
7130 "mapping must be moved.  Any previous mapping at the address range specified "
7131 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7132 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7133 msgstr ""
7134 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7135 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7136 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7137 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7138 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7139 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7140 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7141
7142 #. type: Plain text
7143 #: build/C/man2/mremap.2:127
7144 msgid ""
7145 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7146 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7147 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7148 "locked by the process may change."
7149 msgstr ""
7150 "I<old_address> と I<old_size> で指定されるメモリーセグメントが (B<mlock>(2)  "
7151 "や同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置さ"
7152 "れたりした時にロックも維持される。 その結果、プロセスによってロックされるメモ"
7153 "リーの量は変化する。"
7154
7155 #. type: Plain text
7156 #: build/C/man2/mremap.2:135
7157 msgid ""
7158 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7159 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7160 "and I<errno> is set appropriately."
7161 msgstr ""
7162 "成功した場合は B<mremap>()  は新しい仮想メモリー領域へのポインターを返す。 エ"
7163 "ラーの場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> "
7164 "が適切に設定される。"
7165
7166 #. type: Plain text
7167 #: build/C/man2/mremap.2:142
7168 msgid ""
7169 "The caller tried to expand a memory segment that is locked, but this was not "
7170 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7171 msgstr ""
7172 "呼び出し元がロックされているメモリーセグメントを拡張しようとしたが、 "
7173 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7174
7175 #. type: Plain text
7176 #: build/C/man2/mremap.2:151
7177 msgid ""
7178 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7179 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7180 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7181 "the whole address space requested, but those mappings are of different types."
7182 msgstr ""
7183 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7184 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7185 "正な仮想メモリーアドレスである。 たとえ要求したアドレス空間全体を含むような"
7186 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7187 "を受け取るだろう。"
7188
7189 #. type: Plain text
7190 #: build/C/man2/mremap.2:179
7191 msgid ""
7192 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7193 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7194 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7195 "was invalid; or the new address range specified by I<new_address> and "
7196 "I<new_size> overlapped the old address range specified by I<old_address> and "
7197 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7198 "B<MREMAP_MAYMOVE>."
7199 msgstr ""
7200 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7201 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7202 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7203 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7204 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7205 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7206 "されていない。"
7207
7208 #. type: Plain text
7209 #: build/C/man2/mremap.2:185
7210 msgid ""
7211 "The memory area cannot be expanded at the current virtual address, and the "
7212 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7213 "(virtual) memory available."
7214 msgstr ""
7215 "現在の仮想アドレスではメモリー領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7216 "I<flags> に設定されていない。 または十分な (仮想) メモリーが存在しない。"
7217
7218 #.  4.2BSD had a (never actually implemented)
7219 #.  .BR mremap (2)
7220 #.  call with completely different semantics.
7221 #. type: Plain text
7222 #: build/C/man2/mremap.2:191
7223 msgid ""
7224 "This call is Linux-specific, and should not be used in programs intended to "
7225 "be portable."
7226 msgstr ""
7227 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7228 "い。"
7229
7230 #. type: Plain text
7231 #: build/C/man2/mremap.2:199
7232 msgid ""
7233 "Prior to version 2.4, glibc did not expose the definition of "
7234 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7235 "I<new_address> argument."
7236 msgstr ""
7237 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7238 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7239
7240 #. type: Plain text
7241 #: build/C/man2/mremap.2:208
7242 msgid ""
7243 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7244 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7245 msgstr ""
7246 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7247 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7248
7249 #. type: Plain text
7250 #: build/C/man2/mremap.2:214
7251 msgid ""
7252 "Your favorite text book on operating systems for more information on paged "
7253 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7254 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7255 "Maurice J. Bach)"
7256 msgstr ""
7257 "ページ分割されたメモリーについてもっと詳しく知りたいならば、あなたのお気に入"
7258 "りのオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7259 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7260 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7261
7262 #. type: TH
7263 #: build/C/man2/msync.2:25
7264 #, no-wrap
7265 msgid "MSYNC"
7266 msgstr "MSYNC"
7267
7268 #. type: TH
7269 #: build/C/man2/msync.2:25
7270 #, no-wrap
7271 msgid "2014-04-20"
7272 msgstr "2014-04-20"
7273
7274 #. type: Plain text
7275 #: build/C/man2/msync.2:28
7276 msgid "msync - synchronize a file with a memory map"
7277 msgstr "msync - ファイルをマップしたメモリーと同期させる"
7278
7279 #. type: Plain text
7280 #: build/C/man2/msync.2:32
7281 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7282 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7283
7284 #. type: Plain text
7285 #: build/C/man2/msync.2:48
7286 msgid ""
7287 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7288 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7289 "this call there is no guarantee that changes are written back before "
7290 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7291 "corresponds to the memory area starting at I<addr> and having length "
7292 "I<length> is updated."
7293 msgstr ""
7294 "B<msync>()  は B<mmap>(2)  を使ってメモリーにマップされたファイルの、 メモ"
7295 "リー上のコピーになされた変更をファイルシステムに反映させる。 この関数を使用し"
7296 "ないと、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より"
7297 "正確には、ファイルのうち I<addr> から始まり長さ I<length> のメモリー領域に対"
7298 "応する部分が更新される。"
7299
7300 #. type: Plain text
7301 #: build/C/man2/msync.2:68
7302 msgid ""
7303 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7304 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7305 "specifies that an update be scheduled, but the call returns immediately.  "
7306 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7307 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7308 "they can be updated with the fresh values just written)."
7309 msgstr ""
7310 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7311 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7312 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7313 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7314 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7315 "に対する他のマッピングを無効にすることを要求する。"
7316
7317 #. type: Plain text
7318 #: build/C/man2/msync.2:73
7319 msgid ""
7320 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7321 "appropriately."
7322 msgstr ""
7323 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7324 "る。"
7325
7326 #. type: TP
7327 #: build/C/man2/msync.2:74
7328 #, no-wrap
7329 msgid "B<EBUSY>"
7330 msgstr "B<EBUSY>"
7331
7332 #. type: Plain text
7333 #: build/C/man2/msync.2:80
7334 msgid ""
7335 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7336 "specified address range."
7337 msgstr ""
7338 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7339 "存在する。"
7340
7341 #. type: Plain text
7342 #: build/C/man2/msync.2:93
7343 msgid ""
7344 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7345 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7346 "B<MS_ASYNC> are set in I<flags>."
7347 msgstr ""
7348 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7349 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7350 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7351
7352 #. type: Plain text
7353 #: build/C/man2/msync.2:96
7354 msgid "The indicated memory (or part of it) was not mapped."
7355 msgstr "指定されたメモリー (またはその一部) がマップされていない。"
7356
7357 #. type: Plain text
7358 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7359 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7360 msgid "POSIX.1-2001."
7361 msgstr "POSIX.1-2001."
7362
7363 #. type: Plain text
7364 #: build/C/man2/msync.2:105
7365 msgid ""
7366 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7367 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7368 msgstr ""
7369 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7370 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7371
7372 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7373 #.  -1: unavailable, 0: ask using sysconf().
7374 #.  glibc defines them to 1.
7375 #. type: Plain text
7376 #: build/C/man2/msync.2:120
7377 msgid ""
7378 "On POSIX systems on which B<msync>()  is available, both "
7379 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7380 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7381 msgstr ""
7382 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7383 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7384 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7385
7386 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7387 #. type: Plain text
7388 #: build/C/man2/msync.2:147
7389 msgid ""
7390 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7391 "I<flags>, and indeed failure to include one of these flags will cause "
7392 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7393 "B<msync>()  that specifies neither of these flags, with semantics that are "
7394 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7395 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7396 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7397 "behavior, portable, future-proof applications should ensure that they "
7398 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7399 msgstr ""
7400 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7401 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7402 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7403 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7404 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7405 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7406 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7407 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7408 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7409 "指定するようにすべきである。"
7410
7411 #. type: TP
7412 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7413 #, no-wrap
7414 msgid "B<mmap>(2)"
7415 msgstr "B<mmap>(2)"
7416
7417 #. type: TH
7418 #: build/C/man3/mtrace.3:25
7419 #, no-wrap
7420 msgid "MTRACE"
7421 msgstr "MTRACE"
7422
7423 #. type: TH
7424 #: build/C/man3/mtrace.3:25
7425 #, no-wrap
7426 msgid "2012-04-18"
7427 msgstr "2012-04-18"
7428
7429 #. type: Plain text
7430 #: build/C/man3/mtrace.3:28
7431 msgid "mtrace, muntrace - malloc tracing"
7432 msgstr "mtrace, muntrace - malloc のトレース"
7433
7434 #. type: Plain text
7435 #: build/C/man3/mtrace.3:30
7436 msgid "B<#include E<lt>mcheck.hE<gt>>"
7437 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7438
7439 #. type: Plain text
7440 #: build/C/man3/mtrace.3:32
7441 msgid "B<void mtrace(void);>"
7442 msgstr "B<void mtrace(void);>"
7443
7444 #. type: Plain text
7445 #: build/C/man3/mtrace.3:34
7446 msgid "B<void muntrace(void);>"
7447 msgstr "B<void muntrace(void);>"
7448
7449 #. type: Plain text
7450 #: build/C/man3/mtrace.3:46
7451 msgid ""
7452 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7453 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7454 "hook functions record tracing information about memory allocation and "
7455 "deallocation.  The tracing information can be used to discover memory leaks "
7456 "and attempts to free nonallocated memory in a program."
7457 msgstr ""
7458
7459 #. type: Plain text
7460 #: build/C/man3/mtrace.3:57
7461 msgid ""
7462 "The B<muntrace>()  function disables the hook functions installed by "
7463 "B<mtrace>(), so that tracing information is no longer recorded for the "
7464 "memory-allocation functions.  If no hook functions were successfully "
7465 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7466 msgstr ""
7467
7468 #. type: Plain text
7469 #: build/C/man3/mtrace.3:65
7470 msgid ""
7471 "When B<mtrace>()  is called, it checks the value of the environment variable "
7472 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7473 "tracing information is to be recorded.  If the pathname is successfully "
7474 "opened, it is truncated to zero length."
7475 msgstr ""
7476
7477 #. type: Plain text
7478 #: build/C/man3/mtrace.3:78
7479 msgid ""
7480 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7481 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7482 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7483 "ignored, and B<mtrace>()  has no effect."
7484 msgstr ""
7485
7486 #. type: Plain text
7487 #: build/C/man3/mtrace.3:86
7488 msgid ""
7489 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7490 "program, and B<muntrace>()  is never called."
7491 msgstr ""
7492
7493 #. type: Plain text
7494 #: build/C/man3/mtrace.3:96
7495 msgid ""
7496 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7497 "designed to be human readable.  The GNU C library provides a Perl script, "
7498 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7499 "output.  For best results, the traced program should be compiled with "
7500 "debugging enabled, so that line-number information is recorded in the "
7501 "executable."
7502 msgstr ""
7503
7504 #. type: Plain text
7505 #: build/C/man3/mtrace.3:102
7506 msgid ""
7507 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7508 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7509 msgstr ""
7510
7511 #. type: Plain text
7512 #: build/C/man3/mtrace.3:108
7513 msgid ""
7514 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7515 "the line number references may refer to the previous or following "
7516 "(nonblank)  line of the source code."
7517 msgstr ""
7518
7519 #. type: Plain text
7520 #: build/C/man3/mtrace.3:115
7521 msgid ""
7522 "The shell session below demonstrates the use of the B<mtrace>()  function "
7523 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7524 "different locations.  The demonstration uses the following program:"
7525 msgstr ""
7526
7527 #. type: Plain text
7528 #: build/C/man3/mtrace.3:122
7529 #, no-wrap
7530 msgid ""
7531 "$ B<cat t_mtrace.c>\n"
7532 "#include E<lt>mcheck.hE<gt>\n"
7533 "#include E<lt>stdlib.hE<gt>\n"
7534 "#include E<lt>stdio.hE<gt>\n"
7535 msgstr ""
7536 "$ B<cat t_mtrace.c>\n"
7537 "#include E<lt>mcheck.hE<gt>\n"
7538 "#include E<lt>stdlib.hE<gt>\n"
7539 "#include E<lt>stdio.hE<gt>\n"
7540
7541 #. type: Plain text
7542 #: build/C/man3/mtrace.3:127
7543 #, no-wrap
7544 msgid ""
7545 "int\n"
7546 "main(int argc, char *argv[])\n"
7547 "{\n"
7548 "    int j;\n"
7549 msgstr ""
7550 "int\n"
7551 "main(int argc, char *argv[])\n"
7552 "{\n"
7553 "    int j;\n"
7554
7555 #. type: Plain text
7556 #: build/C/man3/mtrace.3:129
7557 #, no-wrap
7558 msgid "    mtrace();\n"
7559 msgstr "    mtrace();\n"
7560
7561 #. type: Plain text
7562 #: build/C/man3/mtrace.3:132
7563 #, no-wrap
7564 msgid ""
7565 "    for (j = 0; j E<lt> 2; j++)\n"
7566 "        malloc(100);            /* Never freed--a memory leak */\n"
7567 msgstr ""
7568 "    for (j = 0; j E<lt> 2; j++)\n"
7569 "        malloc(100);            /* Never freed--a memory leak */\n"
7570
7571 #. type: Plain text
7572 #: build/C/man3/mtrace.3:136
7573 #, no-wrap
7574 msgid ""
7575 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7576 "    exit(EXIT_SUCCESS);\n"
7577 "}\n"
7578 msgstr ""
7579 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7580 "    exit(EXIT_SUCCESS);\n"
7581 "}\n"
7582
7583 #. type: Plain text
7584 #: build/C/man3/mtrace.3:142
7585 msgid ""
7586 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7587 "memory leaks at two different locations in the program:"
7588 msgstr ""
7589
7590 #. type: Plain text
7591 #: build/C/man3/mtrace.3:155
7592 #, no-wrap
7593 msgid ""
7594 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7595 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7596 "$ B<./t_mtrace>\n"
7597 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7598 "Memory not freed:\n"
7599 "-----------------\n"
7600 "   Address     Size     Caller\n"
7601 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7602 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7603 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7604 msgstr ""
7605 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7606 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7607 "$ B<./t_mtrace>\n"
7608 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7609 "Memory not freed:\n"
7610 "-----------------\n"
7611 "   Address     Size     Caller\n"
7612 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7613 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7614 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7615
7616 #. type: Plain text
7617 #: build/C/man3/mtrace.3:167
7618 msgid ""
7619 "The first two messages about unfreed memory correspond to the two "
7620 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7621 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7622 msgstr ""
7623
7624 #. type: Plain text
7625 #: build/C/man3/mtrace.3:172
7626 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7627 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7628
7629 #. type: TH
7630 #: build/C/man2/posix_fadvise.2:28
7631 #, no-wrap
7632 msgid "POSIX_FADVISE"
7633 msgstr "POSIX_FADVISE"
7634
7635 #. type: Plain text
7636 #: build/C/man2/posix_fadvise.2:31
7637 msgid "posix_fadvise - predeclare an access pattern for file data"
7638 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7639
7640 #. type: Plain text
7641 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7642 #, no-wrap
7643 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7644 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7645
7646 #. type: Plain text
7647 #: build/C/man2/posix_fadvise.2:37
7648 #, no-wrap
7649 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7650 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7651
7652 #. type: Plain text
7653 #: build/C/man2/posix_fadvise.2:46
7654 msgid "B<posix_fadvise>():"
7655 msgstr "B<posix_fadvise>():"
7656
7657 #. type: Plain text
7658 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7659 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7660 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7661
7662 #. type: Plain text
7663 #: build/C/man2/posix_fadvise.2:56
7664 msgid ""
7665 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7666 "data in a specific pattern in the future, thus allowing the kernel to "
7667 "perform appropriate optimizations."
7668 msgstr ""
7669 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7670 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7671 "適化を実行することが可能になる。"
7672
7673 #. type: Plain text
7674 #: build/C/man2/posix_fadvise.2:63
7675 msgid ""
7676 "The I<advice> applies to a (not necessarily existent) region starting at "
7677 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7678 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7679 "binding; it merely constitutes an expectation on behalf of the application."
7680 msgstr ""
7681 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7682 "イ\n"
7683 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7684 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7685 "ケー\n"
7686 "ションのために可能性を構成するだけである。"
7687
7688 #. type: Plain text
7689 #: build/C/man2/posix_fadvise.2:65
7690 msgid "Permissible values for I<advice> include:"
7691 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7692
7693 #. type: TP
7694 #: build/C/man2/posix_fadvise.2:65
7695 #, no-wrap
7696 msgid "B<POSIX_FADV_NORMAL>"
7697 msgstr "B<POSIX_FADV_NORMAL>"
7698
7699 #. type: Plain text
7700 #: build/C/man2/posix_fadvise.2:71
7701 msgid ""
7702 "Indicates that the application has no advice to give about its access "
7703 "pattern for the specified data.  If no advice is given for an open file, "
7704 "this is the default assumption."
7705 msgstr ""
7706 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7707 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7708 "合、 これがデフォルトで仮定される。"
7709
7710 #. type: TP
7711 #: build/C/man2/posix_fadvise.2:71
7712 #, no-wrap
7713 msgid "B<POSIX_FADV_SEQUENTIAL>"
7714 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7715
7716 #. type: Plain text
7717 #: build/C/man2/posix_fadvise.2:75
7718 msgid ""
7719 "The application expects to access the specified data sequentially (with "
7720 "lower offsets read before higher ones)."
7721 msgstr ""
7722 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7723 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7724
7725 #. type: TP
7726 #: build/C/man2/posix_fadvise.2:75
7727 #, no-wrap
7728 msgid "B<POSIX_FADV_RANDOM>"
7729 msgstr "B<POSIX_FADV_RANDOM>"
7730
7731 #. type: Plain text
7732 #: build/C/man2/posix_fadvise.2:78
7733 msgid "The specified data will be accessed in random order."
7734 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7735
7736 #. type: TP
7737 #: build/C/man2/posix_fadvise.2:78
7738 #, no-wrap
7739 msgid "B<POSIX_FADV_NOREUSE>"
7740 msgstr "B<POSIX_FADV_NOREUSE>"
7741
7742 #. type: Plain text
7743 #: build/C/man2/posix_fadvise.2:81
7744 msgid "The specified data will be accessed only once."
7745 msgstr "指定されたデータは 1 度しかアクセスされない。"
7746
7747 #. type: TP
7748 #: build/C/man2/posix_fadvise.2:81
7749 #, no-wrap
7750 msgid "B<POSIX_FADV_WILLNEED>"
7751 msgstr "B<POSIX_FADV_WILLNEED>"
7752
7753 #. type: Plain text
7754 #: build/C/man2/posix_fadvise.2:84
7755 msgid "The specified data will be accessed in the near future."
7756 msgstr "指定されたデータは近い将来アクセスされる。"
7757
7758 #. type: TP
7759 #: build/C/man2/posix_fadvise.2:84
7760 #, no-wrap
7761 msgid "B<POSIX_FADV_DONTNEED>"
7762 msgstr "B<POSIX_FADV_DONTNEED>"
7763
7764 #. type: Plain text
7765 #: build/C/man2/posix_fadvise.2:87
7766 msgid "The specified data will not be accessed in the near future."
7767 msgstr "指定されたデータは近い将来アクセスされない。"
7768
7769 #. type: Plain text
7770 #: build/C/man2/posix_fadvise.2:90
7771 msgid "On success, zero is returned.  On error, an error number is returned."
7772 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7773
7774 #. type: Plain text
7775 #: build/C/man2/posix_fadvise.2:94
7776 msgid "The I<fd> argument was not a valid file descriptor."
7777 msgstr "I<fd> 引き数が有効なファイルディスクリプターでない。"
7778
7779 #. type: Plain text
7780 #: build/C/man2/posix_fadvise.2:97
7781 msgid "An invalid value was specified for I<advice>."
7782 msgstr "無効な値が I<advice> に指定された。"
7783
7784 #.  commit 87ba81dba431232548ce29d5d224115d0c2355ac
7785 #. type: Plain text
7786 #: build/C/man2/posix_fadvise.2:107
7787 msgid ""
7788 "The specified file descriptor refers to a pipe or FIFO.  (B<ESPIPE> is the "
7789 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7790 "B<EINVAL> in this case.)"
7791 msgstr ""
7792 "指定されたファイルディスクリプターがパイプまたは FIFO を参照している "
7793 "(B<ESPIPE> は POSIX で規定されているエラーだが、 バージョン 2.16 より前のカー"
7794 "ネルでは、 この場合に B<EINVAL> を返していた。)"
7795
7796 #.  of fadvise64_64()
7797 #. type: Plain text
7798 #: build/C/man2/posix_fadvise.2:115
7799 msgid ""
7800 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7801 "called B<fadvise64>().  Library support has been provided since glibc "
7802 "version 2.2, via the wrapper function B<posix_fadvise>()."
7803 msgstr ""
7804 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7805 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7806 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7807 "ラッパー関数は B<posix_fadvise>() という名前である。"
7808
7809 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7810 #. type: Plain text
7811 #: build/C/man2/posix_fadvise.2:122
7812 msgid ""
7813 "Since Linux 3.18, support for the underlying system call is optional, "
7814 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7815 "option."
7816 msgstr ""
7817 "Linux 3.18 以降では、対応するシステムコールのサポートは任意となり、利用できる"
7818 "かはカーネルが B<CONFIG_ADVISE_SYSCALLS> オプションを有効にしてコンパイルされ"
7819 "ているかに依存する。"
7820
7821 #. type: Plain text
7822 #: build/C/man2/posix_fadvise.2:131
7823 msgid ""
7824 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7825 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7826 msgstr ""
7827 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7828 "I<off_t> に変更された点に注意すること。"
7829
7830 #. type: Plain text
7831 #: build/C/man2/posix_fadvise.2:137
7832 msgid ""
7833 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7834 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7835 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7836 "the entire file, not just the specified region (but other open file handles "
7837 "to the same file are unaffected)."
7838 msgstr ""
7839 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7840 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7841 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7842 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7843 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7844
7845 #. type: Plain text
7846 #: build/C/man2/posix_fadvise.2:144
7847 msgid ""
7848 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7849 "into the page cache.  The amount of data read may be decreased by the kernel "
7850 "depending on virtual memory load.  (A few megabytes will usually be fully "
7851 "satisfied, and more is rarely useful.)"
7852 msgstr ""
7853 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7854 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリーの負荷に依ってカー"
7855 "ネルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより"
7856 "多くてもめったに役に立たない)。"
7857
7858 #. type: Plain text
7859 #: build/C/man2/posix_fadvise.2:148
7860 msgid ""
7861 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7862 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7863 "flag is a no-op."
7864 msgstr ""
7865 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7866 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7867 "フラグは何も行わない。"
7868
7869 #. type: Plain text
7870 #: build/C/man2/posix_fadvise.2:156
7871 msgid ""
7872 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7873 "specified region.  This is useful, for example, while streaming large "
7874 "files.  A program may periodically request the kernel to free cached data "
7875 "that has already been used, so that more useful cached pages are not "
7876 "discarded instead."
7877 msgstr ""
7878 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7879 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7880 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7881 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7882 "されたページが、 代わりに破棄されることはない。"
7883
7884 #. type: Plain text
7885 #: build/C/man2/posix_fadvise.2:164
7886 msgid ""
7887 "Requests to discard partial pages are ignored.  It is preferable to preserve "
7888 "needed data than discard unneeded data.  If the application requires that "
7889 "data be considered for discarding then I<offset> and I<len> must be page-"
7890 "aligned."
7891 msgstr ""
7892 "ページの一部分の破棄要求は無視される。 不要なデータを破棄するよりも必要なデー"
7893 "タを保持する方がよい。 アプリケーションがデータを破棄した方がよいと思う場合"
7894 "は、 I<offset> と I<len> がページ境界に合っていなければならない。"
7895
7896 #. type: Plain text
7897 #: build/C/man2/posix_fadvise.2:172
7898 msgid ""
7899 "Pages that have not yet been written out will be unaffected, so if the "
7900 "application wishes to guarantee that pages will be released, it should call "
7901 "B<fsync>(2)  or B<fdatasync>(2)  first."
7902 msgstr ""
7903 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7904 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7905 "B<fdatasync>(2)  を呼ぶべきである。"
7906
7907 #. type: SS
7908 #: build/C/man2/posix_fadvise.2:172
7909 #, no-wrap
7910 msgid "Architecture-specific variants"
7911 msgstr "アーキテクチャー固有の派生バージョン"
7912
7913 #. type: Plain text
7914 #: build/C/man2/posix_fadvise.2:189
7915 msgid ""
7916 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7917 "of registers (see B<syscall>(2)  for further detail).  On such "
7918 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7919 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7920 "and I<offset> arguments.  Therefore, these architectures define a version of "
7921 "the system call that orders the arguments suitably, but otherwise is "
7922 "otherwise exactly the same as B<posix_fadvise>()."
7923 msgstr ""
7924 "いくつかのアーキテクチャーでは、 64 ビットの引き数は適切なレジスターの組に割"
7925 "り当てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャーでは、 "
7926 "「書式」に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 "
7927 "I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費されてし"
7928 "まう。 そのため、 これらのアーキテクチャーでは引き数が適切な順序になった別の"
7929 "システムコールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じで"
7930 "ある。"
7931
7932 #. type: Plain text
7933 #: build/C/man2/posix_fadvise.2:191
7934 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7935 msgstr ""
7936 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7937
7938 #. type: Plain text
7939 #: build/C/man2/posix_fadvise.2:196
7940 #, no-wrap
7941 msgid ""
7942 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7943 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7944 msgstr ""
7945 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7946 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7947
7948 #. type: Plain text
7949 #: build/C/man2/posix_fadvise.2:204
7950 msgid ""
7951 "These architecture-specific details are generally hidden from applications "
7952 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7953 "appropriate architecture-specific system call."
7954 msgstr ""
7955 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7956 "チャー固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適"
7957 "切なアーキテクチャー固有のシステムコールが呼び出される。"
7958
7959 #. type: Plain text
7960 #: build/C/man2/posix_fadvise.2:209
7961 msgid ""
7962 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7963 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7964 "through to the end of the file\"."
7965 msgstr ""
7966 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7967 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7968 "いた。"
7969
7970 #.  FIXME . Write a posix_fadvise(3) page.
7971 #. type: Plain text
7972 #: build/C/man2/posix_fadvise.2:215
7973 msgid ""
7974 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7975 "B<posix_madvise>(3)"
7976 msgstr ""
7977 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7978 "B<posix_madvise>(3)"
7979
7980 #. type: TH
7981 #: build/C/man3/posix_fallocate.3:25
7982 #, no-wrap
7983 msgid "POSIX_FALLOCATE"
7984 msgstr "POSIX_FALLOCATE"
7985
7986 #. type: Plain text
7987 #: build/C/man3/posix_fallocate.3:28
7988 msgid "posix_fallocate - allocate file space"
7989 msgstr "posix_fallocate - ファイルのスペースを確保する"
7990
7991 #. type: Plain text
7992 #: build/C/man3/posix_fallocate.3:33
7993 #, no-wrap
7994 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7995 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7996
7997 #. type: Plain text
7998 #: build/C/man3/posix_fallocate.3:42
7999 msgid "B<posix_fallocate>():"
8000 msgstr "B<posix_fallocate>():"
8001
8002 #. type: Plain text
8003 #: build/C/man3/posix_fallocate.3:61
8004 msgid ""
8005 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
8006 "the file referred to by the descriptor I<fd> for the bytes in the range "
8007 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
8008 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
8009 "range are guaranteed not to fail because of lack of disk space."
8010 msgstr ""
8011 "関数 B<posix_fallocate>()  は、ディスクリプター I<fd> で参照されるファイルに"
8012 "対して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から"
8013 "始まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが"
8014 "成功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足"
8015 "で失敗しないことが保証される。"
8016
8017 #. type: Plain text
8018 #: build/C/man3/posix_fallocate.3:66
8019 msgid ""
8020 "If the size of the file is less than I<offset>+I<len>, then the file is "
8021 "increased to this size; otherwise the file size is left unchanged."
8022 msgstr ""
8023 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
8024 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
8025
8026 #. type: Plain text
8027 #: build/C/man3/posix_fallocate.3:72
8028 msgid ""
8029 "B<posix_fallocate>()  returns zero on success, or an error number on "
8030 "failure.  Note that I<errno> is not set."
8031 msgstr ""
8032 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
8033 "す。 I<errno> が設定されない点に注意すること。"
8034
8035 #. type: Plain text
8036 #: build/C/man3/posix_fallocate.3:81
8037 msgid "I<offset+len> exceeds the maximum file size."
8038 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
8039
8040 #. type: Plain text
8041 #: build/C/man3/posix_fallocate.3:91
8042 msgid "I<fd> does not refer to a regular file."
8043 msgstr "I<fd> が通常のファイルとして参照されていない。"
8044
8045 #. type: Plain text
8046 #: build/C/man3/posix_fallocate.3:100
8047 msgid "I<fd> refers to a pipe."
8048 msgstr "I<fd> がパイプを参照している。"
8049
8050 #. type: Plain text
8051 #: build/C/man3/posix_fallocate.3:103
8052 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
8053 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
8054
8055 #. type: Plain text
8056 #: build/C/man3/posix_fallocate.3:108
8057 msgid "The B<posix_fallocate>()  function is thread-safe."
8058 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
8059
8060 #. type: Plain text
8061 #: build/C/man3/posix_fallocate.3:133
8062 msgid ""
8063 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
8064 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
8065 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
8066 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
8067 "zero."
8068 msgstr ""
8069 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
8070 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
8071 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
8072 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
8073 "る。"
8074
8075 #. type: Plain text
8076 #: build/C/man3/posix_fallocate.3:138
8077 msgid ""
8078 "In the glibc implementation, B<posix_fallocate>()  is implemented using "
8079 "B<fallocate>(2)."
8080 msgstr ""
8081 "glibc の実装では、 B<posix_fallocate>() は B<fallocate>() を使って実装されて"
8082 "いる。"
8083
8084 #. type: Plain text
8085 #: build/C/man3/posix_fallocate.3:143
8086 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8087 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
8088
8089 #. type: TH
8090 #: build/C/man3/posix_memalign.3:29
8091 #, no-wrap
8092 msgid "POSIX_MEMALIGN"
8093 msgstr "POSIX_MEMALIGN"
8094
8095 #. type: TH
8096 #: build/C/man3/posix_memalign.3:29
8097 #, no-wrap
8098 msgid "2013-09-02"
8099 msgstr "2013-09-02"
8100
8101 #. type: Plain text
8102 #: build/C/man3/posix_memalign.3:32
8103 msgid ""
8104 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8105 "memory"
8106 msgstr ""
8107 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8108 "されたメモリーの割り当てを行う"
8109
8110 #. type: Plain text
8111 #: build/C/man3/posix_memalign.3:35
8112 #, no-wrap
8113 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8114 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8115
8116 #. type: Plain text
8117 #: build/C/man3/posix_memalign.3:39
8118 #, no-wrap
8119 msgid ""
8120 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8121 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8122 "B<void *valloc(size_t >I<size>B<);>\n"
8123 msgstr ""
8124 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8125 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8126 "B<void *valloc(size_t >I<size>B<);>\n"
8127
8128 #. type: Plain text
8129 #: build/C/man3/posix_memalign.3:44
8130 #, no-wrap
8131 msgid ""
8132 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8133 "B<void *pvalloc(size_t >I<size>B<);>\n"
8134 msgstr ""
8135 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8136 "B<void *pvalloc(size_t >I<size>B<);>\n"
8137
8138 #. type: Plain text
8139 #: build/C/man3/posix_memalign.3:54
8140 msgid ""
8141 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8142 "E<gt>=\\ 600"
8143 msgstr ""
8144 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8145 "E<gt>=\\ 600"
8146
8147 #. type: Plain text
8148 #: build/C/man3/posix_memalign.3:57
8149 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8150 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8151
8152 #. type: Plain text
8153 #: build/C/man3/posix_memalign.3:59
8154 msgid "B<valloc>():"
8155 msgstr "B<valloc>():"
8156
8157 #. type: TP
8158 #: build/C/man3/posix_memalign.3:62
8159 #, no-wrap
8160 msgid "Since glibc 2.12:"
8161 msgstr "glibc 2.12 以降:"
8162
8163 #. type: Plain text
8164 #: build/C/man3/posix_memalign.3:69
8165 #, no-wrap
8166 msgid ""
8167 "_BSD_SOURCE ||\n"
8168 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8169 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8170 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8171 msgstr ""
8172 "_BSD_SOURCE ||\n"
8173 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8174 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8175 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8176
8177 #. type: TP
8178 #: build/C/man3/posix_memalign.3:71
8179 #, no-wrap
8180 msgid "Before glibc 2.12:"
8181 msgstr "glibc 2.12 より前:"
8182
8183 #. type: Plain text
8184 #: build/C/man3/posix_memalign.3:75
8185 msgid ""
8186 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8187 "_XOPEN_SOURCE_EXTENDED"
8188 msgstr ""
8189 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8190 "_XOPEN_SOURCE_EXTENDED"
8191
8192 #. type: Plain text
8193 #: build/C/man3/posix_memalign.3:82
8194 msgid ""
8195 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8196 "declaration of B<valloc>(); no feature test macros are required.)"
8197 msgstr ""
8198 "((非標準の) ヘッダーファイル I<E<lt>malloc.hE<gt>> も\n"
8199 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8200
8201 #.  glibc does this:
8202 #. type: Plain text
8203 #: build/C/man3/posix_memalign.3:104
8204 msgid ""
8205 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8206 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8207 "memory will be a multiple of I<alignment>, which must be a power of two and "
8208 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8209 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8210 "successfully passed to B<free>(3)."
8211 msgstr ""
8212 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリーを割り当て、割り当てら"
8213 "れたメモリーのアドレスを I<*memptr> に設定する。 割り当てられたメモリーのアド"
8214 "レスは I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗"
8215 "で、かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場"
8216 "合、 I<*memptr> には NULL か一意なポインター値が書かれる。 このポインター値"
8217 "は、後で B<free>(3)  に問題なく渡すことができる。"
8218
8219 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8220 #.  but no standards govern this.
8221 #. type: Plain text
8222 #: build/C/man3/posix_memalign.3:115
8223 msgid ""
8224 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8225 "pointer to the allocated memory.  The memory address will be a multiple of "
8226 "I<alignment>, which must be a power of two."
8227 msgstr ""
8228 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリーを割り当"
8229 "て、\n"
8230 "割り当てられたメモリーへのポインターを返す。 メモリーのアドレスは "
8231 "I<alignment> \n"
8232 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8233
8234 #. type: Plain text
8235 #: build/C/man3/posix_memalign.3:124
8236 msgid ""
8237 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8238 "the added restriction that I<size> should be a multiple of I<alignment>."
8239 msgstr ""
8240 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8241 "I<alignment>\n"
8242 "の倍数でなければならないという追加の制限がある点が異なる。"
8243
8244 #. type: Plain text
8245 #: build/C/man3/posix_memalign.3:133
8246 msgid ""
8247 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8248 "pointer to the allocated memory.  The memory address will be a multiple of "
8249 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8250 msgstr ""
8251 "廃止された関数である B<valloc>()  は I<size> バイトのメモリーを割り当て、割り"
8252 "当てられたメモリーへのポインターを返す。 メモリーのアドレスはページサイズの倍"
8253 "数になっているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と"
8254 "等価である。"
8255
8256 #. type: Plain text
8257 #: build/C/man3/posix_memalign.3:140
8258 msgid ""
8259 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8260 "the size of the allocation up to the next multiple of the system page size."
8261 msgstr ""
8262 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8263 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8264
8265 #. type: Plain text
8266 #: build/C/man3/posix_memalign.3:142
8267 msgid "For all of these functions, the memory is not zeroed."
8268 msgstr "これらの関数はいずれもメモリーのゼロクリアを行わない。"
8269
8270 #. type: Plain text
8271 #: build/C/man3/posix_memalign.3:149
8272 msgid ""
8273 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8274 "pointer to the allocated memory, or NULL if the request fails."
8275 msgstr ""
8276 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8277 "た\n"
8278 "メモリーへのポインターを返す。 割り当てに失敗した場合は NULL を返す。"
8279
8280 #. type: Plain text
8281 #: build/C/man3/posix_memalign.3:157
8282 msgid ""
8283 "B<posix_memalign>()  returns zero on success, or one of the error values "
8284 "listed in the next section on failure.  The value of I<errno> is "
8285 "indeterminate after a call to B<posix_memalign>()."
8286 msgstr ""
8287 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8288 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8289 "I<errno> の値は不定である。"
8290
8291 #. type: Plain text
8292 #: build/C/man3/posix_memalign.3:164
8293 msgid ""
8294 "The I<alignment> argument was not a power of two, or was not a multiple of "
8295 "I<sizeof(void\\ *)>."
8296 msgstr ""
8297 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8298 "かった。"
8299
8300 #. type: Plain text
8301 #: build/C/man3/posix_memalign.3:167
8302 msgid "There was insufficient memory to fulfill the allocation request."
8303 msgstr "割り当て要求を満たすのに十分なメモリーがなかった。"
8304
8305 #. type: Plain text
8306 #: build/C/man3/posix_memalign.3:174
8307 msgid ""
8308 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8309 "available in all Linux libc libraries."
8310 msgstr ""
8311 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8312 "すべての Linux libc ライブラリで使用可能である。"
8313
8314 #. type: Plain text
8315 #: build/C/man3/posix_memalign.3:178
8316 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8317 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8318
8319 #. type: Plain text
8320 #: build/C/man3/posix_memalign.3:182
8321 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8322 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8323
8324 #. type: Plain text
8325 #: build/C/man3/posix_memalign.3:189
8326 msgid ""
8327 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8328 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8329 "POSIX.1-2001."
8330 msgstr ""
8331 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8332 "り、\n"
8333 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8334
8335 #. type: Plain text
8336 #: build/C/man3/posix_memalign.3:193
8337 msgid "The function B<pvalloc>()  is a GNU extension."
8338 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8339
8340 #. type: Plain text
8341 #: build/C/man3/posix_memalign.3:197
8342 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8343 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8344
8345 #. type: Plain text
8346 #: build/C/man3/posix_memalign.3:201
8347 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8348 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8349
8350 #. type: Plain text
8351 #: build/C/man3/posix_memalign.3:206
8352 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8353 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8354
8355 #. type: SS
8356 #: build/C/man3/posix_memalign.3:206
8357 #, no-wrap
8358 msgid "Headers"
8359 msgstr "ヘッダー"
8360
8361 #. type: Plain text
8362 #: build/C/man3/posix_memalign.3:210
8363 msgid ""
8364 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8365 "hE<gt>>."
8366 msgstr ""
8367 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8368 "の意見が一致している。"
8369
8370 #. type: Plain text
8371 #: build/C/man3/posix_memalign.3:214
8372 msgid ""
8373 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8374 "of I<E<lt>malloc.hE<gt>>."
8375 msgstr ""
8376 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8377 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8378
8379 #. type: Plain text
8380 #: build/C/man3/posix_memalign.3:221
8381 msgid ""
8382 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8383 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8384 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8385 "above)."
8386 msgstr ""
8387 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8388 "libc4,5\n"
8389 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8390 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8391
8392 #. type: Plain text
8393 #: build/C/man3/posix_memalign.3:230
8394 msgid ""
8395 "On many systems there are alignment restrictions, for example, on buffers "
8396 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8397 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8398 "use B<posix_memalign>()  to satisfy this requirement."
8399 msgstr ""
8400 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8401 "スに対するダイレクト I/O に使用するバッファーには アラインメントに関する制限"
8402 "がある。 POSIX では、どんなアラインメントが必要かを知るために "
8403 "I<pathconf(path,_PC_REC_XFER_ALIGN)> コールを規定している。ここで "
8404 "B<posix_memalign>()  を使うと、この必要条件を満たすことができる。"
8405
8406 #. type: Plain text
8407 #: build/C/man3/posix_memalign.3:239
8408 msgid ""
8409 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8410 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8411 "is correct."
8412 msgstr ""
8413 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8414 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8415 "確認を行わないかもしれない。"
8416
8417 #.  Other systems allow passing the result of
8418 #.  .IR valloc ()
8419 #.  to
8420 #.  .IR free (3),
8421 #.  but not to
8422 #.  .IR realloc (3).
8423 #. type: Plain text
8424 #: build/C/man3/posix_memalign.3:267
8425 msgid ""
8426 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8427 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8428 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8429 "only a pointer obtained from B<malloc>(3), while, for example, "
8430 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8431 "The glibc implementation allows memory obtained from any of these functions "
8432 "to be reclaimed with B<free>(3)."
8433 msgstr ""
8434 "POSIX では B<posix_memalign>() によって獲得したメモリーは B<free>(3) を\n"
8435 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8436 "B<memalign>() やB<valloc>() で割り当てられたメモリーを再利用する手段が\n"
8437 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8438 "B<malloc>(3) から受け取ったポインターだけだが、例えば B<memalign>() は\n"
8439 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8440 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリーも\n"
8441 "B<free>(3) で再利用することができる。"
8442
8443 #. type: Plain text
8444 #: build/C/man3/posix_memalign.3:272
8445 msgid ""
8446 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8447 "these functions are needed only if you require larger alignment values."
8448 msgstr ""
8449 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリーアドレス"
8450 "を\n"
8451 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8452 "ト\n"
8453 "が必要な場合だけである。"
8454
8455 #. type: Plain text
8456 #: build/C/man3/posix_memalign.3:277
8457 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8458 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8459
8460 #. type: TH
8461 #: build/C/man2/readahead.2:28
8462 #, no-wrap
8463 msgid "READAHEAD"
8464 msgstr "READAHEAD"
8465
8466 #. type: TH
8467 #: build/C/man2/readahead.2:28
8468 #, no-wrap
8469 msgid "2014-03-15"
8470 msgstr "2014-03-15"
8471
8472 #. type: Plain text
8473 #: build/C/man2/readahead.2:31
8474 msgid "readahead - initiate file readahead into page cache"
8475 msgstr "readahead - 前もってファイルをページキャッシュに読み込む"
8476
8477 #. type: Plain text
8478 #: build/C/man2/readahead.2:37
8479 #, no-wrap
8480 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8481 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8482
8483 #. type: Plain text
8484 #: build/C/man2/readahead.2:44
8485 msgid ""
8486 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8487 "that file will be satisfied from the cache, and not block on disk I/O "
8488 "(assuming the readahead was initiated early enough and that other activity "
8489 "on the system did not in the meantime flush pages from the cache)."
8490 msgstr ""
8491 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8492 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8493 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8494 "ページがフラッシュされない場合である)。"
8495
8496 #. type: Plain text
8497 #: build/C/man2/readahead.2:66
8498 msgid ""
8499 "The I<fd> argument is a file descriptor identifying the file which is to be "
8500 "read.  The I<offset> argument specifies the starting point from which data "
8501 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8502 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8503 "page boundary and bytes are read up to the next page boundary greater than "
8504 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8505 "of the file.  The current file offset of the open file referred to by I<fd> "
8506 "is left unchanged."
8507 msgstr ""
8508 "I<fd> 引き数は読み込みを行うファイルを識別するファイルディスクリプターであ"
8509 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8510 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8511 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8512 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8513 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8514 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8515
8516 #. type: Plain text
8517 #: build/C/man2/readahead.2:72
8518 msgid ""
8519 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8520 "I<errno> set to indicate the cause of the error."
8521 msgstr ""
8522 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8523 "ラーの原因を示す値を設定する。"
8524
8525 #. type: Plain text
8526 #: build/C/man2/readahead.2:77
8527 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8528 msgstr ""
8529 "I<fd> が有効なファイルディスクリプターでない、または 読み込み用にオープンされ"
8530 "ていない。"
8531
8532 #. type: Plain text
8533 #: build/C/man2/readahead.2:83
8534 msgid ""
8535 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8536 msgstr ""
8537 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8538 "ファイルであった。"
8539
8540 #. type: Plain text
8541 #: build/C/man2/readahead.2:88
8542 msgid ""
8543 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8544 "been provided since version 2.3."
8545 msgstr ""
8546 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8547 "は glibc バージョン 2.3 以降で行われている。"
8548
8549 #. type: Plain text
8550 #: build/C/man2/readahead.2:93
8551 msgid ""
8552 "The B<readahead>()  system call is Linux-specific, and its use should be "
8553 "avoided in portable applications."
8554 msgstr ""
8555 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8556 "は 使用を避けるべきである。"
8557
8558 #. type: Plain text
8559 #: build/C/man2/readahead.2:98
8560 msgid ""
8561 "On some 32-bit architectures, the calling signature for this system call "
8562 "differs, for the reasons described in B<syscall>(2)."
8563 msgstr ""
8564 "いくつかの 32 ビットアーキテクチャーでは、このシステムコールの呼び出しシグネ"
8565 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8566
8567 #. type: Plain text
8568 #: build/C/man2/readahead.2:107
8569 msgid ""
8570 "B<readahead>()  attempts to schedule the reads in the background and return "
8571 "immediately.  However, it may block while it reads the filesystem metadata "
8572 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8573 "on large files using indirect blocks instead of extents, giving the "
8574 "appearance that the call blocks until the requested data has been read."
8575 msgstr ""
8576 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8577 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8578 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8579 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8580 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8581 "に見える。"
8582
8583 #. type: Plain text
8584 #: build/C/man2/readahead.2:113
8585 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8586 msgstr ""
8587 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8588
8589 #. type: TH
8590 #: build/C/man2/remap_file_pages.2:28
8591 #, no-wrap
8592 msgid "REMAP_FILE_PAGES"
8593 msgstr "REMAP_FILE_PAGES"
8594
8595 #. type: Plain text
8596 #: build/C/man2/remap_file_pages.2:31
8597 msgid "remap_file_pages - create a nonlinear file mapping"
8598 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8599
8600 #. type: Plain text
8601 #: build/C/man2/remap_file_pages.2:35
8602 #, no-wrap
8603 msgid ""
8604 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8605 "B<#include E<lt>sys/mman.hE<gt>>\n"
8606 msgstr ""
8607 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8608 "B<#include E<lt>sys/mman.hE<gt>>\n"
8609
8610 #. type: Plain text
8611 #: build/C/man2/remap_file_pages.2:38
8612 #, no-wrap
8613 msgid ""
8614 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8615 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8616 msgstr ""
8617 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8618 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8619
8620 #.  commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8621 #.  http://lwn.net/Articles/597632/
8622 #. type: Plain text
8623 #: build/C/man2/remap_file_pages.2:47
8624 msgid ""
8625 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8626 "eventually be replaced by a slower in-kernel emulation.  Those few "
8627 "applications that use this system call should consider migrating to "
8628 "alternatives."
8629 msgstr ""
8630 "B<注意>: このシステムコールは (Linux 3.16 以降で) 非推奨となっており、 やがて"
8631 "より低速なカーネル内でのエミュレーションに置き換えられる予定である。 このシス"
8632 "テムコールを使用しているアプリケーションは少ないが、こうしたアプリケーション"
8633 "は代替手段への移行を検討すべきである。"
8634
8635 #. type: Plain text
8636 #: build/C/man2/remap_file_pages.2:59
8637 msgid ""
8638 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8639 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8640 "nonsequential order in memory.  The advantage of using "
8641 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8642 "former approach does not require the kernel to create additional VMA "
8643 "(Virtual Memory Area) data structures."
8644 msgstr ""
8645 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8646 "ページがメモリー上で連続しない順番でマップされる マッピングを作成するために使"
8647 "われる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優"
8648 "れている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモ"
8649 "リー領域)  データ構造体を追加で作成する必要がないことである。"
8650
8651 #. type: Plain text
8652 #: build/C/man2/remap_file_pages.2:61
8653 msgid "To create a nonlinear mapping we perform the following steps:"
8654 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8655
8656 #. type: IP
8657 #: build/C/man2/remap_file_pages.2:61 build/C/man2/memfd_create.2:219
8658 #, no-wrap
8659 msgid "1."
8660 msgstr "1."
8661
8662 #. type: Plain text
8663 #: build/C/man2/remap_file_pages.2:69
8664 msgid ""
8665 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8666 "mapping must be created with the B<MAP_SHARED> flag."
8667 msgstr ""
8668 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8669 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8670 "い。"
8671
8672 #. type: IP
8673 #: build/C/man2/remap_file_pages.2:69 build/C/man2/memfd_create.2:225
8674 #, no-wrap
8675 msgid "2."
8676 msgstr "2."
8677
8678 #. type: Plain text
8679 #: build/C/man2/remap_file_pages.2:77
8680 msgid ""
8681 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8682 "correspondence between the pages of the mapping and the pages of the file.  "
8683 "It is possible to map the same page of a file into multiple locations within "
8684 "the mapped region."
8685 msgstr ""
8686 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8687 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8688 "所に マップすることが可能である。"
8689
8690 #. type: Plain text
8691 #: build/C/man2/remap_file_pages.2:88
8692 msgid ""
8693 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8694 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8695 "system page size; I<size> is the length of the region in bytes."
8696 msgstr ""
8697 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8698 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8699 "る。 I<size> は領域の長さであり、単位はバイトである。"
8700
8701 #. type: Plain text
8702 #: build/C/man2/remap_file_pages.2:106
8703 msgid ""
8704 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8705 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8706 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8707 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8708 "and I<size> will be placed."
8709 msgstr ""
8710 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8711 "成したいページの マッピングを識別することである。 よって I<addr> は "
8712 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8713 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8714 "予定のアドレスを、 I<addr> によって指定することである。"
8715
8716 #.  This rounding is weird, and not consistent with the treatment of
8717 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8718 #.  MTK, 14 Sep 2005
8719 #. type: Plain text
8720 #: build/C/man2/remap_file_pages.2:120
8721 msgid ""
8722 "The values specified in I<addr> and I<size> should be multiples of the "
8723 "system page size.  If they are not, then the kernel rounds I<both> values "
8724 "I<down> to the nearest multiple of the page size."
8725 msgstr ""
8726 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8727 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8728 "「切り下げる」。"
8729
8730 #. type: Plain text
8731 #: build/C/man2/remap_file_pages.2:124
8732 msgid "The I<prot> argument must be specified as 0."
8733 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8734
8735 #. type: Plain text
8736 #: build/C/man2/remap_file_pages.2:132
8737 msgid ""
8738 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8739 "other than B<MAP_NONBLOCK> are ignored."
8740 msgstr ""
8741 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8742 "の全てのフラグは無視される。"
8743
8744 #. type: Plain text
8745 #: build/C/man2/remap_file_pages.2:139
8746 msgid ""
8747 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8748 "I<errno> is set appropriately."
8749 msgstr ""
8750 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8751 "れ、 I<errno> が適切に設定される。"
8752
8753 #. type: Plain text
8754 #: build/C/man2/remap_file_pages.2:147
8755 msgid ""
8756 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8757 "flag."
8758 msgstr ""
8759 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8760 "いない。"
8761
8762 #.  And possibly others from vma->vm_ops->populate()
8763 #. type: Plain text
8764 #: build/C/man2/remap_file_pages.2:156
8765 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8766 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8767
8768 #. type: Plain text
8769 #: build/C/man2/remap_file_pages.2:161
8770 msgid ""
8771 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8772 "support was added in version 2.3.3."
8773 msgstr ""
8774 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8775 "サポートは glibc バージョン 2.3.3 で追加された。"
8776
8777 #. type: Plain text
8778 #: build/C/man2/remap_file_pages.2:165
8779 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8780 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8781
8782 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8783 #. type: Plain text
8784 #: build/C/man2/remap_file_pages.2:176
8785 msgid ""
8786 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8787 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8788 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8789 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8790 "addresses."
8791 msgstr ""
8792 "Linux 2.6.23 以降、 B<remap_file_pages>() は tmpfs, hugetlbfs, ramfs などのイ"
8793 "ンメモリーファイルシステム上にのみ非線形マッピングを作成する。 裏にデータスト"
8794 "アを持つファイルシステム上では、 B<remap_file_pages>() は、 ファイルのどの部"
8795 "分がどのアドレスにマッピングされているかの調整が、 B<mmap>(2) を使った場合ほ"
8796 "ど効率的ではない。"
8797
8798 #. type: Plain text
8799 #: build/C/man2/remap_file_pages.2:183
8800 msgid ""
8801 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8802 "B<msync>(2)"
8803 msgstr ""
8804 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8805 "B<msync>(2)"
8806
8807 #. type: TH
8808 #: build/C/man3/shm_open.3:26
8809 #, no-wrap
8810 msgid "SHM_OPEN"
8811 msgstr "SHM_OPEN"
8812
8813 #. type: Plain text
8814 #: build/C/man3/shm_open.3:29
8815 msgid ""
8816 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8817 msgstr ""
8818 "shm_open, shm_unlink - POSIX 共有メモリーオブジェクトの作成/オープン/削除を行"
8819 "う"
8820
8821 #. type: Plain text
8822 #: build/C/man3/shm_open.3:33
8823 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8824 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8825
8826 #. type: Plain text
8827 #: build/C/man3/shm_open.3:35
8828 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8829 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8830
8831 #. type: Plain text
8832 #: build/C/man3/shm_open.3:37
8833 msgid ""
8834 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8835 msgstr ""
8836 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8837
8838 #. type: Plain text
8839 #: build/C/man3/shm_open.3:39
8840 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8841 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8842
8843 #. type: Plain text
8844 #: build/C/man3/shm_open.3:41
8845 msgid "Link with I<-lrt>."
8846 msgstr "I<-lrt> でリンクする。"
8847
8848 #. type: Plain text
8849 #: build/C/man3/shm_open.3:53
8850 msgid ""
8851 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8852 "memory object.  A POSIX shared memory object is in effect a handle which can "
8853 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8854 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8855 "removing an object previously created by B<shm_open>()."
8856 msgstr ""
8857 "B<shm_open>()  は、POSIX 共有メモリーオブジェクトを新規に作成/オープンした"
8858 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリーオブ"
8859 "ジェクトは、実際には、関係のないプロセスが 共有メモリーの同じ領域を "
8860 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8861 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8862
8863 #.  glibc allows the initial slash to be omitted, and makes
8864 #.  multiple initial slashes equivalent to a single slash.
8865 #.  This differs from the implementation of POSIX message queues.
8866 #.  glibc allows subdirectory components in the name, in which
8867 #.  case the subdirectory must exist under /dev/shm, and allow the
8868 #.  required permissions if a user wants to create a shared memory
8869 #.  object in that subdirectory.
8870 #. type: Plain text
8871 #: build/C/man3/shm_open.3:74
8872 msgid ""
8873 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8874 "specifies the shared memory object to be created or opened.  For portable "
8875 "use, a shared memory object should be identified by a name of the form I</"
8876 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8877 "255) characters consisting of an initial slash, followed by one or more "
8878 "characters, none of which are slashes."
8879 msgstr ""
8880 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8881 "プンしたりする共有メモリーオブジェクトを指定する。 移植性を持たせるためには、"
8882 "共有メモリーオブジェクトは I</somename> という形式の名前で識別し、 その名前"
8883 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8884 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8885
8886 #. type: Plain text
8887 #: build/C/man3/shm_open.3:81
8888 msgid ""
8889 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8890 "or B<O_RDWR> and any of the other flags listed here:"
8891 msgstr ""
8892 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8893 "述べる他のフラグの論理和をとったもの を指定する。"
8894
8895 #. type: TP
8896 #: build/C/man3/shm_open.3:81
8897 #, no-wrap
8898 msgid "B<O_RDONLY>"
8899 msgstr "B<O_RDONLY>"
8900
8901 #. type: Plain text
8902 #: build/C/man3/shm_open.3:89
8903 msgid ""
8904 "Open the object for read access.  A shared memory object opened in this way "
8905 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8906 msgstr ""
8907 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8908 "された共有メモリーオブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8909 "B<mmap>(2)  することができる。"
8910
8911 #. type: TP
8912 #: build/C/man3/shm_open.3:89
8913 #, no-wrap
8914 msgid "B<O_RDWR>"
8915 msgstr "B<O_RDWR>"
8916
8917 #. type: Plain text
8918 #: build/C/man3/shm_open.3:92
8919 msgid "Open the object for read-write access."
8920 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8921
8922 #. type: TP
8923 #: build/C/man3/shm_open.3:92
8924 #, no-wrap
8925 msgid "B<O_CREAT>"
8926 msgstr "B<O_CREAT>"
8927
8928 #.  In truth it is actually the filesystem IDs on Linux, but these
8929 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8930 #. type: Plain text
8931 #: build/C/man3/shm_open.3:112
8932 msgid ""
8933 "Create the shared memory object if it does not exist.  The user and group "
8934 "ownership of the object are taken from the corresponding effective IDs of "
8935 "the calling process, and the object's permission bits are set according to "
8936 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8937 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8938 "A set of macro constants which can be used to define I<mode> is listed in "
8939 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8940 "including I<E<lt>sys/stat.hE<gt>>.)"
8941 msgstr ""
8942 "存在しない場合、共有メモリーオブジェクトを作成する。 オブジェクトのユーザーと"
8943 "グループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェ"
8944 "クトの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファ"
8945 "イルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェク"
8946 "トに関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)"
8947 "は B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/"
8948 "stat.hE<gt>> のインクルードにより得られる)。"
8949
8950 #. type: Plain text
8951 #: build/C/man3/shm_open.3:118
8952 msgid ""
8953 "A new shared memory object initially has zero length\\(emthe size of the "
8954 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8955 "shared memory object are automatically initialized to 0."
8956 msgstr ""
8957 "新規に作成された共有メモリーオブジェクトは長さ 0 で初期化される。 オブジェク"
8958 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリーオブジェクトと"
8959 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8960
8961 #. type: TP
8962 #: build/C/man3/shm_open.3:118
8963 #, no-wrap
8964 msgid "B<O_EXCL>"
8965 msgstr "B<O_EXCL>"
8966
8967 #. type: Plain text
8968 #: build/C/man3/shm_open.3:127
8969 msgid ""
8970 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8971 "I<name> already exists, return an error.  The check for the existence of the "
8972 "object, and its creation if it does not exist, are performed atomically."
8973 msgstr ""
8974 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリーオブジェ"
8975 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8976 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8977 "atomically)。"
8978
8979 #. type: TP
8980 #: build/C/man3/shm_open.3:127
8981 #, no-wrap
8982 msgid "B<O_TRUNC>"
8983 msgstr "B<O_TRUNC>"
8984
8985 #. type: Plain text
8986 #: build/C/man3/shm_open.3:130
8987 msgid "If the shared memory object already exists, truncate it to zero bytes."
8988 msgstr ""
8989 "共有メモリーオブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8990 "切り詰める。"
8991
8992 #. type: Plain text
8993 #: build/C/man3/shm_open.3:133
8994 msgid ""
8995 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8996 "hE<gt>>."
8997 msgstr ""
8998 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8999
9000 #. type: Plain text
9001 #: build/C/man3/shm_open.3:144
9002 msgid ""
9003 "On successful completion B<shm_open>()  returns a new file descriptor "
9004 "referring to the shared memory object.  This file descriptor is guaranteed "
9005 "to be the lowest-numbered file descriptor not previously opened within the "
9006 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
9007 "descriptor."
9008 msgstr ""
9009 "成功して完了した場合、 B<shm_open>()  は共有メモリーオブジェクトを参照する新"
9010 "しいファイルディスクリプターを返す。 このファイルディスクリプターは、そのプロ"
9011 "セス内で過去にオープンされていない ファイルディスクリプターの中で最も小さな数"
9012 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
9013 "ファイルディスクリプターに設定される。"
9014
9015 #. type: Plain text
9016 #: build/C/man3/shm_open.3:153
9017 msgid ""
9018 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
9019 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
9020 "the file descriptor may be closed without affecting the memory mapping."
9021 msgstr ""
9022 "通常、これらのファイルディスクリプターは、この後続けて実行される "
9023 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
9024 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイルディスクリプターを"
9025 "クローズしてもよく、 クローズしてもメモリーマッピングに影響を与えることはな"
9026 "い。"
9027
9028 #. type: Plain text
9029 #: build/C/man3/shm_open.3:171
9030 msgid ""
9031 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
9032 "shared memory object name, and, once all processes have unmapped the object, "
9033 "de-allocates and destroys the contents of the associated memory region.  "
9034 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
9035 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
9036 "case a new, distinct object is created)."
9037 msgstr ""
9038 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリーオブジェ"
9039 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
9040 "でオブジェクトの割り当てを解除し、 対応するメモリー領域の内容を破棄する。 "
9041 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
9042 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
9043 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
9044
9045 #. type: Plain text
9046 #: build/C/man3/shm_open.3:180
9047 msgid ""
9048 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
9049 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
9050 "or -1 on error."
9051 msgstr ""
9052 "成功した場合、 B<shm_open>()  は非負のファイルディスクリプターを返す。 失敗し"
9053 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
9054 "を、エラーが起こった場合 -1 を返す。"
9055
9056 #. type: Plain text
9057 #: build/C/man3/shm_open.3:187
9058 msgid ""
9059 "On failure, I<errno> is set to indicate the cause of the error.  Values "
9060 "which may appear in I<errno> include the following:"
9061 msgstr ""
9062 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
9063 "される値は以下の通りである:"
9064
9065 #. type: Plain text
9066 #: build/C/man3/shm_open.3:192
9067 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
9068 msgstr "共有メモリーオブジェクトを B<shm_unlink>()  する権限がなかった。"
9069
9070 #. type: Plain text
9071 #: build/C/man3/shm_open.3:202
9072 msgid ""
9073 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
9074 "B<O_TRUNC> was specified and the caller does not have write permission on "
9075 "the object."
9076 msgstr ""
9077 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
9078 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
9079 "み権限が なかった。"
9080
9081 #. type: TP
9082 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
9083 #, no-wrap
9084 msgid "B<EEXIST>"
9085 msgstr "B<EEXIST>"
9086
9087 #. type: Plain text
9088 #: build/C/man3/shm_open.3:213
9089 msgid ""
9090 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
9091 "shared memory object specified by I<name> already exists."
9092 msgstr ""
9093 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
9094 "定された共有メモリーオブジェクトが既に存在した。"
9095
9096 #. type: Plain text
9097 #: build/C/man3/shm_open.3:220
9098 msgid "The I<name> argument to B<shm_open>()  was invalid."
9099 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
9100
9101 #. type: TP
9102 #: build/C/man3/shm_open.3:220 build/C/man2/memfd_create.2:146
9103 #, no-wrap
9104 msgid "B<EMFILE>"
9105 msgstr "B<EMFILE>"
9106
9107 #. type: Plain text
9108 #: build/C/man3/shm_open.3:223
9109 msgid "The process already has the maximum number of files open."
9110 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9111
9112 #. type: TP
9113 #: build/C/man3/shm_open.3:223
9114 #, no-wrap
9115 msgid "B<ENAMETOOLONG>"
9116 msgstr "B<ENAMETOOLONG>"
9117
9118 #. type: Plain text
9119 #: build/C/man3/shm_open.3:229
9120 msgid "The length of I<name> exceeds B<PATH_MAX>."
9121 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9122
9123 #. type: Plain text
9124 #: build/C/man3/shm_open.3:233
9125 msgid ""
9126 "The limit on the total number of files open on the system has been reached."
9127 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9128
9129 #. type: TP
9130 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9131 #: build/C/man2/shmget.2:225
9132 #, no-wrap
9133 msgid "B<ENOENT>"
9134 msgstr "B<ENOENT>"
9135
9136 #. type: Plain text
9137 #: build/C/man3/shm_open.3:242
9138 msgid ""
9139 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
9140 "B<O_CREAT> was not specified."
9141 msgstr ""
9142 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
9143 "B<O_CREAT> が指定されていなかった。"
9144
9145 #. type: Plain text
9146 #: build/C/man3/shm_open.3:249
9147 msgid ""
9148 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9149 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9150
9151 #. type: Plain text
9152 #: build/C/man3/shm_open.3:251
9153 msgid "These functions are provided in glibc 2.2 and later."
9154 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9155
9156 #. type: Plain text
9157 #: build/C/man3/shm_open.3:257
9158 msgid ""
9159 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9160 "object is set to either the calling process's effective group ID or \"a "
9161 "system default group ID\"."
9162 msgstr ""
9163 "POSIX.1-2001 には、新規に作成される共有メモリーオブジェクトのグループ所有権"
9164 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9165 "ID」 のどちらかに設定される、と書かれている。"
9166
9167 #. type: Plain text
9168 #: build/C/man3/shm_open.3:266
9169 msgid ""
9170 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9171 "unspecified.  On Linux, this will successfully truncate an existing shared "
9172 "memory object\\(emthis may not be so on other UNIX systems."
9173 msgstr ""
9174 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9175 "いる。Linux では、 既存の共有メモリーオブジェクトに対する切り詰め (truncate) "
9176 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9177
9178 #. type: Plain text
9179 #: build/C/man3/shm_open.3:271
9180 msgid ""
9181 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9182 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9183 msgstr ""
9184 "Linux 2.4 における POSIX 共有メモリーオブジェクトの実装は 専用のファイルシス"
9185 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9186
9187 #. type: Plain text
9188 #: build/C/man3/shm_open.3:283
9189 msgid ""
9190 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9191 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9192 "B<shm_overview>(7)"
9193 msgstr ""
9194 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9195 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
9196 "B<shm_overview>(7)"
9197
9198 #. type: TH
9199 #: build/C/man7/shm_overview.7:27
9200 #, no-wrap
9201 msgid "SHM_OVERVIEW"
9202 msgstr "SHM_OVERVIEW"
9203
9204 #. type: TH
9205 #: build/C/man7/shm_overview.7:27
9206 #, no-wrap
9207 msgid "2010-09-10"
9208 msgstr "2010-09-10"
9209
9210 #. type: Plain text
9211 #: build/C/man7/shm_overview.7:30
9212 msgid "shm_overview - overview of POSIX shared memory"
9213 msgstr "shm_overview - POSIX 共有メモリーの概要"
9214
9215 #. type: Plain text
9216 #: build/C/man7/shm_overview.7:33
9217 msgid ""
9218 "The POSIX shared memory API allows processes to communicate information by "
9219 "sharing a region of memory."
9220 msgstr ""
9221 "POSIX 共有メモリー API を使用すると、メモリーのある領域を共有して、 プロセス"
9222 "間で情報をやり取りすることができる。"
9223
9224 #. type: Plain text
9225 #: build/C/man7/shm_overview.7:35
9226 msgid "The interfaces employed in the API are:"
9227 msgstr "この API では以下のインターフェースが採用されている。"
9228
9229 #. type: TP
9230 #: build/C/man7/shm_overview.7:35
9231 #, no-wrap
9232 msgid "B<shm_open>(3)"
9233 msgstr "B<shm_open>(3)"
9234
9235 #. type: Plain text
9236 #: build/C/man7/shm_overview.7:42
9237 msgid ""
9238 "Create and open a new object, or open an existing object.  This is analogous "
9239 "to B<open>(2).  The call returns a file descriptor for use by the other "
9240 "interfaces listed below."
9241 msgstr ""
9242 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9243 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9244 "る ファイルディスクリプターを返す。"
9245
9246 #. type: TP
9247 #: build/C/man7/shm_overview.7:42
9248 #, no-wrap
9249 msgid "B<ftruncate>(2)"
9250 msgstr "B<ftruncate>(2)"
9251
9252 #. type: Plain text
9253 #: build/C/man7/shm_overview.7:46
9254 msgid ""
9255 "Set the size of the shared memory object.  (A newly created shared memory "
9256 "object has a length of zero.)"
9257 msgstr "共有メモリーオブジェクトの大きさを設定する。"
9258
9259 #. type: Plain text
9260 #: build/C/man7/shm_overview.7:50
9261 msgid ""
9262 "Map the shared memory object into the virtual address space of the calling "
9263 "process."
9264 msgstr ""
9265 "呼び出したプロセスの仮想アドレス空間に共有メモリーオブジェクトを マップする。"
9266
9267 #. type: TP
9268 #: build/C/man7/shm_overview.7:50
9269 #, no-wrap
9270 msgid "B<munmap>(2)"
9271 msgstr "B<munmap>(2)"
9272
9273 #. type: Plain text
9274 #: build/C/man7/shm_overview.7:54
9275 msgid ""
9276 "Unmap the shared memory object from the virtual address space of the calling "
9277 "process."
9278 msgstr ""
9279 "呼び出したプロセスの仮想アドレス空間から 共有メモリーオブジェクトをアンマップ"
9280 "する。"
9281
9282 #. type: TP
9283 #: build/C/man7/shm_overview.7:54
9284 #, no-wrap
9285 msgid "B<shm_unlink>(3)"
9286 msgstr "B<shm_unlink>(3)"
9287
9288 #. type: Plain text
9289 #: build/C/man7/shm_overview.7:57
9290 msgid "Remove a shared memory object name."
9291 msgstr "共有メモリーオブジェクト名を削除する。"
9292
9293 #. type: TP
9294 #: build/C/man7/shm_overview.7:57
9295 #, no-wrap
9296 msgid "B<close>(2)"
9297 msgstr "B<close>(2)"
9298
9299 #. type: Plain text
9300 #: build/C/man7/shm_overview.7:62
9301 msgid ""
9302 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9303 "needed."
9304 msgstr ""
9305 "B<shm_open>(3)  で割り当てられたファイルディスクリプターが不要になった際に、 "
9306 "そのファイルディスクリプターをクローズする。"
9307
9308 #. type: TP
9309 #: build/C/man7/shm_overview.7:62
9310 #, no-wrap
9311 msgid "B<fstat>(2)"
9312 msgstr "B<fstat>(2)"
9313
9314 #. type: Plain text
9315 #: build/C/man7/shm_overview.7:76
9316 msgid ""
9317 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9318 "the information returned by this call are the object's size (I<st_size>), "
9319 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9320 msgstr ""
9321 "その共有メモリーオブジェクトについての情報が入った I<stat> 構造体を取得す"
9322 "る。 このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許"
9323 "可属性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9324
9325 #. type: TP
9326 #: build/C/man7/shm_overview.7:76
9327 #, no-wrap
9328 msgid "B<fchown>(2)"
9329 msgstr "B<fchown>(2)"
9330
9331 #. type: Plain text
9332 #: build/C/man7/shm_overview.7:79
9333 msgid "To change the ownership of a shared memory object."
9334 msgstr "共有メモリーオブジェクトの所有権を変更する。"
9335
9336 #. type: TP
9337 #: build/C/man7/shm_overview.7:79
9338 #, no-wrap
9339 msgid "B<fchmod>(2)"
9340 msgstr "B<fchmod>(2)"
9341
9342 #. type: Plain text
9343 #: build/C/man7/shm_overview.7:82
9344 msgid "To change the permissions of a shared memory object."
9345 msgstr "共有メモリーオブジェクトの許可属性を変更する。"
9346
9347 #. type: SS
9348 #: build/C/man7/shm_overview.7:82
9349 #, no-wrap
9350 msgid "Versions"
9351 msgstr "Versions"
9352
9353 #. type: Plain text
9354 #: build/C/man7/shm_overview.7:84
9355 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9356 msgstr "POSIX 共有メモリーは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9357
9358 #. type: SS
9359 #: build/C/man7/shm_overview.7:84
9360 #, no-wrap
9361 msgid "Persistence"
9362 msgstr "持続性"
9363
9364 #. type: Plain text
9365 #: build/C/man7/shm_overview.7:89
9366 msgid ""
9367 "POSIX shared memory objects have kernel persistence: a shared memory object "
9368 "will exist until the system is shut down, or until all processes have "
9369 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9370 msgstr ""
9371 "POSIX 共有メモリーオブジェクトはカーネル内で保持される。 共有メモリーオブジェ"
9372 "クトは、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトを"
9373 "アンマップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9374
9375 #. type: SS
9376 #: build/C/man7/shm_overview.7:89
9377 #, no-wrap
9378 msgid "Linking"
9379 msgstr "リンク"
9380
9381 #. type: Plain text
9382 #: build/C/man7/shm_overview.7:94
9383 msgid ""
9384 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9385 "to link against the real-time library, I<librt>."
9386 msgstr ""
9387 "POSIX 共有メモリー API を使用したプログラムは I<cc -lrt> でコンパイルし、リア"
9388 "ルタイムライブラリ I<librt> とリンクしなければならない。"
9389
9390 #. type: SS
9391 #: build/C/man7/shm_overview.7:94
9392 #, no-wrap
9393 msgid "Accessing shared memory objects via the filesystem"
9394 msgstr "ファイルシステム経由での共有メモリーオブジェクトへのアクセス"
9395
9396 #. type: Plain text
9397 #: build/C/man7/shm_overview.7:101
9398 msgid ""
9399 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9400 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9401 "supports the use of access control lists (ACLs)  to control the permissions "
9402 "of objects in the virtual filesystem."
9403 msgstr ""
9404 "Linux では、共有メモリーオブジェクトは通常 I</dev/shm> 以下にマウントされる仮"
9405 "想ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux "
9406 "では、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御"
9407 "リスト (ACL; access control lists) を使うことができる。"
9408
9409 #. type: Plain text
9410 #: build/C/man7/shm_overview.7:106
9411 msgid ""
9412 "Typically, processes must synchronize their access to a shared memory "
9413 "object, using, for example, POSIX semaphores."
9414 msgstr ""
9415 "通常は、共有メモリーオブジェクトにアクセスするプロセスは、 POSIX セマフォなど"
9416 "を使ってプロセス間で同期をとらなければならない。"
9417
9418 #. type: Plain text
9419 #: build/C/man7/shm_overview.7:114
9420 msgid ""
9421 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9422 "memory API.  POSIX shared memory provides a simpler, and better designed "
9423 "interface; on the other hand POSIX shared memory is somewhat less widely "
9424 "available (especially on older systems) than System V shared memory."
9425 msgstr ""
9426 "System V 共有メモリー (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリー "
9427 "API である。 POSIX 共有メモリーは、より簡単で、うまく設計されたインターフェー"
9428 "スを提供している。 一方で、POSIX 共有メモリーは System V 共有メモリーと比べる"
9429 "と 利用できるシステムが少ない (特に、古いシステムでは少ない)。"
9430
9431 #. type: Plain text
9432 #: build/C/man7/shm_overview.7:127
9433 msgid ""
9434 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9435 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9436 "B<shm_unlink>(3), B<sem_overview>(7)"
9437 msgstr ""
9438 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9439 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9440 "B<shm_unlink>(3), B<sem_overview>(7)"
9441
9442 #. type: TH
9443 #: build/C/man2/shmctl.2:45
9444 #, no-wrap
9445 msgid "SHMCTL"
9446 msgstr "SHMCTL"
9447
9448 #. type: TH
9449 #: build/C/man2/shmctl.2:45
9450 #, no-wrap
9451 msgid "2014-02-07"
9452 msgstr "2014-02-07"
9453
9454 #. type: Plain text
9455 #: build/C/man2/shmctl.2:48
9456 msgid "shmctl - System V shared memory control"
9457 msgstr "shmctl - System V 共有メモリー (shared memory) を制御する"
9458
9459 #. type: Plain text
9460 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9461 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9462 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9463
9464 #. type: Plain text
9465 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9466 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9467 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9468
9469 #. type: Plain text
9470 #: build/C/man2/shmctl.2:55
9471 msgid ""
9472 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9473 msgstr ""
9474 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9475
9476 #. type: Plain text
9477 #: build/C/man2/shmctl.2:62
9478 msgid ""
9479 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9480 "\\ V shared memory segment whose identifier is given in I<shmid>."
9481 msgstr ""
9482 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリーセグメントに対し"
9483 "て I<cmd> で指示した制御命令を実行する。"
9484
9485 #. type: Plain text
9486 #: build/C/man2/shmctl.2:67
9487 msgid ""
9488 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9489 "I<E<lt>sys/shm.hE<gt>> as follows:"
9490 msgstr ""
9491 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインターである。 この構造体は "
9492 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9493
9494 #. type: Plain text
9495 #: build/C/man2/shmctl.2:81
9496 #, no-wrap
9497 msgid ""
9498 "struct shmid_ds {\n"
9499 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9500 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9501 "    time_t          shm_atime;   /* Last attach time */\n"
9502 "    time_t          shm_dtime;   /* Last detach time */\n"
9503 "    time_t          shm_ctime;   /* Last change time */\n"
9504 "    pid_t           shm_cpid;    /* PID of creator */\n"
9505 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9506 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9507 "    ...\n"
9508 "};\n"
9509 msgstr ""
9510 "struct shmid_ds {\n"
9511 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9512 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9513 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9514 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9515 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9516 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9517 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9518 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9519 "    ...\n"
9520 "};\n"
9521
9522 #. type: Plain text
9523 #: build/C/man2/shmctl.2:89
9524 msgid ""
9525 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9526 "settable using B<IPC_SET>):"
9527 msgstr ""
9528 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9529 "B<IPC_SET> を使って設定可能である):"
9530
9531 #. type: Plain text
9532 #: build/C/man2/shmctl.2:102
9533 #, no-wrap
9534 msgid ""
9535 "struct ipc_perm {\n"
9536 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9537 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9538 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9539 "    uid_t          cuid;     /* Effective UID of creator */\n"
9540 "    gid_t          cgid;     /* Effective GID of creator */\n"
9541 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9542 "                                SHM_LOCKED flags */\n"
9543 "    unsigned short __seq;    /* Sequence number */\n"
9544 "};\n"
9545 msgstr ""
9546 "struct ipc_perm {\n"
9547 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9548 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9549 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9550 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9551 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9552 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9553 "                                SHM_LOCKED フラグ */\n"
9554 "    unsigned short __seq;    /* シーケンス番号 */\n"
9555 "};\n"
9556
9557 #. type: Plain text
9558 #: build/C/man2/shmctl.2:108
9559 msgid "Valid values for I<cmd> are:"
9560 msgstr "I<cmd> として有効な値は以下の通り:"
9561
9562 #. type: TP
9563 #: build/C/man2/shmctl.2:109
9564 #, no-wrap
9565 msgid "B<IPC_STAT>"
9566 msgstr "B<IPC_STAT>"
9567
9568 #. type: Plain text
9569 #: build/C/man2/shmctl.2:118
9570 msgid ""
9571 "Copy information from the kernel data structure associated with I<shmid> "
9572 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9573 "read permission on the shared memory segment."
9574 msgstr ""
9575 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9576 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリーセグメントに対する "
9577 "読み込み許可を持たなければならない。"
9578
9579 #. type: TP
9580 #: build/C/man2/shmctl.2:118
9581 #, no-wrap
9582 msgid "B<IPC_SET>"
9583 msgstr "B<IPC_SET>"
9584
9585 #. type: Plain text
9586 #: build/C/man2/shmctl.2:136
9587 msgid ""
9588 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9589 "I<buf> to the kernel data structure associated with this shared memory "
9590 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9591 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9592 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9593 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9594 "memory segment, or the caller must be privileged."
9595 msgstr ""
9596 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9597 "有メモリーセグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9598 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9599 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9600 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9601 "と一致するか、呼び出し元が特権を持たなければならない。"
9602
9603 #. type: TP
9604 #: build/C/man2/shmctl.2:136
9605 #, no-wrap
9606 msgid "B<IPC_RMID>"
9607 msgstr "B<IPC_RMID>"
9608
9609 #. type: Plain text
9610 #: build/C/man2/shmctl.2:149
9611 msgid ""
9612 "Mark the segment to be destroyed.  The segment will actually be destroyed "
9613 "only after the last process detaches it (i.e., when the I<shm_nattch> member "
9614 "of the associated structure I<shmid_ds> is zero).  The caller must be the "
9615 "owner or creator of the segment, or be privileged.  The I<buf> argument is "
9616 "ignored."
9617 msgstr ""
9618 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9619 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9620 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9621 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9622
9623 #. type: Plain text
9624 #: build/C/man2/shmctl.2:157
9625 msgid ""
9626 "If a segment has been marked for destruction, then the (nonstandard)  "
9627 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9628 "structure retrieved by B<IPC_STAT> will be set."
9629 msgstr ""
9630 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9631 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9632 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9633
9634 #. type: Plain text
9635 #: build/C/man2/shmctl.2:160
9636 msgid ""
9637 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9638 "its pages that were faulted in will remain in memory or swap."
9639 msgstr ""
9640 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9641 "なれば、フォールト (fault) されたページは メモリーかスワップ (swap) に残り続"
9642 "ける。"
9643
9644 #. type: Plain text
9645 #: build/C/man2/shmctl.2:165
9646 msgid ""
9647 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9648 "B<proc>(5)."
9649 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9650
9651 #. type: TP
9652 #: build/C/man2/shmctl.2:165
9653 #, no-wrap
9654 msgid "B<IPC_INFO> (Linux-specific)"
9655 msgstr "B<IPC_INFO> (Linux 固有)"
9656
9657 #. type: Plain text
9658 #: build/C/man2/shmctl.2:178
9659 msgid ""
9660 "Return information about system-wide shared memory limits and parameters in "
9661 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9662 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9663 "B<_GNU_SOURCE> feature test macro is defined:"
9664 msgstr ""
9665 "システム全体での共有メモリーの制限とパラメーターに関する情報を、 I<buf> が指"
9666 "す構造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必"
9667 "要である)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9668 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9669
9670 #. type: Plain text
9671 #: build/C/man2/shmctl.2:192
9672 #, no-wrap
9673 msgid ""
9674 "struct shminfo {\n"
9675 "    unsigned long shmmax; /* Maximum segment size */\n"
9676 "    unsigned long shmmin; /* Minimum segment size;\n"
9677 "                             always 1 */\n"
9678 "    unsigned long shmmni; /* Maximum number of segments */\n"
9679 "    unsigned long shmseg; /* Maximum number of segments\n"
9680 "                             that a process can attach;\n"
9681 "                             unused within kernel */\n"
9682 "    unsigned long shmall; /* Maximum number of pages of\n"
9683 "                             shared memory, system-wide */\n"
9684 "};\n"
9685 msgstr ""
9686 "struct  shminfo {\n"
9687 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9688 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9689 "                             常に 1 */\n"
9690 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9691 "    unsigned long shmseg; /* プロセスが付加できる\n"
9692 "                             セグメントの最大数。\n"
9693 "                             カーネル内では未使用 */\n"
9694 "    unsigned long shmall; /* 共有メモリーの最大ページ数。\n"
9695 "                             システム全体での値 */\n"
9696 "};\n"
9697
9698 #. type: Plain text
9699 #: build/C/man2/shmctl.2:205
9700 msgid ""
9701 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9702 "files of the same name; see B<proc>(5)  for details."
9703 msgstr ""
9704 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9705 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9706
9707 #. type: TP
9708 #: build/C/man2/shmctl.2:205
9709 #, no-wrap
9710 msgid "B<SHM_INFO> (Linux-specific)"
9711 msgstr "B<SHM_INFO> (Linux 固有)"
9712
9713 #. type: Plain text
9714 #: build/C/man2/shmctl.2:216
9715 msgid ""
9716 "Return a I<shm_info> structure whose fields contain information about system "
9717 "resources consumed by shared memory.  This structure is defined in "
9718 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9719 msgstr ""
9720 "共有メモリーが消費しているシステム資源に関する情報を 格納した I<shm_info> 構"
9721 "造体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9722 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9723
9724 #. type: Plain text
9725 #: build/C/man2/shmctl.2:233
9726 #, no-wrap
9727 msgid ""
9728 "struct shm_info {\n"
9729 "    int           used_ids; /* # of currently existing\n"
9730 "                               segments */\n"
9731 "    unsigned long shm_tot;  /* Total number of shared\n"
9732 "                               memory pages */\n"
9733 "    unsigned long shm_rss;  /* # of resident shared\n"
9734 "                               memory pages */\n"
9735 "    unsigned long shm_swp;  /* # of swapped shared\n"
9736 "                               memory pages */\n"
9737 "    unsigned long swap_attempts;\n"
9738 "                            /* Unused since Linux 2.4 */\n"
9739 "    unsigned long swap_successes;\n"
9740 "                            /* Unused since Linux 2.4 */\n"
9741 "};\n"
9742 msgstr ""
9743 "struct shm_info {\n"
9744 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9745 "    unsigned long shm_tot;  /* 共有メモリーのページ総数 */\n"
9746 "    unsigned long shm_rss;  /* メモリー上にある (スワップされて\n"
9747 "                               いない) 共有メモリーページ数 */\n"
9748 "    unsigned long shm_swp;  /* スワップされている共有メモリー\n"
9749 "                               ページ数 */\n"
9750 "    unsigned long swap_attempts;\n"
9751 "                            /* Linux 2.4 以降では未使用 */\n"
9752 "    unsigned long swap_successes;\n"
9753 "                            /* Linux 2.4 以降では未使用 */\n"
9754 "};\n"
9755
9756 #. type: TP
9757 #: build/C/man2/shmctl.2:235
9758 #, no-wrap
9759 msgid "B<SHM_STAT> (Linux-specific)"
9760 msgstr "B<SHM_STAT> (Linux 固有)"
9761
9762 #. type: Plain text
9763 #: build/C/man2/shmctl.2:246
9764 msgid ""
9765 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9766 "argument is not a segment identifier, but instead an index into the kernel's "
9767 "internal array that maintains information about all shared memory segments "
9768 "on the system."
9769 msgstr ""
9770 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9771 "グメント識別子ではなく、システム上の全ての共有メモリー セグメントに関する情報"
9772 "を管理するカーネルの内部配列へのインデックス である。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmctl.2:249
9776 msgid ""
9777 "The caller can prevent or allow swapping of a shared memory segment with the "
9778 "following I<cmd> values:"
9779 msgstr ""
9780 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリーセグメントが ス"
9781 "ワップされることを防止したり、許可したりできる:"
9782
9783 #. type: TP
9784 #: build/C/man2/shmctl.2:250
9785 #, no-wrap
9786 msgid "B<SHM_LOCK> (Linux-specific)"
9787 msgstr "B<SHM_LOCK> (Linux 固有)"
9788
9789 #. type: Plain text
9790 #: build/C/man2/shmctl.2:262
9791 msgid ""
9792 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9793 "pages that are required to be present after locking is enabled.  If a "
9794 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9795 "I<shm_perm.mode> field in the associated data structure retrieved by "
9796 "B<IPC_STAT> will be set."
9797 msgstr ""
9798 "共有メモリーセグメントをスワップすることを防止する。 ロックが有効になった後、"
9799 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9800 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9801 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9802 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9803
9804 #. type: TP
9805 #: build/C/man2/shmctl.2:262
9806 #, no-wrap
9807 msgid "B<SHM_UNLOCK> (Linux-specific)"
9808 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9809
9810 #. type: Plain text
9811 #: build/C/man2/shmctl.2:265
9812 msgid "Unlock the segment, allowing it to be swapped out."
9813 msgstr "セグメントのロックを解除し、スワップアウトすることを可能にする。"
9814
9815 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9816 #.  be applied to a segment, regardless of ownership of the segment.
9817 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9818 #.  in 2.6.10.  MTK, May 2005
9819 #. type: Plain text
9820 #: build/C/man2/shmctl.2:283
9821 msgid ""
9822 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9823 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9824 "these operations if its effective UID matches the owner or creator UID of "
9825 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9826 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9827 msgstr ""
9828 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9829 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9830 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9831 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9832 "(B<SHM_LOCK> の場合には) ロックするメモリーの合計が B<RLIMIT_MEMLOCK> リソー"
9833 "ス上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9834
9835 #. type: Plain text
9836 #: build/C/man2/shmctl.2:301
9837 msgid ""
9838 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9839 "highest used entry in the kernel's internal array recording information "
9840 "about all shared memory segments.  (This information can be used with "
9841 "repeated B<SHM_STAT> operations to obtain information about all shared "
9842 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9843 "the identifier of the shared memory segment whose index was given in "
9844 "I<shmid>.  Other operations return 0 on success."
9845 msgstr ""
9846 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリーセグメントに"
9847 "関する情報を 管理しているカーネルの内部配列の使用中エントリーのインデックス"
9848 "の うち最大値を返す (この情報は、システムの全ての共有メモリーセグメントに関す"
9849 "る情報を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用でき"
9850 "る)。 B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持"
9851 "つ共有メモリーセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9852
9853 #. type: Plain text
9854 #: build/C/man2/shmctl.2:305
9855 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9856 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9857
9858 #. type: Plain text
9859 #: build/C/man2/shmctl.2:314
9860 msgid ""
9861 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9862 "read access for I<shmid>, and the calling process does not have the "
9863 "B<CAP_IPC_OWNER> capability."
9864 msgstr ""
9865 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9866 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9867 "ケーパビリティ (capability) を持っていない。"
9868
9869 #. type: Plain text
9870 #: build/C/man2/shmctl.2:325
9871 msgid ""
9872 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9873 "pointed to by I<buf> isn't accessible."
9874 msgstr ""
9875 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9876 "るアドレスにアクセスできない。"
9877
9878 #. type: TP
9879 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9880 #, no-wrap
9881 msgid "B<EIDRM>"
9882 msgstr "B<EIDRM>"
9883
9884 #. type: Plain text
9885 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9886 msgid "I<shmid> points to a removed identifier."
9887 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9888
9889 #. type: Plain text
9890 #: build/C/man2/shmctl.2:337
9891 msgid ""
9892 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9893 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9894 "to an array slot that is currently unused."
9895 msgstr ""
9896 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9897 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9898 "配列のスロットを参照していた。"
9899
9900 #. type: Plain text
9901 #: build/C/man2/shmctl.2:348
9902 msgid ""
9903 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9904 "be-locked segment would mean that the total bytes in locked shared memory "
9905 "segments would exceed the limit for the real user ID of the calling "
9906 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9907 "(see B<setrlimit>(2))."
9908 msgstr ""
9909 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9910 "グメントのサイズ (ロックされる共有メモリーセグメントの合計バイト数) が、 呼び"
9911 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9912 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9913
9914 #. type: Plain text
9915 #: build/C/man2/shmctl.2:353
9916 msgid ""
9917 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9918 "in the structure pointed to by I<buf>."
9919 msgstr ""
9920 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9921 "には大き過ぎる。"
9922
9923 #. type: Plain text
9924 #: build/C/man2/shmctl.2:365
9925 msgid ""
9926 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9927 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9928 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9929 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9930 msgstr ""
9931 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9932 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9933 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9934
9935 #. type: Plain text
9936 #: build/C/man2/shmctl.2:377
9937 msgid ""
9938 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9939 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9940 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9941 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9942 msgstr ""
9943 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9944 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9945 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9946 "が特権を持たない場合にも、このエラーが起こる。)"
9947
9948 #.  SVr4 documents an additional error condition EMFILE.
9949 #. type: Plain text
9950 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9951 #: build/C/man2/shmop.2:231
9952 msgid "SVr4, POSIX.1-2001."
9953 msgstr "SVr4, POSIX.1-2001."
9954
9955 #.  Like Linux, the FreeBSD man pages still document
9956 #.  the inclusion of these header files.
9957 #. type: Plain text
9958 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9959 msgid ""
9960 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9961 "required on Linux or by any version of POSIX.  However, some old "
9962 "implementations required the inclusion of these header files, and the SVID "
9963 "also documented their inclusion.  Applications intended to be portable to "
9964 "such old systems may need to include these header files."
9965 msgstr ""
9966 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9967 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9968 "実装ではこれらのヘッダーファイルのインクルードが必要であり、 SVID でもこれら"
9969 "のインクルードをするように記載されている。このような古いシステムへの移植性を"
9970 "意図したアプリケーションではこれらのファイルをインクルードする必要があるかも"
9971 "しれない。"
9972
9973 #. type: Plain text
9974 #: build/C/man2/shmctl.2:407
9975 msgid ""
9976 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9977 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9978 "future, these may modified or moved to a I</proc> filesystem interface."
9979 msgstr ""
9980 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9981 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9982 "更されたり、 I</proc> ファイルシステムのインターフェースに移動されるかもしれ"
9983 "ない。"
9984
9985 #. type: Plain text
9986 #: build/C/man2/shmctl.2:415
9987 msgid ""
9988 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9989 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9990 "feature is not available on other UNIX implementations; portable "
9991 "applications should avoid relying on it."
9992 msgstr ""
9993 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9994 "メモリーセグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9995 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9996 "プリケーションではこれに依存しないようにすべきである。"
9997
9998 #. type: Plain text
9999 #: build/C/man2/shmctl.2:428
10000 msgid ""
10001 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
10002 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
10003 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
10004 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
10005 msgstr ""
10006 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
10007 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
10008 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
10009 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
10010
10011 #. type: Plain text
10012 #: build/C/man2/shmctl.2:435
10013 msgid ""
10014 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10015 "B<svipc>(7)"
10016 msgstr ""
10017 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
10018 "B<shm_overview>(7), B<svipc>(7)"
10019
10020 #. type: TH
10021 #: build/C/man2/shmget.2:38
10022 #, no-wrap
10023 msgid "SHMGET"
10024 msgstr "SHMGET"
10025
10026 #. type: TH
10027 #: build/C/man2/shmget.2:38
10028 #, no-wrap
10029 msgid "2015-01-10"
10030 msgstr "2015-01-10"
10031
10032 #. type: Plain text
10033 #: build/C/man2/shmget.2:41
10034 msgid "shmget - allocates a System V shared memory segment"
10035 msgstr "shmget - System V 共有メモリーセグメントを割り当てる"
10036
10037 #. type: Plain text
10038 #: build/C/man2/shmget.2:48
10039 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10040 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
10041
10042 #. type: Plain text
10043 #: build/C/man2/shmget.2:72
10044 msgid ""
10045 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
10046 "associated with the value of the argument I<key>.  A new shared memory "
10047 "segment, with size equal to the value of I<size> rounded up to a multiple of "
10048 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
10049 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
10050 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
10051 msgstr ""
10052 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリーセグメントの識"
10053 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
10054 "共有メモリーセグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
10055 "場合、 新しい共有メモリーセグメントを作成する。 作成される共有メモリーセグメ"
10056 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
10057 "きさとなる。"
10058
10059 #. type: Plain text
10060 #: build/C/man2/shmget.2:91
10061 msgid ""
10062 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
10063 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
10064 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
10065 "| O_EXCL> for B<open>(2).)"
10066 msgstr ""
10067 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
10068 "応する共有メモリーセグメントが既に存在すると、 B<shmget>()  は失敗し、 "
10069 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
10070 "O_EXCL> を指定した場合の動作と同じである)。"
10071
10072 #. type: Plain text
10073 #: build/C/man2/shmget.2:95
10074 msgid "The value I<shmflg> is composed of:"
10075 msgstr "I<shmflg> は以下の内容から構成される:"
10076
10077 #. type: TP
10078 #: build/C/man2/shmget.2:95
10079 #, no-wrap
10080 msgid "B<IPC_CREAT>"
10081 msgstr "B<IPC_CREAT>"
10082
10083 #. type: Plain text
10084 #: build/C/man2/shmget.2:102
10085 msgid ""
10086 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
10087 "the segment associated with I<key> and check to see if the user has "
10088 "permission to access the segment."
10089 msgstr ""
10090 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
10091 "は I<key> に対応するセグメントを探し、 ユーザーがそのセグメントにアクセスする"
10092 "許可があるかどうかをチェックする。"
10093
10094 #. type: TP
10095 #: build/C/man2/shmget.2:102
10096 #, no-wrap
10097 msgid "B<IPC_EXCL>"
10098 msgstr "B<IPC_EXCL>"
10099
10100 #. type: Plain text
10101 #: build/C/man2/shmget.2:108
10102 msgid ""
10103 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
10104 "segment.  If the segment already exists, the call fails."
10105 msgstr ""
10106 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
10107 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
10108
10109 #. type: TP
10110 #: build/C/man2/shmget.2:108
10111 #, no-wrap
10112 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10113 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10114
10115 #. type: Plain text
10116 #: build/C/man2/shmget.2:114
10117 msgid ""
10118 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10119 "I<Documentation/vm/hugetlbpage.txt> for further information."
10120 msgstr ""
10121 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10122 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10123
10124 #. type: TP
10125 #: build/C/man2/shmget.2:114
10126 #, no-wrap
10127 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10128 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10129
10130 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10131 #.  specified.
10132 #. type: Plain text
10133 #: build/C/man2/shmget.2:133
10134 msgid ""
10135 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
10136 "Do not reserve swap space for this segment.  When swap space is reserved, "
10137 "one has the guarantee that it is possible to modify the segment.  When swap "
10138 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10139 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
10140 "overcommit_memory> in B<proc>(5)."
10141 msgstr ""
10142 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10143 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10144 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10145 "行わなかった場合は、物理メモリーに空きが ないと書き込み時に B<SIGSEGV> を受け"
10146 "取る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファ"
10147 "イルに関する議論も参照のこと。"
10148
10149 #. type: Plain text
10150 #: build/C/man2/shmget.2:143
10151 msgid ""
10152 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10153 "specify the permissions granted to the owner, group, and others.  These bits "
10154 "have the same format, and the same meaning, as the I<mode> argument of "
10155 "B<open>(2).  Presently, execute permissions are not used by the system."
10156 msgstr ""
10157 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10158 "への許可を指定する。 これらのビットは B<open>(2)  の I<mode> 引き数と同じ形式"
10159 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10160
10161 #. type: Plain text
10162 #: build/C/man2/shmget.2:151
10163 msgid ""
10164 "When a new shared memory segment is created, its contents are initialized to "
10165 "zero values, and its associated data structure, I<shmid_ds> (see "
10166 "B<shmctl>(2)), is initialized as follows:"
10167 msgstr ""
10168 "共有メモリーセグメントが新たに作成される際、 共有メモリーセグメントの内容は "
10169 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10170 "期化される。"
10171
10172 #. type: Plain text
10173 #: build/C/man2/shmget.2:156
10174 msgid ""
10175 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10176 "calling process."
10177 msgstr ""
10178 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10179 "ユーザーID を設定する。"
10180
10181 #. type: Plain text
10182 #: build/C/man2/shmget.2:161
10183 msgid ""
10184 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10185 "the calling process."
10186 msgstr ""
10187 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10188 "定する。"
10189
10190 #. type: Plain text
10191 #: build/C/man2/shmget.2:166
10192 msgid ""
10193 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10194 "significant 9 bit of I<shmflg>."
10195 msgstr ""
10196 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10197
10198 #. type: Plain text
10199 #: build/C/man2/shmget.2:170
10200 msgid "I<shm_segsz> is set to the value of I<size>."
10201 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10202
10203 #. type: Plain text
10204 #: build/C/man2/shmget.2:177
10205 msgid ""
10206 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10207 msgstr ""
10208 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10209
10210 #. type: Plain text
10211 #: build/C/man2/shmget.2:180
10212 msgid "I<shm_ctime> is set to the current time."
10213 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10214
10215 #. type: Plain text
10216 #: build/C/man2/shmget.2:183
10217 msgid ""
10218 "If the shared memory segment already exists, the permissions are verified, "
10219 "and a check is made to see if it is marked for destruction."
10220 msgstr ""
10221 "共有メモリーセグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10222 "(destruction) マークがつけられていないかのチェックが行われる。"
10223
10224 #. type: Plain text
10225 #: build/C/man2/shmget.2:188
10226 msgid ""
10227 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10228 "returned, and I<errno> is set to indicate the error."
10229 msgstr ""
10230 "成功の場合、有効な共有メモリーセグメントの識別子が返される。 エラーの場合、 "
10231 "-1 が返り、 I<errno> にエラーを示す値が設定される。"
10232
10233 #. type: Plain text
10234 #: build/C/man2/shmget.2:192
10235 msgid "On failure, I<errno> is set to one of the following:"
10236 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10237
10238 #. type: Plain text
10239 #: build/C/man2/shmget.2:198
10240 msgid ""
10241 "The user does not have permission to access the shared memory segment, and "
10242 "does not have the B<CAP_IPC_OWNER> capability."
10243 msgstr ""
10244 "ユーザーはその共有メモリーセグメントへのアクセス許可を持たず、 "
10245 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10246
10247 #. type: Plain text
10248 #: build/C/man2/shmget.2:207
10249 msgid ""
10250 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10251 "memory segment already exists for I<key>."
10252 msgstr ""
10253 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10254 "有メモリーセグメントはすでに存在する。"
10255
10256 #. type: Plain text
10257 #: build/C/man2/shmget.2:215
10258 msgid ""
10259 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10260 "greater than B<SHMMAX>."
10261 msgstr ""
10262 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10263 "B<SHMMAX> よりも大きかった。"
10264
10265 #. type: Plain text
10266 #: build/C/man2/shmget.2:221
10267 msgid ""
10268 "A segment for the given I<key> exists, but I<size> is greater than the size "
10269 "of that segment."
10270 msgstr ""
10271 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10272 "ントのサイズよりも大きかった。"
10273
10274 #. type: Plain text
10275 #: build/C/man2/shmget.2:230
10276 msgid ""
10277 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10278 msgstr ""
10279 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10280 "いなかった。"
10281
10282 #. type: Plain text
10283 #: build/C/man2/shmget.2:233
10284 msgid "No memory could be allocated for segment overhead."
10285 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリーがなかった。"
10286
10287 #. type: Plain text
10288 #: build/C/man2/shmget.2:241
10289 msgid ""
10290 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10291 "segment of the requested I<size> would cause the system to exceed the system-"
10292 "wide limit on shared memory (B<SHMALL>)."
10293 msgstr ""
10294 "システム全体の共有メモリーセグメント数の制限 (B<SHMMNI>)  に達した、または要"
10295 "求された I<size> のセグメントの割り当てが システム全体の共有メモリーサイズの"
10296 "制限 (B<SHMALL>)  を超過した。"
10297
10298 #. type: Plain text
10299 #: build/C/man2/shmget.2:248
10300 msgid ""
10301 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10302 "(did not have the B<CAP_IPC_LOCK> capability)."
10303 msgstr ""
10304 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10305 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10306
10307 #. type: Plain text
10308 #: build/C/man2/shmget.2:256
10309 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10310 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10311
10312 #. type: Plain text
10313 #: build/C/man2/shmget.2:280
10314 msgid ""
10315 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10316 "value is used for I<key>, the system call ignores all but the least "
10317 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10318 msgstr ""
10319 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10320 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10321 "視し、 新しい共有メモリーセグメントを作成する。"
10322
10323 #. type: SS
10324 #: build/C/man2/shmget.2:280
10325 #, no-wrap
10326 msgid "Shared memory limits"
10327 msgstr "共有メモリーの上限"
10328
10329 #. type: Plain text
10330 #: build/C/man2/shmget.2:284
10331 msgid ""
10332 "The following limits on shared memory segment resources affect the "
10333 "B<shmget>()  call:"
10334 msgstr ""
10335 "B<shmget>()  コールに影響する共有メモリーセグメント資源の制限は以下の通りであ"
10336 "る:"
10337
10338 #. type: TP
10339 #: build/C/man2/shmget.2:284
10340 #, no-wrap
10341 msgid "B<SHMALL>"
10342 msgstr "B<SHMALL>"
10343
10344 #. type: Plain text
10345 #: build/C/man2/shmget.2:288
10346 msgid ""
10347 "System-wide limit on the total amount of shared memory, measured in units of "
10348 "the system page size."
10349 msgstr ""
10350 "共有メモリーの全使用量のシステム全体での上限値。 システムページサイズが単位で"
10351 "ある。"
10352
10353 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10354 #. type: Plain text
10355 #: build/C/man2/shmget.2:294
10356 msgid ""
10357 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10358 "shmall>.  Since Linux 3.16, the default value for this limit is:"
10359 msgstr ""
10360 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10361 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10362 "る。"
10363
10364 #. type: Plain text
10365 #: build/C/man2/shmget.2:296 build/C/man2/shmget.2:331
10366 #, no-wrap
10367 msgid "    ULONG_MAX - 2^24\n"
10368 msgstr "    ULONG_MAX - 2^24\n"
10369
10370 #. type: Plain text
10371 #: build/C/man2/shmget.2:307
10372 msgid ""
10373 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10374 "systems)  is to impose no limitation on allocations.  This value, rather "
10375 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10376 "historical applications simply raised the existing limit without first "
10377 "checking its current value.  Such applications would cause the value to "
10378 "overflow if the limit was set at B<ULONG_MAX>."
10379 msgstr ""
10380 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10381 "ステムにも 64 ビットシステムにも適したものになっている)。 B<ULONG_MAX> ではな"
10382 "く、この値が選ばれたのは、 古いアプリケーションが最初に現在の値を確認せずに既"
10383 "存の上限をそのまま増やしてしまっても問題が起こらないようなデフォルト値を選ん"
10384 "だからである。 このようなアプリケーションでは、 上限を B<ULONG_MAX> に設定す"
10385 "ると値がオーバーフローしてしまうことになる。"
10386
10387 #. type: Plain text
10388 #: build/C/man2/shmget.2:310
10389 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10390 msgstr "Linux 2.4 から Linux 3.15 では、この上限のデフォルト値は以下であった。"
10391
10392 #. type: Plain text
10393 #: build/C/man2/shmget.2:312
10394 #, no-wrap
10395 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10396 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10397
10398 #. type: Plain text
10399 #: build/C/man2/shmget.2:320
10400 msgid ""
10401 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10402 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10403 "GB as the limit on the total memory used by all shared memory segments."
10404 msgstr ""
10405 "B<SHMMAX> と B<SHMMNI> が変更されないとすると、 この式の結果に (バイト単位の"
10406 "値を得るために) ページサイズを掛け算すると、 全ての共有メモリーセグメントで使"
10407 "用される全メモリーの上限として、 8 GB という値が得られる。"
10408
10409 #. type: TP
10410 #: build/C/man2/shmget.2:320
10411 #, no-wrap
10412 msgid "B<SHMMAX>"
10413 msgstr "B<SHMMAX>"
10414
10415 #. type: Plain text
10416 #: build/C/man2/shmget.2:323
10417 msgid "Maximum size in bytes for a shared memory segment."
10418 msgstr "1 つの共有メモリーセグメントの最大サイズ (バイト数)。"
10419
10420 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10421 #. type: Plain text
10422 #: build/C/man2/shmget.2:329
10423 msgid ""
10424 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10425 "shmmax>.  Since Linux 3.16, the default value for this limit is:"
10426 msgstr ""
10427 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10428 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10429 "る。"
10430
10431 #. type: Plain text
10432 #: build/C/man2/shmget.2:340
10433 msgid ""
10434 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10435 "systems)  is to impose no limitation on allocations.  See the description of "
10436 "B<SHMALL> for a discussion of why this default value (rather than "
10437 "B<ULONG_MAX>)  is used."
10438 msgstr ""
10439 "この値は割り当てに関する上限としては適用されない (なお、この値は 32 ビットシ"
10440 "ステムにも 64 ビットシステムにも適したものになっている)。 (B<ULONG_MAX> では"
10441 "なく) このデフォルト値が使われている理由については B<SHMALL> の説明を参照。"
10442
10443 #. type: Plain text
10444 #: build/C/man2/shmget.2:343
10445 msgid ""
10446 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10447 "0x2000000 (32MB)."
10448 msgstr ""
10449 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10450 "(32MB) であった。"
10451
10452 #. type: Plain text
10453 #: build/C/man2/shmget.2:349
10454 msgid ""
10455 "Because it is not possible to map just part of a shared memory segment, the "
10456 "amount of virtual memory places another limit on the maximum size of a "
10457 "usable segment: for example, on i386 the largest segments that can be mapped "
10458 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10459 msgstr ""
10460 "共有メモリーセグメントの一部分だけをマッピングすることはできないので、 使用可"
10461 "能なセグメントの最大サイズには仮想メモリーの総量という別の上限が適用される。 "
10462 "例えば、i386 ではマッピング可能な最大セグメントの大きさはおおよそ 2.8GB で、 "
10463 "x86_64 では上限はおおよそ 127TB である。"
10464
10465 #. type: TP
10466 #: build/C/man2/shmget.2:349
10467 #, no-wrap
10468 msgid "B<SHMMIN>"
10469 msgstr "B<SHMMIN>"
10470
10471 #. type: Plain text
10472 #: build/C/man2/shmget.2:355
10473 msgid ""
10474 "Minimum size in bytes for a shared memory segment: implementation dependent "
10475 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10476 msgstr ""
10477 "共有メモリーセグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10478 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10479
10480 #. type: TP
10481 #: build/C/man2/shmget.2:355
10482 #, no-wrap
10483 msgid "B<SHMMNI>"
10484 msgstr "B<SHMMNI>"
10485
10486 #. type: Plain text
10487 #: build/C/man2/shmget.2:360
10488 msgid ""
10489 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10490 "the default value for this limit was 128; since Linux 2.4, the default value "
10491 "is 4096."
10492 msgstr ""
10493 "システム全体の共有メモリーセグメント数の上限値。 この上限値のデフォルトは、 "
10494 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10495
10496 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10497 #.  that we could create one more segment than SHMMNI -- MTK
10498 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10499 #. type: Plain text
10500 #: build/C/man2/shmget.2:366
10501 msgid ""
10502 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10503 msgstr ""
10504 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10505 "たりできる。"
10506
10507 #. type: Plain text
10508 #: build/C/man2/shmget.2:370
10509 msgid ""
10510 "The implementation has no specific limits for the per-process maximum number "
10511 "of shared memory segments (B<SHMSEG>)."
10512 msgstr ""
10513 "プロセス当りの共有メモリーセグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10514 "上の制限はない。"
10515
10516 #. type: Plain text
10517 #: build/C/man2/shmget.2:376
10518 msgid ""
10519 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10520 "shared memory segment scheduled for deletion."
10521 msgstr ""
10522 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリーセグメント"
10523 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10524
10525 #. type: Plain text
10526 #: build/C/man2/shmget.2:382
10527 msgid ""
10528 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10529 "more clearly show its function."
10530 msgstr ""
10531 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10532 "より明確にその機能を表しているだろう。"
10533
10534 #. type: Plain text
10535 #: build/C/man2/shmget.2:391
10536 msgid ""
10537 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10538 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10539 msgstr ""
10540 "B<memfd_create>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), "
10541 "B<capabilities>(7), B<shm_overview>(7), B<svipc>(7)"
10542
10543 #. type: TH
10544 #: build/C/man2/shmop.2:41
10545 #, no-wrap
10546 msgid "SHMOP"
10547 msgstr "SHMOP"
10548
10549 #. type: Plain text
10550 #: build/C/man2/shmop.2:44
10551 msgid "shmat, shmdt - System V shared memory operations"
10552 msgstr "shmat, shmdt - System V 共有メモリー (shared memory) の操作"
10553
10554 #. type: Plain text
10555 #: build/C/man2/shmop.2:48
10556 #, no-wrap
10557 msgid ""
10558 "B<#include E<lt>sys/types.hE<gt>>\n"
10559 "B<#include E<lt>sys/shm.hE<gt>>\n"
10560 msgstr ""
10561 "B<#include E<lt>sys/types.hE<gt>>\n"
10562 "B<#include E<lt>sys/shm.hE<gt>>\n"
10563
10564 #. type: Plain text
10565 #: build/C/man2/shmop.2:50
10566 #, no-wrap
10567 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10568 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10569
10570 #. type: Plain text
10571 #: build/C/man2/shmop.2:52
10572 #, no-wrap
10573 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10574 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10575
10576 #. type: SS
10577 #: build/C/man2/shmop.2:54
10578 #, no-wrap
10579 msgid "shmat()"
10580 msgstr "shmat()"
10581
10582 #. type: Plain text
10583 #: build/C/man2/shmop.2:62
10584 msgid ""
10585 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10586 "I<shmid> to the address space of the calling process.  The attaching address "
10587 "is specified by I<shmaddr> with one of the following criteria:"
10588 msgstr ""
10589 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリーセグメント "
10590 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10591 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10592
10593 #. type: Plain text
10594 #: build/C/man2/shmop.2:68
10595 msgid ""
10596 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10597 "which to attach the segment."
10598 msgstr ""
10599 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10600 "されていない) アドレスを選択する。"
10601
10602 #. type: Plain text
10603 #: build/C/man2/shmop.2:80
10604 msgid ""
10605 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10606 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10607 "multiple of B<SHMLBA>."
10608 msgstr ""
10609 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10610 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10611 "スへ付加する。"
10612
10613 #. type: Plain text
10614 #: build/C/man2/shmop.2:84
10615 msgid ""
10616 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10617 "occurs."
10618 msgstr ""
10619 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10620 "要がある。"
10621
10622 #. type: Plain text
10623 #: build/C/man2/shmop.2:90
10624 msgid ""
10625 "In addition to B<SHM_RND>, the following flags may be specified in the "
10626 "I<shmflg> bit-mask argument:"
10627 msgstr ""
10628 "B<SHM_RND> に加えて、以下のフラグを I<shmflg> ビットマスク引き数に指定でき"
10629 "る。"
10630
10631 #. type: TP
10632 #: build/C/man2/shmop.2:90
10633 #, no-wrap
10634 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10635 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10636
10637 #. type: Plain text
10638 #: build/C/man2/shmop.2:94
10639 msgid ""
10640 "Allow the contents of the segment to be executed.  The caller must have "
10641 "execute permission on the segment."
10642 msgstr ""
10643 "セグメントの内容を実行できる。 呼び出し元はセグメントに対する実行許可を持って"
10644 "いなければならない。"
10645
10646 #. type: TP
10647 #: build/C/man2/shmop.2:94
10648 #, no-wrap
10649 msgid "B<SHM_RDONLY>"
10650 msgstr "B<SHM_RDONLY>"
10651
10652 #. type: Plain text
10653 #: build/C/man2/shmop.2:102
10654 msgid ""
10655 "Attach the segment for read-only access.  The process must have read "
10656 "permission for the segment.  If this flag is not specified, the segment is "
10657 "attached for read and write access, and the process must have read and write "
10658 "permission for the segment.  There is no notion of a write-only shared "
10659 "memory segment."
10660 msgstr ""
10661 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10662 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10663 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10664 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリーセ"
10665 "グメントという概念は存在しない。"
10666
10667 #. type: TP
10668 #: build/C/man2/shmop.2:102
10669 #, no-wrap
10670 msgid "B<SHM_REMAP> (Linux-specific)"
10671 msgstr "B<SHM_REMAP> (Linux 固有)"
10672
10673 #. type: Plain text
10674 #: build/C/man2/shmop.2:115
10675 msgid ""
10676 "This flag specifies that the mapping of the segment should replace any "
10677 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10678 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10679 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10680 "must not be NULL."
10681 msgstr ""
10682 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10683 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10684 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10685 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10686
10687 #. type: Plain text
10688 #: build/C/man2/shmop.2:122
10689 msgid ""
10690 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10691 "The segment will automatically be detached at process exit.  The same "
10692 "segment may be attached as a read and as a read-write one, and more than "
10693 "once, in the process's address space."
10694 msgstr ""
10695 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10696 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10697 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10698 "複数回付加することもできる。"
10699
10700 #. type: Plain text
10701 #: build/C/man2/shmop.2:130
10702 msgid ""
10703 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10704 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10705 "follows:"
10706 msgstr ""
10707 "成功した B<shmat>()  コールは共有メモリーセグメントに関連する I<shmid_ds> 構"
10708 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10709
10710 #. type: Plain text
10711 #: build/C/man2/shmop.2:133
10712 msgid "I<shm_atime> is set to the current time."
10713 msgstr "I<shm_atime> には現在の時刻を設定する。"
10714
10715 #. type: Plain text
10716 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10717 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10718 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10719
10720 #. type: Plain text
10721 #: build/C/man2/shmop.2:140
10722 msgid "I<shm_nattch> is incremented by one."
10723 msgstr "I<shm_nattch> を 1 増加させる。"
10724
10725 #. type: SS
10726 #: build/C/man2/shmop.2:140
10727 #, no-wrap
10728 msgid "shmdt()"
10729 msgstr "shmdt()"
10730
10731 #. type: Plain text
10732 #: build/C/man2/shmop.2:151
10733 msgid ""
10734 "B<shmdt>()  detaches the shared memory segment located at the address "
10735 "specified by I<shmaddr> from the address space of the calling process.  The "
10736 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10737 "the value returned by the attaching B<shmat>()  call."
10738 msgstr ""
10739 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10740 "ドレスに配置された共有メモリーセグメントを分離 (detach) する。 分離する共有メ"
10741 "モリーセグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10742 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10743 "ない。"
10744
10745 #. type: Plain text
10746 #: build/C/man2/shmop.2:157
10747 msgid ""
10748 "On a successful B<shmdt>()  call, the system updates the members of the "
10749 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10750 msgstr ""
10751 "成功した B<shmdt>()  コールはその共有メモリーセグメントに関連する "
10752 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10753
10754 #. type: Plain text
10755 #: build/C/man2/shmop.2:160
10756 msgid "I<shm_dtime> is set to the current time."
10757 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10758
10759 #. type: Plain text
10760 #: build/C/man2/shmop.2:168
10761 msgid ""
10762 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10763 "marked for deletion, the segment is deleted."
10764 msgstr ""
10765 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10766 "セグメントは削除される。"
10767
10768 #. type: Plain text
10769 #: build/C/man2/shmop.2:176
10770 msgid ""
10771 "On success, B<shmat>()  returns the address of the attached shared memory "
10772 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10773 "indicate the cause of the error."
10774 msgstr ""
10775 "B<shmat>()  は、成功した場合、 付加された共有メモリーセグメントのアドレスを返"
10776 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10777 "値を設定する。"
10778
10779 #. type: Plain text
10780 #: build/C/man2/shmop.2:182
10781 msgid ""
10782 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10783 "set to indicate the cause of the error."
10784 msgstr ""
10785 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10786 "ラーの原因を示す値を設定する。"
10787
10788 #. type: Plain text
10789 #: build/C/man2/shmop.2:188
10790 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10791 msgstr ""
10792 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10793
10794 #. type: Plain text
10795 #: build/C/man2/shmop.2:194
10796 msgid ""
10797 "The calling process does not have the required permissions for the requested "
10798 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10799 msgstr ""
10800 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10801 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10802
10803 #. type: Plain text
10804 #: build/C/man2/shmop.2:211
10805 msgid ""
10806 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10807 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10808 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10809 msgstr ""
10810 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10811 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10812 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10813 "れているが、 I<shmaddr> が NULL であった。"
10814
10815 #. type: Plain text
10816 #: build/C/man2/shmop.2:214
10817 msgid "Could not allocate memory for the descriptor or for the page tables."
10818 msgstr ""
10819 "ディスクリプター (descriptor) やページテーブルのためのメモリーを 割り当てるこ"
10820 "とができない。"
10821
10822 #. type: Plain text
10823 #: build/C/man2/shmop.2:220
10824 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10825 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10826
10827 #.  The following since 2.6.17-rc1:
10828 #. type: Plain text
10829 #: build/C/man2/shmop.2:228
10830 msgid ""
10831 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10832 "not aligned on a page boundary."
10833 msgstr ""
10834 "I<shmaddr> に付加された共有メモリーセグメントが存在しない。 もしくは、 "
10835 "I<shmaddr> がページ境界に合っていない。"
10836
10837 #. type: Plain text
10838 #: build/C/man2/shmop.2:243
10839 msgid ""
10840 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10841 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10842 "B<shmat>()  from I<char\\ *> into I<void\\ *>."
10843 msgstr ""
10844 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10845 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10846 "\\ *> に変更された。"
10847
10848 #. type: Plain text
10849 #: build/C/man2/shmop.2:248
10850 msgid ""
10851 "After a B<fork>(2), the child inherits the attached shared memory segments."
10852 msgstr ""
10853 "B<fork>(2)  した後、子プロセスは付加された共有メモリーセグメントを継承する。"
10854
10855 #. type: Plain text
10856 #: build/C/man2/shmop.2:252
10857 msgid ""
10858 "After an B<execve>(2), all attached shared memory segments are detached from "
10859 "the process."
10860 msgstr ""
10861 "B<exec>(2)  した後、全ての付加された共有メモリーセグメントはプロセスから分離"
10862 "される。"
10863
10864 #. type: Plain text
10865 #: build/C/man2/shmop.2:256
10866 msgid ""
10867 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10868 "process."
10869 msgstr ""
10870 "B<exit>(2)  において、全ての付加された共有メモリーセグメントはプロセスから分"
10871 "離される。"
10872
10873 #. type: Plain text
10874 #: build/C/man2/shmop.2:268
10875 msgid ""
10876 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10877 "way of attaching a shared memory segment.  Be aware that the shared memory "
10878 "segment attached in this way may be attached at different addresses in "
10879 "different processes.  Therefore, any pointers maintained within the shared "
10880 "memory must be made relative (typically to the starting address of the "
10881 "segment), rather than absolute."
10882 msgstr ""
10883 "共有メモリーセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> "
10884 "を NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共"
10885 "有メモリーセグメントは、 プロセスが異なれば別のアドレスに付加される、という点"
10886 "に注意すること。 よって共有メモリー内で管理されるポインターは、 絶対アドレス"
10887 "ではなく、 (一般的にはセグメントの開始アドレスからの)  相対アドレスで作成する"
10888 "べきである。"
10889
10890 #. type: Plain text
10891 #: build/C/man2/shmop.2:273
10892 msgid ""
10893 "On Linux, it is possible to attach a shared memory segment even if it is "
10894 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10895 "behavior and many other implementations do not support it."
10896 msgstr ""
10897 "Linux では共有メモリーセグメントに既に削除マークが付けられていても、 その共有"
10898 "メモリーセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような"
10899 "動作を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10900
10901 #. type: Plain text
10902 #: build/C/man2/shmop.2:276
10903 msgid "The following system parameter affects B<shmat>():"
10904 msgstr "以下のシステムパラメーターは、 B<shmat>()  に影響する:"
10905
10906 #. type: TP
10907 #: build/C/man2/shmop.2:276
10908 #, no-wrap
10909 msgid "B<SHMLBA>"
10910 msgstr "B<SHMLBA>"
10911
10912 #. type: Plain text
10913 #: build/C/man2/shmop.2:289
10914 msgid ""
10915 "Segment low boundary address multiple.  When explicitly specifying an attach "
10916 "address in a call to B<shmat>(), the caller should ensure that the address "
10917 "is a multiple of this value.  This is necessary on some architectures, in "
10918 "order either to ensure good CPU cache performance or to ensure that "
10919 "different attaches of the same segment have consistent views within the CPU "
10920 "cache.  B<SHMLBA> is normally some multiple of the system page size (on many "
10921 "Linux architectures, it is the same as the system page size)."
10922 msgstr ""
10923 "セグメントの下限アドレス倍数 (Segment low boundary address multiple)。 "
10924 "B<shmat>() の呼び出しにおいて付加するアドレスを明示的に指定する際、 呼び出し"
10925 "元は指定するアドレスがこの値の倍数になるように保証しなければならない。 これは"
10926 "いくつかのアーキテクチャーでは必要なことで、 CPU キャッシュの性能を保証するた"
10927 "めであったり、 同じセグメントの別の付与を CPU キャッシュ内部で一貫して扱える"
10928 "ようにするためだったりする。 B<SHMLBA> は通常はシステムページサイズの倍数であ"
10929 "る (Linux の多くのアーキテクチャーではシステムページサイズと同じである)。"
10930
10931 #. type: Plain text
10932 #: build/C/man2/shmop.2:293
10933 msgid ""
10934 "The implementation places no intrinsic per-process limit on the number of "
10935 "shared memory segments (B<SHMSEG>)."
10936 msgstr ""
10937 "現在の実装では、プロセスごとの 共有メモリーセグメントの最大数 (B<SHMSEG>)  に"
10938 "関する実装依存の制限はない。"
10939
10940 #. type: Plain text
10941 #: build/C/man2/shmop.2:301
10942 msgid ""
10943 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10944 "B<shm_overview>(7), B<svipc>(7)"
10945 msgstr ""
10946 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10947 "B<shm_overview>(7), B<svipc>(7)"
10948
10949 #. type: TH
10950 #: build/C/man2/subpage_prot.2:30
10951 #, no-wrap
10952 msgid "SUBPAGE_PROT"
10953 msgstr "SUBPAGE_PROT"
10954
10955 #. type: TH
10956 #: build/C/man2/subpage_prot.2:30
10957 #, no-wrap
10958 msgid "2012-07-13"
10959 msgstr "2012-07-13"
10960
10961 #. type: Plain text
10962 #: build/C/man2/subpage_prot.2:33
10963 msgid "subpage_prot - define a subpage protection for an address range"
10964 msgstr ""
10965
10966 #. type: Plain text
10967 #: build/C/man2/subpage_prot.2:37
10968 #, no-wrap
10969 msgid ""
10970 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10971 "B<                  uint32_t *>I<map>B<);>\n"
10972 msgstr ""
10973 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10974 "B<                  uint32_t *>I<map>B<);>\n"
10975
10976 #. type: Plain text
10977 #: build/C/man2/subpage_prot.2:41
10978 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10979 msgstr ""
10980 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10981 "を参照。"
10982
10983 #. type: Plain text
10984 #: build/C/man2/subpage_prot.2:47
10985 msgid ""
10986 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10987 "control the access permissions on individual 4kB subpages on systems "
10988 "configured with a page size of 64kB."
10989 msgstr ""
10990
10991 #. type: Plain text
10992 #: build/C/man2/subpage_prot.2:54
10993 msgid ""
10994 "The protection map is applied to the memory pages in the region starting at "
10995 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10996 "aligned to a 64-kB boundary."
10997 msgstr ""
10998
10999 #. type: Plain text
11000 #: build/C/man2/subpage_prot.2:66
11001 msgid ""
11002 "The protection map is specified in the buffer pointed to by I<map>.  The map "
11003 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
11004 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
11005 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
11006 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
11007 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
11008 msgstr ""
11009
11010 #. type: Plain text
11011 #: build/C/man2/subpage_prot.2:71
11012 msgid ""
11013 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
11014 "specified below is returned."
11015 msgstr ""
11016
11017 #. type: Plain text
11018 #: build/C/man2/subpage_prot.2:77
11019 msgid "The buffer referred to by I<map> is not accessible."
11020 msgstr ""
11021
11022 #. type: Plain text
11023 #: build/C/man2/subpage_prot.2:87
11024 msgid ""
11025 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
11026 "be aligned to a multiple of the system page size, and they must not refer to "
11027 "a region outside of the address space of the process or to a region that "
11028 "consists of huge pages."
11029 msgstr ""
11030
11031 #. type: Plain text
11032 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
11033 msgid "Out of memory."
11034 msgstr "メモリー不足である。"
11035
11036 #. type: Plain text
11037 #: build/C/man2/subpage_prot.2:96
11038 msgid ""
11039 "This system call is provided on the PowerPC architecture since Linux "
11040 "2.6.25.  The system call is provided only if the kernel is configured with "
11041 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
11042 msgstr ""
11043
11044 #. type: Plain text
11045 #: build/C/man2/subpage_prot.2:101
11046 msgid ""
11047 "Glibc does not provide a wrapper for this system call; call it using "
11048 "B<syscall>(2)."
11049 msgstr ""
11050
11051 #. type: Plain text
11052 #: build/C/man2/subpage_prot.2:106
11053 msgid ""
11054 "Normal page protections (at the 64-kB page level) also apply; the subpage "
11055 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
11056 "field won't allow writes to a page that is otherwise write-protected."
11057 msgstr ""
11058
11059 #. type: SS
11060 #: build/C/man2/subpage_prot.2:106
11061 #, no-wrap
11062 msgid "Rationale"
11063 msgstr ""
11064
11065 #.  In the initial implementation, it was the case that:
11066 #.      In fact the whole process is switched to use 4k hardware pages when the
11067 #.      subpage_prot system call is used, but this could be improved in future
11068 #.      to switch only the affected segments.
11069 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
11070 #.  the affected segment, not the whole process.
11071 #. type: Plain text
11072 #: build/C/man2/subpage_prot.2:128
11073 msgid ""
11074 "This system call is provided to assist writing emulators that operate using "
11075 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
11076 "uses a smaller page size, the emulator can no longer use the memory-"
11077 "management unit (MMU)  and normal system calls for controlling page "
11078 "protections.  (The emulator could emulate the MMU by checking and possibly "
11079 "remapping the address for each memory access in software, but that is "
11080 "slow.)  The idea is that the emulator supplies an array of protection masks "
11081 "to apply to a specified range of virtual addresses.  These masks are applied "
11082 "at the level where hardware page-table entries (PTEs)  are inserted into the "
11083 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
11084 "affected.  Implicit in this is that the regions of the address space that "
11085 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
11086 "hardware pages (on machines with hardware 64-kB page support)."
11087 msgstr ""
11088
11089 #. type: Plain text
11090 #: build/C/man2/subpage_prot.2:131
11091 msgid "B<mprotect>(2), B<syscall>(2)"
11092 msgstr "B<mprotect>(2), B<syscall>(2)"
11093
11094 #. type: Plain text
11095 #: build/C/man2/subpage_prot.2:134
11096 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
11097 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
11098
11099 #. type: TH
11100 #: build/C/man2/sync_file_range.2:30
11101 #, no-wrap
11102 msgid "SYNC_FILE_RANGE"
11103 msgstr "SYNC_FILE_RANGE"
11104
11105 #. type: TH
11106 #: build/C/man2/sync_file_range.2:30
11107 #, no-wrap
11108 msgid "2014-08-19"
11109 msgstr "2014-08-19"
11110
11111 #. type: Plain text
11112 #: build/C/man2/sync_file_range.2:33
11113 msgid "sync_file_range - sync a file segment with disk"
11114 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
11115
11116 #. type: Plain text
11117 #: build/C/man2/sync_file_range.2:37
11118 #, no-wrap
11119 msgid ""
11120 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
11121 "B<#include E<lt>fcntl.hE<gt>>\n"
11122 msgstr ""
11123 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
11124 "B<#include E<lt>fcntl.hE<gt>>\n"
11125
11126 #. type: Plain text
11127 #: build/C/man2/sync_file_range.2:40
11128 #, no-wrap
11129 msgid ""
11130 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11131 "B<                    unsigned int >I<flags>B<);>\n"
11132 msgstr ""
11133 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11134 "B<                    unsigned int >I<flags>B<);>\n"
11135
11136 #. type: Plain text
11137 #: build/C/man2/sync_file_range.2:47
11138 msgid ""
11139 "B<sync_file_range>()  permits fine control when synchronizing the open file "
11140 "referred to by the file descriptor I<fd> with disk."
11141 msgstr ""
11142 "B<sync_file_range>()  を使うと、ファイルディスクリプター I<fd> で参照される"
11143 "オープンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能とな"
11144 "る。"
11145
11146 #. type: Plain text
11147 #: build/C/man2/sync_file_range.2:61
11148 msgid ""
11149 "I<offset> is the starting byte of the file range to be synchronized.  "
11150 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11151 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11152 "are synchronized.  Synchronization is in units of the system page size: "
11153 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11154 "rounded up to a page boundary."
11155 msgstr ""
11156 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11157 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11158 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11159 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11160 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11161
11162 #. type: Plain text
11163 #: build/C/man2/sync_file_range.2:65
11164 msgid "The I<flags> bit-mask argument can include any of the following values:"
11165 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11166
11167 #. type: TP
11168 #: build/C/man2/sync_file_range.2:65
11169 #, no-wrap
11170 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11171 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11172
11173 #. type: Plain text
11174 #: build/C/man2/sync_file_range.2:70
11175 msgid ""
11176 "Wait upon write-out of all pages in the specified range that have already "
11177 "been submitted to the device driver for write-out before performing any "
11178 "write."
11179 msgstr ""
11180 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11181 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11182 "つ。"
11183
11184 #. type: TP
11185 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11186 #, no-wrap
11187 msgid "B<SYNC_FILE_RANGE_WRITE>"
11188 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11189
11190 #. type: Plain text
11191 #: build/C/man2/sync_file_range.2:76
11192 msgid ""
11193 "Initiate write-out of all dirty pages in the specified range which are not "
11194 "presently submitted write-out.  Note that even this may block if you attempt "
11195 "to write more than request queue size."
11196 msgstr ""
11197 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11198 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11199 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11200 "る点に注意すること。"
11201
11202 #. type: TP
11203 #: build/C/man2/sync_file_range.2:76
11204 #, no-wrap
11205 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11206 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11207
11208 #. type: Plain text
11209 #: build/C/man2/sync_file_range.2:80
11210 msgid ""
11211 "Wait upon write-out of all pages in the range after performing any write."
11212 msgstr ""
11213 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11214 "つ。"
11215
11216 #. type: Plain text
11217 #: build/C/man2/sync_file_range.2:84
11218 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11219 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11220
11221 #. type: SS
11222 #: build/C/man2/sync_file_range.2:84
11223 #, no-wrap
11224 msgid "Warning"
11225 msgstr "警告"
11226
11227 #. type: Plain text
11228 #: build/C/man2/sync_file_range.2:100
11229 msgid ""
11230 "This system call is extremely dangerous and should not be used in portable "
11231 "programs.  None of these operations writes out the file's metadata.  "
11232 "Therefore, unless the application is strictly performing overwrites of "
11233 "already-instantiated disk blocks, there are no guarantees that the data will "
11234 "be available after a crash.  There is no user interface to know if a write "
11235 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11236 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11237 "writing into preallocated space, many filesystems also require calls into "
11238 "the block allocator, which this system call does not sync out to disk.  This "
11239 "system call does not flush disk write caches and thus does not provide any "
11240 "data integrity on systems with volatile disk write caches."
11241 msgstr ""
11242 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11243 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11244 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11245 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11246 "みが上書きだけであるかを知るためのユーザーインターフェースは存在しない。 "
11247 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11248 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11249 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11250 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11251 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11252 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11253 "コールではデータの一貫性を確保できないことになる。"
11254
11255 #. type: SS
11256 #: build/C/man2/sync_file_range.2:100
11257 #, no-wrap
11258 msgid "Some details"
11259 msgstr "詳細"
11260
11261 #. type: Plain text
11262 #: build/C/man2/sync_file_range.2:108
11263 msgid ""
11264 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11265 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11266 msgstr ""
11267 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11268 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11269
11270 #. type: Plain text
11271 #: build/C/man2/sync_file_range.2:112
11272 msgid "Useful combinations of the I<flags> bits are:"
11273 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11274
11275 #. type: TP
11276 #: build/C/man2/sync_file_range.2:112
11277 #, no-wrap
11278 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11279 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11280
11281 #. type: Plain text
11282 #: build/C/man2/sync_file_range.2:120
11283 msgid ""
11284 "Ensures that all pages in the specified range which were dirty when "
11285 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11286 "start-write-for-data-integrity operation."
11287 msgstr ""
11288 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11289 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11290 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11291 "ある。"
11292
11293 #. type: Plain text
11294 #: build/C/man2/sync_file_range.2:127
11295 msgid ""
11296 "Start write-out of all dirty pages in the specified range which are not "
11297 "presently under write-out.  This is an asynchronous flush-to-disk "
11298 "operation.  This is not suitable for data integrity operations."
11299 msgstr ""
11300 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11301 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11302 "る。データ完全性確保が必要な操作としては適切ではない。"
11303
11304 #. type: TP
11305 #: build/C/man2/sync_file_range.2:127
11306 #, no-wrap
11307 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11308 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11309
11310 #. type: Plain text
11311 #: build/C/man2/sync_file_range.2:134
11312 msgid ""
11313 "Wait for completion of write-out of all pages in the specified range.  This "
11314 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11315 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11316 "and obtain its result."
11317 msgstr ""
11318 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11319 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11320 "き、この操作の完了を待ち、結果を取得することができる。"
11321
11322 #. type: TP
11323 #: build/C/man2/sync_file_range.2:134
11324 #, no-wrap
11325 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11326 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11327
11328 #. type: Plain text
11329 #: build/C/man2/sync_file_range.2:141
11330 msgid ""
11331 "This is a write-for-data-integrity operation that will ensure that all pages "
11332 "in the specified range which were dirty when B<sync_file_range>()  was "
11333 "called are committed to disk."
11334 msgstr ""
11335 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11336 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11337 "のページが ディスクに格納されることが保証される。"
11338
11339 #. type: Plain text
11340 #: build/C/man2/sync_file_range.2:147
11341 msgid ""
11342 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11343 "I<errno> is set to indicate the error."
11344 msgstr ""
11345 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11346 "I<errno> にエラーを示す値を設定する。"
11347
11348 #. type: Plain text
11349 #: build/C/man2/sync_file_range.2:152
11350 msgid "I<fd> is not a valid file descriptor."
11351 msgstr "I<fd> が有効なファイルディスクリプターではない。"
11352
11353 #. type: Plain text
11354 #: build/C/man2/sync_file_range.2:160
11355 msgid ""
11356 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11357 msgstr ""
11358 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11359 "である。"
11360
11361 #. type: Plain text
11362 #: build/C/man2/sync_file_range.2:163
11363 msgid "I/O error."
11364 msgstr "I/O エラー。"
11365
11366 #. type: Plain text
11367 #: build/C/man2/sync_file_range.2:169
11368 msgid "Out of disk space."
11369 msgstr "ディスク領域不足である。"
11370
11371 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11372 #.  (In user space at least) it isn't possible to obtain a file descriptor
11373 #.  for a symbolic link.
11374 #. type: Plain text
11375 #: build/C/man2/sync_file_range.2:177
11376 msgid ""
11377 "I<fd> refers to something other than a regular file, a block device, a "
11378 "directory, or a symbolic link."
11379 msgstr ""
11380 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11381 "以外のものを指している。"
11382
11383 #. type: Plain text
11384 #: build/C/man2/sync_file_range.2:180
11385 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11386 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11387
11388 #. type: Plain text
11389 #: build/C/man2/sync_file_range.2:183
11390 msgid ""
11391 "This system call is Linux-specific, and should be avoided in portable "
11392 "programs."
11393 msgstr ""
11394 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11395 "けるべきである。"
11396
11397 #. type: SS
11398 #: build/C/man2/sync_file_range.2:184
11399 #, no-wrap
11400 msgid "sync_file_range2()"
11401 msgstr "sync_file_range2()"
11402
11403 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11404 #. type: Plain text
11405 #: build/C/man2/sync_file_range.2:201
11406 msgid ""
11407 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11408 "in a suitable pair of registers.  On such architectures, the call signature "
11409 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11410 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11411 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11412 "different system call that orders the arguments suitably:"
11413 msgstr ""
11414 "いくつかのアーキテクチャー (例えば、 PowerPC や ARM) では、 64 ビットの引き数"
11415 "は適切なレジスターの組に割り当てる必要がある。 このようなアーキテクチャーで"
11416 "は、 「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 "
11417 "引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスターが一つ消費"
11418 "されてしまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテク"
11419 "チャーでは引き数が適切な順序になった別のシステムコールが定義されている。"
11420
11421 #. type: Plain text
11422 #: build/C/man2/sync_file_range.2:206
11423 #, no-wrap
11424 msgid ""
11425 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11426 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11427 msgstr ""
11428 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11429 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11430
11431 #. type: Plain text
11432 #: build/C/man2/sync_file_range.2:211
11433 msgid ""
11434 "The behavior of this system call is otherwise exactly the same as "
11435 "B<sync_file_range>()."
11436 msgstr ""
11437 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11438 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11439 "glibc では提供されていない。"
11440
11441 #. type: Plain text
11442 #: build/C/man2/sync_file_range.2:222
11443 msgid ""
11444 "A system call with this signature first appeared on the ARM architecture in "
11445 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11446 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11447 "architectures where glibc support is provided, glibc transparently wraps "
11448 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11449 msgstr ""
11450 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャーで\n"
11451 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11452 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11453 "システムコールの名前が変更された。\n"
11454 "glibc によるサポートが提供されているアーキテクチャーでは、\n"
11455 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11456 "B<sync_file_range2>() を適切に使用するようになっている。"
11457
11458 #. type: Plain text
11459 #: build/C/man2/sync_file_range.2:227
11460 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11461 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11462
11463 #. type: TH
11464 #: build/C/man2/memfd_create.2:21
11465 #, no-wrap
11466 msgid "MEMFD_CREATE"
11467 msgstr "MEMFD_CREATE"
11468
11469 #. type: Plain text
11470 #: build/C/man2/memfd_create.2:24
11471 msgid "memfd_create - create an anonymous file"
11472 msgstr "memfd_create - 無名ファイル (anonymous file) を作成する"
11473
11474 #. type: Plain text
11475 #: build/C/man2/memfd_create.2:26
11476 msgid "B<#include E<lt>sys/memfd.hE<gt>>"
11477 msgstr "B<#include E<lt>sys/memfd.hE<gt>>"
11478
11479 #. type: Plain text
11480 #: build/C/man2/memfd_create.2:28
11481 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11482 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>"
11483
11484 #.  David Herrmann:
11485 #.      memfd uses VM_NORESERVE so each page is accounted on first access.
11486 #.      This means, the overcommit-limits (see __vm_enough_memory()) and the
11487 #.      memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
11488 #.      those are accounted on "current" and "current->mm", that is, the
11489 #.      process doing the first page access.
11490 #. type: Plain text
11491 #: build/C/man2/memfd_create.2:51
11492 msgid ""
11493 "B<memfd_create>()  creates an anonymous file and returns a file descriptor "
11494 "that refers to it.  The file behaves like a regular file, and so can be "
11495 "modified, truncated, memory-mapped, and so on.  However, unlike a regular "
11496 "file, it lives in RAM and has a volatile backing storage.  Once all "
11497 "references to the file are dropped, it is automatically released.  Anonymous "
11498 "memory is used for all backing pages of the file.  Therefore, files created "
11499 "by B<memfd_create>()  have the same semantics as other anonymous memory "
11500 "allocations such as those allocated using B<mmap>(2)  with the "
11501 "B<MAP_ANONYMOUS> flag."
11502 msgstr ""
11503 "B<memfd_create>() は、 無名ファイル (anonymous file) を作成し、 そのファイル"
11504 "を参照するファイルディスクリプターを返す。 このファイルは通常のファイルと同様"
11505 "に振る舞い、 変更、切り詰め (truncate)、 メモリーマップなどを行うことができ"
11506 "る。 しかし、 通常のファイルとは違い、 このファイルは RAM 上に置かれ、 格納さ"
11507 "れるストレージは揮発性である。 このファイルへの参照がすべてなくなると、 ファ"
11508 "イルは自動的に解放される。 このファイルが置かれるページには無名メモリー "
11509 "(anonymous memory) が使用される。 したがって、 B<memfd_create>() で作成された"
11510 "フィアルは、 他の無名メモリーの割り当て (B<MAP_ANONYMOUS> フラグ付きの "
11511 "B<mmap>(2) を使って割り当てられた無名メモリーなど) と同じ動作をする。"
11512
11513 #. type: Plain text
11514 #: build/C/man2/memfd_create.2:58
11515 msgid ""
11516 "The initial size of the file is set to 0.  Following the call, the file size "
11517 "should be set using B<ftruncate>(2).  (Alternatively, the file may be "
11518 "populated by calls to B<write>(2)  or similar.)"
11519 msgstr ""
11520 "ファイルの初期サイズは 0 に設定される。 呼び出しの後に、 B<ftruncate>(2) を"
11521 "使ってファイルサイズを設定すべきである (代わりに、 B<write>(2) や同様の関数を"
11522 "呼び出してファイルにデータを書き込むこともできる)。"
11523
11524 #. type: Plain text
11525 #: build/C/man2/memfd_create.2:69
11526 msgid ""
11527 "The name supplied in I<name> is used as a filename and will be displayed as "
11528 "the target of the corresponding symbolic link in the directory I</proc/self/"
11529 "fd/>.  The displayed name is always prefixed with I<memfd:> and serves only "
11530 "for debugging purposes.  Names do not affect the behavior of the file "
11531 "descriptor, and as such multiple files can have the same name without any "
11532 "side effects."
11533 msgstr ""
11534 "I<name> に指定された名前はファイル名として使用され、 ディレクトリ I</proc/"
11535 "self/fd/> で対応するシンボリックリンクのリンク先として表示される。 表示される"
11536 "名前の前には常に I<memfd:> が付き、 この名前はデバッグ用途としてのみ機能す"
11537 "る。 名前はファイルディスクリプターの動作には影響せず、 複数のファイルが同じ"
11538 "名前を持っても副作用はない。"
11539
11540 #. type: Plain text
11541 #: build/C/man2/memfd_create.2:74
11542 msgid ""
11543 "The following values may be bitwise ORed in I<flags> to change the behaviour "
11544 "of B<memfd_create>():"
11545 msgstr ""
11546 "以下の値をビット論理和で I<flags> に指定して、 B<memfd_create>() の動作を変更"
11547 "できる。"
11548
11549 #. type: TP
11550 #: build/C/man2/memfd_create.2:74
11551 #, no-wrap
11552 msgid "B<MFD_CLOEXEC>"
11553 msgstr "B<MFD_CLOEXEC>"
11554
11555 #. type: Plain text
11556 #: build/C/man2/memfd_create.2:84
11557 msgid ""
11558 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
11559 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
11560 "may be useful."
11561 msgstr ""
11562 "新しいファイルディスクリプターに close-on-exec (B<FD_CLOEXEC>) フラグをセット"
11563 "する。 これが有用な理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参"
11564 "照のこと。"
11565
11566 #. type: TP
11567 #: build/C/man2/memfd_create.2:84
11568 #, no-wrap
11569 msgid "B<MFD_ALLOW_SEALING>"
11570 msgstr "B<MFD_ALLOW_SEALING>"
11571
11572 #.  FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
11573 #.        Is it worth adding some text explaining this?
11574 #. type: Plain text
11575 #: build/C/man2/memfd_create.2:100
11576 msgid ""
11577 "Allow sealing operations on this file.  See the discussion of the "
11578 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
11579 "below.  The initial set of seals is empty.  If this flag is not set, the "
11580 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
11581 "be set on the file."
11582 msgstr ""
11583 "このファイルに対して sealing 操作を許可する。 B<fcntl>(2) の B<F_ADD_SEALS> "
11584 "と B<F_GET_SEALS> 操作の議論を参照。 下記の「注意」も参照。 初期の seal 集合"
11585 "は空となる。 このフラグを指定しなかった場合、 初期の seal 集合は "
11586 "B<F_SEAL_SEAL> となり、 これはこのファイルには他の seal をセットできないこと"
11587 "ということである。"
11588
11589 #. type: Plain text
11590 #: build/C/man2/memfd_create.2:104
11591 msgid "Unused bits in I<flags> must be 0."
11592 msgstr "I<flags> の未使用のビットは 0 でなければならない。"
11593
11594 #. type: Plain text
11595 #: build/C/man2/memfd_create.2:113
11596 msgid ""
11597 "As its return value, B<memfd_create>()  returns a new file descriptor that "
11598 "can be used to refer to the file.  This file descriptor is opened for both "
11599 "reading and writing (B<O_RDWR>)  and B<O_LARGEFILE> is set for the "
11600 "descriptor."
11601 msgstr ""
11602 "返り値として B<memfd_create>() は、 作成したファイルを参照するのに使用できる"
11603 "新しいファイルディスクリプターを返す。 このファイルディスクリプターは読み書き"
11604 "両用 (B<O_RDWR>) でオープンされ、 B<O_LARGEFILE> がこのファイルディスクリプ"
11605 "ターにセットされる。"
11606
11607 #. type: Plain text
11608 #: build/C/man2/memfd_create.2:126
11609 msgid ""
11610 "With respect to B<fork>(2)  and B<execve>(2), the usual semantics apply for "
11611 "the file descriptor created by B<memfd_create>().  A copy of the file "
11612 "descriptor is inherited by the child produced by B<fork>(2)  and refers to "
11613 "the same file.  The file descriptor is preserved across B<execve>(2), unless "
11614 "the close-on-exec flag has been set."
11615 msgstr ""
11616 "B<fork>(2) と B<execve>(2) に関しては、 B<memfd_create>() で作成したファイル"
11617 "ディスクリプターについても通常の動作が適用される。 ファイルディスクリプターの"
11618 "コピーは B<fork>(2) で生成される子プロセスに継承され、 同じファイルを参照す"
11619 "る。 close-on-exec フラグがセットされていない限り、 B<execve>(2) の前後でファ"
11620 "イルディスクリプターは保持される。"
11621
11622 #. type: Plain text
11623 #: build/C/man2/memfd_create.2:133
11624 msgid ""
11625 "On success, B<memfd_create>()  returns a new file descriptor.  On error, -1 "
11626 "is returned and I<errno> is set to indicate the error."
11627 msgstr ""
11628 "成功の場合、 B<memfd_create>() は新しいファイルディスクリプターを返す。 エ"
11629 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11630
11631 #. type: Plain text
11632 #: build/C/man2/memfd_create.2:139
11633 msgid "The address in I<name> points to invalid memory."
11634 msgstr "I<name> のアドレスが無効なメモリーを指している。"
11635
11636 #. type: Plain text
11637 #: build/C/man2/memfd_create.2:146
11638 msgid ""
11639 "An unsupported value was specified in one of the arguments: I<flags> "
11640 "included unknown bits, or I<name> was too long."
11641 msgstr ""
11642 "サポートされていない値がいずれかの引き数で指定された。 I<flags> に未知のビッ"
11643 "トが含まれていたか、 I<name> が長過ぎた。"
11644
11645 #. type: Plain text
11646 #: build/C/man2/memfd_create.2:149
11647 msgid "The per-process limit on open file descriptors has been reached."
11648 msgstr ""
11649 "オープンされているファイルディスクリプターのプロセス単位の上限に達した。"
11650
11651 #. type: Plain text
11652 #: build/C/man2/memfd_create.2:152
11653 msgid ""
11654 "The system-wide limit on the total number of open files has been reached."
11655 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
11656
11657 #. type: Plain text
11658 #: build/C/man2/memfd_create.2:155
11659 msgid "There was insufficient memory to create a new anonymous file."
11660 msgstr "新しい無名ファイルを作成するのに十分なメモリーがなかった。"
11661
11662 #.  FIXME . When glibc support appears, update the following sentence:
11663 #. type: Plain text
11664 #: build/C/man2/memfd_create.2:161
11665 msgid ""
11666 "The B<memfd_create>()  system call first appeared in Linux 3.17.  Support in "
11667 "the GNU C library is pending."
11668 msgstr ""
11669 "B<memfd_create>() システムコールは Linux 3.17 で初めて登場した。 GNU C ライブ"
11670 "ラリでのサポートは検討中である。"
11671
11672 #. type: Plain text
11673 #: build/C/man2/memfd_create.2:165
11674 msgid "The B<memfd_create>()  system call is Linux-specific."
11675 msgstr "B<memfd_create>()  システムコールは Linux 固有である。"
11676
11677 #.  See also http://lwn.net/Articles/593918/
11678 #.  and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
11679 #. type: Plain text
11680 #: build/C/man2/memfd_create.2:178
11681 msgid ""
11682 "The B<memfd_create>()  system call provides a simple alternative to manually "
11683 "mounting a I<tmpfs> filesystem and creating and opening a file in that "
11684 "filesystem.  The primary purpose of B<memfd_create>()  is to create files "
11685 "and associated file descriptors that are used with the file-sealing APIs "
11686 "provided by B<fcntl>(2)."
11687 msgstr ""
11688 "B<memfd_create>() システムコールは、 手動で I<tmpfs> ファイルシステムをマウン"
11689 "トして、 そのファイルシステムにファイルをオープンするという操作の、 簡単な代"
11690 "替手段を提供している。 B<memfd_create>() の主な目的は、 B<fcntl>(2) が提供す"
11691 "る file-sealing API で使用できる、 ファイルとそれに関連付けられるファイルディ"
11692 "スクリプターを作成することである。"
11693
11694 #. type: Plain text
11695 #: build/C/man2/memfd_create.2:192
11696 msgid ""
11697 "The B<memfd_create>()  system call also has uses without file sealing (which "
11698 "is why file-sealing is disabled, unless explicitly requested with the "
11699 "B<MFD_ALLOW_SEALING> flag).  In particular, it can be used as an alternative "
11700 "to creating files in I<tmp> or as an alternative to using the B<open>(2)  "
11701 "B<O_TMPFILE> in cases where there is no intention to actually link the "
11702 "resulting file into the filesystem."
11703 msgstr ""
11704 "B<memfd_create>() システムコールは、 file sealing なしでも用途がある (これが"
11705 "明示的に B<MFD_ALLOW_SEALING> フラグが要求されない限り、 file-sealing が無効"
11706 "になる理由である)。 特に、 ファイルシステムに実際にファイルを残す意図がない場"
11707 "合、 I<tmp> にファイルを作成したり B<open>(2) B<O_TMPFILE> を使ったりする際の"
11708 "代替手段として使用できる。"
11709
11710 #. type: SS
11711 #: build/C/man2/memfd_create.2:192
11712 #, no-wrap
11713 msgid "File sealing"
11714 msgstr "file sealing"
11715
11716 #. type: Plain text
11717 #: build/C/man2/memfd_create.2:210
11718 msgid ""
11719 "In the absence of file sealing, processes that communicate via shared memory "
11720 "must either trust each other, or take measures to deal with the possibility "
11721 "that an untrusted peer may manipulate the shared memory region in "
11722 "problematic ways.  For example, an untrusted peer might modify the contents "
11723 "of the shared memory at any time, or shrink the shared memory region.  The "
11724 "former possibility leaves the local process vulnerable to time-of-check-to-"
11725 "time-of-use race conditions (typically dealt with by copying data from the "
11726 "shared memory region before checking and using it).  The latter possibility "
11727 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
11728 "made to access a now-nonexistent location in the shared memory region.  "
11729 "(Dealing with this possibility necessitates the use of a handler for the "
11730 "B<SIGBUS> signal.)"
11731 msgstr ""
11732 "file sealing がない場合、 共有メモリー経由で通信するプロセスは、 互いに信頼す"
11733 "るか、 信頼していない相手が共有メモリー領域を問題がある方法で操作する可能性に"
11734 "対処するための対策を講じなければならない。\n"
11735 "例えば、 信頼していない相手は、 いつでも共有メモリーの内容を変更したり、 共有"
11736 "メモリー領域を縮小したりする可能性がある。 前者の場合は、 ローカルプロセスで"
11737 "は、 データの確認時点と使用時点の競合条件の問題が起こり得る (通常はこの問題へ"
11738 "の対処は共有メモリー領域からデータをこぴーしてからデータを確認、使用すること"
11739 "である)。 後者の場合は、 ローカルプロセスでは、 共有メモリー領域の存在しなく"
11740 "なった場所にアクセスしようとした際にシグナル B<SIGBUS> が発生する可能性があ"
11741 "る (この可能性に対処するにはシグナル B<SIGBUS> に対してハンドラーを使用する必"
11742 "要がある)。"
11743
11744 #. type: Plain text
11745 #: build/C/man2/memfd_create.2:216
11746 msgid ""
11747 "Dealing with untrusted peers imposes extra complexity on code that employs "
11748 "shared memory.  Memory sealing enables that extra complexity to be "
11749 "eliminated, by allowing a process to operate secure in the knowledge that "
11750 "its peer can't modify the shared memory in an undesired fashion."
11751 msgstr ""
11752 "信頼していない相手への対処により、 共有メモリーを利用するコードに余計な複雑性"
11753 "が増すことになる。 メモリー sealing により余計な複雑性をなくすことができる。 "
11754 "相手が望まない方法で共有メモリーを変更できないことを知っていることで、 プロセ"
11755 "スは安全に動作できるようになる。"
11756
11757 #. type: Plain text
11758 #: build/C/man2/memfd_create.2:218
11759 msgid "An example of the usage of the sealing mechanism is as follows:"
11760 msgstr "sealing 機構の使い方の例は以下のとおりである。"
11761
11762 #. type: Plain text
11763 #: build/C/man2/memfd_create.2:225
11764 msgid ""
11765 "The first process creates a I<tmpfs> file using B<memfd_create>().  The call "
11766 "yields a file descriptor used in subsequent steps."
11767 msgstr ""
11768 "最初のプロセスは B<memfd_create>() を使って I<tmpfs> ファイルを作成する。 "
11769 "B<memfd_create>() はこれ以降のステップで使用するファイルディスクリプターを返"
11770 "す。"
11771
11772 #. type: Plain text
11773 #: build/C/man2/memfd_create.2:232
11774 msgid ""
11775 "The first process sizes the file created in the previous step using "
11776 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
11777 "with the desired data."
11778 msgstr ""
11779 "最初のプロセスは B<ftruncate>(2) を使って直前のステップで作成したファイルのサ"
11780 "イズを変更し、 B<mmap>(2) を使ってそのファイルをマッピングし、 共有メモリーに"
11781 "所望のデータを配置する。"
11782
11783 #. type: IP
11784 #: build/C/man2/memfd_create.2:232
11785 #, no-wrap
11786 msgid "3."
11787 msgstr "3."
11788
11789 #. type: Plain text
11790 #: build/C/man2/memfd_create.2:242
11791 msgid ""
11792 "The first process uses the B<fcntl>(2)  B<F_ADD_SEALS> operation to place "
11793 "one or more seals on the file, in order to restrict further modifications on "
11794 "the file.  (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
11795 "to first unmap the shared writable mapping created in the previous step.)"
11796 msgstr ""
11797 "最初のプロセスは、 このファイルに対する今後の変更を制限するために、 "
11798 "B<fcntl>(2) の B<F_ADD_SEALS> 操作を使って、 そのファイルに seal をいくつか設"
11799 "定する。 (seal B<F_SEAL_WRITE> を設定する場合、 直前のステップで作成した書き"
11800 "込み可能な共有マッピングをまずアンマップする必要が出てくる。)"
11801
11802 #. type: IP
11803 #: build/C/man2/memfd_create.2:242
11804 #, no-wrap
11805 msgid "4."
11806 msgstr "4."
11807
11808 #. type: Plain text
11809 #: build/C/man2/memfd_create.2:247
11810 msgid ""
11811 "A second process obtains a file descriptor for the I<tmpfs> file and maps "
11812 "it.  Among the possible ways in which this could happen are the following:"
11813 msgstr ""
11814 "二つ目のプロセスは I<tmpfs> ファイルのファイルディスクリプターを入手し、 その"
11815 "ファイルをマップする。 以下に示す方法を使用することができる。"
11816
11817 #. type: Plain text
11818 #: build/C/man2/memfd_create.2:258
11819 msgid ""
11820 "The process that called B<memfd_create>()  could transfer the resulting file "
11821 "descriptor to the second process via a UNIX domain socket (see B<unix>(7)  "
11822 "and B<cmsg>(3)).  The second process then maps the file using B<mmap>(2)."
11823 msgstr ""
11824 "B<memfd_create>() を呼び出したプロセスは、 得られたファイルディスクリプターを"
11825 "二つ目のプロセスに UNIX ドメインソケット経由で渡すことができる (B<unix>(7) "
11826 "と B<cmsg>(3) を参照)。 それから、二つ目のプロセスは B<mmap>(2) を使ってファ"
11827 "イルをマップする。"
11828
11829 #. type: Plain text
11830 #: build/C/man2/memfd_create.2:266
11831 msgid ""
11832 "The second process is created via B<fork>(2)  and thus automatically "
11833 "inherits the file descriptor and mapping.  (Note that in this case and the "
11834 "next, there is a natural trust relationship between the two processes, since "
11835 "they are running under the same user ID.  Therefore, file sealing would not "
11836 "normally be necessary.)"
11837 msgstr ""
11838 "二つ目のプロセスを B<fork>(2) を使って作成する。 そうすると、 自動的にファイ"
11839 "ルディスクリプターとマッピングが継承される。 (この方法と次の方法では、 二つの"
11840 "プロセス間で自然な信頼関係が存在することになる。 なぜなら、 二つのプロセスは"
11841 "同じユーザー ID。 の元で実行されているからである。 したがって、 file sealing "
11842 "は通常は不要であろう。)"
11843
11844 #. type: Plain text
11845 #: build/C/man2/memfd_create.2:280
11846 msgid ""
11847 "The second process opens the file I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>>, "
11848 "where I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
11849 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
11850 "returned by the call to B<memfd_create>()  in that process.  The second "
11851 "process then maps the file using B<mmap>(2)."
11852 msgstr ""
11853 "二つ目のプロセスは I</proc/E<lt>pdE<gt>/fd/E<lt>fdE<gt>> をオープンする。 "
11854 "I<E<lt>pidE<gt>> は最初のプロセス (B<memfd_create>() を呼び出したプロセス) "
11855 "の PID で、 I<E<lt>fdE<gt>> は最初のプロセスでの B<memfd_create>() の呼び出し"
11856 "で返されたファイルディスクリプター番号である。 それからこのファイルを "
11857 "B<mmap>(2) を使ってマッピングする。"
11858
11859 #. type: IP
11860 #: build/C/man2/memfd_create.2:281
11861 #, no-wrap
11862 msgid "5."
11863 msgstr "5."
11864
11865 #. type: Plain text
11866 #: build/C/man2/memfd_create.2:293
11867 msgid ""
11868 "The second process uses the B<fcntl>(2)  B<F_GET_SEALS> operation to "
11869 "retrieve the bit mask of seals that has been applied to the file.  This bit "
11870 "mask can be inspected in order to determine what kinds of restrictions have "
11871 "been placed on file modifications.  If desired, the second process can apply "
11872 "further seals to impose additional restrictions (so long as the "
11873 "B<F_SEAL_SEAL> seal has not yet been applied)."
11874 msgstr ""
11875 "二つ目のプロセスは B<fcntl>(2) の B<F_GET_SEALS> 操作を使って、 そのファイル"
11876 "に適用されている seal のビットマスクを取得する。 このビットマスクを調べて、 "
11877 "ファイルの変更に関してどのような制限が適用されているかを知ることができる。 "
11878 "(B<F_SEAL_SEAL> seal がそれまでに適用されていない限りは) 必要であれば、 二つ"
11879 "目のプロセスはさらに seal を設定して追加の制限をかけることができる。"
11880
11881 #. type: Plain text
11882 #: build/C/man2/memfd_create.2:297
11883 msgid ""
11884 "Below are shown two example programs that demonstrate the use of "
11885 "B<memfd_create>()  and the file sealing API."
11886 msgstr ""
11887 "以下では B<memfd_create>() と file sealing API の使用例を示すサンプルプログラ"
11888 "ムを 2 つとりあげる。"
11889
11890 #. type: Plain text
11891 #: build/C/man2/memfd_create.2:312
11892 msgid ""
11893 "The first program, I<t_memfd_create.c>, creates a I<tmpfs> file using "
11894 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
11895 "optionally places some seals on the file.  The program accepts up to three "
11896 "command-line arguments, of which the first two are required.  The first "
11897 "argument is the name to associate with the file, the second argument is the "
11898 "size to be set for the file, and the optional third is a string of "
11899 "characters that specify seals to be set on file."
11900 msgstr ""
11901 "最初のプログラム I<t_memfd_create.c> は、 B<memfd_create>() を使って "
11902 "I<tmpfs> ファイルを作成し、 そのファイルのサイズを設定し、 メモリーにマッピン"
11903 "グし、 要求された場合にはそのファイルに seal を設定する。 このプログラムは最"
11904 "大で 3 つのコマンドライン引き数を取り、 最初の 2 つは必須である。 最初の引き"
11905 "数はファイルに関連付けられる名前で、 2 番目の引き数はファイルに設定されるサイ"
11906 "ズである。 省略可能な 3 番目の引き数は、 このファイルに設定する seal を指定す"
11907 "る文字列である。"
11908
11909 #. type: Plain text
11910 #: build/C/man2/memfd_create.2:318
11911 msgid ""
11912 "The second program, I<t_get_seals.c>, can be used to open an existing file "
11913 "that was created via B<memfd_create>()  and inspect the set of seals that "
11914 "have been applied to that file."
11915 msgstr ""
11916 "2 つめのプログラム I<t_get_seals.c> を使うと、 B<memfd_create>() を使って作成"
11917 "された既存のファイルをオープンし、 そのファイルに適用されている seal の集合を"
11918 "調査できる。"
11919
11920 #. type: Plain text
11921 #: build/C/man2/memfd_create.2:323
11922 msgid ""
11923 "The following shell session demonstrates the use of these programs.  First "
11924 "we create a I<tmpfs> file and set some seals on it:"
11925 msgstr ""
11926 "以下のシェルのセッションはこれらのプログラムの使用例を示したものである。 ま"
11927 "ず I<tmpfs> ファイルを作成し、そのファイルに seal をいくつか設定している。"
11928
11929 #. type: Plain text
11930 #: build/C/man2/memfd_create.2:329
11931 #, no-wrap
11932 msgid ""
11933 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11934 "[1] 11775\n"
11935 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11936 msgstr ""
11937 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
11938 "[1] 11775\n"
11939 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
11940
11941 #. type: Plain text
11942 #: build/C/man2/memfd_create.2:347
11943 msgid ""
11944 "At this point, the I<t_memfd_create> program continues to run in the "
11945 "background.  From another program, we can obtain a file descriptor for the "
11946 "file created by B<memfd_create>()  by opening the I</proc/PID/fd> file that "
11947 "corresponds to the descriptor opened by B<memfd_create>().  Using that "
11948 "pathname, we inspect the content of the I</proc/PID/fd> symbolic link, and "
11949 "use our I<t_get_seals> program to view the seals that have been placed on "
11950 "the file:"
11951 msgstr ""
11952 "この時点では、 I<t_memfd_create> プログラムはバックグラウンドで動作し続け"
11953 "る。 もう一つのプログラムから、 B<memfd_create>() がオープンしたディスクリプ"
11954 "ターに対応する I</proc/PID/fd> ファイルをオープンすることで、 "
11955 "B<memfd_create>() で作成されたファイルのファイルディスクリプターを取得でき"
11956 "る。\n"
11957 "そのパス名を使って、 I</proc/PID/fd> シンボリックリンクの内容を調査し、 "
11958 "I<t_get_seals> プログラムを使ってそのファイルに設定されている seal を見ること"
11959 "ができる。"
11960
11961 #. type: Plain text
11962 #: build/C/man2/memfd_create.2:354
11963 #, no-wrap
11964 msgid ""
11965 "$ B<readlink /proc/11775/fd/3>\n"
11966 "/memfd:my_memfd_file (deleted)\n"
11967 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11968 "Existing seals: WRITE SHRINK\n"
11969 msgstr ""
11970 "$ B<readlink /proc/11775/fd/3>\n"
11971 "/memfd:my_memfd_file (deleted)\n"
11972 "$ B<./t_get_seals /proc/11775/fd/3>\n"
11973 "Existing seals: WRITE SHRINK\n"
11974
11975 #. type: SS
11976 #: build/C/man2/memfd_create.2:356
11977 #, no-wrap
11978 msgid "Program source: t_memfd_create.c"
11979 msgstr "プログラムのソース: t_memfd_create.c"
11980
11981 #. type: Plain text
11982 #: build/C/man2/memfd_create.2:365
11983 #, no-wrap
11984 msgid ""
11985 "#include E<lt>sys/memfd.hE<gt>\n"
11986 "#include E<lt>fcntl.hE<gt>\n"
11987 "#include E<lt>stdlib.hE<gt>\n"
11988 "#include E<lt>unistd.hE<gt>\n"
11989 "#include E<lt>string.hE<gt>\n"
11990 "#include E<lt>stdio.hE<gt>\n"
11991 msgstr ""
11992 "#include E<lt>sys/memfd.hE<gt>\n"
11993 "#include E<lt>fcntl.hE<gt>\n"
11994 "#include E<lt>stdlib.hE<gt>\n"
11995 "#include E<lt>unistd.hE<gt>\n"
11996 "#include E<lt>string.hE<gt>\n"
11997 "#include E<lt>stdio.hE<gt>\n"
11998
11999 #. type: Plain text
12000 #: build/C/man2/memfd_create.2:377
12001 #, no-wrap
12002 msgid ""
12003 "int\n"
12004 "main(int argc, char *argv[])\n"
12005 "{\n"
12006 "    int fd;\n"
12007 "    unsigned int seals;\n"
12008 "    char *addr;\n"
12009 "    char *name, *seals_arg;\n"
12010 "    ssize_t len;\n"
12011 msgstr ""
12012 "int\n"
12013 "main(int argc, char *argv[])\n"
12014 "{\n"
12015 "    int fd;\n"
12016 "    unsigned int seals;\n"
12017 "    char *addr;\n"
12018 "    char *name, *seals_arg;\n"
12019 "    ssize_t len;\n"
12020
12021 #. type: Plain text
12022 #: build/C/man2/memfd_create.2:388
12023 #, no-wrap
12024 msgid ""
12025 "    if (argc E<lt> 3) {\n"
12026 "        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12027 "        fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12028 "                \"following characters:\\en\");\n"
12029 "        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12030 "        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12031 "        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12032 "        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12033 "        exit(EXIT_FAILURE);\n"
12034 "    }\n"
12035 msgstr ""
12036 "    if (argc E<lt> 3) {\n"
12037 "        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
12038 "        fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
12039 "                \"following characters:\\en\");\n"
12040 "        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
12041 "        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
12042 "        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
12043 "        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
12044 "        exit(EXIT_FAILURE);\n"
12045 "    }\n"
12046
12047 #. type: Plain text
12048 #: build/C/man2/memfd_create.2:392
12049 #, no-wrap
12050 msgid ""
12051 "    name = argv[1];\n"
12052 "    len = atoi(argv[2]);\n"
12053 "    seals_arg = argv[3];\n"
12054 msgstr ""
12055 "    name = argv[1];\n"
12056 "    len = atoi(argv[2]);\n"
12057 "    seals_arg = argv[3];\n"
12058
12059 #. type: Plain text
12060 #: build/C/man2/memfd_create.2:395
12061 #, no-wrap
12062 msgid ""
12063 "    /* Create an anonymous file in tmpfs; allow seals to be\n"
12064 "       placed on the file */\n"
12065 msgstr ""
12066 "    /* Create an anonymous file in tmpfs; allow seals to be\n"
12067 "       placed on the file */\n"
12068
12069 #. type: Plain text
12070 #: build/C/man2/memfd_create.2:399
12071 #, no-wrap
12072 msgid ""
12073 "    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12074 "    if (fd == -1)\n"
12075 "        errExit(\"memfd_create\");\n"
12076 msgstr ""
12077 "    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
12078 "    if (fd == -1)\n"
12079 "        errExit(\"memfd_create\");\n"
12080
12081 #. type: Plain text
12082 #: build/C/man2/memfd_create.2:401
12083 #, no-wrap
12084 msgid "    /* Size the file as specified on the command line */\n"
12085 msgstr "    /* Size the file as specified on the command line */\n"
12086
12087 #. type: Plain text
12088 #: build/C/man2/memfd_create.2:404
12089 #, no-wrap
12090 msgid ""
12091 "    if (ftruncate(fd, len) == -1)\n"
12092 "        errExit(\"truncate\");\n"
12093 msgstr ""
12094 "    if (ftruncate(fd, len) == -1)\n"
12095 "        errExit(\"truncate\");\n"
12096
12097 #. type: Plain text
12098 #: build/C/man2/memfd_create.2:407
12099 #, no-wrap
12100 msgid ""
12101 "    printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12102 "            (long) getpid(), fd, (long) getpid(), fd);\n"
12103 msgstr ""
12104 "    printf(\"PID: %ld; fd: %d; /proc/%ld/fd/%d\\en\",\n"
12105 "            (long) getpid(), fd, (long) getpid(), fd);\n"
12106
12107 #. type: Plain text
12108 #: build/C/man2/memfd_create.2:410
12109 #, no-wrap
12110 msgid ""
12111 "    /* Code to map the file and populate the mapping with data\n"
12112 "       omitted */\n"
12113 msgstr ""
12114 "    /* Code to map the file and populate the mapping with data\n"
12115 "       omitted */\n"
12116
12117 #. type: Plain text
12118 #: build/C/man2/memfd_create.2:413
12119 #, no-wrap
12120 msgid ""
12121 "    /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12122 "       seals on the file */\n"
12123 msgstr ""
12124 "    /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
12125 "       seals on the file */\n"
12126
12127 #. type: Plain text
12128 #: build/C/man2/memfd_create.2:416
12129 #, no-wrap
12130 msgid ""
12131 "    if (seals_arg != NULL) {\n"
12132 "        seals = 0;\n"
12133 msgstr ""
12134 "    if (seals_arg != NULL) {\n"
12135 "        seals = 0;\n"
12136
12137 #. type: Plain text
12138 #: build/C/man2/memfd_create.2:425
12139 #, no-wrap
12140 msgid ""
12141 "        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12142 "            seals |= F_SEAL_GROW;\n"
12143 "        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12144 "            seals |= F_SEAL_SHRINK;\n"
12145 "        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12146 "            seals |= F_SEAL_WRITE;\n"
12147 "        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12148 "            seals |= F_SEAL_SEAL;\n"
12149 msgstr ""
12150 "        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
12151 "            seals |= F_SEAL_GROW;\n"
12152 "        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
12153 "            seals |= F_SEAL_SHRINK;\n"
12154 "        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
12155 "            seals |= F_SEAL_WRITE;\n"
12156 "        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
12157 "            seals |= F_SEAL_SEAL;\n"
12158
12159 #. type: Plain text
12160 #: build/C/man2/memfd_create.2:429
12161 #, no-wrap
12162 msgid ""
12163 "        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12164 "            errExit(\"fcntl\");\n"
12165 "    }\n"
12166 msgstr ""
12167 "        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
12168 "            errExit(\"fcntl\");\n"
12169 "    }\n"
12170
12171 #. type: Plain text
12172 #: build/C/man2/memfd_create.2:432
12173 #, no-wrap
12174 msgid ""
12175 "    /* Keep running, so that the file created by memfd_create()\n"
12176 "       continues to exist */\n"
12177 msgstr ""
12178 "    /* Keep running, so that the file created by memfd_create()\n"
12179 "       continues to exist */\n"
12180
12181 #. type: Plain text
12182 #: build/C/man2/memfd_create.2:434
12183 #, no-wrap
12184 msgid "    pause();\n"
12185 msgstr "    pause();\n"
12186
12187 #. type: SS
12188 #: build/C/man2/memfd_create.2:438
12189 #, no-wrap
12190 msgid "Program source: t_get_seals.c"
12191 msgstr "プログラムのソース: t_get_seals.c"
12192
12193 #. type: Plain text
12194 #: build/C/man2/memfd_create.2:447
12195 #, no-wrap
12196 msgid ""
12197 "#include E<lt>sys/memfd.hE<gt>\n"
12198 "#include E<lt>fcntl.hE<gt>\n"
12199 "#include E<lt>unistd.hE<gt>\n"
12200 "#include E<lt>stdlib.hE<gt>\n"
12201 "#include E<lt>string.hE<gt>\n"
12202 "#include E<lt>stdio.hE<gt>\n"
12203 msgstr ""
12204 "#include E<lt>sys/memfd.hE<gt>\n"
12205 "#include E<lt>fcntl.hE<gt>\n"
12206 "#include E<lt>unistd.hE<gt>\n"
12207 "#include E<lt>stdlib.hE<gt>\n"
12208 "#include E<lt>string.hE<gt>\n"
12209 "#include E<lt>stdio.hE<gt>\n"
12210
12211 #. type: Plain text
12212 #: build/C/man2/memfd_create.2:456
12213 #, no-wrap
12214 msgid ""
12215 "int\n"
12216 "main(int argc, char *argv[])\n"
12217 "{\n"
12218 "    int fd;\n"
12219 "    unsigned int seals;\n"
12220 msgstr ""
12221 "int\n"
12222 "main(int argc, char *argv[])\n"
12223 "{\n"
12224 "    int fd;\n"
12225 "    unsigned int seals;\n"
12226
12227 #. type: Plain text
12228 #: build/C/man2/memfd_create.2:461
12229 #, no-wrap
12230 msgid ""
12231 "    if (argc != 2) {\n"
12232 "        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12233 "        exit(EXIT_FAILURE);\n"
12234 "    }\n"
12235 msgstr ""
12236 "    if (argc != 2) {\n"
12237 "        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
12238 "        exit(EXIT_FAILURE);\n"
12239 "    }\n"
12240
12241 #. type: Plain text
12242 #: build/C/man2/memfd_create.2:465
12243 #, no-wrap
12244 msgid ""
12245 "    fd = open(argv[1], O_RDWR);\n"
12246 "    if (fd == -1)\n"
12247 "        errExit(\"open\");\n"
12248 msgstr ""
12249 "    fd = open(argv[1], O_RDWR);\n"
12250 "    if (fd == -1)\n"
12251 "        errExit(\"open\");\n"
12252
12253 #. type: Plain text
12254 #: build/C/man2/memfd_create.2:469
12255 #, no-wrap
12256 msgid ""
12257 "    seals = fcntl(fd, F_GET_SEALS);\n"
12258 "    if (seals == -1)\n"
12259 "        errExit(\"fcntl\");\n"
12260 msgstr ""
12261 "    seals = fcntl(fd, F_GET_SEALS);\n"
12262 "    if (seals == -1)\n"
12263 "        errExit(\"fcntl\");\n"
12264
12265 #. type: Plain text
12266 #: build/C/man2/memfd_create.2:480
12267 #, no-wrap
12268 msgid ""
12269 "    printf(\"Existing seals:\");\n"
12270 "    if (seals & F_SEAL_SEAL)\n"
12271 "        printf(\" SEAL\");\n"
12272 "    if (seals & F_SEAL_GROW)\n"
12273 "        printf(\" GROW\");\n"
12274 "    if (seals & F_SEAL_WRITE)\n"
12275 "        printf(\" WRITE\");\n"
12276 "    if (seals & F_SEAL_SHRINK)\n"
12277 "        printf(\" SHRINK\");\n"
12278 "    printf(\"\\en\");\n"
12279 msgstr ""
12280 "    printf(\"Existing seals:\");\n"
12281 "    if (seals & F_SEAL_SEAL)\n"
12282 "        printf(\" SEAL\");\n"
12283 "    if (seals & F_SEAL_GROW)\n"
12284 "        printf(\" GROW\");\n"
12285 "    if (seals & F_SEAL_WRITE)\n"
12286 "        printf(\" WRITE\");\n"
12287 "    if (seals & F_SEAL_SHRINK)\n"
12288 "        printf(\" SHRINK\");\n"
12289 "    printf(\"\\en\");\n"
12290
12291 #. type: Plain text
12292 #: build/C/man2/memfd_create.2:483
12293 #, no-wrap
12294 msgid ""
12295 "    /* Code to map the file and access the contents of the\n"
12296 "       resulting mapping omitted */\n"
12297 msgstr ""
12298 "    /* Code to map the file and access the contents of the\n"
12299 "       resulting mapping omitted */\n"
12300
12301 #. type: Plain text
12302 #: build/C/man2/memfd_create.2:493
12303 msgid "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12304 msgstr "B<fcntl>(2), B<ftruncate>(2), B<mmap>(2), B<shmget>(2), B<shm_open>(3)"
12305
12306 #. type: TH
12307 #: build/C/man2/s390_pci_mmio_write.2:25
12308 #, no-wrap
12309 msgid "S390_PCI_MMIO_WRITE"
12310 msgstr "S390_PCI_MMIO_WRITE"
12311
12312 #. type: TH
12313 #: build/C/man2/s390_pci_mmio_write.2:25
12314 #, no-wrap
12315 msgid "2015-01-15"
12316 msgstr "2015-01-15"
12317
12318 #. type: Plain text
12319 #: build/C/man2/s390_pci_mmio_write.2:29
12320 msgid ""
12321 "s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO "
12322 "memory page"
12323 msgstr ""
12324
12325 #. type: Plain text
12326 #: build/C/man2/s390_pci_mmio_write.2:32
12327 #, no-wrap
12328 msgid "B<#include E<lt>asm/unistd.hE<gt>>\n"
12329 msgstr "B<#include E<lt>asm/unistd.hE<gt>>\n"
12330
12331 #. type: Plain text
12332 #: build/C/man2/s390_pci_mmio_write.2:35
12333 #, no-wrap
12334 msgid ""
12335 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12336 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12337 msgstr ""
12338 "B<int s390_pci_mmio_write(unsigned long >I<mmio_addr>B<,>\n"
12339 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12340
12341 #. type: Plain text
12342 #: build/C/man2/s390_pci_mmio_write.2:38
12343 #, no-wrap
12344 msgid ""
12345 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12346 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12347 msgstr ""
12348 "B<int s390_pci_mmio_read(unsigned long >I<mmio_addr>B<,>\n"
12349 "B<                        void *>I<user_buffer>B<, size_t >I<length>B<);>\n"
12350
12351 #. type: Plain text
12352 #: build/C/man2/s390_pci_mmio_write.2:57
12353 msgid ""
12354 "The B<s390_pci_mmio_write>()  system call writes I<length> bytes of data "
12355 "from the user-space buffer I<user_buffer> to the PCI MMIO memory location "
12356 "specified by I<mmio_addr>.  The B<s390_pci_mmio_read>()  system call reads "
12357 "I<length> bytes of data from the PCI MMIO memory location specified by "
12358 "I<mmio_addr> to the user-space buffer I<user_buffer>."
12359 msgstr ""
12360
12361 #. type: Plain text
12362 #: build/C/man2/s390_pci_mmio_write.2:68
12363 msgid ""
12364 "These system calls must be used instead of the simple assignment or data-"
12365 "transfer operations that are used to access the PCI MMIO memory areas mapped "
12366 "to user space on the Linux System z platform.  The address specified by "
12367 "I<mmio_addr> must belong to a PCI MMIO memory page mapping in the caller's "
12368 "address space, and the data being written or read must not cross a page "
12369 "boundary.  The I<length> value cannot be greater than the system page size."
12370 msgstr ""
12371
12372 #. type: Plain text
12373 #: build/C/man2/s390_pci_mmio_write.2:77
12374 msgid ""
12375 "On success, B<s390_pci_mmio_write>()  and B<s390_pci_mmio_read>()  return "
12376 "0.  On error, -1 is returned and I<errno> is set to one of the error codes "
12377 "listed below."
12378 msgstr ""
12379 "成功すると、 B<s390_pci_mmio_write>() と B<s390_pci_mmio_read>() は 0 を返"
12380 "す。 エラーの場合、-1 を返し、 I<errno> に以下のリストにあるエラーコードのい"
12381 "ずれかを設定する。"
12382
12383 #. type: Plain text
12384 #: build/C/man2/s390_pci_mmio_write.2:83
12385 msgid "The address in I<mmio_addr> is invalid."
12386 msgstr ""
12387
12388 #. type: Plain text
12389 #: build/C/man2/s390_pci_mmio_write.2:87
12390 msgid ""
12391 "I<user_buffer> does not point to a valid location in the caller's address "
12392 "space."
12393 msgstr ""
12394
12395 #. type: Plain text
12396 #: build/C/man2/s390_pci_mmio_write.2:92
12397 msgid "Invalid I<length> argument."
12398 msgstr ""
12399
12400 #. type: Plain text
12401 #: build/C/man2/s390_pci_mmio_write.2:95
12402 msgid "PCI support is not enabled."
12403 msgstr ""
12404
12405 #. type: Plain text
12406 #: build/C/man2/s390_pci_mmio_write.2:98
12407 msgid "Insufficient memory."
12408 msgstr ""
12409
12410 #. type: Plain text
12411 #: build/C/man2/s390_pci_mmio_write.2:100
12412 msgid "These system calls are available since Linux 3.19."
12413 msgstr "これらのシステムコールは Linux 3.19 以降で使用可能である。"
12414
12415 #. type: Plain text
12416 #: build/C/man2/s390_pci_mmio_write.2:103
12417 msgid ""
12418 "This Linux-specific system call is available only on the s390 architecture.  "
12419 "The required PCI support is available beginning with System z EC12."
12420 msgstr ""
12421
12422 #. type: Plain text
12423 #: build/C/man2/s390_pci_mmio_write.2:107
12424 msgid ""
12425 "Glibc does not provide a wrapper for this system call, use B<syscall>(2)  to "
12426 "call it."
12427 msgstr ""
12428
12429 #. type: Plain text
12430 #: build/C/man2/s390_pci_mmio_write.2:109
12431 msgid "B<syscall>(2)"
12432 msgstr "B<syscall>(2)"
12433
12434 #~ msgid "System-wide limit on the number of pages of shared memory."
12435 #~ msgstr "共有メモリーのページ数のシステム全体での上限値。"
12436
12437 #~ msgid ""
12438 #~ "Segment low boundary address multiple.  Must be page aligned.  For the "
12439 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
12440 #~ msgstr ""
12441 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
12442 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
12443
12444 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
12445 #~ msgstr ""
12446 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
12447
12448 #~ msgid ""
12449 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
12450 #~ "2^20 (2,097,152)."
12451 #~ msgstr ""
12452 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
12453 #~ "(2,097,152) になる。"
12454
12455 #~ msgid ""
12456 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
12457 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
12458 #~ "shmmax>)."
12459 #~ msgstr ""
12460 #~ "共有メモリーセグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
12461 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
12462 #~ "る)。"
12463
12464 #~ msgid ""
12465 #~ "System wide maximum number of shared memory segments: implementation "
12466 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
12467 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
12468 #~ msgstr ""
12469 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
12470 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
12471 #~ "で参照したり、変更したりできる)。"
12472
12473 #~ msgid ""
12474 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
12475 #~ msgstr ""
12476 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
12477 #~ "-1 が返される。"
12478
12479 #~ msgid ""
12480 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
12481 #~ "pair of registers.  On this architecture, the call signature of "
12482 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
12483 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
12484 #~ "2.6.14, ARM defines a different system call that orders the arguments "
12485 #~ "suitably:"
12486 #~ msgstr ""
12487 #~ "ARM アーキテクチャーでは、64 ビットの引き数は適切なレジスターの組に割り当"
12488 #~ "て\n"
12489 #~ "る必要がある。このアーキテクチャーでは、B<posix_fadvise>() の呼び出し方"
12490 #~ "に\n"
12491 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
12492 #~ "パディング (詰めもの) でレジスターが一つ消費されてしまうというものであ"
12493 #~ "る。\n"
12494 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
12495 #~ "システムコールが定義されている。"
12496
12497 #~ msgid ""
12498 #~ "The behavior of this system call is otherwise exactly the same as "
12499 #~ "B<posix_fadvise>().  No library support is provided for this system call "
12500 #~ "in glibc."
12501 #~ msgstr ""
12502 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
12503 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
12504 #~ "では提供されていない。"
12505
12506 #~ msgid ""
12507 #~ "The I<mode> is not supported by the file system containing the file "
12508 #~ "referred to by I<fd>."
12509 #~ msgstr ""
12510 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
12511 #~ "ない。"
12512
12513 #~ msgid ""
12514 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
12515 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
12516 #~ "these handlers."
12517 #~ msgstr ""
12518 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンド"
12519 #~ "ラーを組み込む。 関数 B<muntrace>()  はこれらのハンドラーを解除する。"
12520
12521 #~ msgid ""
12522 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
12523 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
12524 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
12525 #~ "truncated."
12526 #~ msgstr ""
12527 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
12528 #~ "る。 ユーザーが書き込み権限を持つファイルを指定しなければならない。 書き込"
12529 #~ "み権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、"
12530 #~ "ファイルの元の内容を上書きする。"
12531
12532 #~ msgid ""
12533 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
12534 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
12535 #~ msgstr ""
12536 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
12537 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
12538 #~ "リプトが付属している。"
12539
12540 #~ msgid ""
12541 #~ "This flag allocates and initializes to zero the disk space within the "
12542 #~ "range specified by I<offset> and I<len>.  After a successful call, "
12543 #~ "subsequent writes into this range are guaranteed not to fail because of "
12544 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
12545 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
12546 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
12547 #~ "less than I<offset>+I<len>."
12548 #~ msgstr ""
12549 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
12550 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
12551 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
12552 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
12553 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
12554 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
12555 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
12556 #~ "は変更されることはない。"