OSDN Git Service

typo fix: error -> errno
[linuxjm/LDP_man-pages.git] / po4a / memory / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-04 23:49+0900\n"
10 "PO-Revision-Date: 2015-01-05 05:43+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 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
48 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
49 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
50 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
51 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
52 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
53 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
54 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:39
55 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
56 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
57 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
58 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
59 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
60 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
61 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
62 #, no-wrap
63 msgid "Linux Programmer's Manual"
64 msgstr "Linux Programmer's Manual"
65
66 #. type: SH
67 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
68 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
69 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
70 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
71 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
72 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
73 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
74 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:40
75 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
76 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
77 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
78 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
79 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
80 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
81 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
82 #, no-wrap
83 msgid "NAME"
84 msgstr "名前"
85
86 #. type: Plain text
87 #: build/C/man2/alloc_hugepages.2:28
88 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
89 msgstr ""
90 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
91
92 #. type: SH
93 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
94 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
95 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
96 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
97 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
98 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
99 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
100 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:42
101 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
102 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
103 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
104 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
105 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
106 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
107 #, no-wrap
108 msgid "SYNOPSIS"
109 msgstr "書式"
110
111 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
112 #.  unsigned long len, int prot, int flag);
113 #. type: Plain text
114 #: build/C/man2/alloc_hugepages.2:34
115 #, no-wrap
116 msgid ""
117 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
118 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
119 msgstr ""
120 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
121 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
122
123 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
124 #. type: Plain text
125 #: build/C/man2/alloc_hugepages.2:37
126 #, no-wrap
127 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
128 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
129
130 #. type: SH
131 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
132 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
133 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
134 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
135 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
136 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
137 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
138 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:48
139 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
140 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
141 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
142 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
143 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
144 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
145 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
146 #, no-wrap
147 msgid "DESCRIPTION"
148 msgstr "説明"
149
150 #. type: Plain text
151 #: build/C/man2/alloc_hugepages.2:49
152 msgid ""
153 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
154 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
155 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20, "
156 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
157 msgstr ""
158 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
159 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
160 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
161 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
162 "敗する。"
163
164 #. type: Plain text
165 #: build/C/man2/alloc_hugepages.2:57
166 msgid ""
167 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
168 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
169 "several sizes.  These system calls serve to map huge pages into the "
170 "process's memory or to free them again.  Huge pages are locked into memory, "
171 "and are not swapped."
172 msgstr ""
173 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
174 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
175 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
176 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
177 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
178
179 #. type: Plain text
180 #: build/C/man2/alloc_hugepages.2:66
181 msgid ""
182 "The I<key> argument is an identifier.  When zero the pages are private, and "
183 "not inherited by children.  When positive the pages are shared with other "
184 "applications using the same I<key>, and inherited by child processes."
185 msgstr ""
186 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
187 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
188 "れ、子プロセスに継承される。"
189
190 #. type: Plain text
191 #: build/C/man2/alloc_hugepages.2:81
192 msgid ""
193 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
194 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
195 "memory is first actually freed when all users have released it.)  The "
196 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
197 "may not follow.  Addresses must be properly aligned."
198 msgstr ""
199 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
200 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
201 "リを解放したときに、 そのメモリは初めて実際に解放される)。 "
202 "B<alloc_hugepages>()  の I<addr> 引き数はヒントであり、カーネルはそれに従うか"
203 "もしれないし、 従わないかもしれない。 アドレスは正しく配置されなければならな"
204 "い。"
205
206 #. type: Plain text
207 #: build/C/man2/alloc_hugepages.2:86
208 msgid ""
209 "The I<len> argument is the length of the required segment.  It must be a "
210 "multiple of the huge page size."
211 msgstr ""
212 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
213 "ズの倍数にしなければならない。"
214
215 #. type: Plain text
216 #: build/C/man2/alloc_hugepages.2:94
217 msgid ""
218 "The I<prot> argument specifies the memory protection of the segment.  It is "
219 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
220 msgstr ""
221 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
222 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
223
224 #. type: Plain text
225 #: build/C/man2/alloc_hugepages.2:109
226 msgid ""
227 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
228 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
229 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
230 "returned when no segment with the given key exists."
231 msgstr ""
232 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
233 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
234 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
235 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
236 "が返される。"
237
238 #. type: SH
239 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
240 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:228
241 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
242 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
243 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
244 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
245 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:77
246 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
247 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
248 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
249 #: build/C/man2/remap_file_pages.2:132 build/C/man3/shm_open.3:171
250 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:183
251 #: build/C/man2/shmop.2:168 build/C/man2/subpage_prot.2:66
252 #: build/C/man2/sync_file_range.2:141
253 #, no-wrap
254 msgid "RETURN VALUE"
255 msgstr "返り値"
256
257 #. type: Plain text
258 #: build/C/man2/alloc_hugepages.2:118
259 msgid ""
260 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
261 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
262 "is set appropriately."
263 msgstr ""
264 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
265 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
266 "に設定される。"
267
268 #. type: SH
269 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
270 #: build/C/man2/fallocate.2:235 build/C/man2/madvise.2:275
271 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
272 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
273 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:84
274 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
275 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
276 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
277 #: build/C/man2/remap_file_pages.2:139 build/C/man3/shm_open.3:180
278 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:188
279 #: build/C/man2/shmop.2:182 build/C/man2/subpage_prot.2:71
280 #: build/C/man2/sync_file_range.2:147
281 #, no-wrap
282 msgid "ERRORS"
283 msgstr "エラー"
284
285 #. type: TP
286 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:319
287 #, no-wrap
288 msgid "B<ENOSYS>"
289 msgstr "B<ENOSYS>"
290
291 #. type: Plain text
292 #: build/C/man2/alloc_hugepages.2:122
293 msgid "The system call is not supported on this kernel."
294 msgstr "このシステムコールはカーネルでサポートされていない。"
295
296 #. type: SH
297 #: build/C/man2/alloc_hugepages.2:122
298 #, no-wrap
299 msgid "FILES"
300 msgstr "ファイル"
301
302 #. type: Plain text
303 #: build/C/man2/alloc_hugepages.2:126
304 msgid ""
305 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
306 "be read and written."
307 msgstr ""
308 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
309 "み書きできる。"
310
311 #. type: Plain text
312 #: build/C/man2/alloc_hugepages.2:130
313 msgid ""
314 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
315 "their size in the three variables HugePages_Total, HugePages_Free, "
316 "Hugepagesize."
317 msgstr ""
318 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
319 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
320 "る。"
321
322 #. type: SH
323 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
324 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:370
325 #: build/C/man2/madvise.2:332 build/C/man3/mallinfo.3:110
326 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
327 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
328 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:53
329 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
330 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:495 build/C/man2/mmap2.2:77
331 #: build/C/man2/mprotect.2:112 build/C/man2/mremap.2:185
332 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
333 #: build/C/man2/posix_fadvise.2:122 build/C/man3/posix_fallocate.3:108
334 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
335 #: build/C/man2/remap_file_pages.2:161 build/C/man3/shm_open.3:251
336 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:377
337 #: build/C/man2/shmget.2:248 build/C/man2/shmop.2:228
338 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
339 #, no-wrap
340 msgid "CONFORMING TO"
341 msgstr "準拠"
342
343 #. type: Plain text
344 #: build/C/man2/alloc_hugepages.2:133
345 msgid ""
346 "These calls are specific to Linux on Intel processors, and should not be "
347 "used in programs intended to be portable."
348 msgstr ""
349 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
350 "必要なプログラムで使うべきでない。"
351
352 #. type: SH
353 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:78
354 #: build/C/man2/madvise.2:354 build/C/man3/malloc_get_state.3:88
355 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
356 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
357 #: build/C/man3/malloc_usable_size.3:55 build/C/man3/mcheck.3:147
358 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:513 build/C/man2/mmap2.2:79
359 #: build/C/man2/mprotect.2:121 build/C/man2/mremap.2:191
360 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:80
361 #: build/C/man2/posix_fadvise.2:131 build/C/man3/posix_memalign.3:221
362 #: build/C/man2/readahead.2:93 build/C/man2/remap_file_pages.2:165
363 #: build/C/man3/shm_open.3:257 build/C/man7/shm_overview.7:103
364 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:256
365 #: build/C/man2/shmop.2:243 build/C/man2/subpage_prot.2:98
366 #: build/C/man2/sync_file_range.2:183
367 #, no-wrap
368 msgid "NOTES"
369 msgstr "注意"
370
371 #. type: Plain text
372 #: build/C/man2/alloc_hugepages.2:141
373 msgid ""
374 "These system calls are gone; they existed only in Linux 2.5.36 through to "
375 "2.5.54.  Now the hugetlbfs filesystem can be used instead.  Memory backed by "
376 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
377 "map files in this virtual filesystem."
378 msgstr ""
379 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
380 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
381 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
382 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
383
384 #. type: Plain text
385 #: build/C/man2/alloc_hugepages.2:145
386 msgid ""
387 "The maximal number of huge pages can be specified using the B<hugepages=> "
388 "boot parameter."
389 msgstr ""
390 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
391
392 #. type: SH
393 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
394 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:378
395 #: build/C/man2/madvise.2:388 build/C/man3/mallinfo.3:279
396 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
397 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
398 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:69
399 #: build/C/man3/mallopt.3:568 build/C/man3/mcheck.3:208
400 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:736 build/C/man2/mmap2.2:101
401 #: build/C/man2/mprotect.2:228 build/C/man2/mremap.2:214
402 #: build/C/man2/msync.2:151 build/C/man3/mtrace.3:172
403 #: build/C/man2/posix_fadvise.2:215 build/C/man3/posix_fallocate.3:138
404 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
405 #: build/C/man2/remap_file_pages.2:183 build/C/man3/shm_open.3:282
406 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
407 #: build/C/man2/shmget.2:389 build/C/man2/shmop.2:301
408 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:227
409 #, no-wrap
410 msgid "COLOPHON"
411 msgstr "この文書について"
412
413 #. type: Plain text
414 #: build/C/man2/alloc_hugepages.2:158 build/C/man3/alloca.3:170
415 #: build/C/man2/cacheflush.2:97 build/C/man2/fallocate.2:386
416 #: build/C/man2/madvise.2:396 build/C/man3/mallinfo.3:287
417 #: build/C/man3/malloc_get_state.3:122 build/C/man3/malloc_hook.3:150
418 #: build/C/man3/malloc_info.3:270 build/C/man3/malloc_stats.3:75
419 #: build/C/man3/malloc_trim.3:90 build/C/man3/malloc_usable_size.3:77
420 #: build/C/man3/mallopt.3:576 build/C/man3/mcheck.3:216
421 #: build/C/man2/mlock.2:351 build/C/man2/mmap.2:744 build/C/man2/mmap2.2:109
422 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:222
423 #: build/C/man2/msync.2:159 build/C/man3/mtrace.3:180
424 #: build/C/man2/posix_fadvise.2:223 build/C/man3/posix_fallocate.3:146
425 #: build/C/man3/posix_memalign.3:285 build/C/man2/readahead.2:121
426 #: build/C/man2/remap_file_pages.2:191 build/C/man3/shm_open.3:290
427 #: build/C/man7/shm_overview.7:135 build/C/man2/shmctl.2:443
428 #: build/C/man2/shmget.2:397 build/C/man2/shmop.2:309
429 #: build/C/man2/subpage_prot.2:142 build/C/man2/sync_file_range.2:235
430 msgid ""
431 "This page is part of release 3.76 of the Linux I<man-pages> project.  A "
432 "description of the project, information about reporting bugs, and the latest "
433 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
434 "pages/."
435 msgstr ""
436 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.76 の一部\n"
437 "である。プロジェクトの説明とバグ報告に関する情報は\n"
438 "http://www.kernel.org/doc/man-pages/ に書かれている。"
439
440 #. type: TH
441 #: build/C/man3/alloca.3:43
442 #, no-wrap
443 msgid "ALLOCA"
444 msgstr "ALLOCA"
445
446 #. type: TH
447 #: build/C/man3/alloca.3:43
448 #, no-wrap
449 msgid "2013-10-07"
450 msgstr "2013-10-07"
451
452 #. type: TH
453 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
454 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
455 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
456 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
457 #: build/C/man3/posix_memalign.3:29
458 #, no-wrap
459 msgid "GNU"
460 msgstr "GNU"
461
462 #. type: Plain text
463 #: build/C/man3/alloca.3:46
464 msgid "alloca - allocate memory that is automatically freed"
465 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
466
467 #. type: Plain text
468 #: build/C/man3/alloca.3:48
469 msgid "B<#include E<lt>alloca.hE<gt>>"
470 msgstr "B<#include E<lt>alloca.hE<gt>>"
471
472 #. type: Plain text
473 #: build/C/man3/alloca.3:50
474 msgid "B<void *alloca(size_t >I<size>B<);>"
475 msgstr "B<void *alloca(size_t >I<size>B<);>"
476
477 #. type: Plain text
478 #: build/C/man3/alloca.3:60
479 msgid ""
480 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
481 "frame of the caller.  This temporary space is automatically freed when the "
482 "function that called B<alloca>()  returns to its caller."
483 msgstr ""
484 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
485 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
486 "に自動的に解放される。"
487
488 #. type: Plain text
489 #: build/C/man3/alloca.3:65
490 msgid ""
491 "The B<alloca>()  function returns a pointer to the beginning of the "
492 "allocated space.  If the allocation causes stack overflow, program behavior "
493 "is undefined."
494 msgstr ""
495 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
496 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
497 "い。"
498
499 #. type: SH
500 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
501 #: build/C/man3/posix_fallocate.3:103
502 #, no-wrap
503 msgid "ATTRIBUTES"
504 msgstr "属性"
505
506 #. type: SS
507 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
508 #: build/C/man3/posix_fallocate.3:104
509 #, no-wrap
510 msgid "Multithreading (see pthreads(7))"
511 msgstr "マルチスレッディング (pthreads(7) 参照)"
512
513 #. type: Plain text
514 #: build/C/man3/alloca.3:70
515 msgid "The B<alloca>()  function is thread-safe."
516 msgstr "B<alloca>() 関数はスレッドセーフである。"
517
518 #. type: Plain text
519 #: build/C/man3/alloca.3:72
520 msgid "This function is not in POSIX.1-2001."
521 msgstr "この関数は POSIX.1-2001 にはない。"
522
523 #. type: Plain text
524 #: build/C/man3/alloca.3:78
525 msgid ""
526 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
527 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
528 "the GNU version."
529 msgstr ""
530 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
531 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
532 "は POSIX.1-2001 にはない。"
533
534 #. type: Plain text
535 #: build/C/man3/alloca.3:93
536 msgid ""
537 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
538 "applications, its use can improve efficiency compared to the use of "
539 "B<malloc>(3)  plus B<free>(3).  In certain cases, it can also simplify "
540 "memory deallocation in applications that use B<longjmp>(3)  or "
541 "B<siglongjmp>(3).  Otherwise, its use is discouraged."
542 msgstr ""
543 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
544 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
545 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
546 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
547 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
548
549 #. type: Plain text
550 #: build/C/man3/alloca.3:102
551 msgid ""
552 "Because the space allocated by B<alloca>()  is allocated within the stack "
553 "frame, that space is automatically freed if the function return is jumped "
554 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
555 msgstr ""
556 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
557 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
558 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
559
560 #. type: Plain text
561 #: build/C/man3/alloca.3:107
562 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
563 msgstr ""
564 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
565 "に!"
566
567 #. type: SS
568 #: build/C/man3/alloca.3:107
569 #, no-wrap
570 msgid "Notes on the GNU version"
571 msgstr "GNU 版についての注意"
572
573 #. type: Plain text
574 #: build/C/man3/alloca.3:129
575 msgid ""
576 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
577 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
578 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
579 "included.  Otherwise, (without an -ansi or -std=c* option) the glibc version "
580 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
581 "the lines:"
582 msgstr ""
583 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
584 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
585 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
586 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
587 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
588 "インクルードするが、このファイルには以下の行が含まれており、"
589
590 #. type: Plain text
591 #: build/C/man3/alloca.3:134
592 #, no-wrap
593 msgid ""
594 "    #ifdef  __GNUC__\n"
595 "    #define alloca(size)   __builtin_alloca (size)\n"
596 "    #endif\n"
597 msgstr ""
598 "    #ifdef  __GNUC__\n"
599 "    #define alloca(size)   __builtin_alloca (size)\n"
600 "    #endif\n"
601
602 #. type: Plain text
603 #: build/C/man3/alloca.3:137
604 msgid "with messy consequences if one has a private version of this function."
605 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
606
607 #. type: Plain text
608 #: build/C/man3/alloca.3:141
609 msgid ""
610 "The fact that the code is inlined means that it is impossible to take the "
611 "address of this function, or to change its behavior by linking with a "
612 "different library."
613 msgstr ""
614 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
615 "のライブラリをリンクして動作を変更することはできない。"
616
617 #. type: Plain text
618 #: build/C/man3/alloca.3:145
619 msgid ""
620 "The inlined code often consists of a single instruction adjusting the stack "
621 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
622 "error return."
623 msgstr ""
624 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
625 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
626 "よって NULL エラーが返されることはない。"
627
628 #. type: SH
629 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
630 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
631 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:586 build/C/man3/mtrace.3:102
632 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
633 #: build/C/man2/shmget.2:375
634 #, no-wrap
635 msgid "BUGS"
636 msgstr "バグ"
637
638 #. type: Plain text
639 #: build/C/man3/alloca.3:150
640 msgid ""
641 "There is no error indication if the stack frame cannot be extended.  "
642 "(However, after a failed allocation, the program is likely to receive a "
643 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
644 msgstr ""
645 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
646 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
647 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
648
649 #. type: Plain text
650 #: build/C/man3/alloca.3:158
651 msgid ""
652 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
653 "a function call, because the stack space reserved by B<alloca>()  would "
654 "appear on the stack in the middle of the space for the function arguments."
655 msgstr ""
656 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
657 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
658 "使われるスタック領域の中に現れてしまうためである。"
659
660 #. type: SH
661 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:373
662 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
663 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
664 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
665 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
666 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
667 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:711 build/C/man2/mmap2.2:95
668 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
669 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
670 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:133
671 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
672 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
673 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
674 #: build/C/man2/shmget.2:381 build/C/man2/shmop.2:293
675 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
676 #, no-wrap
677 msgid "SEE ALSO"
678 msgstr "関連項目"
679
680 #. type: Plain text
681 #: build/C/man3/alloca.3:162
682 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
683 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
684
685 #. type: TH
686 #: build/C/man2/cacheflush.2:25
687 #, no-wrap
688 msgid "CACHEFLUSH"
689 msgstr "CACHEFLUSH"
690
691 #. type: TH
692 #: build/C/man2/cacheflush.2:25
693 #, no-wrap
694 msgid "2007-05-26"
695 msgstr "2007-05-26"
696
697 #. type: Plain text
698 #: build/C/man2/cacheflush.2:28
699 msgid "cacheflush - flush contents of instruction and/or data cache"
700 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
701
702 #. type: Plain text
703 #: build/C/man2/cacheflush.2:31
704 #, no-wrap
705 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
706 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
707
708 #. type: Plain text
709 #: build/C/man2/cacheflush.2:33
710 #, no-wrap
711 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
712 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
713
714 #. type: Plain text
715 #: build/C/man2/cacheflush.2:43
716 msgid ""
717 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
718 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
719 "of:"
720 msgstr ""
721 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
722 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
723 "指定する:"
724
725 #. type: TP
726 #: build/C/man2/cacheflush.2:43
727 #, no-wrap
728 msgid "B<ICACHE>"
729 msgstr "B<ICACHE>"
730
731 #. type: Plain text
732 #: build/C/man2/cacheflush.2:46
733 msgid "Flush the instruction cache."
734 msgstr "命令 (instruction) キャッシュをフラッシュする。"
735
736 #. type: TP
737 #: build/C/man2/cacheflush.2:46
738 #, no-wrap
739 msgid "B<DCACHE>"
740 msgstr "B<DCACHE>"
741
742 #. type: Plain text
743 #: build/C/man2/cacheflush.2:49
744 msgid "Write back to memory and invalidate the affected valid cache lines."
745 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
746
747 #. type: TP
748 #: build/C/man2/cacheflush.2:49
749 #, no-wrap
750 msgid "B<BCACHE>"
751 msgstr "B<BCACHE>"
752
753 #. type: Plain text
754 #: build/C/man2/cacheflush.2:53
755 msgid "Same as B<(ICACHE|DCACHE)>."
756 msgstr "B<(ICACHE|DCACHE)> と同じ。"
757
758 #. type: Plain text
759 #: build/C/man2/cacheflush.2:59
760 msgid ""
761 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
762 "detected, I<errno> will indicate the error."
763 msgstr ""
764 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
765 "出された場合は I<errno> にエラーが指示される。"
766
767 #. type: TP
768 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
769 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
770 #: build/C/man2/subpage_prot.2:72
771 #, no-wrap
772 msgid "B<EFAULT>"
773 msgstr "B<EFAULT>"
774
775 #. type: Plain text
776 #: build/C/man2/cacheflush.2:67
777 msgid ""
778 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
779 "accessible."
780 msgstr ""
781 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
782 "能ではない。"
783
784 #. type: TP
785 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
786 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
787 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
788 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
789 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
790 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
791 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
792 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
793 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
794 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
795 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
796 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
797 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
798 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
799 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
800 #, no-wrap
801 msgid "B<EINVAL>"
802 msgstr "B<EINVAL>"
803
804 #. type: Plain text
805 #: build/C/man2/cacheflush.2:75
806 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
807 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
808
809 #.  FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
810 #.  but by now it is on a number of other architectures (but not i386).
811 #.  Investigate the details and update this page.
812 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
813 #. type: Plain text
814 #: build/C/man2/cacheflush.2:82
815 msgid ""
816 "This Linux-specific system call is available only on MIPS-based systems.  It "
817 "should not be used in programs intended to be portable."
818 msgstr ""
819 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
820 "植を意図したプログラムで使用すべきではない。"
821
822 #. type: Plain text
823 #: build/C/man2/cacheflush.2:89
824 msgid ""
825 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
826 "Therefore, the whole cache is always flushed."
827 msgstr ""
828 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
829 "のキャッシュがフラッシュされる。"
830
831 #. type: TH
832 #: build/C/man2/fallocate.2:11
833 #, no-wrap
834 msgid "FALLOCATE"
835 msgstr "FALLOCATE"
836
837 #. type: TH
838 #: build/C/man2/fallocate.2:11 build/C/man3/mallopt.3:26
839 #: build/C/man2/shmop.2:41
840 #, no-wrap
841 msgid "2014-07-08"
842 msgstr "2014-07-08"
843
844 #. type: Plain text
845 #: build/C/man2/fallocate.2:14
846 msgid "fallocate - manipulate file space"
847 msgstr "fallocate - ファイル空間の操作"
848
849 #. type: Plain text
850 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
851 #, no-wrap
852 msgid ""
853 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
854 "B<#include E<lt>fcntl.hE<gt>>\n"
855 msgstr ""
856 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
857 "B<#include E<lt>fcntl.hE<gt>>\n"
858
859 #. type: Plain text
860 #: build/C/man2/fallocate.2:21
861 #, no-wrap
862 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
863 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
864
865 #. type: Plain text
866 #: build/C/man2/fallocate.2:27
867 msgid ""
868 "This is a nonportable, Linux-specific system call.  For the portable, "
869 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
870 "B<posix_fallocate>(3)."
871 msgstr ""
872 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
873 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
874 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
875
876 #. type: Plain text
877 #: build/C/man2/fallocate.2:37
878 msgid ""
879 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
880 "space for the file referred to by I<fd> for the byte range starting at "
881 "I<offset> and continuing for I<len> bytes."
882 msgstr ""
883 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
884 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
885 "域である。"
886
887 #. type: Plain text
888 #: build/C/man2/fallocate.2:42
889 msgid ""
890 "The I<mode> argument determines the operation to be performed on the given "
891 "range.  Details of the supported operations are given in the subsections "
892 "below."
893 msgstr ""
894 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
895 "サポートされている操作の詳細は以下のサブセクションで説明する。"
896
897 #. type: SS
898 #: build/C/man2/fallocate.2:42
899 #, no-wrap
900 msgid "Allocating disk space"
901 msgstr "ディスク領域の割り当て"
902
903 #. type: Plain text
904 #: build/C/man2/fallocate.2:65
905 msgid ""
906 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
907 "the disk space within the range specified by I<offset> and I<len>.  The file "
908 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
909 "greater than the file size.  Any subregion within the range specified by "
910 "I<offset> and I<len> that did not contain data before the call will be "
911 "initialized to zero.  This default behavior closely resembles the behavior "
912 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
913 "of optimally implementing that function."
914 msgstr ""
915 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
916 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
917 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
918 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
919 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
920 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
921 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
922 "適に実装する手段を提供することを目的としているからである。"
923
924 #. type: Plain text
925 #: build/C/man2/fallocate.2:71
926 msgid ""
927 "After a successful call, subsequent writes into the range specified by "
928 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
929 "space."
930 msgstr ""
931 "呼び出しが成功した場合、\n"
932 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
933 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
934
935 #. type: Plain text
936 #: build/C/man2/fallocate.2:82
937 msgid ""
938 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
939 "the call is similar, but the file size will not be changed even if I<offset>"
940 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
941 "the end of the file in this manner is useful for optimizing append workloads."
942 msgstr ""
943 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
944 "ル\n"
945 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
946 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
947 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
948 "追記を最適化したい場合に役に立つ。"
949
950 #. type: Plain text
951 #: build/C/man2/fallocate.2:86
952 msgid ""
953 "Because allocation is done in block size chunks, B<fallocate>()  may "
954 "allocate a larger range of disk space than was specified."
955 msgstr ""
956 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
957 "り\n"
958 "も大きなディスク領域を割り当てることがある。"
959
960 #. type: SS
961 #: build/C/man2/fallocate.2:86
962 #, no-wrap
963 msgid "Deallocating file space"
964 msgstr "ファイル空間の割り当て解除"
965
966 #. type: Plain text
967 #: build/C/man2/fallocate.2:101
968 msgid ""
969 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
970 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
971 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
972 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
973 "removed from the file.  After a successful call, subsequent reads from this "
974 "range will return zeroes."
975 msgstr ""
976 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
977 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
978 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
979 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
980 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
981 "を返す。"
982
983 #. type: Plain text
984 #: build/C/man2/fallocate.2:112
985 msgid ""
986 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
987 "I<mode>; in other words, even when punching off the end of the file, the "
988 "file size (as reported by B<stat>(2))  does not change."
989 msgstr ""
990 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
991 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
992 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
993
994 #. type: Plain text
995 #: build/C/man2/fallocate.2:117
996 msgid ""
997 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
998 "support the operation, an error is returned.  The operation is supported on "
999 "at least the following filesystems:"
1000 msgstr ""
1001 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1002 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1003 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1004
1005 #. type: IP
1006 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1007 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1008 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1009 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1010 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1011 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1012 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1013 #: build/C/man2/shmop.2:80
1014 #, no-wrap
1015 msgid "*"
1016 msgstr "*"
1017
1018 #. type: Plain text
1019 #: build/C/man2/fallocate.2:119
1020 msgid "XFS (since Linux 2.6.38)"
1021 msgstr "XFS (Linux 2.6.38 以降)"
1022
1023 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1024 #. type: Plain text
1025 #: build/C/man2/fallocate.2:122
1026 msgid "ext4 (since Linux 3.0)"
1027 msgstr "ext4 (Linux 3.0 以降)"
1028
1029 #. type: Plain text
1030 #: build/C/man2/fallocate.2:124
1031 msgid "Btrfs (since Linux 3.7)"
1032 msgstr "Btrfs (Linux 3.7 以降)"
1033
1034 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1035 #. type: Plain text
1036 #: build/C/man2/fallocate.2:127
1037 msgid "tmpfs (since Linux 3.5)"
1038 msgstr "tmpfs (Linux 3.5 以降)"
1039
1040 #. type: SS
1041 #: build/C/man2/fallocate.2:127
1042 #, no-wrap
1043 msgid "Collapsing file space"
1044 msgstr "ファイル空間の一部削除"
1045
1046 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1047 #. type: Plain text
1048 #: build/C/man2/fallocate.2:147
1049 msgid ""
1050 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1051 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1052 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1053 "bytes.  At the completion of the operation, the contents of the file "
1054 "starting at the location I<offset+len> will be appended at the location "
1055 "I<offset>, and the file will be I<len> bytes smaller."
1056 msgstr ""
1057 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1058 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残ら"
1059 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1060 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1061 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1062 "くなる。"
1063
1064 #. type: Plain text
1065 #: build/C/man2/fallocate.2:161
1066 msgid ""
1067 "A filesystem may place limitations on the granularity of the operation, in "
1068 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1069 "must be a multiple of the filesystem logical block size, which varies "
1070 "according to the filesystem type and configuration.  If a filesystem has "
1071 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1072 "this requirement is violated."
1073 msgstr ""
1074 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1075 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1076 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1077 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1078 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1079
1080 #. type: Plain text
1081 #: build/C/man2/fallocate.2:170
1082 msgid ""
1083 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1084 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1085 "file."
1086 msgstr ""
1087 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1088 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1089 "B<ftruncate>(2) を使用すること。"
1090
1091 #. type: Plain text
1092 #: build/C/man2/fallocate.2:175
1093 msgid ""
1094 "No other flags may be specified in I<mode> in conjunction with "
1095 "B<FALLOC_FL_COLLAPSE_RANGE>."
1096 msgstr ""
1097 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1098 "ない。"
1099
1100 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1101 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1102 #. type: Plain text
1103 #: build/C/man2/fallocate.2:183
1104 msgid ""
1105 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1106 "extent-based files)  and XFS."
1107 msgstr ""
1108 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1109 "ファイル) と XFS でサポートされている。"
1110
1111 #. type: SS
1112 #: build/C/man2/fallocate.2:183
1113 #, no-wrap
1114 msgid "Zeroing file space"
1115 msgstr "ファイル空間のゼロ埋め"
1116
1117 #.  commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1118 #. type: Plain text
1119 #: build/C/man2/fallocate.2:199
1120 #, fuzzy
1121 #| msgid ""
1122 #| "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux "
1123 #| "2.6.38) in I<mode> deallocates space (i.e., creates a hole)  in the byte "
1124 #| "range starting at I<offset> and continuing for I<len> bytes.  Within the "
1125 #| "specified range, partial filesystem blocks are zeroed, and whole "
1126 #| "filesystem blocks are removed from the file.  After a successful call, "
1127 #| "subsequent reads from this range will return zeroes."
1128 msgid ""
1129 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14)  in "
1130 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1131 "for I<len> bytes.  Within the specified range, blocks are preallocated for "
1132 "the regions that span the holes in the file.  After a successful call, "
1133 "subsequent reads from this range will return zeroes."
1134 msgstr ""
1135 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
1136 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1137 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1138 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1139 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1140 "を返す。"
1141
1142 #. type: Plain text
1143 #: build/C/man2/fallocate.2:205
1144 msgid ""
1145 "Zeroing is done within the filesystem preferably by converting the range "
1146 "into unwritten extents.  This approach means that the specified range will "
1147 "not be physically zeroed out on the device (except for partial blocks at the "
1148 "either end of the range), and I/O is (otherwise) required only to update "
1149 "metadata."
1150 msgstr ""
1151
1152 #. type: Plain text
1153 #: build/C/man2/fallocate.2:217
1154 #, fuzzy
1155 #| msgid ""
1156 #| "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior "
1157 #| "of the call is similar, but the file size will not be changed even if "
1158 #| "I<offset>+I<len> is greater than the file size.  Preallocating zeroed "
1159 #| "blocks beyond the end of the file in this manner is useful for optimizing "
1160 #| "append workloads."
1161 msgid ""
1162 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1163 "behavior of the call is similar, but the file size will not be changed even "
1164 "if I<offset>+I<len> is greater than the file size.  This behavior is the "
1165 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1166 msgstr ""
1167 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
1168 "ル\n"
1169 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
1170 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
1171 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
1172 "追記を最適化したい場合に役に立つ。"
1173
1174 #. type: Plain text
1175 #: build/C/man2/fallocate.2:222
1176 msgid ""
1177 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1178 "support the operation, an error is returned.  The operation is supported on "
1179 "at least the following filesystems:"
1180 msgstr ""
1181 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1182 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1183 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1184
1185 #.  commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1186 #. type: Plain text
1187 #: build/C/man2/fallocate.2:225
1188 msgid "XFS (since Linux 3.14)"
1189 msgstr "XFS (Linux 3.14 以降)"
1190
1191 #.  commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1192 #. type: Plain text
1193 #: build/C/man2/fallocate.2:228
1194 #, fuzzy
1195 #| msgid "ext4 (since Linux 3.0)"
1196 msgid "ext4, for extent-based files (since Linux 3.14)"
1197 msgstr "ext4 (Linux 3.0 以降)"
1198
1199 #. type: Plain text
1200 #: build/C/man2/fallocate.2:235
1201 msgid ""
1202 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1203 "I<errno> is set to indicate the error."
1204 msgstr "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1205
1206 #. type: TP
1207 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1208 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1209 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1210 #: build/C/man2/sync_file_range.2:148
1211 #, no-wrap
1212 msgid "B<EBADF>"
1213 msgstr "B<EBADF>"
1214
1215 #. type: Plain text
1216 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1217 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1218 msgstr ""
1219 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1220 "いない。"
1221
1222 #. type: TP
1223 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1224 #, no-wrap
1225 msgid "B<EFBIG>"
1226 msgstr "B<EFBIG>"
1227
1228 #. type: Plain text
1229 #: build/C/man2/fallocate.2:244
1230 msgid "I<offset>+I<len> exceeds the maximum file size."
1231 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1232
1233 #. type: TP
1234 #: build/C/man2/fallocate.2:244
1235 #, no-wrap
1236 msgid "B<EINTR>"
1237 msgstr "B<EINTR>"
1238
1239 #. type: Plain text
1240 #: build/C/man2/fallocate.2:247
1241 msgid "A signal was caught during execution."
1242 msgstr "実行中にシグナルが捕捉された。"
1243
1244 #. type: Plain text
1245 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1246 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1247 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1248
1249 #. type: Plain text
1250 #: build/C/man2/fallocate.2:269
1251 msgid ""
1252 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1253 "plus I<len> reaches or passes the end of the file."
1254 msgstr ""
1255 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1256 "範囲がファイルの末尾かそれより先まで達している。"
1257
1258 #. type: Plain text
1259 #: build/C/man2/fallocate.2:279
1260 msgid ""
1261 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1262 "not a multiple of the filesystem block size."
1263 msgstr ""
1264 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1265 "がファイルシステムのブロックサイズの倍数ではない。"
1266
1267 #. type: Plain text
1268 #: build/C/man2/fallocate.2:287
1269 msgid ""
1270 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1271 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1272 msgstr ""
1273 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1274 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1275
1276 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1277 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1278 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1279 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1280 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1281 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1282 #.  Date: 2014-04-17 13:40:05 GMT
1283 #. type: Plain text
1284 #: build/C/man2/fallocate.2:304
1285 msgid ""
1286 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1287 "file referred to by I<fd> is not a regular file."
1288 msgstr ""
1289 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1290 "I<fd> が参照しているファイルが通常のファイルではない。"
1291
1292 #. type: TP
1293 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1294 #: build/C/man2/sync_file_range.2:160
1295 #, no-wrap
1296 msgid "B<EIO>"
1297 msgstr "B<EIO>"
1298
1299 #. type: Plain text
1300 #: build/C/man2/fallocate.2:307
1301 msgid "An I/O error occurred while reading from or writing to a filesystem."
1302 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1303
1304 #. type: TP
1305 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1306 #: build/C/man3/posix_fallocate.3:87
1307 #, no-wrap
1308 msgid "B<ENODEV>"
1309 msgstr "B<ENODEV>"
1310
1311 #. type: Plain text
1312 #: build/C/man2/fallocate.2:314
1313 msgid ""
1314 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1315 "or FIFO, a different error results.)"
1316 msgstr ""
1317 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1318 "を参照している場合、別のエラーが発生する)。"
1319
1320 #. type: TP
1321 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1322 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1323 #, no-wrap
1324 msgid "B<ENOSPC>"
1325 msgstr "B<ENOSPC>"
1326
1327 #. type: Plain text
1328 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1329 msgid ""
1330 "There is not enough space left on the device containing the file referred to "
1331 "by I<fd>."
1332 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1333
1334 #. type: Plain text
1335 #: build/C/man2/fallocate.2:323
1336 msgid "This kernel does not implement B<fallocate>()."
1337 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1338
1339 #. type: TP
1340 #: build/C/man2/fallocate.2:323
1341 #, no-wrap
1342 msgid "B<EOPNOTSUPP>"
1343 msgstr "B<EOPNOTSUPP>"
1344
1345 #. type: Plain text
1346 #: build/C/man2/fallocate.2:332
1347 msgid ""
1348 "The filesystem containing the file referred to by I<fd> does not support "
1349 "this operation; or the I<mode> is not supported by the filesystem containing "
1350 "the file referred to by I<fd>."
1351 msgstr ""
1352 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1353 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1354 "I<mode> をサポートしていない。"
1355
1356 #. type: TP
1357 #: build/C/man2/fallocate.2:332 build/C/man2/mlock.2:143
1358 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1359 #: build/C/man2/shmget.2:241
1360 #, no-wrap
1361 msgid "B<EPERM>"
1362 msgstr "B<EPERM>"
1363
1364 #. type: Plain text
1365 #: build/C/man2/fallocate.2:350
1366 msgid ""
1367 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1368 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1369 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1370 msgstr ""
1371 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1372 "(B<chattr>(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> か "
1373 "B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルに追加の"
1374 "み (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1375
1376 #. type: TP
1377 #: build/C/man2/fallocate.2:350 build/C/man2/posix_fadvise.2:97
1378 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1379 #, no-wrap
1380 msgid "B<ESPIPE>"
1381 msgstr "B<ESPIPE>"
1382
1383 #. type: Plain text
1384 #: build/C/man2/fallocate.2:354
1385 msgid "I<fd> refers to a pipe or FIFO."
1386 msgstr "I<fd> がパイプか FIFO を参照している。"
1387
1388 #. type: TP
1389 #: build/C/man2/fallocate.2:354 build/C/man2/mmap.2:467
1390 #, no-wrap
1391 msgid "B<ETXTBSY>"
1392 msgstr "B<ETXTBSY>"
1393
1394 #. type: Plain text
1395 #: build/C/man2/fallocate.2:362
1396 msgid ""
1397 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1398 "I<fd> is currently being executed."
1399 msgstr ""
1400 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1401 "イルは現在実行中である。"
1402
1403 #. type: SH
1404 #: build/C/man2/fallocate.2:362 build/C/man2/madvise.2:325
1405 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1406 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1407 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1408 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1409 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1410 #: build/C/man2/sync_file_range.2:177
1411 #, no-wrap
1412 msgid "VERSIONS"
1413 msgstr "バージョン"
1414
1415 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1416 #. type: Plain text
1417 #: build/C/man2/fallocate.2:370
1418 msgid ""
1419 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1420 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1421 "in glibc headers only since version 2.18."
1422 msgstr ""
1423 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1424 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1425 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1426
1427 #. type: Plain text
1428 #: build/C/man2/fallocate.2:373
1429 msgid "B<fallocate>()  is Linux-specific."
1430 msgstr "B<fallocate>()  は Linux 固有である。"
1431
1432 #. type: Plain text
1433 #: build/C/man2/fallocate.2:378
1434 msgid ""
1435 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1436 msgstr ""
1437 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1438
1439 #. type: TH
1440 #: build/C/man2/madvise.2:35
1441 #, no-wrap
1442 msgid "MADVISE"
1443 msgstr "MADVISE"
1444
1445 #. type: TH
1446 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1447 #, no-wrap
1448 msgid "2014-12-31"
1449 msgstr "2014-12-31"
1450
1451 #. type: Plain text
1452 #: build/C/man2/madvise.2:38
1453 msgid "madvise - give advice about use of memory"
1454 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1455
1456 #. type: Plain text
1457 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1458 #: build/C/man3/shm_open.3:31
1459 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1460 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1461
1462 #. type: Plain text
1463 #: build/C/man2/madvise.2:42
1464 msgid ""
1465 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1466 msgstr ""
1467 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1468
1469 #. type: Plain text
1470 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1471 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1472 msgid ""
1473 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1474 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1475
1476 #. type: Plain text
1477 #: build/C/man2/madvise.2:50
1478 msgid "B<madvise>(): _BSD_SOURCE"
1479 msgstr "B<madvise>(): _BSD_SOURCE"
1480
1481 #. type: Plain text
1482 #: build/C/man2/madvise.2:68
1483 msgid ""
1484 "The B<madvise>()  system call advises the kernel about how to handle paging "
1485 "input/output in the address range beginning at address I<addr> and with size "
1486 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1487 "to use some mapped or shared memory areas, so that the kernel can choose "
1488 "appropriate read-ahead and caching techniques.  This call does not influence "
1489 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1490 "but may influence its performance.  The kernel is free to ignore the advice."
1491 msgstr ""
1492 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1493 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1494 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1495 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1496 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1497 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1498 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1499
1500 #. type: Plain text
1501 #: build/C/man2/madvise.2:72
1502 msgid "The advice is indicated in the I<advice> argument which can be"
1503 msgstr ""
1504 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1505
1506 #. type: TP
1507 #: build/C/man2/madvise.2:72
1508 #, no-wrap
1509 msgid "B<MADV_NORMAL>"
1510 msgstr "B<MADV_NORMAL>"
1511
1512 #. type: Plain text
1513 #: build/C/man2/madvise.2:76
1514 msgid "No special treatment.  This is the default."
1515 msgstr "特別な扱いは行わない。これがデフォルトである。"
1516
1517 #. type: TP
1518 #: build/C/man2/madvise.2:76
1519 #, no-wrap
1520 msgid "B<MADV_RANDOM>"
1521 msgstr "B<MADV_RANDOM>"
1522
1523 #. type: Plain text
1524 #: build/C/man2/madvise.2:80
1525 msgid ""
1526 "Expect page references in random order.  (Hence, read ahead may be less "
1527 "useful than normally.)"
1528 msgstr ""
1529 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1530 "なさそうだ。)"
1531
1532 #. type: TP
1533 #: build/C/man2/madvise.2:80
1534 #, no-wrap
1535 msgid "B<MADV_SEQUENTIAL>"
1536 msgstr "B<MADV_SEQUENTIAL>"
1537
1538 #. type: Plain text
1539 #: build/C/man2/madvise.2:85
1540 msgid ""
1541 "Expect page references in sequential order.  (Hence, pages in the given "
1542 "range can be aggressively read ahead, and may be freed soon after they are "
1543 "accessed.)"
1544 msgstr ""
1545 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1546 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1547 "して良い。)"
1548
1549 #. type: TP
1550 #: build/C/man2/madvise.2:85
1551 #, no-wrap
1552 msgid "B<MADV_WILLNEED>"
1553 msgstr "B<MADV_WILLNEED>"
1554
1555 #. type: Plain text
1556 #: build/C/man2/madvise.2:89
1557 msgid ""
1558 "Expect access in the near future.  (Hence, it might be a good idea to read "
1559 "some pages ahead.)"
1560 msgstr ""
1561 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1562 "ておくといいだろう。)"
1563
1564 #. type: TP
1565 #: build/C/man2/madvise.2:89
1566 #, no-wrap
1567 msgid "B<MADV_DONTNEED>"
1568 msgstr "B<MADV_DONTNEED>"
1569
1570 #. type: Plain text
1571 #: build/C/man2/madvise.2:100
1572 msgid ""
1573 "Do not expect access in the near future.  (For the time being, the "
1574 "application is finished with the given range, so the kernel can free "
1575 "resources associated with it.)  Subsequent accesses of pages in this range "
1576 "will succeed, but will result either in reloading of the memory contents "
1577 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1578 "pages for mappings without an underlying file."
1579 msgstr ""
1580 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1581 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1582 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1583 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1584 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1585 "なる。"
1586
1587 #. type: TP
1588 #: build/C/man2/madvise.2:100
1589 #, no-wrap
1590 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1591 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1592
1593 #.  2.6.18-rc5
1594 #.  Databases want to use this feature to drop a section of their
1595 #.  bufferpool (shared memory segments) - without writing back to
1596 #.  disk/swap space.  This feature is also useful for supporting
1597 #.  hot-plug memory on UML.
1598 #. type: Plain text
1599 #: build/C/man2/madvise.2:113
1600 msgid ""
1601 "Free up a given range of pages and its associated backing store.  Currently, "
1602 "only shmfs/tmpfs supports this; other filesystems return with the error "
1603 "B<ENOSYS>."
1604 msgstr ""
1605 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1606 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1607 "返される。"
1608
1609 #. type: TP
1610 #: build/C/man2/madvise.2:113
1611 #, no-wrap
1612 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1613 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1614
1615 #.  See http://lwn.net/Articles/171941/
1616 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1617 #.  Currently, copy-on-write may change the physical address of
1618 #.  a page even if the user requested that the page is pinned in
1619 #.  memory (either by mlock or by get_user_pages).  This happens
1620 #.  if the process forks meanwhile, and the parent writes to that
1621 #.  page.  As a result, the page is orphaned: in case of
1622 #.  get_user_pages, the application will never see any data hardware
1623 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1624 #.  the parent is not getting the realtime/security benefits of mlock.
1625 #.  In particular, this affects the Infiniband modules which do DMA from
1626 #.  and into user pages all the time.
1627 #.  This patch adds madvise options to control whether memory range is
1628 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1629 #.  from/into these pages.  Could also be useful to an application
1630 #.  wanting to speed up its forks by cutting large areas out of
1631 #.  consideration.
1632 #.  SEE ALSO: http://lwn.net/Articles/171941/
1633 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1634 #. type: Plain text
1635 #: build/C/man2/madvise.2:144
1636 msgid ""
1637 "Do not make the pages in this range available to the child after a "
1638 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1639 "the physical location of a page(s) if the parent writes to it after a "
1640 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1641 "into the page(s).)"
1642 msgstr ""
1643 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1644 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1645 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1646 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1647 "を行うような場合に 問題を起こすことがある)。"
1648
1649 #. type: TP
1650 #: build/C/man2/madvise.2:144
1651 #, no-wrap
1652 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1653 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1654
1655 #. type: Plain text
1656 #: build/C/man2/madvise.2:150
1657 msgid ""
1658 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1659 "a mapping is inherited across B<fork>(2)."
1660 msgstr ""
1661 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1662 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1663
1664 #. type: TP
1665 #: build/C/man2/madvise.2:150
1666 #, no-wrap
1667 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1668 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1669
1670 #. type: Plain text
1671 #: build/C/man2/madvise.2:162
1672 msgid ""
1673 "Poison a page and handle it like a hardware memory corruption.  This "
1674 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1675 "This operation may result in the calling process receiving a B<SIGBUS> and "
1676 "the page being unmapped.  This feature is intended for testing of memory "
1677 "error-handling code; it is available only if the kernel was configured with "
1678 "B<CONFIG_MEMORY_FAILURE>."
1679 msgstr ""
1680 "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 "
1681 "この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操"
1682 "作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップさ"
1683 "れる。 この機能はメモリのエラー処理コードをテストするためのものである。 カー"
1684 "ネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1685
1686 #. type: TP
1687 #: build/C/man2/madvise.2:162
1688 #, no-wrap
1689 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1690 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1691
1692 #. type: Plain text
1693 #: build/C/man2/madvise.2:180
1694 msgid ""
1695 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1696 "memory of each page in the specified range is preserved (i.e., when next "
1697 "accessed, the same content will be visible, but in a new physical page "
1698 "frame), and the original page is offlined (i.e., no longer used, and taken "
1699 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1700 "operation is invisible to (i.e., does not change the semantics of)  the "
1701 "calling process.  This feature is intended for testing of memory error-"
1702 "handling code; it is available only if the kernel was configured with "
1703 "B<CONFIG_MEMORY_FAILURE>."
1704 msgstr ""
1705 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1706 "された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際"
1707 "に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフ"
1708 "ラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り"
1709 "除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない "
1710 "(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理"
1711 "コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> "
1712 "が有効になっている場合にのみ利用可能である。"
1713
1714 #. type: TP
1715 #: build/C/man2/madvise.2:180
1716 #, no-wrap
1717 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1718 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1719
1720 #. type: Plain text
1721 #: build/C/man2/madvise.2:205
1722 msgid ""
1723 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1724 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1725 "memory that have been marked as mergeable, looking for pages with identical "
1726 "content.  These are replaced by a single write-protected page (which is "
1727 "automatically copied if a process later wants to update the content of the "
1728 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1729 "feature is intended for applications that generate many instances of the "
1730 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1731 "of processing power; use with care.  See the Linux kernel source file "
1732 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1733 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1734 "configured with B<CONFIG_KSM>."
1735 msgstr ""
1736 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1737 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1738 "いたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内"
1739 "容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) が"
1740 "かかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよう"
1741 "とした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ペー"
1742 "ジ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデー"
1743 "タのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) "
1744 "での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があ"
1745 "り、注意して使用すること。 詳細は Linux カーネルソースファイル "
1746 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1747 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1748 "る場合にのみ利用できる。"
1749
1750 #. type: TP
1751 #: build/C/man2/madvise.2:205
1752 #, no-wrap
1753 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1754 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1755
1756 #. type: Plain text
1757 #: build/C/man2/madvise.2:214
1758 msgid ""
1759 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1760 "address range; KSM unmerges whatever pages it had merged in the address "
1761 "range specified by I<addr> and I<length>."
1762 msgstr ""
1763 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1764 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1765 "済みのすべてのページの統合解除を行う。"
1766
1767 #. type: TP
1768 #: build/C/man2/madvise.2:214
1769 #, no-wrap
1770 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1771 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1772
1773 #.  http://lwn.net/Articles/358904/
1774 #.  https://lwn.net/Articles/423584/
1775 #. type: Plain text
1776 #: build/C/man2/madvise.2:243
1777 msgid ""
1778 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1779 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1780 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1781 "the areas marked as huge page candidates to replace them with huge pages.  "
1782 "The kernel will also allocate huge pages directly when the region is "
1783 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1784 "feature is primarily aimed at applications that use large mappings of data "
1785 "and access large regions of that memory at a time (e.g., virtualization "
1786 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1787 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1788 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1789 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1790 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1791 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1792 msgstr ""
1793 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1794 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1795 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1796 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1797 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1798 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1799 "マッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリ"
1800 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1801 "る。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセ"
1802 "スしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってし"
1803 "まう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1804 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1805 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1806 "る。"
1807
1808 #. type: TP
1809 #: build/C/man2/madvise.2:243
1810 #, no-wrap
1811 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1812 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1813
1814 #. type: Plain text
1815 #: build/C/man2/madvise.2:250
1816 msgid ""
1817 "Ensures that memory in the address range specified by I<addr> and I<length> "
1818 "will not be collapsed into huge pages."
1819 msgstr ""
1820 "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込"
1821 "まれないようにする。"
1822
1823 #. type: TP
1824 #: build/C/man2/madvise.2:250
1825 #, no-wrap
1826 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1827 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1828
1829 #. type: Plain text
1830 #: build/C/man2/madvise.2:264
1831 msgid ""
1832 "Exclude from a core dump those pages in the range specified by I<addr> and "
1833 "I<length>.  This is useful in applications that have large areas of memory "
1834 "that are known not to be useful in a core dump.  The effect of "
1835 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1836 "proc/PID/coredump_filter> file (see B<core>(5))."
1837 msgstr ""
1838 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1839 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域がある"
1840 "アプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1841 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1842 "(B<core>(5) 参照)。"
1843
1844 #. type: TP
1845 #: build/C/man2/madvise.2:264
1846 #, no-wrap
1847 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1848 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1849
1850 #. type: Plain text
1851 #: build/C/man2/madvise.2:268
1852 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1853 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1854
1855 #. type: Plain text
1856 #: build/C/man2/madvise.2:275
1857 msgid ""
1858 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1859 "is set appropriately."
1860 msgstr ""
1861 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1862 "を適切な値に設定する。"
1863
1864 #. type: TP
1865 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1866 #: build/C/man2/mremap.2:136
1867 #, no-wrap
1868 msgid "B<EAGAIN>"
1869 msgstr "B<EAGAIN>"
1870
1871 #. type: Plain text
1872 #: build/C/man2/madvise.2:279
1873 msgid "A kernel resource was temporarily unavailable."
1874 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1875
1876 #. type: Plain text
1877 #: build/C/man2/madvise.2:282
1878 msgid "The map exists, but the area maps something that isn't a file."
1879 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1880
1881 #. type: Plain text
1882 #: build/C/man2/madvise.2:285
1883 msgid "This error can occur for the following reasons:"
1884 msgstr "このエラーは以下の理由で発生する。"
1885
1886 #.  .I len
1887 #.  is zero,
1888 #. type: Plain text
1889 #: build/C/man2/madvise.2:292
1890 msgid "The value I<len> is negative."
1891 msgstr "I<len> が負の値である。"
1892
1893 #. type: Plain text
1894 #: build/C/man2/madvise.2:295
1895 msgid "I<addr> is not page-aligned."
1896 msgstr "I<addr> がページ境界ではない。"
1897
1898 #. type: Plain text
1899 #: build/C/man2/madvise.2:298
1900 msgid "I<advice> is not a valid value"
1901 msgstr "I<advice> が有効な値でない。"
1902
1903 #. type: Plain text
1904 #: build/C/man2/madvise.2:301
1905 msgid ""
1906 "The application is attempting to release locked or shared pages (with "
1907 "B<MADV_DONTNEED>)."
1908 msgstr ""
1909 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1910 "放\n"
1911 "しようとしている。"
1912
1913 #. type: Plain text
1914 #: build/C/man2/madvise.2:309
1915 msgid ""
1916 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1917 "kernel was not configured with B<CONFIG_KSM>."
1918 msgstr ""
1919 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1920 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1921
1922 #. type: Plain text
1923 #: build/C/man2/madvise.2:316
1924 msgid ""
1925 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1926 "maximum resident set size."
1927 msgstr ""
1928 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1929 "(resident set size) の最大値を越えてしまう。"
1930
1931 #. type: TP
1932 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1933 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1934 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1935 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1936 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1937 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1938 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1939 #: build/C/man2/sync_file_range.2:163
1940 #, no-wrap
1941 msgid "B<ENOMEM>"
1942 msgstr "B<ENOMEM>"
1943
1944 #. type: Plain text
1945 #: build/C/man2/madvise.2:321
1946 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1947 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1948
1949 #. type: Plain text
1950 #: build/C/man2/madvise.2:325
1951 msgid ""
1952 "Addresses in the specified range are not currently mapped, or are outside "
1953 "the address space of the process."
1954 msgstr ""
1955 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1956 "空間の内部にない。"
1957
1958 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1959 #. type: Plain text
1960 #: build/C/man2/madvise.2:332
1961 msgid ""
1962 "Since Linux 3.18, support for this system call is optional, depending on the "
1963 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1964 msgstr ""
1965
1966 #.  FIXME . Write a posix_madvise(3) page.
1967 #. type: Plain text
1968 #: build/C/man2/madvise.2:345
1969 msgid ""
1970 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1971 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1972 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1973 "access."
1974 msgstr ""
1975 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1976 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1977 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1978 "類似の関数が存在する。"
1979
1980 #. type: Plain text
1981 #: build/C/man2/madvise.2:354
1982 msgid ""
1983 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1984 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1985 msgstr ""
1986 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1987 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1988
1989 #. type: SS
1990 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
1991 #: build/C/man2/shmget.2:369
1992 #, no-wrap
1993 msgid "Linux notes"
1994 msgstr "Linux での注意"
1995
1996 #. type: Plain text
1997 #: build/C/man2/madvise.2:363
1998 msgid ""
1999 "The current Linux implementation (2.4.0) views this system call more as a "
2000 "command than as advice and hence may return an error when it cannot do what "
2001 "it usually would do in response to this advice.  (See the ERRORS description "
2002 "above.)  This is nonstandard behavior."
2003 msgstr ""
2004 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2005 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2006 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2007 "とは異なる。"
2008
2009 #.  .SH HISTORY
2010 #.  The
2011 #.  .BR madvise ()
2012 #.  function first appeared in 4.4BSD.
2013 #. type: Plain text
2014 #: build/C/man2/madvise.2:379
2015 msgid ""
2016 "The Linux implementation requires that the address I<addr> be page-aligned, "
2017 "and allows I<length> to be zero.  If there are some parts of the specified "
2018 "address range that are not mapped, the Linux version of B<madvise>()  "
2019 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2020 "the system call, as it should)."
2021 msgstr ""
2022 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2023 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2024 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2025 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2026 "返す)。"
2027
2028 #. type: Plain text
2029 #: build/C/man2/madvise.2:388
2030 msgid ""
2031 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2032 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2033 msgstr ""
2034 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2035 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2036
2037 #. type: TH
2038 #: build/C/man3/mallinfo.3:26
2039 #, no-wrap
2040 msgid "MALLINFO"
2041 msgstr "MALLINFO"
2042
2043 #. type: TH
2044 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2045 #, no-wrap
2046 msgid "2012-05-06"
2047 msgstr "2012-05-06"
2048
2049 #. type: Plain text
2050 #: build/C/man3/mallinfo.3:29
2051 msgid "mallinfo - obtain memory allocation information"
2052 msgstr "mallinfo - メモリ割り当て情報を取得する"
2053
2054 #. type: Plain text
2055 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2056 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2057 #: build/C/man3/mallopt.3:31
2058 msgid "B<#include E<lt>malloc.hE<gt>>"
2059 msgstr "B<#include E<lt>malloc.hE<gt>>"
2060
2061 #. type: Plain text
2062 #: build/C/man3/mallinfo.3:33
2063 msgid "B<struct mallinfo mallinfo(void);>"
2064 msgstr "B<struct mallinfo mallinfo(void);>"
2065
2066 #. type: Plain text
2067 #: build/C/man3/mallinfo.3:41
2068 msgid ""
2069 "The B<mallinfo>()  function returns a copy of a structure containing "
2070 "information about memory allocations performed by B<malloc>(3)  and related "
2071 "functions.  This structure is defined as follows:"
2072 msgstr ""
2073 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
2074 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2075 "この構造体は以下のように定義されている。"
2076
2077 #. type: Plain text
2078 #: build/C/man3/mallinfo.3:56
2079 #, no-wrap
2080 msgid ""
2081 "struct mallinfo {\n"
2082 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2083 "    int ordblks;   /* Number of free chunks */\n"
2084 "    int smblks;    /* Number of free fastbin blocks */\n"
2085 "    int hblks;     /* Number of mmapped regions */\n"
2086 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2087 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2088 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2089 "    int uordblks;  /* Total allocated space (bytes) */\n"
2090 "    int fordblks;  /* Total free space (bytes) */\n"
2091 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2092 "};\n"
2093 msgstr ""
2094 "struct mallinfo {\n"
2095 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2096 "    int ordblks;   /* Number of free chunks */\n"
2097 "    int smblks;    /* Number of free fastbin blocks */\n"
2098 "    int hblks;     /* Number of mmapped regions */\n"
2099 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2100 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2101 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2102 "    int uordblks;  /* Total allocated space (bytes) */\n"
2103 "    int fordblks;  /* Total free space (bytes) */\n"
2104 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2105 "};\n"
2106
2107 #. type: Plain text
2108 #: build/C/man3/mallinfo.3:62
2109 msgid ""
2110 "The fields of the I<mallinfo> structure contain the following information:"
2111 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2112
2113 #. type: TP
2114 #: build/C/man3/mallinfo.3:62
2115 #, no-wrap
2116 msgid "I<arena>"
2117 msgstr "I<arena>"
2118
2119 #. type: Plain text
2120 #: build/C/man3/mallinfo.3:68
2121 msgid ""
2122 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2123 "memory allocated on the heap).  This figure includes both in-use blocks and "
2124 "blocks on the free list."
2125 msgstr ""
2126
2127 #. type: TP
2128 #: build/C/man3/mallinfo.3:68
2129 #, no-wrap
2130 msgid "I<ordblks>"
2131 msgstr "I<ordblks>"
2132
2133 #. type: Plain text
2134 #: build/C/man3/mallinfo.3:71
2135 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2136 msgstr ""
2137
2138 #. type: TP
2139 #: build/C/man3/mallinfo.3:71
2140 #, no-wrap
2141 msgid "I<smblks>"
2142 msgstr "I<smblks>"
2143
2144 #. type: Plain text
2145 #: build/C/man3/mallinfo.3:75
2146 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2147 msgstr ""
2148
2149 #. type: TP
2150 #: build/C/man3/mallinfo.3:75
2151 #, no-wrap
2152 msgid "I<hblks>"
2153 msgstr "I<hblks>"
2154
2155 #. type: Plain text
2156 #: build/C/man3/mallinfo.3:83
2157 msgid ""
2158 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2159 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2160 msgstr ""
2161
2162 #. type: TP
2163 #: build/C/man3/mallinfo.3:83
2164 #, no-wrap
2165 msgid "I<hblkhd>"
2166 msgstr "I<hblkhd>"
2167
2168 #. type: Plain text
2169 #: build/C/man3/mallinfo.3:87
2170 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2171 msgstr ""
2172
2173 #. type: TP
2174 #: build/C/man3/mallinfo.3:87
2175 #, no-wrap
2176 msgid "I<usmblks>"
2177 msgstr "I<usmblks>"
2178
2179 #. type: Plain text
2180 #: build/C/man3/mallinfo.3:92
2181 msgid ""
2182 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2183 "of space that was ever allocated.  This field is maintained only in "
2184 "nonthreading environments."
2185 msgstr ""
2186
2187 #. type: TP
2188 #: build/C/man3/mallinfo.3:92
2189 #, no-wrap
2190 msgid "I<fsmblks>"
2191 msgstr "I<fsmblks>"
2192
2193 #. type: Plain text
2194 #: build/C/man3/mallinfo.3:95
2195 msgid "The total number of bytes in fastbin free blocks."
2196 msgstr ""
2197
2198 #. type: TP
2199 #: build/C/man3/mallinfo.3:95
2200 #, no-wrap
2201 msgid "I<uordblks>"
2202 msgstr "I<uordblks>"
2203
2204 #. type: Plain text
2205 #: build/C/man3/mallinfo.3:98
2206 msgid "The total number of bytes used by in-use allocations."
2207 msgstr ""
2208
2209 #. type: TP
2210 #: build/C/man3/mallinfo.3:98
2211 #, no-wrap
2212 msgid "I<fordblks>"
2213 msgstr "I<fordblks>"
2214
2215 #. type: Plain text
2216 #: build/C/man3/mallinfo.3:101
2217 msgid "The total number of bytes in free blocks."
2218 msgstr ""
2219
2220 #. type: TP
2221 #: build/C/man3/mallinfo.3:101
2222 #, no-wrap
2223 msgid "I<keepcost>"
2224 msgstr "I<keepcost>"
2225
2226 #.  .SH VERSIONS
2227 #.  Available already in glibc 2.0, possibly earlier
2228 #. type: Plain text
2229 #: build/C/man3/mallinfo.3:110
2230 msgid ""
2231 "The total amount of releasable free space at the top of the heap.  This is "
2232 "the maximum number of bytes that could ideally (i.e., ignoring page "
2233 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2234 msgstr ""
2235
2236 #. type: Plain text
2237 #: build/C/man3/mallinfo.3:114
2238 msgid ""
2239 "This function is not specified by POSIX or the C standards.  A similar "
2240 "function exists on many System V derivatives, and was specified in the SVID."
2241 msgstr ""
2242
2243 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2244 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2245 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2246 #.  on libc-alpha@sourceware.org
2247 #. type: Plain text
2248 #: build/C/man3/mallinfo.3:126
2249 msgid ""
2250 "B<Information is returned for only the main memory allocation area.> "
2251 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2252 "B<malloc_info>(3)  for alternatives that include information about other "
2253 "arenas."
2254 msgstr ""
2255
2256 #. type: Plain text
2257 #: build/C/man3/mallinfo.3:134
2258 msgid ""
2259 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2260 "because some internal bookkeeping values may be of type I<long>, the "
2261 "reported values may wrap around zero and thus be inaccurate."
2262 msgstr ""
2263
2264 #. type: SH
2265 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2266 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2267 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:629
2268 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2269 #, no-wrap
2270 msgid "EXAMPLE"
2271 msgstr "例"
2272
2273 #. type: Plain text
2274 #: build/C/man3/mallinfo.3:140
2275 msgid ""
2276 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2277 "statistics before and after allocating and freeing some blocks of memory.  "
2278 "The statistics are displayed on standard output."
2279 msgstr ""
2280
2281 #. type: Plain text
2282 #: build/C/man3/mallinfo.3:144
2283 msgid ""
2284 "The first two command-line arguments specify the number and size of blocks "
2285 "to be allocated with B<malloc>(3)."
2286 msgstr ""
2287
2288 #. type: Plain text
2289 #: build/C/man3/mallinfo.3:158
2290 msgid ""
2291 "The remaining three arguments specify which of the allocated blocks should "
2292 "be freed with B<free>(3).  These three arguments are optional, and specify "
2293 "(in order): the step size to be used in the loop that frees blocks (the "
2294 "default is 1, meaning free all blocks in the range); the ordinal position of "
2295 "the first block to be freed (default 0, meaning the first allocated block); "
2296 "and a number one greater than the ordinal position of the last block to be "
2297 "freed (default is one greater than the maximum block number).  If these "
2298 "three arguments are omitted, then the defaults cause all allocated blocks to "
2299 "be freed."
2300 msgstr ""
2301
2302 #. type: Plain text
2303 #: build/C/man3/mallinfo.3:162
2304 msgid ""
2305 "In the following example run of the program, 1000 allocations of 100 bytes "
2306 "are performed, and then every second allocated block is freed:"
2307 msgstr ""
2308
2309 #. type: Plain text
2310 #: build/C/man3/mallinfo.3:177
2311 #, no-wrap
2312 msgid ""
2313 "$ B<./a.out 1000 100 2>\n"
2314 "============== Before allocating blocks ==============\n"
2315 "Total non-mmapped bytes (arena):       0\n"
2316 "# of free chunks (ordblks):            1\n"
2317 "# of free fastbin blocks (smblks):     0\n"
2318 "# of mapped regions (hblks):           0\n"
2319 "Bytes in mapped regions (hblkhd):      0\n"
2320 "Max. total allocated space (usmblks):  0\n"
2321 "Free bytes held in fastbins (fsmblks): 0\n"
2322 "Total allocated space (uordblks):      0\n"
2323 "Total free space (fordblks):           0\n"
2324 "Topmost releasable block (keepcost):   0\n"
2325 msgstr ""
2326 "$ B<./a.out 1000 100 2>\n"
2327 "============== Before allocating blocks ==============\n"
2328 "Total non-mmapped bytes (arena):       0\n"
2329 "# of free chunks (ordblks):            1\n"
2330 "# of free fastbin blocks (smblks):     0\n"
2331 "# of mapped regions (hblks):           0\n"
2332 "Bytes in mapped regions (hblkhd):      0\n"
2333 "Max. total allocated space (usmblks):  0\n"
2334 "Free bytes held in fastbins (fsmblks): 0\n"
2335 "Total allocated space (uordblks):      0\n"
2336 "Total free space (fordblks):           0\n"
2337 "Topmost releasable block (keepcost):   0\n"
2338
2339 #. type: Plain text
2340 #: build/C/man3/mallinfo.3:189
2341 #, no-wrap
2342 msgid ""
2343 "============== After allocating blocks ==============\n"
2344 "Total non-mmapped bytes (arena):       135168\n"
2345 "# of free chunks (ordblks):            1\n"
2346 "# of free fastbin blocks (smblks):     0\n"
2347 "# of mapped regions (hblks):           0\n"
2348 "Bytes in mapped regions (hblkhd):      0\n"
2349 "Max. total allocated space (usmblks):  0\n"
2350 "Free bytes held in fastbins (fsmblks): 0\n"
2351 "Total allocated space (uordblks):      104000\n"
2352 "Total free space (fordblks):           31168\n"
2353 "Topmost releasable block (keepcost):   31168\n"
2354 msgstr ""
2355 "============== After allocating blocks ==============\n"
2356 "Total non-mmapped bytes (arena):       135168\n"
2357 "# of free chunks (ordblks):            1\n"
2358 "# of free fastbin blocks (smblks):     0\n"
2359 "# of mapped regions (hblks):           0\n"
2360 "Bytes in mapped regions (hblkhd):      0\n"
2361 "Max. total allocated space (usmblks):  0\n"
2362 "Free bytes held in fastbins (fsmblks): 0\n"
2363 "Total allocated space (uordblks):      104000\n"
2364 "Total free space (fordblks):           31168\n"
2365 "Topmost releasable block (keepcost):   31168\n"
2366
2367 #. type: Plain text
2368 #: build/C/man3/mallinfo.3:201
2369 #, no-wrap
2370 msgid ""
2371 "============== After freeing blocks ==============\n"
2372 "Total non-mmapped bytes (arena):       135168\n"
2373 "# of free chunks (ordblks):            501\n"
2374 "# of free fastbin blocks (smblks):     0\n"
2375 "# of mapped regions (hblks):           0\n"
2376 "Bytes in mapped regions (hblkhd):      0\n"
2377 "Max. total allocated space (usmblks):  0\n"
2378 "Free bytes held in fastbins (fsmblks): 0\n"
2379 "Total allocated space (uordblks):      52000\n"
2380 "Total free space (fordblks):           83168\n"
2381 "Topmost releasable block (keepcost):   31168\n"
2382 msgstr ""
2383 "============== After freeing blocks ==============\n"
2384 "Total non-mmapped bytes (arena):       135168\n"
2385 "# of free chunks (ordblks):            501\n"
2386 "# of free fastbin blocks (smblks):     0\n"
2387 "# of mapped regions (hblks):           0\n"
2388 "Bytes in mapped regions (hblkhd):      0\n"
2389 "Max. total allocated space (usmblks):  0\n"
2390 "Free bytes held in fastbins (fsmblks): 0\n"
2391 "Total allocated space (uordblks):      52000\n"
2392 "Total free space (fordblks):           83168\n"
2393 "Topmost releasable block (keepcost):   31168\n"
2394
2395 #. type: SS
2396 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2397 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2398 #: build/C/man2/mmap.2:641 build/C/man2/mprotect.2:164
2399 #, no-wrap
2400 msgid "Program source"
2401 msgstr "プログラムのソース"
2402
2403 #. type: Plain text
2404 #: build/C/man3/mallinfo.3:208
2405 #, no-wrap
2406 msgid ""
2407 "#include E<lt>malloc.hE<gt>\n"
2408 "#include \"tlpi_hdr.h\"\n"
2409 msgstr ""
2410 "#include E<lt>malloc.hE<gt>\n"
2411 "#include \"tlpi_hdr.h\"\n"
2412
2413 #. type: Plain text
2414 #: build/C/man3/mallinfo.3:213
2415 #, no-wrap
2416 msgid ""
2417 "static void\n"
2418 "display_mallinfo(void)\n"
2419 "{\n"
2420 "    struct mallinfo mi;\n"
2421 msgstr ""
2422 "static void\n"
2423 "display_mallinfo(void)\n"
2424 "{\n"
2425 "    struct mallinfo mi;\n"
2426
2427 #. type: Plain text
2428 #: build/C/man3/mallinfo.3:215
2429 #, no-wrap
2430 msgid "    mi = mallinfo();\n"
2431 msgstr "    mi = mallinfo();\n"
2432
2433 #. type: Plain text
2434 #: build/C/man3/mallinfo.3:227
2435 #, no-wrap
2436 msgid ""
2437 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2438 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2439 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2440 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2441 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2442 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2443 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2444 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2445 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2446 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2447 "}\n"
2448 msgstr ""
2449 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2450 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2451 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2452 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2453 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2454 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2455 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2456 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2457 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2458 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2459 "}\n"
2460
2461 #. type: Plain text
2462 #: build/C/man3/mallinfo.3:235
2463 #, no-wrap
2464 msgid ""
2465 "int\n"
2466 "main(int argc, char *argv[])\n"
2467 "{\n"
2468 "#define MAX_ALLOCS 2000000\n"
2469 "    char *alloc[MAX_ALLOCS];\n"
2470 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2471 "    size_t blockSize;\n"
2472 msgstr ""
2473 "int\n"
2474 "main(int argc, char *argv[])\n"
2475 "{\n"
2476 "#define MAX_ALLOCS 2000000\n"
2477 "    char *alloc[MAX_ALLOCS];\n"
2478 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2479 "    size_t blockSize;\n"
2480
2481 #. type: Plain text
2482 #: build/C/man3/mallinfo.3:239
2483 #, no-wrap
2484 msgid ""
2485 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2486 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2487 "                \"[end-free]]]\\en\", argv[0]);\n"
2488 msgstr ""
2489 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2490 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2491 "                \"[end-free]]]\\en\", argv[0]);\n"
2492
2493 #. type: Plain text
2494 #: build/C/man3/mallinfo.3:245
2495 #, no-wrap
2496 msgid ""
2497 "    numBlocks = atoi(argv[1]);\n"
2498 "    blockSize = atoi(argv[2]);\n"
2499 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2500 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2501 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2502 msgstr ""
2503 "    numBlocks = atoi(argv[1]);\n"
2504 "    blockSize = atoi(argv[2]);\n"
2505 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2506 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2507 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2508
2509 #. type: Plain text
2510 #: build/C/man3/mallinfo.3:248
2511 #, no-wrap
2512 msgid ""
2513 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2514 "    display_mallinfo();\n"
2515 msgstr ""
2516 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2517 "    display_mallinfo();\n"
2518
2519 #. type: Plain text
2520 #: build/C/man3/mallinfo.3:252
2521 #, no-wrap
2522 msgid ""
2523 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2524 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2525 "            fatal(\"Too many allocations\");\n"
2526 msgstr ""
2527 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2528 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2529 "            fatal(\"Too many allocations\");\n"
2530
2531 #. type: Plain text
2532 #: build/C/man3/mallinfo.3:257
2533 #, no-wrap
2534 msgid ""
2535 "        alloc[j] = malloc(blockSize);\n"
2536 "        if (alloc[j] == NULL)\n"
2537 "            errExit(\"malloc\");\n"
2538 "    }\n"
2539 msgstr ""
2540 "        alloc[j] = malloc(blockSize);\n"
2541 "        if (alloc[j] == NULL)\n"
2542 "            errExit(\"malloc\");\n"
2543 "    }\n"
2544
2545 #. type: Plain text
2546 #: build/C/man3/mallinfo.3:260
2547 #, no-wrap
2548 msgid ""
2549 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2550 "    display_mallinfo();\n"
2551 msgstr ""
2552 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2553 "    display_mallinfo();\n"
2554
2555 #. type: Plain text
2556 #: build/C/man3/mallinfo.3:263
2557 #, no-wrap
2558 msgid ""
2559 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2560 "        free(alloc[j]);\n"
2561 msgstr ""
2562 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2563 "        free(alloc[j]);\n"
2564
2565 #. type: Plain text
2566 #: build/C/man3/mallinfo.3:266
2567 #, no-wrap
2568 msgid ""
2569 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2570 "    display_mallinfo();\n"
2571 msgstr ""
2572 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2573 "    display_mallinfo();\n"
2574
2575 #. type: Plain text
2576 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2577 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2578 #: build/C/man2/mmap.2:710
2579 #, no-wrap
2580 msgid ""
2581 "    exit(EXIT_SUCCESS);\n"
2582 "}\n"
2583 msgstr ""
2584 "    exit(EXIT_SUCCESS);\n"
2585 "}\n"
2586
2587 #. type: Plain text
2588 #: build/C/man3/mallinfo.3:279
2589 msgid ""
2590 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2591 "B<malloc_trim>(3), B<mallopt>(3)"
2592 msgstr ""
2593 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2594 "B<malloc_trim>(3), B<mallopt>(3)"
2595
2596 #. type: TH
2597 #: build/C/man3/malloc_get_state.3:25
2598 #, no-wrap
2599 msgid "MALLOC_GET_STATE"
2600 msgstr "MALLOC_GET_STATE"
2601
2602 #. type: TH
2603 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2604 #, no-wrap
2605 msgid "2014-06-13"
2606 msgstr "2014-06-13"
2607
2608 #. type: Plain text
2609 #: build/C/man3/malloc_get_state.3:28
2610 msgid ""
2611 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2612 "implementation"
2613 msgstr ""
2614
2615 #. type: Plain text
2616 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2617 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2618 #, no-wrap
2619 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2620 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2621
2622 #. type: Plain text
2623 #: build/C/man3/malloc_get_state.3:33
2624 #, no-wrap
2625 msgid "B<void* malloc_get_state(void);>\n"
2626 msgstr "B<void* malloc_get_state(void);>\n"
2627
2628 #. type: Plain text
2629 #: build/C/man3/malloc_get_state.3:35
2630 #, no-wrap
2631 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2632 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2633
2634 #. type: Plain text
2635 #: build/C/man3/malloc_get_state.3:53
2636 msgid ""
2637 "The B<malloc_get_state>()  function records the current state of all "
2638 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2639 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2640 "is recorded in a system-dependent opaque data structure dynamically "
2641 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2642 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2643 "this memory.)"
2644 msgstr ""
2645
2646 #. type: Plain text
2647 #: build/C/man3/malloc_get_state.3:61
2648 msgid ""
2649 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2650 "internal bookkeeping variables to the values recorded in the opaque data "
2651 "structure pointed to by I<state>."
2652 msgstr ""
2653
2654 #. type: Plain text
2655 #: build/C/man3/malloc_get_state.3:68
2656 msgid ""
2657 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2658 "opaque data structure.  On error (for example, memory could not be allocated "
2659 "for the data structure), B<malloc_get_state>()  returns NULL."
2660 msgstr ""
2661
2662 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2663 #.  /* Must fail if the major version is too high. */
2664 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2665 #. type: Plain text
2666 #: build/C/man3/malloc_get_state.3:86
2667 msgid ""
2668 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2669 "that I<state> does not point to a correctly formed data structure, "
2670 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2671 "version of the data structure referred to by I<state> is a more recent "
2672 "version than this implementation knows about, B<malloc_set_state>()  returns "
2673 "-2."
2674 msgstr ""
2675
2676 #. type: Plain text
2677 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2678 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2679 msgid "These functions are GNU extensions."
2680 msgstr "これらの関数は GNU による拡張である。"
2681
2682 #. type: Plain text
2683 #: build/C/man3/malloc_get_state.3:94
2684 msgid ""
2685 "These functions are useful when using this B<malloc>(3)  implementation as "
2686 "part of a shared library, and the heap contents are saved/restored via some "
2687 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2688 "\" function."
2689 msgstr ""
2690
2691 #.  i.e., calls __malloc_check_init()
2692 #.  i.e., malloc checking is not already in use
2693 #.  and the caller requested malloc checking
2694 #. type: Plain text
2695 #: build/C/man3/malloc_get_state.3:111
2696 msgid ""
2697 "Hook function pointers are never saved or restored by these functions, with "
2698 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2699 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2700 "checking hooks if possible; if malloc checking was not in use in the "
2701 "recorded state, but the caller has requested malloc checking, then the hooks "
2702 "are reset to 0."
2703 msgstr ""
2704
2705 #. type: Plain text
2706 #: build/C/man3/malloc_get_state.3:114
2707 msgid "B<malloc>(3), B<mallopt>(3)"
2708 msgstr "B<malloc>(3), B<mallopt>(3)"
2709
2710 #. type: TH
2711 #: build/C/man3/malloc_hook.3:10
2712 #, no-wrap
2713 msgid "MALLOC_HOOK"
2714 msgstr "MALLOC_HOOK"
2715
2716 #. type: TH
2717 #: build/C/man3/malloc_hook.3:10
2718 #, no-wrap
2719 msgid "2010-10-13"
2720 msgstr "2010-10-13"
2721
2722 #. type: Plain text
2723 #: build/C/man3/malloc_hook.3:15
2724 msgid ""
2725 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2726 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2727 msgstr ""
2728 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2729 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2730
2731 #. type: Plain text
2732 #: build/C/man3/malloc_hook.3:20
2733 #, no-wrap
2734 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2735 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2736
2737 #. type: Plain text
2738 #: build/C/man3/malloc_hook.3:23
2739 #, no-wrap
2740 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2741 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2742
2743 #. type: Plain text
2744 #: build/C/man3/malloc_hook.3:26
2745 #, no-wrap
2746 msgid ""
2747 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2748 "B<                         const void *>I<caller>B<);>\n"
2749 msgstr ""
2750 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2751 "B<                         const void *>I<caller>B<);>\n"
2752
2753 #. type: Plain text
2754 #: build/C/man3/malloc_hook.3:28
2755 #, no-wrap
2756 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2757 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2758
2759 #. type: Plain text
2760 #: build/C/man3/malloc_hook.3:30
2761 #, no-wrap
2762 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2763 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2764
2765 #. type: Plain text
2766 #: build/C/man3/malloc_hook.3:32
2767 #, no-wrap
2768 msgid "B<void (*__after_morecore_hook)(void);>\n"
2769 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2770
2771 #. type: Plain text
2772 #: build/C/man3/malloc_hook.3:43
2773 msgid ""
2774 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2775 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2776 "You can use these hooks to help you debug programs that use dynamic memory "
2777 "allocation, for example."
2778 msgstr ""
2779 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2780 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2781 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2782 "ができる。"
2783
2784 #. type: Plain text
2785 #: build/C/man3/malloc_hook.3:50
2786 msgid ""
2787 "The variable B<__malloc_initialize_hook> points at a function that is called "
2788 "once when the malloc implementation is initialized.  This is a weak "
2789 "variable, so it can be overridden in the application with a definition like "
2790 "the following:"
2791 msgstr ""
2792 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2793 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2794 "ケーション内で 以下のような定義で上書きできる:"
2795
2796 #. type: Plain text
2797 #: build/C/man3/malloc_hook.3:53
2798 #, no-wrap
2799 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2800 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2801
2802 #. type: Plain text
2803 #: build/C/man3/malloc_hook.3:58
2804 msgid ""
2805 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2806 msgstr ""
2807 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2808
2809 #. type: Plain text
2810 #: build/C/man3/malloc_hook.3:74
2811 msgid ""
2812 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2813 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2814 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2815 "except that they have a final argument I<caller> that gives the address of "
2816 "the caller of B<malloc>(3), etc."
2817 msgstr ""
2818 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2819 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2820 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2821 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2822 "出し元 (caller) のアドレスが格納される。"
2823
2824 #. type: Plain text
2825 #: build/C/man3/malloc_hook.3:80
2826 msgid ""
2827 "The variable B<__after_morecore_hook> points at a function that is called "
2828 "each time after B<sbrk>(2)  was asked for more memory."
2829 msgstr ""
2830 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2831 "後で毎回呼び出される関数へのポインタである。"
2832
2833 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2834 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2835 #. type: Plain text
2836 #: build/C/man3/malloc_hook.3:89
2837 msgid ""
2838 "The use of these hook functions is not safe in multithreaded programs, and "
2839 "they are now deprecated.  Programmers should instead preempt calls to the "
2840 "relevant functions by defining and exporting functions such as \"malloc\" "
2841 "and \"free\"."
2842 msgstr ""
2843 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2844 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2845 "公開して、 関連する関数を呼び出すようにすべきである。"
2846
2847 #. type: Plain text
2848 #: build/C/man3/malloc_hook.3:91
2849 msgid "Here is a short example of how to use these variables."
2850 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2851
2852 #. type: Plain text
2853 #: build/C/man3/malloc_hook.3:95
2854 #, no-wrap
2855 msgid ""
2856 "#include E<lt>stdio.hE<gt>\n"
2857 "#include E<lt>malloc.hE<gt>\n"
2858 msgstr ""
2859 "#include E<lt>stdio.hE<gt>\n"
2860 "#include E<lt>malloc.hE<gt>\n"
2861
2862 #. type: Plain text
2863 #: build/C/man3/malloc_hook.3:99
2864 #, no-wrap
2865 msgid ""
2866 "/* Prototypes for our hooks.  */\n"
2867 "static void my_init_hook(void);\n"
2868 "static void *my_malloc_hook(size_t, const void *);\n"
2869 msgstr ""
2870 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2871 "static void my_init_hook(void);\n"
2872 "static void *my_malloc_hook(size_t, const void *);\n"
2873
2874 #. type: Plain text
2875 #: build/C/man3/malloc_hook.3:102
2876 #, no-wrap
2877 msgid ""
2878 "/* Variables to save original hooks. */\n"
2879 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2880 msgstr ""
2881 "/* 元々のフックを保存するための変数 */\n"
2882 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2883
2884 #. type: Plain text
2885 #: build/C/man3/malloc_hook.3:105
2886 #, no-wrap
2887 msgid ""
2888 "/* Override initializing hook from the C library. */\n"
2889 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2890 msgstr ""
2891 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2892 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2893
2894 #. type: Plain text
2895 #: build/C/man3/malloc_hook.3:112
2896 #, no-wrap
2897 msgid ""
2898 "static void\n"
2899 "my_init_hook(void)\n"
2900 "{\n"
2901 "    old_malloc_hook = __malloc_hook;\n"
2902 "    __malloc_hook = my_malloc_hook;\n"
2903 "}\n"
2904 msgstr ""
2905 "static void\n"
2906 "my_init_hook(void)\n"
2907 "{\n"
2908 "    old_malloc_hook = __malloc_hook;\n"
2909 "    __malloc_hook = my_malloc_hook;\n"
2910 "}\n"
2911
2912 #. type: Plain text
2913 #: build/C/man3/malloc_hook.3:117
2914 #, no-wrap
2915 msgid ""
2916 "static void *\n"
2917 "my_malloc_hook(size_t size, const void *caller)\n"
2918 "{\n"
2919 "    void *result;\n"
2920 msgstr ""
2921 "static void *\n"
2922 "my_malloc_hook(size_t size, const void *caller)\n"
2923 "{\n"
2924 "    void *result;\n"
2925
2926 #. type: Plain text
2927 #: build/C/man3/malloc_hook.3:120
2928 #, no-wrap
2929 msgid ""
2930 "    /* Restore all old hooks */\n"
2931 "    __malloc_hook = old_malloc_hook;\n"
2932 msgstr ""
2933 "    /* 元々のフックを全て戻す */\n"
2934 "    __malloc_hook = old_malloc_hook;\n"
2935
2936 #. type: Plain text
2937 #: build/C/man3/malloc_hook.3:123
2938 #, no-wrap
2939 msgid ""
2940 "    /* Call recursively */\n"
2941 "    result = malloc(size);\n"
2942 msgstr ""
2943 "    /* malloc の再帰的呼び出し */\n"
2944 "    result = malloc(size);\n"
2945
2946 #. type: Plain text
2947 #: build/C/man3/malloc_hook.3:126
2948 #, no-wrap
2949 msgid ""
2950 "    /* Save underlying hooks */\n"
2951 "    old_malloc_hook = __malloc_hook;\n"
2952 msgstr ""
2953 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2954 "    old_malloc_hook = __malloc_hook;\n"
2955
2956 #. type: Plain text
2957 #: build/C/man3/malloc_hook.3:130
2958 #, no-wrap
2959 msgid ""
2960 "    /* printf() might call malloc(), so protect it too. */\n"
2961 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2962 "            (unsigned int) size, caller, result);\n"
2963 msgstr ""
2964 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2965 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2966 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2967 "            (unsigned int) size, caller, result);\n"
2968
2969 #. type: Plain text
2970 #: build/C/man3/malloc_hook.3:133
2971 #, no-wrap
2972 msgid ""
2973 "    /* Restore our own hooks */\n"
2974 "    __malloc_hook = my_malloc_hook;\n"
2975 msgstr ""
2976 "    /* ユーザが使おうとするフックを再設定する */\n"
2977 "    __malloc_hook = my_malloc_hook;\n"
2978
2979 #. type: Plain text
2980 #: build/C/man3/malloc_hook.3:136
2981 #, no-wrap
2982 msgid ""
2983 "    return result;\n"
2984 "}\n"
2985 msgstr ""
2986 "    return result;\n"
2987 "}\n"
2988
2989 #. type: Plain text
2990 #: build/C/man3/malloc_hook.3:142
2991 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2992 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2993
2994 #. type: TH
2995 #: build/C/man3/malloc_info.3:25
2996 #, no-wrap
2997 msgid "MALLOC_INFO"
2998 msgstr "MALLOC_INFO"
2999
3000 #. type: TH
3001 #: build/C/man3/malloc_info.3:25
3002 #, no-wrap
3003 msgid "2013-04-19"
3004 msgstr "2013-04-19"
3005
3006 #. type: Plain text
3007 #: build/C/man3/malloc_info.3:28
3008 msgid "malloc_info - export malloc state to a stream"
3009 msgstr "malloc_info - malloc の状態をストリームに出力する"
3010
3011 #. type: Plain text
3012 #: build/C/man3/malloc_info.3:33
3013 #, no-wrap
3014 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3015 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3016
3017 #. type: Plain text
3018 #: build/C/man3/malloc_info.3:44
3019 msgid ""
3020 "The B<malloc_info>()  function exports an XML string that describes the "
3021 "current state of the memory-allocation implementation in the caller.  The "
3022 "string is printed on the file stream I<fp>.  The exported string includes "
3023 "information about all arenas (see B<malloc>(3))."
3024 msgstr ""
3025 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
3026 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
3027 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
3028
3029 #. type: Plain text
3030 #: build/C/man3/malloc_info.3:48
3031 msgid "As currently implemented, I<options> must be zero."
3032 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3033
3034 #. type: Plain text
3035 #: build/C/man3/malloc_info.3:55
3036 msgid ""
3037 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3038 "I<errno> set to indicate the cause."
3039 msgstr ""
3040 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3041 "I<errno> にエラーの原因を示す値を設定する。"
3042
3043 #. type: Plain text
3044 #: build/C/man3/malloc_info.3:60
3045 msgid "I<options> was nonzero."
3046 msgstr "I<options> が 0 でなかった。"
3047
3048 #. type: Plain text
3049 #: build/C/man3/malloc_info.3:63
3050 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3051 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3052
3053 #. type: Plain text
3054 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3055 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3056 msgid "This function is a GNU extension."
3057 msgstr "この関数は GNU による拡張である。"
3058
3059 #. type: Plain text
3060 #: build/C/man3/malloc_info.3:71
3061 msgid ""
3062 "The memory-allocation information is provided as an XML string (rather than "
3063 "a C structure)  because the information may change over time (according to "
3064 "changes in the underlying implementation).  The output XML string includes a "
3065 "version field."
3066 msgstr ""
3067 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3068 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3069 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3070
3071 #. type: Plain text
3072 #: build/C/man3/malloc_info.3:77
3073 msgid ""
3074 "The B<open_memstream>(3)  function can be used to send the output of "
3075 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3076 msgstr ""
3077 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3078 "なくメモリ内のバッファに直接送ることができる。"
3079
3080 #. type: Plain text
3081 #: build/C/man3/malloc_info.3:84
3082 msgid ""
3083 "The B<malloc_info>()  function is designed to address deficiencies in "
3084 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3085 msgstr ""
3086 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3087 "るために設定された。"
3088
3089 #. type: Plain text
3090 #: build/C/man3/malloc_info.3:95
3091 msgid ""
3092 "The program below takes up to four command-line arguments, of which the "
3093 "first three are mandatory.  The first argument specifies the number of "
3094 "threads that the program should create.  All of the threads, including the "
3095 "main thread, allocate the number of blocks of memory specified by the second "
3096 "argument.  The third argument controls the size of the blocks to be "
3097 "allocated.  The main thread creates blocks of this size, the second thread "
3098 "created by the program allocates blocks of twice this size, the third thread "
3099 "allocates blocks of three times this size, and so on."
3100 msgstr ""
3101 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3102 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3103 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
3104 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
3105 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
3106 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
3107 "のブロックを割り当て、 以下同様である。"
3108
3109 #. type: Plain text
3110 #: build/C/man3/malloc_info.3:102
3111 msgid ""
3112 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3113 "state.  The first call takes place before any threads are created or memory "
3114 "allocated.  The second call is performed after all threads have allocated "
3115 "memory."
3116 msgstr ""
3117 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
3118 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
3119 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
3120
3121 #. type: Plain text
3122 #: build/C/man3/malloc_info.3:110
3123 msgid ""
3124 "In the following example, the command-line arguments specify the creation of "
3125 "one additional thread, and both the main thread and the additional thread "
3126 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3127 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3128 msgstr ""
3129 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3130 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
3131 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
3132 "て領域の状態が表示されている。"
3133
3134 #. type: Plain text
3135 #: build/C/man3/malloc_info.3:135
3136 #, no-wrap
3137 msgid ""
3138 "$ B<getconf GNU_LIBC_VERSION>\n"
3139 "glibc 2.13\n"
3140 "$ B<./a.out 1 10000 100>\n"
3141 "============ Before allocating blocks ============\n"
3142 "E<lt>malloc version=\"1\"E<gt>\n"
3143 "E<lt>heap nr=\"0\"E<gt>\n"
3144 "E<lt>sizesE<gt>\n"
3145 "E<lt>/sizesE<gt>\n"
3146 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3147 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3148 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3149 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3150 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3151 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3152 "E<lt>/heapE<gt>\n"
3153 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3154 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3155 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3156 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3157 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3158 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3159 "E<lt>/mallocE<gt>\n"
3160 msgstr ""
3161 "$ B<getconf GNU_LIBC_VERSION>\n"
3162 "glibc 2.13\n"
3163 "$ B<./a.out 1 10000 100>\n"
3164 "============ Before allocating blocks ============\n"
3165 "E<lt>malloc version=\"1\"E<gt>\n"
3166 "E<lt>heap nr=\"0\"E<gt>\n"
3167 "E<lt>sizesE<gt>\n"
3168 "E<lt>/sizesE<gt>\n"
3169 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3170 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3171 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3172 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3173 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3174 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3175 "E<lt>/heapE<gt>\n"
3176 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3177 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3178 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3179 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3180 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3181 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3182 "E<lt>/mallocE<gt>\n"
3183
3184 #. type: Plain text
3185 #: build/C/man3/malloc_info.3:165
3186 #, no-wrap
3187 msgid ""
3188 "============ After allocating blocks ============\n"
3189 "E<lt>malloc version=\"1\"E<gt>\n"
3190 "E<lt>heap nr=\"0\"E<gt>\n"
3191 "E<lt>sizesE<gt>\n"
3192 "E<lt>/sizesE<gt>\n"
3193 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3194 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3195 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3196 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3197 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3198 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3199 "E<lt>/heapE<gt>\n"
3200 "E<lt>heap nr=\"1\"E<gt>\n"
3201 "E<lt>sizesE<gt>\n"
3202 "E<lt>/sizesE<gt>\n"
3203 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3204 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3205 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3206 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3207 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3208 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3209 "E<lt>/heapE<gt>\n"
3210 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3211 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3212 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3213 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3214 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3215 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3216 "E<lt>/mallocE<gt>\n"
3217 msgstr ""
3218 "============ After allocating blocks ============\n"
3219 "E<lt>malloc version=\"1\"E<gt>\n"
3220 "E<lt>heap nr=\"0\"E<gt>\n"
3221 "E<lt>sizesE<gt>\n"
3222 "E<lt>/sizesE<gt>\n"
3223 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3224 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3225 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3226 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3227 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3228 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3229 "E<lt>/heapE<gt>\n"
3230 "E<lt>heap nr=\"1\"E<gt>\n"
3231 "E<lt>sizesE<gt>\n"
3232 "E<lt>/sizesE<gt>\n"
3233 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3234 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3235 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3236 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3237 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3238 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3239 "E<lt>/heapE<gt>\n"
3240 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3241 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3242 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3243 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3244 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3245 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3246 "E<lt>/mallocE<gt>\n"
3247
3248 #. type: Plain text
3249 #: build/C/man3/malloc_info.3:175
3250 #, no-wrap
3251 msgid ""
3252 "#include E<lt>unistd.hE<gt>\n"
3253 "#include E<lt>stdlib.hE<gt>\n"
3254 "#include E<lt>pthread.hE<gt>\n"
3255 "#include E<lt>malloc.hE<gt>\n"
3256 "#include E<lt>errno.hE<gt>\n"
3257 msgstr ""
3258 "#include E<lt>unistd.hE<gt>\n"
3259 "#include E<lt>stdlib.hE<gt>\n"
3260 "#include E<lt>pthread.hE<gt>\n"
3261 "#include E<lt>malloc.hE<gt>\n"
3262 "#include E<lt>errno.hE<gt>\n"
3263
3264 #. type: Plain text
3265 #: build/C/man3/malloc_info.3:178
3266 #, no-wrap
3267 msgid ""
3268 "static size_t blockSize;\n"
3269 "static int numThreads, numBlocks;\n"
3270 msgstr ""
3271 "static size_t blockSize;\n"
3272 "static int numThreads, numBlocks;\n"
3273
3274 #. type: Plain text
3275 #: build/C/man3/malloc_info.3:181
3276 #, no-wrap
3277 msgid ""
3278 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3279 "                        } while (0)\n"
3280 msgstr ""
3281 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3282 "                        } while (0)\n"
3283
3284 #. type: Plain text
3285 #: build/C/man3/malloc_info.3:187
3286 #, no-wrap
3287 msgid ""
3288 "static void *\n"
3289 "thread_func(void *arg)\n"
3290 "{\n"
3291 "    int j;\n"
3292 "    int tn = (int) arg;\n"
3293 msgstr ""
3294 "static void *\n"
3295 "thread_func(void *arg)\n"
3296 "{\n"
3297 "    int j;\n"
3298 "    int tn = (int) arg;\n"
3299
3300 #. type: Plain text
3301 #: build/C/man3/malloc_info.3:190
3302 #, no-wrap
3303 msgid ""
3304 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3305 "       the main thread) allocates a different amount of memory */\n"
3306 msgstr ""
3307 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3308 "       the main thread) allocates a different amount of memory */\n"
3309
3310 #. type: Plain text
3311 #: build/C/man3/malloc_info.3:194
3312 #, no-wrap
3313 msgid ""
3314 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3315 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3316 "            errExit(\"malloc-thread\");\n"
3317 msgstr ""
3318 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3319 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3320 "            errExit(\"malloc-thread\");\n"
3321
3322 #. type: Plain text
3323 #: build/C/man3/malloc_info.3:198
3324 #, no-wrap
3325 msgid ""
3326 "    sleep(100);         /* Sleep until main thread terminates */\n"
3327 "    return NULL;\n"
3328 "}\n"
3329 msgstr ""
3330 "    sleep(100);         /* Sleep until main thread terminates */\n"
3331 "    return NULL;\n"
3332 "}\n"
3333
3334 #. type: Plain text
3335 #: build/C/man3/malloc_info.3:204
3336 #, no-wrap
3337 msgid ""
3338 "int\n"
3339 "main(int argc, char *argv[])\n"
3340 "{\n"
3341 "    int j, tn, sleepTime;\n"
3342 "    pthread_t *thr;\n"
3343 msgstr ""
3344 "int\n"
3345 "main(int argc, char *argv[])\n"
3346 "{\n"
3347 "    int j, tn, sleepTime;\n"
3348 "    pthread_t *thr;\n"
3349
3350 #. type: Plain text
3351 #: build/C/man3/malloc_info.3:211
3352 #, no-wrap
3353 msgid ""
3354 "    if (argc E<lt> 4) {\n"
3355 "        fprintf(stderr,\n"
3356 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3357 "                argv[0]);\n"
3358 "        exit(EXIT_FAILURE);\n"
3359 "    }\n"
3360 msgstr ""
3361 "    if (argc E<lt> 4) {\n"
3362 "        fprintf(stderr,\n"
3363 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3364 "                argv[0]);\n"
3365 "        exit(EXIT_FAILURE);\n"
3366 "    }\n"
3367
3368 #. type: Plain text
3369 #: build/C/man3/malloc_info.3:216
3370 #, no-wrap
3371 msgid ""
3372 "    numThreads = atoi(argv[1]);\n"
3373 "    numBlocks = atoi(argv[2]);\n"
3374 "    blockSize = atoi(argv[3]);\n"
3375 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3376 msgstr ""
3377 "    numThreads = atoi(argv[1]);\n"
3378 "    numBlocks = atoi(argv[2]);\n"
3379 "    blockSize = atoi(argv[3]);\n"
3380 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3381
3382 #. type: Plain text
3383 #: build/C/man3/malloc_info.3:220
3384 #, no-wrap
3385 msgid ""
3386 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3387 "    if (thr == NULL)\n"
3388 "        errExit(\"calloc\");\n"
3389 msgstr ""
3390 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3391 "    if (thr == NULL)\n"
3392 "        errExit(\"calloc\");\n"
3393
3394 #. type: Plain text
3395 #: build/C/man3/malloc_info.3:223
3396 #, no-wrap
3397 msgid ""
3398 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3399 "    malloc_info(0, stdout);\n"
3400 msgstr ""
3401 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3402 "    malloc_info(0, stdout);\n"
3403
3404 #. type: Plain text
3405 #: build/C/man3/malloc_info.3:225
3406 #, no-wrap
3407 msgid "    /* Create threads that allocate different amounts of memory */\n"
3408 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3409
3410 #. type: Plain text
3411 #: build/C/man3/malloc_info.3:231
3412 #, no-wrap
3413 msgid ""
3414 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3415 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3416 "                               (void *) tn);\n"
3417 "        if (errno != 0)\n"
3418 "            errExit(\"pthread_create\");\n"
3419 msgstr ""
3420 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3421 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3422 "                               (void *) tn);\n"
3423 "        if (errno != 0)\n"
3424 "            errExit(\"pthread_create\");\n"
3425
3426 #. type: Plain text
3427 #: build/C/man3/malloc_info.3:236
3428 #, no-wrap
3429 msgid ""
3430 "        /* If we add a sleep interval after the start-up of each\n"
3431 "           thread, the threads likely won\\(aqt contend for malloc\n"
3432 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3433 "           allocated (see malloc(3)). */\n"
3434 msgstr ""
3435 "        /* If we add a sleep interval after the start-up of each\n"
3436 "           thread, the threads likely won\\(aqt contend for malloc\n"
3437 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3438 "           allocated (see malloc(3)). */\n"
3439
3440 #. type: Plain text
3441 #: build/C/man3/malloc_info.3:240
3442 #, no-wrap
3443 msgid ""
3444 "        if (sleepTime E<gt> 0)\n"
3445 "            sleep(sleepTime);\n"
3446 "    }\n"
3447 msgstr ""
3448 "        if (sleepTime E<gt> 0)\n"
3449 "            sleep(sleepTime);\n"
3450 "    }\n"
3451
3452 #. type: Plain text
3453 #: build/C/man3/malloc_info.3:242
3454 #, no-wrap
3455 msgid "    /* The main thread also allocates some memory */\n"
3456 msgstr "    /* The main thread also allocates some memory */\n"
3457
3458 #. type: Plain text
3459 #: build/C/man3/malloc_info.3:246
3460 #, no-wrap
3461 msgid ""
3462 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3463 "        if (malloc(blockSize) == NULL)\n"
3464 "            errExit(\"malloc\");\n"
3465 msgstr ""
3466 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3467 "        if (malloc(blockSize) == NULL)\n"
3468 "            errExit(\"malloc\");\n"
3469
3470 #. type: Plain text
3471 #: build/C/man3/malloc_info.3:249
3472 #, no-wrap
3473 msgid ""
3474 "    sleep(2);           /* Give all threads a chance to\n"
3475 "                           complete allocations */\n"
3476 msgstr ""
3477 "    sleep(2);           /* Give all threads a chance to\n"
3478 "                           complete allocations */\n"
3479
3480 #. type: Plain text
3481 #: build/C/man3/malloc_info.3:252
3482 #, no-wrap
3483 msgid ""
3484 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3485 "    malloc_info(0, stdout);\n"
3486 msgstr ""
3487 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3488 "    malloc_info(0, stdout);\n"
3489
3490 #. type: Plain text
3491 #: build/C/man3/malloc_info.3:262
3492 msgid ""
3493 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3494 "B<open_memstream>(3)"
3495 msgstr ""
3496 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3497 "B<open_memstream>(3)"
3498
3499 #. type: TH
3500 #: build/C/man3/malloc_stats.3:26
3501 #, no-wrap
3502 msgid "MALLOC_STATS"
3503 msgstr "MALLOC_STATS"
3504
3505 #. type: Plain text
3506 #: build/C/man3/malloc_stats.3:29
3507 msgid "malloc_stats - print memory allocation statistics"
3508 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3509
3510 #. type: Plain text
3511 #: build/C/man3/malloc_stats.3:33
3512 msgid "B<void malloc_stats(void);>"
3513 msgstr "B<void malloc_stats(void);>"
3514
3515 #.  .SH VERSIONS
3516 #.  Available already in glibc 2.0, possibly earlier
3517 #. type: Plain text
3518 #: build/C/man3/malloc_stats.3:55
3519 msgid ""
3520 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3521 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3522 "(allocation area), this function prints the total amount of memory allocated "
3523 "and the total number of bytes consumed by in-use allocations.  (These two "
3524 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3525 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3526 "statistics for all arenas, and the maximum number of blocks and bytes that "
3527 "were ever simultaneously allocated using B<mmap>(2)."
3528 msgstr ""
3529 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3530 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3531 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3532 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3533 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3534 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3535 "ロック数とバイト数の最大値を表示する。"
3536
3537 #. type: Plain text
3538 #: build/C/man3/malloc_stats.3:61
3539 msgid ""
3540 "More detailed information about memory allocations in the main arena can be "
3541 "obtained using B<mallinfo>(3)."
3542 msgstr ""
3543 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3544 "報を取得できる。"
3545
3546 #. type: Plain text
3547 #: build/C/man3/malloc_stats.3:67
3548 msgid ""
3549 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3550 msgstr ""
3551 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3552
3553 #. type: TH
3554 #: build/C/man3/malloc_trim.3:26
3555 #, no-wrap
3556 msgid "MALLOC_TRIM"
3557 msgstr "MALLOC_TRIM"
3558
3559 #. type: TH
3560 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3561 #, no-wrap
3562 msgid "2014-05-28"
3563 msgstr "2014-05-28"
3564
3565 #. type: Plain text
3566 #: build/C/man3/malloc_trim.3:29
3567 msgid "malloc_trim - release free memory from the top of the heap"
3568 msgstr ""
3569
3570 #. type: Plain text
3571 #: build/C/man3/malloc_trim.3:33
3572 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3573 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3574
3575 #. type: Plain text
3576 #: build/C/man3/malloc_trim.3:40
3577 msgid ""
3578 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3579 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3580 msgstr ""
3581
3582 #. type: Plain text
3583 #: build/C/man3/malloc_trim.3:51
3584 msgid ""
3585 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3586 "the top of the heap.  If this argument is 0, only the minimum amount of "
3587 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3588 "nonzero argument can be used to maintain some trailing space at the top of "
3589 "the heap in order to allow future allocations to be made without having to "
3590 "extend the heap with B<sbrk>(2)."
3591 msgstr ""
3592
3593 #. type: Plain text
3594 #: build/C/man3/malloc_trim.3:56
3595 msgid ""
3596 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3597 "back to the system, or 0 if it was not possible to release any memory."
3598 msgstr ""
3599
3600 #.  .SH VERSIONS
3601 #.  Available already in glibc 2.0, possibly earlier
3602 #. type: Plain text
3603 #: build/C/man3/malloc_trim.3:60
3604 msgid "No errors are defined."
3605 msgstr ""
3606
3607 #. type: Plain text
3608 #: build/C/man3/malloc_trim.3:71
3609 msgid ""
3610 "This function is automatically called by B<free>(3)  in certain "
3611 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3612 "B<mallopt>(3)."
3613 msgstr ""
3614
3615 #. type: Plain text
3616 #: build/C/man3/malloc_trim.3:74
3617 msgid ""
3618 "This function cannot release free memory located at places other than the "
3619 "top of the heap."
3620 msgstr ""
3621
3622 #.  malloc/malloc.c::mTRIm():
3623 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3624 #. type: Plain text
3625 #: build/C/man3/malloc_trim.3:78
3626 msgid "This function releases only memory in the main arena."
3627 msgstr ""
3628
3629 #. type: Plain text
3630 #: build/C/man3/malloc_trim.3:82
3631 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3632 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3633
3634 #. type: TH
3635 #: build/C/man3/malloc_usable_size.3:25
3636 #, no-wrap
3637 msgid "MALLOC_USABLE_SIZE"
3638 msgstr "MALLOC_USABLE_SIZE"
3639
3640 #. type: Plain text
3641 #: build/C/man3/malloc_usable_size.3:28
3642 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3643 msgstr ""
3644 "malloc_usable_size - ヒープから確保したメモリブロックのサイズを取得する"
3645
3646 #. type: Plain text
3647 #: build/C/man3/malloc_usable_size.3:32
3648 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3649 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3650
3651 #. type: Plain text
3652 #: build/C/man3/malloc_usable_size.3:40
3653 msgid ""
3654 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3655 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3656 "B<malloc>(3)  or a related function."
3657 msgstr ""
3658 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3659 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリブロックへの"
3660 "ポインターである。"
3661
3662 #. type: Plain text
3663 #: build/C/man3/malloc_usable_size.3:48
3664 msgid ""
3665 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3666 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3667 msgstr ""
3668 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリブロックで使用可能"
3669 "なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3670
3671 #. type: Plain text
3672 #: build/C/man3/malloc_usable_size.3:53
3673 msgid "The B<malloc_usable_size>()  function is thread-safe."
3674 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3675
3676 #. type: Plain text
3677 #: build/C/man3/malloc_usable_size.3:65
3678 msgid ""
3679 "The value returned by B<malloc_usable_size>()  may be greater than the "
3680 "requested size of the allocation because of alignment and minimum size "
3681 "constraints.  Although the excess bytes can be overwritten by the "
3682 "application without ill effects, this is not good programming practice: the "
3683 "number of excess bytes in an allocation depends on the underlying "
3684 "implementation."
3685 msgstr ""
3686 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3687 "がある。 これは、メモリアラインメントと最小サイズの制約のためである。 この超"
3688 "過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行う"
3689 "のはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超過"
3690 "バイトの量は、内部の実装に依存する。"
3691
3692 #. type: Plain text
3693 #: build/C/man3/malloc_usable_size.3:67
3694 msgid "The main use of this function is for debugging and introspection."
3695 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3696
3697 #. type: Plain text
3698 #: build/C/man3/malloc_usable_size.3:69
3699 msgid "B<malloc>(3)"
3700 msgstr "B<malloc>(3)"
3701
3702 #. type: TH
3703 #: build/C/man3/mallopt.3:26
3704 #, no-wrap
3705 msgid "MALLOPT"
3706 msgstr "MALLOPT"
3707
3708 #. type: Plain text
3709 #: build/C/man3/mallopt.3:29
3710 msgid "mallopt - set memory allocation parameters"
3711 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3712
3713 #. type: Plain text
3714 #: build/C/man3/mallopt.3:33
3715 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3716 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3717
3718 #. type: Plain text
3719 #: build/C/man3/mallopt.3:44
3720 msgid ""
3721 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3722 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3723 "specifies the parameter to be modified, and I<value> specifies the new value "
3724 "for that parameter."
3725 msgstr ""
3726 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3727 "制御するパラメータの調整を行う。\n"
3728 "I<param> 引き数で変更するパラメータを指定し、\n"
3729 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3730
3731 #. type: Plain text
3732 #: build/C/man3/mallopt.3:47
3733 msgid "The following values can be specified for I<param>:"
3734 msgstr "I<param> には以下の値を指定することができる。"
3735
3736 #. type: TP
3737 #: build/C/man3/mallopt.3:47
3738 #, no-wrap
3739 msgid "B<M_CHECK_ACTION>"
3740 msgstr "B<M_CHECK_ACTION>"
3741
3742 #. type: Plain text
3743 #: build/C/man3/mallopt.3:53
3744 msgid ""
3745 "Setting this parameter controls how glibc responds when various kinds of "
3746 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3747 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3748 "parameter determine the glibc behavior, as follows:"
3749 msgstr ""
3750
3751 #. type: TP
3752 #: build/C/man3/mallopt.3:54
3753 #, no-wrap
3754 msgid "Bit 0"
3755 msgstr "Bit 0"
3756
3757 #. type: Plain text
3758 #: build/C/man3/mallopt.3:64
3759 msgid ""
3760 "If this bit is set, then print a one-line message on I<stderr> that provides "
3761 "details about the error.  The message starts with the string \"***\\ glibc "
3762 "detected\\ ***\", followed by the program name, the name of the memory-"
3763 "allocation function in which the error was detected, a brief description of "
3764 "the error, and the memory address where the error was detected."
3765 msgstr ""
3766
3767 #. type: TP
3768 #: build/C/man3/mallopt.3:64
3769 #, no-wrap
3770 msgid "Bit 1"
3771 msgstr "Bit 1"
3772
3773 #. type: Plain text
3774 #: build/C/man3/mallopt.3:79
3775 msgid ""
3776 "If this bit is set, then, after printing any error message specified by bit "
3777 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3778 "since 2.4, if bit 0 is also set, then, between printing the error message "
3779 "and aborting, the program also prints a stack trace in the manner of "
3780 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3781 "proc/[pid]/maps> (see B<proc>(5))."
3782 msgstr ""
3783
3784 #. type: TP
3785 #: build/C/man3/mallopt.3:79
3786 #, no-wrap
3787 msgid "Bit 2 (since glibc 2.4)"
3788 msgstr "Bit 2 (glibc 2.4 以降)"
3789
3790 #. type: Plain text
3791 #: build/C/man3/mallopt.3:86
3792 msgid ""
3793 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3794 "the one-line message describing the error is simplified to contain just the "
3795 "name of the function where the error was detected and the brief description "
3796 "of the error."
3797 msgstr ""
3798
3799 #. type: Plain text
3800 #: build/C/man3/mallopt.3:91
3801 msgid "The remaining bits in I<value> are ignored."
3802 msgstr ""
3803
3804 #. type: Plain text
3805 #: build/C/man3/mallopt.3:95
3806 msgid ""
3807 "Combining the above details, the following numeric values are meaningful for "
3808 "B<M_CHECK_ACTION>:"
3809 msgstr ""
3810
3811 #. type: IP
3812 #: build/C/man3/mallopt.3:96
3813 #, no-wrap
3814 msgid "0"
3815 msgstr "0"
3816
3817 #. type: Plain text
3818 #: build/C/man3/mallopt.3:98
3819 msgid "Ignore error conditions; continue execution (with undefined results)."
3820 msgstr ""
3821
3822 #. type: IP
3823 #: build/C/man3/mallopt.3:98
3824 #, no-wrap
3825 msgid "1"
3826 msgstr "1"
3827
3828 #. type: Plain text
3829 #: build/C/man3/mallopt.3:100
3830 msgid "Print a detailed error message and continue execution."
3831 msgstr ""
3832
3833 #. type: IP
3834 #: build/C/man3/mallopt.3:100
3835 #, no-wrap
3836 msgid "2"
3837 msgstr "2"
3838
3839 #. type: Plain text
3840 #: build/C/man3/mallopt.3:102
3841 msgid "Abort the program."
3842 msgstr ""
3843
3844 #. type: IP
3845 #: build/C/man3/mallopt.3:102
3846 #, no-wrap
3847 msgid "3"
3848 msgstr "3"
3849
3850 #. type: Plain text
3851 #: build/C/man3/mallopt.3:105
3852 msgid ""
3853 "Print detailed error message, stack trace, and memory mappings, and abort "
3854 "the program."
3855 msgstr ""
3856
3857 #. type: IP
3858 #: build/C/man3/mallopt.3:105
3859 #, no-wrap
3860 msgid "5"
3861 msgstr "5"
3862
3863 #. type: Plain text
3864 #: build/C/man3/mallopt.3:107
3865 msgid "Print a simple error message and continue execution."
3866 msgstr ""
3867
3868 #. type: IP
3869 #: build/C/man3/mallopt.3:107
3870 #, no-wrap
3871 msgid "7"
3872 msgstr "7"
3873
3874 #. type: Plain text
3875 #: build/C/man3/mallopt.3:110
3876 msgid ""
3877 "Print simple error message, stack trace, and memory mappings, and abort the "
3878 "program."
3879 msgstr ""
3880
3881 #. type: Plain text
3882 #: build/C/man3/mallopt.3:116
3883 msgid ""
3884 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3885 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3886 msgstr ""
3887
3888 #. type: Plain text
3889 #: build/C/man3/mallopt.3:121
3890 msgid ""
3891 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3892 "crash may happen much later, and the true cause of the problem is then very "
3893 "hard to track down."
3894 msgstr ""
3895
3896 #. type: TP
3897 #: build/C/man3/mallopt.3:121
3898 #, no-wrap
3899 msgid "B<M_MMAP_MAX>"
3900 msgstr "B<M_MMAP_MAX>"
3901
3902 #.  The following text adapted from comments in the glibc source:
3903 #. type: Plain text
3904 #: build/C/man3/mallopt.3:131
3905 msgid ""
3906 "This parameter specifies the maximum number of allocation requests that may "
3907 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3908 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3909 "and using more than a few of them may degrade performance."
3910 msgstr ""
3911
3912 #. type: Plain text
3913 #: build/C/man3/mallopt.3:138
3914 msgid ""
3915 "The default value is 65,536, a value which has no special significance and "
3916 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3917 "use of B<mmap>(2)  for servicing large allocation requests."
3918 msgstr ""
3919
3920 #. type: TP
3921 #: build/C/man3/mallopt.3:138
3922 #, no-wrap
3923 msgid "B<M_MMAP_THRESHOLD>"
3924 msgstr "B<M_MMAP_THRESHOLD>"
3925
3926 #. type: Plain text
3927 #: build/C/man3/mallopt.3:147
3928 msgid ""
3929 "For allocations greater than or equal to the limit specified (in bytes) by "
3930 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3931 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3932 "break using B<sbrk>(2)."
3933 msgstr ""
3934
3935 #. type: Plain text
3936 #: build/C/man3/mallopt.3:167
3937 msgid ""
3938 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3939 "allocated memory blocks can always be independently released back to the "
3940 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3941 "the top end.)  On the other hand, there are some disadvantages to the use of "
3942 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3943 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3944 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3945 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3946 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3947 msgstr ""
3948
3949 #. type: Plain text
3950 #: build/C/man3/mallopt.3:174
3951 msgid ""
3952 "The lower limit for this parameter is 0.  The upper limit is "
3953 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3954 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3955 msgstr ""
3956
3957 #. type: Plain text
3958 #: build/C/man3/mallopt.3:192
3959 msgid ""
3960 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3961 "initial value of the threshold is 128*1024, but when blocks larger than the "
3962 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3963 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3964 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3965 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3966 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3967 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3968 "parameters is set."
3969 msgstr ""
3970
3971 #. type: TP
3972 #: build/C/man3/mallopt.3:192
3973 #, no-wrap
3974 msgid "B<M_MXFAST> (since glibc 2.3)"
3975 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3976
3977 #.  The following text adapted from comments in the glibc sources:
3978 #. type: Plain text
3979 #: build/C/man3/mallopt.3:212
3980 msgid ""
3981 "Set the upper limit for memory allocation requests that are satisfied using "
3982 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3983 "are storage areas that hold deallocated blocks of memory of the same size "
3984 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3985 "the same size can be handled very quickly by allocating from the fastbin, "
3986 "although memory fragmentation and the overall memory footprint of the "
3987 "program can increase.  The default value for this parameter is "
3988 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
3989 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
3990 "disables the use of fastbins."
3991 msgstr ""
3992
3993 #. type: TP
3994 #: build/C/man3/mallopt.3:212
3995 #, no-wrap
3996 msgid "B<M_PERTURB> (since glibc 2.4)"
3997 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3998
3999 #. type: Plain text
4000 #: build/C/man3/mallopt.3:227
4001 msgid ""
4002 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4003 "(other than allocations via B<calloc>(3))  are initialized to the complement "
4004 "of the value in the least significant byte of I<value>, and when allocated "
4005 "memory is released using B<free>(3), the freed bytes are set to the least "
4006 "significant byte of I<value>.  This can be useful for detecting errors where "
4007 "programs incorrectly rely on allocated memory being initialized to zero, or "
4008 "reuse values in memory that has already been freed."
4009 msgstr ""
4010
4011 #. type: TP
4012 #: build/C/man3/mallopt.3:227
4013 #, no-wrap
4014 msgid "B<M_TOP_PAD>"
4015 msgstr "B<M_TOP_PAD>"
4016
4017 #. type: Plain text
4018 #: build/C/man3/mallopt.3:234
4019 msgid ""
4020 "This parameter defines the amount of padding to employ when calling "
4021 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4022 "parameter is bytes.)  This parameter has an effect in the following "
4023 "circumstances:"
4024 msgstr ""
4025
4026 #. type: Plain text
4027 #: build/C/man3/mallopt.3:241
4028 msgid ""
4029 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4030 "the B<sbrk>(2)  request."
4031 msgstr ""
4032
4033 #. type: Plain text
4034 #: build/C/man3/mallopt.3:247
4035 msgid ""
4036 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4037 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4038 "top of the heap."
4039 msgstr ""
4040
4041 #. type: Plain text
4042 #: build/C/man3/mallopt.3:251
4043 msgid ""
4044 "In either case, the amount of padding is always rounded to a system page "
4045 "boundary."
4046 msgstr ""
4047
4048 #. type: Plain text
4049 #: build/C/man3/mallopt.3:258
4050 msgid ""
4051 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4052 "system calls (when the parameter is set low)  and wasting unused memory at "
4053 "the top of the heap (when the parameter is set high)."
4054 msgstr ""
4055
4056 #.  DEFAULT_TOP_PAD in glibc source
4057 #. type: Plain text
4058 #: build/C/man3/mallopt.3:261
4059 msgid "The default value for this parameter is 128*1024."
4060 msgstr ""
4061
4062 #. type: TP
4063 #: build/C/man3/mallopt.3:261
4064 #, no-wrap
4065 msgid "B<M_TRIM_THRESHOLD>"
4066 msgstr "B<M_TRIM_THRESHOLD>"
4067
4068 #. type: Plain text
4069 #: build/C/man3/mallopt.3:277
4070 msgid ""
4071 "When the amount of contiguous free memory at the top of the heap grows "
4072 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4073 "back to the system.  (This can be useful in programs that continue to "
4074 "execute for a long period after freeing a significant amount of memory.)  "
4075 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4076 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4077 msgstr ""
4078
4079 #. type: Plain text
4080 #: build/C/man3/mallopt.3:282
4081 msgid ""
4082 "The default value for this parameter is 128*1024.  Setting "
4083 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4084 msgstr ""
4085
4086 #
4087 #
4088 #
4089 #.  FIXME Do the arena parameters need to be documented?
4090 #.  .TP
4091 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4092 #.  .TP
4093 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4094 #.  Environment variables
4095 #.      MALLOC_ARENA_MAX_
4096 #.      MALLOC_ARENA_TEST_
4097 #.  http://udrepper.livejournal.com/20948.html describes some details
4098 #.      of the MALLOC_ARENA_* environment variables.
4099 #.  These macros aren't enabled in production releases until 2.15?
4100 #.  (see glibc malloc/Makefile)
4101 #. type: Plain text
4102 #: build/C/man3/mallopt.3:305
4103 msgid ""
4104 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4105 "of system calls (when the parameter is set low)  and wasting unused memory "
4106 "at the top of the heap (when the parameter is set high)."
4107 msgstr ""
4108
4109 #. type: SS
4110 #: build/C/man3/mallopt.3:305
4111 #, no-wrap
4112 msgid "Environment variables"
4113 msgstr "環境変数"
4114
4115 #. type: Plain text
4116 #: build/C/man3/mallopt.3:320
4117 msgid ""
4118 "A number of environment variables can be defined to modify some of the same "
4119 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4120 "advantage that the source code of the program need not be changed.  To be "
4121 "effective, these variables must be defined before the first call to a memory-"
4122 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4123 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4124 "these variables are ignored in set-user-ID and set-group-ID programs."
4125 msgstr ""
4126
4127 #. type: Plain text
4128 #: build/C/man3/mallopt.3:323
4129 msgid ""
4130 "The environment variables are as follows (note the trailing underscore at "
4131 "the end of the name of each variable):"
4132 msgstr ""
4133
4134 #. type: TP
4135 #: build/C/man3/mallopt.3:323
4136 #, no-wrap
4137 msgid "B<MALLOC_CHECK_>"
4138 msgstr "B<MALLOC_CHECK_>"
4139
4140 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4141 #.  when MALLOC_CHECK_ was set.
4142 #. type: Plain text
4143 #: build/C/man3/mallopt.3:340
4144 msgid ""
4145 "This environment variable controls the same parameter as B<mallopt>()  "
4146 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4147 "special implementation of the memory-allocation functions is used.  (This is "
4148 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4149 "performs additional error checking, but is slower than the standard set of "
4150 "memory-allocation functions.  (This implementation does not detect all "
4151 "possible errors; memory leaks can still occur.)"
4152 msgstr ""
4153
4154 #. type: Plain text
4155 #: build/C/man3/mallopt.3:345
4156 msgid ""
4157 "The value assigned to this environment variable should be a single digit, "
4158 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4159 "the initial digit are ignored."
4160 msgstr ""
4161
4162 #. type: Plain text
4163 #: build/C/man3/mallopt.3:354
4164 msgid ""
4165 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4166 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4167 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4168 "also has an effect for set-user-ID and set-group-ID programs."
4169 msgstr ""
4170
4171 #. type: TP
4172 #: build/C/man3/mallopt.3:354
4173 #, no-wrap
4174 msgid "B<MALLOC_MMAP_MAX_>"
4175 msgstr "B<MALLOC_MMAP_MAX_>"
4176
4177 #. type: Plain text
4178 #: build/C/man3/mallopt.3:359
4179 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4180 msgstr ""
4181
4182 #. type: TP
4183 #: build/C/man3/mallopt.3:359
4184 #, no-wrap
4185 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4186 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4187
4188 #. type: Plain text
4189 #: build/C/man3/mallopt.3:364
4190 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4191 msgstr ""
4192
4193 #. type: TP
4194 #: build/C/man3/mallopt.3:364
4195 #, no-wrap
4196 msgid "B<MALLOC_PERTURB_>"
4197 msgstr "B<MALLOC_PERTURB_>"
4198
4199 #. type: Plain text
4200 #: build/C/man3/mallopt.3:369
4201 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4202 msgstr ""
4203
4204 #. type: TP
4205 #: build/C/man3/mallopt.3:369
4206 #, no-wrap
4207 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4208 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4209
4210 #. type: Plain text
4211 #: build/C/man3/mallopt.3:374
4212 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4213 msgstr ""
4214
4215 #. type: TP
4216 #: build/C/man3/mallopt.3:374
4217 #, no-wrap
4218 msgid "B<MALLOC_TOP_PAD_>"
4219 msgstr "B<MALLOC_TOP_PAD_>"
4220
4221 #. type: Plain text
4222 #: build/C/man3/mallopt.3:379
4223 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4224 msgstr ""
4225
4226 #. type: Plain text
4227 #: build/C/man3/mallopt.3:384
4228 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4229 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4230
4231 #.  .SH VERSIONS
4232 #.  Available already in glibc 2.0, possibly earlier
4233 #. type: Plain text
4234 #: build/C/man3/mallopt.3:392
4235 msgid "On error, I<errno> is I<not> set."
4236 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4237
4238 #.  .SH NOTES
4239 #. type: Plain text
4240 #: build/C/man3/mallopt.3:406
4241 msgid ""
4242 "This function is not specified by POSIX or the C standards.  A similar "
4243 "function exists on many System V derivatives, but the range of values for "
4244 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4245 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4246 "implemented in glibc."
4247 msgstr ""
4248
4249 #. type: Plain text
4250 #: build/C/man3/mallopt.3:410
4251 msgid "Specifying an invalid value for I<param> does not generate an error."
4252 msgstr ""
4253
4254 #.  FIXME . This looks buggy:
4255 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4256 #.  malloc requests are rounded up:
4257 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4258 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4259 #. type: Plain text
4260 #: build/C/man3/mallopt.3:418
4261 msgid ""
4262 "A calculation error within the glibc implementation means that a call of the "
4263 "form:"
4264 msgstr ""
4265
4266 #. type: Plain text
4267 #: build/C/man3/mallopt.3:421
4268 #, no-wrap
4269 msgid "    mallopt(M_MXFAST, n)\n"
4270 msgstr "    mallopt(M_MXFAST, n)\n"
4271
4272 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4273 #. type: Plain text
4274 #: build/C/man3/mallopt.3:433
4275 msgid ""
4276 "does not result in fastbins being employed for all allocations of size up to "
4277 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4278 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4279 "integer."
4280 msgstr ""
4281
4282 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4283 #. type: Plain text
4284 #: build/C/man3/mallopt.3:454
4285 msgid ""
4286 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4287 "of allocated memory are initialized to the complement of the byte in "
4288 "I<value>, and when that memory is freed, the bytes of the region are "
4289 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4290 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4291 "precisely the block of memory being freed by the call I<free(p)>, the block "
4292 "starting at I<p+sizeof(size_t)> is initialized."
4293 msgstr ""
4294
4295 #. type: Plain text
4296 #: build/C/man3/mallopt.3:463
4297 msgid ""
4298 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4299 "is supplied with an (integer) command-line argument, then that argument is "
4300 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4301 "block of memory, and frees it twice (an error)."
4302 msgstr ""
4303
4304 #. type: Plain text
4305 #: build/C/man3/mallopt.3:467
4306 msgid ""
4307 "The following shell session shows what happens when we run this program "
4308 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4309 msgstr ""
4310
4311 #. type: Plain text
4312 #: build/C/man3/mallopt.3:487
4313 #, no-wrap
4314 msgid ""
4315 "$ B<./a.out>\n"
4316 "main(): returned from first free() call\n"
4317 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4318 "======= Backtrace: =========\n"
4319 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4320 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4321 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4322 "\\&./a.out[0x80485db]\n"
4323 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4324 "\\&./a.out[0x8048471]\n"
4325 "======= Memory map: ========\n"
4326 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4327 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4328 "[some lines omitted]\n"
4329 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4330 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4331 "Aborted (core dumped)\n"
4332 msgstr ""
4333 "$ B<./a.out>\n"
4334 "main(): returned from first free() call\n"
4335 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4336 "======= Backtrace: =========\n"
4337 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4338 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4339 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4340 "\\&./a.out[0x80485db]\n"
4341 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4342 "\\&./a.out[0x8048471]\n"
4343 "======= Memory map: ========\n"
4344 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4345 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4346 "[some lines omitted]\n"
4347 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4348 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4349 "Aborted (core dumped)\n"
4350
4351 #. type: Plain text
4352 #: build/C/man3/mallopt.3:492
4353 msgid ""
4354 "The following runs show the results when employing other values for "
4355 "B<M_CHECK_ACTION>:"
4356 msgstr ""
4357
4358 #. type: Plain text
4359 #: build/C/man3/mallopt.3:505
4360 #, no-wrap
4361 msgid ""
4362 "$ B<./a.out 1>             # Diagnose error and continue\n"
4363 "main(): returned from first free() call\n"
4364 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4365 "main(): returned from second free() call\n"
4366 "$ B<./a.out 2>             # Abort without error message\n"
4367 "main(): returned from first free() call\n"
4368 "Aborted (core dumped)\n"
4369 "$ B<./a.out 0>             # Ignore error and continue\n"
4370 "main(): returned from first free() call\n"
4371 "main(): returned from second free() call\n"
4372 msgstr ""
4373 "$ B<./a.out 1>             # Diagnose error and continue\n"
4374 "main(): returned from first free() call\n"
4375 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4376 "main(): returned from second free() call\n"
4377 "$ B<./a.out 2>             # Abort without error message\n"
4378 "main(): returned from first free() call\n"
4379 "Aborted (core dumped)\n"
4380 "$ B<./a.out 0>             # Ignore error and continue\n"
4381 "main(): returned from first free() call\n"
4382 "main(): returned from second free() call\n"
4383
4384 #. type: Plain text
4385 #: build/C/man3/mallopt.3:511
4386 msgid ""
4387 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4388 "environment variable:"
4389 msgstr ""
4390
4391 #. type: Plain text
4392 #: build/C/man3/mallopt.3:518
4393 #, no-wrap
4394 msgid ""
4395 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4396 "main(): returned from first free() call\n"
4397 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4398 "main(): returned from second free() call\n"
4399 msgstr ""
4400 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4401 "main(): returned from first free() call\n"
4402 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4403 "main(): returned from second free() call\n"
4404
4405 #. type: Plain text
4406 #: build/C/man3/mallopt.3:526
4407 #, no-wrap
4408 msgid ""
4409 "#include E<lt>malloc.hE<gt>\n"
4410 "#include E<lt>stdio.hE<gt>\n"
4411 "#include E<lt>stdlib.hE<gt>\n"
4412 msgstr ""
4413 "#include E<lt>malloc.hE<gt>\n"
4414 "#include E<lt>stdio.hE<gt>\n"
4415 "#include E<lt>stdlib.hE<gt>\n"
4416
4417 #. type: Plain text
4418 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4419 #, no-wrap
4420 msgid ""
4421 "int\n"
4422 "main(int argc, char *argv[])\n"
4423 "{\n"
4424 "    char *p;\n"
4425 msgstr ""
4426 "int\n"
4427 "main(int argc, char *argv[])\n"
4428 "{\n"
4429 "    char *p;\n"
4430
4431 #. type: Plain text
4432 #: build/C/man3/mallopt.3:538
4433 #, no-wrap
4434 msgid ""
4435 "    if (argc E<gt> 1) {\n"
4436 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4437 "            fprintf(stderr, \"mallopt() failed\");\n"
4438 "            exit(EXIT_FAILURE);\n"
4439 "        }\n"
4440 "    }\n"
4441 msgstr ""
4442 "    if (argc E<gt> 1) {\n"
4443 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4444 "            fprintf(stderr, \"mallopt() failed\");\n"
4445 "            exit(EXIT_FAILURE);\n"
4446 "        }\n"
4447 "    }\n"
4448
4449 #. type: Plain text
4450 #: build/C/man3/mallopt.3:544
4451 #, no-wrap
4452 msgid ""
4453 "    p = malloc(1000);\n"
4454 "    if (p == NULL) {\n"
4455 "        fprintf(stderr, \"malloc() failed\");\n"
4456 "        exit(EXIT_FAILURE);\n"
4457 "    }\n"
4458 msgstr ""
4459 "    p = malloc(1000);\n"
4460 "    if (p == NULL) {\n"
4461 "        fprintf(stderr, \"malloc() failed\");\n"
4462 "        exit(EXIT_FAILURE);\n"
4463 "    }\n"
4464
4465 #. type: Plain text
4466 #: build/C/man3/mallopt.3:547
4467 #, no-wrap
4468 msgid ""
4469 "    free(p);\n"
4470 "    printf(\"main(): returned from first free() call\\en\");\n"
4471 msgstr ""
4472 "    free(p);\n"
4473 "    printf(\"main(): returned from first free() call\\en\");\n"
4474
4475 #. type: Plain text
4476 #: build/C/man3/mallopt.3:550
4477 #, no-wrap
4478 msgid ""
4479 "    free(p);\n"
4480 "    printf(\"main(): returned from second free() call\\en\");\n"
4481 msgstr ""
4482 "    free(p);\n"
4483 "    printf(\"main(): returned from second free() call\\en\");\n"
4484
4485 #. type: Plain text
4486 #: build/C/man3/mallopt.3:568
4487 msgid ""
4488 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4489 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4490 "B<mtrace>(3), B<posix_memalign>(3)"
4491 msgstr ""
4492 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4493 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4494 "B<mtrace>(3), B<posix_memalign>(3)"
4495
4496 #. type: TH
4497 #: build/C/man3/mcheck.3:25
4498 #, no-wrap
4499 msgid "MCHECK"
4500 msgstr "MCHECK"
4501
4502 #. type: TH
4503 #: build/C/man3/mcheck.3:25
4504 #, no-wrap
4505 msgid "2014-01-11"
4506 msgstr "2014-01-11"
4507
4508 #. type: Plain text
4509 #: build/C/man3/mcheck.3:28
4510 msgid ""
4511 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4512 msgstr ""
4513
4514 #. type: Plain text
4515 #: build/C/man3/mcheck.3:31
4516 #, no-wrap
4517 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4518 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4519
4520 #. type: Plain text
4521 #: build/C/man3/mcheck.3:33
4522 #, no-wrap
4523 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4524 msgstr ""
4525
4526 #. type: Plain text
4527 #: build/C/man3/mcheck.3:35
4528 #, no-wrap
4529 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4530 msgstr ""
4531
4532 #. type: Plain text
4533 #: build/C/man3/mcheck.3:37
4534 #, no-wrap
4535 msgid "B<void mcheck_check_all(void);>\n"
4536 msgstr "B<void mcheck_check_all(void);>\n"
4537
4538 #. type: Plain text
4539 #: build/C/man3/mcheck.3:39
4540 #, no-wrap
4541 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4542 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4543
4544 #. type: Plain text
4545 #: build/C/man3/mcheck.3:51
4546 msgid ""
4547 "The B<mcheck>()  function installs a set of debugging hooks for the "
4548 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4549 "certain consistency checks to be performed on the state of the heap.  The "
4550 "checks can detect application errors such as freeing a block of memory more "
4551 "than once or corrupting the bookkeeping data structures that immediately "
4552 "precede a block of allocated memory."
4553 msgstr ""
4554
4555 #. type: Plain text
4556 #: build/C/man3/mcheck.3:63
4557 msgid ""
4558 "To be effective, the B<mcheck>()  function must be called before the first "
4559 "call to B<malloc>(3)  or a related function.  In cases where this is "
4560 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4561 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4562 "to a memory-allocation function."
4563 msgstr ""
4564
4565 #. type: Plain text
4566 #: build/C/man3/mcheck.3:71
4567 msgid ""
4568 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4569 "checks on all allocated blocks whenever one of the memory-allocation "
4570 "functions is called.  This can be very slow!"
4571 msgstr ""
4572
4573 #. type: Plain text
4574 #: build/C/man3/mcheck.3:78
4575 msgid ""
4576 "The B<mcheck_check_all>()  function causes an immediate check on all "
4577 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4578 "beforehand."
4579 msgstr ""
4580
4581 #. type: Plain text
4582 #: build/C/man3/mcheck.3:91
4583 msgid ""
4584 "If the system detects an inconsistency in the heap, the caller-supplied "
4585 "function pointed to by I<abortfunc> is invoked with a single argument "
4586 "argument, I<mstatus>, that indicates what type of inconsistency was "
4587 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4588 "message on I<stderr> and calls B<abort>(3)."
4589 msgstr ""
4590
4591 #. type: Plain text
4592 #: build/C/man3/mcheck.3:103
4593 msgid ""
4594 "The B<mprobe>()  function performs a consistency check on the block of "
4595 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4596 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4597 msgstr ""
4598
4599 #. type: Plain text
4600 #: build/C/man3/mcheck.3:111
4601 msgid ""
4602 "The following list describes the values returned by B<mprobe>()  or passed "
4603 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4604 msgstr ""
4605
4606 #. type: TP
4607 #: build/C/man3/mcheck.3:111
4608 #, no-wrap
4609 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4610 msgstr ""
4611
4612 #. type: Plain text
4613 #: build/C/man3/mcheck.3:116
4614 msgid ""
4615 "B<mcheck>()  was not called before the first memory allocation function was "
4616 "called.  Consistency checking is not possible."
4617 msgstr ""
4618
4619 #. type: TP
4620 #: build/C/man3/mcheck.3:116
4621 #, no-wrap
4622 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4623 msgstr ""
4624
4625 #. type: Plain text
4626 #: build/C/man3/mcheck.3:119
4627 msgid "No inconsistency detected."
4628 msgstr ""
4629
4630 #. type: TP
4631 #: build/C/man3/mcheck.3:119
4632 #, no-wrap
4633 msgid "B<MCHECK_HEAD>"
4634 msgstr "B<MCHECK_HEAD>"
4635
4636 #. type: Plain text
4637 #: build/C/man3/mcheck.3:122
4638 msgid "Memory preceding an allocated block was clobbered."
4639 msgstr ""
4640
4641 #. type: TP
4642 #: build/C/man3/mcheck.3:122
4643 #, no-wrap
4644 msgid "B<MCHECK_TAIL>"
4645 msgstr "B<MCHECK_TAIL>"
4646
4647 #. type: Plain text
4648 #: build/C/man3/mcheck.3:125
4649 msgid "Memory following an allocated block was clobbered."
4650 msgstr ""
4651
4652 #. type: TP
4653 #: build/C/man3/mcheck.3:125
4654 #, no-wrap
4655 msgid "B<MCHECK_FREE>"
4656 msgstr "B<MCHECK_FREE>"
4657
4658 #. type: Plain text
4659 #: build/C/man3/mcheck.3:129
4660 msgid "A block of memory was freed twice."
4661 msgstr ""
4662
4663 #. type: Plain text
4664 #: build/C/man3/mcheck.3:134
4665 msgid ""
4666 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4667 msgstr ""
4668
4669 #. type: Plain text
4670 #: build/C/man3/mcheck.3:145
4671 msgid ""
4672 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4673 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4674 "since at least glibc 2.0"
4675 msgstr ""
4676
4677 #.  But is MALLOC_CHECK_ slower?
4678 #. type: Plain text
4679 #: build/C/man3/mcheck.3:159
4680 msgid ""
4681 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4682 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4683 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4684 "application to be relinked."
4685 msgstr ""
4686
4687 #. type: Plain text
4688 #: build/C/man3/mcheck.3:165
4689 msgid ""
4690 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4691 "same block of memory twice.  The following shell session demonstrates what "
4692 "happens when running the program:"
4693 msgstr ""
4694
4695 #. type: Plain text
4696 #: build/C/man3/mcheck.3:170
4697 #, no-wrap
4698 msgid ""
4699 "$B< ./a.out>\n"
4700 "About to free\n"
4701 msgstr ""
4702
4703 #. type: Plain text
4704 #: build/C/man3/mcheck.3:174
4705 #, no-wrap
4706 msgid ""
4707 "About to free a second time\n"
4708 "block freed twice\n"
4709 "Aborted (core dumped)\n"
4710 msgstr ""
4711
4712 #. type: Plain text
4713 #: build/C/man3/mcheck.3:182
4714 #, no-wrap
4715 msgid ""
4716 "#include E<lt>stdlib.hE<gt>\n"
4717 "#include E<lt>stdio.hE<gt>\n"
4718 "#include E<lt>mcheck.hE<gt>\n"
4719 msgstr ""
4720 "#include E<lt>stdlib.hE<gt>\n"
4721 "#include E<lt>stdio.hE<gt>\n"
4722 "#include E<lt>mcheck.hE<gt>\n"
4723
4724 #. type: Plain text
4725 #: build/C/man3/mcheck.3:190
4726 #, no-wrap
4727 msgid ""
4728 "    if (mcheck(NULL) != 0) {\n"
4729 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4730 msgstr ""
4731
4732 #. type: Plain text
4733 #: build/C/man3/mcheck.3:193
4734 #, no-wrap
4735 msgid ""
4736 "        exit(EXIT_FAILURE);\n"
4737 "    }\n"
4738 msgstr ""
4739 "        exit(EXIT_FAILURE);\n"
4740 "    }\n"
4741
4742 #. type: Plain text
4743 #: build/C/man3/mcheck.3:195
4744 #, no-wrap
4745 msgid "    p = malloc(1000);\n"
4746 msgstr "    p = malloc(1000);\n"
4747
4748 #. type: Plain text
4749 #: build/C/man3/mcheck.3:200
4750 #, no-wrap
4751 msgid ""
4752 "    fprintf(stderr, \"About to free\\en\");\n"
4753 "    free(p);\n"
4754 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4755 "    free(p);\n"
4756 msgstr ""
4757
4758 #. type: Plain text
4759 #: build/C/man3/mcheck.3:208
4760 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4761 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4762
4763 #. type: TH
4764 #: build/C/man2/mlock.2:26
4765 #, no-wrap
4766 msgid "MLOCK"
4767 msgstr "MLOCK"
4768
4769 #. type: TH
4770 #: build/C/man2/mlock.2:26
4771 #, no-wrap
4772 msgid "2014-04-14"
4773 msgstr "2014-04-14"
4774
4775 #. type: Plain text
4776 #: build/C/man2/mlock.2:29
4777 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4778 msgstr "mlock - メモリのロックとロック解除を行う"
4779
4780 #. type: Plain text
4781 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4782 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4783 #, no-wrap
4784 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4785 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4786
4787 #. type: Plain text
4788 #: build/C/man2/mlock.2:35
4789 #, no-wrap
4790 msgid ""
4791 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4792 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4793 msgstr ""
4794 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4795 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4796
4797 #. type: Plain text
4798 #: build/C/man2/mlock.2:38
4799 #, no-wrap
4800 msgid ""
4801 "B<int mlockall(int >I<flags>B<);>\n"
4802 "B<int munlockall(void);>\n"
4803 msgstr ""
4804 "B<int mlockall(int >I<flags>B<);>\n"
4805 "B<int munlockall(void);>\n"
4806
4807 #. type: Plain text
4808 #: build/C/man2/mlock.2:54
4809 msgid ""
4810 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4811 "process's virtual address space into RAM, preventing that memory from being "
4812 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4813 "converse operation, respectively unlocking part or all of the calling "
4814 "process's virtual address space, so that pages in the specified virtual "
4815 "address range may once more to be swapped out if required by the kernel "
4816 "memory manager.  Memory locking and unlocking are performed in units of "
4817 "whole pages."
4818 msgstr ""
4819 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4820 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4821 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4822 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4823 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4824 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4825 "る。"
4826
4827 #. type: SS
4828 #: build/C/man2/mlock.2:54
4829 #, no-wrap
4830 msgid "mlock() and munlock()"
4831 msgstr "mlock() と munlock()"
4832
4833 #. type: Plain text
4834 #: build/C/man2/mlock.2:64
4835 msgid ""
4836 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4837 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4838 "address range are guaranteed to be resident in RAM when the call returns "
4839 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4840 msgstr ""
4841 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4842 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4843 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4844 "れるまで RAM に残り続けることが保証される。"
4845
4846 #. type: Plain text
4847 #: build/C/man2/mlock.2:73
4848 msgid ""
4849 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4850 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4851 "of the specified memory range can be moved to external swap space again by "
4852 "the kernel."
4853 msgstr ""
4854 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4855 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4856 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4857
4858 #. type: SS
4859 #: build/C/man2/mlock.2:73
4860 #, no-wrap
4861 msgid "mlockall() and munlockall()"
4862 msgstr "mlockall() と munlockall()"
4863
4864 #. type: Plain text
4865 #: build/C/man2/mlock.2:83
4866 msgid ""
4867 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4868 "process.  This includes the pages of the code, data and stack segment, as "
4869 "well as shared libraries, user space kernel data, shared memory, and memory-"
4870 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4871 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4872 "later unlocked."
4873 msgstr ""
4874 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4875 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4876 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4877 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4878 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4879 "残り続けることが保証される。"
4880
4881 #. type: Plain text
4882 #: build/C/man2/mlock.2:88
4883 msgid ""
4884 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4885 "following constants:"
4886 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4887
4888 #. type: TP
4889 #: build/C/man2/mlock.2:88
4890 #, no-wrap
4891 msgid "B<MCL_CURRENT>"
4892 msgstr "B<MCL_CURRENT>"
4893
4894 #. type: Plain text
4895 #: build/C/man2/mlock.2:92
4896 msgid ""
4897 "Lock all pages which are currently mapped into the address space of the "
4898 "process."
4899 msgstr ""
4900 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4901
4902 #. type: TP
4903 #: build/C/man2/mlock.2:92
4904 #, no-wrap
4905 msgid "B<MCL_FUTURE>"
4906 msgstr "B<MCL_FUTURE>"
4907
4908 #. type: Plain text
4909 #: build/C/man2/mlock.2:99
4910 msgid ""
4911 "Lock all pages which will become mapped into the address space of the "
4912 "process in the future.  These could be for instance new pages required by a "
4913 "growing heap and stack as well as new memory-mapped files or shared memory "
4914 "regions."
4915 msgstr ""
4916 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4917 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4918 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4919
4920 #. type: Plain text
4921 #: build/C/man2/mlock.2:112
4922 msgid ""
4923 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4924 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4925 "of locked bytes to exceed the permitted maximum (see below).  In the same "
4926 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4927 "expansion and deliver a B<SIGSEGV> signal to the process."
4928 msgstr ""
4929 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4930 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4931 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4932 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4933 "スに送る。"
4934
4935 #. type: Plain text
4936 #: build/C/man2/mlock.2:116
4937 msgid ""
4938 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4939 "calling process."
4940 msgstr ""
4941 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4942 "全てのページをロック解除する。"
4943
4944 #. type: Plain text
4945 #: build/C/man2/mlock.2:122
4946 msgid ""
4947 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4948 "is set appropriately, and no changes are made to any locks in the address "
4949 "space of the process."
4950 msgstr ""
4951 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4952 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4953 "れない。"
4954
4955 #. type: Plain text
4956 #: build/C/man2/mlock.2:131
4957 msgid ""
4958 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4959 "resource limit, but tried to lock more memory than the limit permitted.  "
4960 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4961 msgstr ""
4962 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4963 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4964 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4965
4966 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4967 #.  take into account whether the to-be-locked range overlaps with
4968 #.  already locked pages.  Thus, suppose we allocate
4969 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4970 #.  mlock(), and then lock the *same* page range a second time.
4971 #.  In the case, the second mlock() call will fail, since the check
4972 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4973 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4974 #. type: Plain text
4975 #: build/C/man2/mlock.2:143
4976 msgid ""
4977 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4978 "RAM."
4979 msgstr ""
4980 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4981
4982 #. SVr4 documents an additional EAGAIN error code.
4983 #. type: Plain text
4984 #: build/C/man2/mlock.2:149
4985 msgid ""
4986 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4987 "perform the requested operation."
4988 msgstr ""
4989 "呼び出し側が特権を持っていないが、\n"
4990 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4991
4992 #. type: Plain text
4993 #: build/C/man2/mlock.2:154
4994 msgid "For B<mlock>()  and B<munlock>():"
4995 msgstr "B<mlock>()  と B<munlock>()  用として:"
4996
4997 #. type: Plain text
4998 #: build/C/man2/mlock.2:157
4999 msgid "Some or all of the specified address range could not be locked."
5000 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5001
5002 #. type: Plain text
5003 #: build/C/man2/mlock.2:164
5004 msgid ""
5005 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5006 "addition may have resulted in an overflow)."
5007 msgstr ""
5008 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5009 "(例えば、加算でオーバーフローが発生したなど)。"
5010
5011 #. type: Plain text
5012 #: build/C/man2/mlock.2:169
5013 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5014 msgstr ""
5015 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5016
5017 #. type: Plain text
5018 #: build/C/man2/mlock.2:173
5019 msgid ""
5020 "Some of the specified address range does not correspond to mapped pages in "
5021 "the address space of the process."
5022 msgstr ""
5023 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5024 "い。"
5025
5026 #. type: Plain text
5027 #: build/C/man2/mlock.2:176
5028 msgid "For B<mlockall>():"
5029 msgstr "B<mlockall>()  用として:"
5030
5031 #. type: Plain text
5032 #: build/C/man2/mlock.2:179
5033 msgid "Unknown I<flags> were specified."
5034 msgstr "未知の I<flags> が指定された。"
5035
5036 #. type: Plain text
5037 #: build/C/man2/mlock.2:182
5038 msgid "For B<munlockall>():"
5039 msgstr "B<munlockall>()  用として:"
5040
5041 #. type: Plain text
5042 #: build/C/man2/mlock.2:186
5043 msgid ""
5044 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5045 msgstr ""
5046 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5047
5048 #. type: Plain text
5049 #: build/C/man2/mlock.2:188
5050 msgid "POSIX.1-2001, SVr4."
5051 msgstr "POSIX.1-2001, SVr4."
5052
5053 #. type: SH
5054 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
5055 #, no-wrap
5056 msgid "AVAILABILITY"
5057 msgstr "可用性"
5058
5059 #. type: Plain text
5060 #: build/C/man2/mlock.2:200
5061 msgid ""
5062 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5063 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5064 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5065 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5066 msgstr ""
5067 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5068 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5069 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5070 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5071 "び出すことで決定できる。"
5072
5073 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5074 #.  -1: unavailable, 0: ask using sysconf().
5075 #.  glibc defines it to 1.
5076 #. type: Plain text
5077 #: build/C/man2/mlock.2:213
5078 msgid ""
5079 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5080 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5081 "than 0.  (See also B<sysconf>(3).)"
5082 msgstr ""
5083 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5084 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5085 "(B<sysconf>(3)  も参照のこと)。"
5086
5087 #. type: Plain text
5088 #: build/C/man2/mlock.2:231
5089 msgid ""
5090 "Memory locking has two main applications: real-time algorithms and high-"
5091 "security data processing.  Real-time applications require deterministic "
5092 "timing, and, like scheduling, paging is one major cause of unexpected "
5093 "program execution delays.  Real-time applications will usually also switch "
5094 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5095 "security software often handles critical bytes like passwords or secret keys "
5096 "as data structures.  As a result of paging, these secrets could be "
5097 "transferred onto a persistent swap store medium, where they might be "
5098 "accessible to the enemy long after the security software has erased the "
5099 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5100 "laptops and some desktop computers will save a copy of the system's RAM to "
5101 "disk, regardless of memory locks.)"
5102 msgstr ""
5103 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5104 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5105 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5106 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5107 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5108 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5109 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5110 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
5111 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
5112 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
5113 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
5114 "存することに注意)。"
5115
5116 #. type: Plain text
5117 #: build/C/man2/mlock.2:244
5118 msgid ""
5119 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5120 "faults should reserve enough locked stack pages before entering the time-"
5121 "critical section, so that no page fault can be caused by function calls.  "
5122 "This can be achieved by calling a function that allocates a sufficiently "
5123 "large automatic variable (an array) and writes to the memory occupied by "
5124 "this array in order to touch these stack pages.  This way, enough pages will "
5125 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5126 "that not even copy-on-write page faults can occur in the critical section."
5127 msgstr ""
5128 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5129 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5130 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5131 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5132 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
5133 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5134 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5135 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5136 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5137
5138 #. type: Plain text
5139 #: build/C/man2/mlock.2:257
5140 msgid ""
5141 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5142 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5143 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5144 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5145 msgstr ""
5146 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5147 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5148 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5149 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5150
5151 #. type: Plain text
5152 #: build/C/man2/mlock.2:261
5153 msgid ""
5154 "The memory lock on an address range is automatically removed if the address "
5155 "range is unmapped via B<munmap>(2)."
5156 msgstr ""
5157 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5158 "よってアンマップされた場合は削除される。"
5159
5160 #. type: Plain text
5161 #: build/C/man2/mlock.2:274
5162 msgid ""
5163 "Memory locks do not stack, that is, pages which have been locked several "
5164 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5165 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5166 "Pages which are mapped to several locations or by several processes stay "
5167 "locked into RAM as long as they are locked at least at one location or by at "
5168 "least one process."
5169 msgstr ""
5170 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5171 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5172 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5173 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5174 "のプロセスでロックされている限りは RAM に残り続ける。"
5175
5176 #. type: Plain text
5177 #: build/C/man2/mlock.2:285
5178 msgid ""
5179 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5180 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5181 "implementation to require that I<addr> is page aligned, so portable "
5182 "applications should ensure this."
5183 msgstr ""
5184 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5185 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5186 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5187 "ケーションではきちんと境界に合わせた方が良い。"
5188
5189 #. type: Plain text
5190 #: build/C/man2/mlock.2:298
5191 msgid ""
5192 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5193 "many kilobytes of memory the process with ID I<PID> has locked using "
5194 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5195 msgstr ""
5196 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5197 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5198 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5199 "表示される。"
5200
5201 #. type: SS
5202 #: build/C/man2/mlock.2:298
5203 #, no-wrap
5204 msgid "Limits and permissions"
5205 msgstr "制限と権限"
5206
5207 #. type: Plain text
5208 #: build/C/man2/mlock.2:305
5209 msgid ""
5210 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5211 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5212 "defines a limit on how much memory the process may lock."
5213 msgstr ""
5214 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5215 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5216 "できるかの制限を定義する。"
5217
5218 #. type: Plain text
5219 #: build/C/man2/mlock.2:311
5220 msgid ""
5221 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5222 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5223 "instead defines a limit on how much memory an unprivileged process may lock."
5224 msgstr ""
5225 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5226 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5227 "クできるメモリ量の制限を定義する。"
5228
5229 #. type: Plain text
5230 #: build/C/man2/mlock.2:319
5231 msgid ""
5232 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5233 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5234 "was rectified in kernel 2.4.18."
5235 msgstr ""
5236 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5237 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5238 "ネル 2.4.18 で修正された。"
5239
5240 #.  See the following LKML thread:
5241 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5242 #.  "Rationale for RLIMIT_MEMLOCK"
5243 #.  23 Jan 2006
5244 #. type: Plain text
5245 #: build/C/man2/mlock.2:336
5246 msgid ""
5247 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5248 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5249 "example, setting its effective UID to a nonzero value), then subsequent "
5250 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5251 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5252 msgstr ""
5253 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5254 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5255 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5256 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5257 "B<brk>(2))  は失敗する。"
5258
5259 #. type: Plain text
5260 #: build/C/man2/mlock.2:343
5261 msgid ""
5262 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5263 "B<capabilities>(7)"
5264 msgstr ""
5265 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5266 "B<capabilities>(7)"
5267
5268 #. type: TH
5269 #: build/C/man2/mmap.2:40
5270 #, no-wrap
5271 msgid "MMAP"
5272 msgstr "MMAP"
5273
5274 #. type: TH
5275 #: build/C/man2/mmap.2:40 build/C/man2/sync_file_range.2:30
5276 #, no-wrap
5277 msgid "2014-08-19"
5278 msgstr "2014-08-19"
5279
5280 #. type: Plain text
5281 #: build/C/man2/mmap.2:43
5282 msgid "mmap, munmap - map or unmap files or devices into memory"
5283 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5284
5285 #. type: Plain text
5286 #: build/C/man2/mmap.2:51
5287 #, no-wrap
5288 msgid ""
5289 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5290 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5291 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5292 msgstr ""
5293 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5294 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5295 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5296
5297 #. type: Plain text
5298 #: build/C/man2/mmap.2:54
5299 msgid "See NOTES for information on feature test macro requirements."
5300 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5301
5302 #. type: Plain text
5303 #: build/C/man2/mmap.2:63
5304 msgid ""
5305 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5306 "process.  The starting address for the new mapping is specified in I<addr>.  "
5307 "The I<length> argument specifies the length of the mapping."
5308 msgstr ""
5309 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5310 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5311 "は I<length> 引き数で指定される。"
5312
5313 #.  Before Linux 2.6.24, the address was rounded up to the next page
5314 #.  boundary; since 2.6.24, it is rounded down!
5315 #. type: Plain text
5316 #: build/C/man2/mmap.2:77
5317 msgid ""
5318 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5319 "the mapping; this is the most portable method of creating a new mapping.  If "
5320 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5321 "the mapping; on Linux, the mapping will be created at a nearby page "
5322 "boundary.  The address of the new mapping is returned as the result of the "
5323 "call."
5324 msgstr ""
5325 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5326 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5327 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5328 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5329 "ングのアドレスは、呼び出しの返り値として返される。"
5330
5331 #. type: Plain text
5332 #: build/C/man2/mmap.2:89
5333 msgid ""
5334 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5335 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5336 "offset I<offset> in the file (or other object) referred to by the file "
5337 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5338 "by I<sysconf(_SC_PAGE_SIZE)>."
5339 msgstr ""
5340 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5341 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5342 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5343 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5344 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5345
5346 #. type: Plain text
5347 #: build/C/man2/mmap.2:97
5348 msgid ""
5349 "The I<prot> argument describes the desired memory protection of the mapping "
5350 "(and must not conflict with the open mode of the file).  It is either "
5351 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5352 msgstr ""
5353 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5354 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5355 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5356
5357 #. type: TP
5358 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5359 #, no-wrap
5360 msgid "B<PROT_EXEC>"
5361 msgstr "B<PROT_EXEC>"
5362
5363 #. type: Plain text
5364 #: build/C/man2/mmap.2:100
5365 msgid "Pages may be executed."
5366 msgstr "ページは実行可能である。"
5367
5368 #. type: TP
5369 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5370 #, no-wrap
5371 msgid "B<PROT_READ>"
5372 msgstr "B<PROT_READ>"
5373
5374 #. type: Plain text
5375 #: build/C/man2/mmap.2:103
5376 msgid "Pages may be read."
5377 msgstr "ページは読み込み可能である。"
5378
5379 #. type: TP
5380 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5381 #, no-wrap
5382 msgid "B<PROT_WRITE>"
5383 msgstr "B<PROT_WRITE>"
5384
5385 #. type: Plain text
5386 #: build/C/man2/mmap.2:106
5387 msgid "Pages may be written."
5388 msgstr "ページに書き込み可能である。"
5389
5390 #. type: TP
5391 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5392 #, no-wrap
5393 msgid "B<PROT_NONE>"
5394 msgstr "B<PROT_NONE>"
5395
5396 #. type: Plain text
5397 #: build/C/man2/mmap.2:109
5398 msgid "Pages may not be accessed."
5399 msgstr "ページにはアクセスできない。"
5400
5401 #. type: Plain text
5402 #: build/C/man2/mmap.2:118
5403 msgid ""
5404 "The I<flags> argument determines whether updates to the mapping are visible "
5405 "to other processes mapping the same region, and whether updates are carried "
5406 "through to the underlying file.  This behavior is determined by including "
5407 "exactly one of the following values in I<flags>:"
5408 msgstr ""
5409 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5410 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5411 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5412 "I<flags> に含めることで指定する。"
5413
5414 #. type: TP
5415 #: build/C/man2/mmap.2:118
5416 #, no-wrap
5417 msgid "B<MAP_SHARED>"
5418 msgstr "B<MAP_SHARED>"
5419
5420 #. type: Plain text
5421 #: build/C/man2/mmap.2:128
5422 msgid ""
5423 "Share this mapping.  Updates to the mapping are visible to other processes "
5424 "that map this file, and are carried through to the underlying file.  The "
5425 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5426 "called."
5427 msgstr ""
5428 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5429 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5430 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5431 "るまで行われないこともある。"
5432
5433 #. type: TP
5434 #: build/C/man2/mmap.2:128
5435 #, no-wrap
5436 msgid "B<MAP_PRIVATE>"
5437 msgstr "B<MAP_PRIVATE>"
5438
5439 #. type: Plain text
5440 #: build/C/man2/mmap.2:137
5441 msgid ""
5442 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5443 "visible to other processes mapping the same file, and are not carried "
5444 "through to the underlying file.  It is unspecified whether changes made to "
5445 "the file after the B<mmap>()  call are visible in the mapped region."
5446 msgstr ""
5447 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5448 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5449 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5450 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5451 "かは規定されていない。"
5452
5453 #. type: Plain text
5454 #: build/C/man2/mmap.2:139
5455 msgid "Both of these flags are described in POSIX.1-2001."
5456 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5457
5458 #. type: Plain text
5459 #: build/C/man2/mmap.2:142
5460 msgid ""
5461 "In addition, zero or more of the following values can be ORed in I<flags>:"
5462 msgstr ""
5463 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5464 "ことができる。"
5465
5466 #. type: TP
5467 #: build/C/man2/mmap.2:142
5468 #, no-wrap
5469 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5470 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5471
5472 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5473 #. type: Plain text
5474 #: build/C/man2/mmap.2:158
5475 msgid ""
5476 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5477 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5478 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5479 "as to improve context-switch performance on some early 64-bit processors.  "
5480 "Modern x86-64 processors no longer have this performance problem, so use of "
5481 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5482 "ignored when B<MAP_FIXED> is set."
5483 msgstr ""
5484 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5485 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5486 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5487 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5488 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5489 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5490 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5491 "グは無視される。"
5492
5493 #. type: TP
5494 #: build/C/man2/mmap.2:158
5495 #, no-wrap
5496 msgid "B<MAP_ANON>"
5497 msgstr "B<MAP_ANON>"
5498
5499 #. type: Plain text
5500 #: build/C/man2/mmap.2:163
5501 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5502 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5503
5504 #. type: TP
5505 #: build/C/man2/mmap.2:163
5506 #, no-wrap
5507 msgid "B<MAP_ANONYMOUS>"
5508 msgstr "B<MAP_ANONYMOUS>"
5509
5510 #. type: Plain text
5511 #: build/C/man2/mmap.2:185
5512 msgid ""
5513 "The mapping is not backed by any file; its contents are initialized to "
5514 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5515 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5516 "is specified, and portable applications should ensure this.  The use of "
5517 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5518 "only since kernel 2.4."
5519 msgstr ""
5520 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5521 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5522 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5523 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5524 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5525 "以降の Linux でのみサポートされている。"
5526
5527 #. type: TP
5528 #: build/C/man2/mmap.2:185
5529 #, no-wrap
5530 msgid "B<MAP_DENYWRITE>"
5531 msgstr "B<MAP_DENYWRITE>"
5532
5533 #.  Introduced in 1.1.36, removed in 1.3.24.
5534 #. type: Plain text
5535 #: build/C/man2/mmap.2:193
5536 msgid ""
5537 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5538 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5539 "denial-of-service attacks.)"
5540 msgstr ""
5541 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5542 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5543 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5544
5545 #. type: TP
5546 #: build/C/man2/mmap.2:193
5547 #, no-wrap
5548 msgid "B<MAP_EXECUTABLE>"
5549 msgstr "B<MAP_EXECUTABLE>"
5550
5551 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5552 #.  (Long ago, it signaled that the underlying file is an executable.
5553 #.  However, that information was not really used anywhere.)
5554 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5555 #.  MAP_DENYWRITE?
5556 #. type: Plain text
5557 #: build/C/man2/mmap.2:201
5558 msgid "This flag is ignored."
5559 msgstr "このフラグは無視される。"
5560
5561 #. type: TP
5562 #: build/C/man2/mmap.2:201
5563 #, no-wrap
5564 msgid "B<MAP_FILE>"
5565 msgstr "B<MAP_FILE>"
5566
5567 #.  On some systems, this was required as the opposite of
5568 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5569 #. type: Plain text
5570 #: build/C/man2/mmap.2:207
5571 msgid "Compatibility flag.  Ignored."
5572 msgstr "互換性のためのフラグ。無視される。"
5573
5574 #. type: TP
5575 #: build/C/man2/mmap.2:207
5576 #, no-wrap
5577 msgid "B<MAP_FIXED>"
5578 msgstr "B<MAP_FIXED>"
5579
5580 #. type: Plain text
5581 #: build/C/man2/mmap.2:225
5582 msgid ""
5583 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5584 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5585 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5586 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5587 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5588 "requiring a fixed address for a mapping is less portable, the use of this "
5589 "option is discouraged."
5590 msgstr ""
5591 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5592 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5593 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5594 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5595 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5596 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5597 "を推奨する。"
5598
5599 #. type: TP
5600 #: build/C/man2/mmap.2:225
5601 #, no-wrap
5602 msgid "B<MAP_GROWSDOWN>"
5603 msgstr "B<MAP_GROWSDOWN>"
5604
5605 #. type: Plain text
5606 #: build/C/man2/mmap.2:230
5607 msgid ""
5608 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5609 "mapping should extend downward in memory."
5610 msgstr ""
5611 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5612 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5613 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5614
5615 #. type: TP
5616 #: build/C/man2/mmap.2:230
5617 #, no-wrap
5618 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5619 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5620
5621 #. type: Plain text
5622 #: build/C/man2/mmap.2:236
5623 msgid ""
5624 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5625 "I<Documentation/vm/hugetlbpage.txt> for further information."
5626 msgstr ""
5627 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5628 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5629
5630 #. type: TP
5631 #: build/C/man2/mmap.2:236
5632 #, no-wrap
5633 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5634 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5635
5636 #.  If set, the mapped pages will not be swapped out.
5637 #. type: Plain text
5638 #: build/C/man2/mmap.2:242
5639 msgid ""
5640 "Lock the pages of the mapped region into memory in the manner of "
5641 "B<mlock>(2).  This flag is ignored in older kernels."
5642 msgstr ""
5643 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5644 "前のカーネルでは、このフラグは無視される。"
5645
5646 #. type: TP
5647 #: build/C/man2/mmap.2:242
5648 #, no-wrap
5649 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5650 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5651
5652 #. type: Plain text
5653 #: build/C/man2/mmap.2:257
5654 msgid ""
5655 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5656 "ahead: create page tables entries only for pages that are already present in "
5657 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5658 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5659 "reimplemented."
5660 msgstr ""
5661 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5662 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5663 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5664 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5665 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5666
5667 #. type: TP
5668 #: build/C/man2/mmap.2:257
5669 #, no-wrap
5670 msgid "B<MAP_NORESERVE>"
5671 msgstr "B<MAP_NORESERVE>"
5672
5673 #. type: Plain text
5674 #: build/C/man2/mmap.2:272
5675 msgid ""
5676 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5677 "one has the guarantee that it is possible to modify the mapping.  When swap "
5678 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5679 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5680 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5681 "effect only for private writable mappings."
5682 msgstr ""
5683 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5684 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5685 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5686 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5687 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5688 "イベート・マッピングについてのみ効果があった。"
5689
5690 #. type: TP
5691 #: build/C/man2/mmap.2:272
5692 #, no-wrap
5693 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5694 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5695
5696 #. type: Plain text
5697 #: build/C/man2/mmap.2:279
5698 msgid ""
5699 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5700 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5701 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5702 "only since Linux 2.6.23."
5703 msgstr ""
5704 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5705 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5706 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5707 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5708 "されている。"
5709
5710 #. type: TP
5711 #: build/C/man2/mmap.2:279
5712 #, no-wrap
5713 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5714 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5715
5716 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5717 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5718 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5719 #.  "pthread_create() slow for many threads; also time to revisit 64b
5720 #.   context switch optimization?"
5721 #. type: Plain text
5722 #: build/C/man2/mmap.2:292
5723 msgid ""
5724 "Allocate the mapping at an address suitable for a process or thread stack.  "
5725 "This flag is currently a no-op, but is used in the glibc threading "
5726 "implementation so that if some architectures require special treatment for "
5727 "stack allocations, support can later be transparently implemented for glibc."
5728 msgstr ""
5729 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5730 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5731 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5732 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5733 "る。"
5734
5735 #. type: TP
5736 #: build/C/man2/mmap.2:292
5737 #, no-wrap
5738 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5739 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5740
5741 #. type: Plain text
5742 #: build/C/man2/mmap.2:302
5743 msgid ""
5744 "Don't clear anonymous pages.  This flag is intended to improve performance "
5745 "on embedded devices.  This flag is honored only if the kernel was configured "
5746 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5747 "implications, that option is normally enabled only on embedded devices (i."
5748 "e., devices where one has complete control of the contents of user memory)."
5749 msgstr ""
5750 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5751 "ス\n"
5752 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5753 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5754 "このフラグは効果を持つ。\n"
5755 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5756 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5757
5758 #. type: Plain text
5759 #: build/C/man2/mmap.2:310
5760 msgid ""
5761 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5762 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5763 "B<MAP_ANON>)."
5764 msgstr ""
5765 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5766 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5767 "B<MAP_ANON>)  もサポートされている。"
5768
5769 #. type: Plain text
5770 #: build/C/man2/mmap.2:317
5771 msgid ""
5772 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5773 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5774 msgstr ""
5775 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5776 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5777
5778 #. type: Plain text
5779 #: build/C/man2/mmap.2:323
5780 msgid ""
5781 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5782 "attributes."
5783 msgstr ""
5784 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5785
5786 #. type: Plain text
5787 #: build/C/man2/mmap.2:331
5788 msgid ""
5789 "A file is mapped in multiples of the page size.  For a file that is not a "
5790 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5791 "writes to that region are not written out to the file.  The effect of "
5792 "changing the size of the underlying file of a mapping on the pages that "
5793 "correspond to added or removed regions of the file is unspecified."
5794 msgstr ""
5795 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5796 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5797 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5798 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5799 "マップされたページに対してどのような影響があるかは規定されていない。"
5800
5801 #. type: SS
5802 #: build/C/man2/mmap.2:331
5803 #, no-wrap
5804 msgid "munmap()"
5805 msgstr "munmap()"
5806
5807 #. type: Plain text
5808 #: build/C/man2/mmap.2:341
5809 msgid ""
5810 "The B<munmap>()  system call deletes the mappings for the specified address "
5811 "range, and causes further references to addresses within the range to "
5812 "generate invalid memory references.  The region is also automatically "
5813 "unmapped when the process is terminated.  On the other hand, closing the "
5814 "file descriptor does not unmap the region."
5815 msgstr ""
5816 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5817 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5818 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5819 "はアンマップされない。"
5820
5821 #. type: Plain text
5822 #: build/C/man2/mmap.2:351
5823 msgid ""
5824 "The address I<addr> must be a multiple of the page size.  All pages "
5825 "containing a part of the indicated range are unmapped, and subsequent "
5826 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5827 "the indicated range does not contain any mapped pages."
5828 msgstr ""
5829 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5830 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5831 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5832 "ていない場合でも エラーにならない。"
5833
5834 #. type: SS
5835 #: build/C/man2/mmap.2:351
5836 #, no-wrap
5837 msgid "Timestamps changes for file-backed mappings"
5838 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5839
5840 #. type: Plain text
5841 #: build/C/man2/mmap.2:358
5842 msgid ""
5843 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5844 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5845 "the first reference to a mapped page will update the field if it has not "
5846 "been already."
5847 msgstr ""
5848 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5849 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5850 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5851 "ページへの最初の参照があった 際に更新される。"
5852
5853 #. type: Plain text
5854 #: build/C/man2/mmap.2:375
5855 msgid ""
5856 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5857 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5858 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5859 "one occurs."
5860 msgstr ""
5861 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5862 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5863 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5864 "B<msync>(2)  が呼ばれる前までに更新される。"
5865
5866 #. type: Plain text
5867 #: build/C/man2/mmap.2:392
5868 msgid ""
5869 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5870 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5871 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5872 "and I<errno> is set (probably to B<EINVAL>)."
5873 msgstr ""
5874 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5875 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5876 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5877 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5878
5879 #. type: TP
5880 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5881 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5882 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5883 #: build/C/man2/shmop.2:188
5884 #, no-wrap
5885 msgid "B<EACCES>"
5886 msgstr "B<EACCES>"
5887
5888 #. type: Plain text
5889 #: build/C/man2/mmap.2:411
5890 msgid ""
5891 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5892 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5893 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5894 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5895 msgstr ""
5896 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5897 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5898 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5899 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5900 "たが、ファイルは追加 (append) 専用である。"
5901
5902 #. type: Plain text
5903 #: build/C/man2/mmap.2:415
5904 msgid ""
5905 "The file has been locked, or too much memory has been locked (see "
5906 "B<setrlimit>(2))."
5907 msgstr ""
5908 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5909 "(B<setrlimit>(2)  を参照)。"
5910
5911 #. type: Plain text
5912 #: build/C/man2/mmap.2:421
5913 msgid ""
5914 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5915 msgstr ""
5916 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5917 "B<MAP_ANONYMOUS> がセットされていない)。"
5918
5919 #. type: Plain text
5920 #: build/C/man2/mmap.2:429
5921 msgid ""
5922 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5923 "not aligned on a page boundary)."
5924 msgstr ""
5925 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5926 "ジ境界にアラインメントされていない)。"
5927
5928 #. type: Plain text
5929 #: build/C/man2/mmap.2:434
5930 msgid "(since Linux 2.6.12)  I<length> was 0."
5931 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5932
5933 #. type: Plain text
5934 #: build/C/man2/mmap.2:442
5935 msgid ""
5936 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5937 "both of these values."
5938 msgstr ""
5939 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5940 "しくは その両方が含まれていた。"
5941
5942 #. type: TP
5943 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5944 #: build/C/man2/shmget.2:221
5945 #, no-wrap
5946 msgid "B<ENFILE>"
5947 msgstr "B<ENFILE>"
5948
5949 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5950 #. type: Plain text
5951 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5952 msgid "The system limit on the total number of open files has been reached."
5953 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5954
5955 #. type: Plain text
5956 #: build/C/man2/mmap.2:454
5957 msgid ""
5958 "The underlying filesystem of the specified file does not support memory "
5959 "mapping."
5960 msgstr ""
5961 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5962 "していない。"
5963
5964 #. type: Plain text
5965 #: build/C/man2/mmap.2:458
5966 msgid ""
5967 "No memory is available, or the process's maximum number of mappings would "
5968 "have been exceeded."
5969 msgstr ""
5970 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5971
5972 #.  (Since 2.4.25 / 2.6.0.)
5973 #. type: Plain text
5974 #: build/C/man2/mmap.2:467
5975 msgid ""
5976 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5977 "file on a filesystem that was mounted no-exec."
5978 msgstr ""
5979 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5980 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5981
5982 #. type: Plain text
5983 #: build/C/man2/mmap.2:473
5984 msgid ""
5985 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5986 "writing."
5987 msgstr ""
5988 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5989 "き込み用に開かれている。"
5990
5991 #. type: TP
5992 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
5993 #, no-wrap
5994 msgid "B<EOVERFLOW>"
5995 msgstr "B<EOVERFLOW>"
5996
5997 #. type: Plain text
5998 #: build/C/man2/mmap.2:485
5999 msgid ""
6000 "On 32-bit architecture together with the large file extension (i.e., using "
6001 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6002 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6003 msgstr ""
6004 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
6005 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6006 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6007 "しまう) 場合がある。"
6008
6009 #. type: Plain text
6010 #: build/C/man2/mmap.2:487
6011 msgid "Use of a mapped region can result in these signals:"
6012 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6013
6014 #. type: TP
6015 #: build/C/man2/mmap.2:487
6016 #, no-wrap
6017 msgid "B<SIGSEGV>"
6018 msgstr "B<SIGSEGV>"
6019
6020 #. type: Plain text
6021 #: build/C/man2/mmap.2:490
6022 msgid "Attempted write into a region mapped as read-only."
6023 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6024
6025 #. type: TP
6026 #: build/C/man2/mmap.2:490
6027 #, no-wrap
6028 msgid "B<SIGBUS>"
6029 msgstr "B<SIGBUS>"
6030
6031 #. type: Plain text
6032 #: build/C/man2/mmap.2:495
6033 msgid ""
6034 "Attempted access to a portion of the buffer that does not correspond to the "
6035 "file (for example, beyond the end of the file, including the case where "
6036 "another process has truncated the file)."
6037 msgstr ""
6038 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
6039 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
6040 "にアクセスしようとした。"
6041
6042 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6043 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6044 #. type: Plain text
6045 #: build/C/man2/mmap.2:499
6046 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6047 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6048
6049 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6050 #.  -1: unavailable, 0: ask using sysconf().
6051 #.  glibc defines it to 1.
6052 #. type: Plain text
6053 #: build/C/man2/mmap.2:513
6054 msgid ""
6055 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>()  are "
6056 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6057 "value greater than 0.  (See also B<sysconf>(3).)"
6058 msgstr ""
6059 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6060 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6061 "(B<sysconf>(3)  も参照のこと)。"
6062
6063 #. type: Plain text
6064 #: build/C/man2/mmap.2:526
6065 msgid ""
6066 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6067 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6068 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6069 "they intend to execute code in the new mapping."
6070 msgstr ""
6071 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
6072 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
6073 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
6074 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
6075 "常に B<PROT_EXEC> をセットすべきである。"
6076
6077 #. type: Plain text
6078 #: build/C/man2/mmap.2:541
6079 msgid ""
6080 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6081 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6082 "address for the mapping; the address is chosen so as not to conflict with "
6083 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6084 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6085 msgstr ""
6086 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6087 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6088 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6089 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6090 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mmap.2:571
6094 msgid ""
6095 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6096 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6097 "requiring that macro specifically would have been more logical, since these "
6098 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6099 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6100 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6101 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6102 "B<MAP_STACK>."
6103 msgstr ""
6104 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6105 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6106 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6107 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6108 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6109 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6110 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6111 "B<MAP_STACK> である。"
6112
6113 #. type: SS
6114 #: build/C/man2/mmap.2:571
6115 #, no-wrap
6116 msgid "C library/kernel ABI differences"
6117 msgstr "C ライブラリとカーネル ABI の違い"
6118
6119 #.  Since around glibc 2.1/2.2, depending on the platform.
6120 #. type: Plain text
6121 #: build/C/man2/mmap.2:586
6122 msgid ""
6123 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6124 "function.  Originally, this function invoked a system call of the same "
6125 "name.  Since kernel 2.4, that system call has been superseded by "
6126 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6127 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6128 msgstr ""
6129 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6130 "に\n"
6131 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6132 "た。\n"
6133 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6134 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6135 "B<mmap2>(2) を起動する。"
6136
6137 #. type: Plain text
6138 #: build/C/man2/mmap.2:591
6139 msgid ""
6140 "On Linux there are no guarantees like those suggested above under "
6141 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6142 "the system runs out of memory."
6143 msgstr ""
6144 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6145 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6146 "終了されるか分からないからである。"
6147
6148 #. type: Plain text
6149 #: build/C/man2/mmap.2:598
6150 msgid ""
6151 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6152 "is specified as B<PROT_NONE>."
6153 msgstr ""
6154 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6155 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6156
6157 #. type: Plain text
6158 #: build/C/man2/mmap.2:613
6159 msgid ""
6160 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6161 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6162 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6163 "fails with the error B<EINVAL> for this case."
6164 msgstr ""
6165 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6166 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6167 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6168 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6169
6170 #. type: Plain text
6171 #: build/C/man2/mmap.2:629
6172 msgid ""
6173 "POSIX specifies that the system shall always zero fill any partial page at "
6174 "the end of the object and that system will never write any modification of "
6175 "the object beyond its end.  On Linux, when you write data to such partial "
6176 "page after the end of the object, the data stays in the page cache even "
6177 "after the file is closed and unmapped and even though the data is never "
6178 "written to the file itself, subsequent mappings may see the modified "
6179 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6180 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6181 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6182 msgstr ""
6183 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6184 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6185 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6186 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6187 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6188 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6189 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6190 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6191 "共有メモリインターフェースを使った場合)。"
6192
6193 #. type: Plain text
6194 #: build/C/man2/mmap.2:641
6195 msgid ""
6196 "The following program prints part of the file specified in its first command-"
6197 "line argument to standard output.  The range of bytes to be printed is "
6198 "specified via offset and length values in the second and third command-line "
6199 "arguments.  The program creates a memory mapping of the required pages of "
6200 "the file and then uses B<write>(2)  to output the desired bytes."
6201 msgstr ""
6202 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6203 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6204 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6205 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6206 "を出力する。"
6207
6208 #. type: Plain text
6209 #: build/C/man2/mmap.2:649
6210 #, no-wrap
6211 msgid ""
6212 "#include E<lt>sys/mman.hE<gt>\n"
6213 "#include E<lt>sys/stat.hE<gt>\n"
6214 "#include E<lt>fcntl.hE<gt>\n"
6215 "#include E<lt>stdio.hE<gt>\n"
6216 "#include E<lt>stdlib.hE<gt>\n"
6217 "#include E<lt>unistd.hE<gt>\n"
6218 msgstr ""
6219 "#include E<lt>sys/mman.hE<gt>\n"
6220 "#include E<lt>sys/stat.hE<gt>\n"
6221 "#include E<lt>fcntl.hE<gt>\n"
6222 "#include E<lt>stdio.hE<gt>\n"
6223 "#include E<lt>stdlib.hE<gt>\n"
6224 "#include E<lt>unistd.hE<gt>\n"
6225
6226 #. type: Plain text
6227 #: build/C/man2/mmap.2:652 build/C/man2/mprotect.2:177
6228 #, no-wrap
6229 msgid ""
6230 "#define handle_error(msg) \\e\n"
6231 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6232 msgstr ""
6233 "#define handle_error(msg) \\e\n"
6234 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6235
6236 #. type: Plain text
6237 #: build/C/man2/mmap.2:662
6238 #, no-wrap
6239 msgid ""
6240 "int\n"
6241 "main(int argc, char *argv[])\n"
6242 "{\n"
6243 "    char *addr;\n"
6244 "    int fd;\n"
6245 "    struct stat sb;\n"
6246 "    off_t offset, pa_offset;\n"
6247 "    size_t length;\n"
6248 "    ssize_t s;\n"
6249 msgstr ""
6250 "int\n"
6251 "main(int argc, char *argv[])\n"
6252 "{\n"
6253 "    char *addr;\n"
6254 "    int fd;\n"
6255 "    struct stat sb;\n"
6256 "    off_t offset, pa_offset;\n"
6257 "    size_t length;\n"
6258 "    ssize_t s;\n"
6259
6260 #. type: Plain text
6261 #: build/C/man2/mmap.2:667
6262 #, no-wrap
6263 msgid ""
6264 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6265 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6266 "        exit(EXIT_FAILURE);\n"
6267 "    }\n"
6268 msgstr ""
6269 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6270 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6271 "        exit(EXIT_FAILURE);\n"
6272 "    }\n"
6273
6274 #. type: Plain text
6275 #: build/C/man2/mmap.2:671
6276 #, no-wrap
6277 msgid ""
6278 "    fd = open(argv[1], O_RDONLY);\n"
6279 "    if (fd == -1)\n"
6280 "        handle_error(\"open\");\n"
6281 msgstr ""
6282 "    fd = open(argv[1], O_RDONLY);\n"
6283 "    if (fd == -1)\n"
6284 "        handle_error(\"open\");\n"
6285
6286 #. type: Plain text
6287 #: build/C/man2/mmap.2:674
6288 #, no-wrap
6289 msgid ""
6290 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6291 "        handle_error(\"fstat\");\n"
6292 msgstr ""
6293 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6294 "        handle_error(\"fstat\");\n"
6295
6296 #. type: Plain text
6297 #: build/C/man2/mmap.2:678
6298 #, no-wrap
6299 msgid ""
6300 "    offset = atoi(argv[2]);\n"
6301 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6302 "        /* offset for mmap() must be page aligned */\n"
6303 msgstr ""
6304 "    offset = atoi(argv[2]);\n"
6305 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6306 "        /* offset for mmap() must be page aligned */\n"
6307
6308 #. type: Plain text
6309 #: build/C/man2/mmap.2:683
6310 #, no-wrap
6311 msgid ""
6312 "    if (offset E<gt>= sb.st_size) {\n"
6313 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6314 "        exit(EXIT_FAILURE);\n"
6315 "    }\n"
6316 msgstr ""
6317 "    if (offset E<gt>= sb.st_size) {\n"
6318 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6319 "        exit(EXIT_FAILURE);\n"
6320 "    }\n"
6321
6322 #. type: Plain text
6323 #: build/C/man2/mmap.2:689
6324 #, no-wrap
6325 msgid ""
6326 "    if (argc == 4) {\n"
6327 "        length = atoi(argv[3]);\n"
6328 "        if (offset + length E<gt> sb.st_size)\n"
6329 "            length = sb.st_size - offset;\n"
6330 "                /* Can\\(aqt display bytes past end of file */\n"
6331 msgstr ""
6332 "    if (argc == 4) {\n"
6333 "        length = atoi(argv[3]);\n"
6334 "        if (offset + length E<gt> sb.st_size)\n"
6335 "            length = sb.st_size - offset;\n"
6336 "                /* Can\\(aqt display bytes past end of file */\n"
6337
6338 #. type: Plain text
6339 #: build/C/man2/mmap.2:693
6340 #, no-wrap
6341 msgid ""
6342 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6343 "        length = sb.st_size - offset;\n"
6344 "    }\n"
6345 msgstr ""
6346 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6347 "        length = sb.st_size - offset;\n"
6348 "    }\n"
6349
6350 #. type: Plain text
6351 #: build/C/man2/mmap.2:698
6352 #, no-wrap
6353 msgid ""
6354 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6355 "                MAP_PRIVATE, fd, pa_offset);\n"
6356 "    if (addr == MAP_FAILED)\n"
6357 "        handle_error(\"mmap\");\n"
6358 msgstr ""
6359 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6360 "                MAP_PRIVATE, fd, pa_offset);\n"
6361 "    if (addr == MAP_FAILED)\n"
6362 "        handle_error(\"mmap\");\n"
6363
6364 #. type: Plain text
6365 #: build/C/man2/mmap.2:703
6366 #, no-wrap
6367 msgid ""
6368 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6369 "    if (s != length) {\n"
6370 "        if (s == -1)\n"
6371 "            handle_error(\"write\");\n"
6372 msgstr ""
6373 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6374 "    if (s != length) {\n"
6375 "        if (s == -1)\n"
6376 "            handle_error(\"write\");\n"
6377
6378 #. type: Plain text
6379 #: build/C/man2/mmap.2:707
6380 #, no-wrap
6381 msgid ""
6382 "        fprintf(stderr, \"partial write\");\n"
6383 "        exit(EXIT_FAILURE);\n"
6384 "    }\n"
6385 msgstr ""
6386 "        fprintf(stderr, \"partial write\");\n"
6387 "        exit(EXIT_FAILURE);\n"
6388 "    }\n"
6389
6390 #. type: Plain text
6391 #: build/C/man2/mmap.2:724
6392 msgid ""
6393 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6394 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6395 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6396 msgstr ""
6397 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6398 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6399 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6400
6401 #. type: Plain text
6402 #: build/C/man2/mmap.2:731
6403 msgid ""
6404 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6405 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6406 msgstr ""
6407 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6408 "smaps> の説明。"
6409
6410 #. type: Plain text
6411 #: build/C/man2/mmap.2:736 build/C/man2/msync.2:151
6412 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6413 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6414
6415 #. type: TH
6416 #: build/C/man2/mmap2.2:29
6417 #, no-wrap
6418 msgid "MMAP2"
6419 msgstr "MMAP2"
6420
6421 #. type: TH
6422 #: build/C/man2/mmap2.2:29
6423 #, no-wrap
6424 msgid "2014-02-25"
6425 msgstr "2014-02-25"
6426
6427 #. type: Plain text
6428 #: build/C/man2/mmap2.2:32
6429 msgid "mmap2 - map files or devices into memory"
6430 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6431
6432 #. type: Plain text
6433 #: build/C/man2/mmap2.2:38
6434 #, no-wrap
6435 msgid ""
6436 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6437 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6438 msgstr ""
6439 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6440 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6441
6442 #. type: Plain text
6443 #: build/C/man2/mmap2.2:43
6444 msgid ""
6445 "This is probably not the system call that you are interested in; instead, "
6446 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6447 "system call."
6448 msgstr ""
6449 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6450 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6451 "の\n"
6452 "ラッパー関数についての説明がある。"
6453
6454 #. type: Plain text
6455 #: build/C/man2/mmap2.2:54
6456 msgid ""
6457 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6458 "except that the final argument specifies the offset into the file in 4096-"
6459 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6460 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6461 "bytes)."
6462 msgstr ""
6463 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6464 "だ\n"
6465 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6466 "ト\n"
6467 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6468 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6469 "プ\n"
6470 "できるようになる。"
6471
6472 #. type: Plain text
6473 #: build/C/man2/mmap2.2:61
6474 msgid ""
6475 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6476 "is returned and I<errno> is set appropriately."
6477 msgstr ""
6478 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6479 "合は -1 が返されて、 I<errno> が適切に設定される。"
6480
6481 #. type: Plain text
6482 #: build/C/man2/mmap2.2:65
6483 msgid "Problem with getting the data from user space."
6484 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6485
6486 #. type: Plain text
6487 #: build/C/man2/mmap2.2:70
6488 msgid ""
6489 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6490 "4096> is not a multiple of the system page size."
6491 msgstr ""
6492 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6493 "4096> がシステムのページサイズの倍数ではない。"
6494
6495 #. type: Plain text
6496 #: build/C/man2/mmap2.2:74
6497 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6498 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6499
6500 #. type: Plain text
6501 #: build/C/man2/mmap2.2:77
6502 msgid "B<mmap2>()  is available since Linux 2.3.31."
6503 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6504
6505 #. type: Plain text
6506 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6507 msgid "This system call is Linux-specific."
6508 msgstr "このシステムコールは Linux 独自である。"
6509
6510 #. type: Plain text
6511 #: build/C/man2/mmap2.2:86
6512 msgid ""
6513 "On architectures where this system call is present, the glibc B<mmap>()  "
6514 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6515 "call."
6516 msgstr ""
6517 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6518 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6519 "(B<mmap2>(2))  を起動する。"
6520
6521 #. type: Plain text
6522 #: build/C/man2/mmap2.2:88
6523 msgid "This system call does not exist on x86-64."
6524 msgstr "このシステムコールは x86-64 には存在しない。"
6525
6526 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6527 #.  On cris, it looks like the unit might also be the page size,
6528 #.  which is 8192 bytes. -- mtk, June 2007
6529 #. type: Plain text
6530 #: build/C/man2/mmap2.2:95
6531 msgid ""
6532 "On ia64, the unit for I<offset> is actually the system page size, rather "
6533 "than 4096 bytes."
6534 msgstr ""
6535 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6536 "バイトではない。"
6537
6538 #. type: Plain text
6539 #: build/C/man2/mmap2.2:101
6540 msgid ""
6541 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6542 msgstr ""
6543 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6544
6545 #. type: TH
6546 #: build/C/man2/mprotect.2:39
6547 #, no-wrap
6548 msgid "MPROTECT"
6549 msgstr "MPROTECT"
6550
6551 #. type: TH
6552 #: build/C/man2/mprotect.2:39
6553 #, no-wrap
6554 msgid "2014-01-05"
6555 msgstr "2014-01-05"
6556
6557 #. type: Plain text
6558 #: build/C/man2/mprotect.2:42
6559 msgid "mprotect - set protection on a region of memory"
6560 msgstr "mprotect - メモリ領域の保護を設定する"
6561
6562 #. type: Plain text
6563 #: build/C/man2/mprotect.2:47
6564 #, no-wrap
6565 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6566 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6567
6568 #. type: Plain text
6569 #: build/C/man2/mprotect.2:55
6570 msgid ""
6571 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6572 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6573 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6574 msgstr ""
6575 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6576 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6577 "界に一致していなければならない。"
6578
6579 #. type: Plain text
6580 #: build/C/man2/mprotect.2:60
6581 msgid ""
6582 "If the calling process tries to access memory in a manner that violates the "
6583 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6584 msgstr ""
6585 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6586 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6587
6588 #. type: Plain text
6589 #: build/C/man2/mprotect.2:65
6590 msgid ""
6591 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6592 "following list:"
6593 msgstr ""
6594 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6595 "毎の論理和 (bitwize-or) で指定する:"
6596
6597 #. type: Plain text
6598 #: build/C/man2/mprotect.2:68
6599 msgid "The memory cannot be accessed at all."
6600 msgstr "そのメモリには全くアクセスできない。"
6601
6602 #. type: Plain text
6603 #: build/C/man2/mprotect.2:71
6604 msgid "The memory can be read."
6605 msgstr "そのメモリを読み取ることができる。"
6606
6607 #. type: Plain text
6608 #: build/C/man2/mprotect.2:74
6609 msgid "The memory can be modified."
6610 msgstr "そのメモリを変更できる。"
6611
6612 #. type: Plain text
6613 #: build/C/man2/mprotect.2:77
6614 msgid "The memory can be executed."
6615 msgstr "そのメモリは実行可能である。"
6616
6617 #. type: Plain text
6618 #: build/C/man2/mprotect.2:84
6619 msgid ""
6620 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6621 "I<errno> is set appropriately."
6622 msgstr ""
6623 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6624 "I<errno> が適切に設定される。"
6625
6626 #. type: Plain text
6627 #: build/C/man2/mprotect.2:94
6628 msgid ""
6629 "The memory cannot be given the specified access.  This can happen, for "
6630 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6631 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6632 msgstr ""
6633 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6634 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6635 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6636
6637 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6638 #. type: Plain text
6639 #: build/C/man2/mprotect.2:99
6640 msgid ""
6641 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6642 msgstr ""
6643 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6644
6645 #. type: Plain text
6646 #: build/C/man2/mprotect.2:102
6647 msgid "Internal kernel structures could not be allocated."
6648 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6649
6650 #. type: Plain text
6651 #: build/C/man2/mprotect.2:112
6652 msgid ""
6653 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6654 "address space of the process, or specify one or more pages that are not "
6655 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6656 "for these cases.)"
6657 msgstr ""
6658 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6659 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6660 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6661 "成されていた)。"
6662
6663 #.  SVr4 defines an additional error
6664 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6665 #. type: Plain text
6666 #: build/C/man2/mprotect.2:121
6667 msgid ""
6668 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6669 "unspecified if it is applied to a region of memory that was not obtained via "
6670 "B<mmap>(2)."
6671 msgstr ""
6672 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6673 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6674 "されている。"
6675
6676 #. type: Plain text
6677 #: build/C/man2/mprotect.2:128
6678 msgid ""
6679 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6680 "process's address space (except for the kernel vsyscall area).  In "
6681 "particular it can be used to change existing code mappings to be writable."
6682 msgstr ""
6683 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6684 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6685 "マッピングを書き込み可能にするために使われる。"
6686
6687 #. type: Plain text
6688 #: build/C/man2/mprotect.2:138
6689 msgid ""
6690 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6691 "architecture- and kernel version-dependent.  On some hardware architectures "
6692 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6693 msgstr ""
6694 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6695 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6696 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6697
6698 #. type: Plain text
6699 #: build/C/man2/mprotect.2:147
6700 msgid ""
6701 "POSIX.1-2001 says that an implementation may permit access other than that "
6702 "specified in I<prot>, but at a minimum can allow write access only if "
6703 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6704 "has been set."
6705 msgstr ""
6706 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6707 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6708 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6709 "ない点だけは 満たす必要がある。"
6710
6711 #. type: Plain text
6712 #: build/C/man2/mprotect.2:153
6713 msgid ""
6714 "The program below allocates four pages of memory, makes the third of these "
6715 "pages read-only, and then executes a loop that walks upward through the "
6716 "allocated region modifying bytes."
6717 msgstr ""
6718 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6719 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6720 "かって順番にバイト値を変更するループを実行する。"
6721
6722 #. type: Plain text
6723 #: build/C/man2/mprotect.2:156
6724 msgid ""
6725 "An example of what we might see when running the program is the following:"
6726 msgstr "プログラムを実行した場合の一例を以下に示す。"
6727
6728 #. type: Plain text
6729 #: build/C/man2/mprotect.2:162
6730 #, no-wrap
6731 msgid ""
6732 "$B< ./a.out>\n"
6733 "Start of region:        0x804c000\n"
6734 "Got SIGSEGV at address: 0x804e000\n"
6735 msgstr ""
6736 "$B< ./a.out>\n"
6737 "Start of region:        0x804c000\n"
6738 "Got SIGSEGV at address: 0x804e000\n"
6739
6740 #. type: Plain text
6741 #: build/C/man2/mprotect.2:174
6742 #, no-wrap
6743 msgid ""
6744 "#include E<lt>unistd.hE<gt>\n"
6745 "#include E<lt>signal.hE<gt>\n"
6746 "#include E<lt>stdio.hE<gt>\n"
6747 "#include E<lt>malloc.hE<gt>\n"
6748 "#include E<lt>stdlib.hE<gt>\n"
6749 "#include E<lt>errno.hE<gt>\n"
6750 "#include E<lt>sys/mman.hE<gt>\n"
6751 msgstr ""
6752 "#include E<lt>unistd.hE<gt>\n"
6753 "#include E<lt>signal.hE<gt>\n"
6754 "#include E<lt>stdio.hE<gt>\n"
6755 "#include E<lt>malloc.hE<gt>\n"
6756 "#include E<lt>stdlib.hE<gt>\n"
6757 "#include E<lt>errno.hE<gt>\n"
6758 "#include E<lt>sys/mman.hE<gt>\n"
6759
6760 #. type: Plain text
6761 #: build/C/man2/mprotect.2:179
6762 #, no-wrap
6763 msgid "static char *buffer;\n"
6764 msgstr "static char *buffer;\n"
6765
6766 #. type: Plain text
6767 #: build/C/man2/mprotect.2:187
6768 #, no-wrap
6769 msgid ""
6770 "static void\n"
6771 "handler(int sig, siginfo_t *si, void *unused)\n"
6772 "{\n"
6773 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6774 "            (long) si-E<gt>si_addr);\n"
6775 "    exit(EXIT_FAILURE);\n"
6776 "}\n"
6777 msgstr ""
6778 "static void\n"
6779 "handler(int sig, siginfo_t *si, void *unused)\n"
6780 "{\n"
6781 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6782 "            (long) si-E<gt>si_addr);\n"
6783 "    exit(EXIT_FAILURE);\n"
6784 "}\n"
6785
6786 #. type: Plain text
6787 #: build/C/man2/mprotect.2:194
6788 #, no-wrap
6789 msgid ""
6790 "int\n"
6791 "main(int argc, char *argv[])\n"
6792 "{\n"
6793 "    char *p;\n"
6794 "    int pagesize;\n"
6795 "    struct sigaction sa;\n"
6796 msgstr ""
6797 "int\n"
6798 "main(void)\n"
6799 "{\n"
6800 "    char *p;\n"
6801 "    int pagesize;\n"
6802 "    struct sigaction sa;\n"
6803
6804 #. type: Plain text
6805 #: build/C/man2/mprotect.2:200
6806 #, no-wrap
6807 msgid ""
6808 "    sa.sa_flags = SA_SIGINFO;\n"
6809 "    sigemptyset(&sa.sa_mask);\n"
6810 "    sa.sa_sigaction = handler;\n"
6811 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6812 "        handle_error(\"sigaction\");\n"
6813 msgstr ""
6814 "    sa.sa_flags = SA_SIGINFO;\n"
6815 "    sigemptyset(&sa.sa_mask);\n"
6816 "    sa.sa_sigaction = handler;\n"
6817 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6818 "        handle_error(\"sigaction\");\n"
6819
6820 #. type: Plain text
6821 #: build/C/man2/mprotect.2:204
6822 #, no-wrap
6823 msgid ""
6824 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6825 "    if (pagesize == -1)\n"
6826 "        handle_error(\"sysconf\");\n"
6827 msgstr ""
6828 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6829 "    if (pagesize == -1)\n"
6830 "        handle_error(\"sysconf\");\n"
6831
6832 #. type: Plain text
6833 #: build/C/man2/mprotect.2:207
6834 #, no-wrap
6835 msgid ""
6836 "    /* Allocate a buffer aligned on a page boundary;\n"
6837 "       initial protection is PROT_READ | PROT_WRITE */\n"
6838 msgstr ""
6839 "    /* Allocate a buffer aligned on a page boundary;\n"
6840 "       initial protection is PROT_READ | PROT_WRITE */\n"
6841
6842 #. type: Plain text
6843 #: build/C/man2/mprotect.2:211
6844 #, no-wrap
6845 msgid ""
6846 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6847 "    if (buffer == NULL)\n"
6848 "        handle_error(\"memalign\");\n"
6849 msgstr ""
6850 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6851 "    if (buffer == NULL)\n"
6852 "        handle_error(\"memalign\");\n"
6853
6854 #. type: Plain text
6855 #: build/C/man2/mprotect.2:213
6856 #, no-wrap
6857 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6858 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6859
6860 #. type: Plain text
6861 #: build/C/man2/mprotect.2:217
6862 #, no-wrap
6863 msgid ""
6864 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6865 "                PROT_READ) == -1)\n"
6866 "        handle_error(\"mprotect\");\n"
6867 msgstr ""
6868 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6869 "                PROT_READ) == -1)\n"
6870 "        handle_error(\"mprotect\");\n"
6871
6872 #. type: Plain text
6873 #: build/C/man2/mprotect.2:220
6874 #, no-wrap
6875 msgid ""
6876 "    for (p = buffer ; ; )\n"
6877 "        *(p++) = \\(aqa\\(aq;\n"
6878 msgstr ""
6879 "    for (p = buffer ; ; )\n"
6880 "        *(p++) = \\(aqa\\(aq;\n"
6881
6882 #. type: Plain text
6883 #: build/C/man2/mprotect.2:224
6884 #, no-wrap
6885 msgid ""
6886 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6887 "    exit(EXIT_SUCCESS);\n"
6888 "}\n"
6889 msgstr ""
6890 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6891 "    exit(EXIT_SUCCESS);\n"
6892 "}\n"
6893
6894 #. type: Plain text
6895 #: build/C/man2/mprotect.2:228
6896 msgid "B<mmap>(2), B<sysconf>(3)"
6897 msgstr "B<mmap>(2), B<sysconf>(3)"
6898
6899 #. type: TH
6900 #: build/C/man2/mremap.2:30
6901 #, no-wrap
6902 msgid "MREMAP"
6903 msgstr "MREMAP"
6904
6905 #. type: TH
6906 #: build/C/man2/mremap.2:30
6907 #, no-wrap
6908 msgid "2010-06-10"
6909 msgstr "2010-06-10"
6910
6911 #. type: Plain text
6912 #: build/C/man2/mremap.2:33
6913 msgid "mremap - remap a virtual memory address"
6914 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6915
6916 #. type: Plain text
6917 #: build/C/man2/mremap.2:36
6918 #, no-wrap
6919 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6920 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6921
6922 #. type: Plain text
6923 #: build/C/man2/mremap.2:41
6924 #, no-wrap
6925 msgid ""
6926 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6927 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6928 msgstr ""
6929 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6930 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6931
6932 #. type: Plain text
6933 #: build/C/man2/mremap.2:47
6934 msgid ""
6935 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6936 "moving it at the same time (controlled by the I<flags> argument and the "
6937 "available virtual address space)."
6938 msgstr ""
6939 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6940 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6941 "る)。"
6942
6943 #. type: Plain text
6944 #: build/C/man2/mremap.2:61
6945 msgid ""
6946 "I<old_address> is the old address of the virtual memory block that you want "
6947 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6948 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6949 "requested size of the virtual memory block after the resize.  An optional "
6950 "fifth argument, I<new_address>, may be provided; see the description of "
6951 "B<MREMAP_FIXED> below."
6952 msgstr ""
6953 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6954 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6955 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6956 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6957 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6958 "明を参照のこと。"
6959
6960 #. type: Plain text
6961 #: build/C/man2/mremap.2:73
6962 msgid ""
6963 "In Linux the memory is divided into pages.  A user process has (one or)  "
6964 "several linear virtual memory segments.  Each virtual memory segment has one "
6965 "or more mappings to real memory pages (in the page table).  Each virtual "
6966 "memory segment has its own protection (access rights), which may cause a "
6967 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6968 "to a read-only segment).  Accessing virtual memory outside of the segments "
6969 "will also cause a segmentation violation."
6970 msgstr ""
6971 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6972 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6973 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6974 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6975 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6976 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6977 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6978 "ン侵害が発生する。"
6979
6980 #. type: Plain text
6981 #: build/C/man2/mremap.2:81
6982 msgid ""
6983 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6984 "mapping between virtual addresses and memory pages.  This can be used to "
6985 "implement a very efficient B<realloc>(3)."
6986 msgstr ""
6987 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6988 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6989 "B<realloc>(3)  を実装するのに使用されている。"
6990
6991 #. type: Plain text
6992 #: build/C/man2/mremap.2:83
6993 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6994 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6995
6996 #. type: TP
6997 #: build/C/man2/mremap.2:83
6998 #, no-wrap
6999 msgid "B<MREMAP_MAYMOVE>"
7000 msgstr "B<MREMAP_MAYMOVE>"
7001
7002 #. type: Plain text
7003 #: build/C/man2/mremap.2:95
7004 msgid ""
7005 "By default, if there is not sufficient space to expand a mapping at its "
7006 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7007 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7008 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7009 "mapping location become invalid (offsets relative to the starting address of "
7010 "the mapping should be employed)."
7011 msgstr ""
7012 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7013 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7014 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7015 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
7016 "レスからの相対オフセットは有効のままである)。"
7017
7018 #. type: TP
7019 #: build/C/man2/mremap.2:95
7020 #, no-wrap
7021 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7022 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7023
7024 #. type: Plain text
7025 #: build/C/man2/mremap.2:117
7026 msgid ""
7027 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7028 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7029 "\\ *new_address>, which specifies a page-aligned address to which the "
7030 "mapping must be moved.  Any previous mapping at the address range specified "
7031 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7032 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7033 msgstr ""
7034 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7035 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7036 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7037 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7038 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7039 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7040 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7041
7042 #. type: Plain text
7043 #: build/C/man2/mremap.2:127
7044 msgid ""
7045 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7046 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7047 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7048 "locked by the process may change."
7049 msgstr ""
7050 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
7051 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
7052 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
7053 "の量は変化する。"
7054
7055 #. type: Plain text
7056 #: build/C/man2/mremap.2:135
7057 msgid ""
7058 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7059 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7060 "and I<errno> is set appropriately."
7061 msgstr ""
7062 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
7063 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
7064 "切に設定される。"
7065
7066 #. type: Plain text
7067 #: build/C/man2/mremap.2:142
7068 msgid ""
7069 "The caller tried to expand a memory segment that is locked, but this was not "
7070 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7071 msgstr ""
7072 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
7073 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7074
7075 #. type: Plain text
7076 #: build/C/man2/mremap.2:151
7077 msgid ""
7078 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7079 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7080 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7081 "the whole address space requested, but those mappings are of different types."
7082 msgstr ""
7083 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7084 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7085 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
7086 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7087 "を受け取るだろう。"
7088
7089 #. type: Plain text
7090 #: build/C/man2/mremap.2:179
7091 msgid ""
7092 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7093 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7094 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7095 "was invalid; or the new address range specified by I<new_address> and "
7096 "I<new_size> overlapped the old address range specified by I<old_address> and "
7097 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7098 "B<MREMAP_MAYMOVE>."
7099 msgstr ""
7100 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7101 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7102 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7103 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7104 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7105 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7106 "されていない。"
7107
7108 #. type: Plain text
7109 #: build/C/man2/mremap.2:185
7110 msgid ""
7111 "The memory area cannot be expanded at the current virtual address, and the "
7112 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7113 "(virtual) memory available."
7114 msgstr ""
7115 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7116 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
7117
7118 #.  4.2BSD had a (never actually implemented)
7119 #.  .BR mremap (2)
7120 #.  call with completely different semantics.
7121 #. type: Plain text
7122 #: build/C/man2/mremap.2:191
7123 msgid ""
7124 "This call is Linux-specific, and should not be used in programs intended to "
7125 "be portable."
7126 msgstr ""
7127 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7128 "い。"
7129
7130 #. type: Plain text
7131 #: build/C/man2/mremap.2:199
7132 msgid ""
7133 "Prior to version 2.4, glibc did not expose the definition of "
7134 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7135 "I<new_address> argument."
7136 msgstr ""
7137 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7138 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7139
7140 #. type: Plain text
7141 #: build/C/man2/mremap.2:208
7142 msgid ""
7143 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7144 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7145 msgstr ""
7146 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7147 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7148
7149 #. type: Plain text
7150 #: build/C/man2/mremap.2:214
7151 msgid ""
7152 "Your favorite text book on operating systems for more information on paged "
7153 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7154 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7155 "Maurice J. Bach)"
7156 msgstr ""
7157 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7158 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7159 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7160 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7161
7162 #. type: TH
7163 #: build/C/man2/msync.2:25
7164 #, no-wrap
7165 msgid "MSYNC"
7166 msgstr "MSYNC"
7167
7168 #. type: TH
7169 #: build/C/man2/msync.2:25
7170 #, no-wrap
7171 msgid "2014-04-20"
7172 msgstr "2014-04-20"
7173
7174 #. type: Plain text
7175 #: build/C/man2/msync.2:28
7176 msgid "msync - synchronize a file with a memory map"
7177 msgstr "msync - ファイルをマップしたメモリと同期させる"
7178
7179 #. type: Plain text
7180 #: build/C/man2/msync.2:32
7181 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7182 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7183
7184 #. type: Plain text
7185 #: build/C/man2/msync.2:48
7186 msgid ""
7187 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7188 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7189 "this call there is no guarantee that changes are written back before "
7190 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7191 "corresponds to the memory area starting at I<addr> and having length "
7192 "I<length> is updated."
7193 msgstr ""
7194 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7195 "のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しない"
7196 "と、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確"
7197 "には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する"
7198 "部分が更新される。"
7199
7200 #. type: Plain text
7201 #: build/C/man2/msync.2:68
7202 msgid ""
7203 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7204 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7205 "specifies that an update be scheduled, but the call returns immediately.  "
7206 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7207 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7208 "they can be updated with the fresh values just written)."
7209 msgstr ""
7210 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7211 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7212 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7213 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7214 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7215 "に対する他のマッピングを無効にすることを要求する。"
7216
7217 #. type: Plain text
7218 #: build/C/man2/msync.2:73
7219 msgid ""
7220 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7221 "appropriately."
7222 msgstr ""
7223 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7224 "る。"
7225
7226 #. type: TP
7227 #: build/C/man2/msync.2:74
7228 #, no-wrap
7229 msgid "B<EBUSY>"
7230 msgstr "B<EBUSY>"
7231
7232 #. type: Plain text
7233 #: build/C/man2/msync.2:80
7234 msgid ""
7235 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7236 "specified address range."
7237 msgstr ""
7238 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7239 "存在する。"
7240
7241 #. type: Plain text
7242 #: build/C/man2/msync.2:93
7243 msgid ""
7244 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7245 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7246 "B<MS_ASYNC> are set in I<flags>."
7247 msgstr ""
7248 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7249 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7250 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7251
7252 #. type: Plain text
7253 #: build/C/man2/msync.2:96
7254 msgid "The indicated memory (or part of it) was not mapped."
7255 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7256
7257 #. type: Plain text
7258 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7259 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7260 msgid "POSIX.1-2001."
7261 msgstr "POSIX.1-2001."
7262
7263 #. type: Plain text
7264 #: build/C/man2/msync.2:105
7265 msgid ""
7266 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7267 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7268 msgstr ""
7269 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7270 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7271
7272 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7273 #.  -1: unavailable, 0: ask using sysconf().
7274 #.  glibc defines them to 1.
7275 #. type: Plain text
7276 #: build/C/man2/msync.2:120
7277 msgid ""
7278 "On POSIX systems on which B<msync>()  is available, both "
7279 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7280 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7281 msgstr ""
7282 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7283 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7284 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7285
7286 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7287 #. type: Plain text
7288 #: build/C/man2/msync.2:147
7289 msgid ""
7290 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7291 "I<flags>, and indeed failure to include one of these flags will cause "
7292 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7293 "B<msync>()  that specifies neither of these flags, with semantics that are "
7294 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7295 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7296 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7297 "behavior, portable, future-proof applications should ensure that they "
7298 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7299 msgstr ""
7300 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7301 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7302 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7303 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7304 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7305 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7306 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7307 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7308 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7309 "指定するようにすべきである。"
7310
7311 #. type: TP
7312 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7313 #, no-wrap
7314 msgid "B<mmap>(2)"
7315 msgstr "B<mmap>(2)"
7316
7317 #. type: TH
7318 #: build/C/man3/mtrace.3:25
7319 #, no-wrap
7320 msgid "MTRACE"
7321 msgstr "MTRACE"
7322
7323 #. type: TH
7324 #: build/C/man3/mtrace.3:25
7325 #, no-wrap
7326 msgid "2012-04-18"
7327 msgstr "2012-04-18"
7328
7329 #. type: Plain text
7330 #: build/C/man3/mtrace.3:28
7331 msgid "mtrace, muntrace - malloc tracing"
7332 msgstr "mtrace, muntrace - malloc のトレース"
7333
7334 #. type: Plain text
7335 #: build/C/man3/mtrace.3:30
7336 msgid "B<#include E<lt>mcheck.hE<gt>>"
7337 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7338
7339 #. type: Plain text
7340 #: build/C/man3/mtrace.3:32
7341 msgid "B<void mtrace(void);>"
7342 msgstr "B<void mtrace(void);>"
7343
7344 #. type: Plain text
7345 #: build/C/man3/mtrace.3:34
7346 msgid "B<void muntrace(void);>"
7347 msgstr "B<void muntrace(void);>"
7348
7349 #. type: Plain text
7350 #: build/C/man3/mtrace.3:46
7351 msgid ""
7352 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7353 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7354 "hook functions record tracing information about memory allocation and "
7355 "deallocation.  The tracing information can be used to discover memory leaks "
7356 "and attempts to free nonallocated memory in a program."
7357 msgstr ""
7358
7359 #. type: Plain text
7360 #: build/C/man3/mtrace.3:57
7361 msgid ""
7362 "The B<muntrace>()  function disables the hook functions installed by "
7363 "B<mtrace>(), so that tracing information is no longer recorded for the "
7364 "memory-allocation functions.  If no hook functions were successfully "
7365 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7366 msgstr ""
7367
7368 #. type: Plain text
7369 #: build/C/man3/mtrace.3:65
7370 msgid ""
7371 "When B<mtrace>()  is called, it checks the value of the environment variable "
7372 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7373 "tracing information is to be recorded.  If the pathname is successfully "
7374 "opened, it is truncated to zero length."
7375 msgstr ""
7376
7377 #. type: Plain text
7378 #: build/C/man3/mtrace.3:78
7379 msgid ""
7380 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7381 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7382 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7383 "ignored, and B<mtrace>()  has no effect."
7384 msgstr ""
7385
7386 #. type: Plain text
7387 #: build/C/man3/mtrace.3:86
7388 msgid ""
7389 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7390 "program, and B<muntrace>()  is never called."
7391 msgstr ""
7392
7393 #. type: Plain text
7394 #: build/C/man3/mtrace.3:96
7395 msgid ""
7396 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7397 "designed to be human readable.  The GNU C library provides a Perl script, "
7398 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7399 "output.  For best results, the traced program should be compiled with "
7400 "debugging enabled, so that line-number information is recorded in the "
7401 "executable."
7402 msgstr ""
7403
7404 #. type: Plain text
7405 #: build/C/man3/mtrace.3:102
7406 msgid ""
7407 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7408 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7409 msgstr ""
7410
7411 #. type: Plain text
7412 #: build/C/man3/mtrace.3:108
7413 msgid ""
7414 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7415 "the line number references may refer to the previous or following "
7416 "(nonblank)  line of the source code."
7417 msgstr ""
7418
7419 #. type: Plain text
7420 #: build/C/man3/mtrace.3:115
7421 msgid ""
7422 "The shell session below demonstrates the use of the B<mtrace>()  function "
7423 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7424 "different locations.  The demonstration uses the following program:"
7425 msgstr ""
7426
7427 #. type: Plain text
7428 #: build/C/man3/mtrace.3:122
7429 #, no-wrap
7430 msgid ""
7431 "$ B<cat t_mtrace.c>\n"
7432 "#include E<lt>mcheck.hE<gt>\n"
7433 "#include E<lt>stdlib.hE<gt>\n"
7434 "#include E<lt>stdio.hE<gt>\n"
7435 msgstr ""
7436 "$ B<cat t_mtrace.c>\n"
7437 "#include E<lt>mcheck.hE<gt>\n"
7438 "#include E<lt>stdlib.hE<gt>\n"
7439 "#include E<lt>stdio.hE<gt>\n"
7440
7441 #. type: Plain text
7442 #: build/C/man3/mtrace.3:127
7443 #, no-wrap
7444 msgid ""
7445 "int\n"
7446 "main(int argc, char *argv[])\n"
7447 "{\n"
7448 "    int j;\n"
7449 msgstr ""
7450 "int\n"
7451 "main(int argc, char *argv[])\n"
7452 "{\n"
7453 "    int j;\n"
7454
7455 #. type: Plain text
7456 #: build/C/man3/mtrace.3:129
7457 #, no-wrap
7458 msgid "    mtrace();\n"
7459 msgstr "    mtrace();\n"
7460
7461 #. type: Plain text
7462 #: build/C/man3/mtrace.3:132
7463 #, no-wrap
7464 msgid ""
7465 "    for (j = 0; j E<lt> 2; j++)\n"
7466 "        malloc(100);            /* Never freed--a memory leak */\n"
7467 msgstr ""
7468 "    for (j = 0; j E<lt> 2; j++)\n"
7469 "        malloc(100);            /* Never freed--a memory leak */\n"
7470
7471 #. type: Plain text
7472 #: build/C/man3/mtrace.3:136
7473 #, no-wrap
7474 msgid ""
7475 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7476 "    exit(EXIT_SUCCESS);\n"
7477 "}\n"
7478 msgstr ""
7479 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7480 "    exit(EXIT_SUCCESS);\n"
7481 "}\n"
7482
7483 #. type: Plain text
7484 #: build/C/man3/mtrace.3:142
7485 msgid ""
7486 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7487 "memory leaks at two different locations in the program:"
7488 msgstr ""
7489
7490 #. type: Plain text
7491 #: build/C/man3/mtrace.3:155
7492 #, no-wrap
7493 msgid ""
7494 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7495 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7496 "$ B<./t_mtrace>\n"
7497 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7498 "Memory not freed:\n"
7499 "-----------------\n"
7500 "   Address     Size     Caller\n"
7501 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7502 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7503 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7504 msgstr ""
7505 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7506 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7507 "$ B<./t_mtrace>\n"
7508 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7509 "Memory not freed:\n"
7510 "-----------------\n"
7511 "   Address     Size     Caller\n"
7512 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7513 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7514 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7515
7516 #. type: Plain text
7517 #: build/C/man3/mtrace.3:167
7518 msgid ""
7519 "The first two messages about unfreed memory correspond to the two "
7520 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7521 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7522 msgstr ""
7523
7524 #. type: Plain text
7525 #: build/C/man3/mtrace.3:172
7526 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7527 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7528
7529 #. type: TH
7530 #: build/C/man2/posix_fadvise.2:28
7531 #, no-wrap
7532 msgid "POSIX_FADVISE"
7533 msgstr "POSIX_FADVISE"
7534
7535 #. type: Plain text
7536 #: build/C/man2/posix_fadvise.2:31
7537 msgid "posix_fadvise - predeclare an access pattern for file data"
7538 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7539
7540 #. type: Plain text
7541 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7542 #, no-wrap
7543 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7544 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7545
7546 #. type: Plain text
7547 #: build/C/man2/posix_fadvise.2:37
7548 #, no-wrap
7549 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7550 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7551
7552 #. type: Plain text
7553 #: build/C/man2/posix_fadvise.2:46
7554 msgid "B<posix_fadvise>():"
7555 msgstr "B<posix_fadvise>():"
7556
7557 #. type: Plain text
7558 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7559 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7560 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7561
7562 #. type: Plain text
7563 #: build/C/man2/posix_fadvise.2:56
7564 msgid ""
7565 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7566 "data in a specific pattern in the future, thus allowing the kernel to "
7567 "perform appropriate optimizations."
7568 msgstr ""
7569 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7570 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7571 "適化を実行することが可能になる。"
7572
7573 #. type: Plain text
7574 #: build/C/man2/posix_fadvise.2:63
7575 msgid ""
7576 "The I<advice> applies to a (not necessarily existent) region starting at "
7577 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7578 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7579 "binding; it merely constitutes an expectation on behalf of the application."
7580 msgstr ""
7581 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7582 "イ\n"
7583 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7584 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7585 "ケー\n"
7586 "ションのために可能性を構成するだけである。"
7587
7588 #. type: Plain text
7589 #: build/C/man2/posix_fadvise.2:65
7590 msgid "Permissible values for I<advice> include:"
7591 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7592
7593 #. type: TP
7594 #: build/C/man2/posix_fadvise.2:65
7595 #, no-wrap
7596 msgid "B<POSIX_FADV_NORMAL>"
7597 msgstr "B<POSIX_FADV_NORMAL>"
7598
7599 #. type: Plain text
7600 #: build/C/man2/posix_fadvise.2:71
7601 msgid ""
7602 "Indicates that the application has no advice to give about its access "
7603 "pattern for the specified data.  If no advice is given for an open file, "
7604 "this is the default assumption."
7605 msgstr ""
7606 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7607 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7608 "合、 これがデフォルトで仮定される。"
7609
7610 #. type: TP
7611 #: build/C/man2/posix_fadvise.2:71
7612 #, no-wrap
7613 msgid "B<POSIX_FADV_SEQUENTIAL>"
7614 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7615
7616 #. type: Plain text
7617 #: build/C/man2/posix_fadvise.2:75
7618 msgid ""
7619 "The application expects to access the specified data sequentially (with "
7620 "lower offsets read before higher ones)."
7621 msgstr ""
7622 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7623 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7624
7625 #. type: TP
7626 #: build/C/man2/posix_fadvise.2:75
7627 #, no-wrap
7628 msgid "B<POSIX_FADV_RANDOM>"
7629 msgstr "B<POSIX_FADV_RANDOM>"
7630
7631 #. type: Plain text
7632 #: build/C/man2/posix_fadvise.2:78
7633 msgid "The specified data will be accessed in random order."
7634 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7635
7636 #. type: TP
7637 #: build/C/man2/posix_fadvise.2:78
7638 #, no-wrap
7639 msgid "B<POSIX_FADV_NOREUSE>"
7640 msgstr "B<POSIX_FADV_NOREUSE>"
7641
7642 #. type: Plain text
7643 #: build/C/man2/posix_fadvise.2:81
7644 msgid "The specified data will be accessed only once."
7645 msgstr "指定されたデータは 1 度しかアクセスされない。"
7646
7647 #. type: TP
7648 #: build/C/man2/posix_fadvise.2:81
7649 #, no-wrap
7650 msgid "B<POSIX_FADV_WILLNEED>"
7651 msgstr "B<POSIX_FADV_WILLNEED>"
7652
7653 #. type: Plain text
7654 #: build/C/man2/posix_fadvise.2:84
7655 msgid "The specified data will be accessed in the near future."
7656 msgstr "指定されたデータは近い将来アクセスされる。"
7657
7658 #. type: TP
7659 #: build/C/man2/posix_fadvise.2:84
7660 #, no-wrap
7661 msgid "B<POSIX_FADV_DONTNEED>"
7662 msgstr "B<POSIX_FADV_DONTNEED>"
7663
7664 #. type: Plain text
7665 #: build/C/man2/posix_fadvise.2:87
7666 msgid "The specified data will not be accessed in the near future."
7667 msgstr "指定されたデータは近い将来アクセスされない。"
7668
7669 #. type: Plain text
7670 #: build/C/man2/posix_fadvise.2:90
7671 msgid "On success, zero is returned.  On error, an error number is returned."
7672 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7673
7674 #. type: Plain text
7675 #: build/C/man2/posix_fadvise.2:94
7676 msgid "The I<fd> argument was not a valid file descriptor."
7677 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7678
7679 #. type: Plain text
7680 #: build/C/man2/posix_fadvise.2:97
7681 msgid "An invalid value was specified for I<advice>."
7682 msgstr "無効な値が I<advice> に指定された。"
7683
7684 #.  commit 87ba81dba431232548ce29d5d224115d0c2355ac
7685 #. type: Plain text
7686 #: build/C/man2/posix_fadvise.2:107
7687 #, fuzzy
7688 #| msgid ""
7689 #| "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7690 #| "returns B<EINVAL> in this case.)"
7691 msgid ""
7692 "The specified file descriptor refers to a pipe or FIFO.  (B<ESPIPE> is the "
7693 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7694 "B<EINVAL> in this case.)"
7695 msgstr ""
7696 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7697 "合、Linux は実際には B<EINVAL> を返す)。"
7698
7699 #.  of fadvise64_64()
7700 #. type: Plain text
7701 #: build/C/man2/posix_fadvise.2:115
7702 msgid ""
7703 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7704 "called B<fadvise64>().  Library support has been provided since glibc "
7705 "version 2.2, via the wrapper function B<posix_fadvise>()."
7706 msgstr ""
7707 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7708 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7709 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7710 "ラッパー関数は B<posix_fadvise>() という名前である。"
7711
7712 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7713 #. type: Plain text
7714 #: build/C/man2/posix_fadvise.2:122
7715 msgid ""
7716 "Since Linux 3.18, support for the underlying system call is optional, "
7717 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7718 "option."
7719 msgstr ""
7720
7721 #. type: Plain text
7722 #: build/C/man2/posix_fadvise.2:131
7723 msgid ""
7724 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7725 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7726 msgstr ""
7727 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7728 "I<off_t> に変更された点に注意すること。"
7729
7730 #. type: Plain text
7731 #: build/C/man2/posix_fadvise.2:137
7732 msgid ""
7733 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7734 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7735 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7736 "the entire file, not just the specified region (but other open file handles "
7737 "to the same file are unaffected)."
7738 msgstr ""
7739 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7740 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7741 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7742 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7743 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7744
7745 #. type: Plain text
7746 #: build/C/man2/posix_fadvise.2:144
7747 msgid ""
7748 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7749 "into the page cache.  The amount of data read may be decreased by the kernel "
7750 "depending on virtual memory load.  (A few megabytes will usually be fully "
7751 "satisfied, and more is rarely useful.)"
7752 msgstr ""
7753 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7754 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7755 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7756 "くてもめったに役に立たない)。"
7757
7758 #. type: Plain text
7759 #: build/C/man2/posix_fadvise.2:148
7760 msgid ""
7761 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7762 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7763 "flag is a no-op."
7764 msgstr ""
7765 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7766 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7767 "フラグは何も行わない。"
7768
7769 #. type: Plain text
7770 #: build/C/man2/posix_fadvise.2:156
7771 msgid ""
7772 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7773 "specified region.  This is useful, for example, while streaming large "
7774 "files.  A program may periodically request the kernel to free cached data "
7775 "that has already been used, so that more useful cached pages are not "
7776 "discarded instead."
7777 msgstr ""
7778 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7779 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7780 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7781 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7782 "されたページが、 代わりに破棄されることはない。"
7783
7784 #. type: Plain text
7785 #: build/C/man2/posix_fadvise.2:164
7786 msgid ""
7787 "Requests to discard partial pages are ignored.  It is preferable to preserve "
7788 "needed data than discard unneeded data.  If the application requires that "
7789 "data be considered for discarding then I<offset> and I<len> must be page-"
7790 "aligned."
7791 msgstr ""
7792
7793 #. type: Plain text
7794 #: build/C/man2/posix_fadvise.2:172
7795 msgid ""
7796 "Pages that have not yet been written out will be unaffected, so if the "
7797 "application wishes to guarantee that pages will be released, it should call "
7798 "B<fsync>(2)  or B<fdatasync>(2)  first."
7799 msgstr ""
7800 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7801 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7802 "B<fdatasync>(2)  を呼ぶべきである。"
7803
7804 #. type: SS
7805 #: build/C/man2/posix_fadvise.2:172
7806 #, no-wrap
7807 msgid "Architecture-specific variants"
7808 msgstr "アーキテクチャ固有の派生バージョン"
7809
7810 #. type: Plain text
7811 #: build/C/man2/posix_fadvise.2:189
7812 msgid ""
7813 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7814 "of registers (see B<syscall>(2)  for further detail).  On such "
7815 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7816 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7817 "and I<offset> arguments.  Therefore, these architectures define a version of "
7818 "the system call that orders the arguments suitably, but otherwise is "
7819 "otherwise exactly the same as B<posix_fadvise>()."
7820 msgstr ""
7821 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7822 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7823 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7824 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7825 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7826 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7827
7828 #. type: Plain text
7829 #: build/C/man2/posix_fadvise.2:191
7830 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7831 msgstr ""
7832 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7833
7834 #. type: Plain text
7835 #: build/C/man2/posix_fadvise.2:196
7836 #, no-wrap
7837 msgid ""
7838 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7839 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7840 msgstr ""
7841 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7842 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7843
7844 #. type: Plain text
7845 #: build/C/man2/posix_fadvise.2:204
7846 msgid ""
7847 "These architecture-specific details are generally hidden from applications "
7848 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7849 "appropriate architecture-specific system call."
7850 msgstr ""
7851 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7852 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7853 "なアーキテクチャ固有のシステムコールが呼び出される。"
7854
7855 #. type: Plain text
7856 #: build/C/man2/posix_fadvise.2:209
7857 msgid ""
7858 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7859 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7860 "through to the end of the file\"."
7861 msgstr ""
7862 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7863 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7864 "いた。"
7865
7866 #.  FIXME . Write a posix_fadvise(3) page.
7867 #. type: Plain text
7868 #: build/C/man2/posix_fadvise.2:215
7869 msgid ""
7870 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7871 "B<posix_madvise>(3)"
7872 msgstr ""
7873 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7874 "B<posix_madvise>(3)"
7875
7876 #. type: TH
7877 #: build/C/man3/posix_fallocate.3:25
7878 #, no-wrap
7879 msgid "POSIX_FALLOCATE"
7880 msgstr "POSIX_FALLOCATE"
7881
7882 #. type: TH
7883 #: build/C/man3/posix_fallocate.3:25
7884 #, no-wrap
7885 msgid "2014-06-03"
7886 msgstr "2014-06-03"
7887
7888 #. type: Plain text
7889 #: build/C/man3/posix_fallocate.3:28
7890 msgid "posix_fallocate - allocate file space"
7891 msgstr "posix_fallocate - ファイルのスペースを確保する"
7892
7893 #. type: Plain text
7894 #: build/C/man3/posix_fallocate.3:33
7895 #, no-wrap
7896 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7897 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7898
7899 #. type: Plain text
7900 #: build/C/man3/posix_fallocate.3:42
7901 msgid "B<posix_fallocate>():"
7902 msgstr "B<posix_fallocate>():"
7903
7904 #. type: Plain text
7905 #: build/C/man3/posix_fallocate.3:61
7906 msgid ""
7907 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7908 "the file referred to by the descriptor I<fd> for the bytes in the range "
7909 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7910 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7911 "range are guaranteed not to fail because of lack of disk space."
7912 msgstr ""
7913 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7914 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7915 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7916 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7917 "失敗しないことが保証される。"
7918
7919 #. type: Plain text
7920 #: build/C/man3/posix_fallocate.3:66
7921 msgid ""
7922 "If the size of the file is less than I<offset>+I<len>, then the file is "
7923 "increased to this size; otherwise the file size is left unchanged."
7924 msgstr ""
7925 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7926 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7927
7928 #. type: Plain text
7929 #: build/C/man3/posix_fallocate.3:72
7930 msgid ""
7931 "B<posix_fallocate>()  returns zero on success, or an error number on "
7932 "failure.  Note that I<errno> is not set."
7933 msgstr ""
7934 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7935 "す。 I<errno> が設定されない点に注意すること。"
7936
7937 #. type: Plain text
7938 #: build/C/man3/posix_fallocate.3:81
7939 msgid "I<offset+len> exceeds the maximum file size."
7940 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7941
7942 #. type: Plain text
7943 #: build/C/man3/posix_fallocate.3:91
7944 msgid "I<fd> does not refer to a regular file."
7945 msgstr "I<fd> が通常のファイルとして参照されていない。"
7946
7947 #. type: Plain text
7948 #: build/C/man3/posix_fallocate.3:100
7949 msgid "I<fd> refers to a pipe."
7950 msgstr "I<fd> がパイプを参照している。"
7951
7952 #. type: Plain text
7953 #: build/C/man3/posix_fallocate.3:103
7954 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7955 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7956
7957 #. type: Plain text
7958 #: build/C/man3/posix_fallocate.3:108
7959 msgid "The B<posix_fallocate>()  function is thread-safe."
7960 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
7961
7962 #. type: Plain text
7963 #: build/C/man3/posix_fallocate.3:133
7964 msgid ""
7965 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7966 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7967 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7968 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7969 "zero."
7970 msgstr ""
7971 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7972 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7973 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7974 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7975 "る。"
7976
7977 #. type: Plain text
7978 #: build/C/man3/posix_fallocate.3:138
7979 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7980 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7981
7982 #. type: TH
7983 #: build/C/man3/posix_memalign.3:29
7984 #, no-wrap
7985 msgid "POSIX_MEMALIGN"
7986 msgstr "POSIX_MEMALIGN"
7987
7988 #. type: TH
7989 #: build/C/man3/posix_memalign.3:29
7990 #, no-wrap
7991 msgid "2013-09-02"
7992 msgstr "2013-09-02"
7993
7994 #. type: Plain text
7995 #: build/C/man3/posix_memalign.3:32
7996 msgid ""
7997 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7998 "memory"
7999 msgstr ""
8000 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8001 "されたメモリの割り当てを行う"
8002
8003 #. type: Plain text
8004 #: build/C/man3/posix_memalign.3:35
8005 #, no-wrap
8006 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8007 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8008
8009 #. type: Plain text
8010 #: build/C/man3/posix_memalign.3:39
8011 #, no-wrap
8012 msgid ""
8013 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8014 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8015 "B<void *valloc(size_t >I<size>B<);>\n"
8016 msgstr ""
8017 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8018 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8019 "B<void *valloc(size_t >I<size>B<);>\n"
8020
8021 #. type: Plain text
8022 #: build/C/man3/posix_memalign.3:44
8023 #, no-wrap
8024 msgid ""
8025 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8026 "B<void *pvalloc(size_t >I<size>B<);>\n"
8027 msgstr ""
8028 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8029 "B<void *pvalloc(size_t >I<size>B<);>\n"
8030
8031 #. type: Plain text
8032 #: build/C/man3/posix_memalign.3:54
8033 msgid ""
8034 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8035 "E<gt>=\\ 600"
8036 msgstr ""
8037 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8038 "E<gt>=\\ 600"
8039
8040 #. type: Plain text
8041 #: build/C/man3/posix_memalign.3:57
8042 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8043 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8044
8045 #. type: Plain text
8046 #: build/C/man3/posix_memalign.3:59
8047 msgid "B<valloc>():"
8048 msgstr "B<valloc>():"
8049
8050 #. type: TP
8051 #: build/C/man3/posix_memalign.3:62
8052 #, no-wrap
8053 msgid "Since glibc 2.12:"
8054 msgstr "glibc 2.12 以降:"
8055
8056 #. type: Plain text
8057 #: build/C/man3/posix_memalign.3:69
8058 #, no-wrap
8059 msgid ""
8060 "_BSD_SOURCE ||\n"
8061 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8062 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8063 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8064 msgstr ""
8065 "_BSD_SOURCE ||\n"
8066 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8067 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8068 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8069
8070 #. type: TP
8071 #: build/C/man3/posix_memalign.3:71
8072 #, no-wrap
8073 msgid "Before glibc 2.12:"
8074 msgstr "glibc 2.12 より前:"
8075
8076 #. type: Plain text
8077 #: build/C/man3/posix_memalign.3:75
8078 msgid ""
8079 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8080 "_XOPEN_SOURCE_EXTENDED"
8081 msgstr ""
8082 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8083 "_XOPEN_SOURCE_EXTENDED"
8084
8085 #. type: Plain text
8086 #: build/C/man3/posix_memalign.3:82
8087 msgid ""
8088 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8089 "declaration of B<valloc>(); no feature test macros are required.)"
8090 msgstr ""
8091 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
8092 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8093
8094 #.  glibc does this:
8095 #. type: Plain text
8096 #: build/C/man3/posix_memalign.3:104
8097 msgid ""
8098 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8099 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8100 "memory will be a multiple of I<alignment>, which must be a power of two and "
8101 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8102 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8103 "successfully passed to B<free>(3)."
8104 msgstr ""
8105 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
8106 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
8107 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
8108 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
8109 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
8110 "B<free>(3)  に問題なく渡すことができる。"
8111
8112 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8113 #.  but no standards govern this.
8114 #. type: Plain text
8115 #: build/C/man3/posix_memalign.3:115
8116 msgid ""
8117 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8118 "pointer to the allocated memory.  The memory address will be a multiple of "
8119 "I<alignment>, which must be a power of two."
8120 msgstr ""
8121 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
8122 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
8123 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8124
8125 #. type: Plain text
8126 #: build/C/man3/posix_memalign.3:124
8127 msgid ""
8128 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8129 "the added restriction that I<size> should be a multiple of I<alignment>."
8130 msgstr ""
8131 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8132 "I<alignment>\n"
8133 "の倍数でなければならないという追加の制限がある点が異なる。"
8134
8135 #. type: Plain text
8136 #: build/C/man3/posix_memalign.3:133
8137 msgid ""
8138 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8139 "pointer to the allocated memory.  The memory address will be a multiple of "
8140 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8141 msgstr ""
8142 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
8143 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
8144 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
8145 "る。"
8146
8147 #. type: Plain text
8148 #: build/C/man3/posix_memalign.3:140
8149 msgid ""
8150 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8151 "the size of the allocation up to the next multiple of the system page size."
8152 msgstr ""
8153 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8154 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8155
8156 #. type: Plain text
8157 #: build/C/man3/posix_memalign.3:142
8158 msgid "For all of these functions, the memory is not zeroed."
8159 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
8160
8161 #. type: Plain text
8162 #: build/C/man3/posix_memalign.3:149
8163 msgid ""
8164 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8165 "pointer to the allocated memory, or NULL if the request fails."
8166 msgstr ""
8167 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8168 "た\n"
8169 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
8170
8171 #. type: Plain text
8172 #: build/C/man3/posix_memalign.3:157
8173 msgid ""
8174 "B<posix_memalign>()  returns zero on success, or one of the error values "
8175 "listed in the next section on failure.  The value of I<errno> is "
8176 "indeterminate after a call to B<posix_memalign>()."
8177 msgstr ""
8178 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8179 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8180 "I<errno> の値は不定である。"
8181
8182 #. type: Plain text
8183 #: build/C/man3/posix_memalign.3:164
8184 msgid ""
8185 "The I<alignment> argument was not a power of two, or was not a multiple of "
8186 "I<sizeof(void\\ *)>."
8187 msgstr ""
8188 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8189 "かった。"
8190
8191 #. type: Plain text
8192 #: build/C/man3/posix_memalign.3:167
8193 msgid "There was insufficient memory to fulfill the allocation request."
8194 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8195
8196 #. type: Plain text
8197 #: build/C/man3/posix_memalign.3:174
8198 msgid ""
8199 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8200 "available in all Linux libc libraries."
8201 msgstr ""
8202 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8203 "すべての Linux libc ライブラリで使用可能である。"
8204
8205 #. type: Plain text
8206 #: build/C/man3/posix_memalign.3:178
8207 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8208 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8209
8210 #. type: Plain text
8211 #: build/C/man3/posix_memalign.3:182
8212 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8213 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8214
8215 #. type: Plain text
8216 #: build/C/man3/posix_memalign.3:189
8217 msgid ""
8218 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8219 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8220 "POSIX.1-2001."
8221 msgstr ""
8222 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8223 "り、\n"
8224 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8225
8226 #. type: Plain text
8227 #: build/C/man3/posix_memalign.3:193
8228 msgid "The function B<pvalloc>()  is a GNU extension."
8229 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8230
8231 #. type: Plain text
8232 #: build/C/man3/posix_memalign.3:197
8233 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8234 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8235
8236 #. type: Plain text
8237 #: build/C/man3/posix_memalign.3:201
8238 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8239 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8240
8241 #. type: Plain text
8242 #: build/C/man3/posix_memalign.3:206
8243 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8244 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8245
8246 #. type: SS
8247 #: build/C/man3/posix_memalign.3:206
8248 #, no-wrap
8249 msgid "Headers"
8250 msgstr "ヘッダ"
8251
8252 #. type: Plain text
8253 #: build/C/man3/posix_memalign.3:210
8254 msgid ""
8255 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8256 "hE<gt>>."
8257 msgstr ""
8258 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8259 "の意見が一致している。"
8260
8261 #. type: Plain text
8262 #: build/C/man3/posix_memalign.3:214
8263 msgid ""
8264 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8265 "of I<E<lt>malloc.hE<gt>>."
8266 msgstr ""
8267 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8268 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8269
8270 #. type: Plain text
8271 #: build/C/man3/posix_memalign.3:221
8272 msgid ""
8273 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8274 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8275 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8276 "above)."
8277 msgstr ""
8278 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8279 "libc4,5\n"
8280 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8281 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8282
8283 #. type: Plain text
8284 #: build/C/man3/posix_memalign.3:230
8285 msgid ""
8286 "On many systems there are alignment restrictions, for example, on buffers "
8287 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8288 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8289 "use B<posix_memalign>()  to satisfy this requirement."
8290 msgstr ""
8291 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8292 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8293 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8294 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8295 "と、この必要条件を満たすことができる。"
8296
8297 #. type: Plain text
8298 #: build/C/man3/posix_memalign.3:239
8299 msgid ""
8300 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8301 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8302 "is correct."
8303 msgstr ""
8304 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8305 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8306 "確認を行わないかもしれない。"
8307
8308 #.  Other systems allow passing the result of
8309 #.  .IR valloc ()
8310 #.  to
8311 #.  .IR free (3),
8312 #.  but not to
8313 #.  .IR realloc (3).
8314 #. type: Plain text
8315 #: build/C/man3/posix_memalign.3:267
8316 msgid ""
8317 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8318 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8319 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8320 "only a pointer obtained from B<malloc>(3), while, for example, "
8321 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8322 "The glibc implementation allows memory obtained from any of these functions "
8323 "to be reclaimed with B<free>(3)."
8324 msgstr ""
8325 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8326 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8327 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8328 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8329 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8330 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8331 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8332 "B<free>(3) で再利用することができる。"
8333
8334 #. type: Plain text
8335 #: build/C/man3/posix_memalign.3:272
8336 msgid ""
8337 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8338 "these functions are needed only if you require larger alignment values."
8339 msgstr ""
8340 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8341 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8342 "ト\n"
8343 "が必要な場合だけである。"
8344
8345 #. type: Plain text
8346 #: build/C/man3/posix_memalign.3:277
8347 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8348 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8349
8350 #. type: TH
8351 #: build/C/man2/readahead.2:28
8352 #, no-wrap
8353 msgid "READAHEAD"
8354 msgstr "READAHEAD"
8355
8356 #. type: TH
8357 #: build/C/man2/readahead.2:28
8358 #, no-wrap
8359 msgid "2014-03-15"
8360 msgstr "2014-03-15"
8361
8362 #. type: Plain text
8363 #: build/C/man2/readahead.2:31
8364 msgid "readahead - initiate file readahead into page cache"
8365 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8366
8367 #. type: Plain text
8368 #: build/C/man2/readahead.2:37
8369 #, no-wrap
8370 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8371 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8372
8373 #. type: Plain text
8374 #: build/C/man2/readahead.2:44
8375 msgid ""
8376 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8377 "that file will be satisfied from the cache, and not block on disk I/O "
8378 "(assuming the readahead was initiated early enough and that other activity "
8379 "on the system did not in the meantime flush pages from the cache)."
8380 msgstr ""
8381 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8382 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8383 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8384 "ページがフラッシュされない場合である)。"
8385
8386 #. type: Plain text
8387 #: build/C/man2/readahead.2:66
8388 msgid ""
8389 "The I<fd> argument is a file descriptor identifying the file which is to be "
8390 "read.  The I<offset> argument specifies the starting point from which data "
8391 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8392 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8393 "page boundary and bytes are read up to the next page boundary greater than "
8394 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8395 "of the file.  The current file offset of the open file referred to by I<fd> "
8396 "is left unchanged."
8397 msgstr ""
8398 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8399 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8400 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8401 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8402 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8403 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8404 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8405
8406 #. type: Plain text
8407 #: build/C/man2/readahead.2:72
8408 msgid ""
8409 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8410 "I<errno> set to indicate the cause of the error."
8411 msgstr ""
8412 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8413 "ラーの原因を示す値を設定する。"
8414
8415 #. type: Plain text
8416 #: build/C/man2/readahead.2:77
8417 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8418 msgstr ""
8419 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8420 "ていない。"
8421
8422 #. type: Plain text
8423 #: build/C/man2/readahead.2:83
8424 msgid ""
8425 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8426 msgstr ""
8427 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8428 "ファイルであった。"
8429
8430 #. type: Plain text
8431 #: build/C/man2/readahead.2:88
8432 msgid ""
8433 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8434 "been provided since version 2.3."
8435 msgstr ""
8436 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8437 "は glibc バージョン 2.3 以降で行われている。"
8438
8439 #. type: Plain text
8440 #: build/C/man2/readahead.2:93
8441 msgid ""
8442 "The B<readahead>()  system call is Linux-specific, and its use should be "
8443 "avoided in portable applications."
8444 msgstr ""
8445 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8446 "は 使用を避けるべきである。"
8447
8448 #. type: Plain text
8449 #: build/C/man2/readahead.2:98
8450 msgid ""
8451 "On some 32-bit architectures, the calling signature for this system call "
8452 "differs, for the reasons described in B<syscall>(2)."
8453 msgstr ""
8454 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8455 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8456
8457 #. type: Plain text
8458 #: build/C/man2/readahead.2:107
8459 msgid ""
8460 "B<readahead>()  attempts to schedule the reads in the background and return "
8461 "immediately.  However, it may block while it reads the filesystem metadata "
8462 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8463 "on large files using indirect blocks instead of extents, giving the "
8464 "appearance that the call blocks until the requested data has been read."
8465 msgstr ""
8466 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8467 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8468 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8469 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8470 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8471 "に見える。"
8472
8473 #. type: Plain text
8474 #: build/C/man2/readahead.2:113
8475 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8476 msgstr ""
8477 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8478
8479 #. type: TH
8480 #: build/C/man2/remap_file_pages.2:28
8481 #, no-wrap
8482 msgid "REMAP_FILE_PAGES"
8483 msgstr "REMAP_FILE_PAGES"
8484
8485 #. type: Plain text
8486 #: build/C/man2/remap_file_pages.2:31
8487 msgid "remap_file_pages - create a nonlinear file mapping"
8488 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8489
8490 #. type: Plain text
8491 #: build/C/man2/remap_file_pages.2:35
8492 #, no-wrap
8493 msgid ""
8494 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8495 "B<#include E<lt>sys/mman.hE<gt>>\n"
8496 msgstr ""
8497 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8498 "B<#include E<lt>sys/mman.hE<gt>>\n"
8499
8500 #. type: Plain text
8501 #: build/C/man2/remap_file_pages.2:38
8502 #, no-wrap
8503 msgid ""
8504 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8505 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8506 msgstr ""
8507 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8508 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8509
8510 #.  commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8511 #.  http://lwn.net/Articles/597632/
8512 #. type: Plain text
8513 #: build/C/man2/remap_file_pages.2:47
8514 msgid ""
8515 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8516 "eventually be replaced by a slower in-kernel emulation.  Those few "
8517 "applications that use this system call should consider migrating to "
8518 "alternatives."
8519 msgstr ""
8520
8521 #. type: Plain text
8522 #: build/C/man2/remap_file_pages.2:59
8523 msgid ""
8524 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8525 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8526 "nonsequential order in memory.  The advantage of using "
8527 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8528 "former approach does not require the kernel to create additional VMA "
8529 "(Virtual Memory Area) data structures."
8530 msgstr ""
8531 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8532 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8533 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8534 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8535 "域)  データ構造体を追加で作成する必要がないことである。"
8536
8537 #. type: Plain text
8538 #: build/C/man2/remap_file_pages.2:61
8539 msgid "To create a nonlinear mapping we perform the following steps:"
8540 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8541
8542 #. type: TP
8543 #: build/C/man2/remap_file_pages.2:61
8544 #, no-wrap
8545 msgid "1."
8546 msgstr "1."
8547
8548 #. type: Plain text
8549 #: build/C/man2/remap_file_pages.2:69
8550 msgid ""
8551 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8552 "mapping must be created with the B<MAP_SHARED> flag."
8553 msgstr ""
8554 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8555 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8556 "い。"
8557
8558 #. type: TP
8559 #: build/C/man2/remap_file_pages.2:69
8560 #, no-wrap
8561 msgid "2."
8562 msgstr "2."
8563
8564 #. type: Plain text
8565 #: build/C/man2/remap_file_pages.2:77
8566 msgid ""
8567 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8568 "correspondence between the pages of the mapping and the pages of the file.  "
8569 "It is possible to map the same page of a file into multiple locations within "
8570 "the mapped region."
8571 msgstr ""
8572 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8573 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8574 "所に マップすることが可能である。"
8575
8576 #. type: Plain text
8577 #: build/C/man2/remap_file_pages.2:88
8578 msgid ""
8579 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8580 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8581 "system page size; I<size> is the length of the region in bytes."
8582 msgstr ""
8583 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8584 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8585 "る。 I<size> は領域の長さであり、単位はバイトである。"
8586
8587 #. type: Plain text
8588 #: build/C/man2/remap_file_pages.2:106
8589 msgid ""
8590 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8591 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8592 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8593 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8594 "and I<size> will be placed."
8595 msgstr ""
8596 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8597 "成したいページの マッピングを識別することである。 よって I<addr> は "
8598 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8599 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8600 "予定のアドレスを、 I<addr> によって指定することである。"
8601
8602 #.  This rounding is weird, and not consistent with the treatment of
8603 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8604 #.  MTK, 14 Sep 2005
8605 #. type: Plain text
8606 #: build/C/man2/remap_file_pages.2:120
8607 msgid ""
8608 "The values specified in I<addr> and I<size> should be multiples of the "
8609 "system page size.  If they are not, then the kernel rounds I<both> values "
8610 "I<down> to the nearest multiple of the page size."
8611 msgstr ""
8612 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8613 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8614 "「切り下げる」。"
8615
8616 #. type: Plain text
8617 #: build/C/man2/remap_file_pages.2:124
8618 msgid "The I<prot> argument must be specified as 0."
8619 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8620
8621 #. type: Plain text
8622 #: build/C/man2/remap_file_pages.2:132
8623 msgid ""
8624 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8625 "other than B<MAP_NONBLOCK> are ignored."
8626 msgstr ""
8627 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8628 "の全てのフラグは無視される。"
8629
8630 #. type: Plain text
8631 #: build/C/man2/remap_file_pages.2:139
8632 msgid ""
8633 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8634 "I<errno> is set appropriately."
8635 msgstr ""
8636 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8637 "れ、 I<errno> が適切に設定される。"
8638
8639 #. type: Plain text
8640 #: build/C/man2/remap_file_pages.2:147
8641 msgid ""
8642 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8643 "flag."
8644 msgstr ""
8645 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8646 "いない。"
8647
8648 #.  And possibly others from vma->vm_ops->populate()
8649 #. type: Plain text
8650 #: build/C/man2/remap_file_pages.2:156
8651 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8652 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8653
8654 #. type: Plain text
8655 #: build/C/man2/remap_file_pages.2:161
8656 msgid ""
8657 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8658 "support was added in version 2.3.3."
8659 msgstr ""
8660 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8661 "サポートは glibc バージョン 2.3.3 で追加された。"
8662
8663 #. type: Plain text
8664 #: build/C/man2/remap_file_pages.2:165
8665 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8666 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8667
8668 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8669 #. type: Plain text
8670 #: build/C/man2/remap_file_pages.2:176
8671 msgid ""
8672 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8673 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8674 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8675 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8676 "addresses."
8677 msgstr ""
8678
8679 #. type: Plain text
8680 #: build/C/man2/remap_file_pages.2:183
8681 msgid ""
8682 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8683 "B<msync>(2)"
8684 msgstr ""
8685 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8686 "B<msync>(2)"
8687
8688 #. type: TH
8689 #: build/C/man3/shm_open.3:26
8690 #, no-wrap
8691 msgid "SHM_OPEN"
8692 msgstr "SHM_OPEN"
8693
8694 #. type: TH
8695 #: build/C/man3/shm_open.3:26
8696 #, no-wrap
8697 msgid "2009-02-25"
8698 msgstr "2009-02-25"
8699
8700 #. type: Plain text
8701 #: build/C/man3/shm_open.3:29
8702 msgid ""
8703 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8704 msgstr ""
8705 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8706 "う"
8707
8708 #. type: Plain text
8709 #: build/C/man3/shm_open.3:33
8710 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8711 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8712
8713 #. type: Plain text
8714 #: build/C/man3/shm_open.3:35
8715 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8716 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8717
8718 #. type: Plain text
8719 #: build/C/man3/shm_open.3:37
8720 msgid ""
8721 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8722 msgstr ""
8723 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8724
8725 #. type: Plain text
8726 #: build/C/man3/shm_open.3:39
8727 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8728 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8729
8730 #. type: Plain text
8731 #: build/C/man3/shm_open.3:41
8732 msgid "Link with I<-lrt>."
8733 msgstr "I<-lrt> でリンクする。"
8734
8735 #. type: Plain text
8736 #: build/C/man3/shm_open.3:53
8737 msgid ""
8738 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8739 "memory object.  A POSIX shared memory object is in effect a handle which can "
8740 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8741 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8742 "removing an object previously created by B<shm_open>()."
8743 msgstr ""
8744 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8745 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8746 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を "
8747 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8748 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8749
8750 #.  glibc allows the initial slash to be omitted, and makes
8751 #.  multiple initial slashes equivalent to a single slash.
8752 #.  This differs from the implementation of POSIX message queues.
8753 #.  glibc allows subdirectory components in the name, in which
8754 #.  case the subdirectory must exist under /dev/shm, and allow the
8755 #.  required permissions if a user wants to create a shared memory
8756 #.  object in that subdirectory.
8757 #. type: Plain text
8758 #: build/C/man3/shm_open.3:74
8759 msgid ""
8760 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8761 "specifies the shared memory object to be created or opened.  For portable "
8762 "use, a shared memory object should be identified by a name of the form I</"
8763 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8764 "255) characters consisting of an initial slash, followed by one or more "
8765 "characters, none of which are slashes."
8766 msgstr ""
8767 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8768 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8769 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8770 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8771 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8772
8773 #. type: Plain text
8774 #: build/C/man3/shm_open.3:81
8775 msgid ""
8776 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8777 "or B<O_RDWR> and any of the other flags listed here:"
8778 msgstr ""
8779 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8780 "述べる他のフラグの論理和をとったもの を指定する。"
8781
8782 #. type: TP
8783 #: build/C/man3/shm_open.3:81
8784 #, no-wrap
8785 msgid "B<O_RDONLY>"
8786 msgstr "B<O_RDONLY>"
8787
8788 #. type: Plain text
8789 #: build/C/man3/shm_open.3:89
8790 msgid ""
8791 "Open the object for read access.  A shared memory object opened in this way "
8792 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8793 msgstr ""
8794 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8795 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8796 "B<mmap>(2)  することができる。"
8797
8798 #. type: TP
8799 #: build/C/man3/shm_open.3:89
8800 #, no-wrap
8801 msgid "B<O_RDWR>"
8802 msgstr "B<O_RDWR>"
8803
8804 #. type: Plain text
8805 #: build/C/man3/shm_open.3:92
8806 msgid "Open the object for read-write access."
8807 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8808
8809 #. type: TP
8810 #: build/C/man3/shm_open.3:92
8811 #, no-wrap
8812 msgid "B<O_CREAT>"
8813 msgstr "B<O_CREAT>"
8814
8815 #.  In truth it is actually the filesystem IDs on Linux, but these
8816 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8817 #. type: Plain text
8818 #: build/C/man3/shm_open.3:112
8819 msgid ""
8820 "Create the shared memory object if it does not exist.  The user and group "
8821 "ownership of the object are taken from the corresponding effective IDs of "
8822 "the calling process, and the object's permission bits are set according to "
8823 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8824 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8825 "A set of macro constants which can be used to define I<mode> is listed in "
8826 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8827 "including I<E<lt>sys/stat.hE<gt>>.)"
8828 msgstr ""
8829 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8830 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8831 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8832 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8833 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8834 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8835 "hE<gt>> のインクルードにより得られる)。"
8836
8837 #. type: Plain text
8838 #: build/C/man3/shm_open.3:118
8839 msgid ""
8840 "A new shared memory object initially has zero length\\(emthe size of the "
8841 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8842 "shared memory object are automatically initialized to 0."
8843 msgstr ""
8844 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8845 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8846 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8847
8848 #. type: TP
8849 #: build/C/man3/shm_open.3:118
8850 #, no-wrap
8851 msgid "B<O_EXCL>"
8852 msgstr "B<O_EXCL>"
8853
8854 #. type: Plain text
8855 #: build/C/man3/shm_open.3:127
8856 msgid ""
8857 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8858 "I<name> already exists, return an error.  The check for the existence of the "
8859 "object, and its creation if it does not exist, are performed atomically."
8860 msgstr ""
8861 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8862 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8863 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8864 "atomically)。"
8865
8866 #. type: TP
8867 #: build/C/man3/shm_open.3:127
8868 #, no-wrap
8869 msgid "B<O_TRUNC>"
8870 msgstr "B<O_TRUNC>"
8871
8872 #. type: Plain text
8873 #: build/C/man3/shm_open.3:130
8874 msgid "If the shared memory object already exists, truncate it to zero bytes."
8875 msgstr ""
8876 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8877 "切り詰める。"
8878
8879 #. type: Plain text
8880 #: build/C/man3/shm_open.3:133
8881 msgid ""
8882 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8883 "hE<gt>>."
8884 msgstr ""
8885 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8886
8887 #. type: Plain text
8888 #: build/C/man3/shm_open.3:144
8889 msgid ""
8890 "On successful completion B<shm_open>()  returns a new file descriptor "
8891 "referring to the shared memory object.  This file descriptor is guaranteed "
8892 "to be the lowest-numbered file descriptor not previously opened within the "
8893 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8894 "descriptor."
8895 msgstr ""
8896 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8897 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8898 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8899 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8900 "ファイル・ディスクリプタに設定される。"
8901
8902 #. type: Plain text
8903 #: build/C/man3/shm_open.3:153
8904 msgid ""
8905 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8906 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8907 "the file descriptor may be closed without affecting the memory mapping."
8908 msgstr ""
8909 "通常、これらのファイル・ディスクリプタは、この後続けて実行される "
8910 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
8911 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタを"
8912 "クローズしてもよく、 クローズしてもメモリ・マッピングに影響を与えることはな"
8913 "い。"
8914
8915 #. type: Plain text
8916 #: build/C/man3/shm_open.3:171
8917 msgid ""
8918 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8919 "shared memory object name, and, once all processes have unmapped the object, "
8920 "de-allocates and destroys the contents of the associated memory region.  "
8921 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8922 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8923 "case a new, distinct object is created)."
8924 msgstr ""
8925 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8926 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8927 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8928 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8929 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8930 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8931
8932 #. type: Plain text
8933 #: build/C/man3/shm_open.3:180
8934 msgid ""
8935 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8936 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8937 "or -1 on error."
8938 msgstr ""
8939 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8940 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8941 "を、エラーが起こった場合 -1 を返す。"
8942
8943 #. type: Plain text
8944 #: build/C/man3/shm_open.3:187
8945 msgid ""
8946 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8947 "which may appear in I<errno> include the following:"
8948 msgstr ""
8949 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8950 "される値は以下の通りである:"
8951
8952 #. type: Plain text
8953 #: build/C/man3/shm_open.3:192
8954 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8955 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8956
8957 #. type: Plain text
8958 #: build/C/man3/shm_open.3:202
8959 msgid ""
8960 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8961 "B<O_TRUNC> was specified and the caller does not have write permission on "
8962 "the object."
8963 msgstr ""
8964 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8965 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8966 "み権限が なかった。"
8967
8968 #. type: TP
8969 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
8970 #, no-wrap
8971 msgid "B<EEXIST>"
8972 msgstr "B<EEXIST>"
8973
8974 #. type: Plain text
8975 #: build/C/man3/shm_open.3:213
8976 msgid ""
8977 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8978 "shared memory object specified by I<name> already exists."
8979 msgstr ""
8980 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8981 "定された共有メモリ・オブジェクトが既に存在した。"
8982
8983 #. type: Plain text
8984 #: build/C/man3/shm_open.3:220
8985 msgid "The I<name> argument to B<shm_open>()  was invalid."
8986 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8987
8988 #. type: TP
8989 #: build/C/man3/shm_open.3:220
8990 #, no-wrap
8991 msgid "B<EMFILE>"
8992 msgstr "B<EMFILE>"
8993
8994 #. type: Plain text
8995 #: build/C/man3/shm_open.3:223
8996 msgid "The process already has the maximum number of files open."
8997 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8998
8999 #. type: TP
9000 #: build/C/man3/shm_open.3:223
9001 #, no-wrap
9002 msgid "B<ENAMETOOLONG>"
9003 msgstr "B<ENAMETOOLONG>"
9004
9005 #. type: Plain text
9006 #: build/C/man3/shm_open.3:229
9007 msgid "The length of I<name> exceeds B<PATH_MAX>."
9008 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9009
9010 #. type: Plain text
9011 #: build/C/man3/shm_open.3:233
9012 msgid ""
9013 "The limit on the total number of files open on the system has been reached."
9014 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9015
9016 #. type: TP
9017 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9018 #: build/C/man2/shmget.2:225
9019 #, no-wrap
9020 msgid "B<ENOENT>"
9021 msgstr "B<ENOENT>"
9022
9023 #. type: Plain text
9024 #: build/C/man3/shm_open.3:242
9025 msgid ""
9026 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
9027 "B<O_CREAT> was not specified."
9028 msgstr ""
9029 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
9030 "B<O_CREAT> が指定されていなかった。"
9031
9032 #. type: Plain text
9033 #: build/C/man3/shm_open.3:249
9034 msgid ""
9035 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9036 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9037
9038 #. type: Plain text
9039 #: build/C/man3/shm_open.3:251
9040 msgid "These functions are provided in glibc 2.2 and later."
9041 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9042
9043 #. type: Plain text
9044 #: build/C/man3/shm_open.3:257
9045 msgid ""
9046 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9047 "object is set to either the calling process's effective group ID or \"a "
9048 "system default group ID\"."
9049 msgstr ""
9050 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
9051 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9052 "ID」 のどちらかに設定される、と書かれている。"
9053
9054 #. type: Plain text
9055 #: build/C/man3/shm_open.3:266
9056 msgid ""
9057 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9058 "unspecified.  On Linux, this will successfully truncate an existing shared "
9059 "memory object\\(emthis may not be so on other UNIX systems."
9060 msgstr ""
9061 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9062 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
9063 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9064
9065 #. type: Plain text
9066 #: build/C/man3/shm_open.3:271
9067 msgid ""
9068 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9069 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9070 msgstr ""
9071 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
9072 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9073
9074 #. type: Plain text
9075 #: build/C/man3/shm_open.3:282
9076 msgid ""
9077 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9078 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9079 msgstr ""
9080 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9081 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9082
9083 #. type: TH
9084 #: build/C/man7/shm_overview.7:27
9085 #, no-wrap
9086 msgid "SHM_OVERVIEW"
9087 msgstr "SHM_OVERVIEW"
9088
9089 #. type: TH
9090 #: build/C/man7/shm_overview.7:27
9091 #, no-wrap
9092 msgid "2010-09-10"
9093 msgstr "2010-09-10"
9094
9095 #. type: Plain text
9096 #: build/C/man7/shm_overview.7:30
9097 msgid "shm_overview - overview of POSIX shared memory"
9098 msgstr "shm_overview - POSIX 共有メモリの概要"
9099
9100 #. type: Plain text
9101 #: build/C/man7/shm_overview.7:33
9102 msgid ""
9103 "The POSIX shared memory API allows processes to communicate information by "
9104 "sharing a region of memory."
9105 msgstr ""
9106 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
9107 "情報をやり取りすることができる。"
9108
9109 #. type: Plain text
9110 #: build/C/man7/shm_overview.7:35
9111 msgid "The interfaces employed in the API are:"
9112 msgstr "この API では以下のインターフェースが採用されている。"
9113
9114 #. type: TP
9115 #: build/C/man7/shm_overview.7:35
9116 #, no-wrap
9117 msgid "B<shm_open>(3)"
9118 msgstr "B<shm_open>(3)"
9119
9120 #. type: Plain text
9121 #: build/C/man7/shm_overview.7:42
9122 msgid ""
9123 "Create and open a new object, or open an existing object.  This is analogous "
9124 "to B<open>(2).  The call returns a file descriptor for use by the other "
9125 "interfaces listed below."
9126 msgstr ""
9127 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9128 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9129 "る ファイルディスクリプタを返す。"
9130
9131 #. type: TP
9132 #: build/C/man7/shm_overview.7:42
9133 #, no-wrap
9134 msgid "B<ftruncate>(2)"
9135 msgstr "B<ftruncate>(2)"
9136
9137 #. type: Plain text
9138 #: build/C/man7/shm_overview.7:46
9139 msgid ""
9140 "Set the size of the shared memory object.  (A newly created shared memory "
9141 "object has a length of zero.)"
9142 msgstr "共有メモリオブジェクトの大きさを設定する。"
9143
9144 #. type: Plain text
9145 #: build/C/man7/shm_overview.7:50
9146 msgid ""
9147 "Map the shared memory object into the virtual address space of the calling "
9148 "process."
9149 msgstr ""
9150 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
9151
9152 #. type: TP
9153 #: build/C/man7/shm_overview.7:50
9154 #, no-wrap
9155 msgid "B<munmap>(2)"
9156 msgstr "B<munmap>(2)"
9157
9158 #. type: Plain text
9159 #: build/C/man7/shm_overview.7:54
9160 msgid ""
9161 "Unmap the shared memory object from the virtual address space of the calling "
9162 "process."
9163 msgstr ""
9164 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
9165 "る。"
9166
9167 #. type: TP
9168 #: build/C/man7/shm_overview.7:54
9169 #, no-wrap
9170 msgid "B<shm_unlink>(3)"
9171 msgstr "B<shm_unlink>(3)"
9172
9173 #. type: Plain text
9174 #: build/C/man7/shm_overview.7:57
9175 msgid "Remove a shared memory object name."
9176 msgstr "共有メモリオブジェクト名を削除する。"
9177
9178 #. type: TP
9179 #: build/C/man7/shm_overview.7:57
9180 #, no-wrap
9181 msgid "B<close>(2)"
9182 msgstr "B<close>(2)"
9183
9184 #. type: Plain text
9185 #: build/C/man7/shm_overview.7:62
9186 msgid ""
9187 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9188 "needed."
9189 msgstr ""
9190 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
9191 "のファイルディスクリプタをクローズする。"
9192
9193 #. type: TP
9194 #: build/C/man7/shm_overview.7:62
9195 #, no-wrap
9196 msgid "B<fstat>(2)"
9197 msgstr "B<fstat>(2)"
9198
9199 #. type: Plain text
9200 #: build/C/man7/shm_overview.7:76
9201 msgid ""
9202 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9203 "the information returned by this call are the object's size (I<st_size>), "
9204 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9205 msgstr ""
9206 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
9207 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
9208 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9209
9210 #. type: TP
9211 #: build/C/man7/shm_overview.7:76
9212 #, no-wrap
9213 msgid "B<fchown>(2)"
9214 msgstr "B<fchown>(2)"
9215
9216 #. type: Plain text
9217 #: build/C/man7/shm_overview.7:79
9218 msgid "To change the ownership of a shared memory object."
9219 msgstr "共有メモリオブジェクトの所有権を変更する。"
9220
9221 #. type: TP
9222 #: build/C/man7/shm_overview.7:79
9223 #, no-wrap
9224 msgid "B<fchmod>(2)"
9225 msgstr "B<fchmod>(2)"
9226
9227 #. type: Plain text
9228 #: build/C/man7/shm_overview.7:82
9229 msgid "To change the permissions of a shared memory object."
9230 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9231
9232 #. type: SS
9233 #: build/C/man7/shm_overview.7:82
9234 #, no-wrap
9235 msgid "Versions"
9236 msgstr "Versions"
9237
9238 #. type: Plain text
9239 #: build/C/man7/shm_overview.7:84
9240 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9241 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9242
9243 #. type: SS
9244 #: build/C/man7/shm_overview.7:84
9245 #, no-wrap
9246 msgid "Persistence"
9247 msgstr "持続性"
9248
9249 #. type: Plain text
9250 #: build/C/man7/shm_overview.7:89
9251 msgid ""
9252 "POSIX shared memory objects have kernel persistence: a shared memory object "
9253 "will exist until the system is shut down, or until all processes have "
9254 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9255 msgstr ""
9256 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9257 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9258 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9259
9260 #. type: SS
9261 #: build/C/man7/shm_overview.7:89
9262 #, no-wrap
9263 msgid "Linking"
9264 msgstr "リンク"
9265
9266 #. type: Plain text
9267 #: build/C/man7/shm_overview.7:94
9268 msgid ""
9269 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9270 "to link against the real-time library, I<librt>."
9271 msgstr ""
9272 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9273 "タイムライブラリ I<librt> とリンクしなければならない。"
9274
9275 #. type: SS
9276 #: build/C/man7/shm_overview.7:94
9277 #, no-wrap
9278 msgid "Accessing shared memory objects via the filesystem"
9279 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9280
9281 #. type: Plain text
9282 #: build/C/man7/shm_overview.7:101
9283 msgid ""
9284 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9285 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9286 "supports the use of access control lists (ACLs)  to control the permissions "
9287 "of objects in the virtual filesystem."
9288 msgstr ""
9289 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9290 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9291 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9292 "スト (ACL; access control lists) を使うことができる。"
9293
9294 #. type: Plain text
9295 #: build/C/man7/shm_overview.7:106
9296 msgid ""
9297 "Typically, processes must synchronize their access to a shared memory "
9298 "object, using, for example, POSIX semaphores."
9299 msgstr ""
9300 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9301 "使ってプロセス間で同期をとらなければならない。"
9302
9303 #. type: Plain text
9304 #: build/C/man7/shm_overview.7:114
9305 msgid ""
9306 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9307 "memory API.  POSIX shared memory provides a simpler, and better designed "
9308 "interface; on the other hand POSIX shared memory is somewhat less widely "
9309 "available (especially on older systems) than System V shared memory."
9310 msgstr ""
9311 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9312 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9313 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9314 "システムが少ない (特に、古いシステムでは少ない)。"
9315
9316 #. type: Plain text
9317 #: build/C/man7/shm_overview.7:127
9318 msgid ""
9319 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9320 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9321 "B<shm_unlink>(3), B<sem_overview>(7)"
9322 msgstr ""
9323 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9324 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9325 "B<shm_unlink>(3), B<sem_overview>(7)"
9326
9327 #. type: TH
9328 #: build/C/man2/shmctl.2:45
9329 #, no-wrap
9330 msgid "SHMCTL"
9331 msgstr "SHMCTL"
9332
9333 #. type: TH
9334 #: build/C/man2/shmctl.2:45
9335 #, no-wrap
9336 msgid "2014-02-07"
9337 msgstr "2014-02-07"
9338
9339 #. type: Plain text
9340 #: build/C/man2/shmctl.2:48
9341 msgid "shmctl - System V shared memory control"
9342 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9343
9344 #. type: Plain text
9345 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9346 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9347 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9348
9349 #. type: Plain text
9350 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9351 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9352 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9353
9354 #. type: Plain text
9355 #: build/C/man2/shmctl.2:55
9356 msgid ""
9357 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9358 msgstr ""
9359 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9360
9361 #. type: Plain text
9362 #: build/C/man2/shmctl.2:62
9363 msgid ""
9364 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9365 "\\ V shared memory segment whose identifier is given in I<shmid>."
9366 msgstr ""
9367 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリ・セグメントに対し"
9368 "て I<cmd> で指示した制御命令を実行する。"
9369
9370 #. type: Plain text
9371 #: build/C/man2/shmctl.2:67
9372 msgid ""
9373 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9374 "I<E<lt>sys/shm.hE<gt>> as follows:"
9375 msgstr ""
9376 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9377 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9378
9379 #. type: Plain text
9380 #: build/C/man2/shmctl.2:81
9381 #, no-wrap
9382 msgid ""
9383 "struct shmid_ds {\n"
9384 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9385 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9386 "    time_t          shm_atime;   /* Last attach time */\n"
9387 "    time_t          shm_dtime;   /* Last detach time */\n"
9388 "    time_t          shm_ctime;   /* Last change time */\n"
9389 "    pid_t           shm_cpid;    /* PID of creator */\n"
9390 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9391 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9392 "    ...\n"
9393 "};\n"
9394 msgstr ""
9395 "struct shmid_ds {\n"
9396 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9397 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9398 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9399 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9400 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9401 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9402 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9403 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9404 "    ...\n"
9405 "};\n"
9406
9407 #. type: Plain text
9408 #: build/C/man2/shmctl.2:89
9409 msgid ""
9410 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9411 "settable using B<IPC_SET>):"
9412 msgstr ""
9413 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9414 "B<IPC_SET> を使って設定可能である):"
9415
9416 #. type: Plain text
9417 #: build/C/man2/shmctl.2:102
9418 #, no-wrap
9419 msgid ""
9420 "struct ipc_perm {\n"
9421 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9422 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9423 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9424 "    uid_t          cuid;     /* Effective UID of creator */\n"
9425 "    gid_t          cgid;     /* Effective GID of creator */\n"
9426 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9427 "                                SHM_LOCKED flags */\n"
9428 "    unsigned short __seq;    /* Sequence number */\n"
9429 "};\n"
9430 msgstr ""
9431 "struct ipc_perm {\n"
9432 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9433 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9434 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9435 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9436 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9437 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9438 "                                SHM_LOCKED フラグ */\n"
9439 "    unsigned short __seq;    /* シーケンス番号 */\n"
9440 "};\n"
9441
9442 #. type: Plain text
9443 #: build/C/man2/shmctl.2:108
9444 msgid "Valid values for I<cmd> are:"
9445 msgstr "I<cmd> として有効な値は以下の通り:"
9446
9447 #. type: TP
9448 #: build/C/man2/shmctl.2:109
9449 #, no-wrap
9450 msgid "B<IPC_STAT>"
9451 msgstr "B<IPC_STAT>"
9452
9453 #. type: Plain text
9454 #: build/C/man2/shmctl.2:118
9455 msgid ""
9456 "Copy information from the kernel data structure associated with I<shmid> "
9457 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9458 "read permission on the shared memory segment."
9459 msgstr ""
9460 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9461 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9462 "読み込み許可を持たなければならない。"
9463
9464 #. type: TP
9465 #: build/C/man2/shmctl.2:118
9466 #, no-wrap
9467 msgid "B<IPC_SET>"
9468 msgstr "B<IPC_SET>"
9469
9470 #. type: Plain text
9471 #: build/C/man2/shmctl.2:136
9472 msgid ""
9473 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9474 "I<buf> to the kernel data structure associated with this shared memory "
9475 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9476 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9477 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9478 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9479 "memory segment, or the caller must be privileged."
9480 msgstr ""
9481 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9482 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9483 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9484 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9485 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9486 "と一致するか、呼び出し元が特権を持たなければならない。"
9487
9488 #. type: TP
9489 #: build/C/man2/shmctl.2:136
9490 #, no-wrap
9491 msgid "B<IPC_RMID>"
9492 msgstr "B<IPC_RMID>"
9493
9494 #. type: Plain text
9495 #: build/C/man2/shmctl.2:149
9496 msgid ""
9497 "Mark the segment to be destroyed.  The segment will only actually be "
9498 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9499 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9500 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9501 "is ignored."
9502 msgstr ""
9503 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9504 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9505 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9506 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9507
9508 #. type: Plain text
9509 #: build/C/man2/shmctl.2:157
9510 msgid ""
9511 "If a segment has been marked for destruction, then the (nonstandard)  "
9512 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9513 "structure retrieved by B<IPC_STAT> will be set."
9514 msgstr ""
9515 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9516 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9517 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9518
9519 #. type: Plain text
9520 #: build/C/man2/shmctl.2:160
9521 msgid ""
9522 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9523 "its pages that were faulted in will remain in memory or swap."
9524 msgstr ""
9525 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9526 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9527 "る。"
9528
9529 #. type: Plain text
9530 #: build/C/man2/shmctl.2:165
9531 msgid ""
9532 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9533 "B<proc>(5)."
9534 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9535
9536 #. type: TP
9537 #: build/C/man2/shmctl.2:165
9538 #, no-wrap
9539 msgid "B<IPC_INFO> (Linux-specific)"
9540 msgstr "B<IPC_INFO> (Linux 固有)"
9541
9542 #. type: Plain text
9543 #: build/C/man2/shmctl.2:178
9544 msgid ""
9545 "Return information about system-wide shared memory limits and parameters in "
9546 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9547 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9548 "B<_GNU_SOURCE> feature test macro is defined:"
9549 msgstr ""
9550 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9551 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9552 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9553 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9554
9555 #. type: Plain text
9556 #: build/C/man2/shmctl.2:192
9557 #, no-wrap
9558 msgid ""
9559 "struct shminfo {\n"
9560 "    unsigned long shmmax; /* Maximum segment size */\n"
9561 "    unsigned long shmmin; /* Minimum segment size;\n"
9562 "                             always 1 */\n"
9563 "    unsigned long shmmni; /* Maximum number of segments */\n"
9564 "    unsigned long shmseg; /* Maximum number of segments\n"
9565 "                             that a process can attach;\n"
9566 "                             unused within kernel */\n"
9567 "    unsigned long shmall; /* Maximum number of pages of\n"
9568 "                             shared memory, system-wide */\n"
9569 "};\n"
9570 msgstr ""
9571 "struct  shminfo {\n"
9572 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9573 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9574 "                             常に 1 */\n"
9575 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9576 "    unsigned long shmseg; /* プロセスが付加できる\n"
9577 "                             セグメントの最大数。\n"
9578 "                             カーネル内では未使用 */\n"
9579 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9580 "                             システム全体での値 */\n"
9581 "};\n"
9582
9583 #. type: Plain text
9584 #: build/C/man2/shmctl.2:205
9585 msgid ""
9586 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9587 "files of the same name; see B<proc>(5)  for details."
9588 msgstr ""
9589 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9590 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9591
9592 #. type: TP
9593 #: build/C/man2/shmctl.2:205
9594 #, no-wrap
9595 msgid "B<SHM_INFO> (Linux-specific)"
9596 msgstr "B<SHM_INFO> (Linux 固有)"
9597
9598 #. type: Plain text
9599 #: build/C/man2/shmctl.2:216
9600 msgid ""
9601 "Return a I<shm_info> structure whose fields contain information about system "
9602 "resources consumed by shared memory.  This structure is defined in "
9603 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9604 msgstr ""
9605 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9606 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9607 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9608
9609 #. type: Plain text
9610 #: build/C/man2/shmctl.2:233
9611 #, no-wrap
9612 msgid ""
9613 "struct shm_info {\n"
9614 "    int           used_ids; /* # of currently existing\n"
9615 "                               segments */\n"
9616 "    unsigned long shm_tot;  /* Total number of shared\n"
9617 "                               memory pages */\n"
9618 "    unsigned long shm_rss;  /* # of resident shared\n"
9619 "                               memory pages */\n"
9620 "    unsigned long shm_swp;  /* # of swapped shared\n"
9621 "                               memory pages */\n"
9622 "    unsigned long swap_attempts;\n"
9623 "                            /* Unused since Linux 2.4 */\n"
9624 "    unsigned long swap_successes;\n"
9625 "                            /* Unused since Linux 2.4 */\n"
9626 "};\n"
9627 msgstr ""
9628 "struct shm_info {\n"
9629 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9630 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9631 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9632 "                               いない) 共有メモリページ数 */\n"
9633 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9634 "                               ページ数 */\n"
9635 "    unsigned long swap_attempts;\n"
9636 "                            /* Linux 2.4 以降では未使用 */\n"
9637 "    unsigned long swap_successes;\n"
9638 "                            /* Linux 2.4 以降では未使用 */\n"
9639 "};\n"
9640
9641 #. type: TP
9642 #: build/C/man2/shmctl.2:235
9643 #, no-wrap
9644 msgid "B<SHM_STAT> (Linux-specific)"
9645 msgstr "B<SHM_STAT> (Linux 固有)"
9646
9647 #. type: Plain text
9648 #: build/C/man2/shmctl.2:246
9649 msgid ""
9650 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9651 "argument is not a segment identifier, but instead an index into the kernel's "
9652 "internal array that maintains information about all shared memory segments "
9653 "on the system."
9654 msgstr ""
9655 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9656 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9657 "管理するカーネルの内部配列へのインデックス である。"
9658
9659 #. type: Plain text
9660 #: build/C/man2/shmctl.2:249
9661 msgid ""
9662 "The caller can prevent or allow swapping of a shared memory segment with the "
9663 "following I<cmd> values:"
9664 msgstr ""
9665 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9666 "ワップされることを防止したり、許可したりできる:"
9667
9668 #. type: TP
9669 #: build/C/man2/shmctl.2:250
9670 #, no-wrap
9671 msgid "B<SHM_LOCK> (Linux-specific)"
9672 msgstr "B<SHM_LOCK> (Linux 固有)"
9673
9674 #. type: Plain text
9675 #: build/C/man2/shmctl.2:262
9676 msgid ""
9677 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9678 "pages that are required to be present after locking is enabled.  If a "
9679 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9680 "I<shm_perm.mode> field in the associated data structure retrieved by "
9681 "B<IPC_STAT> will be set."
9682 msgstr ""
9683 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9684 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9685 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9686 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9687 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9688
9689 #. type: TP
9690 #: build/C/man2/shmctl.2:262
9691 #, no-wrap
9692 msgid "B<SHM_UNLOCK> (Linux-specific)"
9693 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9694
9695 #. type: Plain text
9696 #: build/C/man2/shmctl.2:265
9697 msgid "Unlock the segment, allowing it to be swapped out."
9698 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9699
9700 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9701 #.  be applied to a segment, regardless of ownership of the segment.
9702 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9703 #.  in 2.6.10.  MTK, May 2005
9704 #. type: Plain text
9705 #: build/C/man2/shmctl.2:283
9706 msgid ""
9707 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9708 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9709 "these operations if its effective UID matches the owner or creator UID of "
9710 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9711 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9712 msgstr ""
9713 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9714 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9715 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9716 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9717 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9718 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9719
9720 #. type: Plain text
9721 #: build/C/man2/shmctl.2:301
9722 msgid ""
9723 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9724 "highest used entry in the kernel's internal array recording information "
9725 "about all shared memory segments.  (This information can be used with "
9726 "repeated B<SHM_STAT> operations to obtain information about all shared "
9727 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9728 "the identifier of the shared memory segment whose index was given in "
9729 "I<shmid>.  Other operations return 0 on success."
9730 msgstr ""
9731 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9732 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9733 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9734 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9735 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9736 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9737
9738 #. type: Plain text
9739 #: build/C/man2/shmctl.2:305
9740 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9741 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9742
9743 #. type: Plain text
9744 #: build/C/man2/shmctl.2:314
9745 msgid ""
9746 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9747 "read access for I<shmid>, and the calling process does not have the "
9748 "B<CAP_IPC_OWNER> capability."
9749 msgstr ""
9750 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9751 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9752 "ケーパビリティ (capability) を持っていない。"
9753
9754 #. type: Plain text
9755 #: build/C/man2/shmctl.2:325
9756 msgid ""
9757 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9758 "pointed to by I<buf> isn't accessible."
9759 msgstr ""
9760 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9761 "るアドレスにアクセスできない。"
9762
9763 #. type: TP
9764 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9765 #, no-wrap
9766 msgid "B<EIDRM>"
9767 msgstr "B<EIDRM>"
9768
9769 #. type: Plain text
9770 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9771 msgid "I<shmid> points to a removed identifier."
9772 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmctl.2:337
9776 msgid ""
9777 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9778 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9779 "to an array slot that is currently unused."
9780 msgstr ""
9781 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9782 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9783 "配列のスロットを参照していた。"
9784
9785 #. type: Plain text
9786 #: build/C/man2/shmctl.2:348
9787 msgid ""
9788 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9789 "be-locked segment would mean that the total bytes in locked shared memory "
9790 "segments would exceed the limit for the real user ID of the calling "
9791 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9792 "(see B<setrlimit>(2))."
9793 msgstr ""
9794 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9795 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9796 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9797 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9798
9799 #. type: Plain text
9800 #: build/C/man2/shmctl.2:353
9801 msgid ""
9802 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9803 "in the structure pointed to by I<buf>."
9804 msgstr ""
9805 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9806 "には大き過ぎる。"
9807
9808 #. type: Plain text
9809 #: build/C/man2/shmctl.2:365
9810 msgid ""
9811 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9812 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9813 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9814 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9815 msgstr ""
9816 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9817 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9818 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9819
9820 #. type: Plain text
9821 #: build/C/man2/shmctl.2:377
9822 msgid ""
9823 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9824 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9825 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9826 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9827 msgstr ""
9828 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9829 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9830 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9831 "が特権を持たない場合にも、このエラーが起こる。)"
9832
9833 #.  SVr4 documents an additional error condition EMFILE.
9834 #. type: Plain text
9835 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9836 #: build/C/man2/shmop.2:231
9837 msgid "SVr4, POSIX.1-2001."
9838 msgstr "SVr4, POSIX.1-2001."
9839
9840 #.  Like Linux, the FreeBSD man pages still document
9841 #.  the inclusion of these header files.
9842 #. type: Plain text
9843 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9844 msgid ""
9845 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9846 "required on Linux or by any version of POSIX.  However, some old "
9847 "implementations required the inclusion of these header files, and the SVID "
9848 "also documented their inclusion.  Applications intended to be portable to "
9849 "such old systems may need to include these header files."
9850 msgstr ""
9851 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9852 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9853 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9854 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9855 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9856 "れない。"
9857
9858 #. type: Plain text
9859 #: build/C/man2/shmctl.2:407
9860 msgid ""
9861 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9862 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9863 "future, these may modified or moved to a I</proc> filesystem interface."
9864 msgstr ""
9865 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9866 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9867 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9868 "い。"
9869
9870 #. type: Plain text
9871 #: build/C/man2/shmctl.2:415
9872 msgid ""
9873 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9874 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9875 "feature is not available on other UNIX implementations; portable "
9876 "applications should avoid relying on it."
9877 msgstr ""
9878 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9879 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9880 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9881 "プリケーションではこれに依存しないようにすべきである。"
9882
9883 #. type: Plain text
9884 #: build/C/man2/shmctl.2:428
9885 msgid ""
9886 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9887 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9888 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9889 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9890 msgstr ""
9891 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9892 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9893 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9894 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9895
9896 #. type: Plain text
9897 #: build/C/man2/shmctl.2:435
9898 msgid ""
9899 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9900 "B<svipc>(7)"
9901 msgstr ""
9902 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9903 "B<shm_overview>(7), B<svipc>(7)"
9904
9905 #. type: TH
9906 #: build/C/man2/shmget.2:38
9907 #, no-wrap
9908 msgid "SHMGET"
9909 msgstr "SHMGET"
9910
9911 #. type: TH
9912 #: build/C/man2/shmget.2:38
9913 #, no-wrap
9914 msgid "2014-10-02"
9915 msgstr "2014-10-02"
9916
9917 #. type: Plain text
9918 #: build/C/man2/shmget.2:41
9919 msgid "shmget - allocates a System V shared memory segment"
9920 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9921
9922 #. type: Plain text
9923 #: build/C/man2/shmget.2:48
9924 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9925 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9926
9927 #. type: Plain text
9928 #: build/C/man2/shmget.2:72
9929 msgid ""
9930 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
9931 "associated with the value of the argument I<key>.  A new shared memory "
9932 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9933 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9934 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9935 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9936 msgstr ""
9937 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリ・セグメントの識"
9938 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9939 "共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9940 "場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメ"
9941 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9942 "きさとなる。"
9943
9944 #. type: Plain text
9945 #: build/C/man2/shmget.2:91
9946 msgid ""
9947 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9948 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9949 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9950 "| O_EXCL> for B<open>(2).)"
9951 msgstr ""
9952 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9953 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9954 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9955 "O_EXCL> を指定した場合の動作と同じである)。"
9956
9957 #. type: Plain text
9958 #: build/C/man2/shmget.2:95
9959 msgid "The value I<shmflg> is composed of:"
9960 msgstr "I<shmflg> は以下の内容から構成される:"
9961
9962 #. type: TP
9963 #: build/C/man2/shmget.2:95
9964 #, no-wrap
9965 msgid "B<IPC_CREAT>"
9966 msgstr "B<IPC_CREAT>"
9967
9968 #. type: Plain text
9969 #: build/C/man2/shmget.2:102
9970 msgid ""
9971 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
9972 "the segment associated with I<key> and check to see if the user has "
9973 "permission to access the segment."
9974 msgstr ""
9975 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9976 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9977 "可があるかどうかをチェックする。"
9978
9979 #. type: TP
9980 #: build/C/man2/shmget.2:102
9981 #, no-wrap
9982 msgid "B<IPC_EXCL>"
9983 msgstr "B<IPC_EXCL>"
9984
9985 #. type: Plain text
9986 #: build/C/man2/shmget.2:108
9987 msgid ""
9988 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
9989 "segment.  If the segment already exists, the call fails."
9990 msgstr ""
9991 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
9992 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
9993
9994 #. type: TP
9995 #: build/C/man2/shmget.2:108
9996 #, no-wrap
9997 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9998 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9999
10000 #. type: Plain text
10001 #: build/C/man2/shmget.2:114
10002 msgid ""
10003 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10004 "I<Documentation/vm/hugetlbpage.txt> for further information."
10005 msgstr ""
10006 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10007 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10008
10009 #. type: TP
10010 #: build/C/man2/shmget.2:114
10011 #, no-wrap
10012 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10013 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10014
10015 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10016 #.  specified.
10017 #. type: Plain text
10018 #: build/C/man2/shmget.2:133
10019 msgid ""
10020 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
10021 "Do not reserve swap space for this segment.  When swap space is reserved, "
10022 "one has the guarantee that it is possible to modify the segment.  When swap "
10023 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10024 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
10025 "overcommit_memory> in B<proc>(5)."
10026 msgstr ""
10027 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10028 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10029 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10030 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
10031 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
10032 "ルに関する議論も参照のこと。"
10033
10034 #. type: Plain text
10035 #: build/C/man2/shmget.2:143
10036 msgid ""
10037 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10038 "specify the permissions granted to the owner, group, and others.  These bits "
10039 "have the same format, and the same meaning, as the I<mode> argument of "
10040 "B<open>(2).  Presently, execute permissions are not used by the system."
10041 msgstr ""
10042 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10043 "への許可を指定する。 これらのビットは B<open>(2)  の I<mode> 引き数と同じ形式"
10044 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10045
10046 #. type: Plain text
10047 #: build/C/man2/shmget.2:151
10048 msgid ""
10049 "When a new shared memory segment is created, its contents are initialized to "
10050 "zero values, and its associated data structure, I<shmid_ds> (see "
10051 "B<shmctl>(2)), is initialized as follows:"
10052 msgstr ""
10053 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
10054 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10055 "期化される。"
10056
10057 #. type: Plain text
10058 #: build/C/man2/shmget.2:156
10059 msgid ""
10060 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10061 "calling process."
10062 msgstr ""
10063 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10064 "ユーザーID を設定する。"
10065
10066 #. type: Plain text
10067 #: build/C/man2/shmget.2:161
10068 msgid ""
10069 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10070 "the calling process."
10071 msgstr ""
10072 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10073 "定する。"
10074
10075 #. type: Plain text
10076 #: build/C/man2/shmget.2:166
10077 msgid ""
10078 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10079 "significant 9 bit of I<shmflg>."
10080 msgstr ""
10081 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10082
10083 #. type: Plain text
10084 #: build/C/man2/shmget.2:170
10085 msgid "I<shm_segsz> is set to the value of I<size>."
10086 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10087
10088 #. type: Plain text
10089 #: build/C/man2/shmget.2:177
10090 msgid ""
10091 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10092 msgstr ""
10093 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10094
10095 #. type: Plain text
10096 #: build/C/man2/shmget.2:180
10097 msgid "I<shm_ctime> is set to the current time."
10098 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10099
10100 #. type: Plain text
10101 #: build/C/man2/shmget.2:183
10102 msgid ""
10103 "If the shared memory segment already exists, the permissions are verified, "
10104 "and a check is made to see if it is marked for destruction."
10105 msgstr ""
10106 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10107 "(destruction) マークがつけられていないかのチェックが行われる。"
10108
10109 #. type: Plain text
10110 #: build/C/man2/shmget.2:188
10111 msgid ""
10112 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10113 "returned, and I<errno> is set to indicate the error."
10114 msgstr "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
10115
10116 #. type: Plain text
10117 #: build/C/man2/shmget.2:192
10118 msgid "On failure, I<errno> is set to one of the following:"
10119 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10120
10121 #. type: Plain text
10122 #: build/C/man2/shmget.2:198
10123 msgid ""
10124 "The user does not have permission to access the shared memory segment, and "
10125 "does not have the B<CAP_IPC_OWNER> capability."
10126 msgstr ""
10127 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
10128 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10129
10130 #. type: Plain text
10131 #: build/C/man2/shmget.2:207
10132 msgid ""
10133 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10134 "memory segment already exists for I<key>."
10135 msgstr ""
10136 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10137 "有メモリセグメントはすでに存在する。"
10138
10139 #. type: Plain text
10140 #: build/C/man2/shmget.2:215
10141 msgid ""
10142 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10143 "greater than B<SHMMAX>."
10144 msgstr ""
10145 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10146 "B<SHMMAX> よりも大きかった。"
10147
10148 #. type: Plain text
10149 #: build/C/man2/shmget.2:221
10150 msgid ""
10151 "A segment for the given I<key> exists, but I<size> is greater than the size "
10152 "of that segment."
10153 msgstr ""
10154 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10155 "ントのサイズよりも大きかった。"
10156
10157 #. type: Plain text
10158 #: build/C/man2/shmget.2:230
10159 msgid ""
10160 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10161 msgstr ""
10162 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10163 "いなかった。"
10164
10165 #. type: Plain text
10166 #: build/C/man2/shmget.2:233
10167 msgid "No memory could be allocated for segment overhead."
10168 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
10169
10170 #. type: Plain text
10171 #: build/C/man2/shmget.2:241
10172 msgid ""
10173 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10174 "segment of the requested I<size> would cause the system to exceed the system-"
10175 "wide limit on shared memory (B<SHMALL>)."
10176 msgstr ""
10177 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
10178 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
10179 "限 (B<SHMALL>)  を超過した。"
10180
10181 #. type: Plain text
10182 #: build/C/man2/shmget.2:248
10183 msgid ""
10184 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10185 "(did not have the B<CAP_IPC_LOCK> capability)."
10186 msgstr ""
10187 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10188 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10189
10190 #. type: Plain text
10191 #: build/C/man2/shmget.2:256
10192 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10193 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10194
10195 #. type: Plain text
10196 #: build/C/man2/shmget.2:280
10197 msgid ""
10198 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10199 "value is used for I<key>, the system call ignores all but the least "
10200 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10201 msgstr ""
10202 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10203 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10204 "視し、 新しい共有メモリ・セグメントを作成する。"
10205
10206 #. type: SS
10207 #: build/C/man2/shmget.2:280
10208 #, no-wrap
10209 msgid "Shared memory limits"
10210 msgstr ""
10211
10212 #. type: Plain text
10213 #: build/C/man2/shmget.2:284
10214 msgid ""
10215 "The following limits on shared memory segment resources affect the "
10216 "B<shmget>()  call:"
10217 msgstr ""
10218 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
10219 "る:"
10220
10221 #. type: TP
10222 #: build/C/man2/shmget.2:284
10223 #, no-wrap
10224 msgid "B<SHMALL>"
10225 msgstr "B<SHMALL>"
10226
10227 #. type: Plain text
10228 #: build/C/man2/shmget.2:287
10229 msgid "System-wide limit on the number of pages of shared memory."
10230 msgstr "共有メモリのページ数のシステム全体での上限値。"
10231
10232 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10233 #. type: Plain text
10234 #: build/C/man2/shmget.2:293
10235 msgid ""
10236 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10237 "shmall>.  Since Linux 3.16, the default value for this limit is:"
10238 msgstr ""
10239 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10240 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10241 "る。"
10242
10243 #. type: Plain text
10244 #: build/C/man2/shmget.2:295 build/C/man2/shmget.2:330
10245 #, no-wrap
10246 msgid "    ULONG_MAX - 2^24\n"
10247 msgstr "    ULONG_MAX - 2^24\n"
10248
10249 #. type: Plain text
10250 #: build/C/man2/shmget.2:306
10251 msgid ""
10252 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10253 "systems)  is to impose no limitation on allocations.  This value, rather "
10254 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10255 "historical applications simply raised the existing limit without first "
10256 "checking its current value.  Such applications would cause the value to "
10257 "overflow if the limit was set at B<ULONG_MAX>."
10258 msgstr ""
10259
10260 #. type: Plain text
10261 #: build/C/man2/shmget.2:309
10262 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10263 msgstr ""
10264
10265 #. type: Plain text
10266 #: build/C/man2/shmget.2:311
10267 #, no-wrap
10268 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10269 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10270
10271 #. type: Plain text
10272 #: build/C/man2/shmget.2:319
10273 msgid ""
10274 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10275 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10276 "GB as the limit on the total memory used by all shared memory segments."
10277 msgstr ""
10278
10279 #. type: TP
10280 #: build/C/man2/shmget.2:319
10281 #, no-wrap
10282 msgid "B<SHMMAX>"
10283 msgstr "B<SHMMAX>"
10284
10285 #. type: Plain text
10286 #: build/C/man2/shmget.2:322
10287 msgid "Maximum size in bytes for a shared memory segment."
10288 msgstr "1 つの共有メモリセグメントの最大サイズ (バイト数)。"
10289
10290 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10291 #. type: Plain text
10292 #: build/C/man2/shmget.2:328
10293 msgid ""
10294 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10295 "shmmax>.  Since Linux 3.16, the default value for this limit is:"
10296 msgstr ""
10297 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10298 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10299 "る。"
10300
10301 #. type: Plain text
10302 #: build/C/man2/shmget.2:339
10303 msgid ""
10304 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10305 "systems)  is to impose no limitation on allocations.  See the description of "
10306 "B<SHMALL> for a discussion of why this default value (rather than "
10307 "B<ULONG_MAX>)  is used."
10308 msgstr ""
10309
10310 #. type: Plain text
10311 #: build/C/man2/shmget.2:342
10312 msgid ""
10313 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10314 "0x2000000 (32MB)."
10315 msgstr ""
10316 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10317 "(32MB) であった。"
10318
10319 #. type: Plain text
10320 #: build/C/man2/shmget.2:348
10321 msgid ""
10322 "Because it is not possible to map just part of a shared memory segment, the "
10323 "amount of virtual memory places another limit on the maximum size of a "
10324 "usable segment: for example, on i386 the largest segments that can be mapped "
10325 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10326 msgstr ""
10327
10328 #. type: TP
10329 #: build/C/man2/shmget.2:348
10330 #, no-wrap
10331 msgid "B<SHMMIN>"
10332 msgstr "B<SHMMIN>"
10333
10334 #. type: Plain text
10335 #: build/C/man2/shmget.2:354
10336 msgid ""
10337 "Minimum size in bytes for a shared memory segment: implementation dependent "
10338 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10339 msgstr ""
10340 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10341 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10342
10343 #. type: TP
10344 #: build/C/man2/shmget.2:354
10345 #, no-wrap
10346 msgid "B<SHMMNI>"
10347 msgstr "B<SHMMNI>"
10348
10349 #. type: Plain text
10350 #: build/C/man2/shmget.2:359
10351 msgid ""
10352 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10353 "the default value for this limit was 128; since Linux 2.4, the default value "
10354 "is 4096."
10355 msgstr ""
10356 "システム全体の共有メモリ・セグメント数の上限値。 この上限値のデフォルトは、 "
10357 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10358
10359 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10360 #.  that we could create one more segment than SHMMNI -- MTK
10361 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10362 #. type: Plain text
10363 #: build/C/man2/shmget.2:365
10364 msgid ""
10365 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10366 msgstr ""
10367 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10368 "たりできる。"
10369
10370 #. type: Plain text
10371 #: build/C/man2/shmget.2:369
10372 msgid ""
10373 "The implementation has no specific limits for the per-process maximum number "
10374 "of shared memory segments (B<SHMSEG>)."
10375 msgstr ""
10376 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10377 "上の制限はない。"
10378
10379 #. type: Plain text
10380 #: build/C/man2/shmget.2:375
10381 msgid ""
10382 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10383 "shared memory segment scheduled for deletion."
10384 msgstr ""
10385 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10386 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10387
10388 #. type: Plain text
10389 #: build/C/man2/shmget.2:381
10390 msgid ""
10391 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10392 "more clearly show its function."
10393 msgstr ""
10394 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10395 "より明確にその機能を表しているだろう。"
10396
10397 #. type: Plain text
10398 #: build/C/man2/shmget.2:389
10399 msgid ""
10400 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10401 "B<shm_overview>(7), B<svipc>(7)"
10402 msgstr ""
10403 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10404 "B<shm_overview>(7), B<svipc>(7)"
10405
10406 #. type: TH
10407 #: build/C/man2/shmop.2:41
10408 #, no-wrap
10409 msgid "SHMOP"
10410 msgstr "SHMOP"
10411
10412 #. type: Plain text
10413 #: build/C/man2/shmop.2:44
10414 msgid "shmat, shmdt - System V shared memory operations"
10415 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10416
10417 #. type: Plain text
10418 #: build/C/man2/shmop.2:48
10419 #, no-wrap
10420 msgid ""
10421 "B<#include E<lt>sys/types.hE<gt>>\n"
10422 "B<#include E<lt>sys/shm.hE<gt>>\n"
10423 msgstr ""
10424 "B<#include E<lt>sys/types.hE<gt>>\n"
10425 "B<#include E<lt>sys/shm.hE<gt>>\n"
10426
10427 #. type: Plain text
10428 #: build/C/man2/shmop.2:50
10429 #, no-wrap
10430 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10431 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10432
10433 #. type: Plain text
10434 #: build/C/man2/shmop.2:52
10435 #, no-wrap
10436 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10437 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10438
10439 #. type: SS
10440 #: build/C/man2/shmop.2:54
10441 #, no-wrap
10442 msgid "shmat()"
10443 msgstr ""
10444
10445 #. type: Plain text
10446 #: build/C/man2/shmop.2:62
10447 msgid ""
10448 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10449 "I<shmid> to the address space of the calling process.  The attaching address "
10450 "is specified by I<shmaddr> with one of the following criteria:"
10451 msgstr ""
10452 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリ・セグメント "
10453 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10454 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10455
10456 #. type: Plain text
10457 #: build/C/man2/shmop.2:68
10458 msgid ""
10459 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10460 "which to attach the segment."
10461 msgstr ""
10462 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10463 "されていない) アドレスを選択する。"
10464
10465 #. type: Plain text
10466 #: build/C/man2/shmop.2:80
10467 msgid ""
10468 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10469 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10470 "multiple of B<SHMLBA>."
10471 msgstr ""
10472 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10473 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10474 "スへ付加する。"
10475
10476 #. type: Plain text
10477 #: build/C/man2/shmop.2:84
10478 msgid ""
10479 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10480 "occurs."
10481 msgstr ""
10482 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10483 "要がある。"
10484
10485 #. type: Plain text
10486 #: build/C/man2/shmop.2:90
10487 msgid ""
10488 "In addition to B<SHM_RND>, the following flags may be specified in the "
10489 "I<shmflg> bit-mask argument:"
10490 msgstr ""
10491
10492 #. type: TP
10493 #: build/C/man2/shmop.2:90
10494 #, no-wrap
10495 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10496 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10497
10498 #. type: Plain text
10499 #: build/C/man2/shmop.2:94
10500 msgid ""
10501 "Allow the contents of the segment to be executed.  The caller must have "
10502 "execute permission on the segment."
10503 msgstr ""
10504
10505 #. type: TP
10506 #: build/C/man2/shmop.2:94
10507 #, no-wrap
10508 msgid "B<SHM_RDONLY>"
10509 msgstr "B<SHM_RDONLY>"
10510
10511 #. type: Plain text
10512 #: build/C/man2/shmop.2:102
10513 msgid ""
10514 "Attach the segment for read-only access.  The process must have read "
10515 "permission for the segment.  If this flag is not specified, the segment is "
10516 "attached for read and write access, and the process must have read and write "
10517 "permission for the segment.  There is no notion of a write-only shared "
10518 "memory segment."
10519 msgstr ""
10520 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10521 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10522 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10523 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリ・セ"
10524 "グメントという概念は存在しない。"
10525
10526 #. type: TP
10527 #: build/C/man2/shmop.2:102
10528 #, no-wrap
10529 msgid "B<SHM_REMAP> (Linux-specific)"
10530 msgstr "B<SHM_REMAP> (Linux 固有)"
10531
10532 #. type: Plain text
10533 #: build/C/man2/shmop.2:115
10534 msgid ""
10535 "This flag specifies that the mapping of the segment should replace any "
10536 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10537 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10538 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10539 "must not be NULL."
10540 msgstr ""
10541 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10542 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10543 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10544 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10545
10546 #. type: Plain text
10547 #: build/C/man2/shmop.2:122
10548 msgid ""
10549 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10550 "The segment will automatically be detached at process exit.  The same "
10551 "segment may be attached as a read and as a read-write one, and more than "
10552 "once, in the process's address space."
10553 msgstr ""
10554 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10555 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10556 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10557 "複数回付加することもできる。"
10558
10559 #. type: Plain text
10560 #: build/C/man2/shmop.2:130
10561 msgid ""
10562 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10563 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10564 "follows:"
10565 msgstr ""
10566 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10567 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10568
10569 #. type: Plain text
10570 #: build/C/man2/shmop.2:133
10571 msgid "I<shm_atime> is set to the current time."
10572 msgstr "I<shm_atime> には現在の時刻を設定する。"
10573
10574 #. type: Plain text
10575 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10576 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10577 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10578
10579 #. type: Plain text
10580 #: build/C/man2/shmop.2:140
10581 msgid "I<shm_nattch> is incremented by one."
10582 msgstr "I<shm_nattch> を 1 増加させる。"
10583
10584 #. type: SS
10585 #: build/C/man2/shmop.2:140
10586 #, no-wrap
10587 msgid "shmdt()"
10588 msgstr ""
10589
10590 #. type: Plain text
10591 #: build/C/man2/shmop.2:151
10592 msgid ""
10593 "B<shmdt>()  detaches the shared memory segment located at the address "
10594 "specified by I<shmaddr> from the address space of the calling process.  The "
10595 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10596 "the value returned by the attaching B<shmat>()  call."
10597 msgstr ""
10598 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10599 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10600 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10601 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10602 "ない。"
10603
10604 #. type: Plain text
10605 #: build/C/man2/shmop.2:157
10606 msgid ""
10607 "On a successful B<shmdt>()  call, the system updates the members of the "
10608 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10609 msgstr ""
10610 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10611 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10612
10613 #. type: Plain text
10614 #: build/C/man2/shmop.2:160
10615 msgid "I<shm_dtime> is set to the current time."
10616 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10617
10618 #. type: Plain text
10619 #: build/C/man2/shmop.2:168
10620 msgid ""
10621 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10622 "marked for deletion, the segment is deleted."
10623 msgstr ""
10624 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10625 "セグメントは削除される。"
10626
10627 #. type: Plain text
10628 #: build/C/man2/shmop.2:176
10629 msgid ""
10630 "On success, B<shmat>()  returns the address of the attached shared memory "
10631 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10632 "indicate the cause of the error."
10633 msgstr ""
10634 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10635 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10636 "値を設定する。"
10637
10638 #. type: Plain text
10639 #: build/C/man2/shmop.2:182
10640 msgid ""
10641 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10642 "set to indicate the cause of the error."
10643 msgstr ""
10644 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10645 "ラーの原因を示す値を設定する。"
10646
10647 #. type: Plain text
10648 #: build/C/man2/shmop.2:188
10649 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10650 msgstr ""
10651 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10652
10653 #. type: Plain text
10654 #: build/C/man2/shmop.2:194
10655 msgid ""
10656 "The calling process does not have the required permissions for the requested "
10657 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10658 msgstr ""
10659 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10660 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10661
10662 #. type: Plain text
10663 #: build/C/man2/shmop.2:211
10664 msgid ""
10665 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10666 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10667 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10668 msgstr ""
10669 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10670 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10671 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10672 "れているが、 I<shmaddr> が NULL であった。"
10673
10674 #. type: Plain text
10675 #: build/C/man2/shmop.2:214
10676 msgid "Could not allocate memory for the descriptor or for the page tables."
10677 msgstr ""
10678 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10679 "とができない。"
10680
10681 #. type: Plain text
10682 #: build/C/man2/shmop.2:220
10683 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10684 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10685
10686 #.  The following since 2.6.17-rc1:
10687 #. type: Plain text
10688 #: build/C/man2/shmop.2:228
10689 msgid ""
10690 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10691 "not aligned on a page boundary."
10692 msgstr ""
10693 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10694 "I<shmaddr> がページ境界に合っていない。"
10695
10696 #. type: Plain text
10697 #: build/C/man2/shmop.2:243
10698 msgid ""
10699 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10700 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10701 "B<shmat>()  from I<char\\ *> into I<void\\ *>."
10702 msgstr ""
10703 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10704 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10705 "\\ *> に変更された。"
10706
10707 #. type: Plain text
10708 #: build/C/man2/shmop.2:248
10709 msgid ""
10710 "After a B<fork>(2), the child inherits the attached shared memory segments."
10711 msgstr ""
10712 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10713
10714 #. type: Plain text
10715 #: build/C/man2/shmop.2:252
10716 msgid ""
10717 "After an B<execve>(2), all attached shared memory segments are detached from "
10718 "the process."
10719 msgstr ""
10720 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10721 "される。"
10722
10723 #. type: Plain text
10724 #: build/C/man2/shmop.2:256
10725 msgid ""
10726 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10727 "process."
10728 msgstr ""
10729 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10730 "離される。"
10731
10732 #. type: Plain text
10733 #: build/C/man2/shmop.2:268
10734 msgid ""
10735 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10736 "way of attaching a shared memory segment.  Be aware that the shared memory "
10737 "segment attached in this way may be attached at different addresses in "
10738 "different processes.  Therefore, any pointers maintained within the shared "
10739 "memory must be made relative (typically to the starting address of the "
10740 "segment), rather than absolute."
10741 msgstr ""
10742 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10743 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10744 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10745 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10746 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10747 "る。"
10748
10749 #. type: Plain text
10750 #: build/C/man2/shmop.2:273
10751 msgid ""
10752 "On Linux, it is possible to attach a shared memory segment even if it is "
10753 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10754 "behavior and many other implementations do not support it."
10755 msgstr ""
10756 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10757 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10758 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10759
10760 #. type: Plain text
10761 #: build/C/man2/shmop.2:276
10762 msgid "The following system parameter affects B<shmat>():"
10763 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10764
10765 #. type: TP
10766 #: build/C/man2/shmop.2:276
10767 #, no-wrap
10768 msgid "B<SHMLBA>"
10769 msgstr "B<SHMLBA>"
10770
10771 #. type: Plain text
10772 #: build/C/man2/shmop.2:289
10773 msgid ""
10774 "Segment low boundary address multiple.  When explicitly specifying an attach "
10775 "address in a call to B<shmat>(), the caller should ensure that the address "
10776 "is a multiple of this value.  This is necessary on some architectures, in "
10777 "order either to ensure good CPU cache performance or to ensure that "
10778 "different attaches of the same segment have consistent views within the CPU "
10779 "cache.  B<SHMLBA> is normally some multiple of the system page size (on many "
10780 "Linux architectures, it is the same as the system page size)."
10781 msgstr ""
10782
10783 #. type: Plain text
10784 #: build/C/man2/shmop.2:293
10785 msgid ""
10786 "The implementation places no intrinsic per-process limit on the number of "
10787 "shared memory segments (B<SHMSEG>)."
10788 msgstr ""
10789 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10790 "関する実装依存の制限はない。"
10791
10792 #. type: Plain text
10793 #: build/C/man2/shmop.2:301
10794 msgid ""
10795 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10796 "B<shm_overview>(7), B<svipc>(7)"
10797 msgstr ""
10798 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10799 "B<shm_overview>(7), B<svipc>(7)"
10800
10801 #. type: TH
10802 #: build/C/man2/subpage_prot.2:30
10803 #, no-wrap
10804 msgid "SUBPAGE_PROT"
10805 msgstr "SUBPAGE_PROT"
10806
10807 #. type: TH
10808 #: build/C/man2/subpage_prot.2:30
10809 #, no-wrap
10810 msgid "2012-07-13"
10811 msgstr "2012-07-13"
10812
10813 #. type: Plain text
10814 #: build/C/man2/subpage_prot.2:33
10815 msgid "subpage_prot - define a subpage protection for an address range"
10816 msgstr ""
10817
10818 #. type: Plain text
10819 #: build/C/man2/subpage_prot.2:37
10820 #, no-wrap
10821 msgid ""
10822 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10823 "B<                  uint32_t *>I<map>B<);>\n"
10824 msgstr ""
10825 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10826 "B<                  uint32_t *>I<map>B<);>\n"
10827
10828 #. type: Plain text
10829 #: build/C/man2/subpage_prot.2:41
10830 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10831 msgstr ""
10832 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10833 "を参照。"
10834
10835 #. type: Plain text
10836 #: build/C/man2/subpage_prot.2:47
10837 msgid ""
10838 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10839 "control the access permissions on individual 4kB subpages on systems "
10840 "configured with a page size of 64kB."
10841 msgstr ""
10842
10843 #. type: Plain text
10844 #: build/C/man2/subpage_prot.2:54
10845 msgid ""
10846 "The protection map is applied to the memory pages in the region starting at "
10847 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10848 "aligned to a 64-kB boundary."
10849 msgstr ""
10850
10851 #. type: Plain text
10852 #: build/C/man2/subpage_prot.2:66
10853 msgid ""
10854 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10855 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10856 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10857 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10858 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10859 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10860 msgstr ""
10861
10862 #. type: Plain text
10863 #: build/C/man2/subpage_prot.2:71
10864 msgid ""
10865 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10866 "specified below is returned."
10867 msgstr ""
10868
10869 #. type: Plain text
10870 #: build/C/man2/subpage_prot.2:77
10871 msgid "The buffer referred to by I<map> is not accessible."
10872 msgstr ""
10873
10874 #. type: Plain text
10875 #: build/C/man2/subpage_prot.2:87
10876 msgid ""
10877 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10878 "be aligned to a multiple of the system page size, and they must not refer to "
10879 "a region outside of the address space of the process or to a region that "
10880 "consists of huge pages."
10881 msgstr ""
10882
10883 #. type: Plain text
10884 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10885 msgid "Out of memory."
10886 msgstr "メモリ不足である。"
10887
10888 #. type: Plain text
10889 #: build/C/man2/subpage_prot.2:96
10890 msgid ""
10891 "This system call is provided on the PowerPC architecture since Linux "
10892 "2.6.25.  The system call is provided only if the kernel is configured with "
10893 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10894 msgstr ""
10895
10896 #. type: Plain text
10897 #: build/C/man2/subpage_prot.2:101
10898 msgid ""
10899 "Glibc does not provide a wrapper for this system call; call it using "
10900 "B<syscall>(2)."
10901 msgstr ""
10902
10903 #. type: Plain text
10904 #: build/C/man2/subpage_prot.2:106
10905 msgid ""
10906 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10907 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10908 "field won't allow writes to a page that is otherwise write-protected."
10909 msgstr ""
10910
10911 #. type: SS
10912 #: build/C/man2/subpage_prot.2:106
10913 #, no-wrap
10914 msgid "Rationale"
10915 msgstr ""
10916
10917 #.  In the initial implementation, it was the case that:
10918 #.      In fact the whole process is switched to use 4k hardware pages when the
10919 #.      subpage_prot system call is used, but this could be improved in future
10920 #.      to switch only the affected segments.
10921 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10922 #.  the affected segment, not the whole process.
10923 #. type: Plain text
10924 #: build/C/man2/subpage_prot.2:128
10925 msgid ""
10926 "This system call is provided to assist writing emulators that operate using "
10927 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10928 "uses a smaller page size, the emulator can no longer use the memory-"
10929 "management unit (MMU)  and normal system calls for controlling page "
10930 "protections.  (The emulator could emulate the MMU by checking and possibly "
10931 "remapping the address for each memory access in software, but that is "
10932 "slow.)  The idea is that the emulator supplies an array of protection masks "
10933 "to apply to a specified range of virtual addresses.  These masks are applied "
10934 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10935 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10936 "affected.  Implicit in this is that the regions of the address space that "
10937 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10938 "hardware pages (on machines with hardware 64-kB page support)."
10939 msgstr ""
10940
10941 #. type: Plain text
10942 #: build/C/man2/subpage_prot.2:131
10943 msgid "B<mprotect>(2), B<syscall>(2)"
10944 msgstr "B<mprotect>(2), B<syscall>(2)"
10945
10946 #. type: Plain text
10947 #: build/C/man2/subpage_prot.2:134
10948 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10949 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10950
10951 #. type: TH
10952 #: build/C/man2/sync_file_range.2:30
10953 #, no-wrap
10954 msgid "SYNC_FILE_RANGE"
10955 msgstr "SYNC_FILE_RANGE"
10956
10957 #. type: Plain text
10958 #: build/C/man2/sync_file_range.2:33
10959 msgid "sync_file_range - sync a file segment with disk"
10960 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10961
10962 #. type: Plain text
10963 #: build/C/man2/sync_file_range.2:37
10964 #, no-wrap
10965 msgid ""
10966 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10967 "B<#include E<lt>fcntl.hE<gt>>\n"
10968 msgstr ""
10969 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10970 "B<#include E<lt>fcntl.hE<gt>>\n"
10971
10972 #. type: Plain text
10973 #: build/C/man2/sync_file_range.2:40
10974 #, no-wrap
10975 msgid ""
10976 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10977 "B<                    unsigned int >I<flags>B<);>\n"
10978 msgstr ""
10979 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10980 "B<                    unsigned int >I<flags>B<);>\n"
10981
10982 #. type: Plain text
10983 #: build/C/man2/sync_file_range.2:47
10984 msgid ""
10985 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10986 "referred to by the file descriptor I<fd> with disk."
10987 msgstr ""
10988 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10989 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10990
10991 #. type: Plain text
10992 #: build/C/man2/sync_file_range.2:61
10993 msgid ""
10994 "I<offset> is the starting byte of the file range to be synchronized.  "
10995 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10996 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10997 "are synchronized.  Synchronization is in units of the system page size: "
10998 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10999 "rounded up to a page boundary."
11000 msgstr ""
11001 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11002 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11003 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11004 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11005 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11006
11007 #. type: Plain text
11008 #: build/C/man2/sync_file_range.2:65
11009 msgid "The I<flags> bit-mask argument can include any of the following values:"
11010 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11011
11012 #. type: TP
11013 #: build/C/man2/sync_file_range.2:65
11014 #, no-wrap
11015 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11016 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11017
11018 #. type: Plain text
11019 #: build/C/man2/sync_file_range.2:70
11020 msgid ""
11021 "Wait upon write-out of all pages in the specified range that have already "
11022 "been submitted to the device driver for write-out before performing any "
11023 "write."
11024 msgstr ""
11025 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11026 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11027 "つ。"
11028
11029 #. type: TP
11030 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11031 #, no-wrap
11032 msgid "B<SYNC_FILE_RANGE_WRITE>"
11033 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11034
11035 #. type: Plain text
11036 #: build/C/man2/sync_file_range.2:76
11037 msgid ""
11038 "Initiate write-out of all dirty pages in the specified range which are not "
11039 "presently submitted write-out.  Note that even this may block if you attempt "
11040 "to write more than request queue size."
11041 msgstr ""
11042 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11043 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11044 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11045 "る点に注意すること。"
11046
11047 #. type: TP
11048 #: build/C/man2/sync_file_range.2:76
11049 #, no-wrap
11050 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11051 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11052
11053 #. type: Plain text
11054 #: build/C/man2/sync_file_range.2:80
11055 msgid ""
11056 "Wait upon write-out of all pages in the range after performing any write."
11057 msgstr ""
11058 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11059 "つ。"
11060
11061 #. type: Plain text
11062 #: build/C/man2/sync_file_range.2:84
11063 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11064 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11065
11066 #. type: SS
11067 #: build/C/man2/sync_file_range.2:84
11068 #, no-wrap
11069 msgid "Warning"
11070 msgstr "警告"
11071
11072 #. type: Plain text
11073 #: build/C/man2/sync_file_range.2:100
11074 msgid ""
11075 "This system call is extremely dangerous and should not be used in portable "
11076 "programs.  None of these operations writes out the file's metadata.  "
11077 "Therefore, unless the application is strictly performing overwrites of "
11078 "already-instantiated disk blocks, there are no guarantees that the data will "
11079 "be available after a crash.  There is no user interface to know if a write "
11080 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11081 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11082 "writing into preallocated space, many filesystems also require calls into "
11083 "the block allocator, which this system call does not sync out to disk.  This "
11084 "system call does not flush disk write caches and thus does not provide any "
11085 "data integrity on systems with volatile disk write caches."
11086 msgstr ""
11087 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11088 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11089 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11090 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11091 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
11092 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11093 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11094 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11095 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11096 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11097 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11098 "コールではデータの一貫性を確保できないことになる。"
11099
11100 #. type: SS
11101 #: build/C/man2/sync_file_range.2:100
11102 #, no-wrap
11103 msgid "Some details"
11104 msgstr "詳細"
11105
11106 #. type: Plain text
11107 #: build/C/man2/sync_file_range.2:108
11108 msgid ""
11109 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11110 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11111 msgstr ""
11112 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11113 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11114
11115 #. type: Plain text
11116 #: build/C/man2/sync_file_range.2:112
11117 msgid "Useful combinations of the I<flags> bits are:"
11118 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11119
11120 #. type: TP
11121 #: build/C/man2/sync_file_range.2:112
11122 #, no-wrap
11123 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11124 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11125
11126 #. type: Plain text
11127 #: build/C/man2/sync_file_range.2:120
11128 msgid ""
11129 "Ensures that all pages in the specified range which were dirty when "
11130 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11131 "start-write-for-data-integrity operation."
11132 msgstr ""
11133 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11134 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11135 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11136 "ある。"
11137
11138 #. type: Plain text
11139 #: build/C/man2/sync_file_range.2:127
11140 msgid ""
11141 "Start write-out of all dirty pages in the specified range which are not "
11142 "presently under write-out.  This is an asynchronous flush-to-disk "
11143 "operation.  This is not suitable for data integrity operations."
11144 msgstr ""
11145 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11146 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11147 "る。データ完全性確保が必要な操作としては適切ではない。"
11148
11149 #. type: TP
11150 #: build/C/man2/sync_file_range.2:127
11151 #, no-wrap
11152 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11153 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11154
11155 #. type: Plain text
11156 #: build/C/man2/sync_file_range.2:134
11157 msgid ""
11158 "Wait for completion of write-out of all pages in the specified range.  This "
11159 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11160 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11161 "and obtain its result."
11162 msgstr ""
11163 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11164 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11165 "き、この操作の完了を待ち、結果を取得することができる。"
11166
11167 #. type: TP
11168 #: build/C/man2/sync_file_range.2:134
11169 #, no-wrap
11170 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11171 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11172
11173 #. type: Plain text
11174 #: build/C/man2/sync_file_range.2:141
11175 msgid ""
11176 "This is a write-for-data-integrity operation that will ensure that all pages "
11177 "in the specified range which were dirty when B<sync_file_range>()  was "
11178 "called are committed to disk."
11179 msgstr ""
11180 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11181 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11182 "のページが ディスクに格納されることが保証される。"
11183
11184 #. type: Plain text
11185 #: build/C/man2/sync_file_range.2:147
11186 msgid ""
11187 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11188 "I<errno> is set to indicate the error."
11189 msgstr "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11190
11191 #. type: Plain text
11192 #: build/C/man2/sync_file_range.2:152
11193 msgid "I<fd> is not a valid file descriptor."
11194 msgstr "I<fd> が有効なファイルディスクリプタではない。"
11195
11196 #. type: Plain text
11197 #: build/C/man2/sync_file_range.2:160
11198 msgid ""
11199 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11200 msgstr ""
11201 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11202 "である。"
11203
11204 #. type: Plain text
11205 #: build/C/man2/sync_file_range.2:163
11206 msgid "I/O error."
11207 msgstr "I/O エラー。"
11208
11209 #. type: Plain text
11210 #: build/C/man2/sync_file_range.2:169
11211 msgid "Out of disk space."
11212 msgstr "ディスク領域不足である。"
11213
11214 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11215 #.  (In user space at least) it isn't possible to obtain a file descriptor
11216 #.  for a symbolic link.
11217 #. type: Plain text
11218 #: build/C/man2/sync_file_range.2:177
11219 msgid ""
11220 "I<fd> refers to something other than a regular file, a block device, a "
11221 "directory, or a symbolic link."
11222 msgstr ""
11223 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11224 "以外のものを指している。"
11225
11226 #. type: Plain text
11227 #: build/C/man2/sync_file_range.2:180
11228 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11229 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11230
11231 #. type: Plain text
11232 #: build/C/man2/sync_file_range.2:183
11233 msgid ""
11234 "This system call is Linux-specific, and should be avoided in portable "
11235 "programs."
11236 msgstr ""
11237 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11238 "けるべきである。"
11239
11240 #. type: SS
11241 #: build/C/man2/sync_file_range.2:184
11242 #, no-wrap
11243 msgid "sync_file_range2()"
11244 msgstr ""
11245
11246 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11247 #. type: Plain text
11248 #: build/C/man2/sync_file_range.2:201
11249 msgid ""
11250 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11251 "in a suitable pair of registers.  On such architectures, the call signature "
11252 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11253 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11254 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11255 "different system call that orders the arguments suitably:"
11256 msgstr ""
11257 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
11258 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
11259 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
11260 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
11261 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
11262 "き数が適切な順序になった別のシステムコールが定義されている。"
11263
11264 #. type: Plain text
11265 #: build/C/man2/sync_file_range.2:206
11266 #, no-wrap
11267 msgid ""
11268 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11269 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11270 msgstr ""
11271 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11272 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11273
11274 #. type: Plain text
11275 #: build/C/man2/sync_file_range.2:211
11276 msgid ""
11277 "The behavior of this system call is otherwise exactly the same as "
11278 "B<sync_file_range>()."
11279 msgstr ""
11280 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11281 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11282 "glibc では提供されていない。"
11283
11284 #. type: Plain text
11285 #: build/C/man2/sync_file_range.2:222
11286 msgid ""
11287 "A system call with this signature first appeared on the ARM architecture in "
11288 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11289 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11290 "architectures where glibc support is provided, glibc transparently wraps "
11291 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11292 msgstr ""
11293 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
11294 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11295 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11296 "システムコールの名前が変更された。\n"
11297 "glibc によるサポートが提供されているアーキテクチャでは、\n"
11298 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11299 "B<sync_file_range2>() を適切に使用するようになっている。"
11300
11301 #. type: Plain text
11302 #: build/C/man2/sync_file_range.2:227
11303 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11304 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11305
11306 #~ msgid "2014-05-03"
11307 #~ msgstr "2014-05-03"
11308
11309 #~ msgid "2012-05-04"
11310 #~ msgstr "2012-05-04"
11311
11312 #~ msgid "2012-03-29"
11313 #~ msgstr "2012-03-29"
11314
11315 #~ msgid "2012-04-30"
11316 #~ msgstr "2012-04-30"
11317
11318 #~ msgid "2014-04-06"
11319 #~ msgstr "2014-04-06"
11320
11321 #~ msgid "2013-02-12"
11322 #~ msgstr "2013-02-12"
11323
11324 #~ msgid "2014-05-21"
11325 #~ msgstr "2014-05-21"
11326
11327 #~ msgid ""
11328 #~ "System-wide limit on the number of shared memory pages.  Since Linux 2.4, "
11329 #~ "the default value for this limit is"
11330 #~ msgstr ""
11331 #~ "システム全体の共有メモリ・ページ数の上限値。 Linux 2.2 以降では、この上限"
11332 #~ "値のデフォルトは以下である。"
11333
11334 #~ msgid "2014-04-28"
11335 #~ msgstr "2014-04-28"
11336
11337 #~ msgid ""
11338 #~ "Segment low boundary address multiple.  Must be page aligned.  For the "
11339 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
11340 #~ msgstr ""
11341 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
11342 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
11343
11344 #~ msgid "2013-04-01"
11345 #~ msgstr "2013-04-01"
11346
11347 #~ msgid "2014-05-10"
11348 #~ msgstr "2014-05-10"
11349
11350 #~ msgid "2008-04-22"
11351 #~ msgstr "2008-04-22"
11352
11353 #~ msgid "I<mode_flags>"
11354 #~ msgstr "I<mode_flags>"
11355
11356 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
11357 #~ msgstr ""
11358 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
11359
11360 #~ msgid ""
11361 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
11362 #~ "2^20 (2,097,152)."
11363 #~ msgstr ""
11364 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
11365 #~ "(2,097,152) になる。"
11366
11367 #~ msgid ""
11368 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
11369 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
11370 #~ "shmmax>)."
11371 #~ msgstr ""
11372 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
11373 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
11374 #~ "る)。"
11375
11376 #~ msgid ""
11377 #~ "System wide maximum number of shared memory segments: implementation "
11378 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
11379 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
11380 #~ msgstr ""
11381 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
11382 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
11383 #~ "で参照したり、変更したりできる)。"
11384
11385 #~ msgid ""
11386 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
11387 #~ msgstr ""
11388 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
11389 #~ "-1 が返される。"
11390
11391 #~ msgid ""
11392 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
11393 #~ "pair of registers.  On this architecture, the call signature of "
11394 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
11395 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
11396 #~ "2.6.14, ARM defines a different system call that orders the arguments "
11397 #~ "suitably:"
11398 #~ msgstr ""
11399 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
11400 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
11401 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
11402 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
11403 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
11404 #~ "システムコールが定義されている。"
11405
11406 #~ msgid ""
11407 #~ "The behavior of this system call is otherwise exactly the same as "
11408 #~ "B<posix_fadvise>().  No library support is provided for this system call "
11409 #~ "in glibc."
11410 #~ msgstr ""
11411 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
11412 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
11413 #~ "では提供されていない。"
11414
11415 #~ msgid ""
11416 #~ "The I<mode> is not supported by the file system containing the file "
11417 #~ "referred to by I<fd>."
11418 #~ msgstr ""
11419 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
11420 #~ "ない。"
11421
11422 #~ msgid ""
11423 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
11424 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
11425 #~ "these handlers."
11426 #~ msgstr ""
11427 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
11428 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
11429
11430 #~ msgid ""
11431 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
11432 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
11433 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
11434 #~ "truncated."
11435 #~ msgstr ""
11436 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
11437 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
11438 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
11439 #~ "イルの元の内容を上書きする。"
11440
11441 #~ msgid ""
11442 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
11443 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
11444 #~ msgstr ""
11445 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
11446 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
11447 #~ "リプトが付属している。"
11448
11449 #~ msgid ""
11450 #~ "This flag allocates and initializes to zero the disk space within the "
11451 #~ "range specified by I<offset> and I<len>.  After a successful call, "
11452 #~ "subsequent writes into this range are guaranteed not to fail because of "
11453 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
11454 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
11455 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
11456 #~ "less than I<offset>+I<len>."
11457 #~ msgstr ""
11458 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
11459 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
11460 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
11461 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
11462 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
11463 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
11464 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
11465 #~ "は変更されることはない。"