OSDN Git Service

Translation snapshot for LDP v3.76
[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 03:46+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 ""
1205 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1206 "にエラーを示す値を設定する。"
1207
1208 #. type: TP
1209 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1210 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1211 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1212 #: build/C/man2/sync_file_range.2:148
1213 #, no-wrap
1214 msgid "B<EBADF>"
1215 msgstr "B<EBADF>"
1216
1217 #. type: Plain text
1218 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1219 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1220 msgstr ""
1221 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1222 "いない。"
1223
1224 #. type: TP
1225 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1226 #, no-wrap
1227 msgid "B<EFBIG>"
1228 msgstr "B<EFBIG>"
1229
1230 #. type: Plain text
1231 #: build/C/man2/fallocate.2:244
1232 msgid "I<offset>+I<len> exceeds the maximum file size."
1233 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1234
1235 #. type: TP
1236 #: build/C/man2/fallocate.2:244
1237 #, no-wrap
1238 msgid "B<EINTR>"
1239 msgstr "B<EINTR>"
1240
1241 #. type: Plain text
1242 #: build/C/man2/fallocate.2:247
1243 msgid "A signal was caught during execution."
1244 msgstr "実行中にシグナルが捕捉された。"
1245
1246 #. type: Plain text
1247 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1248 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1249 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1250
1251 #. type: Plain text
1252 #: build/C/man2/fallocate.2:269
1253 msgid ""
1254 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1255 "plus I<len> reaches or passes the end of the file."
1256 msgstr ""
1257 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1258 "範囲がファイルの末尾かそれより先まで達している。"
1259
1260 #. type: Plain text
1261 #: build/C/man2/fallocate.2:279
1262 msgid ""
1263 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1264 "not a multiple of the filesystem block size."
1265 msgstr ""
1266 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1267 "がファイルシステムのブロックサイズの倍数ではない。"
1268
1269 #. type: Plain text
1270 #: build/C/man2/fallocate.2:287
1271 msgid ""
1272 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1273 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1274 msgstr ""
1275 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1276 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1277
1278 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1279 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1280 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1281 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1282 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1283 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1284 #.  Date: 2014-04-17 13:40:05 GMT
1285 #. type: Plain text
1286 #: build/C/man2/fallocate.2:304
1287 msgid ""
1288 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1289 "file referred to by I<fd> is not a regular file."
1290 msgstr ""
1291 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1292 "I<fd> が参照しているファイルが通常のファイルではない。"
1293
1294 #. type: TP
1295 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1296 #: build/C/man2/sync_file_range.2:160
1297 #, no-wrap
1298 msgid "B<EIO>"
1299 msgstr "B<EIO>"
1300
1301 #. type: Plain text
1302 #: build/C/man2/fallocate.2:307
1303 msgid "An I/O error occurred while reading from or writing to a filesystem."
1304 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1305
1306 #. type: TP
1307 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1308 #: build/C/man3/posix_fallocate.3:87
1309 #, no-wrap
1310 msgid "B<ENODEV>"
1311 msgstr "B<ENODEV>"
1312
1313 #. type: Plain text
1314 #: build/C/man2/fallocate.2:314
1315 msgid ""
1316 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1317 "or FIFO, a different error results.)"
1318 msgstr ""
1319 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1320 "を参照している場合、別のエラーが発生する)。"
1321
1322 #. type: TP
1323 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1324 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1325 #, no-wrap
1326 msgid "B<ENOSPC>"
1327 msgstr "B<ENOSPC>"
1328
1329 #. type: Plain text
1330 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1331 msgid ""
1332 "There is not enough space left on the device containing the file referred to "
1333 "by I<fd>."
1334 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1335
1336 #. type: Plain text
1337 #: build/C/man2/fallocate.2:323
1338 msgid "This kernel does not implement B<fallocate>()."
1339 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1340
1341 #. type: TP
1342 #: build/C/man2/fallocate.2:323
1343 #, no-wrap
1344 msgid "B<EOPNOTSUPP>"
1345 msgstr "B<EOPNOTSUPP>"
1346
1347 #. type: Plain text
1348 #: build/C/man2/fallocate.2:332
1349 msgid ""
1350 "The filesystem containing the file referred to by I<fd> does not support "
1351 "this operation; or the I<mode> is not supported by the filesystem containing "
1352 "the file referred to by I<fd>."
1353 msgstr ""
1354 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1355 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1356 "I<mode> をサポートしていない。"
1357
1358 #. type: TP
1359 #: build/C/man2/fallocate.2:332 build/C/man2/mlock.2:143
1360 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1361 #: build/C/man2/shmget.2:241
1362 #, no-wrap
1363 msgid "B<EPERM>"
1364 msgstr "B<EPERM>"
1365
1366 #. type: Plain text
1367 #: build/C/man2/fallocate.2:350
1368 msgid ""
1369 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1370 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1371 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1372 msgstr ""
1373 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1374 "(B<chattr>(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> か "
1375 "B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルに追加の"
1376 "み (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1377
1378 #. type: TP
1379 #: build/C/man2/fallocate.2:350 build/C/man2/posix_fadvise.2:97
1380 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1381 #, no-wrap
1382 msgid "B<ESPIPE>"
1383 msgstr "B<ESPIPE>"
1384
1385 #. type: Plain text
1386 #: build/C/man2/fallocate.2:354
1387 msgid "I<fd> refers to a pipe or FIFO."
1388 msgstr "I<fd> がパイプか FIFO を参照している。"
1389
1390 #. type: TP
1391 #: build/C/man2/fallocate.2:354 build/C/man2/mmap.2:467
1392 #, no-wrap
1393 msgid "B<ETXTBSY>"
1394 msgstr "B<ETXTBSY>"
1395
1396 #. type: Plain text
1397 #: build/C/man2/fallocate.2:362
1398 msgid ""
1399 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1400 "I<fd> is currently being executed."
1401 msgstr ""
1402 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1403 "イルは現在実行中である。"
1404
1405 #. type: SH
1406 #: build/C/man2/fallocate.2:362 build/C/man2/madvise.2:325
1407 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1408 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1409 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1410 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1411 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1412 #: build/C/man2/sync_file_range.2:177
1413 #, no-wrap
1414 msgid "VERSIONS"
1415 msgstr "バージョン"
1416
1417 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1418 #. type: Plain text
1419 #: build/C/man2/fallocate.2:370
1420 msgid ""
1421 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1422 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1423 "in glibc headers only since version 2.18."
1424 msgstr ""
1425 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1426 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1427 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1428
1429 #. type: Plain text
1430 #: build/C/man2/fallocate.2:373
1431 msgid "B<fallocate>()  is Linux-specific."
1432 msgstr "B<fallocate>()  は Linux 固有である。"
1433
1434 #. type: Plain text
1435 #: build/C/man2/fallocate.2:378
1436 msgid ""
1437 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1438 msgstr ""
1439 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1440
1441 #. type: TH
1442 #: build/C/man2/madvise.2:35
1443 #, no-wrap
1444 msgid "MADVISE"
1445 msgstr "MADVISE"
1446
1447 #. type: TH
1448 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1449 #, no-wrap
1450 msgid "2014-12-31"
1451 msgstr "2014-12-31"
1452
1453 #. type: Plain text
1454 #: build/C/man2/madvise.2:38
1455 msgid "madvise - give advice about use of memory"
1456 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1457
1458 #. type: Plain text
1459 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1460 #: build/C/man3/shm_open.3:31
1461 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1462 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1463
1464 #. type: Plain text
1465 #: build/C/man2/madvise.2:42
1466 msgid ""
1467 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1468 msgstr ""
1469 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1470
1471 #. type: Plain text
1472 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1473 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1474 msgid ""
1475 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1476 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1477
1478 #. type: Plain text
1479 #: build/C/man2/madvise.2:50
1480 msgid "B<madvise>(): _BSD_SOURCE"
1481 msgstr "B<madvise>(): _BSD_SOURCE"
1482
1483 #. type: Plain text
1484 #: build/C/man2/madvise.2:68
1485 msgid ""
1486 "The B<madvise>()  system call advises the kernel about how to handle paging "
1487 "input/output in the address range beginning at address I<addr> and with size "
1488 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1489 "to use some mapped or shared memory areas, so that the kernel can choose "
1490 "appropriate read-ahead and caching techniques.  This call does not influence "
1491 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1492 "but may influence its performance.  The kernel is free to ignore the advice."
1493 msgstr ""
1494 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1495 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1496 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1497 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1498 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1499 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1500 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1501
1502 #. type: Plain text
1503 #: build/C/man2/madvise.2:72
1504 msgid "The advice is indicated in the I<advice> argument which can be"
1505 msgstr ""
1506 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1507
1508 #. type: TP
1509 #: build/C/man2/madvise.2:72
1510 #, no-wrap
1511 msgid "B<MADV_NORMAL>"
1512 msgstr "B<MADV_NORMAL>"
1513
1514 #. type: Plain text
1515 #: build/C/man2/madvise.2:76
1516 msgid "No special treatment.  This is the default."
1517 msgstr "特別な扱いは行わない。これがデフォルトである。"
1518
1519 #. type: TP
1520 #: build/C/man2/madvise.2:76
1521 #, no-wrap
1522 msgid "B<MADV_RANDOM>"
1523 msgstr "B<MADV_RANDOM>"
1524
1525 #. type: Plain text
1526 #: build/C/man2/madvise.2:80
1527 msgid ""
1528 "Expect page references in random order.  (Hence, read ahead may be less "
1529 "useful than normally.)"
1530 msgstr ""
1531 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1532 "なさそうだ。)"
1533
1534 #. type: TP
1535 #: build/C/man2/madvise.2:80
1536 #, no-wrap
1537 msgid "B<MADV_SEQUENTIAL>"
1538 msgstr "B<MADV_SEQUENTIAL>"
1539
1540 #. type: Plain text
1541 #: build/C/man2/madvise.2:85
1542 msgid ""
1543 "Expect page references in sequential order.  (Hence, pages in the given "
1544 "range can be aggressively read ahead, and may be freed soon after they are "
1545 "accessed.)"
1546 msgstr ""
1547 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1548 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1549 "して良い。)"
1550
1551 #. type: TP
1552 #: build/C/man2/madvise.2:85
1553 #, no-wrap
1554 msgid "B<MADV_WILLNEED>"
1555 msgstr "B<MADV_WILLNEED>"
1556
1557 #. type: Plain text
1558 #: build/C/man2/madvise.2:89
1559 msgid ""
1560 "Expect access in the near future.  (Hence, it might be a good idea to read "
1561 "some pages ahead.)"
1562 msgstr ""
1563 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1564 "ておくといいだろう。)"
1565
1566 #. type: TP
1567 #: build/C/man2/madvise.2:89
1568 #, no-wrap
1569 msgid "B<MADV_DONTNEED>"
1570 msgstr "B<MADV_DONTNEED>"
1571
1572 #. type: Plain text
1573 #: build/C/man2/madvise.2:100
1574 msgid ""
1575 "Do not expect access in the near future.  (For the time being, the "
1576 "application is finished with the given range, so the kernel can free "
1577 "resources associated with it.)  Subsequent accesses of pages in this range "
1578 "will succeed, but will result either in reloading of the memory contents "
1579 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1580 "pages for mappings without an underlying file."
1581 msgstr ""
1582 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1583 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1584 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1585 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1586 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1587 "なる。"
1588
1589 #. type: TP
1590 #: build/C/man2/madvise.2:100
1591 #, no-wrap
1592 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1593 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1594
1595 #.  2.6.18-rc5
1596 #.  Databases want to use this feature to drop a section of their
1597 #.  bufferpool (shared memory segments) - without writing back to
1598 #.  disk/swap space.  This feature is also useful for supporting
1599 #.  hot-plug memory on UML.
1600 #. type: Plain text
1601 #: build/C/man2/madvise.2:113
1602 msgid ""
1603 "Free up a given range of pages and its associated backing store.  Currently, "
1604 "only shmfs/tmpfs supports this; other filesystems return with the error "
1605 "B<ENOSYS>."
1606 msgstr ""
1607 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1608 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1609 "返される。"
1610
1611 #. type: TP
1612 #: build/C/man2/madvise.2:113
1613 #, no-wrap
1614 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1615 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1616
1617 #.  See http://lwn.net/Articles/171941/
1618 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1619 #.  Currently, copy-on-write may change the physical address of
1620 #.  a page even if the user requested that the page is pinned in
1621 #.  memory (either by mlock or by get_user_pages).  This happens
1622 #.  if the process forks meanwhile, and the parent writes to that
1623 #.  page.  As a result, the page is orphaned: in case of
1624 #.  get_user_pages, the application will never see any data hardware
1625 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1626 #.  the parent is not getting the realtime/security benefits of mlock.
1627 #.  In particular, this affects the Infiniband modules which do DMA from
1628 #.  and into user pages all the time.
1629 #.  This patch adds madvise options to control whether memory range is
1630 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1631 #.  from/into these pages.  Could also be useful to an application
1632 #.  wanting to speed up its forks by cutting large areas out of
1633 #.  consideration.
1634 #.  SEE ALSO: http://lwn.net/Articles/171941/
1635 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1636 #. type: Plain text
1637 #: build/C/man2/madvise.2:144
1638 msgid ""
1639 "Do not make the pages in this range available to the child after a "
1640 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1641 "the physical location of a page(s) if the parent writes to it after a "
1642 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1643 "into the page(s).)"
1644 msgstr ""
1645 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1646 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1647 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1648 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1649 "を行うような場合に 問題を起こすことがある)。"
1650
1651 #. type: TP
1652 #: build/C/man2/madvise.2:144
1653 #, no-wrap
1654 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1655 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1656
1657 #. type: Plain text
1658 #: build/C/man2/madvise.2:150
1659 msgid ""
1660 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1661 "a mapping is inherited across B<fork>(2)."
1662 msgstr ""
1663 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1664 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1665
1666 #. type: TP
1667 #: build/C/man2/madvise.2:150
1668 #, no-wrap
1669 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1670 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1671
1672 #. type: Plain text
1673 #: build/C/man2/madvise.2:162
1674 msgid ""
1675 "Poison a page and handle it like a hardware memory corruption.  This "
1676 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1677 "This operation may result in the calling process receiving a B<SIGBUS> and "
1678 "the page being unmapped.  This feature is intended for testing of memory "
1679 "error-handling code; it is available only if the kernel was configured with "
1680 "B<CONFIG_MEMORY_FAILURE>."
1681 msgstr ""
1682 "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 "
1683 "この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操"
1684 "作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップさ"
1685 "れる。 この機能はメモリのエラー処理コードをテストするためのものである。 カー"
1686 "ネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1687
1688 #. type: TP
1689 #: build/C/man2/madvise.2:162
1690 #, no-wrap
1691 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1692 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1693
1694 #. type: Plain text
1695 #: build/C/man2/madvise.2:180
1696 msgid ""
1697 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1698 "memory of each page in the specified range is preserved (i.e., when next "
1699 "accessed, the same content will be visible, but in a new physical page "
1700 "frame), and the original page is offlined (i.e., no longer used, and taken "
1701 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1702 "operation is invisible to (i.e., does not change the semantics of)  the "
1703 "calling process.  This feature is intended for testing of memory error-"
1704 "handling code; it is available only if the kernel was configured with "
1705 "B<CONFIG_MEMORY_FAILURE>."
1706 msgstr ""
1707 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1708 "された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際"
1709 "に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフ"
1710 "ラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り"
1711 "除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない "
1712 "(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理"
1713 "コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> "
1714 "が有効になっている場合にのみ利用可能である。"
1715
1716 #. type: TP
1717 #: build/C/man2/madvise.2:180
1718 #, no-wrap
1719 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1720 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1721
1722 #. type: Plain text
1723 #: build/C/man2/madvise.2:205
1724 msgid ""
1725 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1726 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1727 "memory that have been marked as mergeable, looking for pages with identical "
1728 "content.  These are replaced by a single write-protected page (which is "
1729 "automatically copied if a process later wants to update the content of the "
1730 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1731 "feature is intended for applications that generate many instances of the "
1732 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1733 "of processing power; use with care.  See the Linux kernel source file "
1734 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1735 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1736 "configured with B<CONFIG_KSM>."
1737 msgstr ""
1738 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1739 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1740 "いたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内"
1741 "容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) が"
1742 "かかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよう"
1743 "とした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ペー"
1744 "ジ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデー"
1745 "タのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) "
1746 "での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があ"
1747 "り、注意して使用すること。 詳細は Linux カーネルソースファイル "
1748 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1749 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1750 "る場合にのみ利用できる。"
1751
1752 #. type: TP
1753 #: build/C/man2/madvise.2:205
1754 #, no-wrap
1755 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1756 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1757
1758 #. type: Plain text
1759 #: build/C/man2/madvise.2:214
1760 msgid ""
1761 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1762 "address range; KSM unmerges whatever pages it had merged in the address "
1763 "range specified by I<addr> and I<length>."
1764 msgstr ""
1765 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1766 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1767 "済みのすべてのページの統合解除を行う。"
1768
1769 #. type: TP
1770 #: build/C/man2/madvise.2:214
1771 #, no-wrap
1772 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1773 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1774
1775 #.  http://lwn.net/Articles/358904/
1776 #.  https://lwn.net/Articles/423584/
1777 #. type: Plain text
1778 #: build/C/man2/madvise.2:243
1779 msgid ""
1780 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1781 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1782 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1783 "the areas marked as huge page candidates to replace them with huge pages.  "
1784 "The kernel will also allocate huge pages directly when the region is "
1785 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1786 "feature is primarily aimed at applications that use large mappings of data "
1787 "and access large regions of that memory at a time (e.g., virtualization "
1788 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1789 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1790 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1791 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1792 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1793 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1794 msgstr ""
1795 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1796 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1797 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1798 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1799 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1800 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1801 "マッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリ"
1802 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1803 "る。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセ"
1804 "スしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってし"
1805 "まう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1806 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1807 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1808 "る。"
1809
1810 #. type: TP
1811 #: build/C/man2/madvise.2:243
1812 #, no-wrap
1813 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1814 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1815
1816 #. type: Plain text
1817 #: build/C/man2/madvise.2:250
1818 msgid ""
1819 "Ensures that memory in the address range specified by I<addr> and I<length> "
1820 "will not be collapsed into huge pages."
1821 msgstr ""
1822 "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込"
1823 "まれないようにする。"
1824
1825 #. type: TP
1826 #: build/C/man2/madvise.2:250
1827 #, no-wrap
1828 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1829 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1830
1831 #. type: Plain text
1832 #: build/C/man2/madvise.2:264
1833 msgid ""
1834 "Exclude from a core dump those pages in the range specified by I<addr> and "
1835 "I<length>.  This is useful in applications that have large areas of memory "
1836 "that are known not to be useful in a core dump.  The effect of "
1837 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1838 "proc/PID/coredump_filter> file (see B<core>(5))."
1839 msgstr ""
1840 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1841 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域がある"
1842 "アプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1843 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1844 "(B<core>(5) 参照)。"
1845
1846 #. type: TP
1847 #: build/C/man2/madvise.2:264
1848 #, no-wrap
1849 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1850 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1851
1852 #. type: Plain text
1853 #: build/C/man2/madvise.2:268
1854 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1855 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1856
1857 #. type: Plain text
1858 #: build/C/man2/madvise.2:275
1859 msgid ""
1860 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1861 "is set appropriately."
1862 msgstr ""
1863 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1864 "を適切な値に設定する。"
1865
1866 #. type: TP
1867 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1868 #: build/C/man2/mremap.2:136
1869 #, no-wrap
1870 msgid "B<EAGAIN>"
1871 msgstr "B<EAGAIN>"
1872
1873 #. type: Plain text
1874 #: build/C/man2/madvise.2:279
1875 msgid "A kernel resource was temporarily unavailable."
1876 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1877
1878 #. type: Plain text
1879 #: build/C/man2/madvise.2:282
1880 msgid "The map exists, but the area maps something that isn't a file."
1881 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1882
1883 #. type: Plain text
1884 #: build/C/man2/madvise.2:285
1885 msgid "This error can occur for the following reasons:"
1886 msgstr "このエラーは以下の理由で発生する。"
1887
1888 #.  .I len
1889 #.  is zero,
1890 #. type: Plain text
1891 #: build/C/man2/madvise.2:292
1892 msgid "The value I<len> is negative."
1893 msgstr "I<len> が負の値である。"
1894
1895 #. type: Plain text
1896 #: build/C/man2/madvise.2:295
1897 msgid "I<addr> is not page-aligned."
1898 msgstr "I<addr> がページ境界ではない。"
1899
1900 #. type: Plain text
1901 #: build/C/man2/madvise.2:298
1902 msgid "I<advice> is not a valid value"
1903 msgstr "I<advice> が有効な値でない。"
1904
1905 #. type: Plain text
1906 #: build/C/man2/madvise.2:301
1907 msgid ""
1908 "The application is attempting to release locked or shared pages (with "
1909 "B<MADV_DONTNEED>)."
1910 msgstr ""
1911 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1912 "放\n"
1913 "しようとしている。"
1914
1915 #. type: Plain text
1916 #: build/C/man2/madvise.2:309
1917 msgid ""
1918 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1919 "kernel was not configured with B<CONFIG_KSM>."
1920 msgstr ""
1921 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1922 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1923
1924 #. type: Plain text
1925 #: build/C/man2/madvise.2:316
1926 msgid ""
1927 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1928 "maximum resident set size."
1929 msgstr ""
1930 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1931 "(resident set size) の最大値を越えてしまう。"
1932
1933 #. type: TP
1934 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1935 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1936 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1937 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1938 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1939 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1940 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1941 #: build/C/man2/sync_file_range.2:163
1942 #, no-wrap
1943 msgid "B<ENOMEM>"
1944 msgstr "B<ENOMEM>"
1945
1946 #. type: Plain text
1947 #: build/C/man2/madvise.2:321
1948 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1949 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1950
1951 #. type: Plain text
1952 #: build/C/man2/madvise.2:325
1953 msgid ""
1954 "Addresses in the specified range are not currently mapped, or are outside "
1955 "the address space of the process."
1956 msgstr ""
1957 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1958 "空間の内部にない。"
1959
1960 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1961 #. type: Plain text
1962 #: build/C/man2/madvise.2:332
1963 msgid ""
1964 "Since Linux 3.18, support for this system call is optional, depending on the "
1965 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1966 msgstr ""
1967
1968 #.  FIXME . Write a posix_madvise(3) page.
1969 #. type: Plain text
1970 #: build/C/man2/madvise.2:345
1971 msgid ""
1972 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1973 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1974 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1975 "access."
1976 msgstr ""
1977 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1978 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1979 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1980 "類似の関数が存在する。"
1981
1982 #. type: Plain text
1983 #: build/C/man2/madvise.2:354
1984 msgid ""
1985 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1986 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1987 msgstr ""
1988 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1989 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1990
1991 #. type: SS
1992 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
1993 #: build/C/man2/shmget.2:369
1994 #, no-wrap
1995 msgid "Linux notes"
1996 msgstr "Linux での注意"
1997
1998 #. type: Plain text
1999 #: build/C/man2/madvise.2:363
2000 msgid ""
2001 "The current Linux implementation (2.4.0) views this system call more as a "
2002 "command than as advice and hence may return an error when it cannot do what "
2003 "it usually would do in response to this advice.  (See the ERRORS description "
2004 "above.)  This is nonstandard behavior."
2005 msgstr ""
2006 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2007 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2008 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2009 "とは異なる。"
2010
2011 #.  .SH HISTORY
2012 #.  The
2013 #.  .BR madvise ()
2014 #.  function first appeared in 4.4BSD.
2015 #. type: Plain text
2016 #: build/C/man2/madvise.2:379
2017 msgid ""
2018 "The Linux implementation requires that the address I<addr> be page-aligned, "
2019 "and allows I<length> to be zero.  If there are some parts of the specified "
2020 "address range that are not mapped, the Linux version of B<madvise>()  "
2021 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2022 "the system call, as it should)."
2023 msgstr ""
2024 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2025 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2026 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2027 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2028 "返す)。"
2029
2030 #. type: Plain text
2031 #: build/C/man2/madvise.2:388
2032 msgid ""
2033 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2034 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2035 msgstr ""
2036 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2037 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2038
2039 #. type: TH
2040 #: build/C/man3/mallinfo.3:26
2041 #, no-wrap
2042 msgid "MALLINFO"
2043 msgstr "MALLINFO"
2044
2045 #. type: TH
2046 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2047 #, no-wrap
2048 msgid "2012-05-06"
2049 msgstr "2012-05-06"
2050
2051 #. type: Plain text
2052 #: build/C/man3/mallinfo.3:29
2053 msgid "mallinfo - obtain memory allocation information"
2054 msgstr "mallinfo - メモリ割り当て情報を取得する"
2055
2056 #. type: Plain text
2057 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2058 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2059 #: build/C/man3/mallopt.3:31
2060 msgid "B<#include E<lt>malloc.hE<gt>>"
2061 msgstr "B<#include E<lt>malloc.hE<gt>>"
2062
2063 #. type: Plain text
2064 #: build/C/man3/mallinfo.3:33
2065 msgid "B<struct mallinfo mallinfo(void);>"
2066 msgstr "B<struct mallinfo mallinfo(void);>"
2067
2068 #. type: Plain text
2069 #: build/C/man3/mallinfo.3:41
2070 msgid ""
2071 "The B<mallinfo>()  function returns a copy of a structure containing "
2072 "information about memory allocations performed by B<malloc>(3)  and related "
2073 "functions.  This structure is defined as follows:"
2074 msgstr ""
2075 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
2076 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2077 "この構造体は以下のように定義されている。"
2078
2079 #. type: Plain text
2080 #: build/C/man3/mallinfo.3:56
2081 #, no-wrap
2082 msgid ""
2083 "struct mallinfo {\n"
2084 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2085 "    int ordblks;   /* Number of free chunks */\n"
2086 "    int smblks;    /* Number of free fastbin blocks */\n"
2087 "    int hblks;     /* Number of mmapped regions */\n"
2088 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2089 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2090 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2091 "    int uordblks;  /* Total allocated space (bytes) */\n"
2092 "    int fordblks;  /* Total free space (bytes) */\n"
2093 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2094 "};\n"
2095 msgstr ""
2096 "struct mallinfo {\n"
2097 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2098 "    int ordblks;   /* Number of free chunks */\n"
2099 "    int smblks;    /* Number of free fastbin blocks */\n"
2100 "    int hblks;     /* Number of mmapped regions */\n"
2101 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2102 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2103 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2104 "    int uordblks;  /* Total allocated space (bytes) */\n"
2105 "    int fordblks;  /* Total free space (bytes) */\n"
2106 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2107 "};\n"
2108
2109 #. type: Plain text
2110 #: build/C/man3/mallinfo.3:62
2111 msgid ""
2112 "The fields of the I<mallinfo> structure contain the following information:"
2113 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2114
2115 #. type: TP
2116 #: build/C/man3/mallinfo.3:62
2117 #, no-wrap
2118 msgid "I<arena>"
2119 msgstr "I<arena>"
2120
2121 #. type: Plain text
2122 #: build/C/man3/mallinfo.3:68
2123 msgid ""
2124 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2125 "memory allocated on the heap).  This figure includes both in-use blocks and "
2126 "blocks on the free list."
2127 msgstr ""
2128
2129 #. type: TP
2130 #: build/C/man3/mallinfo.3:68
2131 #, no-wrap
2132 msgid "I<ordblks>"
2133 msgstr "I<ordblks>"
2134
2135 #. type: Plain text
2136 #: build/C/man3/mallinfo.3:71
2137 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2138 msgstr ""
2139
2140 #. type: TP
2141 #: build/C/man3/mallinfo.3:71
2142 #, no-wrap
2143 msgid "I<smblks>"
2144 msgstr "I<smblks>"
2145
2146 #. type: Plain text
2147 #: build/C/man3/mallinfo.3:75
2148 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2149 msgstr ""
2150
2151 #. type: TP
2152 #: build/C/man3/mallinfo.3:75
2153 #, no-wrap
2154 msgid "I<hblks>"
2155 msgstr "I<hblks>"
2156
2157 #. type: Plain text
2158 #: build/C/man3/mallinfo.3:83
2159 msgid ""
2160 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2161 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2162 msgstr ""
2163
2164 #. type: TP
2165 #: build/C/man3/mallinfo.3:83
2166 #, no-wrap
2167 msgid "I<hblkhd>"
2168 msgstr "I<hblkhd>"
2169
2170 #. type: Plain text
2171 #: build/C/man3/mallinfo.3:87
2172 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2173 msgstr ""
2174
2175 #. type: TP
2176 #: build/C/man3/mallinfo.3:87
2177 #, no-wrap
2178 msgid "I<usmblks>"
2179 msgstr "I<usmblks>"
2180
2181 #. type: Plain text
2182 #: build/C/man3/mallinfo.3:92
2183 msgid ""
2184 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2185 "of space that was ever allocated.  This field is maintained only in "
2186 "nonthreading environments."
2187 msgstr ""
2188
2189 #. type: TP
2190 #: build/C/man3/mallinfo.3:92
2191 #, no-wrap
2192 msgid "I<fsmblks>"
2193 msgstr "I<fsmblks>"
2194
2195 #. type: Plain text
2196 #: build/C/man3/mallinfo.3:95
2197 msgid "The total number of bytes in fastbin free blocks."
2198 msgstr ""
2199
2200 #. type: TP
2201 #: build/C/man3/mallinfo.3:95
2202 #, no-wrap
2203 msgid "I<uordblks>"
2204 msgstr "I<uordblks>"
2205
2206 #. type: Plain text
2207 #: build/C/man3/mallinfo.3:98
2208 msgid "The total number of bytes used by in-use allocations."
2209 msgstr ""
2210
2211 #. type: TP
2212 #: build/C/man3/mallinfo.3:98
2213 #, no-wrap
2214 msgid "I<fordblks>"
2215 msgstr "I<fordblks>"
2216
2217 #. type: Plain text
2218 #: build/C/man3/mallinfo.3:101
2219 msgid "The total number of bytes in free blocks."
2220 msgstr ""
2221
2222 #. type: TP
2223 #: build/C/man3/mallinfo.3:101
2224 #, no-wrap
2225 msgid "I<keepcost>"
2226 msgstr "I<keepcost>"
2227
2228 #.  .SH VERSIONS
2229 #.  Available already in glibc 2.0, possibly earlier
2230 #. type: Plain text
2231 #: build/C/man3/mallinfo.3:110
2232 msgid ""
2233 "The total amount of releasable free space at the top of the heap.  This is "
2234 "the maximum number of bytes that could ideally (i.e., ignoring page "
2235 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2236 msgstr ""
2237
2238 #. type: Plain text
2239 #: build/C/man3/mallinfo.3:114
2240 msgid ""
2241 "This function is not specified by POSIX or the C standards.  A similar "
2242 "function exists on many System V derivatives, and was specified in the SVID."
2243 msgstr ""
2244
2245 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2246 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2247 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2248 #.  on libc-alpha@sourceware.org
2249 #. type: Plain text
2250 #: build/C/man3/mallinfo.3:126
2251 msgid ""
2252 "B<Information is returned for only the main memory allocation area.> "
2253 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2254 "B<malloc_info>(3)  for alternatives that include information about other "
2255 "arenas."
2256 msgstr ""
2257
2258 #. type: Plain text
2259 #: build/C/man3/mallinfo.3:134
2260 msgid ""
2261 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2262 "because some internal bookkeeping values may be of type I<long>, the "
2263 "reported values may wrap around zero and thus be inaccurate."
2264 msgstr ""
2265
2266 #. type: SH
2267 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2268 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2269 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:629
2270 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2271 #, no-wrap
2272 msgid "EXAMPLE"
2273 msgstr "例"
2274
2275 #. type: Plain text
2276 #: build/C/man3/mallinfo.3:140
2277 msgid ""
2278 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2279 "statistics before and after allocating and freeing some blocks of memory.  "
2280 "The statistics are displayed on standard output."
2281 msgstr ""
2282
2283 #. type: Plain text
2284 #: build/C/man3/mallinfo.3:144
2285 msgid ""
2286 "The first two command-line arguments specify the number and size of blocks "
2287 "to be allocated with B<malloc>(3)."
2288 msgstr ""
2289
2290 #. type: Plain text
2291 #: build/C/man3/mallinfo.3:158
2292 msgid ""
2293 "The remaining three arguments specify which of the allocated blocks should "
2294 "be freed with B<free>(3).  These three arguments are optional, and specify "
2295 "(in order): the step size to be used in the loop that frees blocks (the "
2296 "default is 1, meaning free all blocks in the range); the ordinal position of "
2297 "the first block to be freed (default 0, meaning the first allocated block); "
2298 "and a number one greater than the ordinal position of the last block to be "
2299 "freed (default is one greater than the maximum block number).  If these "
2300 "three arguments are omitted, then the defaults cause all allocated blocks to "
2301 "be freed."
2302 msgstr ""
2303
2304 #. type: Plain text
2305 #: build/C/man3/mallinfo.3:162
2306 msgid ""
2307 "In the following example run of the program, 1000 allocations of 100 bytes "
2308 "are performed, and then every second allocated block is freed:"
2309 msgstr ""
2310
2311 #. type: Plain text
2312 #: build/C/man3/mallinfo.3:177
2313 #, no-wrap
2314 msgid ""
2315 "$ B<./a.out 1000 100 2>\n"
2316 "============== Before allocating blocks ==============\n"
2317 "Total non-mmapped bytes (arena):       0\n"
2318 "# of free chunks (ordblks):            1\n"
2319 "# of free fastbin blocks (smblks):     0\n"
2320 "# of mapped regions (hblks):           0\n"
2321 "Bytes in mapped regions (hblkhd):      0\n"
2322 "Max. total allocated space (usmblks):  0\n"
2323 "Free bytes held in fastbins (fsmblks): 0\n"
2324 "Total allocated space (uordblks):      0\n"
2325 "Total free space (fordblks):           0\n"
2326 "Topmost releasable block (keepcost):   0\n"
2327 msgstr ""
2328 "$ B<./a.out 1000 100 2>\n"
2329 "============== Before allocating blocks ==============\n"
2330 "Total non-mmapped bytes (arena):       0\n"
2331 "# of free chunks (ordblks):            1\n"
2332 "# of free fastbin blocks (smblks):     0\n"
2333 "# of mapped regions (hblks):           0\n"
2334 "Bytes in mapped regions (hblkhd):      0\n"
2335 "Max. total allocated space (usmblks):  0\n"
2336 "Free bytes held in fastbins (fsmblks): 0\n"
2337 "Total allocated space (uordblks):      0\n"
2338 "Total free space (fordblks):           0\n"
2339 "Topmost releasable block (keepcost):   0\n"
2340
2341 #. type: Plain text
2342 #: build/C/man3/mallinfo.3:189
2343 #, no-wrap
2344 msgid ""
2345 "============== After allocating blocks ==============\n"
2346 "Total non-mmapped bytes (arena):       135168\n"
2347 "# of free chunks (ordblks):            1\n"
2348 "# of free fastbin blocks (smblks):     0\n"
2349 "# of mapped regions (hblks):           0\n"
2350 "Bytes in mapped regions (hblkhd):      0\n"
2351 "Max. total allocated space (usmblks):  0\n"
2352 "Free bytes held in fastbins (fsmblks): 0\n"
2353 "Total allocated space (uordblks):      104000\n"
2354 "Total free space (fordblks):           31168\n"
2355 "Topmost releasable block (keepcost):   31168\n"
2356 msgstr ""
2357 "============== After allocating blocks ==============\n"
2358 "Total non-mmapped bytes (arena):       135168\n"
2359 "# of free chunks (ordblks):            1\n"
2360 "# of free fastbin blocks (smblks):     0\n"
2361 "# of mapped regions (hblks):           0\n"
2362 "Bytes in mapped regions (hblkhd):      0\n"
2363 "Max. total allocated space (usmblks):  0\n"
2364 "Free bytes held in fastbins (fsmblks): 0\n"
2365 "Total allocated space (uordblks):      104000\n"
2366 "Total free space (fordblks):           31168\n"
2367 "Topmost releasable block (keepcost):   31168\n"
2368
2369 #. type: Plain text
2370 #: build/C/man3/mallinfo.3:201
2371 #, no-wrap
2372 msgid ""
2373 "============== After freeing blocks ==============\n"
2374 "Total non-mmapped bytes (arena):       135168\n"
2375 "# of free chunks (ordblks):            501\n"
2376 "# of free fastbin blocks (smblks):     0\n"
2377 "# of mapped regions (hblks):           0\n"
2378 "Bytes in mapped regions (hblkhd):      0\n"
2379 "Max. total allocated space (usmblks):  0\n"
2380 "Free bytes held in fastbins (fsmblks): 0\n"
2381 "Total allocated space (uordblks):      52000\n"
2382 "Total free space (fordblks):           83168\n"
2383 "Topmost releasable block (keepcost):   31168\n"
2384 msgstr ""
2385 "============== After freeing blocks ==============\n"
2386 "Total non-mmapped bytes (arena):       135168\n"
2387 "# of free chunks (ordblks):            501\n"
2388 "# of free fastbin blocks (smblks):     0\n"
2389 "# of mapped regions (hblks):           0\n"
2390 "Bytes in mapped regions (hblkhd):      0\n"
2391 "Max. total allocated space (usmblks):  0\n"
2392 "Free bytes held in fastbins (fsmblks): 0\n"
2393 "Total allocated space (uordblks):      52000\n"
2394 "Total free space (fordblks):           83168\n"
2395 "Topmost releasable block (keepcost):   31168\n"
2396
2397 #. type: SS
2398 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2399 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2400 #: build/C/man2/mmap.2:641 build/C/man2/mprotect.2:164
2401 #, no-wrap
2402 msgid "Program source"
2403 msgstr "プログラムのソース"
2404
2405 #. type: Plain text
2406 #: build/C/man3/mallinfo.3:208
2407 #, no-wrap
2408 msgid ""
2409 "#include E<lt>malloc.hE<gt>\n"
2410 "#include \"tlpi_hdr.h\"\n"
2411 msgstr ""
2412 "#include E<lt>malloc.hE<gt>\n"
2413 "#include \"tlpi_hdr.h\"\n"
2414
2415 #. type: Plain text
2416 #: build/C/man3/mallinfo.3:213
2417 #, no-wrap
2418 msgid ""
2419 "static void\n"
2420 "display_mallinfo(void)\n"
2421 "{\n"
2422 "    struct mallinfo mi;\n"
2423 msgstr ""
2424 "static void\n"
2425 "display_mallinfo(void)\n"
2426 "{\n"
2427 "    struct mallinfo mi;\n"
2428
2429 #. type: Plain text
2430 #: build/C/man3/mallinfo.3:215
2431 #, no-wrap
2432 msgid "    mi = mallinfo();\n"
2433 msgstr "    mi = mallinfo();\n"
2434
2435 #. type: Plain text
2436 #: build/C/man3/mallinfo.3:227
2437 #, no-wrap
2438 msgid ""
2439 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2440 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2441 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2442 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2443 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2444 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2445 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2446 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2447 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2448 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2449 "}\n"
2450 msgstr ""
2451 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2452 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2453 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2454 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2455 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2456 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2457 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2458 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2459 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2460 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2461 "}\n"
2462
2463 #. type: Plain text
2464 #: build/C/man3/mallinfo.3:235
2465 #, no-wrap
2466 msgid ""
2467 "int\n"
2468 "main(int argc, char *argv[])\n"
2469 "{\n"
2470 "#define MAX_ALLOCS 2000000\n"
2471 "    char *alloc[MAX_ALLOCS];\n"
2472 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2473 "    size_t blockSize;\n"
2474 msgstr ""
2475 "int\n"
2476 "main(int argc, char *argv[])\n"
2477 "{\n"
2478 "#define MAX_ALLOCS 2000000\n"
2479 "    char *alloc[MAX_ALLOCS];\n"
2480 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2481 "    size_t blockSize;\n"
2482
2483 #. type: Plain text
2484 #: build/C/man3/mallinfo.3:239
2485 #, no-wrap
2486 msgid ""
2487 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2488 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2489 "                \"[end-free]]]\\en\", argv[0]);\n"
2490 msgstr ""
2491 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2492 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2493 "                \"[end-free]]]\\en\", argv[0]);\n"
2494
2495 #. type: Plain text
2496 #: build/C/man3/mallinfo.3:245
2497 #, no-wrap
2498 msgid ""
2499 "    numBlocks = atoi(argv[1]);\n"
2500 "    blockSize = atoi(argv[2]);\n"
2501 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2502 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2503 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2504 msgstr ""
2505 "    numBlocks = atoi(argv[1]);\n"
2506 "    blockSize = atoi(argv[2]);\n"
2507 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2508 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2509 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2510
2511 #. type: Plain text
2512 #: build/C/man3/mallinfo.3:248
2513 #, no-wrap
2514 msgid ""
2515 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2516 "    display_mallinfo();\n"
2517 msgstr ""
2518 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2519 "    display_mallinfo();\n"
2520
2521 #. type: Plain text
2522 #: build/C/man3/mallinfo.3:252
2523 #, no-wrap
2524 msgid ""
2525 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2526 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2527 "            fatal(\"Too many allocations\");\n"
2528 msgstr ""
2529 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2530 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2531 "            fatal(\"Too many allocations\");\n"
2532
2533 #. type: Plain text
2534 #: build/C/man3/mallinfo.3:257
2535 #, no-wrap
2536 msgid ""
2537 "        alloc[j] = malloc(blockSize);\n"
2538 "        if (alloc[j] == NULL)\n"
2539 "            errExit(\"malloc\");\n"
2540 "    }\n"
2541 msgstr ""
2542 "        alloc[j] = malloc(blockSize);\n"
2543 "        if (alloc[j] == NULL)\n"
2544 "            errExit(\"malloc\");\n"
2545 "    }\n"
2546
2547 #. type: Plain text
2548 #: build/C/man3/mallinfo.3:260
2549 #, no-wrap
2550 msgid ""
2551 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2552 "    display_mallinfo();\n"
2553 msgstr ""
2554 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2555 "    display_mallinfo();\n"
2556
2557 #. type: Plain text
2558 #: build/C/man3/mallinfo.3:263
2559 #, no-wrap
2560 msgid ""
2561 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2562 "        free(alloc[j]);\n"
2563 msgstr ""
2564 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2565 "        free(alloc[j]);\n"
2566
2567 #. type: Plain text
2568 #: build/C/man3/mallinfo.3:266
2569 #, no-wrap
2570 msgid ""
2571 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2572 "    display_mallinfo();\n"
2573 msgstr ""
2574 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2575 "    display_mallinfo();\n"
2576
2577 #. type: Plain text
2578 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2579 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2580 #: build/C/man2/mmap.2:710
2581 #, no-wrap
2582 msgid ""
2583 "    exit(EXIT_SUCCESS);\n"
2584 "}\n"
2585 msgstr ""
2586 "    exit(EXIT_SUCCESS);\n"
2587 "}\n"
2588
2589 #. type: Plain text
2590 #: build/C/man3/mallinfo.3:279
2591 msgid ""
2592 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2593 "B<malloc_trim>(3), B<mallopt>(3)"
2594 msgstr ""
2595 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2596 "B<malloc_trim>(3), B<mallopt>(3)"
2597
2598 #. type: TH
2599 #: build/C/man3/malloc_get_state.3:25
2600 #, no-wrap
2601 msgid "MALLOC_GET_STATE"
2602 msgstr "MALLOC_GET_STATE"
2603
2604 #. type: TH
2605 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2606 #, no-wrap
2607 msgid "2014-06-13"
2608 msgstr "2014-06-13"
2609
2610 #. type: Plain text
2611 #: build/C/man3/malloc_get_state.3:28
2612 msgid ""
2613 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2614 "implementation"
2615 msgstr ""
2616
2617 #. type: Plain text
2618 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2619 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2620 #, no-wrap
2621 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2622 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2623
2624 #. type: Plain text
2625 #: build/C/man3/malloc_get_state.3:33
2626 #, no-wrap
2627 msgid "B<void* malloc_get_state(void);>\n"
2628 msgstr "B<void* malloc_get_state(void);>\n"
2629
2630 #. type: Plain text
2631 #: build/C/man3/malloc_get_state.3:35
2632 #, no-wrap
2633 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2634 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2635
2636 #. type: Plain text
2637 #: build/C/man3/malloc_get_state.3:53
2638 msgid ""
2639 "The B<malloc_get_state>()  function records the current state of all "
2640 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2641 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2642 "is recorded in a system-dependent opaque data structure dynamically "
2643 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2644 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2645 "this memory.)"
2646 msgstr ""
2647
2648 #. type: Plain text
2649 #: build/C/man3/malloc_get_state.3:61
2650 msgid ""
2651 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2652 "internal bookkeeping variables to the values recorded in the opaque data "
2653 "structure pointed to by I<state>."
2654 msgstr ""
2655
2656 #. type: Plain text
2657 #: build/C/man3/malloc_get_state.3:68
2658 msgid ""
2659 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2660 "opaque data structure.  On error (for example, memory could not be allocated "
2661 "for the data structure), B<malloc_get_state>()  returns NULL."
2662 msgstr ""
2663
2664 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2665 #.  /* Must fail if the major version is too high. */
2666 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2667 #. type: Plain text
2668 #: build/C/man3/malloc_get_state.3:86
2669 msgid ""
2670 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2671 "that I<state> does not point to a correctly formed data structure, "
2672 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2673 "version of the data structure referred to by I<state> is a more recent "
2674 "version than this implementation knows about, B<malloc_set_state>()  returns "
2675 "-2."
2676 msgstr ""
2677
2678 #. type: Plain text
2679 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2680 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2681 msgid "These functions are GNU extensions."
2682 msgstr "これらの関数は GNU による拡張である。"
2683
2684 #. type: Plain text
2685 #: build/C/man3/malloc_get_state.3:94
2686 msgid ""
2687 "These functions are useful when using this B<malloc>(3)  implementation as "
2688 "part of a shared library, and the heap contents are saved/restored via some "
2689 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2690 "\" function."
2691 msgstr ""
2692
2693 #.  i.e., calls __malloc_check_init()
2694 #.  i.e., malloc checking is not already in use
2695 #.  and the caller requested malloc checking
2696 #. type: Plain text
2697 #: build/C/man3/malloc_get_state.3:111
2698 msgid ""
2699 "Hook function pointers are never saved or restored by these functions, with "
2700 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2701 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2702 "checking hooks if possible; if malloc checking was not in use in the "
2703 "recorded state, but the caller has requested malloc checking, then the hooks "
2704 "are reset to 0."
2705 msgstr ""
2706
2707 #. type: Plain text
2708 #: build/C/man3/malloc_get_state.3:114
2709 msgid "B<malloc>(3), B<mallopt>(3)"
2710 msgstr "B<malloc>(3), B<mallopt>(3)"
2711
2712 #. type: TH
2713 #: build/C/man3/malloc_hook.3:10
2714 #, no-wrap
2715 msgid "MALLOC_HOOK"
2716 msgstr "MALLOC_HOOK"
2717
2718 #. type: TH
2719 #: build/C/man3/malloc_hook.3:10
2720 #, no-wrap
2721 msgid "2010-10-13"
2722 msgstr "2010-10-13"
2723
2724 #. type: Plain text
2725 #: build/C/man3/malloc_hook.3:15
2726 msgid ""
2727 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2728 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2729 msgstr ""
2730 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2731 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2732
2733 #. type: Plain text
2734 #: build/C/man3/malloc_hook.3:20
2735 #, no-wrap
2736 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2737 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2738
2739 #. type: Plain text
2740 #: build/C/man3/malloc_hook.3:23
2741 #, no-wrap
2742 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2743 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2744
2745 #. type: Plain text
2746 #: build/C/man3/malloc_hook.3:26
2747 #, no-wrap
2748 msgid ""
2749 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2750 "B<                         const void *>I<caller>B<);>\n"
2751 msgstr ""
2752 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2753 "B<                         const void *>I<caller>B<);>\n"
2754
2755 #. type: Plain text
2756 #: build/C/man3/malloc_hook.3:28
2757 #, no-wrap
2758 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2759 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2760
2761 #. type: Plain text
2762 #: build/C/man3/malloc_hook.3:30
2763 #, no-wrap
2764 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2765 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2766
2767 #. type: Plain text
2768 #: build/C/man3/malloc_hook.3:32
2769 #, no-wrap
2770 msgid "B<void (*__after_morecore_hook)(void);>\n"
2771 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2772
2773 #. type: Plain text
2774 #: build/C/man3/malloc_hook.3:43
2775 msgid ""
2776 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2777 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2778 "You can use these hooks to help you debug programs that use dynamic memory "
2779 "allocation, for example."
2780 msgstr ""
2781 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2782 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2783 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2784 "ができる。"
2785
2786 #. type: Plain text
2787 #: build/C/man3/malloc_hook.3:50
2788 msgid ""
2789 "The variable B<__malloc_initialize_hook> points at a function that is called "
2790 "once when the malloc implementation is initialized.  This is a weak "
2791 "variable, so it can be overridden in the application with a definition like "
2792 "the following:"
2793 msgstr ""
2794 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2795 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2796 "ケーション内で 以下のような定義で上書きできる:"
2797
2798 #. type: Plain text
2799 #: build/C/man3/malloc_hook.3:53
2800 #, no-wrap
2801 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2802 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2803
2804 #. type: Plain text
2805 #: build/C/man3/malloc_hook.3:58
2806 msgid ""
2807 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2808 msgstr ""
2809 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2810
2811 #. type: Plain text
2812 #: build/C/man3/malloc_hook.3:74
2813 msgid ""
2814 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2815 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2816 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2817 "except that they have a final argument I<caller> that gives the address of "
2818 "the caller of B<malloc>(3), etc."
2819 msgstr ""
2820 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2821 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2822 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2823 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2824 "出し元 (caller) のアドレスが格納される。"
2825
2826 #. type: Plain text
2827 #: build/C/man3/malloc_hook.3:80
2828 msgid ""
2829 "The variable B<__after_morecore_hook> points at a function that is called "
2830 "each time after B<sbrk>(2)  was asked for more memory."
2831 msgstr ""
2832 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2833 "後で毎回呼び出される関数へのポインタである。"
2834
2835 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2836 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2837 #. type: Plain text
2838 #: build/C/man3/malloc_hook.3:89
2839 msgid ""
2840 "The use of these hook functions is not safe in multithreaded programs, and "
2841 "they are now deprecated.  Programmers should instead preempt calls to the "
2842 "relevant functions by defining and exporting functions such as \"malloc\" "
2843 "and \"free\"."
2844 msgstr ""
2845 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2846 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2847 "公開して、 関連する関数を呼び出すようにすべきである。"
2848
2849 #. type: Plain text
2850 #: build/C/man3/malloc_hook.3:91
2851 msgid "Here is a short example of how to use these variables."
2852 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2853
2854 #. type: Plain text
2855 #: build/C/man3/malloc_hook.3:95
2856 #, no-wrap
2857 msgid ""
2858 "#include E<lt>stdio.hE<gt>\n"
2859 "#include E<lt>malloc.hE<gt>\n"
2860 msgstr ""
2861 "#include E<lt>stdio.hE<gt>\n"
2862 "#include E<lt>malloc.hE<gt>\n"
2863
2864 #. type: Plain text
2865 #: build/C/man3/malloc_hook.3:99
2866 #, no-wrap
2867 msgid ""
2868 "/* Prototypes for our hooks.  */\n"
2869 "static void my_init_hook(void);\n"
2870 "static void *my_malloc_hook(size_t, const void *);\n"
2871 msgstr ""
2872 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2873 "static void my_init_hook(void);\n"
2874 "static void *my_malloc_hook(size_t, const void *);\n"
2875
2876 #. type: Plain text
2877 #: build/C/man3/malloc_hook.3:102
2878 #, no-wrap
2879 msgid ""
2880 "/* Variables to save original hooks. */\n"
2881 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2882 msgstr ""
2883 "/* 元々のフックを保存するための変数 */\n"
2884 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2885
2886 #. type: Plain text
2887 #: build/C/man3/malloc_hook.3:105
2888 #, no-wrap
2889 msgid ""
2890 "/* Override initializing hook from the C library. */\n"
2891 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2892 msgstr ""
2893 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2894 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2895
2896 #. type: Plain text
2897 #: build/C/man3/malloc_hook.3:112
2898 #, no-wrap
2899 msgid ""
2900 "static void\n"
2901 "my_init_hook(void)\n"
2902 "{\n"
2903 "    old_malloc_hook = __malloc_hook;\n"
2904 "    __malloc_hook = my_malloc_hook;\n"
2905 "}\n"
2906 msgstr ""
2907 "static void\n"
2908 "my_init_hook(void)\n"
2909 "{\n"
2910 "    old_malloc_hook = __malloc_hook;\n"
2911 "    __malloc_hook = my_malloc_hook;\n"
2912 "}\n"
2913
2914 #. type: Plain text
2915 #: build/C/man3/malloc_hook.3:117
2916 #, no-wrap
2917 msgid ""
2918 "static void *\n"
2919 "my_malloc_hook(size_t size, const void *caller)\n"
2920 "{\n"
2921 "    void *result;\n"
2922 msgstr ""
2923 "static void *\n"
2924 "my_malloc_hook(size_t size, const void *caller)\n"
2925 "{\n"
2926 "    void *result;\n"
2927
2928 #. type: Plain text
2929 #: build/C/man3/malloc_hook.3:120
2930 #, no-wrap
2931 msgid ""
2932 "    /* Restore all old hooks */\n"
2933 "    __malloc_hook = old_malloc_hook;\n"
2934 msgstr ""
2935 "    /* 元々のフックを全て戻す */\n"
2936 "    __malloc_hook = old_malloc_hook;\n"
2937
2938 #. type: Plain text
2939 #: build/C/man3/malloc_hook.3:123
2940 #, no-wrap
2941 msgid ""
2942 "    /* Call recursively */\n"
2943 "    result = malloc(size);\n"
2944 msgstr ""
2945 "    /* malloc の再帰的呼び出し */\n"
2946 "    result = malloc(size);\n"
2947
2948 #. type: Plain text
2949 #: build/C/man3/malloc_hook.3:126
2950 #, no-wrap
2951 msgid ""
2952 "    /* Save underlying hooks */\n"
2953 "    old_malloc_hook = __malloc_hook;\n"
2954 msgstr ""
2955 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2956 "    old_malloc_hook = __malloc_hook;\n"
2957
2958 #. type: Plain text
2959 #: build/C/man3/malloc_hook.3:130
2960 #, no-wrap
2961 msgid ""
2962 "    /* printf() might call malloc(), so protect it too. */\n"
2963 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2964 "            (unsigned int) size, caller, result);\n"
2965 msgstr ""
2966 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2967 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2968 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2969 "            (unsigned int) size, caller, result);\n"
2970
2971 #. type: Plain text
2972 #: build/C/man3/malloc_hook.3:133
2973 #, no-wrap
2974 msgid ""
2975 "    /* Restore our own hooks */\n"
2976 "    __malloc_hook = my_malloc_hook;\n"
2977 msgstr ""
2978 "    /* ユーザが使おうとするフックを再設定する */\n"
2979 "    __malloc_hook = my_malloc_hook;\n"
2980
2981 #. type: Plain text
2982 #: build/C/man3/malloc_hook.3:136
2983 #, no-wrap
2984 msgid ""
2985 "    return result;\n"
2986 "}\n"
2987 msgstr ""
2988 "    return result;\n"
2989 "}\n"
2990
2991 #. type: Plain text
2992 #: build/C/man3/malloc_hook.3:142
2993 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2994 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2995
2996 #. type: TH
2997 #: build/C/man3/malloc_info.3:25
2998 #, no-wrap
2999 msgid "MALLOC_INFO"
3000 msgstr "MALLOC_INFO"
3001
3002 #. type: TH
3003 #: build/C/man3/malloc_info.3:25
3004 #, no-wrap
3005 msgid "2013-04-19"
3006 msgstr "2013-04-19"
3007
3008 #. type: Plain text
3009 #: build/C/man3/malloc_info.3:28
3010 msgid "malloc_info - export malloc state to a stream"
3011 msgstr "malloc_info - malloc の状態をストリームに出力する"
3012
3013 #. type: Plain text
3014 #: build/C/man3/malloc_info.3:33
3015 #, no-wrap
3016 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3017 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3018
3019 #. type: Plain text
3020 #: build/C/man3/malloc_info.3:44
3021 msgid ""
3022 "The B<malloc_info>()  function exports an XML string that describes the "
3023 "current state of the memory-allocation implementation in the caller.  The "
3024 "string is printed on the file stream I<fp>.  The exported string includes "
3025 "information about all arenas (see B<malloc>(3))."
3026 msgstr ""
3027 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
3028 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
3029 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
3030
3031 #. type: Plain text
3032 #: build/C/man3/malloc_info.3:48
3033 msgid "As currently implemented, I<options> must be zero."
3034 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3035
3036 #. type: Plain text
3037 #: build/C/man3/malloc_info.3:55
3038 msgid ""
3039 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3040 "I<errno> set to indicate the cause."
3041 msgstr ""
3042 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3043 "I<errno> にエラーの原因を示す値を設定する。"
3044
3045 #. type: Plain text
3046 #: build/C/man3/malloc_info.3:60
3047 msgid "I<options> was nonzero."
3048 msgstr "I<options> が 0 でなかった。"
3049
3050 #. type: Plain text
3051 #: build/C/man3/malloc_info.3:63
3052 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3053 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3054
3055 #. type: Plain text
3056 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3057 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3058 msgid "This function is a GNU extension."
3059 msgstr "この関数は GNU による拡張である。"
3060
3061 #. type: Plain text
3062 #: build/C/man3/malloc_info.3:71
3063 msgid ""
3064 "The memory-allocation information is provided as an XML string (rather than "
3065 "a C structure)  because the information may change over time (according to "
3066 "changes in the underlying implementation).  The output XML string includes a "
3067 "version field."
3068 msgstr ""
3069 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3070 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3071 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3072
3073 #. type: Plain text
3074 #: build/C/man3/malloc_info.3:77
3075 msgid ""
3076 "The B<open_memstream>(3)  function can be used to send the output of "
3077 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3078 msgstr ""
3079 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3080 "なくメモリ内のバッファに直接送ることができる。"
3081
3082 #. type: Plain text
3083 #: build/C/man3/malloc_info.3:84
3084 msgid ""
3085 "The B<malloc_info>()  function is designed to address deficiencies in "
3086 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3087 msgstr ""
3088 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3089 "るために設定された。"
3090
3091 #. type: Plain text
3092 #: build/C/man3/malloc_info.3:95
3093 msgid ""
3094 "The program below takes up to four command-line arguments, of which the "
3095 "first three are mandatory.  The first argument specifies the number of "
3096 "threads that the program should create.  All of the threads, including the "
3097 "main thread, allocate the number of blocks of memory specified by the second "
3098 "argument.  The third argument controls the size of the blocks to be "
3099 "allocated.  The main thread creates blocks of this size, the second thread "
3100 "created by the program allocates blocks of twice this size, the third thread "
3101 "allocates blocks of three times this size, and so on."
3102 msgstr ""
3103 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3104 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3105 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
3106 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
3107 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
3108 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
3109 "のブロックを割り当て、 以下同様である。"
3110
3111 #. type: Plain text
3112 #: build/C/man3/malloc_info.3:102
3113 msgid ""
3114 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3115 "state.  The first call takes place before any threads are created or memory "
3116 "allocated.  The second call is performed after all threads have allocated "
3117 "memory."
3118 msgstr ""
3119 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
3120 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
3121 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
3122
3123 #. type: Plain text
3124 #: build/C/man3/malloc_info.3:110
3125 msgid ""
3126 "In the following example, the command-line arguments specify the creation of "
3127 "one additional thread, and both the main thread and the additional thread "
3128 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3129 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3130 msgstr ""
3131 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3132 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
3133 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
3134 "て領域の状態が表示されている。"
3135
3136 #. type: Plain text
3137 #: build/C/man3/malloc_info.3:135
3138 #, no-wrap
3139 msgid ""
3140 "$ B<getconf GNU_LIBC_VERSION>\n"
3141 "glibc 2.13\n"
3142 "$ B<./a.out 1 10000 100>\n"
3143 "============ Before allocating blocks ============\n"
3144 "E<lt>malloc version=\"1\"E<gt>\n"
3145 "E<lt>heap nr=\"0\"E<gt>\n"
3146 "E<lt>sizesE<gt>\n"
3147 "E<lt>/sizesE<gt>\n"
3148 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3149 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3150 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3151 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3152 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3153 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3154 "E<lt>/heapE<gt>\n"
3155 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3156 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3157 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3158 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3159 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3160 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3161 "E<lt>/mallocE<gt>\n"
3162 msgstr ""
3163 "$ B<getconf GNU_LIBC_VERSION>\n"
3164 "glibc 2.13\n"
3165 "$ B<./a.out 1 10000 100>\n"
3166 "============ Before allocating blocks ============\n"
3167 "E<lt>malloc version=\"1\"E<gt>\n"
3168 "E<lt>heap nr=\"0\"E<gt>\n"
3169 "E<lt>sizesE<gt>\n"
3170 "E<lt>/sizesE<gt>\n"
3171 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3172 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3173 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3174 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3175 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3176 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3177 "E<lt>/heapE<gt>\n"
3178 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3179 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3180 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3181 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3182 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3183 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3184 "E<lt>/mallocE<gt>\n"
3185
3186 #. type: Plain text
3187 #: build/C/man3/malloc_info.3:165
3188 #, no-wrap
3189 msgid ""
3190 "============ After allocating blocks ============\n"
3191 "E<lt>malloc version=\"1\"E<gt>\n"
3192 "E<lt>heap nr=\"0\"E<gt>\n"
3193 "E<lt>sizesE<gt>\n"
3194 "E<lt>/sizesE<gt>\n"
3195 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3196 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3197 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3198 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3199 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3200 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3201 "E<lt>/heapE<gt>\n"
3202 "E<lt>heap nr=\"1\"E<gt>\n"
3203 "E<lt>sizesE<gt>\n"
3204 "E<lt>/sizesE<gt>\n"
3205 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3206 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3207 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3208 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3209 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3210 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3211 "E<lt>/heapE<gt>\n"
3212 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3213 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3214 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3215 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3216 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3217 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3218 "E<lt>/mallocE<gt>\n"
3219 msgstr ""
3220 "============ After allocating blocks ============\n"
3221 "E<lt>malloc version=\"1\"E<gt>\n"
3222 "E<lt>heap nr=\"0\"E<gt>\n"
3223 "E<lt>sizesE<gt>\n"
3224 "E<lt>/sizesE<gt>\n"
3225 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3226 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3227 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3228 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3229 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3230 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3231 "E<lt>/heapE<gt>\n"
3232 "E<lt>heap nr=\"1\"E<gt>\n"
3233 "E<lt>sizesE<gt>\n"
3234 "E<lt>/sizesE<gt>\n"
3235 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3236 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3237 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3238 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3239 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3240 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3241 "E<lt>/heapE<gt>\n"
3242 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3243 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3244 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3245 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3246 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3247 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3248 "E<lt>/mallocE<gt>\n"
3249
3250 #. type: Plain text
3251 #: build/C/man3/malloc_info.3:175
3252 #, no-wrap
3253 msgid ""
3254 "#include E<lt>unistd.hE<gt>\n"
3255 "#include E<lt>stdlib.hE<gt>\n"
3256 "#include E<lt>pthread.hE<gt>\n"
3257 "#include E<lt>malloc.hE<gt>\n"
3258 "#include E<lt>errno.hE<gt>\n"
3259 msgstr ""
3260 "#include E<lt>unistd.hE<gt>\n"
3261 "#include E<lt>stdlib.hE<gt>\n"
3262 "#include E<lt>pthread.hE<gt>\n"
3263 "#include E<lt>malloc.hE<gt>\n"
3264 "#include E<lt>errno.hE<gt>\n"
3265
3266 #. type: Plain text
3267 #: build/C/man3/malloc_info.3:178
3268 #, no-wrap
3269 msgid ""
3270 "static size_t blockSize;\n"
3271 "static int numThreads, numBlocks;\n"
3272 msgstr ""
3273 "static size_t blockSize;\n"
3274 "static int numThreads, numBlocks;\n"
3275
3276 #. type: Plain text
3277 #: build/C/man3/malloc_info.3:181
3278 #, no-wrap
3279 msgid ""
3280 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3281 "                        } while (0)\n"
3282 msgstr ""
3283 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3284 "                        } while (0)\n"
3285
3286 #. type: Plain text
3287 #: build/C/man3/malloc_info.3:187
3288 #, no-wrap
3289 msgid ""
3290 "static void *\n"
3291 "thread_func(void *arg)\n"
3292 "{\n"
3293 "    int j;\n"
3294 "    int tn = (int) arg;\n"
3295 msgstr ""
3296 "static void *\n"
3297 "thread_func(void *arg)\n"
3298 "{\n"
3299 "    int j;\n"
3300 "    int tn = (int) arg;\n"
3301
3302 #. type: Plain text
3303 #: build/C/man3/malloc_info.3:190
3304 #, no-wrap
3305 msgid ""
3306 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3307 "       the main thread) allocates a different amount of memory */\n"
3308 msgstr ""
3309 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3310 "       the main thread) allocates a different amount of memory */\n"
3311
3312 #. type: Plain text
3313 #: build/C/man3/malloc_info.3:194
3314 #, no-wrap
3315 msgid ""
3316 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3317 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3318 "            errExit(\"malloc-thread\");\n"
3319 msgstr ""
3320 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3321 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3322 "            errExit(\"malloc-thread\");\n"
3323
3324 #. type: Plain text
3325 #: build/C/man3/malloc_info.3:198
3326 #, no-wrap
3327 msgid ""
3328 "    sleep(100);         /* Sleep until main thread terminates */\n"
3329 "    return NULL;\n"
3330 "}\n"
3331 msgstr ""
3332 "    sleep(100);         /* Sleep until main thread terminates */\n"
3333 "    return NULL;\n"
3334 "}\n"
3335
3336 #. type: Plain text
3337 #: build/C/man3/malloc_info.3:204
3338 #, no-wrap
3339 msgid ""
3340 "int\n"
3341 "main(int argc, char *argv[])\n"
3342 "{\n"
3343 "    int j, tn, sleepTime;\n"
3344 "    pthread_t *thr;\n"
3345 msgstr ""
3346 "int\n"
3347 "main(int argc, char *argv[])\n"
3348 "{\n"
3349 "    int j, tn, sleepTime;\n"
3350 "    pthread_t *thr;\n"
3351
3352 #. type: Plain text
3353 #: build/C/man3/malloc_info.3:211
3354 #, no-wrap
3355 msgid ""
3356 "    if (argc E<lt> 4) {\n"
3357 "        fprintf(stderr,\n"
3358 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3359 "                argv[0]);\n"
3360 "        exit(EXIT_FAILURE);\n"
3361 "    }\n"
3362 msgstr ""
3363 "    if (argc E<lt> 4) {\n"
3364 "        fprintf(stderr,\n"
3365 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3366 "                argv[0]);\n"
3367 "        exit(EXIT_FAILURE);\n"
3368 "    }\n"
3369
3370 #. type: Plain text
3371 #: build/C/man3/malloc_info.3:216
3372 #, no-wrap
3373 msgid ""
3374 "    numThreads = atoi(argv[1]);\n"
3375 "    numBlocks = atoi(argv[2]);\n"
3376 "    blockSize = atoi(argv[3]);\n"
3377 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3378 msgstr ""
3379 "    numThreads = atoi(argv[1]);\n"
3380 "    numBlocks = atoi(argv[2]);\n"
3381 "    blockSize = atoi(argv[3]);\n"
3382 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3383
3384 #. type: Plain text
3385 #: build/C/man3/malloc_info.3:220
3386 #, no-wrap
3387 msgid ""
3388 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3389 "    if (thr == NULL)\n"
3390 "        errExit(\"calloc\");\n"
3391 msgstr ""
3392 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3393 "    if (thr == NULL)\n"
3394 "        errExit(\"calloc\");\n"
3395
3396 #. type: Plain text
3397 #: build/C/man3/malloc_info.3:223
3398 #, no-wrap
3399 msgid ""
3400 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3401 "    malloc_info(0, stdout);\n"
3402 msgstr ""
3403 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3404 "    malloc_info(0, stdout);\n"
3405
3406 #. type: Plain text
3407 #: build/C/man3/malloc_info.3:225
3408 #, no-wrap
3409 msgid "    /* Create threads that allocate different amounts of memory */\n"
3410 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3411
3412 #. type: Plain text
3413 #: build/C/man3/malloc_info.3:231
3414 #, no-wrap
3415 msgid ""
3416 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3417 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3418 "                               (void *) tn);\n"
3419 "        if (errno != 0)\n"
3420 "            errExit(\"pthread_create\");\n"
3421 msgstr ""
3422 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3423 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3424 "                               (void *) tn);\n"
3425 "        if (errno != 0)\n"
3426 "            errExit(\"pthread_create\");\n"
3427
3428 #. type: Plain text
3429 #: build/C/man3/malloc_info.3:236
3430 #, no-wrap
3431 msgid ""
3432 "        /* If we add a sleep interval after the start-up of each\n"
3433 "           thread, the threads likely won\\(aqt contend for malloc\n"
3434 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3435 "           allocated (see malloc(3)). */\n"
3436 msgstr ""
3437 "        /* If we add a sleep interval after the start-up of each\n"
3438 "           thread, the threads likely won\\(aqt contend for malloc\n"
3439 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3440 "           allocated (see malloc(3)). */\n"
3441
3442 #. type: Plain text
3443 #: build/C/man3/malloc_info.3:240
3444 #, no-wrap
3445 msgid ""
3446 "        if (sleepTime E<gt> 0)\n"
3447 "            sleep(sleepTime);\n"
3448 "    }\n"
3449 msgstr ""
3450 "        if (sleepTime E<gt> 0)\n"
3451 "            sleep(sleepTime);\n"
3452 "    }\n"
3453
3454 #. type: Plain text
3455 #: build/C/man3/malloc_info.3:242
3456 #, no-wrap
3457 msgid "    /* The main thread also allocates some memory */\n"
3458 msgstr "    /* The main thread also allocates some memory */\n"
3459
3460 #. type: Plain text
3461 #: build/C/man3/malloc_info.3:246
3462 #, no-wrap
3463 msgid ""
3464 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3465 "        if (malloc(blockSize) == NULL)\n"
3466 "            errExit(\"malloc\");\n"
3467 msgstr ""
3468 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3469 "        if (malloc(blockSize) == NULL)\n"
3470 "            errExit(\"malloc\");\n"
3471
3472 #. type: Plain text
3473 #: build/C/man3/malloc_info.3:249
3474 #, no-wrap
3475 msgid ""
3476 "    sleep(2);           /* Give all threads a chance to\n"
3477 "                           complete allocations */\n"
3478 msgstr ""
3479 "    sleep(2);           /* Give all threads a chance to\n"
3480 "                           complete allocations */\n"
3481
3482 #. type: Plain text
3483 #: build/C/man3/malloc_info.3:252
3484 #, no-wrap
3485 msgid ""
3486 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3487 "    malloc_info(0, stdout);\n"
3488 msgstr ""
3489 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3490 "    malloc_info(0, stdout);\n"
3491
3492 #. type: Plain text
3493 #: build/C/man3/malloc_info.3:262
3494 msgid ""
3495 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3496 "B<open_memstream>(3)"
3497 msgstr ""
3498 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3499 "B<open_memstream>(3)"
3500
3501 #. type: TH
3502 #: build/C/man3/malloc_stats.3:26
3503 #, no-wrap
3504 msgid "MALLOC_STATS"
3505 msgstr "MALLOC_STATS"
3506
3507 #. type: Plain text
3508 #: build/C/man3/malloc_stats.3:29
3509 msgid "malloc_stats - print memory allocation statistics"
3510 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3511
3512 #. type: Plain text
3513 #: build/C/man3/malloc_stats.3:33
3514 msgid "B<void malloc_stats(void);>"
3515 msgstr "B<void malloc_stats(void);>"
3516
3517 #.  .SH VERSIONS
3518 #.  Available already in glibc 2.0, possibly earlier
3519 #. type: Plain text
3520 #: build/C/man3/malloc_stats.3:55
3521 msgid ""
3522 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3523 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3524 "(allocation area), this function prints the total amount of memory allocated "
3525 "and the total number of bytes consumed by in-use allocations.  (These two "
3526 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3527 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3528 "statistics for all arenas, and the maximum number of blocks and bytes that "
3529 "were ever simultaneously allocated using B<mmap>(2)."
3530 msgstr ""
3531 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3532 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3533 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3534 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3535 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3536 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3537 "ロック数とバイト数の最大値を表示する。"
3538
3539 #. type: Plain text
3540 #: build/C/man3/malloc_stats.3:61
3541 msgid ""
3542 "More detailed information about memory allocations in the main arena can be "
3543 "obtained using B<mallinfo>(3)."
3544 msgstr ""
3545 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3546 "報を取得できる。"
3547
3548 #. type: Plain text
3549 #: build/C/man3/malloc_stats.3:67
3550 msgid ""
3551 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3552 msgstr ""
3553 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3554
3555 #. type: TH
3556 #: build/C/man3/malloc_trim.3:26
3557 #, no-wrap
3558 msgid "MALLOC_TRIM"
3559 msgstr "MALLOC_TRIM"
3560
3561 #. type: TH
3562 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3563 #, no-wrap
3564 msgid "2014-05-28"
3565 msgstr "2014-05-28"
3566
3567 #. type: Plain text
3568 #: build/C/man3/malloc_trim.3:29
3569 msgid "malloc_trim - release free memory from the top of the heap"
3570 msgstr ""
3571
3572 #. type: Plain text
3573 #: build/C/man3/malloc_trim.3:33
3574 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3575 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3576
3577 #. type: Plain text
3578 #: build/C/man3/malloc_trim.3:40
3579 msgid ""
3580 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3581 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3582 msgstr ""
3583
3584 #. type: Plain text
3585 #: build/C/man3/malloc_trim.3:51
3586 msgid ""
3587 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3588 "the top of the heap.  If this argument is 0, only the minimum amount of "
3589 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3590 "nonzero argument can be used to maintain some trailing space at the top of "
3591 "the heap in order to allow future allocations to be made without having to "
3592 "extend the heap with B<sbrk>(2)."
3593 msgstr ""
3594
3595 #. type: Plain text
3596 #: build/C/man3/malloc_trim.3:56
3597 msgid ""
3598 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3599 "back to the system, or 0 if it was not possible to release any memory."
3600 msgstr ""
3601
3602 #.  .SH VERSIONS
3603 #.  Available already in glibc 2.0, possibly earlier
3604 #. type: Plain text
3605 #: build/C/man3/malloc_trim.3:60
3606 msgid "No errors are defined."
3607 msgstr ""
3608
3609 #. type: Plain text
3610 #: build/C/man3/malloc_trim.3:71
3611 msgid ""
3612 "This function is automatically called by B<free>(3)  in certain "
3613 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3614 "B<mallopt>(3)."
3615 msgstr ""
3616
3617 #. type: Plain text
3618 #: build/C/man3/malloc_trim.3:74
3619 msgid ""
3620 "This function cannot release free memory located at places other than the "
3621 "top of the heap."
3622 msgstr ""
3623
3624 #.  malloc/malloc.c::mTRIm():
3625 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3626 #. type: Plain text
3627 #: build/C/man3/malloc_trim.3:78
3628 msgid "This function releases only memory in the main arena."
3629 msgstr ""
3630
3631 #. type: Plain text
3632 #: build/C/man3/malloc_trim.3:82
3633 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3634 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3635
3636 #. type: TH
3637 #: build/C/man3/malloc_usable_size.3:25
3638 #, no-wrap
3639 msgid "MALLOC_USABLE_SIZE"
3640 msgstr "MALLOC_USABLE_SIZE"
3641
3642 #. type: Plain text
3643 #: build/C/man3/malloc_usable_size.3:28
3644 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3645 msgstr ""
3646 "malloc_usable_size - ヒープから確保したメモリブロックのサイズを取得する"
3647
3648 #. type: Plain text
3649 #: build/C/man3/malloc_usable_size.3:32
3650 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3651 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3652
3653 #. type: Plain text
3654 #: build/C/man3/malloc_usable_size.3:40
3655 msgid ""
3656 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3657 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3658 "B<malloc>(3)  or a related function."
3659 msgstr ""
3660 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3661 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリブロックへの"
3662 "ポインターである。"
3663
3664 #. type: Plain text
3665 #: build/C/man3/malloc_usable_size.3:48
3666 msgid ""
3667 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3668 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3669 msgstr ""
3670 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリブロックで使用可能"
3671 "なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3672
3673 #. type: Plain text
3674 #: build/C/man3/malloc_usable_size.3:53
3675 msgid "The B<malloc_usable_size>()  function is thread-safe."
3676 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3677
3678 #. type: Plain text
3679 #: build/C/man3/malloc_usable_size.3:65
3680 msgid ""
3681 "The value returned by B<malloc_usable_size>()  may be greater than the "
3682 "requested size of the allocation because of alignment and minimum size "
3683 "constraints.  Although the excess bytes can be overwritten by the "
3684 "application without ill effects, this is not good programming practice: the "
3685 "number of excess bytes in an allocation depends on the underlying "
3686 "implementation."
3687 msgstr ""
3688 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3689 "がある。 これは、メモリアラインメントと最小サイズの制約のためである。 この超"
3690 "過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行う"
3691 "のはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超過"
3692 "バイトの量は、内部の実装に依存する。"
3693
3694 #. type: Plain text
3695 #: build/C/man3/malloc_usable_size.3:67
3696 msgid "The main use of this function is for debugging and introspection."
3697 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3698
3699 #. type: Plain text
3700 #: build/C/man3/malloc_usable_size.3:69
3701 msgid "B<malloc>(3)"
3702 msgstr "B<malloc>(3)"
3703
3704 #. type: TH
3705 #: build/C/man3/mallopt.3:26
3706 #, no-wrap
3707 msgid "MALLOPT"
3708 msgstr "MALLOPT"
3709
3710 #. type: Plain text
3711 #: build/C/man3/mallopt.3:29
3712 msgid "mallopt - set memory allocation parameters"
3713 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3714
3715 #. type: Plain text
3716 #: build/C/man3/mallopt.3:33
3717 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3718 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3719
3720 #. type: Plain text
3721 #: build/C/man3/mallopt.3:44
3722 msgid ""
3723 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3724 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3725 "specifies the parameter to be modified, and I<value> specifies the new value "
3726 "for that parameter."
3727 msgstr ""
3728 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3729 "制御するパラメータの調整を行う。\n"
3730 "I<param> 引き数で変更するパラメータを指定し、\n"
3731 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3732
3733 #. type: Plain text
3734 #: build/C/man3/mallopt.3:47
3735 msgid "The following values can be specified for I<param>:"
3736 msgstr "I<param> には以下の値を指定することができる。"
3737
3738 #. type: TP
3739 #: build/C/man3/mallopt.3:47
3740 #, no-wrap
3741 msgid "B<M_CHECK_ACTION>"
3742 msgstr "B<M_CHECK_ACTION>"
3743
3744 #. type: Plain text
3745 #: build/C/man3/mallopt.3:53
3746 msgid ""
3747 "Setting this parameter controls how glibc responds when various kinds of "
3748 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3749 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3750 "parameter determine the glibc behavior, as follows:"
3751 msgstr ""
3752
3753 #. type: TP
3754 #: build/C/man3/mallopt.3:54
3755 #, no-wrap
3756 msgid "Bit 0"
3757 msgstr "Bit 0"
3758
3759 #. type: Plain text
3760 #: build/C/man3/mallopt.3:64
3761 msgid ""
3762 "If this bit is set, then print a one-line message on I<stderr> that provides "
3763 "details about the error.  The message starts with the string \"***\\ glibc "
3764 "detected\\ ***\", followed by the program name, the name of the memory-"
3765 "allocation function in which the error was detected, a brief description of "
3766 "the error, and the memory address where the error was detected."
3767 msgstr ""
3768
3769 #. type: TP
3770 #: build/C/man3/mallopt.3:64
3771 #, no-wrap
3772 msgid "Bit 1"
3773 msgstr "Bit 1"
3774
3775 #. type: Plain text
3776 #: build/C/man3/mallopt.3:79
3777 msgid ""
3778 "If this bit is set, then, after printing any error message specified by bit "
3779 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3780 "since 2.4, if bit 0 is also set, then, between printing the error message "
3781 "and aborting, the program also prints a stack trace in the manner of "
3782 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3783 "proc/[pid]/maps> (see B<proc>(5))."
3784 msgstr ""
3785
3786 #. type: TP
3787 #: build/C/man3/mallopt.3:79
3788 #, no-wrap
3789 msgid "Bit 2 (since glibc 2.4)"
3790 msgstr "Bit 2 (glibc 2.4 以降)"
3791
3792 #. type: Plain text
3793 #: build/C/man3/mallopt.3:86
3794 msgid ""
3795 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3796 "the one-line message describing the error is simplified to contain just the "
3797 "name of the function where the error was detected and the brief description "
3798 "of the error."
3799 msgstr ""
3800
3801 #. type: Plain text
3802 #: build/C/man3/mallopt.3:91
3803 msgid "The remaining bits in I<value> are ignored."
3804 msgstr ""
3805
3806 #. type: Plain text
3807 #: build/C/man3/mallopt.3:95
3808 msgid ""
3809 "Combining the above details, the following numeric values are meaningful for "
3810 "B<M_CHECK_ACTION>:"
3811 msgstr ""
3812
3813 #. type: IP
3814 #: build/C/man3/mallopt.3:96
3815 #, no-wrap
3816 msgid "0"
3817 msgstr "0"
3818
3819 #. type: Plain text
3820 #: build/C/man3/mallopt.3:98
3821 msgid "Ignore error conditions; continue execution (with undefined results)."
3822 msgstr ""
3823
3824 #. type: IP
3825 #: build/C/man3/mallopt.3:98
3826 #, no-wrap
3827 msgid "1"
3828 msgstr "1"
3829
3830 #. type: Plain text
3831 #: build/C/man3/mallopt.3:100
3832 msgid "Print a detailed error message and continue execution."
3833 msgstr ""
3834
3835 #. type: IP
3836 #: build/C/man3/mallopt.3:100
3837 #, no-wrap
3838 msgid "2"
3839 msgstr "2"
3840
3841 #. type: Plain text
3842 #: build/C/man3/mallopt.3:102
3843 msgid "Abort the program."
3844 msgstr ""
3845
3846 #. type: IP
3847 #: build/C/man3/mallopt.3:102
3848 #, no-wrap
3849 msgid "3"
3850 msgstr "3"
3851
3852 #. type: Plain text
3853 #: build/C/man3/mallopt.3:105
3854 msgid ""
3855 "Print detailed error message, stack trace, and memory mappings, and abort "
3856 "the program."
3857 msgstr ""
3858
3859 #. type: IP
3860 #: build/C/man3/mallopt.3:105
3861 #, no-wrap
3862 msgid "5"
3863 msgstr "5"
3864
3865 #. type: Plain text
3866 #: build/C/man3/mallopt.3:107
3867 msgid "Print a simple error message and continue execution."
3868 msgstr ""
3869
3870 #. type: IP
3871 #: build/C/man3/mallopt.3:107
3872 #, no-wrap
3873 msgid "7"
3874 msgstr "7"
3875
3876 #. type: Plain text
3877 #: build/C/man3/mallopt.3:110
3878 msgid ""
3879 "Print simple error message, stack trace, and memory mappings, and abort the "
3880 "program."
3881 msgstr ""
3882
3883 #. type: Plain text
3884 #: build/C/man3/mallopt.3:116
3885 msgid ""
3886 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3887 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3888 msgstr ""
3889
3890 #. type: Plain text
3891 #: build/C/man3/mallopt.3:121
3892 msgid ""
3893 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3894 "crash may happen much later, and the true cause of the problem is then very "
3895 "hard to track down."
3896 msgstr ""
3897
3898 #. type: TP
3899 #: build/C/man3/mallopt.3:121
3900 #, no-wrap
3901 msgid "B<M_MMAP_MAX>"
3902 msgstr "B<M_MMAP_MAX>"
3903
3904 #.  The following text adapted from comments in the glibc source:
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:131
3907 msgid ""
3908 "This parameter specifies the maximum number of allocation requests that may "
3909 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3910 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3911 "and using more than a few of them may degrade performance."
3912 msgstr ""
3913
3914 #. type: Plain text
3915 #: build/C/man3/mallopt.3:138
3916 msgid ""
3917 "The default value is 65,536, a value which has no special significance and "
3918 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3919 "use of B<mmap>(2)  for servicing large allocation requests."
3920 msgstr ""
3921
3922 #. type: TP
3923 #: build/C/man3/mallopt.3:138
3924 #, no-wrap
3925 msgid "B<M_MMAP_THRESHOLD>"
3926 msgstr "B<M_MMAP_THRESHOLD>"
3927
3928 #. type: Plain text
3929 #: build/C/man3/mallopt.3:147
3930 msgid ""
3931 "For allocations greater than or equal to the limit specified (in bytes) by "
3932 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3933 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3934 "break using B<sbrk>(2)."
3935 msgstr ""
3936
3937 #. type: Plain text
3938 #: build/C/man3/mallopt.3:167
3939 msgid ""
3940 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3941 "allocated memory blocks can always be independently released back to the "
3942 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3943 "the top end.)  On the other hand, there are some disadvantages to the use of "
3944 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3945 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3946 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3947 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3948 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3949 msgstr ""
3950
3951 #. type: Plain text
3952 #: build/C/man3/mallopt.3:174
3953 msgid ""
3954 "The lower limit for this parameter is 0.  The upper limit is "
3955 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3956 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3957 msgstr ""
3958
3959 #. type: Plain text
3960 #: build/C/man3/mallopt.3:192
3961 msgid ""
3962 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3963 "initial value of the threshold is 128*1024, but when blocks larger than the "
3964 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3965 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3966 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3967 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3968 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3969 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3970 "parameters is set."
3971 msgstr ""
3972
3973 #. type: TP
3974 #: build/C/man3/mallopt.3:192
3975 #, no-wrap
3976 msgid "B<M_MXFAST> (since glibc 2.3)"
3977 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3978
3979 #.  The following text adapted from comments in the glibc sources:
3980 #. type: Plain text
3981 #: build/C/man3/mallopt.3:212
3982 msgid ""
3983 "Set the upper limit for memory allocation requests that are satisfied using "
3984 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3985 "are storage areas that hold deallocated blocks of memory of the same size "
3986 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3987 "the same size can be handled very quickly by allocating from the fastbin, "
3988 "although memory fragmentation and the overall memory footprint of the "
3989 "program can increase.  The default value for this parameter is "
3990 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
3991 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
3992 "disables the use of fastbins."
3993 msgstr ""
3994
3995 #. type: TP
3996 #: build/C/man3/mallopt.3:212
3997 #, no-wrap
3998 msgid "B<M_PERTURB> (since glibc 2.4)"
3999 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4000
4001 #. type: Plain text
4002 #: build/C/man3/mallopt.3:227
4003 msgid ""
4004 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4005 "(other than allocations via B<calloc>(3))  are initialized to the complement "
4006 "of the value in the least significant byte of I<value>, and when allocated "
4007 "memory is released using B<free>(3), the freed bytes are set to the least "
4008 "significant byte of I<value>.  This can be useful for detecting errors where "
4009 "programs incorrectly rely on allocated memory being initialized to zero, or "
4010 "reuse values in memory that has already been freed."
4011 msgstr ""
4012
4013 #. type: TP
4014 #: build/C/man3/mallopt.3:227
4015 #, no-wrap
4016 msgid "B<M_TOP_PAD>"
4017 msgstr "B<M_TOP_PAD>"
4018
4019 #. type: Plain text
4020 #: build/C/man3/mallopt.3:234
4021 msgid ""
4022 "This parameter defines the amount of padding to employ when calling "
4023 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4024 "parameter is bytes.)  This parameter has an effect in the following "
4025 "circumstances:"
4026 msgstr ""
4027
4028 #. type: Plain text
4029 #: build/C/man3/mallopt.3:241
4030 msgid ""
4031 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4032 "the B<sbrk>(2)  request."
4033 msgstr ""
4034
4035 #. type: Plain text
4036 #: build/C/man3/mallopt.3:247
4037 msgid ""
4038 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4039 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4040 "top of the heap."
4041 msgstr ""
4042
4043 #. type: Plain text
4044 #: build/C/man3/mallopt.3:251
4045 msgid ""
4046 "In either case, the amount of padding is always rounded to a system page "
4047 "boundary."
4048 msgstr ""
4049
4050 #. type: Plain text
4051 #: build/C/man3/mallopt.3:258
4052 msgid ""
4053 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4054 "system calls (when the parameter is set low)  and wasting unused memory at "
4055 "the top of the heap (when the parameter is set high)."
4056 msgstr ""
4057
4058 #.  DEFAULT_TOP_PAD in glibc source
4059 #. type: Plain text
4060 #: build/C/man3/mallopt.3:261
4061 msgid "The default value for this parameter is 128*1024."
4062 msgstr ""
4063
4064 #. type: TP
4065 #: build/C/man3/mallopt.3:261
4066 #, no-wrap
4067 msgid "B<M_TRIM_THRESHOLD>"
4068 msgstr "B<M_TRIM_THRESHOLD>"
4069
4070 #. type: Plain text
4071 #: build/C/man3/mallopt.3:277
4072 msgid ""
4073 "When the amount of contiguous free memory at the top of the heap grows "
4074 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4075 "back to the system.  (This can be useful in programs that continue to "
4076 "execute for a long period after freeing a significant amount of memory.)  "
4077 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4078 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4079 msgstr ""
4080
4081 #. type: Plain text
4082 #: build/C/man3/mallopt.3:282
4083 msgid ""
4084 "The default value for this parameter is 128*1024.  Setting "
4085 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4086 msgstr ""
4087
4088 #
4089 #
4090 #
4091 #.  FIXME Do the arena parameters need to be documented?
4092 #.  .TP
4093 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4094 #.  .TP
4095 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4096 #.  Environment variables
4097 #.      MALLOC_ARENA_MAX_
4098 #.      MALLOC_ARENA_TEST_
4099 #.  http://udrepper.livejournal.com/20948.html describes some details
4100 #.      of the MALLOC_ARENA_* environment variables.
4101 #.  These macros aren't enabled in production releases until 2.15?
4102 #.  (see glibc malloc/Makefile)
4103 #. type: Plain text
4104 #: build/C/man3/mallopt.3:305
4105 msgid ""
4106 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4107 "of system calls (when the parameter is set low)  and wasting unused memory "
4108 "at the top of the heap (when the parameter is set high)."
4109 msgstr ""
4110
4111 #. type: SS
4112 #: build/C/man3/mallopt.3:305
4113 #, no-wrap
4114 msgid "Environment variables"
4115 msgstr "環境変数"
4116
4117 #. type: Plain text
4118 #: build/C/man3/mallopt.3:320
4119 msgid ""
4120 "A number of environment variables can be defined to modify some of the same "
4121 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4122 "advantage that the source code of the program need not be changed.  To be "
4123 "effective, these variables must be defined before the first call to a memory-"
4124 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4125 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4126 "these variables are ignored in set-user-ID and set-group-ID programs."
4127 msgstr ""
4128
4129 #. type: Plain text
4130 #: build/C/man3/mallopt.3:323
4131 msgid ""
4132 "The environment variables are as follows (note the trailing underscore at "
4133 "the end of the name of each variable):"
4134 msgstr ""
4135
4136 #. type: TP
4137 #: build/C/man3/mallopt.3:323
4138 #, no-wrap
4139 msgid "B<MALLOC_CHECK_>"
4140 msgstr "B<MALLOC_CHECK_>"
4141
4142 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4143 #.  when MALLOC_CHECK_ was set.
4144 #. type: Plain text
4145 #: build/C/man3/mallopt.3:340
4146 msgid ""
4147 "This environment variable controls the same parameter as B<mallopt>()  "
4148 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4149 "special implementation of the memory-allocation functions is used.  (This is "
4150 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4151 "performs additional error checking, but is slower than the standard set of "
4152 "memory-allocation functions.  (This implementation does not detect all "
4153 "possible errors; memory leaks can still occur.)"
4154 msgstr ""
4155
4156 #. type: Plain text
4157 #: build/C/man3/mallopt.3:345
4158 msgid ""
4159 "The value assigned to this environment variable should be a single digit, "
4160 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4161 "the initial digit are ignored."
4162 msgstr ""
4163
4164 #. type: Plain text
4165 #: build/C/man3/mallopt.3:354
4166 msgid ""
4167 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4168 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4169 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4170 "also has an effect for set-user-ID and set-group-ID programs."
4171 msgstr ""
4172
4173 #. type: TP
4174 #: build/C/man3/mallopt.3:354
4175 #, no-wrap
4176 msgid "B<MALLOC_MMAP_MAX_>"
4177 msgstr "B<MALLOC_MMAP_MAX_>"
4178
4179 #. type: Plain text
4180 #: build/C/man3/mallopt.3:359
4181 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4182 msgstr ""
4183
4184 #. type: TP
4185 #: build/C/man3/mallopt.3:359
4186 #, no-wrap
4187 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4188 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4189
4190 #. type: Plain text
4191 #: build/C/man3/mallopt.3:364
4192 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4193 msgstr ""
4194
4195 #. type: TP
4196 #: build/C/man3/mallopt.3:364
4197 #, no-wrap
4198 msgid "B<MALLOC_PERTURB_>"
4199 msgstr "B<MALLOC_PERTURB_>"
4200
4201 #. type: Plain text
4202 #: build/C/man3/mallopt.3:369
4203 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4204 msgstr ""
4205
4206 #. type: TP
4207 #: build/C/man3/mallopt.3:369
4208 #, no-wrap
4209 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4210 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4211
4212 #. type: Plain text
4213 #: build/C/man3/mallopt.3:374
4214 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4215 msgstr ""
4216
4217 #. type: TP
4218 #: build/C/man3/mallopt.3:374
4219 #, no-wrap
4220 msgid "B<MALLOC_TOP_PAD_>"
4221 msgstr "B<MALLOC_TOP_PAD_>"
4222
4223 #. type: Plain text
4224 #: build/C/man3/mallopt.3:379
4225 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man3/mallopt.3:384
4230 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4231 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4232
4233 #.  .SH VERSIONS
4234 #.  Available already in glibc 2.0, possibly earlier
4235 #. type: Plain text
4236 #: build/C/man3/mallopt.3:392
4237 msgid "On error, I<errno> is I<not> set."
4238 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4239
4240 #.  .SH NOTES
4241 #. type: Plain text
4242 #: build/C/man3/mallopt.3:406
4243 msgid ""
4244 "This function is not specified by POSIX or the C standards.  A similar "
4245 "function exists on many System V derivatives, but the range of values for "
4246 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4247 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4248 "implemented in glibc."
4249 msgstr ""
4250
4251 #. type: Plain text
4252 #: build/C/man3/mallopt.3:410
4253 msgid "Specifying an invalid value for I<param> does not generate an error."
4254 msgstr ""
4255
4256 #.  FIXME . This looks buggy:
4257 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4258 #.  malloc requests are rounded up:
4259 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4260 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4261 #. type: Plain text
4262 #: build/C/man3/mallopt.3:418
4263 msgid ""
4264 "A calculation error within the glibc implementation means that a call of the "
4265 "form:"
4266 msgstr ""
4267
4268 #. type: Plain text
4269 #: build/C/man3/mallopt.3:421
4270 #, no-wrap
4271 msgid "    mallopt(M_MXFAST, n)\n"
4272 msgstr "    mallopt(M_MXFAST, n)\n"
4273
4274 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4275 #. type: Plain text
4276 #: build/C/man3/mallopt.3:433
4277 msgid ""
4278 "does not result in fastbins being employed for all allocations of size up to "
4279 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4280 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4281 "integer."
4282 msgstr ""
4283
4284 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4285 #. type: Plain text
4286 #: build/C/man3/mallopt.3:454
4287 msgid ""
4288 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4289 "of allocated memory are initialized to the complement of the byte in "
4290 "I<value>, and when that memory is freed, the bytes of the region are "
4291 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4292 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4293 "precisely the block of memory being freed by the call I<free(p)>, the block "
4294 "starting at I<p+sizeof(size_t)> is initialized."
4295 msgstr ""
4296
4297 #. type: Plain text
4298 #: build/C/man3/mallopt.3:463
4299 msgid ""
4300 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4301 "is supplied with an (integer) command-line argument, then that argument is "
4302 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4303 "block of memory, and frees it twice (an error)."
4304 msgstr ""
4305
4306 #. type: Plain text
4307 #: build/C/man3/mallopt.3:467
4308 msgid ""
4309 "The following shell session shows what happens when we run this program "
4310 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4311 msgstr ""
4312
4313 #. type: Plain text
4314 #: build/C/man3/mallopt.3:487
4315 #, no-wrap
4316 msgid ""
4317 "$ B<./a.out>\n"
4318 "main(): returned from first free() call\n"
4319 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4320 "======= Backtrace: =========\n"
4321 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4322 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4323 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4324 "\\&./a.out[0x80485db]\n"
4325 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4326 "\\&./a.out[0x8048471]\n"
4327 "======= Memory map: ========\n"
4328 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4329 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4330 "[some lines omitted]\n"
4331 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4332 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4333 "Aborted (core dumped)\n"
4334 msgstr ""
4335 "$ B<./a.out>\n"
4336 "main(): returned from first free() call\n"
4337 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4338 "======= Backtrace: =========\n"
4339 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4340 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4341 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4342 "\\&./a.out[0x80485db]\n"
4343 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4344 "\\&./a.out[0x8048471]\n"
4345 "======= Memory map: ========\n"
4346 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4347 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4348 "[some lines omitted]\n"
4349 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4350 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4351 "Aborted (core dumped)\n"
4352
4353 #. type: Plain text
4354 #: build/C/man3/mallopt.3:492
4355 msgid ""
4356 "The following runs show the results when employing other values for "
4357 "B<M_CHECK_ACTION>:"
4358 msgstr ""
4359
4360 #. type: Plain text
4361 #: build/C/man3/mallopt.3:505
4362 #, no-wrap
4363 msgid ""
4364 "$ B<./a.out 1>             # Diagnose error and continue\n"
4365 "main(): returned from first free() call\n"
4366 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4367 "main(): returned from second free() call\n"
4368 "$ B<./a.out 2>             # Abort without error message\n"
4369 "main(): returned from first free() call\n"
4370 "Aborted (core dumped)\n"
4371 "$ B<./a.out 0>             # Ignore error and continue\n"
4372 "main(): returned from first free() call\n"
4373 "main(): returned from second free() call\n"
4374 msgstr ""
4375 "$ B<./a.out 1>             # Diagnose error and continue\n"
4376 "main(): returned from first free() call\n"
4377 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4378 "main(): returned from second free() call\n"
4379 "$ B<./a.out 2>             # Abort without error message\n"
4380 "main(): returned from first free() call\n"
4381 "Aborted (core dumped)\n"
4382 "$ B<./a.out 0>             # Ignore error and continue\n"
4383 "main(): returned from first free() call\n"
4384 "main(): returned from second free() call\n"
4385
4386 #. type: Plain text
4387 #: build/C/man3/mallopt.3:511
4388 msgid ""
4389 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4390 "environment variable:"
4391 msgstr ""
4392
4393 #. type: Plain text
4394 #: build/C/man3/mallopt.3:518
4395 #, no-wrap
4396 msgid ""
4397 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4398 "main(): returned from first free() call\n"
4399 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4400 "main(): returned from second free() call\n"
4401 msgstr ""
4402 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4403 "main(): returned from first free() call\n"
4404 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4405 "main(): returned from second free() call\n"
4406
4407 #. type: Plain text
4408 #: build/C/man3/mallopt.3:526
4409 #, no-wrap
4410 msgid ""
4411 "#include E<lt>malloc.hE<gt>\n"
4412 "#include E<lt>stdio.hE<gt>\n"
4413 "#include E<lt>stdlib.hE<gt>\n"
4414 msgstr ""
4415 "#include E<lt>malloc.hE<gt>\n"
4416 "#include E<lt>stdio.hE<gt>\n"
4417 "#include E<lt>stdlib.hE<gt>\n"
4418
4419 #. type: Plain text
4420 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4421 #, no-wrap
4422 msgid ""
4423 "int\n"
4424 "main(int argc, char *argv[])\n"
4425 "{\n"
4426 "    char *p;\n"
4427 msgstr ""
4428 "int\n"
4429 "main(int argc, char *argv[])\n"
4430 "{\n"
4431 "    char *p;\n"
4432
4433 #. type: Plain text
4434 #: build/C/man3/mallopt.3:538
4435 #, no-wrap
4436 msgid ""
4437 "    if (argc E<gt> 1) {\n"
4438 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4439 "            fprintf(stderr, \"mallopt() failed\");\n"
4440 "            exit(EXIT_FAILURE);\n"
4441 "        }\n"
4442 "    }\n"
4443 msgstr ""
4444 "    if (argc E<gt> 1) {\n"
4445 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4446 "            fprintf(stderr, \"mallopt() failed\");\n"
4447 "            exit(EXIT_FAILURE);\n"
4448 "        }\n"
4449 "    }\n"
4450
4451 #. type: Plain text
4452 #: build/C/man3/mallopt.3:544
4453 #, no-wrap
4454 msgid ""
4455 "    p = malloc(1000);\n"
4456 "    if (p == NULL) {\n"
4457 "        fprintf(stderr, \"malloc() failed\");\n"
4458 "        exit(EXIT_FAILURE);\n"
4459 "    }\n"
4460 msgstr ""
4461 "    p = malloc(1000);\n"
4462 "    if (p == NULL) {\n"
4463 "        fprintf(stderr, \"malloc() failed\");\n"
4464 "        exit(EXIT_FAILURE);\n"
4465 "    }\n"
4466
4467 #. type: Plain text
4468 #: build/C/man3/mallopt.3:547
4469 #, no-wrap
4470 msgid ""
4471 "    free(p);\n"
4472 "    printf(\"main(): returned from first free() call\\en\");\n"
4473 msgstr ""
4474 "    free(p);\n"
4475 "    printf(\"main(): returned from first free() call\\en\");\n"
4476
4477 #. type: Plain text
4478 #: build/C/man3/mallopt.3:550
4479 #, no-wrap
4480 msgid ""
4481 "    free(p);\n"
4482 "    printf(\"main(): returned from second free() call\\en\");\n"
4483 msgstr ""
4484 "    free(p);\n"
4485 "    printf(\"main(): returned from second free() call\\en\");\n"
4486
4487 #. type: Plain text
4488 #: build/C/man3/mallopt.3:568
4489 msgid ""
4490 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4491 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4492 "B<mtrace>(3), B<posix_memalign>(3)"
4493 msgstr ""
4494 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4495 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4496 "B<mtrace>(3), B<posix_memalign>(3)"
4497
4498 #. type: TH
4499 #: build/C/man3/mcheck.3:25
4500 #, no-wrap
4501 msgid "MCHECK"
4502 msgstr "MCHECK"
4503
4504 #. type: TH
4505 #: build/C/man3/mcheck.3:25
4506 #, no-wrap
4507 msgid "2014-01-11"
4508 msgstr "2014-01-11"
4509
4510 #. type: Plain text
4511 #: build/C/man3/mcheck.3:28
4512 msgid ""
4513 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4514 msgstr ""
4515
4516 #. type: Plain text
4517 #: build/C/man3/mcheck.3:31
4518 #, no-wrap
4519 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4520 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4521
4522 #. type: Plain text
4523 #: build/C/man3/mcheck.3:33
4524 #, no-wrap
4525 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4526 msgstr ""
4527
4528 #. type: Plain text
4529 #: build/C/man3/mcheck.3:35
4530 #, no-wrap
4531 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4532 msgstr ""
4533
4534 #. type: Plain text
4535 #: build/C/man3/mcheck.3:37
4536 #, no-wrap
4537 msgid "B<void mcheck_check_all(void);>\n"
4538 msgstr "B<void mcheck_check_all(void);>\n"
4539
4540 #. type: Plain text
4541 #: build/C/man3/mcheck.3:39
4542 #, no-wrap
4543 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4544 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4545
4546 #. type: Plain text
4547 #: build/C/man3/mcheck.3:51
4548 msgid ""
4549 "The B<mcheck>()  function installs a set of debugging hooks for the "
4550 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4551 "certain consistency checks to be performed on the state of the heap.  The "
4552 "checks can detect application errors such as freeing a block of memory more "
4553 "than once or corrupting the bookkeeping data structures that immediately "
4554 "precede a block of allocated memory."
4555 msgstr ""
4556
4557 #. type: Plain text
4558 #: build/C/man3/mcheck.3:63
4559 msgid ""
4560 "To be effective, the B<mcheck>()  function must be called before the first "
4561 "call to B<malloc>(3)  or a related function.  In cases where this is "
4562 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4563 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4564 "to a memory-allocation function."
4565 msgstr ""
4566
4567 #. type: Plain text
4568 #: build/C/man3/mcheck.3:71
4569 msgid ""
4570 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4571 "checks on all allocated blocks whenever one of the memory-allocation "
4572 "functions is called.  This can be very slow!"
4573 msgstr ""
4574
4575 #. type: Plain text
4576 #: build/C/man3/mcheck.3:78
4577 msgid ""
4578 "The B<mcheck_check_all>()  function causes an immediate check on all "
4579 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4580 "beforehand."
4581 msgstr ""
4582
4583 #. type: Plain text
4584 #: build/C/man3/mcheck.3:91
4585 msgid ""
4586 "If the system detects an inconsistency in the heap, the caller-supplied "
4587 "function pointed to by I<abortfunc> is invoked with a single argument "
4588 "argument, I<mstatus>, that indicates what type of inconsistency was "
4589 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4590 "message on I<stderr> and calls B<abort>(3)."
4591 msgstr ""
4592
4593 #. type: Plain text
4594 #: build/C/man3/mcheck.3:103
4595 msgid ""
4596 "The B<mprobe>()  function performs a consistency check on the block of "
4597 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4598 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4599 msgstr ""
4600
4601 #. type: Plain text
4602 #: build/C/man3/mcheck.3:111
4603 msgid ""
4604 "The following list describes the values returned by B<mprobe>()  or passed "
4605 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4606 msgstr ""
4607
4608 #. type: TP
4609 #: build/C/man3/mcheck.3:111
4610 #, no-wrap
4611 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4612 msgstr ""
4613
4614 #. type: Plain text
4615 #: build/C/man3/mcheck.3:116
4616 msgid ""
4617 "B<mcheck>()  was not called before the first memory allocation function was "
4618 "called.  Consistency checking is not possible."
4619 msgstr ""
4620
4621 #. type: TP
4622 #: build/C/man3/mcheck.3:116
4623 #, no-wrap
4624 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4625 msgstr ""
4626
4627 #. type: Plain text
4628 #: build/C/man3/mcheck.3:119
4629 msgid "No inconsistency detected."
4630 msgstr ""
4631
4632 #. type: TP
4633 #: build/C/man3/mcheck.3:119
4634 #, no-wrap
4635 msgid "B<MCHECK_HEAD>"
4636 msgstr "B<MCHECK_HEAD>"
4637
4638 #. type: Plain text
4639 #: build/C/man3/mcheck.3:122
4640 msgid "Memory preceding an allocated block was clobbered."
4641 msgstr ""
4642
4643 #. type: TP
4644 #: build/C/man3/mcheck.3:122
4645 #, no-wrap
4646 msgid "B<MCHECK_TAIL>"
4647 msgstr "B<MCHECK_TAIL>"
4648
4649 #. type: Plain text
4650 #: build/C/man3/mcheck.3:125
4651 msgid "Memory following an allocated block was clobbered."
4652 msgstr ""
4653
4654 #. type: TP
4655 #: build/C/man3/mcheck.3:125
4656 #, no-wrap
4657 msgid "B<MCHECK_FREE>"
4658 msgstr "B<MCHECK_FREE>"
4659
4660 #. type: Plain text
4661 #: build/C/man3/mcheck.3:129
4662 msgid "A block of memory was freed twice."
4663 msgstr ""
4664
4665 #. type: Plain text
4666 #: build/C/man3/mcheck.3:134
4667 msgid ""
4668 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4669 msgstr ""
4670
4671 #. type: Plain text
4672 #: build/C/man3/mcheck.3:145
4673 msgid ""
4674 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4675 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4676 "since at least glibc 2.0"
4677 msgstr ""
4678
4679 #.  But is MALLOC_CHECK_ slower?
4680 #. type: Plain text
4681 #: build/C/man3/mcheck.3:159
4682 msgid ""
4683 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4684 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4685 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4686 "application to be relinked."
4687 msgstr ""
4688
4689 #. type: Plain text
4690 #: build/C/man3/mcheck.3:165
4691 msgid ""
4692 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4693 "same block of memory twice.  The following shell session demonstrates what "
4694 "happens when running the program:"
4695 msgstr ""
4696
4697 #. type: Plain text
4698 #: build/C/man3/mcheck.3:170
4699 #, no-wrap
4700 msgid ""
4701 "$B< ./a.out>\n"
4702 "About to free\n"
4703 msgstr ""
4704
4705 #. type: Plain text
4706 #: build/C/man3/mcheck.3:174
4707 #, no-wrap
4708 msgid ""
4709 "About to free a second time\n"
4710 "block freed twice\n"
4711 "Aborted (core dumped)\n"
4712 msgstr ""
4713
4714 #. type: Plain text
4715 #: build/C/man3/mcheck.3:182
4716 #, no-wrap
4717 msgid ""
4718 "#include E<lt>stdlib.hE<gt>\n"
4719 "#include E<lt>stdio.hE<gt>\n"
4720 "#include E<lt>mcheck.hE<gt>\n"
4721 msgstr ""
4722 "#include E<lt>stdlib.hE<gt>\n"
4723 "#include E<lt>stdio.hE<gt>\n"
4724 "#include E<lt>mcheck.hE<gt>\n"
4725
4726 #. type: Plain text
4727 #: build/C/man3/mcheck.3:190
4728 #, no-wrap
4729 msgid ""
4730 "    if (mcheck(NULL) != 0) {\n"
4731 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4732 msgstr ""
4733
4734 #. type: Plain text
4735 #: build/C/man3/mcheck.3:193
4736 #, no-wrap
4737 msgid ""
4738 "        exit(EXIT_FAILURE);\n"
4739 "    }\n"
4740 msgstr ""
4741 "        exit(EXIT_FAILURE);\n"
4742 "    }\n"
4743
4744 #. type: Plain text
4745 #: build/C/man3/mcheck.3:195
4746 #, no-wrap
4747 msgid "    p = malloc(1000);\n"
4748 msgstr "    p = malloc(1000);\n"
4749
4750 #. type: Plain text
4751 #: build/C/man3/mcheck.3:200
4752 #, no-wrap
4753 msgid ""
4754 "    fprintf(stderr, \"About to free\\en\");\n"
4755 "    free(p);\n"
4756 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4757 "    free(p);\n"
4758 msgstr ""
4759
4760 #. type: Plain text
4761 #: build/C/man3/mcheck.3:208
4762 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4763 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4764
4765 #. type: TH
4766 #: build/C/man2/mlock.2:26
4767 #, no-wrap
4768 msgid "MLOCK"
4769 msgstr "MLOCK"
4770
4771 #. type: TH
4772 #: build/C/man2/mlock.2:26
4773 #, no-wrap
4774 msgid "2014-04-14"
4775 msgstr "2014-04-14"
4776
4777 #. type: Plain text
4778 #: build/C/man2/mlock.2:29
4779 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4780 msgstr "mlock - メモリのロックとロック解除を行う"
4781
4782 #. type: Plain text
4783 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4784 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4785 #, no-wrap
4786 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4787 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4788
4789 #. type: Plain text
4790 #: build/C/man2/mlock.2:35
4791 #, no-wrap
4792 msgid ""
4793 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4794 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4795 msgstr ""
4796 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4797 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4798
4799 #. type: Plain text
4800 #: build/C/man2/mlock.2:38
4801 #, no-wrap
4802 msgid ""
4803 "B<int mlockall(int >I<flags>B<);>\n"
4804 "B<int munlockall(void);>\n"
4805 msgstr ""
4806 "B<int mlockall(int >I<flags>B<);>\n"
4807 "B<int munlockall(void);>\n"
4808
4809 #. type: Plain text
4810 #: build/C/man2/mlock.2:54
4811 msgid ""
4812 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4813 "process's virtual address space into RAM, preventing that memory from being "
4814 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4815 "converse operation, respectively unlocking part or all of the calling "
4816 "process's virtual address space, so that pages in the specified virtual "
4817 "address range may once more to be swapped out if required by the kernel "
4818 "memory manager.  Memory locking and unlocking are performed in units of "
4819 "whole pages."
4820 msgstr ""
4821 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4822 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4823 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4824 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4825 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4826 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4827 "る。"
4828
4829 #. type: SS
4830 #: build/C/man2/mlock.2:54
4831 #, no-wrap
4832 msgid "mlock() and munlock()"
4833 msgstr "mlock() と munlock()"
4834
4835 #. type: Plain text
4836 #: build/C/man2/mlock.2:64
4837 msgid ""
4838 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4839 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4840 "address range are guaranteed to be resident in RAM when the call returns "
4841 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4842 msgstr ""
4843 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4844 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4845 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4846 "れるまで RAM に残り続けることが保証される。"
4847
4848 #. type: Plain text
4849 #: build/C/man2/mlock.2:73
4850 msgid ""
4851 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4852 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4853 "of the specified memory range can be moved to external swap space again by "
4854 "the kernel."
4855 msgstr ""
4856 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4857 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4858 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4859
4860 #. type: SS
4861 #: build/C/man2/mlock.2:73
4862 #, no-wrap
4863 msgid "mlockall() and munlockall()"
4864 msgstr "mlockall() と munlockall()"
4865
4866 #. type: Plain text
4867 #: build/C/man2/mlock.2:83
4868 msgid ""
4869 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4870 "process.  This includes the pages of the code, data and stack segment, as "
4871 "well as shared libraries, user space kernel data, shared memory, and memory-"
4872 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4873 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4874 "later unlocked."
4875 msgstr ""
4876 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4877 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4878 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4879 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4880 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4881 "残り続けることが保証される。"
4882
4883 #. type: Plain text
4884 #: build/C/man2/mlock.2:88
4885 msgid ""
4886 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4887 "following constants:"
4888 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4889
4890 #. type: TP
4891 #: build/C/man2/mlock.2:88
4892 #, no-wrap
4893 msgid "B<MCL_CURRENT>"
4894 msgstr "B<MCL_CURRENT>"
4895
4896 #. type: Plain text
4897 #: build/C/man2/mlock.2:92
4898 msgid ""
4899 "Lock all pages which are currently mapped into the address space of the "
4900 "process."
4901 msgstr ""
4902 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4903
4904 #. type: TP
4905 #: build/C/man2/mlock.2:92
4906 #, no-wrap
4907 msgid "B<MCL_FUTURE>"
4908 msgstr "B<MCL_FUTURE>"
4909
4910 #. type: Plain text
4911 #: build/C/man2/mlock.2:99
4912 msgid ""
4913 "Lock all pages which will become mapped into the address space of the "
4914 "process in the future.  These could be for instance new pages required by a "
4915 "growing heap and stack as well as new memory-mapped files or shared memory "
4916 "regions."
4917 msgstr ""
4918 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4919 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4920 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4921
4922 #. type: Plain text
4923 #: build/C/man2/mlock.2:112
4924 msgid ""
4925 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4926 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4927 "of locked bytes to exceed the permitted maximum (see below).  In the same "
4928 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4929 "expansion and deliver a B<SIGSEGV> signal to the process."
4930 msgstr ""
4931 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4932 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4933 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4934 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4935 "スに送る。"
4936
4937 #. type: Plain text
4938 #: build/C/man2/mlock.2:116
4939 msgid ""
4940 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4941 "calling process."
4942 msgstr ""
4943 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4944 "全てのページをロック解除する。"
4945
4946 #. type: Plain text
4947 #: build/C/man2/mlock.2:122
4948 msgid ""
4949 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4950 "is set appropriately, and no changes are made to any locks in the address "
4951 "space of the process."
4952 msgstr ""
4953 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4954 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4955 "れない。"
4956
4957 #. type: Plain text
4958 #: build/C/man2/mlock.2:131
4959 msgid ""
4960 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4961 "resource limit, but tried to lock more memory than the limit permitted.  "
4962 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4963 msgstr ""
4964 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4965 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4966 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4967
4968 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4969 #.  take into account whether the to-be-locked range overlaps with
4970 #.  already locked pages.  Thus, suppose we allocate
4971 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4972 #.  mlock(), and then lock the *same* page range a second time.
4973 #.  In the case, the second mlock() call will fail, since the check
4974 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4975 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4976 #. type: Plain text
4977 #: build/C/man2/mlock.2:143
4978 msgid ""
4979 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4980 "RAM."
4981 msgstr ""
4982 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4983
4984 #. SVr4 documents an additional EAGAIN error code.
4985 #. type: Plain text
4986 #: build/C/man2/mlock.2:149
4987 msgid ""
4988 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4989 "perform the requested operation."
4990 msgstr ""
4991 "呼び出し側が特権を持っていないが、\n"
4992 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4993
4994 #. type: Plain text
4995 #: build/C/man2/mlock.2:154
4996 msgid "For B<mlock>()  and B<munlock>():"
4997 msgstr "B<mlock>()  と B<munlock>()  用として:"
4998
4999 #. type: Plain text
5000 #: build/C/man2/mlock.2:157
5001 msgid "Some or all of the specified address range could not be locked."
5002 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5003
5004 #. type: Plain text
5005 #: build/C/man2/mlock.2:164
5006 msgid ""
5007 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5008 "addition may have resulted in an overflow)."
5009 msgstr ""
5010 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5011 "(例えば、加算でオーバーフローが発生したなど)。"
5012
5013 #. type: Plain text
5014 #: build/C/man2/mlock.2:169
5015 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5016 msgstr ""
5017 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5018
5019 #. type: Plain text
5020 #: build/C/man2/mlock.2:173
5021 msgid ""
5022 "Some of the specified address range does not correspond to mapped pages in "
5023 "the address space of the process."
5024 msgstr ""
5025 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5026 "い。"
5027
5028 #. type: Plain text
5029 #: build/C/man2/mlock.2:176
5030 msgid "For B<mlockall>():"
5031 msgstr "B<mlockall>()  用として:"
5032
5033 #. type: Plain text
5034 #: build/C/man2/mlock.2:179
5035 msgid "Unknown I<flags> were specified."
5036 msgstr "未知の I<flags> が指定された。"
5037
5038 #. type: Plain text
5039 #: build/C/man2/mlock.2:182
5040 msgid "For B<munlockall>():"
5041 msgstr "B<munlockall>()  用として:"
5042
5043 #. type: Plain text
5044 #: build/C/man2/mlock.2:186
5045 msgid ""
5046 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5047 msgstr ""
5048 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5049
5050 #. type: Plain text
5051 #: build/C/man2/mlock.2:188
5052 msgid "POSIX.1-2001, SVr4."
5053 msgstr "POSIX.1-2001, SVr4."
5054
5055 #. type: SH
5056 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
5057 #, no-wrap
5058 msgid "AVAILABILITY"
5059 msgstr "可用性"
5060
5061 #. type: Plain text
5062 #: build/C/man2/mlock.2:200
5063 msgid ""
5064 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5065 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5066 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5067 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5068 msgstr ""
5069 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5070 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5071 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5072 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5073 "び出すことで決定できる。"
5074
5075 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5076 #.  -1: unavailable, 0: ask using sysconf().
5077 #.  glibc defines it to 1.
5078 #. type: Plain text
5079 #: build/C/man2/mlock.2:213
5080 msgid ""
5081 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5082 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5083 "than 0.  (See also B<sysconf>(3).)"
5084 msgstr ""
5085 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5086 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5087 "(B<sysconf>(3)  も参照のこと)。"
5088
5089 #. type: Plain text
5090 #: build/C/man2/mlock.2:231
5091 msgid ""
5092 "Memory locking has two main applications: real-time algorithms and high-"
5093 "security data processing.  Real-time applications require deterministic "
5094 "timing, and, like scheduling, paging is one major cause of unexpected "
5095 "program execution delays.  Real-time applications will usually also switch "
5096 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5097 "security software often handles critical bytes like passwords or secret keys "
5098 "as data structures.  As a result of paging, these secrets could be "
5099 "transferred onto a persistent swap store medium, where they might be "
5100 "accessible to the enemy long after the security software has erased the "
5101 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5102 "laptops and some desktop computers will save a copy of the system's RAM to "
5103 "disk, regardless of memory locks.)"
5104 msgstr ""
5105 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5106 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5107 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5108 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5109 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5110 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5111 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5112 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
5113 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
5114 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
5115 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
5116 "存することに注意)。"
5117
5118 #. type: Plain text
5119 #: build/C/man2/mlock.2:244
5120 msgid ""
5121 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5122 "faults should reserve enough locked stack pages before entering the time-"
5123 "critical section, so that no page fault can be caused by function calls.  "
5124 "This can be achieved by calling a function that allocates a sufficiently "
5125 "large automatic variable (an array) and writes to the memory occupied by "
5126 "this array in order to touch these stack pages.  This way, enough pages will "
5127 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5128 "that not even copy-on-write page faults can occur in the critical section."
5129 msgstr ""
5130 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5131 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5132 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5133 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5134 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
5135 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5136 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5137 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5138 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5139
5140 #. type: Plain text
5141 #: build/C/man2/mlock.2:257
5142 msgid ""
5143 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5144 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5145 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5146 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5147 msgstr ""
5148 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5149 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5150 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5151 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5152
5153 #. type: Plain text
5154 #: build/C/man2/mlock.2:261
5155 msgid ""
5156 "The memory lock on an address range is automatically removed if the address "
5157 "range is unmapped via B<munmap>(2)."
5158 msgstr ""
5159 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5160 "よってアンマップされた場合は削除される。"
5161
5162 #. type: Plain text
5163 #: build/C/man2/mlock.2:274
5164 msgid ""
5165 "Memory locks do not stack, that is, pages which have been locked several "
5166 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5167 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5168 "Pages which are mapped to several locations or by several processes stay "
5169 "locked into RAM as long as they are locked at least at one location or by at "
5170 "least one process."
5171 msgstr ""
5172 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5173 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5174 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5175 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5176 "のプロセスでロックされている限りは RAM に残り続ける。"
5177
5178 #. type: Plain text
5179 #: build/C/man2/mlock.2:285
5180 msgid ""
5181 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5182 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5183 "implementation to require that I<addr> is page aligned, so portable "
5184 "applications should ensure this."
5185 msgstr ""
5186 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5187 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5188 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5189 "ケーションではきちんと境界に合わせた方が良い。"
5190
5191 #. type: Plain text
5192 #: build/C/man2/mlock.2:298
5193 msgid ""
5194 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5195 "many kilobytes of memory the process with ID I<PID> has locked using "
5196 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5197 msgstr ""
5198 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5199 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5200 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5201 "表示される。"
5202
5203 #. type: SS
5204 #: build/C/man2/mlock.2:298
5205 #, no-wrap
5206 msgid "Limits and permissions"
5207 msgstr "制限と権限"
5208
5209 #. type: Plain text
5210 #: build/C/man2/mlock.2:305
5211 msgid ""
5212 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5213 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5214 "defines a limit on how much memory the process may lock."
5215 msgstr ""
5216 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5217 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5218 "できるかの制限を定義する。"
5219
5220 #. type: Plain text
5221 #: build/C/man2/mlock.2:311
5222 msgid ""
5223 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5224 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5225 "instead defines a limit on how much memory an unprivileged process may lock."
5226 msgstr ""
5227 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5228 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5229 "クできるメモリ量の制限を定義する。"
5230
5231 #. type: Plain text
5232 #: build/C/man2/mlock.2:319
5233 msgid ""
5234 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5235 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5236 "was rectified in kernel 2.4.18."
5237 msgstr ""
5238 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5239 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5240 "ネル 2.4.18 で修正された。"
5241
5242 #.  See the following LKML thread:
5243 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5244 #.  "Rationale for RLIMIT_MEMLOCK"
5245 #.  23 Jan 2006
5246 #. type: Plain text
5247 #: build/C/man2/mlock.2:336
5248 msgid ""
5249 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5250 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5251 "example, setting its effective UID to a nonzero value), then subsequent "
5252 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5253 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5254 msgstr ""
5255 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5256 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5257 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5258 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5259 "B<brk>(2))  は失敗する。"
5260
5261 #. type: Plain text
5262 #: build/C/man2/mlock.2:343
5263 msgid ""
5264 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5265 "B<capabilities>(7)"
5266 msgstr ""
5267 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5268 "B<capabilities>(7)"
5269
5270 #. type: TH
5271 #: build/C/man2/mmap.2:40
5272 #, no-wrap
5273 msgid "MMAP"
5274 msgstr "MMAP"
5275
5276 #. type: TH
5277 #: build/C/man2/mmap.2:40 build/C/man2/sync_file_range.2:30
5278 #, no-wrap
5279 msgid "2014-08-19"
5280 msgstr "2014-08-19"
5281
5282 #. type: Plain text
5283 #: build/C/man2/mmap.2:43
5284 msgid "mmap, munmap - map or unmap files or devices into memory"
5285 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5286
5287 #. type: Plain text
5288 #: build/C/man2/mmap.2:51
5289 #, no-wrap
5290 msgid ""
5291 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5292 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5293 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5294 msgstr ""
5295 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5296 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5297 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5298
5299 #. type: Plain text
5300 #: build/C/man2/mmap.2:54
5301 msgid "See NOTES for information on feature test macro requirements."
5302 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5303
5304 #. type: Plain text
5305 #: build/C/man2/mmap.2:63
5306 msgid ""
5307 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5308 "process.  The starting address for the new mapping is specified in I<addr>.  "
5309 "The I<length> argument specifies the length of the mapping."
5310 msgstr ""
5311 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5312 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5313 "は I<length> 引き数で指定される。"
5314
5315 #.  Before Linux 2.6.24, the address was rounded up to the next page
5316 #.  boundary; since 2.6.24, it is rounded down!
5317 #. type: Plain text
5318 #: build/C/man2/mmap.2:77
5319 msgid ""
5320 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5321 "the mapping; this is the most portable method of creating a new mapping.  If "
5322 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5323 "the mapping; on Linux, the mapping will be created at a nearby page "
5324 "boundary.  The address of the new mapping is returned as the result of the "
5325 "call."
5326 msgstr ""
5327 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5328 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5329 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5330 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5331 "ングのアドレスは、呼び出しの返り値として返される。"
5332
5333 #. type: Plain text
5334 #: build/C/man2/mmap.2:89
5335 msgid ""
5336 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5337 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5338 "offset I<offset> in the file (or other object) referred to by the file "
5339 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5340 "by I<sysconf(_SC_PAGE_SIZE)>."
5341 msgstr ""
5342 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5343 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5344 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5345 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5346 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5347
5348 #. type: Plain text
5349 #: build/C/man2/mmap.2:97
5350 msgid ""
5351 "The I<prot> argument describes the desired memory protection of the mapping "
5352 "(and must not conflict with the open mode of the file).  It is either "
5353 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5354 msgstr ""
5355 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5356 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5357 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5358
5359 #. type: TP
5360 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5361 #, no-wrap
5362 msgid "B<PROT_EXEC>"
5363 msgstr "B<PROT_EXEC>"
5364
5365 #. type: Plain text
5366 #: build/C/man2/mmap.2:100
5367 msgid "Pages may be executed."
5368 msgstr "ページは実行可能である。"
5369
5370 #. type: TP
5371 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5372 #, no-wrap
5373 msgid "B<PROT_READ>"
5374 msgstr "B<PROT_READ>"
5375
5376 #. type: Plain text
5377 #: build/C/man2/mmap.2:103
5378 msgid "Pages may be read."
5379 msgstr "ページは読み込み可能である。"
5380
5381 #. type: TP
5382 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5383 #, no-wrap
5384 msgid "B<PROT_WRITE>"
5385 msgstr "B<PROT_WRITE>"
5386
5387 #. type: Plain text
5388 #: build/C/man2/mmap.2:106
5389 msgid "Pages may be written."
5390 msgstr "ページに書き込み可能である。"
5391
5392 #. type: TP
5393 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5394 #, no-wrap
5395 msgid "B<PROT_NONE>"
5396 msgstr "B<PROT_NONE>"
5397
5398 #. type: Plain text
5399 #: build/C/man2/mmap.2:109
5400 msgid "Pages may not be accessed."
5401 msgstr "ページにはアクセスできない。"
5402
5403 #. type: Plain text
5404 #: build/C/man2/mmap.2:118
5405 msgid ""
5406 "The I<flags> argument determines whether updates to the mapping are visible "
5407 "to other processes mapping the same region, and whether updates are carried "
5408 "through to the underlying file.  This behavior is determined by including "
5409 "exactly one of the following values in I<flags>:"
5410 msgstr ""
5411 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5412 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5413 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5414 "I<flags> に含めることで指定する。"
5415
5416 #. type: TP
5417 #: build/C/man2/mmap.2:118
5418 #, no-wrap
5419 msgid "B<MAP_SHARED>"
5420 msgstr "B<MAP_SHARED>"
5421
5422 #. type: Plain text
5423 #: build/C/man2/mmap.2:128
5424 msgid ""
5425 "Share this mapping.  Updates to the mapping are visible to other processes "
5426 "that map this file, and are carried through to the underlying file.  The "
5427 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5428 "called."
5429 msgstr ""
5430 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5431 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5432 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5433 "るまで行われないこともある。"
5434
5435 #. type: TP
5436 #: build/C/man2/mmap.2:128
5437 #, no-wrap
5438 msgid "B<MAP_PRIVATE>"
5439 msgstr "B<MAP_PRIVATE>"
5440
5441 #. type: Plain text
5442 #: build/C/man2/mmap.2:137
5443 msgid ""
5444 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5445 "visible to other processes mapping the same file, and are not carried "
5446 "through to the underlying file.  It is unspecified whether changes made to "
5447 "the file after the B<mmap>()  call are visible in the mapped region."
5448 msgstr ""
5449 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5450 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5451 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5452 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5453 "かは規定されていない。"
5454
5455 #. type: Plain text
5456 #: build/C/man2/mmap.2:139
5457 msgid "Both of these flags are described in POSIX.1-2001."
5458 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5459
5460 #. type: Plain text
5461 #: build/C/man2/mmap.2:142
5462 msgid ""
5463 "In addition, zero or more of the following values can be ORed in I<flags>:"
5464 msgstr ""
5465 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5466 "ことができる。"
5467
5468 #. type: TP
5469 #: build/C/man2/mmap.2:142
5470 #, no-wrap
5471 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5472 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5473
5474 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5475 #. type: Plain text
5476 #: build/C/man2/mmap.2:158
5477 msgid ""
5478 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5479 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5480 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5481 "as to improve context-switch performance on some early 64-bit processors.  "
5482 "Modern x86-64 processors no longer have this performance problem, so use of "
5483 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5484 "ignored when B<MAP_FIXED> is set."
5485 msgstr ""
5486 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5487 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5488 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5489 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5490 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5491 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5492 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5493 "グは無視される。"
5494
5495 #. type: TP
5496 #: build/C/man2/mmap.2:158
5497 #, no-wrap
5498 msgid "B<MAP_ANON>"
5499 msgstr "B<MAP_ANON>"
5500
5501 #. type: Plain text
5502 #: build/C/man2/mmap.2:163
5503 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5504 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5505
5506 #. type: TP
5507 #: build/C/man2/mmap.2:163
5508 #, no-wrap
5509 msgid "B<MAP_ANONYMOUS>"
5510 msgstr "B<MAP_ANONYMOUS>"
5511
5512 #. type: Plain text
5513 #: build/C/man2/mmap.2:185
5514 msgid ""
5515 "The mapping is not backed by any file; its contents are initialized to "
5516 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5517 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5518 "is specified, and portable applications should ensure this.  The use of "
5519 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5520 "only since kernel 2.4."
5521 msgstr ""
5522 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5523 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5524 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5525 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5526 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5527 "以降の Linux でのみサポートされている。"
5528
5529 #. type: TP
5530 #: build/C/man2/mmap.2:185
5531 #, no-wrap
5532 msgid "B<MAP_DENYWRITE>"
5533 msgstr "B<MAP_DENYWRITE>"
5534
5535 #.  Introduced in 1.1.36, removed in 1.3.24.
5536 #. type: Plain text
5537 #: build/C/man2/mmap.2:193
5538 msgid ""
5539 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5540 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5541 "denial-of-service attacks.)"
5542 msgstr ""
5543 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5544 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5545 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5546
5547 #. type: TP
5548 #: build/C/man2/mmap.2:193
5549 #, no-wrap
5550 msgid "B<MAP_EXECUTABLE>"
5551 msgstr "B<MAP_EXECUTABLE>"
5552
5553 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5554 #.  (Long ago, it signaled that the underlying file is an executable.
5555 #.  However, that information was not really used anywhere.)
5556 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5557 #.  MAP_DENYWRITE?
5558 #. type: Plain text
5559 #: build/C/man2/mmap.2:201
5560 msgid "This flag is ignored."
5561 msgstr "このフラグは無視される。"
5562
5563 #. type: TP
5564 #: build/C/man2/mmap.2:201
5565 #, no-wrap
5566 msgid "B<MAP_FILE>"
5567 msgstr "B<MAP_FILE>"
5568
5569 #.  On some systems, this was required as the opposite of
5570 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5571 #. type: Plain text
5572 #: build/C/man2/mmap.2:207
5573 msgid "Compatibility flag.  Ignored."
5574 msgstr "互換性のためのフラグ。無視される。"
5575
5576 #. type: TP
5577 #: build/C/man2/mmap.2:207
5578 #, no-wrap
5579 msgid "B<MAP_FIXED>"
5580 msgstr "B<MAP_FIXED>"
5581
5582 #. type: Plain text
5583 #: build/C/man2/mmap.2:225
5584 msgid ""
5585 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5586 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5587 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5588 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5589 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5590 "requiring a fixed address for a mapping is less portable, the use of this "
5591 "option is discouraged."
5592 msgstr ""
5593 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5594 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5595 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5596 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5597 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5598 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5599 "を推奨する。"
5600
5601 #. type: TP
5602 #: build/C/man2/mmap.2:225
5603 #, no-wrap
5604 msgid "B<MAP_GROWSDOWN>"
5605 msgstr "B<MAP_GROWSDOWN>"
5606
5607 #. type: Plain text
5608 #: build/C/man2/mmap.2:230
5609 msgid ""
5610 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5611 "mapping should extend downward in memory."
5612 msgstr ""
5613 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5614 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5615 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5616
5617 #. type: TP
5618 #: build/C/man2/mmap.2:230
5619 #, no-wrap
5620 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5621 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5622
5623 #. type: Plain text
5624 #: build/C/man2/mmap.2:236
5625 msgid ""
5626 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5627 "I<Documentation/vm/hugetlbpage.txt> for further information."
5628 msgstr ""
5629 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5630 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5631
5632 #. type: TP
5633 #: build/C/man2/mmap.2:236
5634 #, no-wrap
5635 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5636 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5637
5638 #.  If set, the mapped pages will not be swapped out.
5639 #. type: Plain text
5640 #: build/C/man2/mmap.2:242
5641 msgid ""
5642 "Lock the pages of the mapped region into memory in the manner of "
5643 "B<mlock>(2).  This flag is ignored in older kernels."
5644 msgstr ""
5645 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5646 "前のカーネルでは、このフラグは無視される。"
5647
5648 #. type: TP
5649 #: build/C/man2/mmap.2:242
5650 #, no-wrap
5651 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5652 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5653
5654 #. type: Plain text
5655 #: build/C/man2/mmap.2:257
5656 msgid ""
5657 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5658 "ahead: create page tables entries only for pages that are already present in "
5659 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5660 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5661 "reimplemented."
5662 msgstr ""
5663 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5664 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5665 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5666 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5667 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5668
5669 #. type: TP
5670 #: build/C/man2/mmap.2:257
5671 #, no-wrap
5672 msgid "B<MAP_NORESERVE>"
5673 msgstr "B<MAP_NORESERVE>"
5674
5675 #. type: Plain text
5676 #: build/C/man2/mmap.2:272
5677 msgid ""
5678 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5679 "one has the guarantee that it is possible to modify the mapping.  When swap "
5680 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5681 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5682 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5683 "effect only for private writable mappings."
5684 msgstr ""
5685 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5686 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5687 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5688 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5689 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5690 "イベート・マッピングについてのみ効果があった。"
5691
5692 #. type: TP
5693 #: build/C/man2/mmap.2:272
5694 #, no-wrap
5695 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5696 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5697
5698 #. type: Plain text
5699 #: build/C/man2/mmap.2:279
5700 msgid ""
5701 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5702 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5703 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5704 "only since Linux 2.6.23."
5705 msgstr ""
5706 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5707 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5708 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5709 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5710 "されている。"
5711
5712 #. type: TP
5713 #: build/C/man2/mmap.2:279
5714 #, no-wrap
5715 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5716 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5717
5718 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5719 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5720 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5721 #.  "pthread_create() slow for many threads; also time to revisit 64b
5722 #.   context switch optimization?"
5723 #. type: Plain text
5724 #: build/C/man2/mmap.2:292
5725 msgid ""
5726 "Allocate the mapping at an address suitable for a process or thread stack.  "
5727 "This flag is currently a no-op, but is used in the glibc threading "
5728 "implementation so that if some architectures require special treatment for "
5729 "stack allocations, support can later be transparently implemented for glibc."
5730 msgstr ""
5731 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5732 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5733 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5734 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5735 "る。"
5736
5737 #. type: TP
5738 #: build/C/man2/mmap.2:292
5739 #, no-wrap
5740 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5741 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5742
5743 #. type: Plain text
5744 #: build/C/man2/mmap.2:302
5745 msgid ""
5746 "Don't clear anonymous pages.  This flag is intended to improve performance "
5747 "on embedded devices.  This flag is honored only if the kernel was configured "
5748 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5749 "implications, that option is normally enabled only on embedded devices (i."
5750 "e., devices where one has complete control of the contents of user memory)."
5751 msgstr ""
5752 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5753 "ス\n"
5754 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5755 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5756 "このフラグは効果を持つ。\n"
5757 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5758 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5759
5760 #. type: Plain text
5761 #: build/C/man2/mmap.2:310
5762 msgid ""
5763 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5764 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5765 "B<MAP_ANON>)."
5766 msgstr ""
5767 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5768 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5769 "B<MAP_ANON>)  もサポートされている。"
5770
5771 #. type: Plain text
5772 #: build/C/man2/mmap.2:317
5773 msgid ""
5774 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5775 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5776 msgstr ""
5777 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5778 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5779
5780 #. type: Plain text
5781 #: build/C/man2/mmap.2:323
5782 msgid ""
5783 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5784 "attributes."
5785 msgstr ""
5786 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5787
5788 #. type: Plain text
5789 #: build/C/man2/mmap.2:331
5790 msgid ""
5791 "A file is mapped in multiples of the page size.  For a file that is not a "
5792 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5793 "writes to that region are not written out to the file.  The effect of "
5794 "changing the size of the underlying file of a mapping on the pages that "
5795 "correspond to added or removed regions of the file is unspecified."
5796 msgstr ""
5797 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5798 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5799 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5800 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5801 "マップされたページに対してどのような影響があるかは規定されていない。"
5802
5803 #. type: SS
5804 #: build/C/man2/mmap.2:331
5805 #, no-wrap
5806 msgid "munmap()"
5807 msgstr "munmap()"
5808
5809 #. type: Plain text
5810 #: build/C/man2/mmap.2:341
5811 msgid ""
5812 "The B<munmap>()  system call deletes the mappings for the specified address "
5813 "range, and causes further references to addresses within the range to "
5814 "generate invalid memory references.  The region is also automatically "
5815 "unmapped when the process is terminated.  On the other hand, closing the "
5816 "file descriptor does not unmap the region."
5817 msgstr ""
5818 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5819 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5820 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5821 "はアンマップされない。"
5822
5823 #. type: Plain text
5824 #: build/C/man2/mmap.2:351
5825 msgid ""
5826 "The address I<addr> must be a multiple of the page size.  All pages "
5827 "containing a part of the indicated range are unmapped, and subsequent "
5828 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5829 "the indicated range does not contain any mapped pages."
5830 msgstr ""
5831 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5832 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5833 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5834 "ていない場合でも エラーにならない。"
5835
5836 #. type: SS
5837 #: build/C/man2/mmap.2:351
5838 #, no-wrap
5839 msgid "Timestamps changes for file-backed mappings"
5840 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5841
5842 #. type: Plain text
5843 #: build/C/man2/mmap.2:358
5844 msgid ""
5845 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5846 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5847 "the first reference to a mapped page will update the field if it has not "
5848 "been already."
5849 msgstr ""
5850 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5851 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5852 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5853 "ページへの最初の参照があった 際に更新される。"
5854
5855 #. type: Plain text
5856 #: build/C/man2/mmap.2:375
5857 msgid ""
5858 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5859 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5860 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5861 "one occurs."
5862 msgstr ""
5863 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5864 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5865 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5866 "B<msync>(2)  が呼ばれる前までに更新される。"
5867
5868 #. type: Plain text
5869 #: build/C/man2/mmap.2:392
5870 msgid ""
5871 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5872 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5873 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5874 "and I<errno> is set (probably to B<EINVAL>)."
5875 msgstr ""
5876 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5877 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5878 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5879 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5880
5881 #. type: TP
5882 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5883 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5884 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5885 #: build/C/man2/shmop.2:188
5886 #, no-wrap
5887 msgid "B<EACCES>"
5888 msgstr "B<EACCES>"
5889
5890 #. type: Plain text
5891 #: build/C/man2/mmap.2:411
5892 msgid ""
5893 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5894 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5895 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5896 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5897 msgstr ""
5898 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5899 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5900 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5901 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5902 "たが、ファイルは追加 (append) 専用である。"
5903
5904 #. type: Plain text
5905 #: build/C/man2/mmap.2:415
5906 msgid ""
5907 "The file has been locked, or too much memory has been locked (see "
5908 "B<setrlimit>(2))."
5909 msgstr ""
5910 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5911 "(B<setrlimit>(2)  を参照)。"
5912
5913 #. type: Plain text
5914 #: build/C/man2/mmap.2:421
5915 msgid ""
5916 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5917 msgstr ""
5918 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5919 "B<MAP_ANONYMOUS> がセットされていない)。"
5920
5921 #. type: Plain text
5922 #: build/C/man2/mmap.2:429
5923 msgid ""
5924 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5925 "not aligned on a page boundary)."
5926 msgstr ""
5927 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5928 "ジ境界にアラインメントされていない)。"
5929
5930 #. type: Plain text
5931 #: build/C/man2/mmap.2:434
5932 msgid "(since Linux 2.6.12)  I<length> was 0."
5933 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5934
5935 #. type: Plain text
5936 #: build/C/man2/mmap.2:442
5937 msgid ""
5938 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5939 "both of these values."
5940 msgstr ""
5941 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5942 "しくは その両方が含まれていた。"
5943
5944 #. type: TP
5945 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5946 #: build/C/man2/shmget.2:221
5947 #, no-wrap
5948 msgid "B<ENFILE>"
5949 msgstr "B<ENFILE>"
5950
5951 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5952 #. type: Plain text
5953 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5954 msgid "The system limit on the total number of open files has been reached."
5955 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5956
5957 #. type: Plain text
5958 #: build/C/man2/mmap.2:454
5959 msgid ""
5960 "The underlying filesystem of the specified file does not support memory "
5961 "mapping."
5962 msgstr ""
5963 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5964 "していない。"
5965
5966 #. type: Plain text
5967 #: build/C/man2/mmap.2:458
5968 msgid ""
5969 "No memory is available, or the process's maximum number of mappings would "
5970 "have been exceeded."
5971 msgstr ""
5972 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5973
5974 #.  (Since 2.4.25 / 2.6.0.)
5975 #. type: Plain text
5976 #: build/C/man2/mmap.2:467
5977 msgid ""
5978 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5979 "file on a filesystem that was mounted no-exec."
5980 msgstr ""
5981 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5982 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5983
5984 #. type: Plain text
5985 #: build/C/man2/mmap.2:473
5986 msgid ""
5987 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5988 "writing."
5989 msgstr ""
5990 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5991 "き込み用に開かれている。"
5992
5993 #. type: TP
5994 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
5995 #, no-wrap
5996 msgid "B<EOVERFLOW>"
5997 msgstr "B<EOVERFLOW>"
5998
5999 #. type: Plain text
6000 #: build/C/man2/mmap.2:485
6001 msgid ""
6002 "On 32-bit architecture together with the large file extension (i.e., using "
6003 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6004 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6005 msgstr ""
6006 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
6007 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6008 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6009 "しまう) 場合がある。"
6010
6011 #. type: Plain text
6012 #: build/C/man2/mmap.2:487
6013 msgid "Use of a mapped region can result in these signals:"
6014 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6015
6016 #. type: TP
6017 #: build/C/man2/mmap.2:487
6018 #, no-wrap
6019 msgid "B<SIGSEGV>"
6020 msgstr "B<SIGSEGV>"
6021
6022 #. type: Plain text
6023 #: build/C/man2/mmap.2:490
6024 msgid "Attempted write into a region mapped as read-only."
6025 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6026
6027 #. type: TP
6028 #: build/C/man2/mmap.2:490
6029 #, no-wrap
6030 msgid "B<SIGBUS>"
6031 msgstr "B<SIGBUS>"
6032
6033 #. type: Plain text
6034 #: build/C/man2/mmap.2:495
6035 msgid ""
6036 "Attempted access to a portion of the buffer that does not correspond to the "
6037 "file (for example, beyond the end of the file, including the case where "
6038 "another process has truncated the file)."
6039 msgstr ""
6040 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
6041 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
6042 "にアクセスしようとした。"
6043
6044 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6045 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6046 #. type: Plain text
6047 #: build/C/man2/mmap.2:499
6048 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6049 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6050
6051 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6052 #.  -1: unavailable, 0: ask using sysconf().
6053 #.  glibc defines it to 1.
6054 #. type: Plain text
6055 #: build/C/man2/mmap.2:513
6056 msgid ""
6057 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>()  are "
6058 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6059 "value greater than 0.  (See also B<sysconf>(3).)"
6060 msgstr ""
6061 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6062 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6063 "(B<sysconf>(3)  も参照のこと)。"
6064
6065 #. type: Plain text
6066 #: build/C/man2/mmap.2:526
6067 msgid ""
6068 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6069 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6070 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6071 "they intend to execute code in the new mapping."
6072 msgstr ""
6073 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
6074 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
6075 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
6076 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
6077 "常に B<PROT_EXEC> をセットすべきである。"
6078
6079 #. type: Plain text
6080 #: build/C/man2/mmap.2:541
6081 msgid ""
6082 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6083 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6084 "address for the mapping; the address is chosen so as not to conflict with "
6085 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6086 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6087 msgstr ""
6088 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6089 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6090 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6091 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6092 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6093
6094 #. type: Plain text
6095 #: build/C/man2/mmap.2:571
6096 msgid ""
6097 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6098 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6099 "requiring that macro specifically would have been more logical, since these "
6100 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6101 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6102 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6103 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6104 "B<MAP_STACK>."
6105 msgstr ""
6106 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6107 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6108 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6109 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6110 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6111 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6112 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6113 "B<MAP_STACK> である。"
6114
6115 #. type: SS
6116 #: build/C/man2/mmap.2:571
6117 #, no-wrap
6118 msgid "C library/kernel ABI differences"
6119 msgstr "C ライブラリとカーネル ABI の違い"
6120
6121 #.  Since around glibc 2.1/2.2, depending on the platform.
6122 #. type: Plain text
6123 #: build/C/man2/mmap.2:586
6124 msgid ""
6125 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6126 "function.  Originally, this function invoked a system call of the same "
6127 "name.  Since kernel 2.4, that system call has been superseded by "
6128 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6129 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6130 msgstr ""
6131 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6132 "に\n"
6133 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6134 "た。\n"
6135 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6136 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6137 "B<mmap2>(2) を起動する。"
6138
6139 #. type: Plain text
6140 #: build/C/man2/mmap.2:591
6141 msgid ""
6142 "On Linux there are no guarantees like those suggested above under "
6143 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6144 "the system runs out of memory."
6145 msgstr ""
6146 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6147 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6148 "終了されるか分からないからである。"
6149
6150 #. type: Plain text
6151 #: build/C/man2/mmap.2:598
6152 msgid ""
6153 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6154 "is specified as B<PROT_NONE>."
6155 msgstr ""
6156 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6157 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6158
6159 #. type: Plain text
6160 #: build/C/man2/mmap.2:613
6161 msgid ""
6162 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6163 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6164 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6165 "fails with the error B<EINVAL> for this case."
6166 msgstr ""
6167 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6168 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6169 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6170 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6171
6172 #. type: Plain text
6173 #: build/C/man2/mmap.2:629
6174 msgid ""
6175 "POSIX specifies that the system shall always zero fill any partial page at "
6176 "the end of the object and that system will never write any modification of "
6177 "the object beyond its end.  On Linux, when you write data to such partial "
6178 "page after the end of the object, the data stays in the page cache even "
6179 "after the file is closed and unmapped and even though the data is never "
6180 "written to the file itself, subsequent mappings may see the modified "
6181 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6182 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6183 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6184 msgstr ""
6185 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6186 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6187 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6188 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6189 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6190 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6191 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6192 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6193 "共有メモリインターフェースを使った場合)。"
6194
6195 #. type: Plain text
6196 #: build/C/man2/mmap.2:641
6197 msgid ""
6198 "The following program prints part of the file specified in its first command-"
6199 "line argument to standard output.  The range of bytes to be printed is "
6200 "specified via offset and length values in the second and third command-line "
6201 "arguments.  The program creates a memory mapping of the required pages of "
6202 "the file and then uses B<write>(2)  to output the desired bytes."
6203 msgstr ""
6204 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6205 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6206 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6207 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6208 "を出力する。"
6209
6210 #. type: Plain text
6211 #: build/C/man2/mmap.2:649
6212 #, no-wrap
6213 msgid ""
6214 "#include E<lt>sys/mman.hE<gt>\n"
6215 "#include E<lt>sys/stat.hE<gt>\n"
6216 "#include E<lt>fcntl.hE<gt>\n"
6217 "#include E<lt>stdio.hE<gt>\n"
6218 "#include E<lt>stdlib.hE<gt>\n"
6219 "#include E<lt>unistd.hE<gt>\n"
6220 msgstr ""
6221 "#include E<lt>sys/mman.hE<gt>\n"
6222 "#include E<lt>sys/stat.hE<gt>\n"
6223 "#include E<lt>fcntl.hE<gt>\n"
6224 "#include E<lt>stdio.hE<gt>\n"
6225 "#include E<lt>stdlib.hE<gt>\n"
6226 "#include E<lt>unistd.hE<gt>\n"
6227
6228 #. type: Plain text
6229 #: build/C/man2/mmap.2:652 build/C/man2/mprotect.2:177
6230 #, no-wrap
6231 msgid ""
6232 "#define handle_error(msg) \\e\n"
6233 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6234 msgstr ""
6235 "#define handle_error(msg) \\e\n"
6236 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6237
6238 #. type: Plain text
6239 #: build/C/man2/mmap.2:662
6240 #, no-wrap
6241 msgid ""
6242 "int\n"
6243 "main(int argc, char *argv[])\n"
6244 "{\n"
6245 "    char *addr;\n"
6246 "    int fd;\n"
6247 "    struct stat sb;\n"
6248 "    off_t offset, pa_offset;\n"
6249 "    size_t length;\n"
6250 "    ssize_t s;\n"
6251 msgstr ""
6252 "int\n"
6253 "main(int argc, char *argv[])\n"
6254 "{\n"
6255 "    char *addr;\n"
6256 "    int fd;\n"
6257 "    struct stat sb;\n"
6258 "    off_t offset, pa_offset;\n"
6259 "    size_t length;\n"
6260 "    ssize_t s;\n"
6261
6262 #. type: Plain text
6263 #: build/C/man2/mmap.2:667
6264 #, no-wrap
6265 msgid ""
6266 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6267 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6268 "        exit(EXIT_FAILURE);\n"
6269 "    }\n"
6270 msgstr ""
6271 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6272 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6273 "        exit(EXIT_FAILURE);\n"
6274 "    }\n"
6275
6276 #. type: Plain text
6277 #: build/C/man2/mmap.2:671
6278 #, no-wrap
6279 msgid ""
6280 "    fd = open(argv[1], O_RDONLY);\n"
6281 "    if (fd == -1)\n"
6282 "        handle_error(\"open\");\n"
6283 msgstr ""
6284 "    fd = open(argv[1], O_RDONLY);\n"
6285 "    if (fd == -1)\n"
6286 "        handle_error(\"open\");\n"
6287
6288 #. type: Plain text
6289 #: build/C/man2/mmap.2:674
6290 #, no-wrap
6291 msgid ""
6292 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6293 "        handle_error(\"fstat\");\n"
6294 msgstr ""
6295 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6296 "        handle_error(\"fstat\");\n"
6297
6298 #. type: Plain text
6299 #: build/C/man2/mmap.2:678
6300 #, no-wrap
6301 msgid ""
6302 "    offset = atoi(argv[2]);\n"
6303 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6304 "        /* offset for mmap() must be page aligned */\n"
6305 msgstr ""
6306 "    offset = atoi(argv[2]);\n"
6307 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6308 "        /* offset for mmap() must be page aligned */\n"
6309
6310 #. type: Plain text
6311 #: build/C/man2/mmap.2:683
6312 #, no-wrap
6313 msgid ""
6314 "    if (offset E<gt>= sb.st_size) {\n"
6315 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6316 "        exit(EXIT_FAILURE);\n"
6317 "    }\n"
6318 msgstr ""
6319 "    if (offset E<gt>= sb.st_size) {\n"
6320 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6321 "        exit(EXIT_FAILURE);\n"
6322 "    }\n"
6323
6324 #. type: Plain text
6325 #: build/C/man2/mmap.2:689
6326 #, no-wrap
6327 msgid ""
6328 "    if (argc == 4) {\n"
6329 "        length = atoi(argv[3]);\n"
6330 "        if (offset + length E<gt> sb.st_size)\n"
6331 "            length = sb.st_size - offset;\n"
6332 "                /* Can\\(aqt display bytes past end of file */\n"
6333 msgstr ""
6334 "    if (argc == 4) {\n"
6335 "        length = atoi(argv[3]);\n"
6336 "        if (offset + length E<gt> sb.st_size)\n"
6337 "            length = sb.st_size - offset;\n"
6338 "                /* Can\\(aqt display bytes past end of file */\n"
6339
6340 #. type: Plain text
6341 #: build/C/man2/mmap.2:693
6342 #, no-wrap
6343 msgid ""
6344 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6345 "        length = sb.st_size - offset;\n"
6346 "    }\n"
6347 msgstr ""
6348 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6349 "        length = sb.st_size - offset;\n"
6350 "    }\n"
6351
6352 #. type: Plain text
6353 #: build/C/man2/mmap.2:698
6354 #, no-wrap
6355 msgid ""
6356 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6357 "                MAP_PRIVATE, fd, pa_offset);\n"
6358 "    if (addr == MAP_FAILED)\n"
6359 "        handle_error(\"mmap\");\n"
6360 msgstr ""
6361 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6362 "                MAP_PRIVATE, fd, pa_offset);\n"
6363 "    if (addr == MAP_FAILED)\n"
6364 "        handle_error(\"mmap\");\n"
6365
6366 #. type: Plain text
6367 #: build/C/man2/mmap.2:703
6368 #, no-wrap
6369 msgid ""
6370 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6371 "    if (s != length) {\n"
6372 "        if (s == -1)\n"
6373 "            handle_error(\"write\");\n"
6374 msgstr ""
6375 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6376 "    if (s != length) {\n"
6377 "        if (s == -1)\n"
6378 "            handle_error(\"write\");\n"
6379
6380 #. type: Plain text
6381 #: build/C/man2/mmap.2:707
6382 #, no-wrap
6383 msgid ""
6384 "        fprintf(stderr, \"partial write\");\n"
6385 "        exit(EXIT_FAILURE);\n"
6386 "    }\n"
6387 msgstr ""
6388 "        fprintf(stderr, \"partial write\");\n"
6389 "        exit(EXIT_FAILURE);\n"
6390 "    }\n"
6391
6392 #. type: Plain text
6393 #: build/C/man2/mmap.2:724
6394 msgid ""
6395 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6396 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6397 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6398 msgstr ""
6399 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6400 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6401 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6402
6403 #. type: Plain text
6404 #: build/C/man2/mmap.2:731
6405 msgid ""
6406 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6407 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6408 msgstr ""
6409 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6410 "smaps> の説明。"
6411
6412 #. type: Plain text
6413 #: build/C/man2/mmap.2:736 build/C/man2/msync.2:151
6414 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6415 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6416
6417 #. type: TH
6418 #: build/C/man2/mmap2.2:29
6419 #, no-wrap
6420 msgid "MMAP2"
6421 msgstr "MMAP2"
6422
6423 #. type: TH
6424 #: build/C/man2/mmap2.2:29
6425 #, no-wrap
6426 msgid "2014-02-25"
6427 msgstr "2014-02-25"
6428
6429 #. type: Plain text
6430 #: build/C/man2/mmap2.2:32
6431 msgid "mmap2 - map files or devices into memory"
6432 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6433
6434 #. type: Plain text
6435 #: build/C/man2/mmap2.2:38
6436 #, no-wrap
6437 msgid ""
6438 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6439 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6440 msgstr ""
6441 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6442 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6443
6444 #. type: Plain text
6445 #: build/C/man2/mmap2.2:43
6446 msgid ""
6447 "This is probably not the system call that you are interested in; instead, "
6448 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6449 "system call."
6450 msgstr ""
6451 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6452 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6453 "の\n"
6454 "ラッパー関数についての説明がある。"
6455
6456 #. type: Plain text
6457 #: build/C/man2/mmap2.2:54
6458 msgid ""
6459 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6460 "except that the final argument specifies the offset into the file in 4096-"
6461 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6462 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6463 "bytes)."
6464 msgstr ""
6465 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6466 "だ\n"
6467 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6468 "ト\n"
6469 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6470 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6471 "プ\n"
6472 "できるようになる。"
6473
6474 #. type: Plain text
6475 #: build/C/man2/mmap2.2:61
6476 msgid ""
6477 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6478 "is returned and I<errno> is set appropriately."
6479 msgstr ""
6480 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6481 "合は -1 が返されて、 I<errno> が適切に設定される。"
6482
6483 #. type: Plain text
6484 #: build/C/man2/mmap2.2:65
6485 msgid "Problem with getting the data from user space."
6486 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6487
6488 #. type: Plain text
6489 #: build/C/man2/mmap2.2:70
6490 msgid ""
6491 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6492 "4096> is not a multiple of the system page size."
6493 msgstr ""
6494 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6495 "4096> がシステムのページサイズの倍数ではない。"
6496
6497 #. type: Plain text
6498 #: build/C/man2/mmap2.2:74
6499 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6500 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6501
6502 #. type: Plain text
6503 #: build/C/man2/mmap2.2:77
6504 msgid "B<mmap2>()  is available since Linux 2.3.31."
6505 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6506
6507 #. type: Plain text
6508 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6509 msgid "This system call is Linux-specific."
6510 msgstr "このシステムコールは Linux 独自である。"
6511
6512 #. type: Plain text
6513 #: build/C/man2/mmap2.2:86
6514 msgid ""
6515 "On architectures where this system call is present, the glibc B<mmap>()  "
6516 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6517 "call."
6518 msgstr ""
6519 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6520 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6521 "(B<mmap2>(2))  を起動する。"
6522
6523 #. type: Plain text
6524 #: build/C/man2/mmap2.2:88
6525 msgid "This system call does not exist on x86-64."
6526 msgstr "このシステムコールは x86-64 には存在しない。"
6527
6528 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6529 #.  On cris, it looks like the unit might also be the page size,
6530 #.  which is 8192 bytes. -- mtk, June 2007
6531 #. type: Plain text
6532 #: build/C/man2/mmap2.2:95
6533 msgid ""
6534 "On ia64, the unit for I<offset> is actually the system page size, rather "
6535 "than 4096 bytes."
6536 msgstr ""
6537 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6538 "バイトではない。"
6539
6540 #. type: Plain text
6541 #: build/C/man2/mmap2.2:101
6542 msgid ""
6543 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6544 msgstr ""
6545 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6546
6547 #. type: TH
6548 #: build/C/man2/mprotect.2:39
6549 #, no-wrap
6550 msgid "MPROTECT"
6551 msgstr "MPROTECT"
6552
6553 #. type: TH
6554 #: build/C/man2/mprotect.2:39
6555 #, no-wrap
6556 msgid "2014-01-05"
6557 msgstr "2014-01-05"
6558
6559 #. type: Plain text
6560 #: build/C/man2/mprotect.2:42
6561 msgid "mprotect - set protection on a region of memory"
6562 msgstr "mprotect - メモリ領域の保護を設定する"
6563
6564 #. type: Plain text
6565 #: build/C/man2/mprotect.2:47
6566 #, no-wrap
6567 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6568 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6569
6570 #. type: Plain text
6571 #: build/C/man2/mprotect.2:55
6572 msgid ""
6573 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6574 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6575 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6576 msgstr ""
6577 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6578 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6579 "界に一致していなければならない。"
6580
6581 #. type: Plain text
6582 #: build/C/man2/mprotect.2:60
6583 msgid ""
6584 "If the calling process tries to access memory in a manner that violates the "
6585 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6586 msgstr ""
6587 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6588 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6589
6590 #. type: Plain text
6591 #: build/C/man2/mprotect.2:65
6592 msgid ""
6593 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6594 "following list:"
6595 msgstr ""
6596 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6597 "毎の論理和 (bitwize-or) で指定する:"
6598
6599 #. type: Plain text
6600 #: build/C/man2/mprotect.2:68
6601 msgid "The memory cannot be accessed at all."
6602 msgstr "そのメモリには全くアクセスできない。"
6603
6604 #. type: Plain text
6605 #: build/C/man2/mprotect.2:71
6606 msgid "The memory can be read."
6607 msgstr "そのメモリを読み取ることができる。"
6608
6609 #. type: Plain text
6610 #: build/C/man2/mprotect.2:74
6611 msgid "The memory can be modified."
6612 msgstr "そのメモリを変更できる。"
6613
6614 #. type: Plain text
6615 #: build/C/man2/mprotect.2:77
6616 msgid "The memory can be executed."
6617 msgstr "そのメモリは実行可能である。"
6618
6619 #. type: Plain text
6620 #: build/C/man2/mprotect.2:84
6621 msgid ""
6622 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6623 "I<errno> is set appropriately."
6624 msgstr ""
6625 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6626 "I<errno> が適切に設定される。"
6627
6628 #. type: Plain text
6629 #: build/C/man2/mprotect.2:94
6630 msgid ""
6631 "The memory cannot be given the specified access.  This can happen, for "
6632 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6633 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6634 msgstr ""
6635 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6636 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6637 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6638
6639 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6640 #. type: Plain text
6641 #: build/C/man2/mprotect.2:99
6642 msgid ""
6643 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6644 msgstr ""
6645 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6646
6647 #. type: Plain text
6648 #: build/C/man2/mprotect.2:102
6649 msgid "Internal kernel structures could not be allocated."
6650 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6651
6652 #. type: Plain text
6653 #: build/C/man2/mprotect.2:112
6654 msgid ""
6655 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6656 "address space of the process, or specify one or more pages that are not "
6657 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6658 "for these cases.)"
6659 msgstr ""
6660 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6661 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6662 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6663 "成されていた)。"
6664
6665 #.  SVr4 defines an additional error
6666 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6667 #. type: Plain text
6668 #: build/C/man2/mprotect.2:121
6669 msgid ""
6670 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6671 "unspecified if it is applied to a region of memory that was not obtained via "
6672 "B<mmap>(2)."
6673 msgstr ""
6674 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6675 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6676 "されている。"
6677
6678 #. type: Plain text
6679 #: build/C/man2/mprotect.2:128
6680 msgid ""
6681 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6682 "process's address space (except for the kernel vsyscall area).  In "
6683 "particular it can be used to change existing code mappings to be writable."
6684 msgstr ""
6685 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6686 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6687 "マッピングを書き込み可能にするために使われる。"
6688
6689 #. type: Plain text
6690 #: build/C/man2/mprotect.2:138
6691 msgid ""
6692 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6693 "architecture- and kernel version-dependent.  On some hardware architectures "
6694 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6695 msgstr ""
6696 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6697 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6698 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6699
6700 #. type: Plain text
6701 #: build/C/man2/mprotect.2:147
6702 msgid ""
6703 "POSIX.1-2001 says that an implementation may permit access other than that "
6704 "specified in I<prot>, but at a minimum can allow write access only if "
6705 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6706 "has been set."
6707 msgstr ""
6708 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6709 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6710 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6711 "ない点だけは 満たす必要がある。"
6712
6713 #. type: Plain text
6714 #: build/C/man2/mprotect.2:153
6715 msgid ""
6716 "The program below allocates four pages of memory, makes the third of these "
6717 "pages read-only, and then executes a loop that walks upward through the "
6718 "allocated region modifying bytes."
6719 msgstr ""
6720 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6721 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6722 "かって順番にバイト値を変更するループを実行する。"
6723
6724 #. type: Plain text
6725 #: build/C/man2/mprotect.2:156
6726 msgid ""
6727 "An example of what we might see when running the program is the following:"
6728 msgstr "プログラムを実行した場合の一例を以下に示す。"
6729
6730 #. type: Plain text
6731 #: build/C/man2/mprotect.2:162
6732 #, no-wrap
6733 msgid ""
6734 "$B< ./a.out>\n"
6735 "Start of region:        0x804c000\n"
6736 "Got SIGSEGV at address: 0x804e000\n"
6737 msgstr ""
6738 "$B< ./a.out>\n"
6739 "Start of region:        0x804c000\n"
6740 "Got SIGSEGV at address: 0x804e000\n"
6741
6742 #. type: Plain text
6743 #: build/C/man2/mprotect.2:174
6744 #, no-wrap
6745 msgid ""
6746 "#include E<lt>unistd.hE<gt>\n"
6747 "#include E<lt>signal.hE<gt>\n"
6748 "#include E<lt>stdio.hE<gt>\n"
6749 "#include E<lt>malloc.hE<gt>\n"
6750 "#include E<lt>stdlib.hE<gt>\n"
6751 "#include E<lt>errno.hE<gt>\n"
6752 "#include E<lt>sys/mman.hE<gt>\n"
6753 msgstr ""
6754 "#include E<lt>unistd.hE<gt>\n"
6755 "#include E<lt>signal.hE<gt>\n"
6756 "#include E<lt>stdio.hE<gt>\n"
6757 "#include E<lt>malloc.hE<gt>\n"
6758 "#include E<lt>stdlib.hE<gt>\n"
6759 "#include E<lt>errno.hE<gt>\n"
6760 "#include E<lt>sys/mman.hE<gt>\n"
6761
6762 #. type: Plain text
6763 #: build/C/man2/mprotect.2:179
6764 #, no-wrap
6765 msgid "static char *buffer;\n"
6766 msgstr "static char *buffer;\n"
6767
6768 #. type: Plain text
6769 #: build/C/man2/mprotect.2:187
6770 #, no-wrap
6771 msgid ""
6772 "static void\n"
6773 "handler(int sig, siginfo_t *si, void *unused)\n"
6774 "{\n"
6775 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6776 "            (long) si-E<gt>si_addr);\n"
6777 "    exit(EXIT_FAILURE);\n"
6778 "}\n"
6779 msgstr ""
6780 "static void\n"
6781 "handler(int sig, siginfo_t *si, void *unused)\n"
6782 "{\n"
6783 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6784 "            (long) si-E<gt>si_addr);\n"
6785 "    exit(EXIT_FAILURE);\n"
6786 "}\n"
6787
6788 #. type: Plain text
6789 #: build/C/man2/mprotect.2:194
6790 #, no-wrap
6791 msgid ""
6792 "int\n"
6793 "main(int argc, char *argv[])\n"
6794 "{\n"
6795 "    char *p;\n"
6796 "    int pagesize;\n"
6797 "    struct sigaction sa;\n"
6798 msgstr ""
6799 "int\n"
6800 "main(void)\n"
6801 "{\n"
6802 "    char *p;\n"
6803 "    int pagesize;\n"
6804 "    struct sigaction sa;\n"
6805
6806 #. type: Plain text
6807 #: build/C/man2/mprotect.2:200
6808 #, no-wrap
6809 msgid ""
6810 "    sa.sa_flags = SA_SIGINFO;\n"
6811 "    sigemptyset(&sa.sa_mask);\n"
6812 "    sa.sa_sigaction = handler;\n"
6813 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6814 "        handle_error(\"sigaction\");\n"
6815 msgstr ""
6816 "    sa.sa_flags = SA_SIGINFO;\n"
6817 "    sigemptyset(&sa.sa_mask);\n"
6818 "    sa.sa_sigaction = handler;\n"
6819 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6820 "        handle_error(\"sigaction\");\n"
6821
6822 #. type: Plain text
6823 #: build/C/man2/mprotect.2:204
6824 #, no-wrap
6825 msgid ""
6826 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6827 "    if (pagesize == -1)\n"
6828 "        handle_error(\"sysconf\");\n"
6829 msgstr ""
6830 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6831 "    if (pagesize == -1)\n"
6832 "        handle_error(\"sysconf\");\n"
6833
6834 #. type: Plain text
6835 #: build/C/man2/mprotect.2:207
6836 #, no-wrap
6837 msgid ""
6838 "    /* Allocate a buffer aligned on a page boundary;\n"
6839 "       initial protection is PROT_READ | PROT_WRITE */\n"
6840 msgstr ""
6841 "    /* Allocate a buffer aligned on a page boundary;\n"
6842 "       initial protection is PROT_READ | PROT_WRITE */\n"
6843
6844 #. type: Plain text
6845 #: build/C/man2/mprotect.2:211
6846 #, no-wrap
6847 msgid ""
6848 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6849 "    if (buffer == NULL)\n"
6850 "        handle_error(\"memalign\");\n"
6851 msgstr ""
6852 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6853 "    if (buffer == NULL)\n"
6854 "        handle_error(\"memalign\");\n"
6855
6856 #. type: Plain text
6857 #: build/C/man2/mprotect.2:213
6858 #, no-wrap
6859 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6860 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6861
6862 #. type: Plain text
6863 #: build/C/man2/mprotect.2:217
6864 #, no-wrap
6865 msgid ""
6866 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6867 "                PROT_READ) == -1)\n"
6868 "        handle_error(\"mprotect\");\n"
6869 msgstr ""
6870 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6871 "                PROT_READ) == -1)\n"
6872 "        handle_error(\"mprotect\");\n"
6873
6874 #. type: Plain text
6875 #: build/C/man2/mprotect.2:220
6876 #, no-wrap
6877 msgid ""
6878 "    for (p = buffer ; ; )\n"
6879 "        *(p++) = \\(aqa\\(aq;\n"
6880 msgstr ""
6881 "    for (p = buffer ; ; )\n"
6882 "        *(p++) = \\(aqa\\(aq;\n"
6883
6884 #. type: Plain text
6885 #: build/C/man2/mprotect.2:224
6886 #, no-wrap
6887 msgid ""
6888 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6889 "    exit(EXIT_SUCCESS);\n"
6890 "}\n"
6891 msgstr ""
6892 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6893 "    exit(EXIT_SUCCESS);\n"
6894 "}\n"
6895
6896 #. type: Plain text
6897 #: build/C/man2/mprotect.2:228
6898 msgid "B<mmap>(2), B<sysconf>(3)"
6899 msgstr "B<mmap>(2), B<sysconf>(3)"
6900
6901 #. type: TH
6902 #: build/C/man2/mremap.2:30
6903 #, no-wrap
6904 msgid "MREMAP"
6905 msgstr "MREMAP"
6906
6907 #. type: TH
6908 #: build/C/man2/mremap.2:30
6909 #, no-wrap
6910 msgid "2010-06-10"
6911 msgstr "2010-06-10"
6912
6913 #. type: Plain text
6914 #: build/C/man2/mremap.2:33
6915 msgid "mremap - remap a virtual memory address"
6916 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6917
6918 #. type: Plain text
6919 #: build/C/man2/mremap.2:36
6920 #, no-wrap
6921 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6922 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6923
6924 #. type: Plain text
6925 #: build/C/man2/mremap.2:41
6926 #, no-wrap
6927 msgid ""
6928 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6929 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6930 msgstr ""
6931 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6932 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6933
6934 #. type: Plain text
6935 #: build/C/man2/mremap.2:47
6936 msgid ""
6937 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6938 "moving it at the same time (controlled by the I<flags> argument and the "
6939 "available virtual address space)."
6940 msgstr ""
6941 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6942 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6943 "る)。"
6944
6945 #. type: Plain text
6946 #: build/C/man2/mremap.2:61
6947 msgid ""
6948 "I<old_address> is the old address of the virtual memory block that you want "
6949 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6950 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6951 "requested size of the virtual memory block after the resize.  An optional "
6952 "fifth argument, I<new_address>, may be provided; see the description of "
6953 "B<MREMAP_FIXED> below."
6954 msgstr ""
6955 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6956 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6957 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6958 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6959 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6960 "明を参照のこと。"
6961
6962 #. type: Plain text
6963 #: build/C/man2/mremap.2:73
6964 msgid ""
6965 "In Linux the memory is divided into pages.  A user process has (one or)  "
6966 "several linear virtual memory segments.  Each virtual memory segment has one "
6967 "or more mappings to real memory pages (in the page table).  Each virtual "
6968 "memory segment has its own protection (access rights), which may cause a "
6969 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6970 "to a read-only segment).  Accessing virtual memory outside of the segments "
6971 "will also cause a segmentation violation."
6972 msgstr ""
6973 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6974 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6975 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6976 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6977 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6978 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6979 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6980 "ン侵害が発生する。"
6981
6982 #. type: Plain text
6983 #: build/C/man2/mremap.2:81
6984 msgid ""
6985 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6986 "mapping between virtual addresses and memory pages.  This can be used to "
6987 "implement a very efficient B<realloc>(3)."
6988 msgstr ""
6989 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6990 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6991 "B<realloc>(3)  を実装するのに使用されている。"
6992
6993 #. type: Plain text
6994 #: build/C/man2/mremap.2:83
6995 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6996 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6997
6998 #. type: TP
6999 #: build/C/man2/mremap.2:83
7000 #, no-wrap
7001 msgid "B<MREMAP_MAYMOVE>"
7002 msgstr "B<MREMAP_MAYMOVE>"
7003
7004 #. type: Plain text
7005 #: build/C/man2/mremap.2:95
7006 msgid ""
7007 "By default, if there is not sufficient space to expand a mapping at its "
7008 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7009 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7010 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7011 "mapping location become invalid (offsets relative to the starting address of "
7012 "the mapping should be employed)."
7013 msgstr ""
7014 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7015 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7016 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7017 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
7018 "レスからの相対オフセットは有効のままである)。"
7019
7020 #. type: TP
7021 #: build/C/man2/mremap.2:95
7022 #, no-wrap
7023 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7024 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7025
7026 #. type: Plain text
7027 #: build/C/man2/mremap.2:117
7028 msgid ""
7029 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7030 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7031 "\\ *new_address>, which specifies a page-aligned address to which the "
7032 "mapping must be moved.  Any previous mapping at the address range specified "
7033 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7034 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7035 msgstr ""
7036 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7037 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7038 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7039 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7040 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7041 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7042 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7043
7044 #. type: Plain text
7045 #: build/C/man2/mremap.2:127
7046 msgid ""
7047 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7048 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7049 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7050 "locked by the process may change."
7051 msgstr ""
7052 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
7053 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
7054 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
7055 "の量は変化する。"
7056
7057 #. type: Plain text
7058 #: build/C/man2/mremap.2:135
7059 msgid ""
7060 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7061 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7062 "and I<errno> is set appropriately."
7063 msgstr ""
7064 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
7065 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
7066 "切に設定される。"
7067
7068 #. type: Plain text
7069 #: build/C/man2/mremap.2:142
7070 msgid ""
7071 "The caller tried to expand a memory segment that is locked, but this was not "
7072 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7073 msgstr ""
7074 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
7075 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7076
7077 #. type: Plain text
7078 #: build/C/man2/mremap.2:151
7079 msgid ""
7080 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7081 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7082 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7083 "the whole address space requested, but those mappings are of different types."
7084 msgstr ""
7085 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7086 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7087 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
7088 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7089 "を受け取るだろう。"
7090
7091 #. type: Plain text
7092 #: build/C/man2/mremap.2:179
7093 msgid ""
7094 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7095 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7096 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7097 "was invalid; or the new address range specified by I<new_address> and "
7098 "I<new_size> overlapped the old address range specified by I<old_address> and "
7099 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7100 "B<MREMAP_MAYMOVE>."
7101 msgstr ""
7102 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7103 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7104 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7105 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7106 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7107 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7108 "されていない。"
7109
7110 #. type: Plain text
7111 #: build/C/man2/mremap.2:185
7112 msgid ""
7113 "The memory area cannot be expanded at the current virtual address, and the "
7114 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7115 "(virtual) memory available."
7116 msgstr ""
7117 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7118 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
7119
7120 #.  4.2BSD had a (never actually implemented)
7121 #.  .BR mremap (2)
7122 #.  call with completely different semantics.
7123 #. type: Plain text
7124 #: build/C/man2/mremap.2:191
7125 msgid ""
7126 "This call is Linux-specific, and should not be used in programs intended to "
7127 "be portable."
7128 msgstr ""
7129 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7130 "い。"
7131
7132 #. type: Plain text
7133 #: build/C/man2/mremap.2:199
7134 msgid ""
7135 "Prior to version 2.4, glibc did not expose the definition of "
7136 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7137 "I<new_address> argument."
7138 msgstr ""
7139 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7140 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7141
7142 #. type: Plain text
7143 #: build/C/man2/mremap.2:208
7144 msgid ""
7145 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7146 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7147 msgstr ""
7148 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7149 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7150
7151 #. type: Plain text
7152 #: build/C/man2/mremap.2:214
7153 msgid ""
7154 "Your favorite text book on operating systems for more information on paged "
7155 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7156 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7157 "Maurice J. Bach)"
7158 msgstr ""
7159 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7160 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7161 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7162 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7163
7164 #. type: TH
7165 #: build/C/man2/msync.2:25
7166 #, no-wrap
7167 msgid "MSYNC"
7168 msgstr "MSYNC"
7169
7170 #. type: TH
7171 #: build/C/man2/msync.2:25
7172 #, no-wrap
7173 msgid "2014-04-20"
7174 msgstr "2014-04-20"
7175
7176 #. type: Plain text
7177 #: build/C/man2/msync.2:28
7178 msgid "msync - synchronize a file with a memory map"
7179 msgstr "msync - ファイルをマップしたメモリと同期させる"
7180
7181 #. type: Plain text
7182 #: build/C/man2/msync.2:32
7183 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7184 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7185
7186 #. type: Plain text
7187 #: build/C/man2/msync.2:48
7188 msgid ""
7189 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7190 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7191 "this call there is no guarantee that changes are written back before "
7192 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7193 "corresponds to the memory area starting at I<addr> and having length "
7194 "I<length> is updated."
7195 msgstr ""
7196 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7197 "のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しない"
7198 "と、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確"
7199 "には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する"
7200 "部分が更新される。"
7201
7202 #. type: Plain text
7203 #: build/C/man2/msync.2:68
7204 msgid ""
7205 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7206 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7207 "specifies that an update be scheduled, but the call returns immediately.  "
7208 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7209 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7210 "they can be updated with the fresh values just written)."
7211 msgstr ""
7212 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7213 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7214 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7215 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7216 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7217 "に対する他のマッピングを無効にすることを要求する。"
7218
7219 #. type: Plain text
7220 #: build/C/man2/msync.2:73
7221 msgid ""
7222 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7223 "appropriately."
7224 msgstr ""
7225 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7226 "る。"
7227
7228 #. type: TP
7229 #: build/C/man2/msync.2:74
7230 #, no-wrap
7231 msgid "B<EBUSY>"
7232 msgstr "B<EBUSY>"
7233
7234 #. type: Plain text
7235 #: build/C/man2/msync.2:80
7236 msgid ""
7237 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7238 "specified address range."
7239 msgstr ""
7240 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7241 "存在する。"
7242
7243 #. type: Plain text
7244 #: build/C/man2/msync.2:93
7245 msgid ""
7246 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7247 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7248 "B<MS_ASYNC> are set in I<flags>."
7249 msgstr ""
7250 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7251 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7252 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7253
7254 #. type: Plain text
7255 #: build/C/man2/msync.2:96
7256 msgid "The indicated memory (or part of it) was not mapped."
7257 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7258
7259 #. type: Plain text
7260 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7261 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7262 msgid "POSIX.1-2001."
7263 msgstr "POSIX.1-2001."
7264
7265 #. type: Plain text
7266 #: build/C/man2/msync.2:105
7267 msgid ""
7268 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7269 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7270 msgstr ""
7271 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7272 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7273
7274 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7275 #.  -1: unavailable, 0: ask using sysconf().
7276 #.  glibc defines them to 1.
7277 #. type: Plain text
7278 #: build/C/man2/msync.2:120
7279 msgid ""
7280 "On POSIX systems on which B<msync>()  is available, both "
7281 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7282 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7283 msgstr ""
7284 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7285 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7286 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7287
7288 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7289 #. type: Plain text
7290 #: build/C/man2/msync.2:147
7291 msgid ""
7292 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7293 "I<flags>, and indeed failure to include one of these flags will cause "
7294 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7295 "B<msync>()  that specifies neither of these flags, with semantics that are "
7296 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7297 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7298 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7299 "behavior, portable, future-proof applications should ensure that they "
7300 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7301 msgstr ""
7302 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7303 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7304 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7305 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7306 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7307 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7308 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7309 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7310 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7311 "指定するようにすべきである。"
7312
7313 #. type: TP
7314 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7315 #, no-wrap
7316 msgid "B<mmap>(2)"
7317 msgstr "B<mmap>(2)"
7318
7319 #. type: TH
7320 #: build/C/man3/mtrace.3:25
7321 #, no-wrap
7322 msgid "MTRACE"
7323 msgstr "MTRACE"
7324
7325 #. type: TH
7326 #: build/C/man3/mtrace.3:25
7327 #, no-wrap
7328 msgid "2012-04-18"
7329 msgstr "2012-04-18"
7330
7331 #. type: Plain text
7332 #: build/C/man3/mtrace.3:28
7333 msgid "mtrace, muntrace - malloc tracing"
7334 msgstr "mtrace, muntrace - malloc のトレース"
7335
7336 #. type: Plain text
7337 #: build/C/man3/mtrace.3:30
7338 msgid "B<#include E<lt>mcheck.hE<gt>>"
7339 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7340
7341 #. type: Plain text
7342 #: build/C/man3/mtrace.3:32
7343 msgid "B<void mtrace(void);>"
7344 msgstr "B<void mtrace(void);>"
7345
7346 #. type: Plain text
7347 #: build/C/man3/mtrace.3:34
7348 msgid "B<void muntrace(void);>"
7349 msgstr "B<void muntrace(void);>"
7350
7351 #. type: Plain text
7352 #: build/C/man3/mtrace.3:46
7353 msgid ""
7354 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7355 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7356 "hook functions record tracing information about memory allocation and "
7357 "deallocation.  The tracing information can be used to discover memory leaks "
7358 "and attempts to free nonallocated memory in a program."
7359 msgstr ""
7360
7361 #. type: Plain text
7362 #: build/C/man3/mtrace.3:57
7363 msgid ""
7364 "The B<muntrace>()  function disables the hook functions installed by "
7365 "B<mtrace>(), so that tracing information is no longer recorded for the "
7366 "memory-allocation functions.  If no hook functions were successfully "
7367 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7368 msgstr ""
7369
7370 #. type: Plain text
7371 #: build/C/man3/mtrace.3:65
7372 msgid ""
7373 "When B<mtrace>()  is called, it checks the value of the environment variable "
7374 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7375 "tracing information is to be recorded.  If the pathname is successfully "
7376 "opened, it is truncated to zero length."
7377 msgstr ""
7378
7379 #. type: Plain text
7380 #: build/C/man3/mtrace.3:78
7381 msgid ""
7382 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7383 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7384 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7385 "ignored, and B<mtrace>()  has no effect."
7386 msgstr ""
7387
7388 #. type: Plain text
7389 #: build/C/man3/mtrace.3:86
7390 msgid ""
7391 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7392 "program, and B<muntrace>()  is never called."
7393 msgstr ""
7394
7395 #. type: Plain text
7396 #: build/C/man3/mtrace.3:96
7397 msgid ""
7398 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7399 "designed to be human readable.  The GNU C library provides a Perl script, "
7400 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7401 "output.  For best results, the traced program should be compiled with "
7402 "debugging enabled, so that line-number information is recorded in the "
7403 "executable."
7404 msgstr ""
7405
7406 #. type: Plain text
7407 #: build/C/man3/mtrace.3:102
7408 msgid ""
7409 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7410 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7411 msgstr ""
7412
7413 #. type: Plain text
7414 #: build/C/man3/mtrace.3:108
7415 msgid ""
7416 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7417 "the line number references may refer to the previous or following "
7418 "(nonblank)  line of the source code."
7419 msgstr ""
7420
7421 #. type: Plain text
7422 #: build/C/man3/mtrace.3:115
7423 msgid ""
7424 "The shell session below demonstrates the use of the B<mtrace>()  function "
7425 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7426 "different locations.  The demonstration uses the following program:"
7427 msgstr ""
7428
7429 #. type: Plain text
7430 #: build/C/man3/mtrace.3:122
7431 #, no-wrap
7432 msgid ""
7433 "$ B<cat t_mtrace.c>\n"
7434 "#include E<lt>mcheck.hE<gt>\n"
7435 "#include E<lt>stdlib.hE<gt>\n"
7436 "#include E<lt>stdio.hE<gt>\n"
7437 msgstr ""
7438 "$ B<cat t_mtrace.c>\n"
7439 "#include E<lt>mcheck.hE<gt>\n"
7440 "#include E<lt>stdlib.hE<gt>\n"
7441 "#include E<lt>stdio.hE<gt>\n"
7442
7443 #. type: Plain text
7444 #: build/C/man3/mtrace.3:127
7445 #, no-wrap
7446 msgid ""
7447 "int\n"
7448 "main(int argc, char *argv[])\n"
7449 "{\n"
7450 "    int j;\n"
7451 msgstr ""
7452 "int\n"
7453 "main(int argc, char *argv[])\n"
7454 "{\n"
7455 "    int j;\n"
7456
7457 #. type: Plain text
7458 #: build/C/man3/mtrace.3:129
7459 #, no-wrap
7460 msgid "    mtrace();\n"
7461 msgstr "    mtrace();\n"
7462
7463 #. type: Plain text
7464 #: build/C/man3/mtrace.3:132
7465 #, no-wrap
7466 msgid ""
7467 "    for (j = 0; j E<lt> 2; j++)\n"
7468 "        malloc(100);            /* Never freed--a memory leak */\n"
7469 msgstr ""
7470 "    for (j = 0; j E<lt> 2; j++)\n"
7471 "        malloc(100);            /* Never freed--a memory leak */\n"
7472
7473 #. type: Plain text
7474 #: build/C/man3/mtrace.3:136
7475 #, no-wrap
7476 msgid ""
7477 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7478 "    exit(EXIT_SUCCESS);\n"
7479 "}\n"
7480 msgstr ""
7481 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7482 "    exit(EXIT_SUCCESS);\n"
7483 "}\n"
7484
7485 #. type: Plain text
7486 #: build/C/man3/mtrace.3:142
7487 msgid ""
7488 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7489 "memory leaks at two different locations in the program:"
7490 msgstr ""
7491
7492 #. type: Plain text
7493 #: build/C/man3/mtrace.3:155
7494 #, no-wrap
7495 msgid ""
7496 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7497 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7498 "$ B<./t_mtrace>\n"
7499 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7500 "Memory not freed:\n"
7501 "-----------------\n"
7502 "   Address     Size     Caller\n"
7503 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7504 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7505 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7506 msgstr ""
7507 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7508 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7509 "$ B<./t_mtrace>\n"
7510 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7511 "Memory not freed:\n"
7512 "-----------------\n"
7513 "   Address     Size     Caller\n"
7514 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7515 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7516 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7517
7518 #. type: Plain text
7519 #: build/C/man3/mtrace.3:167
7520 msgid ""
7521 "The first two messages about unfreed memory correspond to the two "
7522 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7523 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7524 msgstr ""
7525
7526 #. type: Plain text
7527 #: build/C/man3/mtrace.3:172
7528 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7529 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7530
7531 #. type: TH
7532 #: build/C/man2/posix_fadvise.2:28
7533 #, no-wrap
7534 msgid "POSIX_FADVISE"
7535 msgstr "POSIX_FADVISE"
7536
7537 #. type: Plain text
7538 #: build/C/man2/posix_fadvise.2:31
7539 msgid "posix_fadvise - predeclare an access pattern for file data"
7540 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7541
7542 #. type: Plain text
7543 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7544 #, no-wrap
7545 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7546 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7547
7548 #. type: Plain text
7549 #: build/C/man2/posix_fadvise.2:37
7550 #, no-wrap
7551 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7552 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7553
7554 #. type: Plain text
7555 #: build/C/man2/posix_fadvise.2:46
7556 msgid "B<posix_fadvise>():"
7557 msgstr "B<posix_fadvise>():"
7558
7559 #. type: Plain text
7560 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7561 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7562 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7563
7564 #. type: Plain text
7565 #: build/C/man2/posix_fadvise.2:56
7566 msgid ""
7567 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7568 "data in a specific pattern in the future, thus allowing the kernel to "
7569 "perform appropriate optimizations."
7570 msgstr ""
7571 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7572 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7573 "適化を実行することが可能になる。"
7574
7575 #. type: Plain text
7576 #: build/C/man2/posix_fadvise.2:63
7577 msgid ""
7578 "The I<advice> applies to a (not necessarily existent) region starting at "
7579 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7580 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7581 "binding; it merely constitutes an expectation on behalf of the application."
7582 msgstr ""
7583 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7584 "イ\n"
7585 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7586 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7587 "ケー\n"
7588 "ションのために可能性を構成するだけである。"
7589
7590 #. type: Plain text
7591 #: build/C/man2/posix_fadvise.2:65
7592 msgid "Permissible values for I<advice> include:"
7593 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7594
7595 #. type: TP
7596 #: build/C/man2/posix_fadvise.2:65
7597 #, no-wrap
7598 msgid "B<POSIX_FADV_NORMAL>"
7599 msgstr "B<POSIX_FADV_NORMAL>"
7600
7601 #. type: Plain text
7602 #: build/C/man2/posix_fadvise.2:71
7603 msgid ""
7604 "Indicates that the application has no advice to give about its access "
7605 "pattern for the specified data.  If no advice is given for an open file, "
7606 "this is the default assumption."
7607 msgstr ""
7608 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7609 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7610 "合、 これがデフォルトで仮定される。"
7611
7612 #. type: TP
7613 #: build/C/man2/posix_fadvise.2:71
7614 #, no-wrap
7615 msgid "B<POSIX_FADV_SEQUENTIAL>"
7616 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7617
7618 #. type: Plain text
7619 #: build/C/man2/posix_fadvise.2:75
7620 msgid ""
7621 "The application expects to access the specified data sequentially (with "
7622 "lower offsets read before higher ones)."
7623 msgstr ""
7624 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7625 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7626
7627 #. type: TP
7628 #: build/C/man2/posix_fadvise.2:75
7629 #, no-wrap
7630 msgid "B<POSIX_FADV_RANDOM>"
7631 msgstr "B<POSIX_FADV_RANDOM>"
7632
7633 #. type: Plain text
7634 #: build/C/man2/posix_fadvise.2:78
7635 msgid "The specified data will be accessed in random order."
7636 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7637
7638 #. type: TP
7639 #: build/C/man2/posix_fadvise.2:78
7640 #, no-wrap
7641 msgid "B<POSIX_FADV_NOREUSE>"
7642 msgstr "B<POSIX_FADV_NOREUSE>"
7643
7644 #. type: Plain text
7645 #: build/C/man2/posix_fadvise.2:81
7646 msgid "The specified data will be accessed only once."
7647 msgstr "指定されたデータは 1 度しかアクセスされない。"
7648
7649 #. type: TP
7650 #: build/C/man2/posix_fadvise.2:81
7651 #, no-wrap
7652 msgid "B<POSIX_FADV_WILLNEED>"
7653 msgstr "B<POSIX_FADV_WILLNEED>"
7654
7655 #. type: Plain text
7656 #: build/C/man2/posix_fadvise.2:84
7657 msgid "The specified data will be accessed in the near future."
7658 msgstr "指定されたデータは近い将来アクセスされる。"
7659
7660 #. type: TP
7661 #: build/C/man2/posix_fadvise.2:84
7662 #, no-wrap
7663 msgid "B<POSIX_FADV_DONTNEED>"
7664 msgstr "B<POSIX_FADV_DONTNEED>"
7665
7666 #. type: Plain text
7667 #: build/C/man2/posix_fadvise.2:87
7668 msgid "The specified data will not be accessed in the near future."
7669 msgstr "指定されたデータは近い将来アクセスされない。"
7670
7671 #. type: Plain text
7672 #: build/C/man2/posix_fadvise.2:90
7673 msgid "On success, zero is returned.  On error, an error number is returned."
7674 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7675
7676 #. type: Plain text
7677 #: build/C/man2/posix_fadvise.2:94
7678 msgid "The I<fd> argument was not a valid file descriptor."
7679 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7680
7681 #. type: Plain text
7682 #: build/C/man2/posix_fadvise.2:97
7683 msgid "An invalid value was specified for I<advice>."
7684 msgstr "無効な値が I<advice> に指定された。"
7685
7686 #.  commit 87ba81dba431232548ce29d5d224115d0c2355ac
7687 #. type: Plain text
7688 #: build/C/man2/posix_fadvise.2:107
7689 #, fuzzy
7690 #| msgid ""
7691 #| "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7692 #| "returns B<EINVAL> in this case.)"
7693 msgid ""
7694 "The specified file descriptor refers to a pipe or FIFO.  (B<ESPIPE> is the "
7695 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7696 "B<EINVAL> in this case.)"
7697 msgstr ""
7698 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7699 "合、Linux は実際には B<EINVAL> を返す)。"
7700
7701 #.  of fadvise64_64()
7702 #. type: Plain text
7703 #: build/C/man2/posix_fadvise.2:115
7704 msgid ""
7705 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7706 "called B<fadvise64>().  Library support has been provided since glibc "
7707 "version 2.2, via the wrapper function B<posix_fadvise>()."
7708 msgstr ""
7709 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7710 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7711 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7712 "ラッパー関数は B<posix_fadvise>() という名前である。"
7713
7714 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7715 #. type: Plain text
7716 #: build/C/man2/posix_fadvise.2:122
7717 msgid ""
7718 "Since Linux 3.18, support for the underlying system call is optional, "
7719 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7720 "option."
7721 msgstr ""
7722
7723 #. type: Plain text
7724 #: build/C/man2/posix_fadvise.2:131
7725 msgid ""
7726 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7727 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7728 msgstr ""
7729 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7730 "I<off_t> に変更された点に注意すること。"
7731
7732 #. type: Plain text
7733 #: build/C/man2/posix_fadvise.2:137
7734 msgid ""
7735 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7736 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7737 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7738 "the entire file, not just the specified region (but other open file handles "
7739 "to the same file are unaffected)."
7740 msgstr ""
7741 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7742 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7743 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7744 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7745 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7746
7747 #. type: Plain text
7748 #: build/C/man2/posix_fadvise.2:144
7749 msgid ""
7750 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7751 "into the page cache.  The amount of data read may be decreased by the kernel "
7752 "depending on virtual memory load.  (A few megabytes will usually be fully "
7753 "satisfied, and more is rarely useful.)"
7754 msgstr ""
7755 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7756 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7757 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7758 "くてもめったに役に立たない)。"
7759
7760 #. type: Plain text
7761 #: build/C/man2/posix_fadvise.2:148
7762 msgid ""
7763 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7764 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7765 "flag is a no-op."
7766 msgstr ""
7767 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7768 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7769 "フラグは何も行わない。"
7770
7771 #. type: Plain text
7772 #: build/C/man2/posix_fadvise.2:156
7773 msgid ""
7774 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7775 "specified region.  This is useful, for example, while streaming large "
7776 "files.  A program may periodically request the kernel to free cached data "
7777 "that has already been used, so that more useful cached pages are not "
7778 "discarded instead."
7779 msgstr ""
7780 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7781 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7782 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7783 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7784 "されたページが、 代わりに破棄されることはない。"
7785
7786 #. type: Plain text
7787 #: build/C/man2/posix_fadvise.2:164
7788 msgid ""
7789 "Requests to discard partial pages are ignored.  It is preferable to preserve "
7790 "needed data than discard unneeded data.  If the application requires that "
7791 "data be considered for discarding then I<offset> and I<len> must be page-"
7792 "aligned."
7793 msgstr ""
7794
7795 #. type: Plain text
7796 #: build/C/man2/posix_fadvise.2:172
7797 msgid ""
7798 "Pages that have not yet been written out will be unaffected, so if the "
7799 "application wishes to guarantee that pages will be released, it should call "
7800 "B<fsync>(2)  or B<fdatasync>(2)  first."
7801 msgstr ""
7802 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7803 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7804 "B<fdatasync>(2)  を呼ぶべきである。"
7805
7806 #. type: SS
7807 #: build/C/man2/posix_fadvise.2:172
7808 #, no-wrap
7809 msgid "Architecture-specific variants"
7810 msgstr "アーキテクチャ固有の派生バージョン"
7811
7812 #. type: Plain text
7813 #: build/C/man2/posix_fadvise.2:189
7814 msgid ""
7815 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7816 "of registers (see B<syscall>(2)  for further detail).  On such "
7817 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7818 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7819 "and I<offset> arguments.  Therefore, these architectures define a version of "
7820 "the system call that orders the arguments suitably, but otherwise is "
7821 "otherwise exactly the same as B<posix_fadvise>()."
7822 msgstr ""
7823 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7824 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7825 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7826 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7827 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7828 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7829
7830 #. type: Plain text
7831 #: build/C/man2/posix_fadvise.2:191
7832 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7833 msgstr ""
7834 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7835
7836 #. type: Plain text
7837 #: build/C/man2/posix_fadvise.2:196
7838 #, no-wrap
7839 msgid ""
7840 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7841 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7842 msgstr ""
7843 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7844 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7845
7846 #. type: Plain text
7847 #: build/C/man2/posix_fadvise.2:204
7848 msgid ""
7849 "These architecture-specific details are generally hidden from applications "
7850 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7851 "appropriate architecture-specific system call."
7852 msgstr ""
7853 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7854 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7855 "なアーキテクチャ固有のシステムコールが呼び出される。"
7856
7857 #. type: Plain text
7858 #: build/C/man2/posix_fadvise.2:209
7859 msgid ""
7860 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7861 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7862 "through to the end of the file\"."
7863 msgstr ""
7864 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7865 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7866 "いた。"
7867
7868 #.  FIXME . Write a posix_fadvise(3) page.
7869 #. type: Plain text
7870 #: build/C/man2/posix_fadvise.2:215
7871 msgid ""
7872 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7873 "B<posix_madvise>(3)"
7874 msgstr ""
7875 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7876 "B<posix_madvise>(3)"
7877
7878 #. type: TH
7879 #: build/C/man3/posix_fallocate.3:25
7880 #, no-wrap
7881 msgid "POSIX_FALLOCATE"
7882 msgstr "POSIX_FALLOCATE"
7883
7884 #. type: TH
7885 #: build/C/man3/posix_fallocate.3:25
7886 #, no-wrap
7887 msgid "2014-06-03"
7888 msgstr "2014-06-03"
7889
7890 #. type: Plain text
7891 #: build/C/man3/posix_fallocate.3:28
7892 msgid "posix_fallocate - allocate file space"
7893 msgstr "posix_fallocate - ファイルのスペースを確保する"
7894
7895 #. type: Plain text
7896 #: build/C/man3/posix_fallocate.3:33
7897 #, no-wrap
7898 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7899 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7900
7901 #. type: Plain text
7902 #: build/C/man3/posix_fallocate.3:42
7903 msgid "B<posix_fallocate>():"
7904 msgstr "B<posix_fallocate>():"
7905
7906 #. type: Plain text
7907 #: build/C/man3/posix_fallocate.3:61
7908 msgid ""
7909 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7910 "the file referred to by the descriptor I<fd> for the bytes in the range "
7911 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7912 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7913 "range are guaranteed not to fail because of lack of disk space."
7914 msgstr ""
7915 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7916 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7917 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7918 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7919 "失敗しないことが保証される。"
7920
7921 #. type: Plain text
7922 #: build/C/man3/posix_fallocate.3:66
7923 msgid ""
7924 "If the size of the file is less than I<offset>+I<len>, then the file is "
7925 "increased to this size; otherwise the file size is left unchanged."
7926 msgstr ""
7927 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7928 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7929
7930 #. type: Plain text
7931 #: build/C/man3/posix_fallocate.3:72
7932 msgid ""
7933 "B<posix_fallocate>()  returns zero on success, or an error number on "
7934 "failure.  Note that I<errno> is not set."
7935 msgstr ""
7936 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7937 "す。 I<errno> が設定されない点に注意すること。"
7938
7939 #. type: Plain text
7940 #: build/C/man3/posix_fallocate.3:81
7941 msgid "I<offset+len> exceeds the maximum file size."
7942 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7943
7944 #. type: Plain text
7945 #: build/C/man3/posix_fallocate.3:91
7946 msgid "I<fd> does not refer to a regular file."
7947 msgstr "I<fd> が通常のファイルとして参照されていない。"
7948
7949 #. type: Plain text
7950 #: build/C/man3/posix_fallocate.3:100
7951 msgid "I<fd> refers to a pipe."
7952 msgstr "I<fd> がパイプを参照している。"
7953
7954 #. type: Plain text
7955 #: build/C/man3/posix_fallocate.3:103
7956 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7957 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7958
7959 #. type: Plain text
7960 #: build/C/man3/posix_fallocate.3:108
7961 msgid "The B<posix_fallocate>()  function is thread-safe."
7962 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
7963
7964 #. type: Plain text
7965 #: build/C/man3/posix_fallocate.3:133
7966 msgid ""
7967 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7968 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7969 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7970 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7971 "zero."
7972 msgstr ""
7973 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7974 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7975 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7976 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7977 "る。"
7978
7979 #. type: Plain text
7980 #: build/C/man3/posix_fallocate.3:138
7981 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7982 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7983
7984 #. type: TH
7985 #: build/C/man3/posix_memalign.3:29
7986 #, no-wrap
7987 msgid "POSIX_MEMALIGN"
7988 msgstr "POSIX_MEMALIGN"
7989
7990 #. type: TH
7991 #: build/C/man3/posix_memalign.3:29
7992 #, no-wrap
7993 msgid "2013-09-02"
7994 msgstr "2013-09-02"
7995
7996 #. type: Plain text
7997 #: build/C/man3/posix_memalign.3:32
7998 msgid ""
7999 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8000 "memory"
8001 msgstr ""
8002 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8003 "されたメモリの割り当てを行う"
8004
8005 #. type: Plain text
8006 #: build/C/man3/posix_memalign.3:35
8007 #, no-wrap
8008 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8009 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8010
8011 #. type: Plain text
8012 #: build/C/man3/posix_memalign.3:39
8013 #, no-wrap
8014 msgid ""
8015 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8016 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8017 "B<void *valloc(size_t >I<size>B<);>\n"
8018 msgstr ""
8019 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8020 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8021 "B<void *valloc(size_t >I<size>B<);>\n"
8022
8023 #. type: Plain text
8024 #: build/C/man3/posix_memalign.3:44
8025 #, no-wrap
8026 msgid ""
8027 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8028 "B<void *pvalloc(size_t >I<size>B<);>\n"
8029 msgstr ""
8030 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8031 "B<void *pvalloc(size_t >I<size>B<);>\n"
8032
8033 #. type: Plain text
8034 #: build/C/man3/posix_memalign.3:54
8035 msgid ""
8036 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8037 "E<gt>=\\ 600"
8038 msgstr ""
8039 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8040 "E<gt>=\\ 600"
8041
8042 #. type: Plain text
8043 #: build/C/man3/posix_memalign.3:57
8044 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8045 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8046
8047 #. type: Plain text
8048 #: build/C/man3/posix_memalign.3:59
8049 msgid "B<valloc>():"
8050 msgstr "B<valloc>():"
8051
8052 #. type: TP
8053 #: build/C/man3/posix_memalign.3:62
8054 #, no-wrap
8055 msgid "Since glibc 2.12:"
8056 msgstr "glibc 2.12 以降:"
8057
8058 #. type: Plain text
8059 #: build/C/man3/posix_memalign.3:69
8060 #, no-wrap
8061 msgid ""
8062 "_BSD_SOURCE ||\n"
8063 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8064 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8065 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8066 msgstr ""
8067 "_BSD_SOURCE ||\n"
8068 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8069 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8070 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8071
8072 #. type: TP
8073 #: build/C/man3/posix_memalign.3:71
8074 #, no-wrap
8075 msgid "Before glibc 2.12:"
8076 msgstr "glibc 2.12 より前:"
8077
8078 #. type: Plain text
8079 #: build/C/man3/posix_memalign.3:75
8080 msgid ""
8081 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8082 "_XOPEN_SOURCE_EXTENDED"
8083 msgstr ""
8084 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8085 "_XOPEN_SOURCE_EXTENDED"
8086
8087 #. type: Plain text
8088 #: build/C/man3/posix_memalign.3:82
8089 msgid ""
8090 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8091 "declaration of B<valloc>(); no feature test macros are required.)"
8092 msgstr ""
8093 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
8094 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8095
8096 #.  glibc does this:
8097 #. type: Plain text
8098 #: build/C/man3/posix_memalign.3:104
8099 msgid ""
8100 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8101 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8102 "memory will be a multiple of I<alignment>, which must be a power of two and "
8103 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8104 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8105 "successfully passed to B<free>(3)."
8106 msgstr ""
8107 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
8108 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
8109 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
8110 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
8111 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
8112 "B<free>(3)  に問題なく渡すことができる。"
8113
8114 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8115 #.  but no standards govern this.
8116 #. type: Plain text
8117 #: build/C/man3/posix_memalign.3:115
8118 msgid ""
8119 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8120 "pointer to the allocated memory.  The memory address will be a multiple of "
8121 "I<alignment>, which must be a power of two."
8122 msgstr ""
8123 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
8124 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
8125 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8126
8127 #. type: Plain text
8128 #: build/C/man3/posix_memalign.3:124
8129 msgid ""
8130 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8131 "the added restriction that I<size> should be a multiple of I<alignment>."
8132 msgstr ""
8133 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8134 "I<alignment>\n"
8135 "の倍数でなければならないという追加の制限がある点が異なる。"
8136
8137 #. type: Plain text
8138 #: build/C/man3/posix_memalign.3:133
8139 msgid ""
8140 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8141 "pointer to the allocated memory.  The memory address will be a multiple of "
8142 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8143 msgstr ""
8144 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
8145 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
8146 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
8147 "る。"
8148
8149 #. type: Plain text
8150 #: build/C/man3/posix_memalign.3:140
8151 msgid ""
8152 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8153 "the size of the allocation up to the next multiple of the system page size."
8154 msgstr ""
8155 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8156 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8157
8158 #. type: Plain text
8159 #: build/C/man3/posix_memalign.3:142
8160 msgid "For all of these functions, the memory is not zeroed."
8161 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
8162
8163 #. type: Plain text
8164 #: build/C/man3/posix_memalign.3:149
8165 msgid ""
8166 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8167 "pointer to the allocated memory, or NULL if the request fails."
8168 msgstr ""
8169 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8170 "た\n"
8171 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
8172
8173 #. type: Plain text
8174 #: build/C/man3/posix_memalign.3:157
8175 msgid ""
8176 "B<posix_memalign>()  returns zero on success, or one of the error values "
8177 "listed in the next section on failure.  The value of I<errno> is "
8178 "indeterminate after a call to B<posix_memalign>()."
8179 msgstr ""
8180 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8181 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8182 "I<errno> の値は不定である。"
8183
8184 #. type: Plain text
8185 #: build/C/man3/posix_memalign.3:164
8186 msgid ""
8187 "The I<alignment> argument was not a power of two, or was not a multiple of "
8188 "I<sizeof(void\\ *)>."
8189 msgstr ""
8190 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8191 "かった。"
8192
8193 #. type: Plain text
8194 #: build/C/man3/posix_memalign.3:167
8195 msgid "There was insufficient memory to fulfill the allocation request."
8196 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8197
8198 #. type: Plain text
8199 #: build/C/man3/posix_memalign.3:174
8200 msgid ""
8201 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8202 "available in all Linux libc libraries."
8203 msgstr ""
8204 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8205 "すべての Linux libc ライブラリで使用可能である。"
8206
8207 #. type: Plain text
8208 #: build/C/man3/posix_memalign.3:178
8209 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8210 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8211
8212 #. type: Plain text
8213 #: build/C/man3/posix_memalign.3:182
8214 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8215 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8216
8217 #. type: Plain text
8218 #: build/C/man3/posix_memalign.3:189
8219 msgid ""
8220 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8221 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8222 "POSIX.1-2001."
8223 msgstr ""
8224 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8225 "り、\n"
8226 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8227
8228 #. type: Plain text
8229 #: build/C/man3/posix_memalign.3:193
8230 msgid "The function B<pvalloc>()  is a GNU extension."
8231 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8232
8233 #. type: Plain text
8234 #: build/C/man3/posix_memalign.3:197
8235 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8236 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8237
8238 #. type: Plain text
8239 #: build/C/man3/posix_memalign.3:201
8240 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8241 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8242
8243 #. type: Plain text
8244 #: build/C/man3/posix_memalign.3:206
8245 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8246 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8247
8248 #. type: SS
8249 #: build/C/man3/posix_memalign.3:206
8250 #, no-wrap
8251 msgid "Headers"
8252 msgstr "ヘッダ"
8253
8254 #. type: Plain text
8255 #: build/C/man3/posix_memalign.3:210
8256 msgid ""
8257 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8258 "hE<gt>>."
8259 msgstr ""
8260 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8261 "の意見が一致している。"
8262
8263 #. type: Plain text
8264 #: build/C/man3/posix_memalign.3:214
8265 msgid ""
8266 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8267 "of I<E<lt>malloc.hE<gt>>."
8268 msgstr ""
8269 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8270 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8271
8272 #. type: Plain text
8273 #: build/C/man3/posix_memalign.3:221
8274 msgid ""
8275 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8276 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8277 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8278 "above)."
8279 msgstr ""
8280 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8281 "libc4,5\n"
8282 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8283 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8284
8285 #. type: Plain text
8286 #: build/C/man3/posix_memalign.3:230
8287 msgid ""
8288 "On many systems there are alignment restrictions, for example, on buffers "
8289 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8290 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8291 "use B<posix_memalign>()  to satisfy this requirement."
8292 msgstr ""
8293 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8294 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8295 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8296 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8297 "と、この必要条件を満たすことができる。"
8298
8299 #. type: Plain text
8300 #: build/C/man3/posix_memalign.3:239
8301 msgid ""
8302 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8303 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8304 "is correct."
8305 msgstr ""
8306 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8307 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8308 "確認を行わないかもしれない。"
8309
8310 #.  Other systems allow passing the result of
8311 #.  .IR valloc ()
8312 #.  to
8313 #.  .IR free (3),
8314 #.  but not to
8315 #.  .IR realloc (3).
8316 #. type: Plain text
8317 #: build/C/man3/posix_memalign.3:267
8318 msgid ""
8319 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8320 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8321 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8322 "only a pointer obtained from B<malloc>(3), while, for example, "
8323 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8324 "The glibc implementation allows memory obtained from any of these functions "
8325 "to be reclaimed with B<free>(3)."
8326 msgstr ""
8327 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8328 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8329 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8330 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8331 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8332 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8333 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8334 "B<free>(3) で再利用することができる。"
8335
8336 #. type: Plain text
8337 #: build/C/man3/posix_memalign.3:272
8338 msgid ""
8339 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8340 "these functions are needed only if you require larger alignment values."
8341 msgstr ""
8342 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8343 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8344 "ト\n"
8345 "が必要な場合だけである。"
8346
8347 #. type: Plain text
8348 #: build/C/man3/posix_memalign.3:277
8349 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8350 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8351
8352 #. type: TH
8353 #: build/C/man2/readahead.2:28
8354 #, no-wrap
8355 msgid "READAHEAD"
8356 msgstr "READAHEAD"
8357
8358 #. type: TH
8359 #: build/C/man2/readahead.2:28
8360 #, no-wrap
8361 msgid "2014-03-15"
8362 msgstr "2014-03-15"
8363
8364 #. type: Plain text
8365 #: build/C/man2/readahead.2:31
8366 msgid "readahead - initiate file readahead into page cache"
8367 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8368
8369 #. type: Plain text
8370 #: build/C/man2/readahead.2:37
8371 #, no-wrap
8372 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8373 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8374
8375 #. type: Plain text
8376 #: build/C/man2/readahead.2:44
8377 msgid ""
8378 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8379 "that file will be satisfied from the cache, and not block on disk I/O "
8380 "(assuming the readahead was initiated early enough and that other activity "
8381 "on the system did not in the meantime flush pages from the cache)."
8382 msgstr ""
8383 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8384 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8385 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8386 "ページがフラッシュされない場合である)。"
8387
8388 #. type: Plain text
8389 #: build/C/man2/readahead.2:66
8390 msgid ""
8391 "The I<fd> argument is a file descriptor identifying the file which is to be "
8392 "read.  The I<offset> argument specifies the starting point from which data "
8393 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8394 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8395 "page boundary and bytes are read up to the next page boundary greater than "
8396 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8397 "of the file.  The current file offset of the open file referred to by I<fd> "
8398 "is left unchanged."
8399 msgstr ""
8400 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8401 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8402 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8403 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8404 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8405 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8406 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8407
8408 #. type: Plain text
8409 #: build/C/man2/readahead.2:72
8410 msgid ""
8411 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8412 "I<errno> set to indicate the cause of the error."
8413 msgstr ""
8414 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8415 "ラーの原因を示す値を設定する。"
8416
8417 #. type: Plain text
8418 #: build/C/man2/readahead.2:77
8419 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8420 msgstr ""
8421 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8422 "ていない。"
8423
8424 #. type: Plain text
8425 #: build/C/man2/readahead.2:83
8426 msgid ""
8427 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8428 msgstr ""
8429 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8430 "ファイルであった。"
8431
8432 #. type: Plain text
8433 #: build/C/man2/readahead.2:88
8434 msgid ""
8435 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8436 "been provided since version 2.3."
8437 msgstr ""
8438 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8439 "は glibc バージョン 2.3 以降で行われている。"
8440
8441 #. type: Plain text
8442 #: build/C/man2/readahead.2:93
8443 msgid ""
8444 "The B<readahead>()  system call is Linux-specific, and its use should be "
8445 "avoided in portable applications."
8446 msgstr ""
8447 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8448 "は 使用を避けるべきである。"
8449
8450 #. type: Plain text
8451 #: build/C/man2/readahead.2:98
8452 msgid ""
8453 "On some 32-bit architectures, the calling signature for this system call "
8454 "differs, for the reasons described in B<syscall>(2)."
8455 msgstr ""
8456 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8457 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8458
8459 #. type: Plain text
8460 #: build/C/man2/readahead.2:107
8461 msgid ""
8462 "B<readahead>()  attempts to schedule the reads in the background and return "
8463 "immediately.  However, it may block while it reads the filesystem metadata "
8464 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8465 "on large files using indirect blocks instead of extents, giving the "
8466 "appearance that the call blocks until the requested data has been read."
8467 msgstr ""
8468 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8469 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8470 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8471 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8472 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8473 "に見える。"
8474
8475 #. type: Plain text
8476 #: build/C/man2/readahead.2:113
8477 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8478 msgstr ""
8479 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8480
8481 #. type: TH
8482 #: build/C/man2/remap_file_pages.2:28
8483 #, no-wrap
8484 msgid "REMAP_FILE_PAGES"
8485 msgstr "REMAP_FILE_PAGES"
8486
8487 #. type: Plain text
8488 #: build/C/man2/remap_file_pages.2:31
8489 msgid "remap_file_pages - create a nonlinear file mapping"
8490 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8491
8492 #. type: Plain text
8493 #: build/C/man2/remap_file_pages.2:35
8494 #, no-wrap
8495 msgid ""
8496 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8497 "B<#include E<lt>sys/mman.hE<gt>>\n"
8498 msgstr ""
8499 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8500 "B<#include E<lt>sys/mman.hE<gt>>\n"
8501
8502 #. type: Plain text
8503 #: build/C/man2/remap_file_pages.2:38
8504 #, no-wrap
8505 msgid ""
8506 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8507 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8508 msgstr ""
8509 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8510 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8511
8512 #.  commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8513 #.  http://lwn.net/Articles/597632/
8514 #. type: Plain text
8515 #: build/C/man2/remap_file_pages.2:47
8516 msgid ""
8517 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8518 "eventually be replaced by a slower in-kernel emulation.  Those few "
8519 "applications that use this system call should consider migrating to "
8520 "alternatives."
8521 msgstr ""
8522
8523 #. type: Plain text
8524 #: build/C/man2/remap_file_pages.2:59
8525 msgid ""
8526 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8527 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8528 "nonsequential order in memory.  The advantage of using "
8529 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8530 "former approach does not require the kernel to create additional VMA "
8531 "(Virtual Memory Area) data structures."
8532 msgstr ""
8533 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8534 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8535 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8536 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8537 "域)  データ構造体を追加で作成する必要がないことである。"
8538
8539 #. type: Plain text
8540 #: build/C/man2/remap_file_pages.2:61
8541 msgid "To create a nonlinear mapping we perform the following steps:"
8542 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8543
8544 #. type: TP
8545 #: build/C/man2/remap_file_pages.2:61
8546 #, no-wrap
8547 msgid "1."
8548 msgstr "1."
8549
8550 #. type: Plain text
8551 #: build/C/man2/remap_file_pages.2:69
8552 msgid ""
8553 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8554 "mapping must be created with the B<MAP_SHARED> flag."
8555 msgstr ""
8556 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8557 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8558 "い。"
8559
8560 #. type: TP
8561 #: build/C/man2/remap_file_pages.2:69
8562 #, no-wrap
8563 msgid "2."
8564 msgstr "2."
8565
8566 #. type: Plain text
8567 #: build/C/man2/remap_file_pages.2:77
8568 msgid ""
8569 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8570 "correspondence between the pages of the mapping and the pages of the file.  "
8571 "It is possible to map the same page of a file into multiple locations within "
8572 "the mapped region."
8573 msgstr ""
8574 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8575 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8576 "所に マップすることが可能である。"
8577
8578 #. type: Plain text
8579 #: build/C/man2/remap_file_pages.2:88
8580 msgid ""
8581 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8582 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8583 "system page size; I<size> is the length of the region in bytes."
8584 msgstr ""
8585 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8586 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8587 "る。 I<size> は領域の長さであり、単位はバイトである。"
8588
8589 #. type: Plain text
8590 #: build/C/man2/remap_file_pages.2:106
8591 msgid ""
8592 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8593 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8594 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8595 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8596 "and I<size> will be placed."
8597 msgstr ""
8598 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8599 "成したいページの マッピングを識別することである。 よって I<addr> は "
8600 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8601 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8602 "予定のアドレスを、 I<addr> によって指定することである。"
8603
8604 #.  This rounding is weird, and not consistent with the treatment of
8605 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8606 #.  MTK, 14 Sep 2005
8607 #. type: Plain text
8608 #: build/C/man2/remap_file_pages.2:120
8609 msgid ""
8610 "The values specified in I<addr> and I<size> should be multiples of the "
8611 "system page size.  If they are not, then the kernel rounds I<both> values "
8612 "I<down> to the nearest multiple of the page size."
8613 msgstr ""
8614 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8615 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8616 "「切り下げる」。"
8617
8618 #. type: Plain text
8619 #: build/C/man2/remap_file_pages.2:124
8620 msgid "The I<prot> argument must be specified as 0."
8621 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8622
8623 #. type: Plain text
8624 #: build/C/man2/remap_file_pages.2:132
8625 msgid ""
8626 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8627 "other than B<MAP_NONBLOCK> are ignored."
8628 msgstr ""
8629 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8630 "の全てのフラグは無視される。"
8631
8632 #. type: Plain text
8633 #: build/C/man2/remap_file_pages.2:139
8634 msgid ""
8635 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8636 "I<errno> is set appropriately."
8637 msgstr ""
8638 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8639 "れ、 I<errno> が適切に設定される。"
8640
8641 #. type: Plain text
8642 #: build/C/man2/remap_file_pages.2:147
8643 msgid ""
8644 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8645 "flag."
8646 msgstr ""
8647 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8648 "いない。"
8649
8650 #.  And possibly others from vma->vm_ops->populate()
8651 #. type: Plain text
8652 #: build/C/man2/remap_file_pages.2:156
8653 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8654 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8655
8656 #. type: Plain text
8657 #: build/C/man2/remap_file_pages.2:161
8658 msgid ""
8659 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8660 "support was added in version 2.3.3."
8661 msgstr ""
8662 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8663 "サポートは glibc バージョン 2.3.3 で追加された。"
8664
8665 #. type: Plain text
8666 #: build/C/man2/remap_file_pages.2:165
8667 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8668 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8669
8670 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8671 #. type: Plain text
8672 #: build/C/man2/remap_file_pages.2:176
8673 msgid ""
8674 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8675 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8676 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8677 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8678 "addresses."
8679 msgstr ""
8680
8681 #. type: Plain text
8682 #: build/C/man2/remap_file_pages.2:183
8683 msgid ""
8684 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8685 "B<msync>(2)"
8686 msgstr ""
8687 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8688 "B<msync>(2)"
8689
8690 #. type: TH
8691 #: build/C/man3/shm_open.3:26
8692 #, no-wrap
8693 msgid "SHM_OPEN"
8694 msgstr "SHM_OPEN"
8695
8696 #. type: TH
8697 #: build/C/man3/shm_open.3:26
8698 #, no-wrap
8699 msgid "2009-02-25"
8700 msgstr "2009-02-25"
8701
8702 #. type: Plain text
8703 #: build/C/man3/shm_open.3:29
8704 msgid ""
8705 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8706 msgstr ""
8707 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8708 "う"
8709
8710 #. type: Plain text
8711 #: build/C/man3/shm_open.3:33
8712 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8713 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8714
8715 #. type: Plain text
8716 #: build/C/man3/shm_open.3:35
8717 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8718 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8719
8720 #. type: Plain text
8721 #: build/C/man3/shm_open.3:37
8722 msgid ""
8723 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8724 msgstr ""
8725 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8726
8727 #. type: Plain text
8728 #: build/C/man3/shm_open.3:39
8729 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8730 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8731
8732 #. type: Plain text
8733 #: build/C/man3/shm_open.3:41
8734 msgid "Link with I<-lrt>."
8735 msgstr "I<-lrt> でリンクする。"
8736
8737 #. type: Plain text
8738 #: build/C/man3/shm_open.3:53
8739 msgid ""
8740 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8741 "memory object.  A POSIX shared memory object is in effect a handle which can "
8742 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8743 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8744 "removing an object previously created by B<shm_open>()."
8745 msgstr ""
8746 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8747 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8748 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を "
8749 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8750 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8751
8752 #.  glibc allows the initial slash to be omitted, and makes
8753 #.  multiple initial slashes equivalent to a single slash.
8754 #.  This differs from the implementation of POSIX message queues.
8755 #.  glibc allows subdirectory components in the name, in which
8756 #.  case the subdirectory must exist under /dev/shm, and allow the
8757 #.  required permissions if a user wants to create a shared memory
8758 #.  object in that subdirectory.
8759 #. type: Plain text
8760 #: build/C/man3/shm_open.3:74
8761 msgid ""
8762 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8763 "specifies the shared memory object to be created or opened.  For portable "
8764 "use, a shared memory object should be identified by a name of the form I</"
8765 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8766 "255) characters consisting of an initial slash, followed by one or more "
8767 "characters, none of which are slashes."
8768 msgstr ""
8769 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8770 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8771 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8772 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8773 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8774
8775 #. type: Plain text
8776 #: build/C/man3/shm_open.3:81
8777 msgid ""
8778 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8779 "or B<O_RDWR> and any of the other flags listed here:"
8780 msgstr ""
8781 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8782 "述べる他のフラグの論理和をとったもの を指定する。"
8783
8784 #. type: TP
8785 #: build/C/man3/shm_open.3:81
8786 #, no-wrap
8787 msgid "B<O_RDONLY>"
8788 msgstr "B<O_RDONLY>"
8789
8790 #. type: Plain text
8791 #: build/C/man3/shm_open.3:89
8792 msgid ""
8793 "Open the object for read access.  A shared memory object opened in this way "
8794 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8795 msgstr ""
8796 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8797 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8798 "B<mmap>(2)  することができる。"
8799
8800 #. type: TP
8801 #: build/C/man3/shm_open.3:89
8802 #, no-wrap
8803 msgid "B<O_RDWR>"
8804 msgstr "B<O_RDWR>"
8805
8806 #. type: Plain text
8807 #: build/C/man3/shm_open.3:92
8808 msgid "Open the object for read-write access."
8809 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8810
8811 #. type: TP
8812 #: build/C/man3/shm_open.3:92
8813 #, no-wrap
8814 msgid "B<O_CREAT>"
8815 msgstr "B<O_CREAT>"
8816
8817 #.  In truth it is actually the filesystem IDs on Linux, but these
8818 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8819 #. type: Plain text
8820 #: build/C/man3/shm_open.3:112
8821 msgid ""
8822 "Create the shared memory object if it does not exist.  The user and group "
8823 "ownership of the object are taken from the corresponding effective IDs of "
8824 "the calling process, and the object's permission bits are set according to "
8825 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8826 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8827 "A set of macro constants which can be used to define I<mode> is listed in "
8828 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8829 "including I<E<lt>sys/stat.hE<gt>>.)"
8830 msgstr ""
8831 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8832 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8833 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8834 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8835 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8836 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8837 "hE<gt>> のインクルードにより得られる)。"
8838
8839 #. type: Plain text
8840 #: build/C/man3/shm_open.3:118
8841 msgid ""
8842 "A new shared memory object initially has zero length\\(emthe size of the "
8843 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8844 "shared memory object are automatically initialized to 0."
8845 msgstr ""
8846 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8847 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8848 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8849
8850 #. type: TP
8851 #: build/C/man3/shm_open.3:118
8852 #, no-wrap
8853 msgid "B<O_EXCL>"
8854 msgstr "B<O_EXCL>"
8855
8856 #. type: Plain text
8857 #: build/C/man3/shm_open.3:127
8858 msgid ""
8859 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8860 "I<name> already exists, return an error.  The check for the existence of the "
8861 "object, and its creation if it does not exist, are performed atomically."
8862 msgstr ""
8863 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8864 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8865 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8866 "atomically)。"
8867
8868 #. type: TP
8869 #: build/C/man3/shm_open.3:127
8870 #, no-wrap
8871 msgid "B<O_TRUNC>"
8872 msgstr "B<O_TRUNC>"
8873
8874 #. type: Plain text
8875 #: build/C/man3/shm_open.3:130
8876 msgid "If the shared memory object already exists, truncate it to zero bytes."
8877 msgstr ""
8878 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8879 "切り詰める。"
8880
8881 #. type: Plain text
8882 #: build/C/man3/shm_open.3:133
8883 msgid ""
8884 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8885 "hE<gt>>."
8886 msgstr ""
8887 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8888
8889 #. type: Plain text
8890 #: build/C/man3/shm_open.3:144
8891 msgid ""
8892 "On successful completion B<shm_open>()  returns a new file descriptor "
8893 "referring to the shared memory object.  This file descriptor is guaranteed "
8894 "to be the lowest-numbered file descriptor not previously opened within the "
8895 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8896 "descriptor."
8897 msgstr ""
8898 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8899 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8900 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8901 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8902 "ファイル・ディスクリプタに設定される。"
8903
8904 #. type: Plain text
8905 #: build/C/man3/shm_open.3:153
8906 msgid ""
8907 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8908 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8909 "the file descriptor may be closed without affecting the memory mapping."
8910 msgstr ""
8911 "通常、これらのファイル・ディスクリプタは、この後続けて実行される "
8912 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
8913 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタを"
8914 "クローズしてもよく、 クローズしてもメモリ・マッピングに影響を与えることはな"
8915 "い。"
8916
8917 #. type: Plain text
8918 #: build/C/man3/shm_open.3:171
8919 msgid ""
8920 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8921 "shared memory object name, and, once all processes have unmapped the object, "
8922 "de-allocates and destroys the contents of the associated memory region.  "
8923 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8924 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8925 "case a new, distinct object is created)."
8926 msgstr ""
8927 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8928 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8929 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8930 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8931 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8932 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8933
8934 #. type: Plain text
8935 #: build/C/man3/shm_open.3:180
8936 msgid ""
8937 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8938 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8939 "or -1 on error."
8940 msgstr ""
8941 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8942 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8943 "を、エラーが起こった場合 -1 を返す。"
8944
8945 #. type: Plain text
8946 #: build/C/man3/shm_open.3:187
8947 msgid ""
8948 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8949 "which may appear in I<errno> include the following:"
8950 msgstr ""
8951 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8952 "される値は以下の通りである:"
8953
8954 #. type: Plain text
8955 #: build/C/man3/shm_open.3:192
8956 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8957 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8958
8959 #. type: Plain text
8960 #: build/C/man3/shm_open.3:202
8961 msgid ""
8962 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8963 "B<O_TRUNC> was specified and the caller does not have write permission on "
8964 "the object."
8965 msgstr ""
8966 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8967 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8968 "み権限が なかった。"
8969
8970 #. type: TP
8971 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
8972 #, no-wrap
8973 msgid "B<EEXIST>"
8974 msgstr "B<EEXIST>"
8975
8976 #. type: Plain text
8977 #: build/C/man3/shm_open.3:213
8978 msgid ""
8979 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8980 "shared memory object specified by I<name> already exists."
8981 msgstr ""
8982 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8983 "定された共有メモリ・オブジェクトが既に存在した。"
8984
8985 #. type: Plain text
8986 #: build/C/man3/shm_open.3:220
8987 msgid "The I<name> argument to B<shm_open>()  was invalid."
8988 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8989
8990 #. type: TP
8991 #: build/C/man3/shm_open.3:220
8992 #, no-wrap
8993 msgid "B<EMFILE>"
8994 msgstr "B<EMFILE>"
8995
8996 #. type: Plain text
8997 #: build/C/man3/shm_open.3:223
8998 msgid "The process already has the maximum number of files open."
8999 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9000
9001 #. type: TP
9002 #: build/C/man3/shm_open.3:223
9003 #, no-wrap
9004 msgid "B<ENAMETOOLONG>"
9005 msgstr "B<ENAMETOOLONG>"
9006
9007 #. type: Plain text
9008 #: build/C/man3/shm_open.3:229
9009 msgid "The length of I<name> exceeds B<PATH_MAX>."
9010 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9011
9012 #. type: Plain text
9013 #: build/C/man3/shm_open.3:233
9014 msgid ""
9015 "The limit on the total number of files open on the system has been reached."
9016 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9017
9018 #. type: TP
9019 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9020 #: build/C/man2/shmget.2:225
9021 #, no-wrap
9022 msgid "B<ENOENT>"
9023 msgstr "B<ENOENT>"
9024
9025 #. type: Plain text
9026 #: build/C/man3/shm_open.3:242
9027 msgid ""
9028 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
9029 "B<O_CREAT> was not specified."
9030 msgstr ""
9031 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
9032 "B<O_CREAT> が指定されていなかった。"
9033
9034 #. type: Plain text
9035 #: build/C/man3/shm_open.3:249
9036 msgid ""
9037 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9038 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9039
9040 #. type: Plain text
9041 #: build/C/man3/shm_open.3:251
9042 msgid "These functions are provided in glibc 2.2 and later."
9043 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9044
9045 #. type: Plain text
9046 #: build/C/man3/shm_open.3:257
9047 msgid ""
9048 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9049 "object is set to either the calling process's effective group ID or \"a "
9050 "system default group ID\"."
9051 msgstr ""
9052 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
9053 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9054 "ID」 のどちらかに設定される、と書かれている。"
9055
9056 #. type: Plain text
9057 #: build/C/man3/shm_open.3:266
9058 msgid ""
9059 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9060 "unspecified.  On Linux, this will successfully truncate an existing shared "
9061 "memory object\\(emthis may not be so on other UNIX systems."
9062 msgstr ""
9063 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9064 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
9065 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9066
9067 #. type: Plain text
9068 #: build/C/man3/shm_open.3:271
9069 msgid ""
9070 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9071 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9072 msgstr ""
9073 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
9074 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9075
9076 #. type: Plain text
9077 #: build/C/man3/shm_open.3:282
9078 msgid ""
9079 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9080 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9081 msgstr ""
9082 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9083 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9084
9085 #. type: TH
9086 #: build/C/man7/shm_overview.7:27
9087 #, no-wrap
9088 msgid "SHM_OVERVIEW"
9089 msgstr "SHM_OVERVIEW"
9090
9091 #. type: TH
9092 #: build/C/man7/shm_overview.7:27
9093 #, no-wrap
9094 msgid "2010-09-10"
9095 msgstr "2010-09-10"
9096
9097 #. type: Plain text
9098 #: build/C/man7/shm_overview.7:30
9099 msgid "shm_overview - overview of POSIX shared memory"
9100 msgstr "shm_overview - POSIX 共有メモリの概要"
9101
9102 #. type: Plain text
9103 #: build/C/man7/shm_overview.7:33
9104 msgid ""
9105 "The POSIX shared memory API allows processes to communicate information by "
9106 "sharing a region of memory."
9107 msgstr ""
9108 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
9109 "情報をやり取りすることができる。"
9110
9111 #. type: Plain text
9112 #: build/C/man7/shm_overview.7:35
9113 msgid "The interfaces employed in the API are:"
9114 msgstr "この API では以下のインターフェースが採用されている。"
9115
9116 #. type: TP
9117 #: build/C/man7/shm_overview.7:35
9118 #, no-wrap
9119 msgid "B<shm_open>(3)"
9120 msgstr "B<shm_open>(3)"
9121
9122 #. type: Plain text
9123 #: build/C/man7/shm_overview.7:42
9124 msgid ""
9125 "Create and open a new object, or open an existing object.  This is analogous "
9126 "to B<open>(2).  The call returns a file descriptor for use by the other "
9127 "interfaces listed below."
9128 msgstr ""
9129 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9130 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9131 "る ファイルディスクリプタを返す。"
9132
9133 #. type: TP
9134 #: build/C/man7/shm_overview.7:42
9135 #, no-wrap
9136 msgid "B<ftruncate>(2)"
9137 msgstr "B<ftruncate>(2)"
9138
9139 #. type: Plain text
9140 #: build/C/man7/shm_overview.7:46
9141 msgid ""
9142 "Set the size of the shared memory object.  (A newly created shared memory "
9143 "object has a length of zero.)"
9144 msgstr "共有メモリオブジェクトの大きさを設定する。"
9145
9146 #. type: Plain text
9147 #: build/C/man7/shm_overview.7:50
9148 msgid ""
9149 "Map the shared memory object into the virtual address space of the calling "
9150 "process."
9151 msgstr ""
9152 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
9153
9154 #. type: TP
9155 #: build/C/man7/shm_overview.7:50
9156 #, no-wrap
9157 msgid "B<munmap>(2)"
9158 msgstr "B<munmap>(2)"
9159
9160 #. type: Plain text
9161 #: build/C/man7/shm_overview.7:54
9162 msgid ""
9163 "Unmap the shared memory object from the virtual address space of the calling "
9164 "process."
9165 msgstr ""
9166 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
9167 "る。"
9168
9169 #. type: TP
9170 #: build/C/man7/shm_overview.7:54
9171 #, no-wrap
9172 msgid "B<shm_unlink>(3)"
9173 msgstr "B<shm_unlink>(3)"
9174
9175 #. type: Plain text
9176 #: build/C/man7/shm_overview.7:57
9177 msgid "Remove a shared memory object name."
9178 msgstr "共有メモリオブジェクト名を削除する。"
9179
9180 #. type: TP
9181 #: build/C/man7/shm_overview.7:57
9182 #, no-wrap
9183 msgid "B<close>(2)"
9184 msgstr "B<close>(2)"
9185
9186 #. type: Plain text
9187 #: build/C/man7/shm_overview.7:62
9188 msgid ""
9189 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9190 "needed."
9191 msgstr ""
9192 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
9193 "のファイルディスクリプタをクローズする。"
9194
9195 #. type: TP
9196 #: build/C/man7/shm_overview.7:62
9197 #, no-wrap
9198 msgid "B<fstat>(2)"
9199 msgstr "B<fstat>(2)"
9200
9201 #. type: Plain text
9202 #: build/C/man7/shm_overview.7:76
9203 msgid ""
9204 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9205 "the information returned by this call are the object's size (I<st_size>), "
9206 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9207 msgstr ""
9208 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
9209 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
9210 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9211
9212 #. type: TP
9213 #: build/C/man7/shm_overview.7:76
9214 #, no-wrap
9215 msgid "B<fchown>(2)"
9216 msgstr "B<fchown>(2)"
9217
9218 #. type: Plain text
9219 #: build/C/man7/shm_overview.7:79
9220 msgid "To change the ownership of a shared memory object."
9221 msgstr "共有メモリオブジェクトの所有権を変更する。"
9222
9223 #. type: TP
9224 #: build/C/man7/shm_overview.7:79
9225 #, no-wrap
9226 msgid "B<fchmod>(2)"
9227 msgstr "B<fchmod>(2)"
9228
9229 #. type: Plain text
9230 #: build/C/man7/shm_overview.7:82
9231 msgid "To change the permissions of a shared memory object."
9232 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9233
9234 #. type: SS
9235 #: build/C/man7/shm_overview.7:82
9236 #, no-wrap
9237 msgid "Versions"
9238 msgstr "Versions"
9239
9240 #. type: Plain text
9241 #: build/C/man7/shm_overview.7:84
9242 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9243 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9244
9245 #. type: SS
9246 #: build/C/man7/shm_overview.7:84
9247 #, no-wrap
9248 msgid "Persistence"
9249 msgstr "持続性"
9250
9251 #. type: Plain text
9252 #: build/C/man7/shm_overview.7:89
9253 msgid ""
9254 "POSIX shared memory objects have kernel persistence: a shared memory object "
9255 "will exist until the system is shut down, or until all processes have "
9256 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9257 msgstr ""
9258 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9259 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9260 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9261
9262 #. type: SS
9263 #: build/C/man7/shm_overview.7:89
9264 #, no-wrap
9265 msgid "Linking"
9266 msgstr "リンク"
9267
9268 #. type: Plain text
9269 #: build/C/man7/shm_overview.7:94
9270 msgid ""
9271 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9272 "to link against the real-time library, I<librt>."
9273 msgstr ""
9274 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9275 "タイムライブラリ I<librt> とリンクしなければならない。"
9276
9277 #. type: SS
9278 #: build/C/man7/shm_overview.7:94
9279 #, no-wrap
9280 msgid "Accessing shared memory objects via the filesystem"
9281 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9282
9283 #. type: Plain text
9284 #: build/C/man7/shm_overview.7:101
9285 msgid ""
9286 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9287 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9288 "supports the use of access control lists (ACLs)  to control the permissions "
9289 "of objects in the virtual filesystem."
9290 msgstr ""
9291 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9292 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9293 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9294 "スト (ACL; access control lists) を使うことができる。"
9295
9296 #. type: Plain text
9297 #: build/C/man7/shm_overview.7:106
9298 msgid ""
9299 "Typically, processes must synchronize their access to a shared memory "
9300 "object, using, for example, POSIX semaphores."
9301 msgstr ""
9302 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9303 "使ってプロセス間で同期をとらなければならない。"
9304
9305 #. type: Plain text
9306 #: build/C/man7/shm_overview.7:114
9307 msgid ""
9308 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9309 "memory API.  POSIX shared memory provides a simpler, and better designed "
9310 "interface; on the other hand POSIX shared memory is somewhat less widely "
9311 "available (especially on older systems) than System V shared memory."
9312 msgstr ""
9313 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9314 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9315 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9316 "システムが少ない (特に、古いシステムでは少ない)。"
9317
9318 #. type: Plain text
9319 #: build/C/man7/shm_overview.7:127
9320 msgid ""
9321 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9322 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9323 "B<shm_unlink>(3), B<sem_overview>(7)"
9324 msgstr ""
9325 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9326 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9327 "B<shm_unlink>(3), B<sem_overview>(7)"
9328
9329 #. type: TH
9330 #: build/C/man2/shmctl.2:45
9331 #, no-wrap
9332 msgid "SHMCTL"
9333 msgstr "SHMCTL"
9334
9335 #. type: TH
9336 #: build/C/man2/shmctl.2:45
9337 #, no-wrap
9338 msgid "2014-02-07"
9339 msgstr "2014-02-07"
9340
9341 #. type: Plain text
9342 #: build/C/man2/shmctl.2:48
9343 msgid "shmctl - System V shared memory control"
9344 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9345
9346 #. type: Plain text
9347 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9348 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9349 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9350
9351 #. type: Plain text
9352 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9353 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9354 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9355
9356 #. type: Plain text
9357 #: build/C/man2/shmctl.2:55
9358 msgid ""
9359 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9360 msgstr ""
9361 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9362
9363 #. type: Plain text
9364 #: build/C/man2/shmctl.2:62
9365 msgid ""
9366 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9367 "\\ V shared memory segment whose identifier is given in I<shmid>."
9368 msgstr ""
9369 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリ・セグメントに対し"
9370 "て I<cmd> で指示した制御命令を実行する。"
9371
9372 #. type: Plain text
9373 #: build/C/man2/shmctl.2:67
9374 msgid ""
9375 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9376 "I<E<lt>sys/shm.hE<gt>> as follows:"
9377 msgstr ""
9378 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9379 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9380
9381 #. type: Plain text
9382 #: build/C/man2/shmctl.2:81
9383 #, no-wrap
9384 msgid ""
9385 "struct shmid_ds {\n"
9386 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9387 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9388 "    time_t          shm_atime;   /* Last attach time */\n"
9389 "    time_t          shm_dtime;   /* Last detach time */\n"
9390 "    time_t          shm_ctime;   /* Last change time */\n"
9391 "    pid_t           shm_cpid;    /* PID of creator */\n"
9392 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9393 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9394 "    ...\n"
9395 "};\n"
9396 msgstr ""
9397 "struct shmid_ds {\n"
9398 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9399 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9400 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9401 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9402 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9403 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9404 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9405 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9406 "    ...\n"
9407 "};\n"
9408
9409 #. type: Plain text
9410 #: build/C/man2/shmctl.2:89
9411 msgid ""
9412 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9413 "settable using B<IPC_SET>):"
9414 msgstr ""
9415 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9416 "B<IPC_SET> を使って設定可能である):"
9417
9418 #. type: Plain text
9419 #: build/C/man2/shmctl.2:102
9420 #, no-wrap
9421 msgid ""
9422 "struct ipc_perm {\n"
9423 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9424 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9425 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9426 "    uid_t          cuid;     /* Effective UID of creator */\n"
9427 "    gid_t          cgid;     /* Effective GID of creator */\n"
9428 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9429 "                                SHM_LOCKED flags */\n"
9430 "    unsigned short __seq;    /* Sequence number */\n"
9431 "};\n"
9432 msgstr ""
9433 "struct ipc_perm {\n"
9434 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9435 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9436 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9437 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9438 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9439 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9440 "                                SHM_LOCKED フラグ */\n"
9441 "    unsigned short __seq;    /* シーケンス番号 */\n"
9442 "};\n"
9443
9444 #. type: Plain text
9445 #: build/C/man2/shmctl.2:108
9446 msgid "Valid values for I<cmd> are:"
9447 msgstr "I<cmd> として有効な値は以下の通り:"
9448
9449 #. type: TP
9450 #: build/C/man2/shmctl.2:109
9451 #, no-wrap
9452 msgid "B<IPC_STAT>"
9453 msgstr "B<IPC_STAT>"
9454
9455 #. type: Plain text
9456 #: build/C/man2/shmctl.2:118
9457 msgid ""
9458 "Copy information from the kernel data structure associated with I<shmid> "
9459 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9460 "read permission on the shared memory segment."
9461 msgstr ""
9462 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9463 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9464 "読み込み許可を持たなければならない。"
9465
9466 #. type: TP
9467 #: build/C/man2/shmctl.2:118
9468 #, no-wrap
9469 msgid "B<IPC_SET>"
9470 msgstr "B<IPC_SET>"
9471
9472 #. type: Plain text
9473 #: build/C/man2/shmctl.2:136
9474 msgid ""
9475 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9476 "I<buf> to the kernel data structure associated with this shared memory "
9477 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9478 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9479 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9480 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9481 "memory segment, or the caller must be privileged."
9482 msgstr ""
9483 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9484 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9485 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9486 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9487 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9488 "と一致するか、呼び出し元が特権を持たなければならない。"
9489
9490 #. type: TP
9491 #: build/C/man2/shmctl.2:136
9492 #, no-wrap
9493 msgid "B<IPC_RMID>"
9494 msgstr "B<IPC_RMID>"
9495
9496 #. type: Plain text
9497 #: build/C/man2/shmctl.2:149
9498 msgid ""
9499 "Mark the segment to be destroyed.  The segment will only actually be "
9500 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9501 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9502 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9503 "is ignored."
9504 msgstr ""
9505 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9506 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9507 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9508 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9509
9510 #. type: Plain text
9511 #: build/C/man2/shmctl.2:157
9512 msgid ""
9513 "If a segment has been marked for destruction, then the (nonstandard)  "
9514 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9515 "structure retrieved by B<IPC_STAT> will be set."
9516 msgstr ""
9517 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9518 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9519 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9520
9521 #. type: Plain text
9522 #: build/C/man2/shmctl.2:160
9523 msgid ""
9524 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9525 "its pages that were faulted in will remain in memory or swap."
9526 msgstr ""
9527 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9528 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9529 "る。"
9530
9531 #. type: Plain text
9532 #: build/C/man2/shmctl.2:165
9533 msgid ""
9534 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9535 "B<proc>(5)."
9536 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9537
9538 #. type: TP
9539 #: build/C/man2/shmctl.2:165
9540 #, no-wrap
9541 msgid "B<IPC_INFO> (Linux-specific)"
9542 msgstr "B<IPC_INFO> (Linux 固有)"
9543
9544 #. type: Plain text
9545 #: build/C/man2/shmctl.2:178
9546 msgid ""
9547 "Return information about system-wide shared memory limits and parameters in "
9548 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9549 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9550 "B<_GNU_SOURCE> feature test macro is defined:"
9551 msgstr ""
9552 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9553 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9554 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9555 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9556
9557 #. type: Plain text
9558 #: build/C/man2/shmctl.2:192
9559 #, no-wrap
9560 msgid ""
9561 "struct shminfo {\n"
9562 "    unsigned long shmmax; /* Maximum segment size */\n"
9563 "    unsigned long shmmin; /* Minimum segment size;\n"
9564 "                             always 1 */\n"
9565 "    unsigned long shmmni; /* Maximum number of segments */\n"
9566 "    unsigned long shmseg; /* Maximum number of segments\n"
9567 "                             that a process can attach;\n"
9568 "                             unused within kernel */\n"
9569 "    unsigned long shmall; /* Maximum number of pages of\n"
9570 "                             shared memory, system-wide */\n"
9571 "};\n"
9572 msgstr ""
9573 "struct  shminfo {\n"
9574 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9575 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9576 "                             常に 1 */\n"
9577 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9578 "    unsigned long shmseg; /* プロセスが付加できる\n"
9579 "                             セグメントの最大数。\n"
9580 "                             カーネル内では未使用 */\n"
9581 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9582 "                             システム全体での値 */\n"
9583 "};\n"
9584
9585 #. type: Plain text
9586 #: build/C/man2/shmctl.2:205
9587 msgid ""
9588 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9589 "files of the same name; see B<proc>(5)  for details."
9590 msgstr ""
9591 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9592 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9593
9594 #. type: TP
9595 #: build/C/man2/shmctl.2:205
9596 #, no-wrap
9597 msgid "B<SHM_INFO> (Linux-specific)"
9598 msgstr "B<SHM_INFO> (Linux 固有)"
9599
9600 #. type: Plain text
9601 #: build/C/man2/shmctl.2:216
9602 msgid ""
9603 "Return a I<shm_info> structure whose fields contain information about system "
9604 "resources consumed by shared memory.  This structure is defined in "
9605 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9606 msgstr ""
9607 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9608 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9609 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9610
9611 #. type: Plain text
9612 #: build/C/man2/shmctl.2:233
9613 #, no-wrap
9614 msgid ""
9615 "struct shm_info {\n"
9616 "    int           used_ids; /* # of currently existing\n"
9617 "                               segments */\n"
9618 "    unsigned long shm_tot;  /* Total number of shared\n"
9619 "                               memory pages */\n"
9620 "    unsigned long shm_rss;  /* # of resident shared\n"
9621 "                               memory pages */\n"
9622 "    unsigned long shm_swp;  /* # of swapped shared\n"
9623 "                               memory pages */\n"
9624 "    unsigned long swap_attempts;\n"
9625 "                            /* Unused since Linux 2.4 */\n"
9626 "    unsigned long swap_successes;\n"
9627 "                            /* Unused since Linux 2.4 */\n"
9628 "};\n"
9629 msgstr ""
9630 "struct shm_info {\n"
9631 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9632 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9633 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9634 "                               いない) 共有メモリページ数 */\n"
9635 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9636 "                               ページ数 */\n"
9637 "    unsigned long swap_attempts;\n"
9638 "                            /* Linux 2.4 以降では未使用 */\n"
9639 "    unsigned long swap_successes;\n"
9640 "                            /* Linux 2.4 以降では未使用 */\n"
9641 "};\n"
9642
9643 #. type: TP
9644 #: build/C/man2/shmctl.2:235
9645 #, no-wrap
9646 msgid "B<SHM_STAT> (Linux-specific)"
9647 msgstr "B<SHM_STAT> (Linux 固有)"
9648
9649 #. type: Plain text
9650 #: build/C/man2/shmctl.2:246
9651 msgid ""
9652 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9653 "argument is not a segment identifier, but instead an index into the kernel's "
9654 "internal array that maintains information about all shared memory segments "
9655 "on the system."
9656 msgstr ""
9657 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9658 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9659 "管理するカーネルの内部配列へのインデックス である。"
9660
9661 #. type: Plain text
9662 #: build/C/man2/shmctl.2:249
9663 msgid ""
9664 "The caller can prevent or allow swapping of a shared memory segment with the "
9665 "following I<cmd> values:"
9666 msgstr ""
9667 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9668 "ワップされることを防止したり、許可したりできる:"
9669
9670 #. type: TP
9671 #: build/C/man2/shmctl.2:250
9672 #, no-wrap
9673 msgid "B<SHM_LOCK> (Linux-specific)"
9674 msgstr "B<SHM_LOCK> (Linux 固有)"
9675
9676 #. type: Plain text
9677 #: build/C/man2/shmctl.2:262
9678 msgid ""
9679 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9680 "pages that are required to be present after locking is enabled.  If a "
9681 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9682 "I<shm_perm.mode> field in the associated data structure retrieved by "
9683 "B<IPC_STAT> will be set."
9684 msgstr ""
9685 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9686 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9687 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9688 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9689 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9690
9691 #. type: TP
9692 #: build/C/man2/shmctl.2:262
9693 #, no-wrap
9694 msgid "B<SHM_UNLOCK> (Linux-specific)"
9695 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9696
9697 #. type: Plain text
9698 #: build/C/man2/shmctl.2:265
9699 msgid "Unlock the segment, allowing it to be swapped out."
9700 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9701
9702 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9703 #.  be applied to a segment, regardless of ownership of the segment.
9704 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9705 #.  in 2.6.10.  MTK, May 2005
9706 #. type: Plain text
9707 #: build/C/man2/shmctl.2:283
9708 msgid ""
9709 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9710 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9711 "these operations if its effective UID matches the owner or creator UID of "
9712 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9713 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9714 msgstr ""
9715 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9716 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9717 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9718 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9719 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9720 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9721
9722 #. type: Plain text
9723 #: build/C/man2/shmctl.2:301
9724 msgid ""
9725 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9726 "highest used entry in the kernel's internal array recording information "
9727 "about all shared memory segments.  (This information can be used with "
9728 "repeated B<SHM_STAT> operations to obtain information about all shared "
9729 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9730 "the identifier of the shared memory segment whose index was given in "
9731 "I<shmid>.  Other operations return 0 on success."
9732 msgstr ""
9733 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9734 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9735 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9736 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9737 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9738 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9739
9740 #. type: Plain text
9741 #: build/C/man2/shmctl.2:305
9742 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9743 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9744
9745 #. type: Plain text
9746 #: build/C/man2/shmctl.2:314
9747 msgid ""
9748 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9749 "read access for I<shmid>, and the calling process does not have the "
9750 "B<CAP_IPC_OWNER> capability."
9751 msgstr ""
9752 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9753 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9754 "ケーパビリティ (capability) を持っていない。"
9755
9756 #. type: Plain text
9757 #: build/C/man2/shmctl.2:325
9758 msgid ""
9759 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9760 "pointed to by I<buf> isn't accessible."
9761 msgstr ""
9762 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9763 "るアドレスにアクセスできない。"
9764
9765 #. type: TP
9766 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9767 #, no-wrap
9768 msgid "B<EIDRM>"
9769 msgstr "B<EIDRM>"
9770
9771 #. type: Plain text
9772 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9773 msgid "I<shmid> points to a removed identifier."
9774 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9775
9776 #. type: Plain text
9777 #: build/C/man2/shmctl.2:337
9778 msgid ""
9779 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9780 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9781 "to an array slot that is currently unused."
9782 msgstr ""
9783 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9784 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9785 "配列のスロットを参照していた。"
9786
9787 #. type: Plain text
9788 #: build/C/man2/shmctl.2:348
9789 msgid ""
9790 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9791 "be-locked segment would mean that the total bytes in locked shared memory "
9792 "segments would exceed the limit for the real user ID of the calling "
9793 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9794 "(see B<setrlimit>(2))."
9795 msgstr ""
9796 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9797 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9798 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9799 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9800
9801 #. type: Plain text
9802 #: build/C/man2/shmctl.2:353
9803 msgid ""
9804 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9805 "in the structure pointed to by I<buf>."
9806 msgstr ""
9807 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9808 "には大き過ぎる。"
9809
9810 #. type: Plain text
9811 #: build/C/man2/shmctl.2:365
9812 msgid ""
9813 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9814 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9815 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9816 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9817 msgstr ""
9818 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9819 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9820 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9821
9822 #. type: Plain text
9823 #: build/C/man2/shmctl.2:377
9824 msgid ""
9825 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9826 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9827 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9828 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9829 msgstr ""
9830 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9831 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9832 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9833 "が特権を持たない場合にも、このエラーが起こる。)"
9834
9835 #.  SVr4 documents an additional error condition EMFILE.
9836 #. type: Plain text
9837 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9838 #: build/C/man2/shmop.2:231
9839 msgid "SVr4, POSIX.1-2001."
9840 msgstr "SVr4, POSIX.1-2001."
9841
9842 #.  Like Linux, the FreeBSD man pages still document
9843 #.  the inclusion of these header files.
9844 #. type: Plain text
9845 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9846 msgid ""
9847 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9848 "required on Linux or by any version of POSIX.  However, some old "
9849 "implementations required the inclusion of these header files, and the SVID "
9850 "also documented their inclusion.  Applications intended to be portable to "
9851 "such old systems may need to include these header files."
9852 msgstr ""
9853 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9854 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9855 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9856 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9857 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9858 "れない。"
9859
9860 #. type: Plain text
9861 #: build/C/man2/shmctl.2:407
9862 msgid ""
9863 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9864 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9865 "future, these may modified or moved to a I</proc> filesystem interface."
9866 msgstr ""
9867 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9868 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9869 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9870 "い。"
9871
9872 #. type: Plain text
9873 #: build/C/man2/shmctl.2:415
9874 msgid ""
9875 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9876 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9877 "feature is not available on other UNIX implementations; portable "
9878 "applications should avoid relying on it."
9879 msgstr ""
9880 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9881 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9882 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9883 "プリケーションではこれに依存しないようにすべきである。"
9884
9885 #. type: Plain text
9886 #: build/C/man2/shmctl.2:428
9887 msgid ""
9888 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9889 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9890 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9891 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9892 msgstr ""
9893 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9894 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9895 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9896 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9897
9898 #. type: Plain text
9899 #: build/C/man2/shmctl.2:435
9900 msgid ""
9901 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9902 "B<svipc>(7)"
9903 msgstr ""
9904 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9905 "B<shm_overview>(7), B<svipc>(7)"
9906
9907 #. type: TH
9908 #: build/C/man2/shmget.2:38
9909 #, no-wrap
9910 msgid "SHMGET"
9911 msgstr "SHMGET"
9912
9913 #. type: TH
9914 #: build/C/man2/shmget.2:38
9915 #, no-wrap
9916 msgid "2014-10-02"
9917 msgstr "2014-10-02"
9918
9919 #. type: Plain text
9920 #: build/C/man2/shmget.2:41
9921 msgid "shmget - allocates a System V shared memory segment"
9922 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9923
9924 #. type: Plain text
9925 #: build/C/man2/shmget.2:48
9926 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9927 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9928
9929 #. type: Plain text
9930 #: build/C/man2/shmget.2:72
9931 msgid ""
9932 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
9933 "associated with the value of the argument I<key>.  A new shared memory "
9934 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9935 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9936 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9937 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9938 msgstr ""
9939 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリ・セグメントの識"
9940 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9941 "共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9942 "場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメ"
9943 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9944 "きさとなる。"
9945
9946 #. type: Plain text
9947 #: build/C/man2/shmget.2:91
9948 msgid ""
9949 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9950 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9951 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9952 "| O_EXCL> for B<open>(2).)"
9953 msgstr ""
9954 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9955 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9956 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9957 "O_EXCL> を指定した場合の動作と同じである)。"
9958
9959 #. type: Plain text
9960 #: build/C/man2/shmget.2:95
9961 msgid "The value I<shmflg> is composed of:"
9962 msgstr "I<shmflg> は以下の内容から構成される:"
9963
9964 #. type: TP
9965 #: build/C/man2/shmget.2:95
9966 #, no-wrap
9967 msgid "B<IPC_CREAT>"
9968 msgstr "B<IPC_CREAT>"
9969
9970 #. type: Plain text
9971 #: build/C/man2/shmget.2:102
9972 msgid ""
9973 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
9974 "the segment associated with I<key> and check to see if the user has "
9975 "permission to access the segment."
9976 msgstr ""
9977 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9978 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9979 "可があるかどうかをチェックする。"
9980
9981 #. type: TP
9982 #: build/C/man2/shmget.2:102
9983 #, no-wrap
9984 msgid "B<IPC_EXCL>"
9985 msgstr "B<IPC_EXCL>"
9986
9987 #. type: Plain text
9988 #: build/C/man2/shmget.2:108
9989 msgid ""
9990 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
9991 "segment.  If the segment already exists, the call fails."
9992 msgstr ""
9993 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
9994 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
9995
9996 #. type: TP
9997 #: build/C/man2/shmget.2:108
9998 #, no-wrap
9999 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10000 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10001
10002 #. type: Plain text
10003 #: build/C/man2/shmget.2:114
10004 msgid ""
10005 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10006 "I<Documentation/vm/hugetlbpage.txt> for further information."
10007 msgstr ""
10008 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10009 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10010
10011 #. type: TP
10012 #: build/C/man2/shmget.2:114
10013 #, no-wrap
10014 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10015 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10016
10017 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10018 #.  specified.
10019 #. type: Plain text
10020 #: build/C/man2/shmget.2:133
10021 msgid ""
10022 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
10023 "Do not reserve swap space for this segment.  When swap space is reserved, "
10024 "one has the guarantee that it is possible to modify the segment.  When swap "
10025 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10026 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
10027 "overcommit_memory> in B<proc>(5)."
10028 msgstr ""
10029 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10030 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10031 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10032 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
10033 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
10034 "ルに関する議論も参照のこと。"
10035
10036 #. type: Plain text
10037 #: build/C/man2/shmget.2:143
10038 msgid ""
10039 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10040 "specify the permissions granted to the owner, group, and others.  These bits "
10041 "have the same format, and the same meaning, as the I<mode> argument of "
10042 "B<open>(2).  Presently, execute permissions are not used by the system."
10043 msgstr ""
10044 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10045 "への許可を指定する。 これらのビットは B<open>(2)  の I<mode> 引き数と同じ形式"
10046 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10047
10048 #. type: Plain text
10049 #: build/C/man2/shmget.2:151
10050 msgid ""
10051 "When a new shared memory segment is created, its contents are initialized to "
10052 "zero values, and its associated data structure, I<shmid_ds> (see "
10053 "B<shmctl>(2)), is initialized as follows:"
10054 msgstr ""
10055 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
10056 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10057 "期化される。"
10058
10059 #. type: Plain text
10060 #: build/C/man2/shmget.2:156
10061 msgid ""
10062 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10063 "calling process."
10064 msgstr ""
10065 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10066 "ユーザーID を設定する。"
10067
10068 #. type: Plain text
10069 #: build/C/man2/shmget.2:161
10070 msgid ""
10071 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10072 "the calling process."
10073 msgstr ""
10074 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10075 "定する。"
10076
10077 #. type: Plain text
10078 #: build/C/man2/shmget.2:166
10079 msgid ""
10080 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10081 "significant 9 bit of I<shmflg>."
10082 msgstr ""
10083 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10084
10085 #. type: Plain text
10086 #: build/C/man2/shmget.2:170
10087 msgid "I<shm_segsz> is set to the value of I<size>."
10088 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10089
10090 #. type: Plain text
10091 #: build/C/man2/shmget.2:177
10092 msgid ""
10093 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10094 msgstr ""
10095 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10096
10097 #. type: Plain text
10098 #: build/C/man2/shmget.2:180
10099 msgid "I<shm_ctime> is set to the current time."
10100 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10101
10102 #. type: Plain text
10103 #: build/C/man2/shmget.2:183
10104 msgid ""
10105 "If the shared memory segment already exists, the permissions are verified, "
10106 "and a check is made to see if it is marked for destruction."
10107 msgstr ""
10108 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10109 "(destruction) マークがつけられていないかのチェックが行われる。"
10110
10111 #. type: Plain text
10112 #: build/C/man2/shmget.2:188
10113 msgid ""
10114 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10115 "returned, and I<errno> is set to indicate the error."
10116 msgstr ""
10117 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
10118 "-1 が返り、 I<error> にエラーを示す値が設定される。"
10119
10120 #. type: Plain text
10121 #: build/C/man2/shmget.2:192
10122 msgid "On failure, I<errno> is set to one of the following:"
10123 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10124
10125 #. type: Plain text
10126 #: build/C/man2/shmget.2:198
10127 msgid ""
10128 "The user does not have permission to access the shared memory segment, and "
10129 "does not have the B<CAP_IPC_OWNER> capability."
10130 msgstr ""
10131 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
10132 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10133
10134 #. type: Plain text
10135 #: build/C/man2/shmget.2:207
10136 msgid ""
10137 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10138 "memory segment already exists for I<key>."
10139 msgstr ""
10140 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10141 "有メモリセグメントはすでに存在する。"
10142
10143 #. type: Plain text
10144 #: build/C/man2/shmget.2:215
10145 msgid ""
10146 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10147 "greater than B<SHMMAX>."
10148 msgstr ""
10149 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10150 "B<SHMMAX> よりも大きかった。"
10151
10152 #. type: Plain text
10153 #: build/C/man2/shmget.2:221
10154 msgid ""
10155 "A segment for the given I<key> exists, but I<size> is greater than the size "
10156 "of that segment."
10157 msgstr ""
10158 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10159 "ントのサイズよりも大きかった。"
10160
10161 #. type: Plain text
10162 #: build/C/man2/shmget.2:230
10163 msgid ""
10164 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10165 msgstr ""
10166 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10167 "いなかった。"
10168
10169 #. type: Plain text
10170 #: build/C/man2/shmget.2:233
10171 msgid "No memory could be allocated for segment overhead."
10172 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
10173
10174 #. type: Plain text
10175 #: build/C/man2/shmget.2:241
10176 msgid ""
10177 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10178 "segment of the requested I<size> would cause the system to exceed the system-"
10179 "wide limit on shared memory (B<SHMALL>)."
10180 msgstr ""
10181 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
10182 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
10183 "限 (B<SHMALL>)  を超過した。"
10184
10185 #. type: Plain text
10186 #: build/C/man2/shmget.2:248
10187 msgid ""
10188 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10189 "(did not have the B<CAP_IPC_LOCK> capability)."
10190 msgstr ""
10191 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10192 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10193
10194 #. type: Plain text
10195 #: build/C/man2/shmget.2:256
10196 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10197 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10198
10199 #. type: Plain text
10200 #: build/C/man2/shmget.2:280
10201 msgid ""
10202 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10203 "value is used for I<key>, the system call ignores all but the least "
10204 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10205 msgstr ""
10206 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10207 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10208 "視し、 新しい共有メモリ・セグメントを作成する。"
10209
10210 #. type: SS
10211 #: build/C/man2/shmget.2:280
10212 #, no-wrap
10213 msgid "Shared memory limits"
10214 msgstr ""
10215
10216 #. type: Plain text
10217 #: build/C/man2/shmget.2:284
10218 msgid ""
10219 "The following limits on shared memory segment resources affect the "
10220 "B<shmget>()  call:"
10221 msgstr ""
10222 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
10223 "る:"
10224
10225 #. type: TP
10226 #: build/C/man2/shmget.2:284
10227 #, no-wrap
10228 msgid "B<SHMALL>"
10229 msgstr "B<SHMALL>"
10230
10231 #. type: Plain text
10232 #: build/C/man2/shmget.2:287
10233 msgid "System-wide limit on the number of pages of shared memory."
10234 msgstr "共有メモリのページ数のシステム全体での上限値。"
10235
10236 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10237 #. type: Plain text
10238 #: build/C/man2/shmget.2:293
10239 msgid ""
10240 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10241 "shmall>.  Since Linux 3.16, the default value for this limit is:"
10242 msgstr ""
10243 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10244 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10245 "る。"
10246
10247 #. type: Plain text
10248 #: build/C/man2/shmget.2:295 build/C/man2/shmget.2:330
10249 #, no-wrap
10250 msgid "    ULONG_MAX - 2^24\n"
10251 msgstr "    ULONG_MAX - 2^24\n"
10252
10253 #. type: Plain text
10254 #: build/C/man2/shmget.2:306
10255 msgid ""
10256 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10257 "systems)  is to impose no limitation on allocations.  This value, rather "
10258 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10259 "historical applications simply raised the existing limit without first "
10260 "checking its current value.  Such applications would cause the value to "
10261 "overflow if the limit was set at B<ULONG_MAX>."
10262 msgstr ""
10263
10264 #. type: Plain text
10265 #: build/C/man2/shmget.2:309
10266 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10267 msgstr ""
10268
10269 #. type: Plain text
10270 #: build/C/man2/shmget.2:311
10271 #, no-wrap
10272 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10273 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10274
10275 #. type: Plain text
10276 #: build/C/man2/shmget.2:319
10277 msgid ""
10278 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10279 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10280 "GB as the limit on the total memory used by all shared memory segments."
10281 msgstr ""
10282
10283 #. type: TP
10284 #: build/C/man2/shmget.2:319
10285 #, no-wrap
10286 msgid "B<SHMMAX>"
10287 msgstr "B<SHMMAX>"
10288
10289 #. type: Plain text
10290 #: build/C/man2/shmget.2:322
10291 msgid "Maximum size in bytes for a shared memory segment."
10292 msgstr "1 つの共有メモリセグメントの最大サイズ (バイト数)。"
10293
10294 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10295 #. type: Plain text
10296 #: build/C/man2/shmget.2:328
10297 msgid ""
10298 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10299 "shmmax>.  Since Linux 3.16, the default value for this limit is:"
10300 msgstr ""
10301 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10302 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10303 "る。"
10304
10305 #. type: Plain text
10306 #: build/C/man2/shmget.2:339
10307 msgid ""
10308 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10309 "systems)  is to impose no limitation on allocations.  See the description of "
10310 "B<SHMALL> for a discussion of why this default value (rather than "
10311 "B<ULONG_MAX>)  is used."
10312 msgstr ""
10313
10314 #. type: Plain text
10315 #: build/C/man2/shmget.2:342
10316 msgid ""
10317 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10318 "0x2000000 (32MB)."
10319 msgstr ""
10320 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10321 "(32MB) であった。"
10322
10323 #. type: Plain text
10324 #: build/C/man2/shmget.2:348
10325 msgid ""
10326 "Because it is not possible to map just part of a shared memory segment, the "
10327 "amount of virtual memory places another limit on the maximum size of a "
10328 "usable segment: for example, on i386 the largest segments that can be mapped "
10329 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10330 msgstr ""
10331
10332 #. type: TP
10333 #: build/C/man2/shmget.2:348
10334 #, no-wrap
10335 msgid "B<SHMMIN>"
10336 msgstr "B<SHMMIN>"
10337
10338 #. type: Plain text
10339 #: build/C/man2/shmget.2:354
10340 msgid ""
10341 "Minimum size in bytes for a shared memory segment: implementation dependent "
10342 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10343 msgstr ""
10344 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10345 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10346
10347 #. type: TP
10348 #: build/C/man2/shmget.2:354
10349 #, no-wrap
10350 msgid "B<SHMMNI>"
10351 msgstr "B<SHMMNI>"
10352
10353 #. type: Plain text
10354 #: build/C/man2/shmget.2:359
10355 msgid ""
10356 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10357 "the default value for this limit was 128; since Linux 2.4, the default value "
10358 "is 4096."
10359 msgstr ""
10360 "システム全体の共有メモリ・セグメント数の上限値。 この上限値のデフォルトは、 "
10361 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10362
10363 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10364 #.  that we could create one more segment than SHMMNI -- MTK
10365 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10366 #. type: Plain text
10367 #: build/C/man2/shmget.2:365
10368 msgid ""
10369 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10370 msgstr ""
10371 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10372 "たりできる。"
10373
10374 #. type: Plain text
10375 #: build/C/man2/shmget.2:369
10376 msgid ""
10377 "The implementation has no specific limits for the per-process maximum number "
10378 "of shared memory segments (B<SHMSEG>)."
10379 msgstr ""
10380 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10381 "上の制限はない。"
10382
10383 #. type: Plain text
10384 #: build/C/man2/shmget.2:375
10385 msgid ""
10386 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10387 "shared memory segment scheduled for deletion."
10388 msgstr ""
10389 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10390 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10391
10392 #. type: Plain text
10393 #: build/C/man2/shmget.2:381
10394 msgid ""
10395 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10396 "more clearly show its function."
10397 msgstr ""
10398 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10399 "より明確にその機能を表しているだろう。"
10400
10401 #. type: Plain text
10402 #: build/C/man2/shmget.2:389
10403 msgid ""
10404 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10405 "B<shm_overview>(7), B<svipc>(7)"
10406 msgstr ""
10407 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10408 "B<shm_overview>(7), B<svipc>(7)"
10409
10410 #. type: TH
10411 #: build/C/man2/shmop.2:41
10412 #, no-wrap
10413 msgid "SHMOP"
10414 msgstr "SHMOP"
10415
10416 #. type: Plain text
10417 #: build/C/man2/shmop.2:44
10418 msgid "shmat, shmdt - System V shared memory operations"
10419 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10420
10421 #. type: Plain text
10422 #: build/C/man2/shmop.2:48
10423 #, no-wrap
10424 msgid ""
10425 "B<#include E<lt>sys/types.hE<gt>>\n"
10426 "B<#include E<lt>sys/shm.hE<gt>>\n"
10427 msgstr ""
10428 "B<#include E<lt>sys/types.hE<gt>>\n"
10429 "B<#include E<lt>sys/shm.hE<gt>>\n"
10430
10431 #. type: Plain text
10432 #: build/C/man2/shmop.2:50
10433 #, no-wrap
10434 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10435 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10436
10437 #. type: Plain text
10438 #: build/C/man2/shmop.2:52
10439 #, no-wrap
10440 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10441 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10442
10443 #. type: SS
10444 #: build/C/man2/shmop.2:54
10445 #, no-wrap
10446 msgid "shmat()"
10447 msgstr ""
10448
10449 #. type: Plain text
10450 #: build/C/man2/shmop.2:62
10451 msgid ""
10452 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10453 "I<shmid> to the address space of the calling process.  The attaching address "
10454 "is specified by I<shmaddr> with one of the following criteria:"
10455 msgstr ""
10456 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリ・セグメント "
10457 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10458 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10459
10460 #. type: Plain text
10461 #: build/C/man2/shmop.2:68
10462 msgid ""
10463 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10464 "which to attach the segment."
10465 msgstr ""
10466 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10467 "されていない) アドレスを選択する。"
10468
10469 #. type: Plain text
10470 #: build/C/man2/shmop.2:80
10471 msgid ""
10472 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10473 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10474 "multiple of B<SHMLBA>."
10475 msgstr ""
10476 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10477 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10478 "スへ付加する。"
10479
10480 #. type: Plain text
10481 #: build/C/man2/shmop.2:84
10482 msgid ""
10483 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10484 "occurs."
10485 msgstr ""
10486 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10487 "要がある。"
10488
10489 #. type: Plain text
10490 #: build/C/man2/shmop.2:90
10491 msgid ""
10492 "In addition to B<SHM_RND>, the following flags may be specified in the "
10493 "I<shmflg> bit-mask argument:"
10494 msgstr ""
10495
10496 #. type: TP
10497 #: build/C/man2/shmop.2:90
10498 #, no-wrap
10499 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10500 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10501
10502 #. type: Plain text
10503 #: build/C/man2/shmop.2:94
10504 msgid ""
10505 "Allow the contents of the segment to be executed.  The caller must have "
10506 "execute permission on the segment."
10507 msgstr ""
10508
10509 #. type: TP
10510 #: build/C/man2/shmop.2:94
10511 #, no-wrap
10512 msgid "B<SHM_RDONLY>"
10513 msgstr "B<SHM_RDONLY>"
10514
10515 #. type: Plain text
10516 #: build/C/man2/shmop.2:102
10517 msgid ""
10518 "Attach the segment for read-only access.  The process must have read "
10519 "permission for the segment.  If this flag is not specified, the segment is "
10520 "attached for read and write access, and the process must have read and write "
10521 "permission for the segment.  There is no notion of a write-only shared "
10522 "memory segment."
10523 msgstr ""
10524 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10525 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10526 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10527 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリ・セ"
10528 "グメントという概念は存在しない。"
10529
10530 #. type: TP
10531 #: build/C/man2/shmop.2:102
10532 #, no-wrap
10533 msgid "B<SHM_REMAP> (Linux-specific)"
10534 msgstr "B<SHM_REMAP> (Linux 固有)"
10535
10536 #. type: Plain text
10537 #: build/C/man2/shmop.2:115
10538 msgid ""
10539 "This flag specifies that the mapping of the segment should replace any "
10540 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10541 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10542 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10543 "must not be NULL."
10544 msgstr ""
10545 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10546 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10547 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10548 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10549
10550 #. type: Plain text
10551 #: build/C/man2/shmop.2:122
10552 msgid ""
10553 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10554 "The segment will automatically be detached at process exit.  The same "
10555 "segment may be attached as a read and as a read-write one, and more than "
10556 "once, in the process's address space."
10557 msgstr ""
10558 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10559 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10560 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10561 "複数回付加することもできる。"
10562
10563 #. type: Plain text
10564 #: build/C/man2/shmop.2:130
10565 msgid ""
10566 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10567 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10568 "follows:"
10569 msgstr ""
10570 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10571 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10572
10573 #. type: Plain text
10574 #: build/C/man2/shmop.2:133
10575 msgid "I<shm_atime> is set to the current time."
10576 msgstr "I<shm_atime> には現在の時刻を設定する。"
10577
10578 #. type: Plain text
10579 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10580 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10581 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10582
10583 #. type: Plain text
10584 #: build/C/man2/shmop.2:140
10585 msgid "I<shm_nattch> is incremented by one."
10586 msgstr "I<shm_nattch> を 1 増加させる。"
10587
10588 #. type: SS
10589 #: build/C/man2/shmop.2:140
10590 #, no-wrap
10591 msgid "shmdt()"
10592 msgstr ""
10593
10594 #. type: Plain text
10595 #: build/C/man2/shmop.2:151
10596 msgid ""
10597 "B<shmdt>()  detaches the shared memory segment located at the address "
10598 "specified by I<shmaddr> from the address space of the calling process.  The "
10599 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10600 "the value returned by the attaching B<shmat>()  call."
10601 msgstr ""
10602 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10603 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10604 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10605 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10606 "ない。"
10607
10608 #. type: Plain text
10609 #: build/C/man2/shmop.2:157
10610 msgid ""
10611 "On a successful B<shmdt>()  call, the system updates the members of the "
10612 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10613 msgstr ""
10614 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10615 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10616
10617 #. type: Plain text
10618 #: build/C/man2/shmop.2:160
10619 msgid "I<shm_dtime> is set to the current time."
10620 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10621
10622 #. type: Plain text
10623 #: build/C/man2/shmop.2:168
10624 msgid ""
10625 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10626 "marked for deletion, the segment is deleted."
10627 msgstr ""
10628 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10629 "セグメントは削除される。"
10630
10631 #. type: Plain text
10632 #: build/C/man2/shmop.2:176
10633 msgid ""
10634 "On success, B<shmat>()  returns the address of the attached shared memory "
10635 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10636 "indicate the cause of the error."
10637 msgstr ""
10638 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10639 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10640 "値を設定する。"
10641
10642 #. type: Plain text
10643 #: build/C/man2/shmop.2:182
10644 msgid ""
10645 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10646 "set to indicate the cause of the error."
10647 msgstr ""
10648 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10649 "ラーの原因を示す値を設定する。"
10650
10651 #. type: Plain text
10652 #: build/C/man2/shmop.2:188
10653 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10654 msgstr ""
10655 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10656
10657 #. type: Plain text
10658 #: build/C/man2/shmop.2:194
10659 msgid ""
10660 "The calling process does not have the required permissions for the requested "
10661 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10662 msgstr ""
10663 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10664 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10665
10666 #. type: Plain text
10667 #: build/C/man2/shmop.2:211
10668 msgid ""
10669 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10670 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10671 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10672 msgstr ""
10673 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10674 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10675 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10676 "れているが、 I<shmaddr> が NULL であった。"
10677
10678 #. type: Plain text
10679 #: build/C/man2/shmop.2:214
10680 msgid "Could not allocate memory for the descriptor or for the page tables."
10681 msgstr ""
10682 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10683 "とができない。"
10684
10685 #. type: Plain text
10686 #: build/C/man2/shmop.2:220
10687 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10688 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10689
10690 #.  The following since 2.6.17-rc1:
10691 #. type: Plain text
10692 #: build/C/man2/shmop.2:228
10693 msgid ""
10694 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10695 "not aligned on a page boundary."
10696 msgstr ""
10697 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10698 "I<shmaddr> がページ境界に合っていない。"
10699
10700 #. type: Plain text
10701 #: build/C/man2/shmop.2:243
10702 msgid ""
10703 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10704 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10705 "B<shmat>()  from I<char\\ *> into I<void\\ *>."
10706 msgstr ""
10707 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10708 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10709 "\\ *> に変更された。"
10710
10711 #. type: Plain text
10712 #: build/C/man2/shmop.2:248
10713 msgid ""
10714 "After a B<fork>(2), the child inherits the attached shared memory segments."
10715 msgstr ""
10716 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10717
10718 #. type: Plain text
10719 #: build/C/man2/shmop.2:252
10720 msgid ""
10721 "After an B<execve>(2), all attached shared memory segments are detached from "
10722 "the process."
10723 msgstr ""
10724 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10725 "される。"
10726
10727 #. type: Plain text
10728 #: build/C/man2/shmop.2:256
10729 msgid ""
10730 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10731 "process."
10732 msgstr ""
10733 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10734 "離される。"
10735
10736 #. type: Plain text
10737 #: build/C/man2/shmop.2:268
10738 msgid ""
10739 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10740 "way of attaching a shared memory segment.  Be aware that the shared memory "
10741 "segment attached in this way may be attached at different addresses in "
10742 "different processes.  Therefore, any pointers maintained within the shared "
10743 "memory must be made relative (typically to the starting address of the "
10744 "segment), rather than absolute."
10745 msgstr ""
10746 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10747 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10748 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10749 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10750 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10751 "る。"
10752
10753 #. type: Plain text
10754 #: build/C/man2/shmop.2:273
10755 msgid ""
10756 "On Linux, it is possible to attach a shared memory segment even if it is "
10757 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10758 "behavior and many other implementations do not support it."
10759 msgstr ""
10760 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10761 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10762 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10763
10764 #. type: Plain text
10765 #: build/C/man2/shmop.2:276
10766 msgid "The following system parameter affects B<shmat>():"
10767 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10768
10769 #. type: TP
10770 #: build/C/man2/shmop.2:276
10771 #, no-wrap
10772 msgid "B<SHMLBA>"
10773 msgstr "B<SHMLBA>"
10774
10775 #. type: Plain text
10776 #: build/C/man2/shmop.2:289
10777 msgid ""
10778 "Segment low boundary address multiple.  When explicitly specifying an attach "
10779 "address in a call to B<shmat>(), the caller should ensure that the address "
10780 "is a multiple of this value.  This is necessary on some architectures, in "
10781 "order either to ensure good CPU cache performance or to ensure that "
10782 "different attaches of the same segment have consistent views within the CPU "
10783 "cache.  B<SHMLBA> is normally some multiple of the system page size (on many "
10784 "Linux architectures, it is the same as the system page size)."
10785 msgstr ""
10786
10787 #. type: Plain text
10788 #: build/C/man2/shmop.2:293
10789 msgid ""
10790 "The implementation places no intrinsic per-process limit on the number of "
10791 "shared memory segments (B<SHMSEG>)."
10792 msgstr ""
10793 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10794 "関する実装依存の制限はない。"
10795
10796 #. type: Plain text
10797 #: build/C/man2/shmop.2:301
10798 msgid ""
10799 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10800 "B<shm_overview>(7), B<svipc>(7)"
10801 msgstr ""
10802 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10803 "B<shm_overview>(7), B<svipc>(7)"
10804
10805 #. type: TH
10806 #: build/C/man2/subpage_prot.2:30
10807 #, no-wrap
10808 msgid "SUBPAGE_PROT"
10809 msgstr "SUBPAGE_PROT"
10810
10811 #. type: TH
10812 #: build/C/man2/subpage_prot.2:30
10813 #, no-wrap
10814 msgid "2012-07-13"
10815 msgstr "2012-07-13"
10816
10817 #. type: Plain text
10818 #: build/C/man2/subpage_prot.2:33
10819 msgid "subpage_prot - define a subpage protection for an address range"
10820 msgstr ""
10821
10822 #. type: Plain text
10823 #: build/C/man2/subpage_prot.2:37
10824 #, no-wrap
10825 msgid ""
10826 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10827 "B<                  uint32_t *>I<map>B<);>\n"
10828 msgstr ""
10829 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10830 "B<                  uint32_t *>I<map>B<);>\n"
10831
10832 #. type: Plain text
10833 #: build/C/man2/subpage_prot.2:41
10834 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10835 msgstr ""
10836 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10837 "を参照。"
10838
10839 #. type: Plain text
10840 #: build/C/man2/subpage_prot.2:47
10841 msgid ""
10842 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10843 "control the access permissions on individual 4kB subpages on systems "
10844 "configured with a page size of 64kB."
10845 msgstr ""
10846
10847 #. type: Plain text
10848 #: build/C/man2/subpage_prot.2:54
10849 msgid ""
10850 "The protection map is applied to the memory pages in the region starting at "
10851 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10852 "aligned to a 64-kB boundary."
10853 msgstr ""
10854
10855 #. type: Plain text
10856 #: build/C/man2/subpage_prot.2:66
10857 msgid ""
10858 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10859 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10860 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10861 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10862 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10863 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10864 msgstr ""
10865
10866 #. type: Plain text
10867 #: build/C/man2/subpage_prot.2:71
10868 msgid ""
10869 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10870 "specified below is returned."
10871 msgstr ""
10872
10873 #. type: Plain text
10874 #: build/C/man2/subpage_prot.2:77
10875 msgid "The buffer referred to by I<map> is not accessible."
10876 msgstr ""
10877
10878 #. type: Plain text
10879 #: build/C/man2/subpage_prot.2:87
10880 msgid ""
10881 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10882 "be aligned to a multiple of the system page size, and they must not refer to "
10883 "a region outside of the address space of the process or to a region that "
10884 "consists of huge pages."
10885 msgstr ""
10886
10887 #. type: Plain text
10888 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10889 msgid "Out of memory."
10890 msgstr "メモリ不足である。"
10891
10892 #. type: Plain text
10893 #: build/C/man2/subpage_prot.2:96
10894 msgid ""
10895 "This system call is provided on the PowerPC architecture since Linux "
10896 "2.6.25.  The system call is provided only if the kernel is configured with "
10897 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10898 msgstr ""
10899
10900 #. type: Plain text
10901 #: build/C/man2/subpage_prot.2:101
10902 msgid ""
10903 "Glibc does not provide a wrapper for this system call; call it using "
10904 "B<syscall>(2)."
10905 msgstr ""
10906
10907 #. type: Plain text
10908 #: build/C/man2/subpage_prot.2:106
10909 msgid ""
10910 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10911 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10912 "field won't allow writes to a page that is otherwise write-protected."
10913 msgstr ""
10914
10915 #. type: SS
10916 #: build/C/man2/subpage_prot.2:106
10917 #, no-wrap
10918 msgid "Rationale"
10919 msgstr ""
10920
10921 #.  In the initial implementation, it was the case that:
10922 #.      In fact the whole process is switched to use 4k hardware pages when the
10923 #.      subpage_prot system call is used, but this could be improved in future
10924 #.      to switch only the affected segments.
10925 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10926 #.  the affected segment, not the whole process.
10927 #. type: Plain text
10928 #: build/C/man2/subpage_prot.2:128
10929 msgid ""
10930 "This system call is provided to assist writing emulators that operate using "
10931 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10932 "uses a smaller page size, the emulator can no longer use the memory-"
10933 "management unit (MMU)  and normal system calls for controlling page "
10934 "protections.  (The emulator could emulate the MMU by checking and possibly "
10935 "remapping the address for each memory access in software, but that is "
10936 "slow.)  The idea is that the emulator supplies an array of protection masks "
10937 "to apply to a specified range of virtual addresses.  These masks are applied "
10938 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10939 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10940 "affected.  Implicit in this is that the regions of the address space that "
10941 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10942 "hardware pages (on machines with hardware 64-kB page support)."
10943 msgstr ""
10944
10945 #. type: Plain text
10946 #: build/C/man2/subpage_prot.2:131
10947 msgid "B<mprotect>(2), B<syscall>(2)"
10948 msgstr "B<mprotect>(2), B<syscall>(2)"
10949
10950 #. type: Plain text
10951 #: build/C/man2/subpage_prot.2:134
10952 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10953 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10954
10955 #. type: TH
10956 #: build/C/man2/sync_file_range.2:30
10957 #, no-wrap
10958 msgid "SYNC_FILE_RANGE"
10959 msgstr "SYNC_FILE_RANGE"
10960
10961 #. type: Plain text
10962 #: build/C/man2/sync_file_range.2:33
10963 msgid "sync_file_range - sync a file segment with disk"
10964 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10965
10966 #. type: Plain text
10967 #: build/C/man2/sync_file_range.2:37
10968 #, no-wrap
10969 msgid ""
10970 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10971 "B<#include E<lt>fcntl.hE<gt>>\n"
10972 msgstr ""
10973 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10974 "B<#include E<lt>fcntl.hE<gt>>\n"
10975
10976 #. type: Plain text
10977 #: build/C/man2/sync_file_range.2:40
10978 #, no-wrap
10979 msgid ""
10980 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10981 "B<                    unsigned int >I<flags>B<);>\n"
10982 msgstr ""
10983 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10984 "B<                    unsigned int >I<flags>B<);>\n"
10985
10986 #. type: Plain text
10987 #: build/C/man2/sync_file_range.2:47
10988 msgid ""
10989 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10990 "referred to by the file descriptor I<fd> with disk."
10991 msgstr ""
10992 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10993 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10994
10995 #. type: Plain text
10996 #: build/C/man2/sync_file_range.2:61
10997 msgid ""
10998 "I<offset> is the starting byte of the file range to be synchronized.  "
10999 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11000 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11001 "are synchronized.  Synchronization is in units of the system page size: "
11002 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11003 "rounded up to a page boundary."
11004 msgstr ""
11005 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11006 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11007 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11008 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11009 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11010
11011 #. type: Plain text
11012 #: build/C/man2/sync_file_range.2:65
11013 msgid "The I<flags> bit-mask argument can include any of the following values:"
11014 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11015
11016 #. type: TP
11017 #: build/C/man2/sync_file_range.2:65
11018 #, no-wrap
11019 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11020 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11021
11022 #. type: Plain text
11023 #: build/C/man2/sync_file_range.2:70
11024 msgid ""
11025 "Wait upon write-out of all pages in the specified range that have already "
11026 "been submitted to the device driver for write-out before performing any "
11027 "write."
11028 msgstr ""
11029 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11030 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11031 "つ。"
11032
11033 #. type: TP
11034 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11035 #, no-wrap
11036 msgid "B<SYNC_FILE_RANGE_WRITE>"
11037 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11038
11039 #. type: Plain text
11040 #: build/C/man2/sync_file_range.2:76
11041 msgid ""
11042 "Initiate write-out of all dirty pages in the specified range which are not "
11043 "presently submitted write-out.  Note that even this may block if you attempt "
11044 "to write more than request queue size."
11045 msgstr ""
11046 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11047 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11048 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11049 "る点に注意すること。"
11050
11051 #. type: TP
11052 #: build/C/man2/sync_file_range.2:76
11053 #, no-wrap
11054 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11055 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11056
11057 #. type: Plain text
11058 #: build/C/man2/sync_file_range.2:80
11059 msgid ""
11060 "Wait upon write-out of all pages in the range after performing any write."
11061 msgstr ""
11062 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11063 "つ。"
11064
11065 #. type: Plain text
11066 #: build/C/man2/sync_file_range.2:84
11067 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11068 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11069
11070 #. type: SS
11071 #: build/C/man2/sync_file_range.2:84
11072 #, no-wrap
11073 msgid "Warning"
11074 msgstr "警告"
11075
11076 #. type: Plain text
11077 #: build/C/man2/sync_file_range.2:100
11078 msgid ""
11079 "This system call is extremely dangerous and should not be used in portable "
11080 "programs.  None of these operations writes out the file's metadata.  "
11081 "Therefore, unless the application is strictly performing overwrites of "
11082 "already-instantiated disk blocks, there are no guarantees that the data will "
11083 "be available after a crash.  There is no user interface to know if a write "
11084 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11085 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11086 "writing into preallocated space, many filesystems also require calls into "
11087 "the block allocator, which this system call does not sync out to disk.  This "
11088 "system call does not flush disk write caches and thus does not provide any "
11089 "data integrity on systems with volatile disk write caches."
11090 msgstr ""
11091 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11092 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11093 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11094 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11095 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
11096 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11097 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11098 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11099 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11100 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11101 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11102 "コールではデータの一貫性を確保できないことになる。"
11103
11104 #. type: SS
11105 #: build/C/man2/sync_file_range.2:100
11106 #, no-wrap
11107 msgid "Some details"
11108 msgstr "詳細"
11109
11110 #. type: Plain text
11111 #: build/C/man2/sync_file_range.2:108
11112 msgid ""
11113 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11114 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11115 msgstr ""
11116 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11117 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11118
11119 #. type: Plain text
11120 #: build/C/man2/sync_file_range.2:112
11121 msgid "Useful combinations of the I<flags> bits are:"
11122 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11123
11124 #. type: TP
11125 #: build/C/man2/sync_file_range.2:112
11126 #, no-wrap
11127 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11128 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11129
11130 #. type: Plain text
11131 #: build/C/man2/sync_file_range.2:120
11132 msgid ""
11133 "Ensures that all pages in the specified range which were dirty when "
11134 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11135 "start-write-for-data-integrity operation."
11136 msgstr ""
11137 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11138 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11139 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11140 "ある。"
11141
11142 #. type: Plain text
11143 #: build/C/man2/sync_file_range.2:127
11144 msgid ""
11145 "Start write-out of all dirty pages in the specified range which are not "
11146 "presently under write-out.  This is an asynchronous flush-to-disk "
11147 "operation.  This is not suitable for data integrity operations."
11148 msgstr ""
11149 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11150 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11151 "る。データ完全性確保が必要な操作としては適切ではない。"
11152
11153 #. type: TP
11154 #: build/C/man2/sync_file_range.2:127
11155 #, no-wrap
11156 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11157 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11158
11159 #. type: Plain text
11160 #: build/C/man2/sync_file_range.2:134
11161 msgid ""
11162 "Wait for completion of write-out of all pages in the specified range.  This "
11163 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11164 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11165 "and obtain its result."
11166 msgstr ""
11167 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11168 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11169 "き、この操作の完了を待ち、結果を取得することができる。"
11170
11171 #. type: TP
11172 #: build/C/man2/sync_file_range.2:134
11173 #, no-wrap
11174 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11175 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11176
11177 #. type: Plain text
11178 #: build/C/man2/sync_file_range.2:141
11179 msgid ""
11180 "This is a write-for-data-integrity operation that will ensure that all pages "
11181 "in the specified range which were dirty when B<sync_file_range>()  was "
11182 "called are committed to disk."
11183 msgstr ""
11184 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11185 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11186 "のページが ディスクに格納されることが保証される。"
11187
11188 #. type: Plain text
11189 #: build/C/man2/sync_file_range.2:147
11190 msgid ""
11191 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11192 "I<errno> is set to indicate the error."
11193 msgstr ""
11194 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11195 "I<error> にエラーを示す値を設定する。"
11196
11197 #. type: Plain text
11198 #: build/C/man2/sync_file_range.2:152
11199 msgid "I<fd> is not a valid file descriptor."
11200 msgstr "I<fd> が有効なファイルディスクリプタではない。"
11201
11202 #. type: Plain text
11203 #: build/C/man2/sync_file_range.2:160
11204 msgid ""
11205 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11206 msgstr ""
11207 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11208 "である。"
11209
11210 #. type: Plain text
11211 #: build/C/man2/sync_file_range.2:163
11212 msgid "I/O error."
11213 msgstr "I/O エラー。"
11214
11215 #. type: Plain text
11216 #: build/C/man2/sync_file_range.2:169
11217 msgid "Out of disk space."
11218 msgstr "ディスク領域不足である。"
11219
11220 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11221 #.  (In user space at least) it isn't possible to obtain a file descriptor
11222 #.  for a symbolic link.
11223 #. type: Plain text
11224 #: build/C/man2/sync_file_range.2:177
11225 msgid ""
11226 "I<fd> refers to something other than a regular file, a block device, a "
11227 "directory, or a symbolic link."
11228 msgstr ""
11229 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11230 "以外のものを指している。"
11231
11232 #. type: Plain text
11233 #: build/C/man2/sync_file_range.2:180
11234 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11235 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11236
11237 #. type: Plain text
11238 #: build/C/man2/sync_file_range.2:183
11239 msgid ""
11240 "This system call is Linux-specific, and should be avoided in portable "
11241 "programs."
11242 msgstr ""
11243 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11244 "けるべきである。"
11245
11246 #. type: SS
11247 #: build/C/man2/sync_file_range.2:184
11248 #, no-wrap
11249 msgid "sync_file_range2()"
11250 msgstr ""
11251
11252 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11253 #. type: Plain text
11254 #: build/C/man2/sync_file_range.2:201
11255 msgid ""
11256 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11257 "in a suitable pair of registers.  On such architectures, the call signature "
11258 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11259 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11260 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11261 "different system call that orders the arguments suitably:"
11262 msgstr ""
11263 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
11264 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
11265 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
11266 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
11267 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
11268 "き数が適切な順序になった別のシステムコールが定義されている。"
11269
11270 #. type: Plain text
11271 #: build/C/man2/sync_file_range.2:206
11272 #, no-wrap
11273 msgid ""
11274 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11275 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11276 msgstr ""
11277 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11278 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11279
11280 #. type: Plain text
11281 #: build/C/man2/sync_file_range.2:211
11282 msgid ""
11283 "The behavior of this system call is otherwise exactly the same as "
11284 "B<sync_file_range>()."
11285 msgstr ""
11286 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11287 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11288 "glibc では提供されていない。"
11289
11290 #. type: Plain text
11291 #: build/C/man2/sync_file_range.2:222
11292 msgid ""
11293 "A system call with this signature first appeared on the ARM architecture in "
11294 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11295 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11296 "architectures where glibc support is provided, glibc transparently wraps "
11297 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11298 msgstr ""
11299 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
11300 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11301 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11302 "システムコールの名前が変更された。\n"
11303 "glibc によるサポートが提供されているアーキテクチャでは、\n"
11304 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11305 "B<sync_file_range2>() を適切に使用するようになっている。"
11306
11307 #. type: Plain text
11308 #: build/C/man2/sync_file_range.2:227
11309 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11310 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11311
11312 #~ msgid "2014-05-03"
11313 #~ msgstr "2014-05-03"
11314
11315 #~ msgid "2012-05-04"
11316 #~ msgstr "2012-05-04"
11317
11318 #~ msgid "2012-03-29"
11319 #~ msgstr "2012-03-29"
11320
11321 #~ msgid "2012-04-30"
11322 #~ msgstr "2012-04-30"
11323
11324 #~ msgid "2014-04-06"
11325 #~ msgstr "2014-04-06"
11326
11327 #~ msgid "2013-02-12"
11328 #~ msgstr "2013-02-12"
11329
11330 #~ msgid "2014-05-21"
11331 #~ msgstr "2014-05-21"
11332
11333 #~ msgid ""
11334 #~ "System-wide limit on the number of shared memory pages.  Since Linux 2.4, "
11335 #~ "the default value for this limit is"
11336 #~ msgstr ""
11337 #~ "システム全体の共有メモリ・ページ数の上限値。 Linux 2.2 以降では、この上限"
11338 #~ "値のデフォルトは以下である。"
11339
11340 #~ msgid "2014-04-28"
11341 #~ msgstr "2014-04-28"
11342
11343 #~ msgid ""
11344 #~ "Segment low boundary address multiple.  Must be page aligned.  For the "
11345 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
11346 #~ msgstr ""
11347 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
11348 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
11349
11350 #~ msgid "2013-04-01"
11351 #~ msgstr "2013-04-01"
11352
11353 #~ msgid "2014-05-10"
11354 #~ msgstr "2014-05-10"
11355
11356 #~ msgid "2008-04-22"
11357 #~ msgstr "2008-04-22"
11358
11359 #~ msgid "I<mode_flags>"
11360 #~ msgstr "I<mode_flags>"
11361
11362 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
11363 #~ msgstr ""
11364 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
11365
11366 #~ msgid ""
11367 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
11368 #~ "2^20 (2,097,152)."
11369 #~ msgstr ""
11370 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
11371 #~ "(2,097,152) になる。"
11372
11373 #~ msgid ""
11374 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
11375 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
11376 #~ "shmmax>)."
11377 #~ msgstr ""
11378 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
11379 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
11380 #~ "る)。"
11381
11382 #~ msgid ""
11383 #~ "System wide maximum number of shared memory segments: implementation "
11384 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
11385 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
11386 #~ msgstr ""
11387 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
11388 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
11389 #~ "で参照したり、変更したりできる)。"
11390
11391 #~ msgid ""
11392 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
11393 #~ msgstr ""
11394 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
11395 #~ "-1 が返される。"
11396
11397 #~ msgid ""
11398 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
11399 #~ "pair of registers.  On this architecture, the call signature of "
11400 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
11401 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
11402 #~ "2.6.14, ARM defines a different system call that orders the arguments "
11403 #~ "suitably:"
11404 #~ msgstr ""
11405 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
11406 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
11407 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
11408 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
11409 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
11410 #~ "システムコールが定義されている。"
11411
11412 #~ msgid ""
11413 #~ "The behavior of this system call is otherwise exactly the same as "
11414 #~ "B<posix_fadvise>().  No library support is provided for this system call "
11415 #~ "in glibc."
11416 #~ msgstr ""
11417 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
11418 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
11419 #~ "では提供されていない。"
11420
11421 #~ msgid ""
11422 #~ "The I<mode> is not supported by the file system containing the file "
11423 #~ "referred to by I<fd>."
11424 #~ msgstr ""
11425 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
11426 #~ "ない。"
11427
11428 #~ msgid ""
11429 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
11430 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
11431 #~ "these handlers."
11432 #~ msgstr ""
11433 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
11434 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
11435
11436 #~ msgid ""
11437 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
11438 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
11439 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
11440 #~ "truncated."
11441 #~ msgstr ""
11442 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
11443 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
11444 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
11445 #~ "イルの元の内容を上書きする。"
11446
11447 #~ msgid ""
11448 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
11449 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
11450 #~ msgstr ""
11451 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
11452 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
11453 #~ "リプトが付属している。"
11454
11455 #~ msgid ""
11456 #~ "This flag allocates and initializes to zero the disk space within the "
11457 #~ "range specified by I<offset> and I<len>.  After a successful call, "
11458 #~ "subsequent writes into this range are guaranteed not to fail because of "
11459 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
11460 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
11461 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
11462 #~ "less than I<offset>+I<len>."
11463 #~ msgstr ""
11464 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
11465 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
11466 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
11467 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
11468 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
11469 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
11470 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
11471 #~ "は変更されることはない。"