OSDN Git Service

Update po files based on local fixes
[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-04 23:36+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 #, fuzzy
431 #| msgid ""
432 #| "This page is part of release 3.75 of the Linux I<man-pages> project.  A "
433 #| "description of the project, information about reporting bugs, and the "
434 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
435 #| "man-pages/."
436 msgid ""
437 "This page is part of release 3.76 of the Linux I<man-pages> project.  A "
438 "description of the project, information about reporting bugs, and the latest "
439 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
440 "pages/."
441 msgstr ""
442 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.75 の一部\n"
443 "である。プロジェクトの説明とバグ報告に関する情報は\n"
444 "http://www.kernel.org/doc/man-pages/ に書かれている。"
445
446 #. type: TH
447 #: build/C/man3/alloca.3:43
448 #, no-wrap
449 msgid "ALLOCA"
450 msgstr "ALLOCA"
451
452 #. type: TH
453 #: build/C/man3/alloca.3:43
454 #, no-wrap
455 msgid "2013-10-07"
456 msgstr "2013-10-07"
457
458 #. type: TH
459 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
460 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
461 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
462 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
463 #: build/C/man3/posix_memalign.3:29
464 #, no-wrap
465 msgid "GNU"
466 msgstr "GNU"
467
468 #. type: Plain text
469 #: build/C/man3/alloca.3:46
470 msgid "alloca - allocate memory that is automatically freed"
471 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
472
473 #. type: Plain text
474 #: build/C/man3/alloca.3:48
475 msgid "B<#include E<lt>alloca.hE<gt>>"
476 msgstr "B<#include E<lt>alloca.hE<gt>>"
477
478 #. type: Plain text
479 #: build/C/man3/alloca.3:50
480 msgid "B<void *alloca(size_t >I<size>B<);>"
481 msgstr "B<void *alloca(size_t >I<size>B<);>"
482
483 #. type: Plain text
484 #: build/C/man3/alloca.3:60
485 msgid ""
486 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
487 "frame of the caller.  This temporary space is automatically freed when the "
488 "function that called B<alloca>()  returns to its caller."
489 msgstr ""
490 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
491 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
492 "に自動的に解放される。"
493
494 #. type: Plain text
495 #: build/C/man3/alloca.3:65
496 msgid ""
497 "The B<alloca>()  function returns a pointer to the beginning of the "
498 "allocated space.  If the allocation causes stack overflow, program behavior "
499 "is undefined."
500 msgstr ""
501 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
502 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
503 "い。"
504
505 #. type: SH
506 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
507 #: build/C/man3/posix_fallocate.3:103
508 #, no-wrap
509 msgid "ATTRIBUTES"
510 msgstr "属性"
511
512 #. type: SS
513 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
514 #: build/C/man3/posix_fallocate.3:104
515 #, no-wrap
516 msgid "Multithreading (see pthreads(7))"
517 msgstr "マルチスレッディング (pthreads(7) 参照)"
518
519 #. type: Plain text
520 #: build/C/man3/alloca.3:70
521 msgid "The B<alloca>()  function is thread-safe."
522 msgstr "B<alloca>() 関数はスレッドセーフである。"
523
524 #. type: Plain text
525 #: build/C/man3/alloca.3:72
526 msgid "This function is not in POSIX.1-2001."
527 msgstr "この関数は POSIX.1-2001 にはない。"
528
529 #. type: Plain text
530 #: build/C/man3/alloca.3:78
531 msgid ""
532 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
533 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
534 "the GNU version."
535 msgstr ""
536 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
537 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
538 "は POSIX.1-2001 にはない。"
539
540 #. type: Plain text
541 #: build/C/man3/alloca.3:93
542 msgid ""
543 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
544 "applications, its use can improve efficiency compared to the use of "
545 "B<malloc>(3)  plus B<free>(3).  In certain cases, it can also simplify "
546 "memory deallocation in applications that use B<longjmp>(3)  or "
547 "B<siglongjmp>(3).  Otherwise, its use is discouraged."
548 msgstr ""
549 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
550 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
551 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
552 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
553 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
554
555 #. type: Plain text
556 #: build/C/man3/alloca.3:102
557 msgid ""
558 "Because the space allocated by B<alloca>()  is allocated within the stack "
559 "frame, that space is automatically freed if the function return is jumped "
560 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
561 msgstr ""
562 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
563 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
564 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
565
566 #. type: Plain text
567 #: build/C/man3/alloca.3:107
568 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
569 msgstr ""
570 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
571 "に!"
572
573 #. type: SS
574 #: build/C/man3/alloca.3:107
575 #, no-wrap
576 msgid "Notes on the GNU version"
577 msgstr "GNU 版についての注意"
578
579 #. type: Plain text
580 #: build/C/man3/alloca.3:129
581 msgid ""
582 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
583 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
584 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
585 "included.  Otherwise, (without an -ansi or -std=c* option) the glibc version "
586 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
587 "the lines:"
588 msgstr ""
589 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
590 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
591 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
592 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
593 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
594 "インクルードするが、このファイルには以下の行が含まれており、"
595
596 #. type: Plain text
597 #: build/C/man3/alloca.3:134
598 #, no-wrap
599 msgid ""
600 "    #ifdef  __GNUC__\n"
601 "    #define alloca(size)   __builtin_alloca (size)\n"
602 "    #endif\n"
603 msgstr ""
604 "    #ifdef  __GNUC__\n"
605 "    #define alloca(size)   __builtin_alloca (size)\n"
606 "    #endif\n"
607
608 #. type: Plain text
609 #: build/C/man3/alloca.3:137
610 msgid "with messy consequences if one has a private version of this function."
611 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
612
613 #. type: Plain text
614 #: build/C/man3/alloca.3:141
615 msgid ""
616 "The fact that the code is inlined means that it is impossible to take the "
617 "address of this function, or to change its behavior by linking with a "
618 "different library."
619 msgstr ""
620 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
621 "のライブラリをリンクして動作を変更することはできない。"
622
623 #. type: Plain text
624 #: build/C/man3/alloca.3:145
625 msgid ""
626 "The inlined code often consists of a single instruction adjusting the stack "
627 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
628 "error return."
629 msgstr ""
630 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
631 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
632 "よって NULL エラーが返されることはない。"
633
634 #. type: SH
635 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
636 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
637 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:586 build/C/man3/mtrace.3:102
638 #: build/C/man2/posix_fadvise.2:204 build/C/man2/readahead.2:98
639 #: build/C/man2/shmget.2:375
640 #, no-wrap
641 msgid "BUGS"
642 msgstr "バグ"
643
644 #. type: Plain text
645 #: build/C/man3/alloca.3:150
646 msgid ""
647 "There is no error indication if the stack frame cannot be extended.  "
648 "(However, after a failed allocation, the program is likely to receive a "
649 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
650 msgstr ""
651 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
652 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
653 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
654
655 #. type: Plain text
656 #: build/C/man3/alloca.3:158
657 msgid ""
658 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
659 "a function call, because the stack space reserved by B<alloca>()  would "
660 "appear on the stack in the middle of the space for the function arguments."
661 msgstr ""
662 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
663 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
664 "使われるスタック領域の中に現れてしまうためである。"
665
666 #. type: SH
667 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:373
668 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:270
669 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
670 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
671 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
672 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
673 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:711 build/C/man2/mmap2.2:95
674 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
675 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
676 #: build/C/man2/posix_fadvise.2:209 build/C/man3/posix_fallocate.3:133
677 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
678 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
679 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
680 #: build/C/man2/shmget.2:381 build/C/man2/shmop.2:293
681 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
682 #, no-wrap
683 msgid "SEE ALSO"
684 msgstr "関連項目"
685
686 #. type: Plain text
687 #: build/C/man3/alloca.3:162
688 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
689 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
690
691 #. type: TH
692 #: build/C/man2/cacheflush.2:25
693 #, no-wrap
694 msgid "CACHEFLUSH"
695 msgstr "CACHEFLUSH"
696
697 #. type: TH
698 #: build/C/man2/cacheflush.2:25
699 #, no-wrap
700 msgid "2007-05-26"
701 msgstr "2007-05-26"
702
703 #. type: Plain text
704 #: build/C/man2/cacheflush.2:28
705 msgid "cacheflush - flush contents of instruction and/or data cache"
706 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
707
708 #. type: Plain text
709 #: build/C/man2/cacheflush.2:31
710 #, no-wrap
711 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
712 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
713
714 #. type: Plain text
715 #: build/C/man2/cacheflush.2:33
716 #, no-wrap
717 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
718 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
719
720 #. type: Plain text
721 #: build/C/man2/cacheflush.2:43
722 msgid ""
723 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
724 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
725 "of:"
726 msgstr ""
727 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
728 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
729 "指定する:"
730
731 #. type: TP
732 #: build/C/man2/cacheflush.2:43
733 #, no-wrap
734 msgid "B<ICACHE>"
735 msgstr "B<ICACHE>"
736
737 #. type: Plain text
738 #: build/C/man2/cacheflush.2:46
739 msgid "Flush the instruction cache."
740 msgstr "命令 (instruction) キャッシュをフラッシュする。"
741
742 #. type: TP
743 #: build/C/man2/cacheflush.2:46
744 #, no-wrap
745 msgid "B<DCACHE>"
746 msgstr "B<DCACHE>"
747
748 #. type: Plain text
749 #: build/C/man2/cacheflush.2:49
750 msgid "Write back to memory and invalidate the affected valid cache lines."
751 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
752
753 #. type: TP
754 #: build/C/man2/cacheflush.2:49
755 #, no-wrap
756 msgid "B<BCACHE>"
757 msgstr "B<BCACHE>"
758
759 #. type: Plain text
760 #: build/C/man2/cacheflush.2:53
761 msgid "Same as B<(ICACHE|DCACHE)>."
762 msgstr "B<(ICACHE|DCACHE)> と同じ。"
763
764 #. type: Plain text
765 #: build/C/man2/cacheflush.2:59
766 msgid ""
767 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
768 "detected, I<errno> will indicate the error."
769 msgstr ""
770 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
771 "出された場合は I<errno> にエラーが指示される。"
772
773 #. type: TP
774 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
775 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
776 #: build/C/man2/subpage_prot.2:72
777 #, no-wrap
778 msgid "B<EFAULT>"
779 msgstr "B<EFAULT>"
780
781 #. type: Plain text
782 #: build/C/man2/cacheflush.2:67
783 msgid ""
784 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
785 "accessible."
786 msgstr ""
787 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
788 "能ではない。"
789
790 #. type: TP
791 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
792 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
793 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
794 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
795 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
796 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
797 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
798 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
799 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
800 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
801 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
802 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
803 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
804 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
805 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
806 #, no-wrap
807 msgid "B<EINVAL>"
808 msgstr "B<EINVAL>"
809
810 #. type: Plain text
811 #: build/C/man2/cacheflush.2:75
812 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
813 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
814
815 #.  FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
816 #.  but by now it is on a number of other architectures (but not i386).
817 #.  Investigate the details and update this page.
818 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
819 #. type: Plain text
820 #: build/C/man2/cacheflush.2:82
821 msgid ""
822 "This Linux-specific system call is available only on MIPS-based systems.  It "
823 "should not be used in programs intended to be portable."
824 msgstr ""
825 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
826 "植を意図したプログラムで使用すべきではない。"
827
828 #. type: Plain text
829 #: build/C/man2/cacheflush.2:89
830 msgid ""
831 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
832 "Therefore, the whole cache is always flushed."
833 msgstr ""
834 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
835 "のキャッシュがフラッシュされる。"
836
837 #. type: TH
838 #: build/C/man2/fallocate.2:11
839 #, no-wrap
840 msgid "FALLOCATE"
841 msgstr "FALLOCATE"
842
843 #. type: TH
844 #: build/C/man2/fallocate.2:11 build/C/man3/mallopt.3:26
845 #: build/C/man2/shmop.2:41
846 #, no-wrap
847 msgid "2014-07-08"
848 msgstr "2014-07-08"
849
850 #. type: Plain text
851 #: build/C/man2/fallocate.2:14
852 msgid "fallocate - manipulate file space"
853 msgstr "fallocate - ファイル空間の操作"
854
855 #. type: Plain text
856 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
857 #, no-wrap
858 msgid ""
859 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
860 "B<#include E<lt>fcntl.hE<gt>>\n"
861 msgstr ""
862 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
863 "B<#include E<lt>fcntl.hE<gt>>\n"
864
865 #. type: Plain text
866 #: build/C/man2/fallocate.2:21
867 #, no-wrap
868 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
869 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
870
871 #. type: Plain text
872 #: build/C/man2/fallocate.2:27
873 msgid ""
874 "This is a nonportable, Linux-specific system call.  For the portable, "
875 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
876 "B<posix_fallocate>(3)."
877 msgstr ""
878 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
879 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
880 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
881
882 #. type: Plain text
883 #: build/C/man2/fallocate.2:37
884 msgid ""
885 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
886 "space for the file referred to by I<fd> for the byte range starting at "
887 "I<offset> and continuing for I<len> bytes."
888 msgstr ""
889 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
890 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
891 "域である。"
892
893 #. type: Plain text
894 #: build/C/man2/fallocate.2:42
895 msgid ""
896 "The I<mode> argument determines the operation to be performed on the given "
897 "range.  Details of the supported operations are given in the subsections "
898 "below."
899 msgstr ""
900 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
901 "サポートされている操作の詳細は以下のサブセクションで説明する。"
902
903 #. type: SS
904 #: build/C/man2/fallocate.2:42
905 #, no-wrap
906 msgid "Allocating disk space"
907 msgstr "ディスク領域の割り当て"
908
909 #. type: Plain text
910 #: build/C/man2/fallocate.2:65
911 msgid ""
912 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
913 "the disk space within the range specified by I<offset> and I<len>.  The file "
914 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
915 "greater than the file size.  Any subregion within the range specified by "
916 "I<offset> and I<len> that did not contain data before the call will be "
917 "initialized to zero.  This default behavior closely resembles the behavior "
918 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
919 "of optimally implementing that function."
920 msgstr ""
921 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
922 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
923 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
924 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
925 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
926 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
927 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
928 "適に実装する手段を提供することを目的としているからである。"
929
930 #. type: Plain text
931 #: build/C/man2/fallocate.2:71
932 msgid ""
933 "After a successful call, subsequent writes into the range specified by "
934 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
935 "space."
936 msgstr ""
937 "呼び出しが成功した場合、\n"
938 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
939 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
940
941 #. type: Plain text
942 #: build/C/man2/fallocate.2:82
943 msgid ""
944 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
945 "the call is similar, but the file size will not be changed even if I<offset>"
946 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
947 "the end of the file in this manner is useful for optimizing append workloads."
948 msgstr ""
949 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
950 "ル\n"
951 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
952 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
953 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
954 "追記を最適化したい場合に役に立つ。"
955
956 #. type: Plain text
957 #: build/C/man2/fallocate.2:86
958 msgid ""
959 "Because allocation is done in block size chunks, B<fallocate>()  may "
960 "allocate a larger range of disk space than was specified."
961 msgstr ""
962 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
963 "り\n"
964 "も大きなディスク領域を割り当てることがある。"
965
966 #. type: SS
967 #: build/C/man2/fallocate.2:86
968 #, no-wrap
969 msgid "Deallocating file space"
970 msgstr "ファイル空間の割り当て解除"
971
972 #. type: Plain text
973 #: build/C/man2/fallocate.2:101
974 msgid ""
975 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
976 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
977 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
978 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
979 "removed from the file.  After a successful call, subsequent reads from this "
980 "range will return zeroes."
981 msgstr ""
982 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
983 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
984 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
985 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
986 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
987 "を返す。"
988
989 #. type: Plain text
990 #: build/C/man2/fallocate.2:112
991 msgid ""
992 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
993 "I<mode>; in other words, even when punching off the end of the file, the "
994 "file size (as reported by B<stat>(2))  does not change."
995 msgstr ""
996 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
997 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
998 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
999
1000 #. type: Plain text
1001 #: build/C/man2/fallocate.2:117
1002 msgid ""
1003 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1004 "support the operation, an error is returned.  The operation is supported on "
1005 "at least the following filesystems:"
1006 msgstr ""
1007 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1008 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1009 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1010
1011 #. type: IP
1012 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1013 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1014 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1015 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1016 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1017 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1018 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1019 #: build/C/man2/shmop.2:80
1020 #, no-wrap
1021 msgid "*"
1022 msgstr "*"
1023
1024 #. type: Plain text
1025 #: build/C/man2/fallocate.2:119
1026 msgid "XFS (since Linux 2.6.38)"
1027 msgstr "XFS (Linux 2.6.38 以降)"
1028
1029 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1030 #. type: Plain text
1031 #: build/C/man2/fallocate.2:122
1032 msgid "ext4 (since Linux 3.0)"
1033 msgstr "ext4 (Linux 3.0 以降)"
1034
1035 #. type: Plain text
1036 #: build/C/man2/fallocate.2:124
1037 msgid "Btrfs (since Linux 3.7)"
1038 msgstr "Btrfs (Linux 3.7 以降)"
1039
1040 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1041 #. type: Plain text
1042 #: build/C/man2/fallocate.2:127
1043 msgid "tmpfs (since Linux 3.5)"
1044 msgstr "tmpfs (Linux 3.5 以降)"
1045
1046 #. type: SS
1047 #: build/C/man2/fallocate.2:127
1048 #, no-wrap
1049 msgid "Collapsing file space"
1050 msgstr "ファイル空間の一部削除"
1051
1052 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1053 #. type: Plain text
1054 #: build/C/man2/fallocate.2:147
1055 msgid ""
1056 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1057 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1058 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1059 "bytes.  At the completion of the operation, the contents of the file "
1060 "starting at the location I<offset+len> will be appended at the location "
1061 "I<offset>, and the file will be I<len> bytes smaller."
1062 msgstr ""
1063 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1064 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残ら"
1065 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1066 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1067 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1068 "くなる。"
1069
1070 #. type: Plain text
1071 #: build/C/man2/fallocate.2:161
1072 msgid ""
1073 "A filesystem may place limitations on the granularity of the operation, in "
1074 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1075 "must be a multiple of the filesystem logical block size, which varies "
1076 "according to the filesystem type and configuration.  If a filesystem has "
1077 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1078 "this requirement is violated."
1079 msgstr ""
1080 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1081 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1082 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1083 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1084 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1085
1086 #. type: Plain text
1087 #: build/C/man2/fallocate.2:170
1088 msgid ""
1089 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1090 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1091 "file."
1092 msgstr ""
1093 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1094 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1095 "B<ftruncate>(2) を使用すること。"
1096
1097 #. type: Plain text
1098 #: build/C/man2/fallocate.2:175
1099 msgid ""
1100 "No other flags may be specified in I<mode> in conjunction with "
1101 "B<FALLOC_FL_COLLAPSE_RANGE>."
1102 msgstr ""
1103 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1104 "ない。"
1105
1106 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1107 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1108 #. type: Plain text
1109 #: build/C/man2/fallocate.2:183
1110 msgid ""
1111 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1112 "extent-based files)  and XFS."
1113 msgstr ""
1114 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1115 "ファイル) と XFS でサポートされている。"
1116
1117 #. type: SS
1118 #: build/C/man2/fallocate.2:183
1119 #, no-wrap
1120 msgid "Zeroing file space"
1121 msgstr "ファイル空間のゼロ埋め"
1122
1123 #.  commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1124 #. type: Plain text
1125 #: build/C/man2/fallocate.2:199
1126 #, fuzzy
1127 #| msgid ""
1128 #| "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux "
1129 #| "2.6.38) in I<mode> deallocates space (i.e., creates a hole)  in the byte "
1130 #| "range starting at I<offset> and continuing for I<len> bytes.  Within the "
1131 #| "specified range, partial filesystem blocks are zeroed, and whole "
1132 #| "filesystem blocks are removed from the file.  After a successful call, "
1133 #| "subsequent reads from this range will return zeroes."
1134 msgid ""
1135 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14)  in "
1136 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1137 "for I<len> bytes.  Within the specified range, blocks are preallocated for "
1138 "the regions that span the holes in the file.  After a successful call, "
1139 "subsequent reads from this range will return zeroes."
1140 msgstr ""
1141 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
1142 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1143 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1144 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1145 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1146 "を返す。"
1147
1148 #. type: Plain text
1149 #: build/C/man2/fallocate.2:205
1150 msgid ""
1151 "Zeroing is done within the filesystem preferably by converting the range "
1152 "into unwritten extents.  This approach means that the specified range will "
1153 "not be physically zeroed out on the device (except for partial blocks at the "
1154 "either end of the range), and I/O is (otherwise) required only to update "
1155 "metadata."
1156 msgstr ""
1157
1158 #. type: Plain text
1159 #: build/C/man2/fallocate.2:217
1160 #, fuzzy
1161 #| msgid ""
1162 #| "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior "
1163 #| "of the call is similar, but the file size will not be changed even if "
1164 #| "I<offset>+I<len> is greater than the file size.  Preallocating zeroed "
1165 #| "blocks beyond the end of the file in this manner is useful for optimizing "
1166 #| "append workloads."
1167 msgid ""
1168 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1169 "behavior of the call is similar, but the file size will not be changed even "
1170 "if I<offset>+I<len> is greater than the file size.  This behavior is the "
1171 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1172 msgstr ""
1173 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
1174 "ル\n"
1175 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
1176 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
1177 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
1178 "追記を最適化したい場合に役に立つ。"
1179
1180 #. type: Plain text
1181 #: build/C/man2/fallocate.2:222
1182 msgid ""
1183 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1184 "support the operation, an error is returned.  The operation is supported on "
1185 "at least the following filesystems:"
1186 msgstr ""
1187 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1188 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1189 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1190
1191 #.  commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1192 #. type: Plain text
1193 #: build/C/man2/fallocate.2:225
1194 msgid "XFS (since Linux 3.14)"
1195 msgstr "XFS (Linux 3.14 以降)"
1196
1197 #.  commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1198 #. type: Plain text
1199 #: build/C/man2/fallocate.2:228
1200 #, fuzzy
1201 #| msgid "ext4 (since Linux 3.0)"
1202 msgid "ext4, for extent-based files (since Linux 3.14)"
1203 msgstr "ext4 (Linux 3.0 以降)"
1204
1205 #. type: Plain text
1206 #: build/C/man2/fallocate.2:235
1207 msgid ""
1208 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1209 "I<errno> is set to indicate the error."
1210 msgstr ""
1211 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1212 "にエラーを示す値を設定する。"
1213
1214 #. type: TP
1215 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1216 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1217 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1218 #: build/C/man2/sync_file_range.2:148
1219 #, no-wrap
1220 msgid "B<EBADF>"
1221 msgstr "B<EBADF>"
1222
1223 #. type: Plain text
1224 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1225 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1226 msgstr ""
1227 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1228 "いない。"
1229
1230 #. type: TP
1231 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1232 #, no-wrap
1233 msgid "B<EFBIG>"
1234 msgstr "B<EFBIG>"
1235
1236 #. type: Plain text
1237 #: build/C/man2/fallocate.2:244
1238 msgid "I<offset>+I<len> exceeds the maximum file size."
1239 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1240
1241 #. type: TP
1242 #: build/C/man2/fallocate.2:244
1243 #, no-wrap
1244 msgid "B<EINTR>"
1245 msgstr "B<EINTR>"
1246
1247 #. type: Plain text
1248 #: build/C/man2/fallocate.2:247
1249 msgid "A signal was caught during execution."
1250 msgstr "実行中にシグナルが捕捉された。"
1251
1252 #. type: Plain text
1253 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1254 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1255 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1256
1257 #. type: Plain text
1258 #: build/C/man2/fallocate.2:269
1259 msgid ""
1260 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1261 "plus I<len> reaches or passes the end of the file."
1262 msgstr ""
1263 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1264 "範囲がファイルの末尾かそれより先まで達している。"
1265
1266 #. type: Plain text
1267 #: build/C/man2/fallocate.2:279
1268 msgid ""
1269 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1270 "not a multiple of the filesystem block size."
1271 msgstr ""
1272 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1273 "がファイルシステムのブロックサイズの倍数ではない。"
1274
1275 #. type: Plain text
1276 #: build/C/man2/fallocate.2:287
1277 msgid ""
1278 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1279 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1280 msgstr ""
1281 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1282 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1283
1284 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1285 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1286 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1287 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1288 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1289 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1290 #.  Date: 2014-04-17 13:40:05 GMT
1291 #. type: Plain text
1292 #: build/C/man2/fallocate.2:304
1293 msgid ""
1294 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1295 "file referred to by I<fd> is not a regular file."
1296 msgstr ""
1297 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1298 "I<fd> が参照しているファイルが通常のファイルではない。"
1299
1300 #. type: TP
1301 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1302 #: build/C/man2/sync_file_range.2:160
1303 #, no-wrap
1304 msgid "B<EIO>"
1305 msgstr "B<EIO>"
1306
1307 #. type: Plain text
1308 #: build/C/man2/fallocate.2:307
1309 msgid "An I/O error occurred while reading from or writing to a filesystem."
1310 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1311
1312 #. type: TP
1313 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1314 #: build/C/man3/posix_fallocate.3:87
1315 #, no-wrap
1316 msgid "B<ENODEV>"
1317 msgstr "B<ENODEV>"
1318
1319 #. type: Plain text
1320 #: build/C/man2/fallocate.2:314
1321 msgid ""
1322 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1323 "or FIFO, a different error results.)"
1324 msgstr ""
1325 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1326 "を参照している場合、別のエラーが発生する)。"
1327
1328 #. type: TP
1329 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1330 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1331 #, no-wrap
1332 msgid "B<ENOSPC>"
1333 msgstr "B<ENOSPC>"
1334
1335 #. type: Plain text
1336 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1337 msgid ""
1338 "There is not enough space left on the device containing the file referred to "
1339 "by I<fd>."
1340 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1341
1342 #. type: Plain text
1343 #: build/C/man2/fallocate.2:323
1344 msgid "This kernel does not implement B<fallocate>()."
1345 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1346
1347 #. type: TP
1348 #: build/C/man2/fallocate.2:323
1349 #, no-wrap
1350 msgid "B<EOPNOTSUPP>"
1351 msgstr "B<EOPNOTSUPP>"
1352
1353 #. type: Plain text
1354 #: build/C/man2/fallocate.2:332
1355 msgid ""
1356 "The filesystem containing the file referred to by I<fd> does not support "
1357 "this operation; or the I<mode> is not supported by the filesystem containing "
1358 "the file referred to by I<fd>."
1359 msgstr ""
1360 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1361 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1362 "I<mode> をサポートしていない。"
1363
1364 #. type: TP
1365 #: build/C/man2/fallocate.2:332 build/C/man2/mlock.2:143
1366 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1367 #: build/C/man2/shmget.2:241
1368 #, no-wrap
1369 msgid "B<EPERM>"
1370 msgstr "B<EPERM>"
1371
1372 #. type: Plain text
1373 #: build/C/man2/fallocate.2:350
1374 msgid ""
1375 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1376 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1377 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1378 msgstr ""
1379 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1380 "(B<chattr>(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> か "
1381 "B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルに追加の"
1382 "み (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1383
1384 #. type: TP
1385 #: build/C/man2/fallocate.2:350 build/C/man2/posix_fadvise.2:97
1386 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1387 #, no-wrap
1388 msgid "B<ESPIPE>"
1389 msgstr "B<ESPIPE>"
1390
1391 #. type: Plain text
1392 #: build/C/man2/fallocate.2:354
1393 msgid "I<fd> refers to a pipe or FIFO."
1394 msgstr "I<fd> がパイプか FIFO を参照している。"
1395
1396 #. type: TP
1397 #: build/C/man2/fallocate.2:354 build/C/man2/mmap.2:467
1398 #, no-wrap
1399 msgid "B<ETXTBSY>"
1400 msgstr "B<ETXTBSY>"
1401
1402 #. type: Plain text
1403 #: build/C/man2/fallocate.2:362
1404 msgid ""
1405 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1406 "I<fd> is currently being executed."
1407 msgstr ""
1408 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1409 "イルは現在実行中である。"
1410
1411 #. type: SH
1412 #: build/C/man2/fallocate.2:362 build/C/man2/madvise.2:325
1413 #: build/C/man3/malloc_info.3:60 build/C/man3/mcheck.3:134
1414 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:107
1415 #: build/C/man3/posix_fallocate.3:100 build/C/man3/posix_memalign.3:167
1416 #: build/C/man2/readahead.2:83 build/C/man2/remap_file_pages.2:156
1417 #: build/C/man3/shm_open.3:249 build/C/man2/subpage_prot.2:90
1418 #: build/C/man2/sync_file_range.2:177
1419 #, no-wrap
1420 msgid "VERSIONS"
1421 msgstr "バージョン"
1422
1423 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1424 #. type: Plain text
1425 #: build/C/man2/fallocate.2:370
1426 msgid ""
1427 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1428 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1429 "in glibc headers only since version 2.18."
1430 msgstr ""
1431 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1432 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1433 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1434
1435 #. type: Plain text
1436 #: build/C/man2/fallocate.2:373
1437 msgid "B<fallocate>()  is Linux-specific."
1438 msgstr "B<fallocate>()  は Linux 固有である。"
1439
1440 #. type: Plain text
1441 #: build/C/man2/fallocate.2:378
1442 msgid ""
1443 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1444 msgstr ""
1445 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1446
1447 #. type: TH
1448 #: build/C/man2/madvise.2:35
1449 #, no-wrap
1450 msgid "MADVISE"
1451 msgstr "MADVISE"
1452
1453 #. type: TH
1454 #: build/C/man2/madvise.2:35 build/C/man2/posix_fadvise.2:28
1455 #, fuzzy, no-wrap
1456 #| msgid "2014-01-11"
1457 msgid "2014-12-31"
1458 msgstr "2014-01-11"
1459
1460 #. type: Plain text
1461 #: build/C/man2/madvise.2:38
1462 msgid "madvise - give advice about use of memory"
1463 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1464
1465 #. type: Plain text
1466 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1467 #: build/C/man3/shm_open.3:31
1468 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1469 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1470
1471 #. type: Plain text
1472 #: build/C/man2/madvise.2:42
1473 msgid ""
1474 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1475 msgstr ""
1476 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1477
1478 #. type: Plain text
1479 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1480 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1481 msgid ""
1482 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1483 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1484
1485 #. type: Plain text
1486 #: build/C/man2/madvise.2:50
1487 msgid "B<madvise>(): _BSD_SOURCE"
1488 msgstr "B<madvise>(): _BSD_SOURCE"
1489
1490 #. type: Plain text
1491 #: build/C/man2/madvise.2:68
1492 msgid ""
1493 "The B<madvise>()  system call advises the kernel about how to handle paging "
1494 "input/output in the address range beginning at address I<addr> and with size "
1495 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1496 "to use some mapped or shared memory areas, so that the kernel can choose "
1497 "appropriate read-ahead and caching techniques.  This call does not influence "
1498 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1499 "but may influence its performance.  The kernel is free to ignore the advice."
1500 msgstr ""
1501 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1502 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1503 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1504 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1505 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1506 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1507 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1508
1509 #. type: Plain text
1510 #: build/C/man2/madvise.2:72
1511 msgid "The advice is indicated in the I<advice> argument which can be"
1512 msgstr ""
1513 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1514
1515 #. type: TP
1516 #: build/C/man2/madvise.2:72
1517 #, no-wrap
1518 msgid "B<MADV_NORMAL>"
1519 msgstr "B<MADV_NORMAL>"
1520
1521 #. type: Plain text
1522 #: build/C/man2/madvise.2:76
1523 msgid "No special treatment.  This is the default."
1524 msgstr "特別な扱いは行わない。これがデフォルトである。"
1525
1526 #. type: TP
1527 #: build/C/man2/madvise.2:76
1528 #, no-wrap
1529 msgid "B<MADV_RANDOM>"
1530 msgstr "B<MADV_RANDOM>"
1531
1532 #. type: Plain text
1533 #: build/C/man2/madvise.2:80
1534 msgid ""
1535 "Expect page references in random order.  (Hence, read ahead may be less "
1536 "useful than normally.)"
1537 msgstr ""
1538 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1539 "なさそうだ。)"
1540
1541 #. type: TP
1542 #: build/C/man2/madvise.2:80
1543 #, no-wrap
1544 msgid "B<MADV_SEQUENTIAL>"
1545 msgstr "B<MADV_SEQUENTIAL>"
1546
1547 #. type: Plain text
1548 #: build/C/man2/madvise.2:85
1549 msgid ""
1550 "Expect page references in sequential order.  (Hence, pages in the given "
1551 "range can be aggressively read ahead, and may be freed soon after they are "
1552 "accessed.)"
1553 msgstr ""
1554 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1555 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1556 "して良い。)"
1557
1558 #. type: TP
1559 #: build/C/man2/madvise.2:85
1560 #, no-wrap
1561 msgid "B<MADV_WILLNEED>"
1562 msgstr "B<MADV_WILLNEED>"
1563
1564 #. type: Plain text
1565 #: build/C/man2/madvise.2:89
1566 msgid ""
1567 "Expect access in the near future.  (Hence, it might be a good idea to read "
1568 "some pages ahead.)"
1569 msgstr ""
1570 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1571 "ておくといいだろう。)"
1572
1573 #. type: TP
1574 #: build/C/man2/madvise.2:89
1575 #, no-wrap
1576 msgid "B<MADV_DONTNEED>"
1577 msgstr "B<MADV_DONTNEED>"
1578
1579 #. type: Plain text
1580 #: build/C/man2/madvise.2:100
1581 msgid ""
1582 "Do not expect access in the near future.  (For the time being, the "
1583 "application is finished with the given range, so the kernel can free "
1584 "resources associated with it.)  Subsequent accesses of pages in this range "
1585 "will succeed, but will result either in reloading of the memory contents "
1586 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1587 "pages for mappings without an underlying file."
1588 msgstr ""
1589 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1590 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1591 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1592 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1593 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1594 "なる。"
1595
1596 #. type: TP
1597 #: build/C/man2/madvise.2:100
1598 #, no-wrap
1599 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1600 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1601
1602 #.  2.6.18-rc5
1603 #.  Databases want to use this feature to drop a section of their
1604 #.  bufferpool (shared memory segments) - without writing back to
1605 #.  disk/swap space.  This feature is also useful for supporting
1606 #.  hot-plug memory on UML.
1607 #. type: Plain text
1608 #: build/C/man2/madvise.2:113
1609 msgid ""
1610 "Free up a given range of pages and its associated backing store.  Currently, "
1611 "only shmfs/tmpfs supports this; other filesystems return with the error "
1612 "B<ENOSYS>."
1613 msgstr ""
1614 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1615 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1616 "返される。"
1617
1618 #. type: TP
1619 #: build/C/man2/madvise.2:113
1620 #, no-wrap
1621 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1622 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1623
1624 #.  See http://lwn.net/Articles/171941/
1625 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1626 #.  Currently, copy-on-write may change the physical address of
1627 #.  a page even if the user requested that the page is pinned in
1628 #.  memory (either by mlock or by get_user_pages).  This happens
1629 #.  if the process forks meanwhile, and the parent writes to that
1630 #.  page.  As a result, the page is orphaned: in case of
1631 #.  get_user_pages, the application will never see any data hardware
1632 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1633 #.  the parent is not getting the realtime/security benefits of mlock.
1634 #.  In particular, this affects the Infiniband modules which do DMA from
1635 #.  and into user pages all the time.
1636 #.  This patch adds madvise options to control whether memory range is
1637 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1638 #.  from/into these pages.  Could also be useful to an application
1639 #.  wanting to speed up its forks by cutting large areas out of
1640 #.  consideration.
1641 #.  SEE ALSO: http://lwn.net/Articles/171941/
1642 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1643 #. type: Plain text
1644 #: build/C/man2/madvise.2:144
1645 msgid ""
1646 "Do not make the pages in this range available to the child after a "
1647 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1648 "the physical location of a page(s) if the parent writes to it after a "
1649 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1650 "into the page(s).)"
1651 msgstr ""
1652 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1653 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1654 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1655 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1656 "を行うような場合に 問題を起こすことがある)。"
1657
1658 #. type: TP
1659 #: build/C/man2/madvise.2:144
1660 #, no-wrap
1661 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1662 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1663
1664 #. type: Plain text
1665 #: build/C/man2/madvise.2:150
1666 msgid ""
1667 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1668 "a mapping is inherited across B<fork>(2)."
1669 msgstr ""
1670 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1671 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1672
1673 #. type: TP
1674 #: build/C/man2/madvise.2:150
1675 #, no-wrap
1676 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1677 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1678
1679 #. type: Plain text
1680 #: build/C/man2/madvise.2:162
1681 msgid ""
1682 "Poison a page and handle it like a hardware memory corruption.  This "
1683 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1684 "This operation may result in the calling process receiving a B<SIGBUS> and "
1685 "the page being unmapped.  This feature is intended for testing of memory "
1686 "error-handling code; it is available only if the kernel was configured with "
1687 "B<CONFIG_MEMORY_FAILURE>."
1688 msgstr ""
1689 "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 "
1690 "この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操"
1691 "作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップさ"
1692 "れる。 この機能はメモリのエラー処理コードをテストするためのものである。 カー"
1693 "ネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1694
1695 #. type: TP
1696 #: build/C/man2/madvise.2:162
1697 #, no-wrap
1698 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1699 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1700
1701 #. type: Plain text
1702 #: build/C/man2/madvise.2:180
1703 msgid ""
1704 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1705 "memory of each page in the specified range is preserved (i.e., when next "
1706 "accessed, the same content will be visible, but in a new physical page "
1707 "frame), and the original page is offlined (i.e., no longer used, and taken "
1708 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1709 "operation is invisible to (i.e., does not change the semantics of)  the "
1710 "calling process.  This feature is intended for testing of memory error-"
1711 "handling code; it is available only if the kernel was configured with "
1712 "B<CONFIG_MEMORY_FAILURE>."
1713 msgstr ""
1714 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1715 "された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際"
1716 "に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフ"
1717 "ラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り"
1718 "除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない "
1719 "(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理"
1720 "コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> "
1721 "が有効になっている場合にのみ利用可能である。"
1722
1723 #. type: TP
1724 #: build/C/man2/madvise.2:180
1725 #, no-wrap
1726 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1727 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1728
1729 #. type: Plain text
1730 #: build/C/man2/madvise.2:205
1731 msgid ""
1732 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1733 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1734 "memory that have been marked as mergeable, looking for pages with identical "
1735 "content.  These are replaced by a single write-protected page (which is "
1736 "automatically copied if a process later wants to update the content of the "
1737 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1738 "feature is intended for applications that generate many instances of the "
1739 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1740 "of processing power; use with care.  See the Linux kernel source file "
1741 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1742 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1743 "configured with B<CONFIG_KSM>."
1744 msgstr ""
1745 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1746 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1747 "いたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内"
1748 "容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) が"
1749 "かかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよう"
1750 "とした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ペー"
1751 "ジ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデー"
1752 "タのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) "
1753 "での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があ"
1754 "り、注意して使用すること。 詳細は Linux カーネルソースファイル "
1755 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1756 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1757 "る場合にのみ利用できる。"
1758
1759 #. type: TP
1760 #: build/C/man2/madvise.2:205
1761 #, no-wrap
1762 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1763 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1764
1765 #. type: Plain text
1766 #: build/C/man2/madvise.2:214
1767 msgid ""
1768 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1769 "address range; KSM unmerges whatever pages it had merged in the address "
1770 "range specified by I<addr> and I<length>."
1771 msgstr ""
1772 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1773 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1774 "済みのすべてのページの統合解除を行う。"
1775
1776 #. type: TP
1777 #: build/C/man2/madvise.2:214
1778 #, no-wrap
1779 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1780 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1781
1782 #.  http://lwn.net/Articles/358904/
1783 #.  https://lwn.net/Articles/423584/
1784 #. type: Plain text
1785 #: build/C/man2/madvise.2:243
1786 msgid ""
1787 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1788 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1789 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1790 "the areas marked as huge page candidates to replace them with huge pages.  "
1791 "The kernel will also allocate huge pages directly when the region is "
1792 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1793 "feature is primarily aimed at applications that use large mappings of data "
1794 "and access large regions of that memory at a time (e.g., virtualization "
1795 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1796 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1797 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1798 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1799 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1800 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1801 msgstr ""
1802 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1803 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1804 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1805 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1806 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1807 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1808 "マッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリ"
1809 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1810 "る。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセ"
1811 "スしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってし"
1812 "まう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1813 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1814 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1815 "る。"
1816
1817 #. type: TP
1818 #: build/C/man2/madvise.2:243
1819 #, no-wrap
1820 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1821 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1822
1823 #. type: Plain text
1824 #: build/C/man2/madvise.2:250
1825 msgid ""
1826 "Ensures that memory in the address range specified by I<addr> and I<length> "
1827 "will not be collapsed into huge pages."
1828 msgstr ""
1829 "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込"
1830 "まれないようにする。"
1831
1832 #. type: TP
1833 #: build/C/man2/madvise.2:250
1834 #, no-wrap
1835 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1836 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1837
1838 #. type: Plain text
1839 #: build/C/man2/madvise.2:264
1840 msgid ""
1841 "Exclude from a core dump those pages in the range specified by I<addr> and "
1842 "I<length>.  This is useful in applications that have large areas of memory "
1843 "that are known not to be useful in a core dump.  The effect of "
1844 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1845 "proc/PID/coredump_filter> file (see B<core>(5))."
1846 msgstr ""
1847 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1848 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域がある"
1849 "アプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1850 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1851 "(B<core>(5) 参照)。"
1852
1853 #. type: TP
1854 #: build/C/man2/madvise.2:264
1855 #, no-wrap
1856 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1857 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1858
1859 #. type: Plain text
1860 #: build/C/man2/madvise.2:268
1861 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1862 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1863
1864 #. type: Plain text
1865 #: build/C/man2/madvise.2:275
1866 msgid ""
1867 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1868 "is set appropriately."
1869 msgstr ""
1870 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1871 "を適切な値に設定する。"
1872
1873 #. type: TP
1874 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1875 #: build/C/man2/mremap.2:136
1876 #, no-wrap
1877 msgid "B<EAGAIN>"
1878 msgstr "B<EAGAIN>"
1879
1880 #. type: Plain text
1881 #: build/C/man2/madvise.2:279
1882 msgid "A kernel resource was temporarily unavailable."
1883 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1884
1885 #. type: Plain text
1886 #: build/C/man2/madvise.2:282
1887 msgid "The map exists, but the area maps something that isn't a file."
1888 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1889
1890 #. type: Plain text
1891 #: build/C/man2/madvise.2:285
1892 msgid "This error can occur for the following reasons:"
1893 msgstr "このエラーは以下の理由で発生する。"
1894
1895 #.  .I len
1896 #.  is zero,
1897 #. type: Plain text
1898 #: build/C/man2/madvise.2:292
1899 msgid "The value I<len> is negative."
1900 msgstr "I<len> が負の値である。"
1901
1902 #. type: Plain text
1903 #: build/C/man2/madvise.2:295
1904 msgid "I<addr> is not page-aligned."
1905 msgstr "I<addr> がページ境界ではない。"
1906
1907 #. type: Plain text
1908 #: build/C/man2/madvise.2:298
1909 msgid "I<advice> is not a valid value"
1910 msgstr "I<advice> が有効な値でない。"
1911
1912 #. type: Plain text
1913 #: build/C/man2/madvise.2:301
1914 msgid ""
1915 "The application is attempting to release locked or shared pages (with "
1916 "B<MADV_DONTNEED>)."
1917 msgstr ""
1918 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1919 "放\n"
1920 "しようとしている。"
1921
1922 #. type: Plain text
1923 #: build/C/man2/madvise.2:309
1924 msgid ""
1925 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1926 "kernel was not configured with B<CONFIG_KSM>."
1927 msgstr ""
1928 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1929 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1930
1931 #. type: Plain text
1932 #: build/C/man2/madvise.2:316
1933 msgid ""
1934 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1935 "maximum resident set size."
1936 msgstr ""
1937 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1938 "(resident set size) の最大値を越えてしまう。"
1939
1940 #. type: TP
1941 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1942 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1943 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1944 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1945 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1946 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1947 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1948 #: build/C/man2/sync_file_range.2:163
1949 #, no-wrap
1950 msgid "B<ENOMEM>"
1951 msgstr "B<ENOMEM>"
1952
1953 #. type: Plain text
1954 #: build/C/man2/madvise.2:321
1955 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1956 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1957
1958 #. type: Plain text
1959 #: build/C/man2/madvise.2:325
1960 msgid ""
1961 "Addresses in the specified range are not currently mapped, or are outside "
1962 "the address space of the process."
1963 msgstr ""
1964 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1965 "空間の内部にない。"
1966
1967 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
1968 #. type: Plain text
1969 #: build/C/man2/madvise.2:332
1970 msgid ""
1971 "Since Linux 3.18, support for this system call is optional, depending on the "
1972 "setting of the B<CONFIG_ADVISE_SYSCALLS> configuration option."
1973 msgstr ""
1974
1975 #.  FIXME . Write a posix_madvise(3) page.
1976 #. type: Plain text
1977 #: build/C/man2/madvise.2:345
1978 msgid ""
1979 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1980 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1981 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1982 "access."
1983 msgstr ""
1984 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1985 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1986 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1987 "類似の関数が存在する。"
1988
1989 #. type: Plain text
1990 #: build/C/man2/madvise.2:354
1991 msgid ""
1992 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1993 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1994 msgstr ""
1995 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1996 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1997
1998 #. type: SS
1999 #: build/C/man2/madvise.2:355 build/C/man2/mlock.2:274
2000 #: build/C/man2/shmget.2:369
2001 #, no-wrap
2002 msgid "Linux notes"
2003 msgstr "Linux での注意"
2004
2005 #. type: Plain text
2006 #: build/C/man2/madvise.2:363
2007 msgid ""
2008 "The current Linux implementation (2.4.0) views this system call more as a "
2009 "command than as advice and hence may return an error when it cannot do what "
2010 "it usually would do in response to this advice.  (See the ERRORS description "
2011 "above.)  This is nonstandard behavior."
2012 msgstr ""
2013 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2014 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2015 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2016 "とは異なる。"
2017
2018 #.  .SH HISTORY
2019 #.  The
2020 #.  .BR madvise ()
2021 #.  function first appeared in 4.4BSD.
2022 #. type: Plain text
2023 #: build/C/man2/madvise.2:379
2024 msgid ""
2025 "The Linux implementation requires that the address I<addr> be page-aligned, "
2026 "and allows I<length> to be zero.  If there are some parts of the specified "
2027 "address range that are not mapped, the Linux version of B<madvise>()  "
2028 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2029 "the system call, as it should)."
2030 msgstr ""
2031 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2032 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2033 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2034 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2035 "返す)。"
2036
2037 #. type: Plain text
2038 #: build/C/man2/madvise.2:388
2039 msgid ""
2040 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2041 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2042 msgstr ""
2043 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2044 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2045
2046 #. type: TH
2047 #: build/C/man3/mallinfo.3:26
2048 #, no-wrap
2049 msgid "MALLINFO"
2050 msgstr "MALLINFO"
2051
2052 #. type: TH
2053 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2054 #, no-wrap
2055 msgid "2012-05-06"
2056 msgstr "2012-05-06"
2057
2058 #. type: Plain text
2059 #: build/C/man3/mallinfo.3:29
2060 msgid "mallinfo - obtain memory allocation information"
2061 msgstr "mallinfo - メモリ割り当て情報を取得する"
2062
2063 #. type: Plain text
2064 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2065 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2066 #: build/C/man3/mallopt.3:31
2067 msgid "B<#include E<lt>malloc.hE<gt>>"
2068 msgstr "B<#include E<lt>malloc.hE<gt>>"
2069
2070 #. type: Plain text
2071 #: build/C/man3/mallinfo.3:33
2072 msgid "B<struct mallinfo mallinfo(void);>"
2073 msgstr "B<struct mallinfo mallinfo(void);>"
2074
2075 #. type: Plain text
2076 #: build/C/man3/mallinfo.3:41
2077 msgid ""
2078 "The B<mallinfo>()  function returns a copy of a structure containing "
2079 "information about memory allocations performed by B<malloc>(3)  and related "
2080 "functions.  This structure is defined as follows:"
2081 msgstr ""
2082 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
2083 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2084 "この構造体は以下のように定義されている。"
2085
2086 #. type: Plain text
2087 #: build/C/man3/mallinfo.3:56
2088 #, no-wrap
2089 msgid ""
2090 "struct mallinfo {\n"
2091 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2092 "    int ordblks;   /* Number of free chunks */\n"
2093 "    int smblks;    /* Number of free fastbin blocks */\n"
2094 "    int hblks;     /* Number of mmapped regions */\n"
2095 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2096 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2097 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2098 "    int uordblks;  /* Total allocated space (bytes) */\n"
2099 "    int fordblks;  /* Total free space (bytes) */\n"
2100 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2101 "};\n"
2102 msgstr ""
2103 "struct mallinfo {\n"
2104 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2105 "    int ordblks;   /* Number of free chunks */\n"
2106 "    int smblks;    /* Number of free fastbin blocks */\n"
2107 "    int hblks;     /* Number of mmapped regions */\n"
2108 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2109 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2110 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2111 "    int uordblks;  /* Total allocated space (bytes) */\n"
2112 "    int fordblks;  /* Total free space (bytes) */\n"
2113 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2114 "};\n"
2115
2116 #. type: Plain text
2117 #: build/C/man3/mallinfo.3:62
2118 msgid ""
2119 "The fields of the I<mallinfo> structure contain the following information:"
2120 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2121
2122 #. type: TP
2123 #: build/C/man3/mallinfo.3:62
2124 #, no-wrap
2125 msgid "I<arena>"
2126 msgstr "I<arena>"
2127
2128 #. type: Plain text
2129 #: build/C/man3/mallinfo.3:68
2130 msgid ""
2131 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2132 "memory allocated on the heap).  This figure includes both in-use blocks and "
2133 "blocks on the free list."
2134 msgstr ""
2135
2136 #. type: TP
2137 #: build/C/man3/mallinfo.3:68
2138 #, no-wrap
2139 msgid "I<ordblks>"
2140 msgstr "I<ordblks>"
2141
2142 #. type: Plain text
2143 #: build/C/man3/mallinfo.3:71
2144 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2145 msgstr ""
2146
2147 #. type: TP
2148 #: build/C/man3/mallinfo.3:71
2149 #, no-wrap
2150 msgid "I<smblks>"
2151 msgstr "I<smblks>"
2152
2153 #. type: Plain text
2154 #: build/C/man3/mallinfo.3:75
2155 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2156 msgstr ""
2157
2158 #. type: TP
2159 #: build/C/man3/mallinfo.3:75
2160 #, no-wrap
2161 msgid "I<hblks>"
2162 msgstr "I<hblks>"
2163
2164 #. type: Plain text
2165 #: build/C/man3/mallinfo.3:83
2166 msgid ""
2167 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2168 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2169 msgstr ""
2170
2171 #. type: TP
2172 #: build/C/man3/mallinfo.3:83
2173 #, no-wrap
2174 msgid "I<hblkhd>"
2175 msgstr "I<hblkhd>"
2176
2177 #. type: Plain text
2178 #: build/C/man3/mallinfo.3:87
2179 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2180 msgstr ""
2181
2182 #. type: TP
2183 #: build/C/man3/mallinfo.3:87
2184 #, no-wrap
2185 msgid "I<usmblks>"
2186 msgstr "I<usmblks>"
2187
2188 #. type: Plain text
2189 #: build/C/man3/mallinfo.3:92
2190 msgid ""
2191 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2192 "of space that was ever allocated.  This field is maintained only in "
2193 "nonthreading environments."
2194 msgstr ""
2195
2196 #. type: TP
2197 #: build/C/man3/mallinfo.3:92
2198 #, no-wrap
2199 msgid "I<fsmblks>"
2200 msgstr "I<fsmblks>"
2201
2202 #. type: Plain text
2203 #: build/C/man3/mallinfo.3:95
2204 msgid "The total number of bytes in fastbin free blocks."
2205 msgstr ""
2206
2207 #. type: TP
2208 #: build/C/man3/mallinfo.3:95
2209 #, no-wrap
2210 msgid "I<uordblks>"
2211 msgstr "I<uordblks>"
2212
2213 #. type: Plain text
2214 #: build/C/man3/mallinfo.3:98
2215 msgid "The total number of bytes used by in-use allocations."
2216 msgstr ""
2217
2218 #. type: TP
2219 #: build/C/man3/mallinfo.3:98
2220 #, no-wrap
2221 msgid "I<fordblks>"
2222 msgstr "I<fordblks>"
2223
2224 #. type: Plain text
2225 #: build/C/man3/mallinfo.3:101
2226 msgid "The total number of bytes in free blocks."
2227 msgstr ""
2228
2229 #. type: TP
2230 #: build/C/man3/mallinfo.3:101
2231 #, no-wrap
2232 msgid "I<keepcost>"
2233 msgstr "I<keepcost>"
2234
2235 #.  .SH VERSIONS
2236 #.  Available already in glibc 2.0, possibly earlier
2237 #. type: Plain text
2238 #: build/C/man3/mallinfo.3:110
2239 msgid ""
2240 "The total amount of releasable free space at the top of the heap.  This is "
2241 "the maximum number of bytes that could ideally (i.e., ignoring page "
2242 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2243 msgstr ""
2244
2245 #. type: Plain text
2246 #: build/C/man3/mallinfo.3:114
2247 msgid ""
2248 "This function is not specified by POSIX or the C standards.  A similar "
2249 "function exists on many System V derivatives, and was specified in the SVID."
2250 msgstr ""
2251
2252 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2253 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2254 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2255 #.  on libc-alpha@sourceware.org
2256 #. type: Plain text
2257 #: build/C/man3/mallinfo.3:126
2258 msgid ""
2259 "B<Information is returned for only the main memory allocation area.> "
2260 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2261 "B<malloc_info>(3)  for alternatives that include information about other "
2262 "arenas."
2263 msgstr ""
2264
2265 #. type: Plain text
2266 #: build/C/man3/mallinfo.3:134
2267 msgid ""
2268 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2269 "because some internal bookkeeping values may be of type I<long>, the "
2270 "reported values may wrap around zero and thus be inaccurate."
2271 msgstr ""
2272
2273 #. type: SH
2274 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2275 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2276 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:629
2277 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2278 #, no-wrap
2279 msgid "EXAMPLE"
2280 msgstr "例"
2281
2282 #. type: Plain text
2283 #: build/C/man3/mallinfo.3:140
2284 msgid ""
2285 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2286 "statistics before and after allocating and freeing some blocks of memory.  "
2287 "The statistics are displayed on standard output."
2288 msgstr ""
2289
2290 #. type: Plain text
2291 #: build/C/man3/mallinfo.3:144
2292 msgid ""
2293 "The first two command-line arguments specify the number and size of blocks "
2294 "to be allocated with B<malloc>(3)."
2295 msgstr ""
2296
2297 #. type: Plain text
2298 #: build/C/man3/mallinfo.3:158
2299 msgid ""
2300 "The remaining three arguments specify which of the allocated blocks should "
2301 "be freed with B<free>(3).  These three arguments are optional, and specify "
2302 "(in order): the step size to be used in the loop that frees blocks (the "
2303 "default is 1, meaning free all blocks in the range); the ordinal position of "
2304 "the first block to be freed (default 0, meaning the first allocated block); "
2305 "and a number one greater than the ordinal position of the last block to be "
2306 "freed (default is one greater than the maximum block number).  If these "
2307 "three arguments are omitted, then the defaults cause all allocated blocks to "
2308 "be freed."
2309 msgstr ""
2310
2311 #. type: Plain text
2312 #: build/C/man3/mallinfo.3:162
2313 msgid ""
2314 "In the following example run of the program, 1000 allocations of 100 bytes "
2315 "are performed, and then every second allocated block is freed:"
2316 msgstr ""
2317
2318 #. type: Plain text
2319 #: build/C/man3/mallinfo.3:177
2320 #, no-wrap
2321 msgid ""
2322 "$ B<./a.out 1000 100 2>\n"
2323 "============== Before allocating blocks ==============\n"
2324 "Total non-mmapped bytes (arena):       0\n"
2325 "# of free chunks (ordblks):            1\n"
2326 "# of free fastbin blocks (smblks):     0\n"
2327 "# of mapped regions (hblks):           0\n"
2328 "Bytes in mapped regions (hblkhd):      0\n"
2329 "Max. total allocated space (usmblks):  0\n"
2330 "Free bytes held in fastbins (fsmblks): 0\n"
2331 "Total allocated space (uordblks):      0\n"
2332 "Total free space (fordblks):           0\n"
2333 "Topmost releasable block (keepcost):   0\n"
2334 msgstr ""
2335 "$ B<./a.out 1000 100 2>\n"
2336 "============== Before allocating blocks ==============\n"
2337 "Total non-mmapped bytes (arena):       0\n"
2338 "# of free chunks (ordblks):            1\n"
2339 "# of free fastbin blocks (smblks):     0\n"
2340 "# of mapped regions (hblks):           0\n"
2341 "Bytes in mapped regions (hblkhd):      0\n"
2342 "Max. total allocated space (usmblks):  0\n"
2343 "Free bytes held in fastbins (fsmblks): 0\n"
2344 "Total allocated space (uordblks):      0\n"
2345 "Total free space (fordblks):           0\n"
2346 "Topmost releasable block (keepcost):   0\n"
2347
2348 #. type: Plain text
2349 #: build/C/man3/mallinfo.3:189
2350 #, no-wrap
2351 msgid ""
2352 "============== After allocating blocks ==============\n"
2353 "Total non-mmapped bytes (arena):       135168\n"
2354 "# of free chunks (ordblks):            1\n"
2355 "# of free fastbin blocks (smblks):     0\n"
2356 "# of mapped regions (hblks):           0\n"
2357 "Bytes in mapped regions (hblkhd):      0\n"
2358 "Max. total allocated space (usmblks):  0\n"
2359 "Free bytes held in fastbins (fsmblks): 0\n"
2360 "Total allocated space (uordblks):      104000\n"
2361 "Total free space (fordblks):           31168\n"
2362 "Topmost releasable block (keepcost):   31168\n"
2363 msgstr ""
2364 "============== After allocating blocks ==============\n"
2365 "Total non-mmapped bytes (arena):       135168\n"
2366 "# of free chunks (ordblks):            1\n"
2367 "# of free fastbin blocks (smblks):     0\n"
2368 "# of mapped regions (hblks):           0\n"
2369 "Bytes in mapped regions (hblkhd):      0\n"
2370 "Max. total allocated space (usmblks):  0\n"
2371 "Free bytes held in fastbins (fsmblks): 0\n"
2372 "Total allocated space (uordblks):      104000\n"
2373 "Total free space (fordblks):           31168\n"
2374 "Topmost releasable block (keepcost):   31168\n"
2375
2376 #. type: Plain text
2377 #: build/C/man3/mallinfo.3:201
2378 #, no-wrap
2379 msgid ""
2380 "============== After freeing blocks ==============\n"
2381 "Total non-mmapped bytes (arena):       135168\n"
2382 "# of free chunks (ordblks):            501\n"
2383 "# of free fastbin blocks (smblks):     0\n"
2384 "# of mapped regions (hblks):           0\n"
2385 "Bytes in mapped regions (hblkhd):      0\n"
2386 "Max. total allocated space (usmblks):  0\n"
2387 "Free bytes held in fastbins (fsmblks): 0\n"
2388 "Total allocated space (uordblks):      52000\n"
2389 "Total free space (fordblks):           83168\n"
2390 "Topmost releasable block (keepcost):   31168\n"
2391 msgstr ""
2392 "============== After freeing blocks ==============\n"
2393 "Total non-mmapped bytes (arena):       135168\n"
2394 "# of free chunks (ordblks):            501\n"
2395 "# of free fastbin blocks (smblks):     0\n"
2396 "# of mapped regions (hblks):           0\n"
2397 "Bytes in mapped regions (hblkhd):      0\n"
2398 "Max. total allocated space (usmblks):  0\n"
2399 "Free bytes held in fastbins (fsmblks): 0\n"
2400 "Total allocated space (uordblks):      52000\n"
2401 "Total free space (fordblks):           83168\n"
2402 "Topmost releasable block (keepcost):   31168\n"
2403
2404 #. type: SS
2405 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2406 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2407 #: build/C/man2/mmap.2:641 build/C/man2/mprotect.2:164
2408 #, no-wrap
2409 msgid "Program source"
2410 msgstr "プログラムのソース"
2411
2412 #. type: Plain text
2413 #: build/C/man3/mallinfo.3:208
2414 #, no-wrap
2415 msgid ""
2416 "#include E<lt>malloc.hE<gt>\n"
2417 "#include \"tlpi_hdr.h\"\n"
2418 msgstr ""
2419 "#include E<lt>malloc.hE<gt>\n"
2420 "#include \"tlpi_hdr.h\"\n"
2421
2422 #. type: Plain text
2423 #: build/C/man3/mallinfo.3:213
2424 #, no-wrap
2425 msgid ""
2426 "static void\n"
2427 "display_mallinfo(void)\n"
2428 "{\n"
2429 "    struct mallinfo mi;\n"
2430 msgstr ""
2431 "static void\n"
2432 "display_mallinfo(void)\n"
2433 "{\n"
2434 "    struct mallinfo mi;\n"
2435
2436 #. type: Plain text
2437 #: build/C/man3/mallinfo.3:215
2438 #, no-wrap
2439 msgid "    mi = mallinfo();\n"
2440 msgstr "    mi = mallinfo();\n"
2441
2442 #. type: Plain text
2443 #: build/C/man3/mallinfo.3:227
2444 #, no-wrap
2445 msgid ""
2446 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2447 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2448 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2449 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2450 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2451 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2452 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2453 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2454 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2455 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2456 "}\n"
2457 msgstr ""
2458 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2459 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2460 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2461 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2462 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2463 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2464 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2465 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2466 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2467 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2468 "}\n"
2469
2470 #. type: Plain text
2471 #: build/C/man3/mallinfo.3:235
2472 #, no-wrap
2473 msgid ""
2474 "int\n"
2475 "main(int argc, char *argv[])\n"
2476 "{\n"
2477 "#define MAX_ALLOCS 2000000\n"
2478 "    char *alloc[MAX_ALLOCS];\n"
2479 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2480 "    size_t blockSize;\n"
2481 msgstr ""
2482 "int\n"
2483 "main(int argc, char *argv[])\n"
2484 "{\n"
2485 "#define MAX_ALLOCS 2000000\n"
2486 "    char *alloc[MAX_ALLOCS];\n"
2487 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2488 "    size_t blockSize;\n"
2489
2490 #. type: Plain text
2491 #: build/C/man3/mallinfo.3:239
2492 #, no-wrap
2493 msgid ""
2494 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2495 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2496 "                \"[end-free]]]\\en\", argv[0]);\n"
2497 msgstr ""
2498 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2499 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2500 "                \"[end-free]]]\\en\", argv[0]);\n"
2501
2502 #. type: Plain text
2503 #: build/C/man3/mallinfo.3:245
2504 #, no-wrap
2505 msgid ""
2506 "    numBlocks = atoi(argv[1]);\n"
2507 "    blockSize = atoi(argv[2]);\n"
2508 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2509 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2510 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2511 msgstr ""
2512 "    numBlocks = atoi(argv[1]);\n"
2513 "    blockSize = atoi(argv[2]);\n"
2514 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2515 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2516 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2517
2518 #. type: Plain text
2519 #: build/C/man3/mallinfo.3:248
2520 #, no-wrap
2521 msgid ""
2522 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2523 "    display_mallinfo();\n"
2524 msgstr ""
2525 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2526 "    display_mallinfo();\n"
2527
2528 #. type: Plain text
2529 #: build/C/man3/mallinfo.3:252
2530 #, no-wrap
2531 msgid ""
2532 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2533 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2534 "            fatal(\"Too many allocations\");\n"
2535 msgstr ""
2536 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2537 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2538 "            fatal(\"Too many allocations\");\n"
2539
2540 #. type: Plain text
2541 #: build/C/man3/mallinfo.3:257
2542 #, no-wrap
2543 msgid ""
2544 "        alloc[j] = malloc(blockSize);\n"
2545 "        if (alloc[j] == NULL)\n"
2546 "            errExit(\"malloc\");\n"
2547 "    }\n"
2548 msgstr ""
2549 "        alloc[j] = malloc(blockSize);\n"
2550 "        if (alloc[j] == NULL)\n"
2551 "            errExit(\"malloc\");\n"
2552 "    }\n"
2553
2554 #. type: Plain text
2555 #: build/C/man3/mallinfo.3:260
2556 #, no-wrap
2557 msgid ""
2558 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2559 "    display_mallinfo();\n"
2560 msgstr ""
2561 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2562 "    display_mallinfo();\n"
2563
2564 #. type: Plain text
2565 #: build/C/man3/mallinfo.3:263
2566 #, no-wrap
2567 msgid ""
2568 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2569 "        free(alloc[j]);\n"
2570 msgstr ""
2571 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2572 "        free(alloc[j]);\n"
2573
2574 #. type: Plain text
2575 #: build/C/man3/mallinfo.3:266
2576 #, no-wrap
2577 msgid ""
2578 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2579 "    display_mallinfo();\n"
2580 msgstr ""
2581 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2582 "    display_mallinfo();\n"
2583
2584 #. type: Plain text
2585 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2586 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2587 #: build/C/man2/mmap.2:710
2588 #, no-wrap
2589 msgid ""
2590 "    exit(EXIT_SUCCESS);\n"
2591 "}\n"
2592 msgstr ""
2593 "    exit(EXIT_SUCCESS);\n"
2594 "}\n"
2595
2596 #. type: Plain text
2597 #: build/C/man3/mallinfo.3:279
2598 msgid ""
2599 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2600 "B<malloc_trim>(3), B<mallopt>(3)"
2601 msgstr ""
2602 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2603 "B<malloc_trim>(3), B<mallopt>(3)"
2604
2605 #. type: TH
2606 #: build/C/man3/malloc_get_state.3:25
2607 #, no-wrap
2608 msgid "MALLOC_GET_STATE"
2609 msgstr "MALLOC_GET_STATE"
2610
2611 #. type: TH
2612 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2613 #, no-wrap
2614 msgid "2014-06-13"
2615 msgstr "2014-06-13"
2616
2617 #. type: Plain text
2618 #: build/C/man3/malloc_get_state.3:28
2619 msgid ""
2620 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2621 "implementation"
2622 msgstr ""
2623
2624 #. type: Plain text
2625 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2626 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2627 #, no-wrap
2628 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2629 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2630
2631 #. type: Plain text
2632 #: build/C/man3/malloc_get_state.3:33
2633 #, no-wrap
2634 msgid "B<void* malloc_get_state(void);>\n"
2635 msgstr "B<void* malloc_get_state(void);>\n"
2636
2637 #. type: Plain text
2638 #: build/C/man3/malloc_get_state.3:35
2639 #, no-wrap
2640 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2641 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2642
2643 #. type: Plain text
2644 #: build/C/man3/malloc_get_state.3:53
2645 msgid ""
2646 "The B<malloc_get_state>()  function records the current state of all "
2647 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2648 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2649 "is recorded in a system-dependent opaque data structure dynamically "
2650 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2651 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2652 "this memory.)"
2653 msgstr ""
2654
2655 #. type: Plain text
2656 #: build/C/man3/malloc_get_state.3:61
2657 msgid ""
2658 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2659 "internal bookkeeping variables to the values recorded in the opaque data "
2660 "structure pointed to by I<state>."
2661 msgstr ""
2662
2663 #. type: Plain text
2664 #: build/C/man3/malloc_get_state.3:68
2665 msgid ""
2666 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2667 "opaque data structure.  On error (for example, memory could not be allocated "
2668 "for the data structure), B<malloc_get_state>()  returns NULL."
2669 msgstr ""
2670
2671 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2672 #.  /* Must fail if the major version is too high. */
2673 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2674 #. type: Plain text
2675 #: build/C/man3/malloc_get_state.3:86
2676 msgid ""
2677 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2678 "that I<state> does not point to a correctly formed data structure, "
2679 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2680 "version of the data structure referred to by I<state> is a more recent "
2681 "version than this implementation knows about, B<malloc_set_state>()  returns "
2682 "-2."
2683 msgstr ""
2684
2685 #. type: Plain text
2686 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2687 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2688 msgid "These functions are GNU extensions."
2689 msgstr "これらの関数は GNU による拡張である。"
2690
2691 #. type: Plain text
2692 #: build/C/man3/malloc_get_state.3:94
2693 msgid ""
2694 "These functions are useful when using this B<malloc>(3)  implementation as "
2695 "part of a shared library, and the heap contents are saved/restored via some "
2696 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2697 "\" function."
2698 msgstr ""
2699
2700 #.  i.e., calls __malloc_check_init()
2701 #.  i.e., malloc checking is not already in use
2702 #.  and the caller requested malloc checking
2703 #. type: Plain text
2704 #: build/C/man3/malloc_get_state.3:111
2705 msgid ""
2706 "Hook function pointers are never saved or restored by these functions, with "
2707 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2708 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2709 "checking hooks if possible; if malloc checking was not in use in the "
2710 "recorded state, but the caller has requested malloc checking, then the hooks "
2711 "are reset to 0."
2712 msgstr ""
2713
2714 #. type: Plain text
2715 #: build/C/man3/malloc_get_state.3:114
2716 msgid "B<malloc>(3), B<mallopt>(3)"
2717 msgstr "B<malloc>(3), B<mallopt>(3)"
2718
2719 #. type: TH
2720 #: build/C/man3/malloc_hook.3:10
2721 #, no-wrap
2722 msgid "MALLOC_HOOK"
2723 msgstr "MALLOC_HOOK"
2724
2725 #. type: TH
2726 #: build/C/man3/malloc_hook.3:10
2727 #, no-wrap
2728 msgid "2010-10-13"
2729 msgstr "2010-10-13"
2730
2731 #. type: Plain text
2732 #: build/C/man3/malloc_hook.3:15
2733 msgid ""
2734 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2735 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2736 msgstr ""
2737 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2738 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2739
2740 #. type: Plain text
2741 #: build/C/man3/malloc_hook.3:20
2742 #, no-wrap
2743 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2744 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2745
2746 #. type: Plain text
2747 #: build/C/man3/malloc_hook.3:23
2748 #, no-wrap
2749 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2750 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2751
2752 #. type: Plain text
2753 #: build/C/man3/malloc_hook.3:26
2754 #, no-wrap
2755 msgid ""
2756 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2757 "B<                         const void *>I<caller>B<);>\n"
2758 msgstr ""
2759 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2760 "B<                         const void *>I<caller>B<);>\n"
2761
2762 #. type: Plain text
2763 #: build/C/man3/malloc_hook.3:28
2764 #, no-wrap
2765 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2766 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2767
2768 #. type: Plain text
2769 #: build/C/man3/malloc_hook.3:30
2770 #, no-wrap
2771 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2772 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2773
2774 #. type: Plain text
2775 #: build/C/man3/malloc_hook.3:32
2776 #, no-wrap
2777 msgid "B<void (*__after_morecore_hook)(void);>\n"
2778 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2779
2780 #. type: Plain text
2781 #: build/C/man3/malloc_hook.3:43
2782 msgid ""
2783 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2784 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2785 "You can use these hooks to help you debug programs that use dynamic memory "
2786 "allocation, for example."
2787 msgstr ""
2788 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2789 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2790 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2791 "ができる。"
2792
2793 #. type: Plain text
2794 #: build/C/man3/malloc_hook.3:50
2795 msgid ""
2796 "The variable B<__malloc_initialize_hook> points at a function that is called "
2797 "once when the malloc implementation is initialized.  This is a weak "
2798 "variable, so it can be overridden in the application with a definition like "
2799 "the following:"
2800 msgstr ""
2801 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2802 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2803 "ケーション内で 以下のような定義で上書きできる:"
2804
2805 #. type: Plain text
2806 #: build/C/man3/malloc_hook.3:53
2807 #, no-wrap
2808 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2809 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2810
2811 #. type: Plain text
2812 #: build/C/man3/malloc_hook.3:58
2813 msgid ""
2814 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2815 msgstr ""
2816 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2817
2818 #. type: Plain text
2819 #: build/C/man3/malloc_hook.3:74
2820 msgid ""
2821 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2822 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2823 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2824 "except that they have a final argument I<caller> that gives the address of "
2825 "the caller of B<malloc>(3), etc."
2826 msgstr ""
2827 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2828 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2829 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2830 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2831 "出し元 (caller) のアドレスが格納される。"
2832
2833 #. type: Plain text
2834 #: build/C/man3/malloc_hook.3:80
2835 msgid ""
2836 "The variable B<__after_morecore_hook> points at a function that is called "
2837 "each time after B<sbrk>(2)  was asked for more memory."
2838 msgstr ""
2839 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2840 "後で毎回呼び出される関数へのポインタである。"
2841
2842 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2843 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2844 #. type: Plain text
2845 #: build/C/man3/malloc_hook.3:89
2846 msgid ""
2847 "The use of these hook functions is not safe in multithreaded programs, and "
2848 "they are now deprecated.  Programmers should instead preempt calls to the "
2849 "relevant functions by defining and exporting functions such as \"malloc\" "
2850 "and \"free\"."
2851 msgstr ""
2852 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2853 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2854 "公開して、 関連する関数を呼び出すようにすべきである。"
2855
2856 #. type: Plain text
2857 #: build/C/man3/malloc_hook.3:91
2858 msgid "Here is a short example of how to use these variables."
2859 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2860
2861 #. type: Plain text
2862 #: build/C/man3/malloc_hook.3:95
2863 #, no-wrap
2864 msgid ""
2865 "#include E<lt>stdio.hE<gt>\n"
2866 "#include E<lt>malloc.hE<gt>\n"
2867 msgstr ""
2868 "#include E<lt>stdio.hE<gt>\n"
2869 "#include E<lt>malloc.hE<gt>\n"
2870
2871 #. type: Plain text
2872 #: build/C/man3/malloc_hook.3:99
2873 #, no-wrap
2874 msgid ""
2875 "/* Prototypes for our hooks.  */\n"
2876 "static void my_init_hook(void);\n"
2877 "static void *my_malloc_hook(size_t, const void *);\n"
2878 msgstr ""
2879 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2880 "static void my_init_hook(void);\n"
2881 "static void *my_malloc_hook(size_t, const void *);\n"
2882
2883 #. type: Plain text
2884 #: build/C/man3/malloc_hook.3:102
2885 #, no-wrap
2886 msgid ""
2887 "/* Variables to save original hooks. */\n"
2888 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2889 msgstr ""
2890 "/* 元々のフックを保存するための変数 */\n"
2891 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2892
2893 #. type: Plain text
2894 #: build/C/man3/malloc_hook.3:105
2895 #, no-wrap
2896 msgid ""
2897 "/* Override initializing hook from the C library. */\n"
2898 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2899 msgstr ""
2900 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2901 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2902
2903 #. type: Plain text
2904 #: build/C/man3/malloc_hook.3:112
2905 #, no-wrap
2906 msgid ""
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 msgstr ""
2914 "static void\n"
2915 "my_init_hook(void)\n"
2916 "{\n"
2917 "    old_malloc_hook = __malloc_hook;\n"
2918 "    __malloc_hook = my_malloc_hook;\n"
2919 "}\n"
2920
2921 #. type: Plain text
2922 #: build/C/man3/malloc_hook.3:117
2923 #, no-wrap
2924 msgid ""
2925 "static void *\n"
2926 "my_malloc_hook(size_t size, const void *caller)\n"
2927 "{\n"
2928 "    void *result;\n"
2929 msgstr ""
2930 "static void *\n"
2931 "my_malloc_hook(size_t size, const void *caller)\n"
2932 "{\n"
2933 "    void *result;\n"
2934
2935 #. type: Plain text
2936 #: build/C/man3/malloc_hook.3:120
2937 #, no-wrap
2938 msgid ""
2939 "    /* Restore all old hooks */\n"
2940 "    __malloc_hook = old_malloc_hook;\n"
2941 msgstr ""
2942 "    /* 元々のフックを全て戻す */\n"
2943 "    __malloc_hook = old_malloc_hook;\n"
2944
2945 #. type: Plain text
2946 #: build/C/man3/malloc_hook.3:123
2947 #, no-wrap
2948 msgid ""
2949 "    /* Call recursively */\n"
2950 "    result = malloc(size);\n"
2951 msgstr ""
2952 "    /* malloc の再帰的呼び出し */\n"
2953 "    result = malloc(size);\n"
2954
2955 #. type: Plain text
2956 #: build/C/man3/malloc_hook.3:126
2957 #, no-wrap
2958 msgid ""
2959 "    /* Save underlying hooks */\n"
2960 "    old_malloc_hook = __malloc_hook;\n"
2961 msgstr ""
2962 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2963 "    old_malloc_hook = __malloc_hook;\n"
2964
2965 #. type: Plain text
2966 #: build/C/man3/malloc_hook.3:130
2967 #, no-wrap
2968 msgid ""
2969 "    /* printf() might call malloc(), so protect it too. */\n"
2970 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2971 "            (unsigned int) size, caller, result);\n"
2972 msgstr ""
2973 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2974 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2975 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2976 "            (unsigned int) size, caller, result);\n"
2977
2978 #. type: Plain text
2979 #: build/C/man3/malloc_hook.3:133
2980 #, no-wrap
2981 msgid ""
2982 "    /* Restore our own hooks */\n"
2983 "    __malloc_hook = my_malloc_hook;\n"
2984 msgstr ""
2985 "    /* ユーザが使おうとするフックを再設定する */\n"
2986 "    __malloc_hook = my_malloc_hook;\n"
2987
2988 #. type: Plain text
2989 #: build/C/man3/malloc_hook.3:136
2990 #, no-wrap
2991 msgid ""
2992 "    return result;\n"
2993 "}\n"
2994 msgstr ""
2995 "    return result;\n"
2996 "}\n"
2997
2998 #. type: Plain text
2999 #: build/C/man3/malloc_hook.3:142
3000 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3001 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
3002
3003 #. type: TH
3004 #: build/C/man3/malloc_info.3:25
3005 #, no-wrap
3006 msgid "MALLOC_INFO"
3007 msgstr "MALLOC_INFO"
3008
3009 #. type: TH
3010 #: build/C/man3/malloc_info.3:25
3011 #, no-wrap
3012 msgid "2013-04-19"
3013 msgstr "2013-04-19"
3014
3015 #. type: Plain text
3016 #: build/C/man3/malloc_info.3:28
3017 msgid "malloc_info - export malloc state to a stream"
3018 msgstr "malloc_info - malloc の状態をストリームに出力する"
3019
3020 #. type: Plain text
3021 #: build/C/man3/malloc_info.3:33
3022 #, no-wrap
3023 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3024 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3025
3026 #. type: Plain text
3027 #: build/C/man3/malloc_info.3:44
3028 msgid ""
3029 "The B<malloc_info>()  function exports an XML string that describes the "
3030 "current state of the memory-allocation implementation in the caller.  The "
3031 "string is printed on the file stream I<fp>.  The exported string includes "
3032 "information about all arenas (see B<malloc>(3))."
3033 msgstr ""
3034 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
3035 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
3036 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
3037
3038 #. type: Plain text
3039 #: build/C/man3/malloc_info.3:48
3040 msgid "As currently implemented, I<options> must be zero."
3041 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3042
3043 #. type: Plain text
3044 #: build/C/man3/malloc_info.3:55
3045 msgid ""
3046 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3047 "I<errno> set to indicate the cause."
3048 msgstr ""
3049 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3050 "I<errno> にエラーの原因を示す値を設定する。"
3051
3052 #. type: Plain text
3053 #: build/C/man3/malloc_info.3:60
3054 msgid "I<options> was nonzero."
3055 msgstr "I<options> が 0 でなかった。"
3056
3057 #. type: Plain text
3058 #: build/C/man3/malloc_info.3:63
3059 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3060 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3061
3062 #. type: Plain text
3063 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3064 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3065 msgid "This function is a GNU extension."
3066 msgstr "この関数は GNU による拡張である。"
3067
3068 #. type: Plain text
3069 #: build/C/man3/malloc_info.3:71
3070 msgid ""
3071 "The memory-allocation information is provided as an XML string (rather than "
3072 "a C structure)  because the information may change over time (according to "
3073 "changes in the underlying implementation).  The output XML string includes a "
3074 "version field."
3075 msgstr ""
3076 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3077 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3078 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3079
3080 #. type: Plain text
3081 #: build/C/man3/malloc_info.3:77
3082 msgid ""
3083 "The B<open_memstream>(3)  function can be used to send the output of "
3084 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3085 msgstr ""
3086 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3087 "なくメモリ内のバッファに直接送ることができる。"
3088
3089 #. type: Plain text
3090 #: build/C/man3/malloc_info.3:84
3091 msgid ""
3092 "The B<malloc_info>()  function is designed to address deficiencies in "
3093 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3094 msgstr ""
3095 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3096 "るために設定された。"
3097
3098 #. type: Plain text
3099 #: build/C/man3/malloc_info.3:95
3100 msgid ""
3101 "The program below takes up to four command-line arguments, of which the "
3102 "first three are mandatory.  The first argument specifies the number of "
3103 "threads that the program should create.  All of the threads, including the "
3104 "main thread, allocate the number of blocks of memory specified by the second "
3105 "argument.  The third argument controls the size of the blocks to be "
3106 "allocated.  The main thread creates blocks of this size, the second thread "
3107 "created by the program allocates blocks of twice this size, the third thread "
3108 "allocates blocks of three times this size, and so on."
3109 msgstr ""
3110 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3111 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3112 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
3113 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
3114 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
3115 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
3116 "のブロックを割り当て、 以下同様である。"
3117
3118 #. type: Plain text
3119 #: build/C/man3/malloc_info.3:102
3120 msgid ""
3121 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3122 "state.  The first call takes place before any threads are created or memory "
3123 "allocated.  The second call is performed after all threads have allocated "
3124 "memory."
3125 msgstr ""
3126 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
3127 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
3128 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
3129
3130 #. type: Plain text
3131 #: build/C/man3/malloc_info.3:110
3132 msgid ""
3133 "In the following example, the command-line arguments specify the creation of "
3134 "one additional thread, and both the main thread and the additional thread "
3135 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3136 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3137 msgstr ""
3138 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3139 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
3140 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
3141 "て領域の状態が表示されている。"
3142
3143 #. type: Plain text
3144 #: build/C/man3/malloc_info.3:135
3145 #, no-wrap
3146 msgid ""
3147 "$ B<getconf GNU_LIBC_VERSION>\n"
3148 "glibc 2.13\n"
3149 "$ B<./a.out 1 10000 100>\n"
3150 "============ Before allocating blocks ============\n"
3151 "E<lt>malloc version=\"1\"E<gt>\n"
3152 "E<lt>heap nr=\"0\"E<gt>\n"
3153 "E<lt>sizesE<gt>\n"
3154 "E<lt>/sizesE<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>/heapE<gt>\n"
3162 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3163 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3164 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3165 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3166 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3167 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3168 "E<lt>/mallocE<gt>\n"
3169 msgstr ""
3170 "$ B<getconf GNU_LIBC_VERSION>\n"
3171 "glibc 2.13\n"
3172 "$ B<./a.out 1 10000 100>\n"
3173 "============ Before allocating blocks ============\n"
3174 "E<lt>malloc version=\"1\"E<gt>\n"
3175 "E<lt>heap nr=\"0\"E<gt>\n"
3176 "E<lt>sizesE<gt>\n"
3177 "E<lt>/sizesE<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>/heapE<gt>\n"
3185 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3186 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3187 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3188 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3189 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3190 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3191 "E<lt>/mallocE<gt>\n"
3192
3193 #. type: Plain text
3194 #: build/C/man3/malloc_info.3:165
3195 #, no-wrap
3196 msgid ""
3197 "============ After allocating blocks ============\n"
3198 "E<lt>malloc version=\"1\"E<gt>\n"
3199 "E<lt>heap nr=\"0\"E<gt>\n"
3200 "E<lt>sizesE<gt>\n"
3201 "E<lt>/sizesE<gt>\n"
3202 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3203 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3204 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3205 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3206 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3207 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3208 "E<lt>/heapE<gt>\n"
3209 "E<lt>heap nr=\"1\"E<gt>\n"
3210 "E<lt>sizesE<gt>\n"
3211 "E<lt>/sizesE<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=\"1032192\"/E<gt>\n"
3215 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3216 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3217 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3218 "E<lt>/heapE<gt>\n"
3219 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3220 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3221 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3222 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3223 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3224 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3225 "E<lt>/mallocE<gt>\n"
3226 msgstr ""
3227 "============ After allocating blocks ============\n"
3228 "E<lt>malloc version=\"1\"E<gt>\n"
3229 "E<lt>heap nr=\"0\"E<gt>\n"
3230 "E<lt>sizesE<gt>\n"
3231 "E<lt>/sizesE<gt>\n"
3232 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3233 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3234 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3235 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3236 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3237 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3238 "E<lt>/heapE<gt>\n"
3239 "E<lt>heap nr=\"1\"E<gt>\n"
3240 "E<lt>sizesE<gt>\n"
3241 "E<lt>/sizesE<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=\"1032192\"/E<gt>\n"
3245 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3246 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3247 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3248 "E<lt>/heapE<gt>\n"
3249 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3250 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3251 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3252 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3253 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3254 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3255 "E<lt>/mallocE<gt>\n"
3256
3257 #. type: Plain text
3258 #: build/C/man3/malloc_info.3:175
3259 #, no-wrap
3260 msgid ""
3261 "#include E<lt>unistd.hE<gt>\n"
3262 "#include E<lt>stdlib.hE<gt>\n"
3263 "#include E<lt>pthread.hE<gt>\n"
3264 "#include E<lt>malloc.hE<gt>\n"
3265 "#include E<lt>errno.hE<gt>\n"
3266 msgstr ""
3267 "#include E<lt>unistd.hE<gt>\n"
3268 "#include E<lt>stdlib.hE<gt>\n"
3269 "#include E<lt>pthread.hE<gt>\n"
3270 "#include E<lt>malloc.hE<gt>\n"
3271 "#include E<lt>errno.hE<gt>\n"
3272
3273 #. type: Plain text
3274 #: build/C/man3/malloc_info.3:178
3275 #, no-wrap
3276 msgid ""
3277 "static size_t blockSize;\n"
3278 "static int numThreads, numBlocks;\n"
3279 msgstr ""
3280 "static size_t blockSize;\n"
3281 "static int numThreads, numBlocks;\n"
3282
3283 #. type: Plain text
3284 #: build/C/man3/malloc_info.3:181
3285 #, no-wrap
3286 msgid ""
3287 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3288 "                        } while (0)\n"
3289 msgstr ""
3290 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3291 "                        } while (0)\n"
3292
3293 #. type: Plain text
3294 #: build/C/man3/malloc_info.3:187
3295 #, no-wrap
3296 msgid ""
3297 "static void *\n"
3298 "thread_func(void *arg)\n"
3299 "{\n"
3300 "    int j;\n"
3301 "    int tn = (int) arg;\n"
3302 msgstr ""
3303 "static void *\n"
3304 "thread_func(void *arg)\n"
3305 "{\n"
3306 "    int j;\n"
3307 "    int tn = (int) arg;\n"
3308
3309 #. type: Plain text
3310 #: build/C/man3/malloc_info.3:190
3311 #, no-wrap
3312 msgid ""
3313 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3314 "       the main thread) allocates a different amount of memory */\n"
3315 msgstr ""
3316 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3317 "       the main thread) allocates a different amount of memory */\n"
3318
3319 #. type: Plain text
3320 #: build/C/man3/malloc_info.3:194
3321 #, no-wrap
3322 msgid ""
3323 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3324 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3325 "            errExit(\"malloc-thread\");\n"
3326 msgstr ""
3327 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3328 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3329 "            errExit(\"malloc-thread\");\n"
3330
3331 #. type: Plain text
3332 #: build/C/man3/malloc_info.3:198
3333 #, no-wrap
3334 msgid ""
3335 "    sleep(100);         /* Sleep until main thread terminates */\n"
3336 "    return NULL;\n"
3337 "}\n"
3338 msgstr ""
3339 "    sleep(100);         /* Sleep until main thread terminates */\n"
3340 "    return NULL;\n"
3341 "}\n"
3342
3343 #. type: Plain text
3344 #: build/C/man3/malloc_info.3:204
3345 #, no-wrap
3346 msgid ""
3347 "int\n"
3348 "main(int argc, char *argv[])\n"
3349 "{\n"
3350 "    int j, tn, sleepTime;\n"
3351 "    pthread_t *thr;\n"
3352 msgstr ""
3353 "int\n"
3354 "main(int argc, char *argv[])\n"
3355 "{\n"
3356 "    int j, tn, sleepTime;\n"
3357 "    pthread_t *thr;\n"
3358
3359 #. type: Plain text
3360 #: build/C/man3/malloc_info.3:211
3361 #, no-wrap
3362 msgid ""
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 msgstr ""
3370 "    if (argc E<lt> 4) {\n"
3371 "        fprintf(stderr,\n"
3372 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3373 "                argv[0]);\n"
3374 "        exit(EXIT_FAILURE);\n"
3375 "    }\n"
3376
3377 #. type: Plain text
3378 #: build/C/man3/malloc_info.3:216
3379 #, no-wrap
3380 msgid ""
3381 "    numThreads = atoi(argv[1]);\n"
3382 "    numBlocks = atoi(argv[2]);\n"
3383 "    blockSize = atoi(argv[3]);\n"
3384 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3385 msgstr ""
3386 "    numThreads = atoi(argv[1]);\n"
3387 "    numBlocks = atoi(argv[2]);\n"
3388 "    blockSize = atoi(argv[3]);\n"
3389 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3390
3391 #. type: Plain text
3392 #: build/C/man3/malloc_info.3:220
3393 #, no-wrap
3394 msgid ""
3395 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3396 "    if (thr == NULL)\n"
3397 "        errExit(\"calloc\");\n"
3398 msgstr ""
3399 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3400 "    if (thr == NULL)\n"
3401 "        errExit(\"calloc\");\n"
3402
3403 #. type: Plain text
3404 #: build/C/man3/malloc_info.3:223
3405 #, no-wrap
3406 msgid ""
3407 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3408 "    malloc_info(0, stdout);\n"
3409 msgstr ""
3410 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3411 "    malloc_info(0, stdout);\n"
3412
3413 #. type: Plain text
3414 #: build/C/man3/malloc_info.3:225
3415 #, no-wrap
3416 msgid "    /* Create threads that allocate different amounts of memory */\n"
3417 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3418
3419 #. type: Plain text
3420 #: build/C/man3/malloc_info.3:231
3421 #, no-wrap
3422 msgid ""
3423 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3424 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3425 "                               (void *) tn);\n"
3426 "        if (errno != 0)\n"
3427 "            errExit(\"pthread_create\");\n"
3428 msgstr ""
3429 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3430 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3431 "                               (void *) tn);\n"
3432 "        if (errno != 0)\n"
3433 "            errExit(\"pthread_create\");\n"
3434
3435 #. type: Plain text
3436 #: build/C/man3/malloc_info.3:236
3437 #, no-wrap
3438 msgid ""
3439 "        /* If we add a sleep interval after the start-up of each\n"
3440 "           thread, the threads likely won\\(aqt contend for malloc\n"
3441 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3442 "           allocated (see malloc(3)). */\n"
3443 msgstr ""
3444 "        /* If we add a sleep interval after the start-up of each\n"
3445 "           thread, the threads likely won\\(aqt contend for malloc\n"
3446 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3447 "           allocated (see malloc(3)). */\n"
3448
3449 #. type: Plain text
3450 #: build/C/man3/malloc_info.3:240
3451 #, no-wrap
3452 msgid ""
3453 "        if (sleepTime E<gt> 0)\n"
3454 "            sleep(sleepTime);\n"
3455 "    }\n"
3456 msgstr ""
3457 "        if (sleepTime E<gt> 0)\n"
3458 "            sleep(sleepTime);\n"
3459 "    }\n"
3460
3461 #. type: Plain text
3462 #: build/C/man3/malloc_info.3:242
3463 #, no-wrap
3464 msgid "    /* The main thread also allocates some memory */\n"
3465 msgstr "    /* The main thread also allocates some memory */\n"
3466
3467 #. type: Plain text
3468 #: build/C/man3/malloc_info.3:246
3469 #, no-wrap
3470 msgid ""
3471 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3472 "        if (malloc(blockSize) == NULL)\n"
3473 "            errExit(\"malloc\");\n"
3474 msgstr ""
3475 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3476 "        if (malloc(blockSize) == NULL)\n"
3477 "            errExit(\"malloc\");\n"
3478
3479 #. type: Plain text
3480 #: build/C/man3/malloc_info.3:249
3481 #, no-wrap
3482 msgid ""
3483 "    sleep(2);           /* Give all threads a chance to\n"
3484 "                           complete allocations */\n"
3485 msgstr ""
3486 "    sleep(2);           /* Give all threads a chance to\n"
3487 "                           complete allocations */\n"
3488
3489 #. type: Plain text
3490 #: build/C/man3/malloc_info.3:252
3491 #, no-wrap
3492 msgid ""
3493 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3494 "    malloc_info(0, stdout);\n"
3495 msgstr ""
3496 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3497 "    malloc_info(0, stdout);\n"
3498
3499 #. type: Plain text
3500 #: build/C/man3/malloc_info.3:262
3501 msgid ""
3502 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3503 "B<open_memstream>(3)"
3504 msgstr ""
3505 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3506 "B<open_memstream>(3)"
3507
3508 #. type: TH
3509 #: build/C/man3/malloc_stats.3:26
3510 #, no-wrap
3511 msgid "MALLOC_STATS"
3512 msgstr "MALLOC_STATS"
3513
3514 #. type: Plain text
3515 #: build/C/man3/malloc_stats.3:29
3516 msgid "malloc_stats - print memory allocation statistics"
3517 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3518
3519 #. type: Plain text
3520 #: build/C/man3/malloc_stats.3:33
3521 msgid "B<void malloc_stats(void);>"
3522 msgstr "B<void malloc_stats(void);>"
3523
3524 #.  .SH VERSIONS
3525 #.  Available already in glibc 2.0, possibly earlier
3526 #. type: Plain text
3527 #: build/C/man3/malloc_stats.3:55
3528 msgid ""
3529 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3530 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3531 "(allocation area), this function prints the total amount of memory allocated "
3532 "and the total number of bytes consumed by in-use allocations.  (These two "
3533 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3534 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3535 "statistics for all arenas, and the maximum number of blocks and bytes that "
3536 "were ever simultaneously allocated using B<mmap>(2)."
3537 msgstr ""
3538 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3539 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3540 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3541 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3542 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3543 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3544 "ロック数とバイト数の最大値を表示する。"
3545
3546 #. type: Plain text
3547 #: build/C/man3/malloc_stats.3:61
3548 msgid ""
3549 "More detailed information about memory allocations in the main arena can be "
3550 "obtained using B<mallinfo>(3)."
3551 msgstr ""
3552 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3553 "報を取得できる。"
3554
3555 #. type: Plain text
3556 #: build/C/man3/malloc_stats.3:67
3557 msgid ""
3558 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3559 msgstr ""
3560 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3561
3562 #. type: TH
3563 #: build/C/man3/malloc_trim.3:26
3564 #, no-wrap
3565 msgid "MALLOC_TRIM"
3566 msgstr "MALLOC_TRIM"
3567
3568 #. type: TH
3569 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3570 #, no-wrap
3571 msgid "2014-05-28"
3572 msgstr "2014-05-28"
3573
3574 #. type: Plain text
3575 #: build/C/man3/malloc_trim.3:29
3576 msgid "malloc_trim - release free memory from the top of the heap"
3577 msgstr ""
3578
3579 #. type: Plain text
3580 #: build/C/man3/malloc_trim.3:33
3581 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3582 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3583
3584 #. type: Plain text
3585 #: build/C/man3/malloc_trim.3:40
3586 msgid ""
3587 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3588 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3589 msgstr ""
3590
3591 #. type: Plain text
3592 #: build/C/man3/malloc_trim.3:51
3593 msgid ""
3594 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3595 "the top of the heap.  If this argument is 0, only the minimum amount of "
3596 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3597 "nonzero argument can be used to maintain some trailing space at the top of "
3598 "the heap in order to allow future allocations to be made without having to "
3599 "extend the heap with B<sbrk>(2)."
3600 msgstr ""
3601
3602 #. type: Plain text
3603 #: build/C/man3/malloc_trim.3:56
3604 msgid ""
3605 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3606 "back to the system, or 0 if it was not possible to release any memory."
3607 msgstr ""
3608
3609 #.  .SH VERSIONS
3610 #.  Available already in glibc 2.0, possibly earlier
3611 #. type: Plain text
3612 #: build/C/man3/malloc_trim.3:60
3613 msgid "No errors are defined."
3614 msgstr ""
3615
3616 #. type: Plain text
3617 #: build/C/man3/malloc_trim.3:71
3618 msgid ""
3619 "This function is automatically called by B<free>(3)  in certain "
3620 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3621 "B<mallopt>(3)."
3622 msgstr ""
3623
3624 #. type: Plain text
3625 #: build/C/man3/malloc_trim.3:74
3626 msgid ""
3627 "This function cannot release free memory located at places other than the "
3628 "top of the heap."
3629 msgstr ""
3630
3631 #.  malloc/malloc.c::mTRIm():
3632 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3633 #. type: Plain text
3634 #: build/C/man3/malloc_trim.3:78
3635 msgid "This function releases only memory in the main arena."
3636 msgstr ""
3637
3638 #. type: Plain text
3639 #: build/C/man3/malloc_trim.3:82
3640 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3641 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3642
3643 #. type: TH
3644 #: build/C/man3/malloc_usable_size.3:25
3645 #, no-wrap
3646 msgid "MALLOC_USABLE_SIZE"
3647 msgstr "MALLOC_USABLE_SIZE"
3648
3649 #. type: Plain text
3650 #: build/C/man3/malloc_usable_size.3:28
3651 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3652 msgstr ""
3653 "malloc_usable_size - ヒープから確保したメモリブロックのサイズを取得する"
3654
3655 #. type: Plain text
3656 #: build/C/man3/malloc_usable_size.3:32
3657 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3658 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3659
3660 #. type: Plain text
3661 #: build/C/man3/malloc_usable_size.3:40
3662 msgid ""
3663 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3664 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3665 "B<malloc>(3)  or a related function."
3666 msgstr ""
3667 "B<malloc_usable_size>() 関数は、 I<ptr> が指すブロックで使用可能なバイト数を"
3668 "返す。 I<ptr> は、B<malloc>(3) や同様の関数で割り当てられたメモリブロックへの"
3669 "ポインターである。"
3670
3671 #. type: Plain text
3672 #: build/C/man3/malloc_usable_size.3:48
3673 msgid ""
3674 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3675 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3676 msgstr ""
3677 "B<malloc_usable_size>() は I<ptr> が指す割り当て済みメモリブロックで使用可能"
3678 "なバイト数を返す。 I<ptr> が NULL の場合、 0 が返される。"
3679
3680 #. type: Plain text
3681 #: build/C/man3/malloc_usable_size.3:53
3682 msgid "The B<malloc_usable_size>()  function is thread-safe."
3683 msgstr "B<malloc_usable_size>() 関数はスレッドセーフである。"
3684
3685 #. type: Plain text
3686 #: build/C/man3/malloc_usable_size.3:65
3687 msgid ""
3688 "The value returned by B<malloc_usable_size>()  may be greater than the "
3689 "requested size of the allocation because of alignment and minimum size "
3690 "constraints.  Although the excess bytes can be overwritten by the "
3691 "application without ill effects, this is not good programming practice: the "
3692 "number of excess bytes in an allocation depends on the underlying "
3693 "implementation."
3694 msgstr ""
3695 "B<malloc_usable_size>() が返す値は、 要求された割り当てサイズよりも大きい場合"
3696 "がある。 これは、メモリアラインメントと最小サイズの制約のためである。 この超"
3697 "過バイトをアプリケーションは悪影響なしで上書きすることができるが、 これを行う"
3698 "のはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超過"
3699 "バイトの量は、内部の実装に依存する。"
3700
3701 #. type: Plain text
3702 #: build/C/man3/malloc_usable_size.3:67
3703 msgid "The main use of this function is for debugging and introspection."
3704 msgstr "この関数の主な使用目的はデバッグと内部調査である。"
3705
3706 #. type: Plain text
3707 #: build/C/man3/malloc_usable_size.3:69
3708 msgid "B<malloc>(3)"
3709 msgstr "B<malloc>(3)"
3710
3711 #. type: TH
3712 #: build/C/man3/mallopt.3:26
3713 #, no-wrap
3714 msgid "MALLOPT"
3715 msgstr "MALLOPT"
3716
3717 #. type: Plain text
3718 #: build/C/man3/mallopt.3:29
3719 msgid "mallopt - set memory allocation parameters"
3720 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3721
3722 #. type: Plain text
3723 #: build/C/man3/mallopt.3:33
3724 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3725 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3726
3727 #. type: Plain text
3728 #: build/C/man3/mallopt.3:44
3729 msgid ""
3730 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3731 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3732 "specifies the parameter to be modified, and I<value> specifies the new value "
3733 "for that parameter."
3734 msgstr ""
3735 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3736 "制御するパラメータの調整を行う。\n"
3737 "I<param> 引き数で変更するパラメータを指定し、\n"
3738 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3739
3740 #. type: Plain text
3741 #: build/C/man3/mallopt.3:47
3742 msgid "The following values can be specified for I<param>:"
3743 msgstr "I<param> には以下の値を指定することができる。"
3744
3745 #. type: TP
3746 #: build/C/man3/mallopt.3:47
3747 #, no-wrap
3748 msgid "B<M_CHECK_ACTION>"
3749 msgstr "B<M_CHECK_ACTION>"
3750
3751 #. type: Plain text
3752 #: build/C/man3/mallopt.3:53
3753 msgid ""
3754 "Setting this parameter controls how glibc responds when various kinds of "
3755 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3756 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3757 "parameter determine the glibc behavior, as follows:"
3758 msgstr ""
3759
3760 #. type: TP
3761 #: build/C/man3/mallopt.3:54
3762 #, no-wrap
3763 msgid "Bit 0"
3764 msgstr "Bit 0"
3765
3766 #. type: Plain text
3767 #: build/C/man3/mallopt.3:64
3768 msgid ""
3769 "If this bit is set, then print a one-line message on I<stderr> that provides "
3770 "details about the error.  The message starts with the string \"***\\ glibc "
3771 "detected\\ ***\", followed by the program name, the name of the memory-"
3772 "allocation function in which the error was detected, a brief description of "
3773 "the error, and the memory address where the error was detected."
3774 msgstr ""
3775
3776 #. type: TP
3777 #: build/C/man3/mallopt.3:64
3778 #, no-wrap
3779 msgid "Bit 1"
3780 msgstr "Bit 1"
3781
3782 #. type: Plain text
3783 #: build/C/man3/mallopt.3:79
3784 msgid ""
3785 "If this bit is set, then, after printing any error message specified by bit "
3786 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3787 "since 2.4, if bit 0 is also set, then, between printing the error message "
3788 "and aborting, the program also prints a stack trace in the manner of "
3789 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3790 "proc/[pid]/maps> (see B<proc>(5))."
3791 msgstr ""
3792
3793 #. type: TP
3794 #: build/C/man3/mallopt.3:79
3795 #, no-wrap
3796 msgid "Bit 2 (since glibc 2.4)"
3797 msgstr "Bit 2 (glibc 2.4 以降)"
3798
3799 #. type: Plain text
3800 #: build/C/man3/mallopt.3:86
3801 msgid ""
3802 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3803 "the one-line message describing the error is simplified to contain just the "
3804 "name of the function where the error was detected and the brief description "
3805 "of the error."
3806 msgstr ""
3807
3808 #. type: Plain text
3809 #: build/C/man3/mallopt.3:91
3810 msgid "The remaining bits in I<value> are ignored."
3811 msgstr ""
3812
3813 #. type: Plain text
3814 #: build/C/man3/mallopt.3:95
3815 msgid ""
3816 "Combining the above details, the following numeric values are meaningful for "
3817 "B<M_CHECK_ACTION>:"
3818 msgstr ""
3819
3820 #. type: IP
3821 #: build/C/man3/mallopt.3:96
3822 #, no-wrap
3823 msgid "0"
3824 msgstr "0"
3825
3826 #. type: Plain text
3827 #: build/C/man3/mallopt.3:98
3828 msgid "Ignore error conditions; continue execution (with undefined results)."
3829 msgstr ""
3830
3831 #. type: IP
3832 #: build/C/man3/mallopt.3:98
3833 #, no-wrap
3834 msgid "1"
3835 msgstr "1"
3836
3837 #. type: Plain text
3838 #: build/C/man3/mallopt.3:100
3839 msgid "Print a detailed error message and continue execution."
3840 msgstr ""
3841
3842 #. type: IP
3843 #: build/C/man3/mallopt.3:100
3844 #, no-wrap
3845 msgid "2"
3846 msgstr "2"
3847
3848 #. type: Plain text
3849 #: build/C/man3/mallopt.3:102
3850 msgid "Abort the program."
3851 msgstr ""
3852
3853 #. type: IP
3854 #: build/C/man3/mallopt.3:102
3855 #, no-wrap
3856 msgid "3"
3857 msgstr "3"
3858
3859 #. type: Plain text
3860 #: build/C/man3/mallopt.3:105
3861 msgid ""
3862 "Print detailed error message, stack trace, and memory mappings, and abort "
3863 "the program."
3864 msgstr ""
3865
3866 #. type: IP
3867 #: build/C/man3/mallopt.3:105
3868 #, no-wrap
3869 msgid "5"
3870 msgstr "5"
3871
3872 #. type: Plain text
3873 #: build/C/man3/mallopt.3:107
3874 msgid "Print a simple error message and continue execution."
3875 msgstr ""
3876
3877 #. type: IP
3878 #: build/C/man3/mallopt.3:107
3879 #, no-wrap
3880 msgid "7"
3881 msgstr "7"
3882
3883 #. type: Plain text
3884 #: build/C/man3/mallopt.3:110
3885 msgid ""
3886 "Print simple error message, stack trace, and memory mappings, and abort the "
3887 "program."
3888 msgstr ""
3889
3890 #. type: Plain text
3891 #: build/C/man3/mallopt.3:116
3892 msgid ""
3893 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3894 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3895 msgstr ""
3896
3897 #. type: Plain text
3898 #: build/C/man3/mallopt.3:121
3899 msgid ""
3900 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3901 "crash may happen much later, and the true cause of the problem is then very "
3902 "hard to track down."
3903 msgstr ""
3904
3905 #. type: TP
3906 #: build/C/man3/mallopt.3:121
3907 #, no-wrap
3908 msgid "B<M_MMAP_MAX>"
3909 msgstr "B<M_MMAP_MAX>"
3910
3911 #.  The following text adapted from comments in the glibc source:
3912 #. type: Plain text
3913 #: build/C/man3/mallopt.3:131
3914 msgid ""
3915 "This parameter specifies the maximum number of allocation requests that may "
3916 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3917 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3918 "and using more than a few of them may degrade performance."
3919 msgstr ""
3920
3921 #. type: Plain text
3922 #: build/C/man3/mallopt.3:138
3923 msgid ""
3924 "The default value is 65,536, a value which has no special significance and "
3925 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3926 "use of B<mmap>(2)  for servicing large allocation requests."
3927 msgstr ""
3928
3929 #. type: TP
3930 #: build/C/man3/mallopt.3:138
3931 #, no-wrap
3932 msgid "B<M_MMAP_THRESHOLD>"
3933 msgstr "B<M_MMAP_THRESHOLD>"
3934
3935 #. type: Plain text
3936 #: build/C/man3/mallopt.3:147
3937 msgid ""
3938 "For allocations greater than or equal to the limit specified (in bytes) by "
3939 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3940 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3941 "break using B<sbrk>(2)."
3942 msgstr ""
3943
3944 #. type: Plain text
3945 #: build/C/man3/mallopt.3:167
3946 msgid ""
3947 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3948 "allocated memory blocks can always be independently released back to the "
3949 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3950 "the top end.)  On the other hand, there are some disadvantages to the use of "
3951 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3952 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3953 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3954 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3955 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3956 msgstr ""
3957
3958 #. type: Plain text
3959 #: build/C/man3/mallopt.3:174
3960 msgid ""
3961 "The lower limit for this parameter is 0.  The upper limit is "
3962 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3963 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3964 msgstr ""
3965
3966 #. type: Plain text
3967 #: build/C/man3/mallopt.3:192
3968 msgid ""
3969 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3970 "initial value of the threshold is 128*1024, but when blocks larger than the "
3971 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3972 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3973 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3974 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3975 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3976 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3977 "parameters is set."
3978 msgstr ""
3979
3980 #. type: TP
3981 #: build/C/man3/mallopt.3:192
3982 #, no-wrap
3983 msgid "B<M_MXFAST> (since glibc 2.3)"
3984 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3985
3986 #.  The following text adapted from comments in the glibc sources:
3987 #. type: Plain text
3988 #: build/C/man3/mallopt.3:212
3989 msgid ""
3990 "Set the upper limit for memory allocation requests that are satisfied using "
3991 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3992 "are storage areas that hold deallocated blocks of memory of the same size "
3993 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3994 "the same size can be handled very quickly by allocating from the fastbin, "
3995 "although memory fragmentation and the overall memory footprint of the "
3996 "program can increase.  The default value for this parameter is "
3997 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
3998 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
3999 "disables the use of fastbins."
4000 msgstr ""
4001
4002 #. type: TP
4003 #: build/C/man3/mallopt.3:212
4004 #, no-wrap
4005 msgid "B<M_PERTURB> (since glibc 2.4)"
4006 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4007
4008 #. type: Plain text
4009 #: build/C/man3/mallopt.3:227
4010 msgid ""
4011 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4012 "(other than allocations via B<calloc>(3))  are initialized to the complement "
4013 "of the value in the least significant byte of I<value>, and when allocated "
4014 "memory is released using B<free>(3), the freed bytes are set to the least "
4015 "significant byte of I<value>.  This can be useful for detecting errors where "
4016 "programs incorrectly rely on allocated memory being initialized to zero, or "
4017 "reuse values in memory that has already been freed."
4018 msgstr ""
4019
4020 #. type: TP
4021 #: build/C/man3/mallopt.3:227
4022 #, no-wrap
4023 msgid "B<M_TOP_PAD>"
4024 msgstr "B<M_TOP_PAD>"
4025
4026 #. type: Plain text
4027 #: build/C/man3/mallopt.3:234
4028 msgid ""
4029 "This parameter defines the amount of padding to employ when calling "
4030 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4031 "parameter is bytes.)  This parameter has an effect in the following "
4032 "circumstances:"
4033 msgstr ""
4034
4035 #. type: Plain text
4036 #: build/C/man3/mallopt.3:241
4037 msgid ""
4038 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4039 "the B<sbrk>(2)  request."
4040 msgstr ""
4041
4042 #. type: Plain text
4043 #: build/C/man3/mallopt.3:247
4044 msgid ""
4045 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4046 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4047 "top of the heap."
4048 msgstr ""
4049
4050 #. type: Plain text
4051 #: build/C/man3/mallopt.3:251
4052 msgid ""
4053 "In either case, the amount of padding is always rounded to a system page "
4054 "boundary."
4055 msgstr ""
4056
4057 #. type: Plain text
4058 #: build/C/man3/mallopt.3:258
4059 msgid ""
4060 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4061 "system calls (when the parameter is set low)  and wasting unused memory at "
4062 "the top of the heap (when the parameter is set high)."
4063 msgstr ""
4064
4065 #.  DEFAULT_TOP_PAD in glibc source
4066 #. type: Plain text
4067 #: build/C/man3/mallopt.3:261
4068 msgid "The default value for this parameter is 128*1024."
4069 msgstr ""
4070
4071 #. type: TP
4072 #: build/C/man3/mallopt.3:261
4073 #, no-wrap
4074 msgid "B<M_TRIM_THRESHOLD>"
4075 msgstr "B<M_TRIM_THRESHOLD>"
4076
4077 #. type: Plain text
4078 #: build/C/man3/mallopt.3:277
4079 msgid ""
4080 "When the amount of contiguous free memory at the top of the heap grows "
4081 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4082 "back to the system.  (This can be useful in programs that continue to "
4083 "execute for a long period after freeing a significant amount of memory.)  "
4084 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4085 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4086 msgstr ""
4087
4088 #. type: Plain text
4089 #: build/C/man3/mallopt.3:282
4090 msgid ""
4091 "The default value for this parameter is 128*1024.  Setting "
4092 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4093 msgstr ""
4094
4095 #
4096 #
4097 #
4098 #.  FIXME Do the arena parameters need to be documented?
4099 #.  .TP
4100 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4101 #.  .TP
4102 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4103 #.  Environment variables
4104 #.      MALLOC_ARENA_MAX_
4105 #.      MALLOC_ARENA_TEST_
4106 #.  http://udrepper.livejournal.com/20948.html describes some details
4107 #.      of the MALLOC_ARENA_* environment variables.
4108 #.  These macros aren't enabled in production releases until 2.15?
4109 #.  (see glibc malloc/Makefile)
4110 #. type: Plain text
4111 #: build/C/man3/mallopt.3:305
4112 msgid ""
4113 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4114 "of system calls (when the parameter is set low)  and wasting unused memory "
4115 "at the top of the heap (when the parameter is set high)."
4116 msgstr ""
4117
4118 #. type: SS
4119 #: build/C/man3/mallopt.3:305
4120 #, no-wrap
4121 msgid "Environment variables"
4122 msgstr "環境変数"
4123
4124 #. type: Plain text
4125 #: build/C/man3/mallopt.3:320
4126 msgid ""
4127 "A number of environment variables can be defined to modify some of the same "
4128 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4129 "advantage that the source code of the program need not be changed.  To be "
4130 "effective, these variables must be defined before the first call to a memory-"
4131 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4132 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4133 "these variables are ignored in set-user-ID and set-group-ID programs."
4134 msgstr ""
4135
4136 #. type: Plain text
4137 #: build/C/man3/mallopt.3:323
4138 msgid ""
4139 "The environment variables are as follows (note the trailing underscore at "
4140 "the end of the name of each variable):"
4141 msgstr ""
4142
4143 #. type: TP
4144 #: build/C/man3/mallopt.3:323
4145 #, no-wrap
4146 msgid "B<MALLOC_CHECK_>"
4147 msgstr "B<MALLOC_CHECK_>"
4148
4149 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4150 #.  when MALLOC_CHECK_ was set.
4151 #. type: Plain text
4152 #: build/C/man3/mallopt.3:340
4153 msgid ""
4154 "This environment variable controls the same parameter as B<mallopt>()  "
4155 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4156 "special implementation of the memory-allocation functions is used.  (This is "
4157 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4158 "performs additional error checking, but is slower than the standard set of "
4159 "memory-allocation functions.  (This implementation does not detect all "
4160 "possible errors; memory leaks can still occur.)"
4161 msgstr ""
4162
4163 #. type: Plain text
4164 #: build/C/man3/mallopt.3:345
4165 msgid ""
4166 "The value assigned to this environment variable should be a single digit, "
4167 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4168 "the initial digit are ignored."
4169 msgstr ""
4170
4171 #. type: Plain text
4172 #: build/C/man3/mallopt.3:354
4173 msgid ""
4174 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4175 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4176 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4177 "also has an effect for set-user-ID and set-group-ID programs."
4178 msgstr ""
4179
4180 #. type: TP
4181 #: build/C/man3/mallopt.3:354
4182 #, no-wrap
4183 msgid "B<MALLOC_MMAP_MAX_>"
4184 msgstr "B<MALLOC_MMAP_MAX_>"
4185
4186 #. type: Plain text
4187 #: build/C/man3/mallopt.3:359
4188 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4189 msgstr ""
4190
4191 #. type: TP
4192 #: build/C/man3/mallopt.3:359
4193 #, no-wrap
4194 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4195 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4196
4197 #. type: Plain text
4198 #: build/C/man3/mallopt.3:364
4199 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4200 msgstr ""
4201
4202 #. type: TP
4203 #: build/C/man3/mallopt.3:364
4204 #, no-wrap
4205 msgid "B<MALLOC_PERTURB_>"
4206 msgstr "B<MALLOC_PERTURB_>"
4207
4208 #. type: Plain text
4209 #: build/C/man3/mallopt.3:369
4210 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4211 msgstr ""
4212
4213 #. type: TP
4214 #: build/C/man3/mallopt.3:369
4215 #, no-wrap
4216 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4217 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4218
4219 #. type: Plain text
4220 #: build/C/man3/mallopt.3:374
4221 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4222 msgstr ""
4223
4224 #. type: TP
4225 #: build/C/man3/mallopt.3:374
4226 #, no-wrap
4227 msgid "B<MALLOC_TOP_PAD_>"
4228 msgstr "B<MALLOC_TOP_PAD_>"
4229
4230 #. type: Plain text
4231 #: build/C/man3/mallopt.3:379
4232 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4233 msgstr ""
4234
4235 #. type: Plain text
4236 #: build/C/man3/mallopt.3:384
4237 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4238 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4239
4240 #.  .SH VERSIONS
4241 #.  Available already in glibc 2.0, possibly earlier
4242 #. type: Plain text
4243 #: build/C/man3/mallopt.3:392
4244 msgid "On error, I<errno> is I<not> set."
4245 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4246
4247 #.  .SH NOTES
4248 #. type: Plain text
4249 #: build/C/man3/mallopt.3:406
4250 msgid ""
4251 "This function is not specified by POSIX or the C standards.  A similar "
4252 "function exists on many System V derivatives, but the range of values for "
4253 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4254 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4255 "implemented in glibc."
4256 msgstr ""
4257
4258 #. type: Plain text
4259 #: build/C/man3/mallopt.3:410
4260 msgid "Specifying an invalid value for I<param> does not generate an error."
4261 msgstr ""
4262
4263 #.  FIXME . This looks buggy:
4264 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4265 #.  malloc requests are rounded up:
4266 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4267 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4268 #. type: Plain text
4269 #: build/C/man3/mallopt.3:418
4270 msgid ""
4271 "A calculation error within the glibc implementation means that a call of the "
4272 "form:"
4273 msgstr ""
4274
4275 #. type: Plain text
4276 #: build/C/man3/mallopt.3:421
4277 #, no-wrap
4278 msgid "    mallopt(M_MXFAST, n)\n"
4279 msgstr "    mallopt(M_MXFAST, n)\n"
4280
4281 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4282 #. type: Plain text
4283 #: build/C/man3/mallopt.3:433
4284 msgid ""
4285 "does not result in fastbins being employed for all allocations of size up to "
4286 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4287 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4288 "integer."
4289 msgstr ""
4290
4291 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4292 #. type: Plain text
4293 #: build/C/man3/mallopt.3:454
4294 msgid ""
4295 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4296 "of allocated memory are initialized to the complement of the byte in "
4297 "I<value>, and when that memory is freed, the bytes of the region are "
4298 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4299 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4300 "precisely the block of memory being freed by the call I<free(p)>, the block "
4301 "starting at I<p+sizeof(size_t)> is initialized."
4302 msgstr ""
4303
4304 #. type: Plain text
4305 #: build/C/man3/mallopt.3:463
4306 msgid ""
4307 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4308 "is supplied with an (integer) command-line argument, then that argument is "
4309 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4310 "block of memory, and frees it twice (an error)."
4311 msgstr ""
4312
4313 #. type: Plain text
4314 #: build/C/man3/mallopt.3:467
4315 msgid ""
4316 "The following shell session shows what happens when we run this program "
4317 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4318 msgstr ""
4319
4320 #. type: Plain text
4321 #: build/C/man3/mallopt.3:487
4322 #, no-wrap
4323 msgid ""
4324 "$ B<./a.out>\n"
4325 "main(): returned from first free() call\n"
4326 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4327 "======= Backtrace: =========\n"
4328 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4329 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4330 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4331 "\\&./a.out[0x80485db]\n"
4332 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4333 "\\&./a.out[0x8048471]\n"
4334 "======= Memory map: ========\n"
4335 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4336 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4337 "[some lines omitted]\n"
4338 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4339 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4340 "Aborted (core dumped)\n"
4341 msgstr ""
4342 "$ B<./a.out>\n"
4343 "main(): returned from first free() call\n"
4344 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4345 "======= Backtrace: =========\n"
4346 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4347 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4348 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4349 "\\&./a.out[0x80485db]\n"
4350 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4351 "\\&./a.out[0x8048471]\n"
4352 "======= Memory map: ========\n"
4353 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4354 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4355 "[some lines omitted]\n"
4356 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4357 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4358 "Aborted (core dumped)\n"
4359
4360 #. type: Plain text
4361 #: build/C/man3/mallopt.3:492
4362 msgid ""
4363 "The following runs show the results when employing other values for "
4364 "B<M_CHECK_ACTION>:"
4365 msgstr ""
4366
4367 #. type: Plain text
4368 #: build/C/man3/mallopt.3:505
4369 #, no-wrap
4370 msgid ""
4371 "$ B<./a.out 1>             # Diagnose error and continue\n"
4372 "main(): returned from first free() call\n"
4373 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4374 "main(): returned from second free() call\n"
4375 "$ B<./a.out 2>             # Abort without error message\n"
4376 "main(): returned from first free() call\n"
4377 "Aborted (core dumped)\n"
4378 "$ B<./a.out 0>             # Ignore error and continue\n"
4379 "main(): returned from first free() call\n"
4380 "main(): returned from second free() call\n"
4381 msgstr ""
4382 "$ B<./a.out 1>             # Diagnose error and continue\n"
4383 "main(): returned from first free() call\n"
4384 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4385 "main(): returned from second free() call\n"
4386 "$ B<./a.out 2>             # Abort without error message\n"
4387 "main(): returned from first free() call\n"
4388 "Aborted (core dumped)\n"
4389 "$ B<./a.out 0>             # Ignore error and continue\n"
4390 "main(): returned from first free() call\n"
4391 "main(): returned from second free() call\n"
4392
4393 #. type: Plain text
4394 #: build/C/man3/mallopt.3:511
4395 msgid ""
4396 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4397 "environment variable:"
4398 msgstr ""
4399
4400 #. type: Plain text
4401 #: build/C/man3/mallopt.3:518
4402 #, no-wrap
4403 msgid ""
4404 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4405 "main(): returned from first free() call\n"
4406 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4407 "main(): returned from second free() call\n"
4408 msgstr ""
4409 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4410 "main(): returned from first free() call\n"
4411 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4412 "main(): returned from second free() call\n"
4413
4414 #. type: Plain text
4415 #: build/C/man3/mallopt.3:526
4416 #, no-wrap
4417 msgid ""
4418 "#include E<lt>malloc.hE<gt>\n"
4419 "#include E<lt>stdio.hE<gt>\n"
4420 "#include E<lt>stdlib.hE<gt>\n"
4421 msgstr ""
4422 "#include E<lt>malloc.hE<gt>\n"
4423 "#include E<lt>stdio.hE<gt>\n"
4424 "#include E<lt>stdlib.hE<gt>\n"
4425
4426 #. type: Plain text
4427 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4428 #, no-wrap
4429 msgid ""
4430 "int\n"
4431 "main(int argc, char *argv[])\n"
4432 "{\n"
4433 "    char *p;\n"
4434 msgstr ""
4435 "int\n"
4436 "main(int argc, char *argv[])\n"
4437 "{\n"
4438 "    char *p;\n"
4439
4440 #. type: Plain text
4441 #: build/C/man3/mallopt.3:538
4442 #, no-wrap
4443 msgid ""
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 msgstr ""
4451 "    if (argc E<gt> 1) {\n"
4452 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4453 "            fprintf(stderr, \"mallopt() failed\");\n"
4454 "            exit(EXIT_FAILURE);\n"
4455 "        }\n"
4456 "    }\n"
4457
4458 #. type: Plain text
4459 #: build/C/man3/mallopt.3:544
4460 #, no-wrap
4461 msgid ""
4462 "    p = malloc(1000);\n"
4463 "    if (p == NULL) {\n"
4464 "        fprintf(stderr, \"malloc() failed\");\n"
4465 "        exit(EXIT_FAILURE);\n"
4466 "    }\n"
4467 msgstr ""
4468 "    p = malloc(1000);\n"
4469 "    if (p == NULL) {\n"
4470 "        fprintf(stderr, \"malloc() failed\");\n"
4471 "        exit(EXIT_FAILURE);\n"
4472 "    }\n"
4473
4474 #. type: Plain text
4475 #: build/C/man3/mallopt.3:547
4476 #, no-wrap
4477 msgid ""
4478 "    free(p);\n"
4479 "    printf(\"main(): returned from first free() call\\en\");\n"
4480 msgstr ""
4481 "    free(p);\n"
4482 "    printf(\"main(): returned from first free() call\\en\");\n"
4483
4484 #. type: Plain text
4485 #: build/C/man3/mallopt.3:550
4486 #, no-wrap
4487 msgid ""
4488 "    free(p);\n"
4489 "    printf(\"main(): returned from second free() call\\en\");\n"
4490 msgstr ""
4491 "    free(p);\n"
4492 "    printf(\"main(): returned from second free() call\\en\");\n"
4493
4494 #. type: Plain text
4495 #: build/C/man3/mallopt.3:568
4496 msgid ""
4497 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4498 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4499 "B<mtrace>(3), B<posix_memalign>(3)"
4500 msgstr ""
4501 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4502 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4503 "B<mtrace>(3), B<posix_memalign>(3)"
4504
4505 #. type: TH
4506 #: build/C/man3/mcheck.3:25
4507 #, no-wrap
4508 msgid "MCHECK"
4509 msgstr "MCHECK"
4510
4511 #. type: TH
4512 #: build/C/man3/mcheck.3:25
4513 #, no-wrap
4514 msgid "2014-01-11"
4515 msgstr "2014-01-11"
4516
4517 #. type: Plain text
4518 #: build/C/man3/mcheck.3:28
4519 msgid ""
4520 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4521 msgstr ""
4522
4523 #. type: Plain text
4524 #: build/C/man3/mcheck.3:31
4525 #, no-wrap
4526 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4527 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4528
4529 #. type: Plain text
4530 #: build/C/man3/mcheck.3:33
4531 #, no-wrap
4532 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4533 msgstr ""
4534
4535 #. type: Plain text
4536 #: build/C/man3/mcheck.3:35
4537 #, no-wrap
4538 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4539 msgstr ""
4540
4541 #. type: Plain text
4542 #: build/C/man3/mcheck.3:37
4543 #, no-wrap
4544 msgid "B<void mcheck_check_all(void);>\n"
4545 msgstr "B<void mcheck_check_all(void);>\n"
4546
4547 #. type: Plain text
4548 #: build/C/man3/mcheck.3:39
4549 #, no-wrap
4550 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4551 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4552
4553 #. type: Plain text
4554 #: build/C/man3/mcheck.3:51
4555 msgid ""
4556 "The B<mcheck>()  function installs a set of debugging hooks for the "
4557 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4558 "certain consistency checks to be performed on the state of the heap.  The "
4559 "checks can detect application errors such as freeing a block of memory more "
4560 "than once or corrupting the bookkeeping data structures that immediately "
4561 "precede a block of allocated memory."
4562 msgstr ""
4563
4564 #. type: Plain text
4565 #: build/C/man3/mcheck.3:63
4566 msgid ""
4567 "To be effective, the B<mcheck>()  function must be called before the first "
4568 "call to B<malloc>(3)  or a related function.  In cases where this is "
4569 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4570 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4571 "to a memory-allocation function."
4572 msgstr ""
4573
4574 #. type: Plain text
4575 #: build/C/man3/mcheck.3:71
4576 msgid ""
4577 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4578 "checks on all allocated blocks whenever one of the memory-allocation "
4579 "functions is called.  This can be very slow!"
4580 msgstr ""
4581
4582 #. type: Plain text
4583 #: build/C/man3/mcheck.3:78
4584 msgid ""
4585 "The B<mcheck_check_all>()  function causes an immediate check on all "
4586 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4587 "beforehand."
4588 msgstr ""
4589
4590 #. type: Plain text
4591 #: build/C/man3/mcheck.3:91
4592 msgid ""
4593 "If the system detects an inconsistency in the heap, the caller-supplied "
4594 "function pointed to by I<abortfunc> is invoked with a single argument "
4595 "argument, I<mstatus>, that indicates what type of inconsistency was "
4596 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4597 "message on I<stderr> and calls B<abort>(3)."
4598 msgstr ""
4599
4600 #. type: Plain text
4601 #: build/C/man3/mcheck.3:103
4602 msgid ""
4603 "The B<mprobe>()  function performs a consistency check on the block of "
4604 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4605 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4606 msgstr ""
4607
4608 #. type: Plain text
4609 #: build/C/man3/mcheck.3:111
4610 msgid ""
4611 "The following list describes the values returned by B<mprobe>()  or passed "
4612 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4613 msgstr ""
4614
4615 #. type: TP
4616 #: build/C/man3/mcheck.3:111
4617 #, no-wrap
4618 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4619 msgstr ""
4620
4621 #. type: Plain text
4622 #: build/C/man3/mcheck.3:116
4623 msgid ""
4624 "B<mcheck>()  was not called before the first memory allocation function was "
4625 "called.  Consistency checking is not possible."
4626 msgstr ""
4627
4628 #. type: TP
4629 #: build/C/man3/mcheck.3:116
4630 #, no-wrap
4631 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4632 msgstr ""
4633
4634 #. type: Plain text
4635 #: build/C/man3/mcheck.3:119
4636 msgid "No inconsistency detected."
4637 msgstr ""
4638
4639 #. type: TP
4640 #: build/C/man3/mcheck.3:119
4641 #, no-wrap
4642 msgid "B<MCHECK_HEAD>"
4643 msgstr "B<MCHECK_HEAD>"
4644
4645 #. type: Plain text
4646 #: build/C/man3/mcheck.3:122
4647 msgid "Memory preceding an allocated block was clobbered."
4648 msgstr ""
4649
4650 #. type: TP
4651 #: build/C/man3/mcheck.3:122
4652 #, no-wrap
4653 msgid "B<MCHECK_TAIL>"
4654 msgstr "B<MCHECK_TAIL>"
4655
4656 #. type: Plain text
4657 #: build/C/man3/mcheck.3:125
4658 msgid "Memory following an allocated block was clobbered."
4659 msgstr ""
4660
4661 #. type: TP
4662 #: build/C/man3/mcheck.3:125
4663 #, no-wrap
4664 msgid "B<MCHECK_FREE>"
4665 msgstr "B<MCHECK_FREE>"
4666
4667 #. type: Plain text
4668 #: build/C/man3/mcheck.3:129
4669 msgid "A block of memory was freed twice."
4670 msgstr ""
4671
4672 #. type: Plain text
4673 #: build/C/man3/mcheck.3:134
4674 msgid ""
4675 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4676 msgstr ""
4677
4678 #. type: Plain text
4679 #: build/C/man3/mcheck.3:145
4680 msgid ""
4681 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4682 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4683 "since at least glibc 2.0"
4684 msgstr ""
4685
4686 #.  But is MALLOC_CHECK_ slower?
4687 #. type: Plain text
4688 #: build/C/man3/mcheck.3:159
4689 msgid ""
4690 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4691 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4692 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4693 "application to be relinked."
4694 msgstr ""
4695
4696 #. type: Plain text
4697 #: build/C/man3/mcheck.3:165
4698 msgid ""
4699 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4700 "same block of memory twice.  The following shell session demonstrates what "
4701 "happens when running the program:"
4702 msgstr ""
4703
4704 #. type: Plain text
4705 #: build/C/man3/mcheck.3:170
4706 #, no-wrap
4707 msgid ""
4708 "$B< ./a.out>\n"
4709 "About to free\n"
4710 msgstr ""
4711
4712 #. type: Plain text
4713 #: build/C/man3/mcheck.3:174
4714 #, no-wrap
4715 msgid ""
4716 "About to free a second time\n"
4717 "block freed twice\n"
4718 "Aborted (core dumped)\n"
4719 msgstr ""
4720
4721 #. type: Plain text
4722 #: build/C/man3/mcheck.3:182
4723 #, no-wrap
4724 msgid ""
4725 "#include E<lt>stdlib.hE<gt>\n"
4726 "#include E<lt>stdio.hE<gt>\n"
4727 "#include E<lt>mcheck.hE<gt>\n"
4728 msgstr ""
4729 "#include E<lt>stdlib.hE<gt>\n"
4730 "#include E<lt>stdio.hE<gt>\n"
4731 "#include E<lt>mcheck.hE<gt>\n"
4732
4733 #. type: Plain text
4734 #: build/C/man3/mcheck.3:190
4735 #, no-wrap
4736 msgid ""
4737 "    if (mcheck(NULL) != 0) {\n"
4738 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4739 msgstr ""
4740
4741 #. type: Plain text
4742 #: build/C/man3/mcheck.3:193
4743 #, no-wrap
4744 msgid ""
4745 "        exit(EXIT_FAILURE);\n"
4746 "    }\n"
4747 msgstr ""
4748 "        exit(EXIT_FAILURE);\n"
4749 "    }\n"
4750
4751 #. type: Plain text
4752 #: build/C/man3/mcheck.3:195
4753 #, no-wrap
4754 msgid "    p = malloc(1000);\n"
4755 msgstr "    p = malloc(1000);\n"
4756
4757 #. type: Plain text
4758 #: build/C/man3/mcheck.3:200
4759 #, no-wrap
4760 msgid ""
4761 "    fprintf(stderr, \"About to free\\en\");\n"
4762 "    free(p);\n"
4763 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4764 "    free(p);\n"
4765 msgstr ""
4766
4767 #. type: Plain text
4768 #: build/C/man3/mcheck.3:208
4769 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4770 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4771
4772 #. type: TH
4773 #: build/C/man2/mlock.2:26
4774 #, no-wrap
4775 msgid "MLOCK"
4776 msgstr "MLOCK"
4777
4778 #. type: TH
4779 #: build/C/man2/mlock.2:26
4780 #, no-wrap
4781 msgid "2014-04-14"
4782 msgstr "2014-04-14"
4783
4784 #. type: Plain text
4785 #: build/C/man2/mlock.2:29
4786 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4787 msgstr "mlock - メモリのロックとロック解除を行う"
4788
4789 #. type: Plain text
4790 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4791 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4792 #, no-wrap
4793 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4794 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4795
4796 #. type: Plain text
4797 #: build/C/man2/mlock.2:35
4798 #, no-wrap
4799 msgid ""
4800 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4801 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4802 msgstr ""
4803 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4804 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4805
4806 #. type: Plain text
4807 #: build/C/man2/mlock.2:38
4808 #, no-wrap
4809 msgid ""
4810 "B<int mlockall(int >I<flags>B<);>\n"
4811 "B<int munlockall(void);>\n"
4812 msgstr ""
4813 "B<int mlockall(int >I<flags>B<);>\n"
4814 "B<int munlockall(void);>\n"
4815
4816 #. type: Plain text
4817 #: build/C/man2/mlock.2:54
4818 msgid ""
4819 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4820 "process's virtual address space into RAM, preventing that memory from being "
4821 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4822 "converse operation, respectively unlocking part or all of the calling "
4823 "process's virtual address space, so that pages in the specified virtual "
4824 "address range may once more to be swapped out if required by the kernel "
4825 "memory manager.  Memory locking and unlocking are performed in units of "
4826 "whole pages."
4827 msgstr ""
4828 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4829 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4830 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4831 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4832 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4833 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4834 "る。"
4835
4836 #. type: SS
4837 #: build/C/man2/mlock.2:54
4838 #, no-wrap
4839 msgid "mlock() and munlock()"
4840 msgstr "mlock() と munlock()"
4841
4842 #. type: Plain text
4843 #: build/C/man2/mlock.2:64
4844 msgid ""
4845 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4846 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4847 "address range are guaranteed to be resident in RAM when the call returns "
4848 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4849 msgstr ""
4850 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4851 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4852 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4853 "れるまで RAM に残り続けることが保証される。"
4854
4855 #. type: Plain text
4856 #: build/C/man2/mlock.2:73
4857 msgid ""
4858 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4859 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4860 "of the specified memory range can be moved to external swap space again by "
4861 "the kernel."
4862 msgstr ""
4863 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4864 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4865 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4866
4867 #. type: SS
4868 #: build/C/man2/mlock.2:73
4869 #, no-wrap
4870 msgid "mlockall() and munlockall()"
4871 msgstr "mlockall() と munlockall()"
4872
4873 #. type: Plain text
4874 #: build/C/man2/mlock.2:83
4875 msgid ""
4876 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4877 "process.  This includes the pages of the code, data and stack segment, as "
4878 "well as shared libraries, user space kernel data, shared memory, and memory-"
4879 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4880 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4881 "later unlocked."
4882 msgstr ""
4883 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4884 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4885 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4886 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4887 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4888 "残り続けることが保証される。"
4889
4890 #. type: Plain text
4891 #: build/C/man2/mlock.2:88
4892 msgid ""
4893 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4894 "following constants:"
4895 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4896
4897 #. type: TP
4898 #: build/C/man2/mlock.2:88
4899 #, no-wrap
4900 msgid "B<MCL_CURRENT>"
4901 msgstr "B<MCL_CURRENT>"
4902
4903 #. type: Plain text
4904 #: build/C/man2/mlock.2:92
4905 msgid ""
4906 "Lock all pages which are currently mapped into the address space of the "
4907 "process."
4908 msgstr ""
4909 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4910
4911 #. type: TP
4912 #: build/C/man2/mlock.2:92
4913 #, no-wrap
4914 msgid "B<MCL_FUTURE>"
4915 msgstr "B<MCL_FUTURE>"
4916
4917 #. type: Plain text
4918 #: build/C/man2/mlock.2:99
4919 msgid ""
4920 "Lock all pages which will become mapped into the address space of the "
4921 "process in the future.  These could be for instance new pages required by a "
4922 "growing heap and stack as well as new memory-mapped files or shared memory "
4923 "regions."
4924 msgstr ""
4925 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4926 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4927 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4928
4929 #. type: Plain text
4930 #: build/C/man2/mlock.2:112
4931 msgid ""
4932 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4933 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4934 "of locked bytes to exceed the permitted maximum (see below).  In the same "
4935 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4936 "expansion and deliver a B<SIGSEGV> signal to the process."
4937 msgstr ""
4938 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4939 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4940 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4941 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4942 "スに送る。"
4943
4944 #. type: Plain text
4945 #: build/C/man2/mlock.2:116
4946 msgid ""
4947 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4948 "calling process."
4949 msgstr ""
4950 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4951 "全てのページをロック解除する。"
4952
4953 #. type: Plain text
4954 #: build/C/man2/mlock.2:122
4955 msgid ""
4956 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4957 "is set appropriately, and no changes are made to any locks in the address "
4958 "space of the process."
4959 msgstr ""
4960 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4961 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4962 "れない。"
4963
4964 #. type: Plain text
4965 #: build/C/man2/mlock.2:131
4966 msgid ""
4967 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4968 "resource limit, but tried to lock more memory than the limit permitted.  "
4969 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4970 msgstr ""
4971 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4972 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4973 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4974
4975 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4976 #.  take into account whether the to-be-locked range overlaps with
4977 #.  already locked pages.  Thus, suppose we allocate
4978 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4979 #.  mlock(), and then lock the *same* page range a second time.
4980 #.  In the case, the second mlock() call will fail, since the check
4981 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4982 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4983 #. type: Plain text
4984 #: build/C/man2/mlock.2:143
4985 msgid ""
4986 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4987 "RAM."
4988 msgstr ""
4989 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4990
4991 #. SVr4 documents an additional EAGAIN error code.
4992 #. type: Plain text
4993 #: build/C/man2/mlock.2:149
4994 msgid ""
4995 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4996 "perform the requested operation."
4997 msgstr ""
4998 "呼び出し側が特権を持っていないが、\n"
4999 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5000
5001 #. type: Plain text
5002 #: build/C/man2/mlock.2:154
5003 msgid "For B<mlock>()  and B<munlock>():"
5004 msgstr "B<mlock>()  と B<munlock>()  用として:"
5005
5006 #. type: Plain text
5007 #: build/C/man2/mlock.2:157
5008 msgid "Some or all of the specified address range could not be locked."
5009 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5010
5011 #. type: Plain text
5012 #: build/C/man2/mlock.2:164
5013 msgid ""
5014 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5015 "addition may have resulted in an overflow)."
5016 msgstr ""
5017 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5018 "(例えば、加算でオーバーフローが発生したなど)。"
5019
5020 #. type: Plain text
5021 #: build/C/man2/mlock.2:169
5022 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5023 msgstr ""
5024 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5025
5026 #. type: Plain text
5027 #: build/C/man2/mlock.2:173
5028 msgid ""
5029 "Some of the specified address range does not correspond to mapped pages in "
5030 "the address space of the process."
5031 msgstr ""
5032 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5033 "い。"
5034
5035 #. type: Plain text
5036 #: build/C/man2/mlock.2:176
5037 msgid "For B<mlockall>():"
5038 msgstr "B<mlockall>()  用として:"
5039
5040 #. type: Plain text
5041 #: build/C/man2/mlock.2:179
5042 msgid "Unknown I<flags> were specified."
5043 msgstr "未知の I<flags> が指定された。"
5044
5045 #. type: Plain text
5046 #: build/C/man2/mlock.2:182
5047 msgid "For B<munlockall>():"
5048 msgstr "B<munlockall>()  用として:"
5049
5050 #. type: Plain text
5051 #: build/C/man2/mlock.2:186
5052 msgid ""
5053 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5054 msgstr ""
5055 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5056
5057 #. type: Plain text
5058 #: build/C/man2/mlock.2:188
5059 msgid "POSIX.1-2001, SVr4."
5060 msgstr "POSIX.1-2001, SVr4."
5061
5062 #. type: SH
5063 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
5064 #, no-wrap
5065 msgid "AVAILABILITY"
5066 msgstr "可用性"
5067
5068 #. type: Plain text
5069 #: build/C/man2/mlock.2:200
5070 msgid ""
5071 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5072 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5073 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5074 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5075 msgstr ""
5076 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5077 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5078 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5079 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5080 "び出すことで決定できる。"
5081
5082 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5083 #.  -1: unavailable, 0: ask using sysconf().
5084 #.  glibc defines it to 1.
5085 #. type: Plain text
5086 #: build/C/man2/mlock.2:213
5087 msgid ""
5088 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5089 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5090 "than 0.  (See also B<sysconf>(3).)"
5091 msgstr ""
5092 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5093 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5094 "(B<sysconf>(3)  も参照のこと)。"
5095
5096 #. type: Plain text
5097 #: build/C/man2/mlock.2:231
5098 msgid ""
5099 "Memory locking has two main applications: real-time algorithms and high-"
5100 "security data processing.  Real-time applications require deterministic "
5101 "timing, and, like scheduling, paging is one major cause of unexpected "
5102 "program execution delays.  Real-time applications will usually also switch "
5103 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5104 "security software often handles critical bytes like passwords or secret keys "
5105 "as data structures.  As a result of paging, these secrets could be "
5106 "transferred onto a persistent swap store medium, where they might be "
5107 "accessible to the enemy long after the security software has erased the "
5108 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5109 "laptops and some desktop computers will save a copy of the system's RAM to "
5110 "disk, regardless of memory locks.)"
5111 msgstr ""
5112 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5113 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5114 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5115 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5116 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5117 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5118 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5119 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
5120 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
5121 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
5122 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
5123 "存することに注意)。"
5124
5125 #. type: Plain text
5126 #: build/C/man2/mlock.2:244
5127 msgid ""
5128 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5129 "faults should reserve enough locked stack pages before entering the time-"
5130 "critical section, so that no page fault can be caused by function calls.  "
5131 "This can be achieved by calling a function that allocates a sufficiently "
5132 "large automatic variable (an array) and writes to the memory occupied by "
5133 "this array in order to touch these stack pages.  This way, enough pages will "
5134 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5135 "that not even copy-on-write page faults can occur in the critical section."
5136 msgstr ""
5137 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5138 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5139 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5140 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5141 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
5142 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5143 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5144 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5145 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5146
5147 #. type: Plain text
5148 #: build/C/man2/mlock.2:257
5149 msgid ""
5150 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5151 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5152 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5153 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5154 msgstr ""
5155 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5156 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5157 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5158 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5159
5160 #. type: Plain text
5161 #: build/C/man2/mlock.2:261
5162 msgid ""
5163 "The memory lock on an address range is automatically removed if the address "
5164 "range is unmapped via B<munmap>(2)."
5165 msgstr ""
5166 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5167 "よってアンマップされた場合は削除される。"
5168
5169 #. type: Plain text
5170 #: build/C/man2/mlock.2:274
5171 msgid ""
5172 "Memory locks do not stack, that is, pages which have been locked several "
5173 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5174 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5175 "Pages which are mapped to several locations or by several processes stay "
5176 "locked into RAM as long as they are locked at least at one location or by at "
5177 "least one process."
5178 msgstr ""
5179 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5180 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5181 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5182 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5183 "のプロセスでロックされている限りは RAM に残り続ける。"
5184
5185 #. type: Plain text
5186 #: build/C/man2/mlock.2:285
5187 msgid ""
5188 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5189 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5190 "implementation to require that I<addr> is page aligned, so portable "
5191 "applications should ensure this."
5192 msgstr ""
5193 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5194 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5195 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5196 "ケーションではきちんと境界に合わせた方が良い。"
5197
5198 #. type: Plain text
5199 #: build/C/man2/mlock.2:298
5200 msgid ""
5201 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5202 "many kilobytes of memory the process with ID I<PID> has locked using "
5203 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5204 msgstr ""
5205 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5206 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5207 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5208 "表示される。"
5209
5210 #. type: SS
5211 #: build/C/man2/mlock.2:298
5212 #, no-wrap
5213 msgid "Limits and permissions"
5214 msgstr "制限と権限"
5215
5216 #. type: Plain text
5217 #: build/C/man2/mlock.2:305
5218 msgid ""
5219 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5220 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5221 "defines a limit on how much memory the process may lock."
5222 msgstr ""
5223 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5224 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5225 "できるかの制限を定義する。"
5226
5227 #. type: Plain text
5228 #: build/C/man2/mlock.2:311
5229 msgid ""
5230 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5231 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5232 "instead defines a limit on how much memory an unprivileged process may lock."
5233 msgstr ""
5234 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5235 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5236 "クできるメモリ量の制限を定義する。"
5237
5238 #. type: Plain text
5239 #: build/C/man2/mlock.2:319
5240 msgid ""
5241 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5242 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5243 "was rectified in kernel 2.4.18."
5244 msgstr ""
5245 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5246 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5247 "ネル 2.4.18 で修正された。"
5248
5249 #.  See the following LKML thread:
5250 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5251 #.  "Rationale for RLIMIT_MEMLOCK"
5252 #.  23 Jan 2006
5253 #. type: Plain text
5254 #: build/C/man2/mlock.2:336
5255 msgid ""
5256 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5257 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5258 "example, setting its effective UID to a nonzero value), then subsequent "
5259 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5260 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5261 msgstr ""
5262 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5263 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5264 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5265 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5266 "B<brk>(2))  は失敗する。"
5267
5268 #. type: Plain text
5269 #: build/C/man2/mlock.2:343
5270 msgid ""
5271 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5272 "B<capabilities>(7)"
5273 msgstr ""
5274 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5275 "B<capabilities>(7)"
5276
5277 #. type: TH
5278 #: build/C/man2/mmap.2:40
5279 #, no-wrap
5280 msgid "MMAP"
5281 msgstr "MMAP"
5282
5283 #. type: TH
5284 #: build/C/man2/mmap.2:40 build/C/man2/sync_file_range.2:30
5285 #, no-wrap
5286 msgid "2014-08-19"
5287 msgstr "2014-08-19"
5288
5289 #. type: Plain text
5290 #: build/C/man2/mmap.2:43
5291 msgid "mmap, munmap - map or unmap files or devices into memory"
5292 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5293
5294 #. type: Plain text
5295 #: build/C/man2/mmap.2:51
5296 #, no-wrap
5297 msgid ""
5298 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5299 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5300 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5301 msgstr ""
5302 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5303 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5304 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5305
5306 #. type: Plain text
5307 #: build/C/man2/mmap.2:54
5308 msgid "See NOTES for information on feature test macro requirements."
5309 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5310
5311 #. type: Plain text
5312 #: build/C/man2/mmap.2:63
5313 msgid ""
5314 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5315 "process.  The starting address for the new mapping is specified in I<addr>.  "
5316 "The I<length> argument specifies the length of the mapping."
5317 msgstr ""
5318 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5319 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5320 "は I<length> 引き数で指定される。"
5321
5322 #.  Before Linux 2.6.24, the address was rounded up to the next page
5323 #.  boundary; since 2.6.24, it is rounded down!
5324 #. type: Plain text
5325 #: build/C/man2/mmap.2:77
5326 msgid ""
5327 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5328 "the mapping; this is the most portable method of creating a new mapping.  If "
5329 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5330 "the mapping; on Linux, the mapping will be created at a nearby page "
5331 "boundary.  The address of the new mapping is returned as the result of the "
5332 "call."
5333 msgstr ""
5334 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5335 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5336 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5337 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5338 "ングのアドレスは、呼び出しの返り値として返される。"
5339
5340 #. type: Plain text
5341 #: build/C/man2/mmap.2:89
5342 msgid ""
5343 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5344 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5345 "offset I<offset> in the file (or other object) referred to by the file "
5346 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5347 "by I<sysconf(_SC_PAGE_SIZE)>."
5348 msgstr ""
5349 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5350 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5351 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5352 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5353 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5354
5355 #. type: Plain text
5356 #: build/C/man2/mmap.2:97
5357 msgid ""
5358 "The I<prot> argument describes the desired memory protection of the mapping "
5359 "(and must not conflict with the open mode of the file).  It is either "
5360 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5361 msgstr ""
5362 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5363 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5364 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5365
5366 #. type: TP
5367 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5368 #, no-wrap
5369 msgid "B<PROT_EXEC>"
5370 msgstr "B<PROT_EXEC>"
5371
5372 #. type: Plain text
5373 #: build/C/man2/mmap.2:100
5374 msgid "Pages may be executed."
5375 msgstr "ページは実行可能である。"
5376
5377 #. type: TP
5378 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5379 #, no-wrap
5380 msgid "B<PROT_READ>"
5381 msgstr "B<PROT_READ>"
5382
5383 #. type: Plain text
5384 #: build/C/man2/mmap.2:103
5385 msgid "Pages may be read."
5386 msgstr "ページは読み込み可能である。"
5387
5388 #. type: TP
5389 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5390 #, no-wrap
5391 msgid "B<PROT_WRITE>"
5392 msgstr "B<PROT_WRITE>"
5393
5394 #. type: Plain text
5395 #: build/C/man2/mmap.2:106
5396 msgid "Pages may be written."
5397 msgstr "ページに書き込み可能である。"
5398
5399 #. type: TP
5400 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5401 #, no-wrap
5402 msgid "B<PROT_NONE>"
5403 msgstr "B<PROT_NONE>"
5404
5405 #. type: Plain text
5406 #: build/C/man2/mmap.2:109
5407 msgid "Pages may not be accessed."
5408 msgstr "ページにはアクセスできない。"
5409
5410 #. type: Plain text
5411 #: build/C/man2/mmap.2:118
5412 msgid ""
5413 "The I<flags> argument determines whether updates to the mapping are visible "
5414 "to other processes mapping the same region, and whether updates are carried "
5415 "through to the underlying file.  This behavior is determined by including "
5416 "exactly one of the following values in I<flags>:"
5417 msgstr ""
5418 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5419 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5420 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5421 "I<flags> に含めることで指定する。"
5422
5423 #. type: TP
5424 #: build/C/man2/mmap.2:118
5425 #, no-wrap
5426 msgid "B<MAP_SHARED>"
5427 msgstr "B<MAP_SHARED>"
5428
5429 #. type: Plain text
5430 #: build/C/man2/mmap.2:128
5431 msgid ""
5432 "Share this mapping.  Updates to the mapping are visible to other processes "
5433 "that map this file, and are carried through to the underlying file.  The "
5434 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5435 "called."
5436 msgstr ""
5437 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5438 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5439 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5440 "るまで行われないこともある。"
5441
5442 #. type: TP
5443 #: build/C/man2/mmap.2:128
5444 #, no-wrap
5445 msgid "B<MAP_PRIVATE>"
5446 msgstr "B<MAP_PRIVATE>"
5447
5448 #. type: Plain text
5449 #: build/C/man2/mmap.2:137
5450 msgid ""
5451 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5452 "visible to other processes mapping the same file, and are not carried "
5453 "through to the underlying file.  It is unspecified whether changes made to "
5454 "the file after the B<mmap>()  call are visible in the mapped region."
5455 msgstr ""
5456 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5457 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5458 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5459 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5460 "かは規定されていない。"
5461
5462 #. type: Plain text
5463 #: build/C/man2/mmap.2:139
5464 msgid "Both of these flags are described in POSIX.1-2001."
5465 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5466
5467 #. type: Plain text
5468 #: build/C/man2/mmap.2:142
5469 msgid ""
5470 "In addition, zero or more of the following values can be ORed in I<flags>:"
5471 msgstr ""
5472 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5473 "ことができる。"
5474
5475 #. type: TP
5476 #: build/C/man2/mmap.2:142
5477 #, no-wrap
5478 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5479 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5480
5481 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5482 #. type: Plain text
5483 #: build/C/man2/mmap.2:158
5484 msgid ""
5485 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5486 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5487 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5488 "as to improve context-switch performance on some early 64-bit processors.  "
5489 "Modern x86-64 processors no longer have this performance problem, so use of "
5490 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5491 "ignored when B<MAP_FIXED> is set."
5492 msgstr ""
5493 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5494 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5495 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5496 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5497 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5498 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5499 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5500 "グは無視される。"
5501
5502 #. type: TP
5503 #: build/C/man2/mmap.2:158
5504 #, no-wrap
5505 msgid "B<MAP_ANON>"
5506 msgstr "B<MAP_ANON>"
5507
5508 #. type: Plain text
5509 #: build/C/man2/mmap.2:163
5510 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5511 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5512
5513 #. type: TP
5514 #: build/C/man2/mmap.2:163
5515 #, no-wrap
5516 msgid "B<MAP_ANONYMOUS>"
5517 msgstr "B<MAP_ANONYMOUS>"
5518
5519 #. type: Plain text
5520 #: build/C/man2/mmap.2:185
5521 msgid ""
5522 "The mapping is not backed by any file; its contents are initialized to "
5523 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5524 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5525 "is specified, and portable applications should ensure this.  The use of "
5526 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5527 "only since kernel 2.4."
5528 msgstr ""
5529 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5530 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5531 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5532 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5533 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5534 "以降の Linux でのみサポートされている。"
5535
5536 #. type: TP
5537 #: build/C/man2/mmap.2:185
5538 #, no-wrap
5539 msgid "B<MAP_DENYWRITE>"
5540 msgstr "B<MAP_DENYWRITE>"
5541
5542 #.  Introduced in 1.1.36, removed in 1.3.24.
5543 #. type: Plain text
5544 #: build/C/man2/mmap.2:193
5545 msgid ""
5546 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5547 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5548 "denial-of-service attacks.)"
5549 msgstr ""
5550 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5551 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5552 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5553
5554 #. type: TP
5555 #: build/C/man2/mmap.2:193
5556 #, no-wrap
5557 msgid "B<MAP_EXECUTABLE>"
5558 msgstr "B<MAP_EXECUTABLE>"
5559
5560 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5561 #.  (Long ago, it signaled that the underlying file is an executable.
5562 #.  However, that information was not really used anywhere.)
5563 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5564 #.  MAP_DENYWRITE?
5565 #. type: Plain text
5566 #: build/C/man2/mmap.2:201
5567 msgid "This flag is ignored."
5568 msgstr "このフラグは無視される。"
5569
5570 #. type: TP
5571 #: build/C/man2/mmap.2:201
5572 #, no-wrap
5573 msgid "B<MAP_FILE>"
5574 msgstr "B<MAP_FILE>"
5575
5576 #.  On some systems, this was required as the opposite of
5577 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5578 #. type: Plain text
5579 #: build/C/man2/mmap.2:207
5580 msgid "Compatibility flag.  Ignored."
5581 msgstr "互換性のためのフラグ。無視される。"
5582
5583 #. type: TP
5584 #: build/C/man2/mmap.2:207
5585 #, no-wrap
5586 msgid "B<MAP_FIXED>"
5587 msgstr "B<MAP_FIXED>"
5588
5589 #. type: Plain text
5590 #: build/C/man2/mmap.2:225
5591 msgid ""
5592 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5593 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5594 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5595 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5596 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5597 "requiring a fixed address for a mapping is less portable, the use of this "
5598 "option is discouraged."
5599 msgstr ""
5600 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5601 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5602 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5603 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5604 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5605 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5606 "を推奨する。"
5607
5608 #. type: TP
5609 #: build/C/man2/mmap.2:225
5610 #, no-wrap
5611 msgid "B<MAP_GROWSDOWN>"
5612 msgstr "B<MAP_GROWSDOWN>"
5613
5614 #. type: Plain text
5615 #: build/C/man2/mmap.2:230
5616 msgid ""
5617 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5618 "mapping should extend downward in memory."
5619 msgstr ""
5620 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5621 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5622 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5623
5624 #. type: TP
5625 #: build/C/man2/mmap.2:230
5626 #, no-wrap
5627 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5628 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5629
5630 #. type: Plain text
5631 #: build/C/man2/mmap.2:236
5632 msgid ""
5633 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5634 "I<Documentation/vm/hugetlbpage.txt> for further information."
5635 msgstr ""
5636 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5637 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5638
5639 #. type: TP
5640 #: build/C/man2/mmap.2:236
5641 #, no-wrap
5642 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5643 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5644
5645 #.  If set, the mapped pages will not be swapped out.
5646 #. type: Plain text
5647 #: build/C/man2/mmap.2:242
5648 msgid ""
5649 "Lock the pages of the mapped region into memory in the manner of "
5650 "B<mlock>(2).  This flag is ignored in older kernels."
5651 msgstr ""
5652 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5653 "前のカーネルでは、このフラグは無視される。"
5654
5655 #. type: TP
5656 #: build/C/man2/mmap.2:242
5657 #, no-wrap
5658 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5659 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5660
5661 #. type: Plain text
5662 #: build/C/man2/mmap.2:257
5663 msgid ""
5664 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5665 "ahead: create page tables entries only for pages that are already present in "
5666 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5667 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5668 "reimplemented."
5669 msgstr ""
5670 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5671 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5672 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5673 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5674 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5675
5676 #. type: TP
5677 #: build/C/man2/mmap.2:257
5678 #, no-wrap
5679 msgid "B<MAP_NORESERVE>"
5680 msgstr "B<MAP_NORESERVE>"
5681
5682 #. type: Plain text
5683 #: build/C/man2/mmap.2:272
5684 msgid ""
5685 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5686 "one has the guarantee that it is possible to modify the mapping.  When swap "
5687 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5688 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5689 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5690 "effect only for private writable mappings."
5691 msgstr ""
5692 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5693 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5694 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5695 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5696 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5697 "イベート・マッピングについてのみ効果があった。"
5698
5699 #. type: TP
5700 #: build/C/man2/mmap.2:272
5701 #, no-wrap
5702 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5703 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5704
5705 #. type: Plain text
5706 #: build/C/man2/mmap.2:279
5707 msgid ""
5708 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5709 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5710 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5711 "only since Linux 2.6.23."
5712 msgstr ""
5713 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5714 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5715 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5716 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5717 "されている。"
5718
5719 #. type: TP
5720 #: build/C/man2/mmap.2:279
5721 #, no-wrap
5722 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5723 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5724
5725 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5726 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5727 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5728 #.  "pthread_create() slow for many threads; also time to revisit 64b
5729 #.   context switch optimization?"
5730 #. type: Plain text
5731 #: build/C/man2/mmap.2:292
5732 msgid ""
5733 "Allocate the mapping at an address suitable for a process or thread stack.  "
5734 "This flag is currently a no-op, but is used in the glibc threading "
5735 "implementation so that if some architectures require special treatment for "
5736 "stack allocations, support can later be transparently implemented for glibc."
5737 msgstr ""
5738 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5739 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5740 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5741 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5742 "る。"
5743
5744 #. type: TP
5745 #: build/C/man2/mmap.2:292
5746 #, no-wrap
5747 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5748 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5749
5750 #. type: Plain text
5751 #: build/C/man2/mmap.2:302
5752 msgid ""
5753 "Don't clear anonymous pages.  This flag is intended to improve performance "
5754 "on embedded devices.  This flag is honored only if the kernel was configured "
5755 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5756 "implications, that option is normally enabled only on embedded devices (i."
5757 "e., devices where one has complete control of the contents of user memory)."
5758 msgstr ""
5759 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5760 "ス\n"
5761 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5762 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5763 "このフラグは効果を持つ。\n"
5764 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5765 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5766
5767 #. type: Plain text
5768 #: build/C/man2/mmap.2:310
5769 msgid ""
5770 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5771 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5772 "B<MAP_ANON>)."
5773 msgstr ""
5774 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5775 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5776 "B<MAP_ANON>)  もサポートされている。"
5777
5778 #. type: Plain text
5779 #: build/C/man2/mmap.2:317
5780 msgid ""
5781 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5782 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5783 msgstr ""
5784 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5785 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5786
5787 #. type: Plain text
5788 #: build/C/man2/mmap.2:323
5789 msgid ""
5790 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5791 "attributes."
5792 msgstr ""
5793 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5794
5795 #. type: Plain text
5796 #: build/C/man2/mmap.2:331
5797 msgid ""
5798 "A file is mapped in multiples of the page size.  For a file that is not a "
5799 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5800 "writes to that region are not written out to the file.  The effect of "
5801 "changing the size of the underlying file of a mapping on the pages that "
5802 "correspond to added or removed regions of the file is unspecified."
5803 msgstr ""
5804 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5805 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5806 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5807 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5808 "マップされたページに対してどのような影響があるかは規定されていない。"
5809
5810 #. type: SS
5811 #: build/C/man2/mmap.2:331
5812 #, no-wrap
5813 msgid "munmap()"
5814 msgstr "munmap()"
5815
5816 #. type: Plain text
5817 #: build/C/man2/mmap.2:341
5818 msgid ""
5819 "The B<munmap>()  system call deletes the mappings for the specified address "
5820 "range, and causes further references to addresses within the range to "
5821 "generate invalid memory references.  The region is also automatically "
5822 "unmapped when the process is terminated.  On the other hand, closing the "
5823 "file descriptor does not unmap the region."
5824 msgstr ""
5825 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5826 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5827 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5828 "はアンマップされない。"
5829
5830 #. type: Plain text
5831 #: build/C/man2/mmap.2:351
5832 msgid ""
5833 "The address I<addr> must be a multiple of the page size.  All pages "
5834 "containing a part of the indicated range are unmapped, and subsequent "
5835 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5836 "the indicated range does not contain any mapped pages."
5837 msgstr ""
5838 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5839 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5840 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5841 "ていない場合でも エラーにならない。"
5842
5843 #. type: SS
5844 #: build/C/man2/mmap.2:351
5845 #, no-wrap
5846 msgid "Timestamps changes for file-backed mappings"
5847 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5848
5849 #. type: Plain text
5850 #: build/C/man2/mmap.2:358
5851 msgid ""
5852 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5853 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5854 "the first reference to a mapped page will update the field if it has not "
5855 "been already."
5856 msgstr ""
5857 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5858 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5859 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5860 "ページへの最初の参照があった 際に更新される。"
5861
5862 #. type: Plain text
5863 #: build/C/man2/mmap.2:375
5864 msgid ""
5865 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5866 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5867 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5868 "one occurs."
5869 msgstr ""
5870 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5871 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5872 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5873 "B<msync>(2)  が呼ばれる前までに更新される。"
5874
5875 #. type: Plain text
5876 #: build/C/man2/mmap.2:392
5877 msgid ""
5878 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5879 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5880 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5881 "and I<errno> is set (probably to B<EINVAL>)."
5882 msgstr ""
5883 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5884 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5885 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5886 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5887
5888 #. type: TP
5889 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5890 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5891 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5892 #: build/C/man2/shmop.2:188
5893 #, no-wrap
5894 msgid "B<EACCES>"
5895 msgstr "B<EACCES>"
5896
5897 #. type: Plain text
5898 #: build/C/man2/mmap.2:411
5899 msgid ""
5900 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5901 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5902 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5903 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5904 msgstr ""
5905 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5906 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5907 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5908 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5909 "たが、ファイルは追加 (append) 専用である。"
5910
5911 #. type: Plain text
5912 #: build/C/man2/mmap.2:415
5913 msgid ""
5914 "The file has been locked, or too much memory has been locked (see "
5915 "B<setrlimit>(2))."
5916 msgstr ""
5917 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5918 "(B<setrlimit>(2)  を参照)。"
5919
5920 #. type: Plain text
5921 #: build/C/man2/mmap.2:421
5922 msgid ""
5923 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5924 msgstr ""
5925 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5926 "B<MAP_ANONYMOUS> がセットされていない)。"
5927
5928 #. type: Plain text
5929 #: build/C/man2/mmap.2:429
5930 msgid ""
5931 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5932 "not aligned on a page boundary)."
5933 msgstr ""
5934 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5935 "ジ境界にアラインメントされていない)。"
5936
5937 #. type: Plain text
5938 #: build/C/man2/mmap.2:434
5939 msgid "(since Linux 2.6.12)  I<length> was 0."
5940 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5941
5942 #. type: Plain text
5943 #: build/C/man2/mmap.2:442
5944 msgid ""
5945 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5946 "both of these values."
5947 msgstr ""
5948 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5949 "しくは その両方が含まれていた。"
5950
5951 #. type: TP
5952 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5953 #: build/C/man2/shmget.2:221
5954 #, no-wrap
5955 msgid "B<ENFILE>"
5956 msgstr "B<ENFILE>"
5957
5958 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5959 #. type: Plain text
5960 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5961 msgid "The system limit on the total number of open files has been reached."
5962 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5963
5964 #. type: Plain text
5965 #: build/C/man2/mmap.2:454
5966 msgid ""
5967 "The underlying filesystem of the specified file does not support memory "
5968 "mapping."
5969 msgstr ""
5970 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5971 "していない。"
5972
5973 #. type: Plain text
5974 #: build/C/man2/mmap.2:458
5975 msgid ""
5976 "No memory is available, or the process's maximum number of mappings would "
5977 "have been exceeded."
5978 msgstr ""
5979 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5980
5981 #.  (Since 2.4.25 / 2.6.0.)
5982 #. type: Plain text
5983 #: build/C/man2/mmap.2:467
5984 msgid ""
5985 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5986 "file on a filesystem that was mounted no-exec."
5987 msgstr ""
5988 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5989 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5990
5991 #. type: Plain text
5992 #: build/C/man2/mmap.2:473
5993 msgid ""
5994 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5995 "writing."
5996 msgstr ""
5997 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5998 "き込み用に開かれている。"
5999
6000 #. type: TP
6001 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
6002 #, no-wrap
6003 msgid "B<EOVERFLOW>"
6004 msgstr "B<EOVERFLOW>"
6005
6006 #. type: Plain text
6007 #: build/C/man2/mmap.2:485
6008 msgid ""
6009 "On 32-bit architecture together with the large file extension (i.e., using "
6010 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6011 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6012 msgstr ""
6013 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
6014 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6015 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6016 "しまう) 場合がある。"
6017
6018 #. type: Plain text
6019 #: build/C/man2/mmap.2:487
6020 msgid "Use of a mapped region can result in these signals:"
6021 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6022
6023 #. type: TP
6024 #: build/C/man2/mmap.2:487
6025 #, no-wrap
6026 msgid "B<SIGSEGV>"
6027 msgstr "B<SIGSEGV>"
6028
6029 #. type: Plain text
6030 #: build/C/man2/mmap.2:490
6031 msgid "Attempted write into a region mapped as read-only."
6032 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6033
6034 #. type: TP
6035 #: build/C/man2/mmap.2:490
6036 #, no-wrap
6037 msgid "B<SIGBUS>"
6038 msgstr "B<SIGBUS>"
6039
6040 #. type: Plain text
6041 #: build/C/man2/mmap.2:495
6042 msgid ""
6043 "Attempted access to a portion of the buffer that does not correspond to the "
6044 "file (for example, beyond the end of the file, including the case where "
6045 "another process has truncated the file)."
6046 msgstr ""
6047 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
6048 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
6049 "にアクセスしようとした。"
6050
6051 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6052 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6053 #. type: Plain text
6054 #: build/C/man2/mmap.2:499
6055 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6056 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6057
6058 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6059 #.  -1: unavailable, 0: ask using sysconf().
6060 #.  glibc defines it to 1.
6061 #. type: Plain text
6062 #: build/C/man2/mmap.2:513
6063 msgid ""
6064 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>()  are "
6065 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6066 "value greater than 0.  (See also B<sysconf>(3).)"
6067 msgstr ""
6068 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6069 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6070 "(B<sysconf>(3)  も参照のこと)。"
6071
6072 #. type: Plain text
6073 #: build/C/man2/mmap.2:526
6074 msgid ""
6075 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6076 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6077 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6078 "they intend to execute code in the new mapping."
6079 msgstr ""
6080 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
6081 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
6082 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
6083 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
6084 "常に B<PROT_EXEC> をセットすべきである。"
6085
6086 #. type: Plain text
6087 #: build/C/man2/mmap.2:541
6088 msgid ""
6089 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6090 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6091 "address for the mapping; the address is chosen so as not to conflict with "
6092 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6093 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6094 msgstr ""
6095 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6096 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6097 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6098 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6099 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6100
6101 #. type: Plain text
6102 #: build/C/man2/mmap.2:571
6103 msgid ""
6104 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6105 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6106 "requiring that macro specifically would have been more logical, since these "
6107 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6108 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6109 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6110 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6111 "B<MAP_STACK>."
6112 msgstr ""
6113 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6114 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6115 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6116 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6117 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6118 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6119 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6120 "B<MAP_STACK> である。"
6121
6122 #. type: SS
6123 #: build/C/man2/mmap.2:571
6124 #, no-wrap
6125 msgid "C library/kernel ABI differences"
6126 msgstr ""
6127
6128 #.  Since around glibc 2.1/2.2, depending on the platform.
6129 #. type: Plain text
6130 #: build/C/man2/mmap.2:586
6131 msgid ""
6132 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6133 "function.  Originally, this function invoked a system call of the same "
6134 "name.  Since kernel 2.4, that system call has been superseded by "
6135 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6136 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6137 msgstr ""
6138 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6139 "に\n"
6140 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6141 "た。\n"
6142 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6143 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6144 "B<mmap2>(2) を起動する。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mmap.2:591
6148 msgid ""
6149 "On Linux there are no guarantees like those suggested above under "
6150 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6151 "the system runs out of memory."
6152 msgstr ""
6153 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6154 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6155 "終了されるか分からないからである。"
6156
6157 #. type: Plain text
6158 #: build/C/man2/mmap.2:598
6159 msgid ""
6160 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6161 "is specified as B<PROT_NONE>."
6162 msgstr ""
6163 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6164 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6165
6166 #. type: Plain text
6167 #: build/C/man2/mmap.2:613
6168 msgid ""
6169 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6170 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6171 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6172 "fails with the error B<EINVAL> for this case."
6173 msgstr ""
6174 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6175 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6176 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6177 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6178
6179 #. type: Plain text
6180 #: build/C/man2/mmap.2:629
6181 msgid ""
6182 "POSIX specifies that the system shall always zero fill any partial page at "
6183 "the end of the object and that system will never write any modification of "
6184 "the object beyond its end.  On Linux, when you write data to such partial "
6185 "page after the end of the object, the data stays in the page cache even "
6186 "after the file is closed and unmapped and even though the data is never "
6187 "written to the file itself, subsequent mappings may see the modified "
6188 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6189 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6190 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6191 msgstr ""
6192 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6193 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6194 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6195 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6196 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6197 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6198 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6199 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6200 "共有メモリインターフェースを使った場合)。"
6201
6202 #. type: Plain text
6203 #: build/C/man2/mmap.2:641
6204 msgid ""
6205 "The following program prints part of the file specified in its first command-"
6206 "line argument to standard output.  The range of bytes to be printed is "
6207 "specified via offset and length values in the second and third command-line "
6208 "arguments.  The program creates a memory mapping of the required pages of "
6209 "the file and then uses B<write>(2)  to output the desired bytes."
6210 msgstr ""
6211 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6212 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6213 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6214 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6215 "を出力する。"
6216
6217 #. type: Plain text
6218 #: build/C/man2/mmap.2:649
6219 #, no-wrap
6220 msgid ""
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 msgstr ""
6228 "#include E<lt>sys/mman.hE<gt>\n"
6229 "#include E<lt>sys/stat.hE<gt>\n"
6230 "#include E<lt>fcntl.hE<gt>\n"
6231 "#include E<lt>stdio.hE<gt>\n"
6232 "#include E<lt>stdlib.hE<gt>\n"
6233 "#include E<lt>unistd.hE<gt>\n"
6234
6235 #. type: Plain text
6236 #: build/C/man2/mmap.2:652 build/C/man2/mprotect.2:177
6237 #, no-wrap
6238 msgid ""
6239 "#define handle_error(msg) \\e\n"
6240 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6241 msgstr ""
6242 "#define handle_error(msg) \\e\n"
6243 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6244
6245 #. type: Plain text
6246 #: build/C/man2/mmap.2:662
6247 #, no-wrap
6248 msgid ""
6249 "int\n"
6250 "main(int argc, char *argv[])\n"
6251 "{\n"
6252 "    char *addr;\n"
6253 "    int fd;\n"
6254 "    struct stat sb;\n"
6255 "    off_t offset, pa_offset;\n"
6256 "    size_t length;\n"
6257 "    ssize_t s;\n"
6258 msgstr ""
6259 "int\n"
6260 "main(int argc, char *argv[])\n"
6261 "{\n"
6262 "    char *addr;\n"
6263 "    int fd;\n"
6264 "    struct stat sb;\n"
6265 "    off_t offset, pa_offset;\n"
6266 "    size_t length;\n"
6267 "    ssize_t s;\n"
6268
6269 #. type: Plain text
6270 #: build/C/man2/mmap.2:667
6271 #, no-wrap
6272 msgid ""
6273 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6274 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6275 "        exit(EXIT_FAILURE);\n"
6276 "    }\n"
6277 msgstr ""
6278 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6279 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6280 "        exit(EXIT_FAILURE);\n"
6281 "    }\n"
6282
6283 #. type: Plain text
6284 #: build/C/man2/mmap.2:671
6285 #, no-wrap
6286 msgid ""
6287 "    fd = open(argv[1], O_RDONLY);\n"
6288 "    if (fd == -1)\n"
6289 "        handle_error(\"open\");\n"
6290 msgstr ""
6291 "    fd = open(argv[1], O_RDONLY);\n"
6292 "    if (fd == -1)\n"
6293 "        handle_error(\"open\");\n"
6294
6295 #. type: Plain text
6296 #: build/C/man2/mmap.2:674
6297 #, no-wrap
6298 msgid ""
6299 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6300 "        handle_error(\"fstat\");\n"
6301 msgstr ""
6302 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6303 "        handle_error(\"fstat\");\n"
6304
6305 #. type: Plain text
6306 #: build/C/man2/mmap.2:678
6307 #, no-wrap
6308 msgid ""
6309 "    offset = atoi(argv[2]);\n"
6310 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6311 "        /* offset for mmap() must be page aligned */\n"
6312 msgstr ""
6313 "    offset = atoi(argv[2]);\n"
6314 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6315 "        /* offset for mmap() must be page aligned */\n"
6316
6317 #. type: Plain text
6318 #: build/C/man2/mmap.2:683
6319 #, no-wrap
6320 msgid ""
6321 "    if (offset E<gt>= sb.st_size) {\n"
6322 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6323 "        exit(EXIT_FAILURE);\n"
6324 "    }\n"
6325 msgstr ""
6326 "    if (offset E<gt>= sb.st_size) {\n"
6327 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6328 "        exit(EXIT_FAILURE);\n"
6329 "    }\n"
6330
6331 #. type: Plain text
6332 #: build/C/man2/mmap.2:689
6333 #, no-wrap
6334 msgid ""
6335 "    if (argc == 4) {\n"
6336 "        length = atoi(argv[3]);\n"
6337 "        if (offset + length E<gt> sb.st_size)\n"
6338 "            length = sb.st_size - offset;\n"
6339 "                /* Can\\(aqt display bytes past end of file */\n"
6340 msgstr ""
6341 "    if (argc == 4) {\n"
6342 "        length = atoi(argv[3]);\n"
6343 "        if (offset + length E<gt> sb.st_size)\n"
6344 "            length = sb.st_size - offset;\n"
6345 "                /* Can\\(aqt display bytes past end of file */\n"
6346
6347 #. type: Plain text
6348 #: build/C/man2/mmap.2:693
6349 #, no-wrap
6350 msgid ""
6351 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6352 "        length = sb.st_size - offset;\n"
6353 "    }\n"
6354 msgstr ""
6355 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6356 "        length = sb.st_size - offset;\n"
6357 "    }\n"
6358
6359 #. type: Plain text
6360 #: build/C/man2/mmap.2:698
6361 #, no-wrap
6362 msgid ""
6363 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6364 "                MAP_PRIVATE, fd, pa_offset);\n"
6365 "    if (addr == MAP_FAILED)\n"
6366 "        handle_error(\"mmap\");\n"
6367 msgstr ""
6368 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6369 "                MAP_PRIVATE, fd, pa_offset);\n"
6370 "    if (addr == MAP_FAILED)\n"
6371 "        handle_error(\"mmap\");\n"
6372
6373 #. type: Plain text
6374 #: build/C/man2/mmap.2:703
6375 #, no-wrap
6376 msgid ""
6377 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6378 "    if (s != length) {\n"
6379 "        if (s == -1)\n"
6380 "            handle_error(\"write\");\n"
6381 msgstr ""
6382 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6383 "    if (s != length) {\n"
6384 "        if (s == -1)\n"
6385 "            handle_error(\"write\");\n"
6386
6387 #. type: Plain text
6388 #: build/C/man2/mmap.2:707
6389 #, no-wrap
6390 msgid ""
6391 "        fprintf(stderr, \"partial write\");\n"
6392 "        exit(EXIT_FAILURE);\n"
6393 "    }\n"
6394 msgstr ""
6395 "        fprintf(stderr, \"partial write\");\n"
6396 "        exit(EXIT_FAILURE);\n"
6397 "    }\n"
6398
6399 #. type: Plain text
6400 #: build/C/man2/mmap.2:724
6401 msgid ""
6402 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6403 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6404 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6405 msgstr ""
6406 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6407 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6408 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6409
6410 #. type: Plain text
6411 #: build/C/man2/mmap.2:731
6412 msgid ""
6413 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6414 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6415 msgstr ""
6416 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6417 "smaps> の説明。"
6418
6419 #. type: Plain text
6420 #: build/C/man2/mmap.2:736 build/C/man2/msync.2:151
6421 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6422 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6423
6424 #. type: TH
6425 #: build/C/man2/mmap2.2:29
6426 #, no-wrap
6427 msgid "MMAP2"
6428 msgstr "MMAP2"
6429
6430 #. type: TH
6431 #: build/C/man2/mmap2.2:29
6432 #, no-wrap
6433 msgid "2014-02-25"
6434 msgstr "2014-02-25"
6435
6436 #. type: Plain text
6437 #: build/C/man2/mmap2.2:32
6438 msgid "mmap2 - map files or devices into memory"
6439 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6440
6441 #. type: Plain text
6442 #: build/C/man2/mmap2.2:38
6443 #, no-wrap
6444 msgid ""
6445 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6446 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6447 msgstr ""
6448 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6449 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6450
6451 #. type: Plain text
6452 #: build/C/man2/mmap2.2:43
6453 msgid ""
6454 "This is probably not the system call that you are interested in; instead, "
6455 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6456 "system call."
6457 msgstr ""
6458 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6459 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6460 "の\n"
6461 "ラッパー関数についての説明がある。"
6462
6463 #. type: Plain text
6464 #: build/C/man2/mmap2.2:54
6465 msgid ""
6466 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6467 "except that the final argument specifies the offset into the file in 4096-"
6468 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6469 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6470 "bytes)."
6471 msgstr ""
6472 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6473 "だ\n"
6474 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6475 "ト\n"
6476 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6477 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6478 "プ\n"
6479 "できるようになる。"
6480
6481 #. type: Plain text
6482 #: build/C/man2/mmap2.2:61
6483 msgid ""
6484 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6485 "is returned and I<errno> is set appropriately."
6486 msgstr ""
6487 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6488 "合は -1 が返されて、 I<errno> が適切に設定される。"
6489
6490 #. type: Plain text
6491 #: build/C/man2/mmap2.2:65
6492 msgid "Problem with getting the data from user space."
6493 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6494
6495 #. type: Plain text
6496 #: build/C/man2/mmap2.2:70
6497 msgid ""
6498 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6499 "4096> is not a multiple of the system page size."
6500 msgstr ""
6501 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6502 "4096> がシステムのページサイズの倍数ではない。"
6503
6504 #. type: Plain text
6505 #: build/C/man2/mmap2.2:74
6506 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6507 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6508
6509 #. type: Plain text
6510 #: build/C/man2/mmap2.2:77
6511 msgid "B<mmap2>()  is available since Linux 2.3.31."
6512 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6513
6514 #. type: Plain text
6515 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6516 msgid "This system call is Linux-specific."
6517 msgstr "このシステムコールは Linux 独自である。"
6518
6519 #. type: Plain text
6520 #: build/C/man2/mmap2.2:86
6521 msgid ""
6522 "On architectures where this system call is present, the glibc B<mmap>()  "
6523 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6524 "call."
6525 msgstr ""
6526 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6527 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6528 "(B<mmap2>(2))  を起動する。"
6529
6530 #. type: Plain text
6531 #: build/C/man2/mmap2.2:88
6532 msgid "This system call does not exist on x86-64."
6533 msgstr "このシステムコールは x86-64 には存在しない。"
6534
6535 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6536 #.  On cris, it looks like the unit might also be the page size,
6537 #.  which is 8192 bytes. -- mtk, June 2007
6538 #. type: Plain text
6539 #: build/C/man2/mmap2.2:95
6540 msgid ""
6541 "On ia64, the unit for I<offset> is actually the system page size, rather "
6542 "than 4096 bytes."
6543 msgstr ""
6544 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6545 "バイトではない。"
6546
6547 #. type: Plain text
6548 #: build/C/man2/mmap2.2:101
6549 msgid ""
6550 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6551 msgstr ""
6552 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6553
6554 #. type: TH
6555 #: build/C/man2/mprotect.2:39
6556 #, no-wrap
6557 msgid "MPROTECT"
6558 msgstr "MPROTECT"
6559
6560 #. type: TH
6561 #: build/C/man2/mprotect.2:39
6562 #, no-wrap
6563 msgid "2014-01-05"
6564 msgstr "2014-01-05"
6565
6566 #. type: Plain text
6567 #: build/C/man2/mprotect.2:42
6568 msgid "mprotect - set protection on a region of memory"
6569 msgstr "mprotect - メモリ領域の保護を設定する"
6570
6571 #. type: Plain text
6572 #: build/C/man2/mprotect.2:47
6573 #, no-wrap
6574 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6575 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6576
6577 #. type: Plain text
6578 #: build/C/man2/mprotect.2:55
6579 msgid ""
6580 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6581 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6582 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6583 msgstr ""
6584 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6585 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6586 "界に一致していなければならない。"
6587
6588 #. type: Plain text
6589 #: build/C/man2/mprotect.2:60
6590 msgid ""
6591 "If the calling process tries to access memory in a manner that violates the "
6592 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6593 msgstr ""
6594 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6595 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6596
6597 #. type: Plain text
6598 #: build/C/man2/mprotect.2:65
6599 msgid ""
6600 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6601 "following list:"
6602 msgstr ""
6603 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6604 "毎の論理和 (bitwize-or) で指定する:"
6605
6606 #. type: Plain text
6607 #: build/C/man2/mprotect.2:68
6608 msgid "The memory cannot be accessed at all."
6609 msgstr "そのメモリには全くアクセスできない。"
6610
6611 #. type: Plain text
6612 #: build/C/man2/mprotect.2:71
6613 msgid "The memory can be read."
6614 msgstr "そのメモリを読み取ることができる。"
6615
6616 #. type: Plain text
6617 #: build/C/man2/mprotect.2:74
6618 msgid "The memory can be modified."
6619 msgstr "そのメモリを変更できる。"
6620
6621 #. type: Plain text
6622 #: build/C/man2/mprotect.2:77
6623 msgid "The memory can be executed."
6624 msgstr "そのメモリは実行可能である。"
6625
6626 #. type: Plain text
6627 #: build/C/man2/mprotect.2:84
6628 msgid ""
6629 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6630 "I<errno> is set appropriately."
6631 msgstr ""
6632 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6633 "I<errno> が適切に設定される。"
6634
6635 #. type: Plain text
6636 #: build/C/man2/mprotect.2:94
6637 msgid ""
6638 "The memory cannot be given the specified access.  This can happen, for "
6639 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6640 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6641 msgstr ""
6642 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6643 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6644 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6645
6646 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6647 #. type: Plain text
6648 #: build/C/man2/mprotect.2:99
6649 msgid ""
6650 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6651 msgstr ""
6652 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6653
6654 #. type: Plain text
6655 #: build/C/man2/mprotect.2:102
6656 msgid "Internal kernel structures could not be allocated."
6657 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6658
6659 #. type: Plain text
6660 #: build/C/man2/mprotect.2:112
6661 msgid ""
6662 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6663 "address space of the process, or specify one or more pages that are not "
6664 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6665 "for these cases.)"
6666 msgstr ""
6667 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6668 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6669 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6670 "成されていた)。"
6671
6672 #.  SVr4 defines an additional error
6673 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6674 #. type: Plain text
6675 #: build/C/man2/mprotect.2:121
6676 msgid ""
6677 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6678 "unspecified if it is applied to a region of memory that was not obtained via "
6679 "B<mmap>(2)."
6680 msgstr ""
6681 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6682 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6683 "されている。"
6684
6685 #. type: Plain text
6686 #: build/C/man2/mprotect.2:128
6687 msgid ""
6688 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6689 "process's address space (except for the kernel vsyscall area).  In "
6690 "particular it can be used to change existing code mappings to be writable."
6691 msgstr ""
6692 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6693 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6694 "マッピングを書き込み可能にするために使われる。"
6695
6696 #. type: Plain text
6697 #: build/C/man2/mprotect.2:138
6698 msgid ""
6699 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6700 "architecture- and kernel version-dependent.  On some hardware architectures "
6701 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6702 msgstr ""
6703 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6704 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6705 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6706
6707 #. type: Plain text
6708 #: build/C/man2/mprotect.2:147
6709 msgid ""
6710 "POSIX.1-2001 says that an implementation may permit access other than that "
6711 "specified in I<prot>, but at a minimum can allow write access only if "
6712 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6713 "has been set."
6714 msgstr ""
6715 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6716 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6717 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6718 "ない点だけは 満たす必要がある。"
6719
6720 #. type: Plain text
6721 #: build/C/man2/mprotect.2:153
6722 msgid ""
6723 "The program below allocates four pages of memory, makes the third of these "
6724 "pages read-only, and then executes a loop that walks upward through the "
6725 "allocated region modifying bytes."
6726 msgstr ""
6727 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6728 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6729 "かって順番にバイト値を変更するループを実行する。"
6730
6731 #. type: Plain text
6732 #: build/C/man2/mprotect.2:156
6733 msgid ""
6734 "An example of what we might see when running the program is the following:"
6735 msgstr "プログラムを実行した場合の一例を以下に示す。"
6736
6737 #. type: Plain text
6738 #: build/C/man2/mprotect.2:162
6739 #, no-wrap
6740 msgid ""
6741 "$B< ./a.out>\n"
6742 "Start of region:        0x804c000\n"
6743 "Got SIGSEGV at address: 0x804e000\n"
6744 msgstr ""
6745 "$B< ./a.out>\n"
6746 "Start of region:        0x804c000\n"
6747 "Got SIGSEGV at address: 0x804e000\n"
6748
6749 #. type: Plain text
6750 #: build/C/man2/mprotect.2:174
6751 #, no-wrap
6752 msgid ""
6753 "#include E<lt>unistd.hE<gt>\n"
6754 "#include E<lt>signal.hE<gt>\n"
6755 "#include E<lt>stdio.hE<gt>\n"
6756 "#include E<lt>malloc.hE<gt>\n"
6757 "#include E<lt>stdlib.hE<gt>\n"
6758 "#include E<lt>errno.hE<gt>\n"
6759 "#include E<lt>sys/mman.hE<gt>\n"
6760 msgstr ""
6761 "#include E<lt>unistd.hE<gt>\n"
6762 "#include E<lt>signal.hE<gt>\n"
6763 "#include E<lt>stdio.hE<gt>\n"
6764 "#include E<lt>malloc.hE<gt>\n"
6765 "#include E<lt>stdlib.hE<gt>\n"
6766 "#include E<lt>errno.hE<gt>\n"
6767 "#include E<lt>sys/mman.hE<gt>\n"
6768
6769 #. type: Plain text
6770 #: build/C/man2/mprotect.2:179
6771 #, no-wrap
6772 msgid "static char *buffer;\n"
6773 msgstr "static char *buffer;\n"
6774
6775 #. type: Plain text
6776 #: build/C/man2/mprotect.2:187
6777 #, no-wrap
6778 msgid ""
6779 "static void\n"
6780 "handler(int sig, siginfo_t *si, void *unused)\n"
6781 "{\n"
6782 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6783 "            (long) si-E<gt>si_addr);\n"
6784 "    exit(EXIT_FAILURE);\n"
6785 "}\n"
6786 msgstr ""
6787 "static void\n"
6788 "handler(int sig, siginfo_t *si, void *unused)\n"
6789 "{\n"
6790 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6791 "            (long) si-E<gt>si_addr);\n"
6792 "    exit(EXIT_FAILURE);\n"
6793 "}\n"
6794
6795 #. type: Plain text
6796 #: build/C/man2/mprotect.2:194
6797 #, no-wrap
6798 msgid ""
6799 "int\n"
6800 "main(int argc, char *argv[])\n"
6801 "{\n"
6802 "    char *p;\n"
6803 "    int pagesize;\n"
6804 "    struct sigaction sa;\n"
6805 msgstr ""
6806 "int\n"
6807 "main(void)\n"
6808 "{\n"
6809 "    char *p;\n"
6810 "    int pagesize;\n"
6811 "    struct sigaction sa;\n"
6812
6813 #. type: Plain text
6814 #: build/C/man2/mprotect.2:200
6815 #, no-wrap
6816 msgid ""
6817 "    sa.sa_flags = SA_SIGINFO;\n"
6818 "    sigemptyset(&sa.sa_mask);\n"
6819 "    sa.sa_sigaction = handler;\n"
6820 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6821 "        handle_error(\"sigaction\");\n"
6822 msgstr ""
6823 "    sa.sa_flags = SA_SIGINFO;\n"
6824 "    sigemptyset(&sa.sa_mask);\n"
6825 "    sa.sa_sigaction = handler;\n"
6826 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6827 "        handle_error(\"sigaction\");\n"
6828
6829 #. type: Plain text
6830 #: build/C/man2/mprotect.2:204
6831 #, no-wrap
6832 msgid ""
6833 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6834 "    if (pagesize == -1)\n"
6835 "        handle_error(\"sysconf\");\n"
6836 msgstr ""
6837 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6838 "    if (pagesize == -1)\n"
6839 "        handle_error(\"sysconf\");\n"
6840
6841 #. type: Plain text
6842 #: build/C/man2/mprotect.2:207
6843 #, no-wrap
6844 msgid ""
6845 "    /* Allocate a buffer aligned on a page boundary;\n"
6846 "       initial protection is PROT_READ | PROT_WRITE */\n"
6847 msgstr ""
6848 "    /* Allocate a buffer aligned on a page boundary;\n"
6849 "       initial protection is PROT_READ | PROT_WRITE */\n"
6850
6851 #. type: Plain text
6852 #: build/C/man2/mprotect.2:211
6853 #, no-wrap
6854 msgid ""
6855 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6856 "    if (buffer == NULL)\n"
6857 "        handle_error(\"memalign\");\n"
6858 msgstr ""
6859 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6860 "    if (buffer == NULL)\n"
6861 "        handle_error(\"memalign\");\n"
6862
6863 #. type: Plain text
6864 #: build/C/man2/mprotect.2:213
6865 #, no-wrap
6866 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6867 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6868
6869 #. type: Plain text
6870 #: build/C/man2/mprotect.2:217
6871 #, no-wrap
6872 msgid ""
6873 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6874 "                PROT_READ) == -1)\n"
6875 "        handle_error(\"mprotect\");\n"
6876 msgstr ""
6877 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6878 "                PROT_READ) == -1)\n"
6879 "        handle_error(\"mprotect\");\n"
6880
6881 #. type: Plain text
6882 #: build/C/man2/mprotect.2:220
6883 #, no-wrap
6884 msgid ""
6885 "    for (p = buffer ; ; )\n"
6886 "        *(p++) = \\(aqa\\(aq;\n"
6887 msgstr ""
6888 "    for (p = buffer ; ; )\n"
6889 "        *(p++) = \\(aqa\\(aq;\n"
6890
6891 #. type: Plain text
6892 #: build/C/man2/mprotect.2:224
6893 #, no-wrap
6894 msgid ""
6895 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6896 "    exit(EXIT_SUCCESS);\n"
6897 "}\n"
6898 msgstr ""
6899 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6900 "    exit(EXIT_SUCCESS);\n"
6901 "}\n"
6902
6903 #. type: Plain text
6904 #: build/C/man2/mprotect.2:228
6905 msgid "B<mmap>(2), B<sysconf>(3)"
6906 msgstr "B<mmap>(2), B<sysconf>(3)"
6907
6908 #. type: TH
6909 #: build/C/man2/mremap.2:30
6910 #, no-wrap
6911 msgid "MREMAP"
6912 msgstr "MREMAP"
6913
6914 #. type: TH
6915 #: build/C/man2/mremap.2:30
6916 #, no-wrap
6917 msgid "2010-06-10"
6918 msgstr "2010-06-10"
6919
6920 #. type: Plain text
6921 #: build/C/man2/mremap.2:33
6922 msgid "mremap - remap a virtual memory address"
6923 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6924
6925 #. type: Plain text
6926 #: build/C/man2/mremap.2:36
6927 #, no-wrap
6928 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6929 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6930
6931 #. type: Plain text
6932 #: build/C/man2/mremap.2:41
6933 #, no-wrap
6934 msgid ""
6935 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6936 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6937 msgstr ""
6938 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6939 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6940
6941 #. type: Plain text
6942 #: build/C/man2/mremap.2:47
6943 msgid ""
6944 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6945 "moving it at the same time (controlled by the I<flags> argument and the "
6946 "available virtual address space)."
6947 msgstr ""
6948 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6949 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6950 "る)。"
6951
6952 #. type: Plain text
6953 #: build/C/man2/mremap.2:61
6954 msgid ""
6955 "I<old_address> is the old address of the virtual memory block that you want "
6956 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6957 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6958 "requested size of the virtual memory block after the resize.  An optional "
6959 "fifth argument, I<new_address>, may be provided; see the description of "
6960 "B<MREMAP_FIXED> below."
6961 msgstr ""
6962 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6963 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6964 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6965 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6966 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6967 "明を参照のこと。"
6968
6969 #. type: Plain text
6970 #: build/C/man2/mremap.2:73
6971 msgid ""
6972 "In Linux the memory is divided into pages.  A user process has (one or)  "
6973 "several linear virtual memory segments.  Each virtual memory segment has one "
6974 "or more mappings to real memory pages (in the page table).  Each virtual "
6975 "memory segment has its own protection (access rights), which may cause a "
6976 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6977 "to a read-only segment).  Accessing virtual memory outside of the segments "
6978 "will also cause a segmentation violation."
6979 msgstr ""
6980 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6981 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6982 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6983 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6984 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6985 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6986 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6987 "ン侵害が発生する。"
6988
6989 #. type: Plain text
6990 #: build/C/man2/mremap.2:81
6991 msgid ""
6992 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6993 "mapping between virtual addresses and memory pages.  This can be used to "
6994 "implement a very efficient B<realloc>(3)."
6995 msgstr ""
6996 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6997 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6998 "B<realloc>(3)  を実装するのに使用されている。"
6999
7000 #. type: Plain text
7001 #: build/C/man2/mremap.2:83
7002 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7003 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7004
7005 #. type: TP
7006 #: build/C/man2/mremap.2:83
7007 #, no-wrap
7008 msgid "B<MREMAP_MAYMOVE>"
7009 msgstr "B<MREMAP_MAYMOVE>"
7010
7011 #. type: Plain text
7012 #: build/C/man2/mremap.2:95
7013 msgid ""
7014 "By default, if there is not sufficient space to expand a mapping at its "
7015 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7016 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7017 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7018 "mapping location become invalid (offsets relative to the starting address of "
7019 "the mapping should be employed)."
7020 msgstr ""
7021 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7022 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7023 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7024 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
7025 "レスからの相対オフセットは有効のままである)。"
7026
7027 #. type: TP
7028 #: build/C/man2/mremap.2:95
7029 #, no-wrap
7030 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7031 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7032
7033 #. type: Plain text
7034 #: build/C/man2/mremap.2:117
7035 msgid ""
7036 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7037 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7038 "\\ *new_address>, which specifies a page-aligned address to which the "
7039 "mapping must be moved.  Any previous mapping at the address range specified "
7040 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7041 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7042 msgstr ""
7043 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7044 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7045 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7046 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7047 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7048 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7049 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7050
7051 #. type: Plain text
7052 #: build/C/man2/mremap.2:127
7053 msgid ""
7054 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7055 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7056 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7057 "locked by the process may change."
7058 msgstr ""
7059 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
7060 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
7061 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
7062 "の量は変化する。"
7063
7064 #. type: Plain text
7065 #: build/C/man2/mremap.2:135
7066 msgid ""
7067 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7068 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7069 "and I<errno> is set appropriately."
7070 msgstr ""
7071 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
7072 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
7073 "切に設定される。"
7074
7075 #. type: Plain text
7076 #: build/C/man2/mremap.2:142
7077 msgid ""
7078 "The caller tried to expand a memory segment that is locked, but this was not "
7079 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7080 msgstr ""
7081 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
7082 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7083
7084 #. type: Plain text
7085 #: build/C/man2/mremap.2:151
7086 msgid ""
7087 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7088 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7089 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7090 "the whole address space requested, but those mappings are of different types."
7091 msgstr ""
7092 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7093 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7094 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
7095 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7096 "を受け取るだろう。"
7097
7098 #. type: Plain text
7099 #: build/C/man2/mremap.2:179
7100 msgid ""
7101 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7102 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7103 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7104 "was invalid; or the new address range specified by I<new_address> and "
7105 "I<new_size> overlapped the old address range specified by I<old_address> and "
7106 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7107 "B<MREMAP_MAYMOVE>."
7108 msgstr ""
7109 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7110 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7111 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7112 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7113 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7114 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7115 "されていない。"
7116
7117 #. type: Plain text
7118 #: build/C/man2/mremap.2:185
7119 msgid ""
7120 "The memory area cannot be expanded at the current virtual address, and the "
7121 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7122 "(virtual) memory available."
7123 msgstr ""
7124 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7125 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
7126
7127 #.  4.2BSD had a (never actually implemented)
7128 #.  .BR mremap (2)
7129 #.  call with completely different semantics.
7130 #. type: Plain text
7131 #: build/C/man2/mremap.2:191
7132 msgid ""
7133 "This call is Linux-specific, and should not be used in programs intended to "
7134 "be portable."
7135 msgstr ""
7136 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7137 "い。"
7138
7139 #. type: Plain text
7140 #: build/C/man2/mremap.2:199
7141 msgid ""
7142 "Prior to version 2.4, glibc did not expose the definition of "
7143 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7144 "I<new_address> argument."
7145 msgstr ""
7146 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7147 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7148
7149 #. type: Plain text
7150 #: build/C/man2/mremap.2:208
7151 msgid ""
7152 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7153 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7154 msgstr ""
7155 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7156 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7157
7158 #. type: Plain text
7159 #: build/C/man2/mremap.2:214
7160 msgid ""
7161 "Your favorite text book on operating systems for more information on paged "
7162 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7163 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7164 "Maurice J. Bach)"
7165 msgstr ""
7166 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7167 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7168 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7169 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7170
7171 #. type: TH
7172 #: build/C/man2/msync.2:25
7173 #, no-wrap
7174 msgid "MSYNC"
7175 msgstr "MSYNC"
7176
7177 #. type: TH
7178 #: build/C/man2/msync.2:25
7179 #, no-wrap
7180 msgid "2014-04-20"
7181 msgstr "2014-04-20"
7182
7183 #. type: Plain text
7184 #: build/C/man2/msync.2:28
7185 msgid "msync - synchronize a file with a memory map"
7186 msgstr "msync - ファイルをマップしたメモリと同期させる"
7187
7188 #. type: Plain text
7189 #: build/C/man2/msync.2:32
7190 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7191 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7192
7193 #. type: Plain text
7194 #: build/C/man2/msync.2:48
7195 msgid ""
7196 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7197 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7198 "this call there is no guarantee that changes are written back before "
7199 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7200 "corresponds to the memory area starting at I<addr> and having length "
7201 "I<length> is updated."
7202 msgstr ""
7203 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7204 "のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しない"
7205 "と、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確"
7206 "には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する"
7207 "部分が更新される。"
7208
7209 #. type: Plain text
7210 #: build/C/man2/msync.2:68
7211 msgid ""
7212 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7213 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7214 "specifies that an update be scheduled, but the call returns immediately.  "
7215 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7216 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7217 "they can be updated with the fresh values just written)."
7218 msgstr ""
7219 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7220 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7221 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7222 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7223 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7224 "に対する他のマッピングを無効にすることを要求する。"
7225
7226 #. type: Plain text
7227 #: build/C/man2/msync.2:73
7228 msgid ""
7229 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7230 "appropriately."
7231 msgstr ""
7232 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7233 "る。"
7234
7235 #. type: TP
7236 #: build/C/man2/msync.2:74
7237 #, no-wrap
7238 msgid "B<EBUSY>"
7239 msgstr "B<EBUSY>"
7240
7241 #. type: Plain text
7242 #: build/C/man2/msync.2:80
7243 msgid ""
7244 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7245 "specified address range."
7246 msgstr ""
7247 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7248 "存在する。"
7249
7250 #. type: Plain text
7251 #: build/C/man2/msync.2:93
7252 msgid ""
7253 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7254 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7255 "B<MS_ASYNC> are set in I<flags>."
7256 msgstr ""
7257 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7258 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7259 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7260
7261 #. type: Plain text
7262 #: build/C/man2/msync.2:96
7263 msgid "The indicated memory (or part of it) was not mapped."
7264 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7265
7266 #. type: Plain text
7267 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7268 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7269 msgid "POSIX.1-2001."
7270 msgstr "POSIX.1-2001."
7271
7272 #. type: Plain text
7273 #: build/C/man2/msync.2:105
7274 msgid ""
7275 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7276 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7277 msgstr ""
7278 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7279 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7280
7281 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7282 #.  -1: unavailable, 0: ask using sysconf().
7283 #.  glibc defines them to 1.
7284 #. type: Plain text
7285 #: build/C/man2/msync.2:120
7286 msgid ""
7287 "On POSIX systems on which B<msync>()  is available, both "
7288 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7289 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7290 msgstr ""
7291 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7292 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7293 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7294
7295 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7296 #. type: Plain text
7297 #: build/C/man2/msync.2:147
7298 msgid ""
7299 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7300 "I<flags>, and indeed failure to include one of these flags will cause "
7301 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7302 "B<msync>()  that specifies neither of these flags, with semantics that are "
7303 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7304 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7305 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7306 "behavior, portable, future-proof applications should ensure that they "
7307 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7308 msgstr ""
7309 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7310 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7311 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7312 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7313 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7314 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7315 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7316 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7317 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7318 "指定するようにすべきである。"
7319
7320 #. type: TP
7321 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7322 #, no-wrap
7323 msgid "B<mmap>(2)"
7324 msgstr "B<mmap>(2)"
7325
7326 #. type: TH
7327 #: build/C/man3/mtrace.3:25
7328 #, no-wrap
7329 msgid "MTRACE"
7330 msgstr "MTRACE"
7331
7332 #. type: TH
7333 #: build/C/man3/mtrace.3:25
7334 #, no-wrap
7335 msgid "2012-04-18"
7336 msgstr "2012-04-18"
7337
7338 #. type: Plain text
7339 #: build/C/man3/mtrace.3:28
7340 msgid "mtrace, muntrace - malloc tracing"
7341 msgstr "mtrace, muntrace - malloc のトレース"
7342
7343 #. type: Plain text
7344 #: build/C/man3/mtrace.3:30
7345 msgid "B<#include E<lt>mcheck.hE<gt>>"
7346 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7347
7348 #. type: Plain text
7349 #: build/C/man3/mtrace.3:32
7350 msgid "B<void mtrace(void);>"
7351 msgstr "B<void mtrace(void);>"
7352
7353 #. type: Plain text
7354 #: build/C/man3/mtrace.3:34
7355 msgid "B<void muntrace(void);>"
7356 msgstr "B<void muntrace(void);>"
7357
7358 #. type: Plain text
7359 #: build/C/man3/mtrace.3:46
7360 msgid ""
7361 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7362 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7363 "hook functions record tracing information about memory allocation and "
7364 "deallocation.  The tracing information can be used to discover memory leaks "
7365 "and attempts to free nonallocated memory in a program."
7366 msgstr ""
7367
7368 #. type: Plain text
7369 #: build/C/man3/mtrace.3:57
7370 msgid ""
7371 "The B<muntrace>()  function disables the hook functions installed by "
7372 "B<mtrace>(), so that tracing information is no longer recorded for the "
7373 "memory-allocation functions.  If no hook functions were successfully "
7374 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7375 msgstr ""
7376
7377 #. type: Plain text
7378 #: build/C/man3/mtrace.3:65
7379 msgid ""
7380 "When B<mtrace>()  is called, it checks the value of the environment variable "
7381 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7382 "tracing information is to be recorded.  If the pathname is successfully "
7383 "opened, it is truncated to zero length."
7384 msgstr ""
7385
7386 #. type: Plain text
7387 #: build/C/man3/mtrace.3:78
7388 msgid ""
7389 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7390 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7391 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7392 "ignored, and B<mtrace>()  has no effect."
7393 msgstr ""
7394
7395 #. type: Plain text
7396 #: build/C/man3/mtrace.3:86
7397 msgid ""
7398 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7399 "program, and B<muntrace>()  is never called."
7400 msgstr ""
7401
7402 #. type: Plain text
7403 #: build/C/man3/mtrace.3:96
7404 msgid ""
7405 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7406 "designed to be human readable.  The GNU C library provides a Perl script, "
7407 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7408 "output.  For best results, the traced program should be compiled with "
7409 "debugging enabled, so that line-number information is recorded in the "
7410 "executable."
7411 msgstr ""
7412
7413 #. type: Plain text
7414 #: build/C/man3/mtrace.3:102
7415 msgid ""
7416 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7417 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7418 msgstr ""
7419
7420 #. type: Plain text
7421 #: build/C/man3/mtrace.3:108
7422 msgid ""
7423 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7424 "the line number references may refer to the previous or following "
7425 "(nonblank)  line of the source code."
7426 msgstr ""
7427
7428 #. type: Plain text
7429 #: build/C/man3/mtrace.3:115
7430 msgid ""
7431 "The shell session below demonstrates the use of the B<mtrace>()  function "
7432 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7433 "different locations.  The demonstration uses the following program:"
7434 msgstr ""
7435
7436 #. type: Plain text
7437 #: build/C/man3/mtrace.3:122
7438 #, no-wrap
7439 msgid ""
7440 "$ B<cat t_mtrace.c>\n"
7441 "#include E<lt>mcheck.hE<gt>\n"
7442 "#include E<lt>stdlib.hE<gt>\n"
7443 "#include E<lt>stdio.hE<gt>\n"
7444 msgstr ""
7445 "$ B<cat t_mtrace.c>\n"
7446 "#include E<lt>mcheck.hE<gt>\n"
7447 "#include E<lt>stdlib.hE<gt>\n"
7448 "#include E<lt>stdio.hE<gt>\n"
7449
7450 #. type: Plain text
7451 #: build/C/man3/mtrace.3:127
7452 #, no-wrap
7453 msgid ""
7454 "int\n"
7455 "main(int argc, char *argv[])\n"
7456 "{\n"
7457 "    int j;\n"
7458 msgstr ""
7459 "int\n"
7460 "main(int argc, char *argv[])\n"
7461 "{\n"
7462 "    int j;\n"
7463
7464 #. type: Plain text
7465 #: build/C/man3/mtrace.3:129
7466 #, no-wrap
7467 msgid "    mtrace();\n"
7468 msgstr "    mtrace();\n"
7469
7470 #. type: Plain text
7471 #: build/C/man3/mtrace.3:132
7472 #, no-wrap
7473 msgid ""
7474 "    for (j = 0; j E<lt> 2; j++)\n"
7475 "        malloc(100);            /* Never freed--a memory leak */\n"
7476 msgstr ""
7477 "    for (j = 0; j E<lt> 2; j++)\n"
7478 "        malloc(100);            /* Never freed--a memory leak */\n"
7479
7480 #. type: Plain text
7481 #: build/C/man3/mtrace.3:136
7482 #, no-wrap
7483 msgid ""
7484 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7485 "    exit(EXIT_SUCCESS);\n"
7486 "}\n"
7487 msgstr ""
7488 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7489 "    exit(EXIT_SUCCESS);\n"
7490 "}\n"
7491
7492 #. type: Plain text
7493 #: build/C/man3/mtrace.3:142
7494 msgid ""
7495 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7496 "memory leaks at two different locations in the program:"
7497 msgstr ""
7498
7499 #. type: Plain text
7500 #: build/C/man3/mtrace.3:155
7501 #, no-wrap
7502 msgid ""
7503 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7504 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7505 "$ B<./t_mtrace>\n"
7506 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7507 "Memory not freed:\n"
7508 "-----------------\n"
7509 "   Address     Size     Caller\n"
7510 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7511 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7512 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7513 msgstr ""
7514 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7515 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7516 "$ B<./t_mtrace>\n"
7517 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7518 "Memory not freed:\n"
7519 "-----------------\n"
7520 "   Address     Size     Caller\n"
7521 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7522 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7523 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7524
7525 #. type: Plain text
7526 #: build/C/man3/mtrace.3:167
7527 msgid ""
7528 "The first two messages about unfreed memory correspond to the two "
7529 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7530 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7531 msgstr ""
7532
7533 #. type: Plain text
7534 #: build/C/man3/mtrace.3:172
7535 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7536 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7537
7538 #. type: TH
7539 #: build/C/man2/posix_fadvise.2:28
7540 #, no-wrap
7541 msgid "POSIX_FADVISE"
7542 msgstr "POSIX_FADVISE"
7543
7544 #. type: Plain text
7545 #: build/C/man2/posix_fadvise.2:31
7546 msgid "posix_fadvise - predeclare an access pattern for file data"
7547 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7548
7549 #. type: Plain text
7550 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7551 #, no-wrap
7552 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7553 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7554
7555 #. type: Plain text
7556 #: build/C/man2/posix_fadvise.2:37
7557 #, no-wrap
7558 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7559 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7560
7561 #. type: Plain text
7562 #: build/C/man2/posix_fadvise.2:46
7563 msgid "B<posix_fadvise>():"
7564 msgstr "B<posix_fadvise>():"
7565
7566 #. type: Plain text
7567 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7568 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7569 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7570
7571 #. type: Plain text
7572 #: build/C/man2/posix_fadvise.2:56
7573 msgid ""
7574 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7575 "data in a specific pattern in the future, thus allowing the kernel to "
7576 "perform appropriate optimizations."
7577 msgstr ""
7578 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7579 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7580 "適化を実行することが可能になる。"
7581
7582 #. type: Plain text
7583 #: build/C/man2/posix_fadvise.2:63
7584 msgid ""
7585 "The I<advice> applies to a (not necessarily existent) region starting at "
7586 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7587 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7588 "binding; it merely constitutes an expectation on behalf of the application."
7589 msgstr ""
7590 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7591 "イ\n"
7592 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7593 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7594 "ケー\n"
7595 "ションのために可能性を構成するだけである。"
7596
7597 #. type: Plain text
7598 #: build/C/man2/posix_fadvise.2:65
7599 msgid "Permissible values for I<advice> include:"
7600 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7601
7602 #. type: TP
7603 #: build/C/man2/posix_fadvise.2:65
7604 #, no-wrap
7605 msgid "B<POSIX_FADV_NORMAL>"
7606 msgstr "B<POSIX_FADV_NORMAL>"
7607
7608 #. type: Plain text
7609 #: build/C/man2/posix_fadvise.2:71
7610 msgid ""
7611 "Indicates that the application has no advice to give about its access "
7612 "pattern for the specified data.  If no advice is given for an open file, "
7613 "this is the default assumption."
7614 msgstr ""
7615 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7616 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7617 "合、 これがデフォルトで仮定される。"
7618
7619 #. type: TP
7620 #: build/C/man2/posix_fadvise.2:71
7621 #, no-wrap
7622 msgid "B<POSIX_FADV_SEQUENTIAL>"
7623 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7624
7625 #. type: Plain text
7626 #: build/C/man2/posix_fadvise.2:75
7627 msgid ""
7628 "The application expects to access the specified data sequentially (with "
7629 "lower offsets read before higher ones)."
7630 msgstr ""
7631 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7632 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7633
7634 #. type: TP
7635 #: build/C/man2/posix_fadvise.2:75
7636 #, no-wrap
7637 msgid "B<POSIX_FADV_RANDOM>"
7638 msgstr "B<POSIX_FADV_RANDOM>"
7639
7640 #. type: Plain text
7641 #: build/C/man2/posix_fadvise.2:78
7642 msgid "The specified data will be accessed in random order."
7643 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7644
7645 #. type: TP
7646 #: build/C/man2/posix_fadvise.2:78
7647 #, no-wrap
7648 msgid "B<POSIX_FADV_NOREUSE>"
7649 msgstr "B<POSIX_FADV_NOREUSE>"
7650
7651 #. type: Plain text
7652 #: build/C/man2/posix_fadvise.2:81
7653 msgid "The specified data will be accessed only once."
7654 msgstr "指定されたデータは 1 度しかアクセスされない。"
7655
7656 #. type: TP
7657 #: build/C/man2/posix_fadvise.2:81
7658 #, no-wrap
7659 msgid "B<POSIX_FADV_WILLNEED>"
7660 msgstr "B<POSIX_FADV_WILLNEED>"
7661
7662 #. type: Plain text
7663 #: build/C/man2/posix_fadvise.2:84
7664 msgid "The specified data will be accessed in the near future."
7665 msgstr "指定されたデータは近い将来アクセスされる。"
7666
7667 #. type: TP
7668 #: build/C/man2/posix_fadvise.2:84
7669 #, no-wrap
7670 msgid "B<POSIX_FADV_DONTNEED>"
7671 msgstr "B<POSIX_FADV_DONTNEED>"
7672
7673 #. type: Plain text
7674 #: build/C/man2/posix_fadvise.2:87
7675 msgid "The specified data will not be accessed in the near future."
7676 msgstr "指定されたデータは近い将来アクセスされない。"
7677
7678 #. type: Plain text
7679 #: build/C/man2/posix_fadvise.2:90
7680 msgid "On success, zero is returned.  On error, an error number is returned."
7681 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7682
7683 #. type: Plain text
7684 #: build/C/man2/posix_fadvise.2:94
7685 msgid "The I<fd> argument was not a valid file descriptor."
7686 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7687
7688 #. type: Plain text
7689 #: build/C/man2/posix_fadvise.2:97
7690 msgid "An invalid value was specified for I<advice>."
7691 msgstr "無効な値が I<advice> に指定された。"
7692
7693 #.  commit 87ba81dba431232548ce29d5d224115d0c2355ac
7694 #. type: Plain text
7695 #: build/C/man2/posix_fadvise.2:107
7696 #, fuzzy
7697 #| msgid ""
7698 #| "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7699 #| "returns B<EINVAL> in this case.)"
7700 msgid ""
7701 "The specified file descriptor refers to a pipe or FIFO.  (B<ESPIPE> is the "
7702 "error specified by POSIX, but before kernel version 2.16, Linux returned "
7703 "B<EINVAL> in this case.)"
7704 msgstr ""
7705 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7706 "合、Linux は実際には B<EINVAL> を返す)。"
7707
7708 #.  of fadvise64_64()
7709 #. type: Plain text
7710 #: build/C/man2/posix_fadvise.2:115
7711 msgid ""
7712 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7713 "called B<fadvise64>().  Library support has been provided since glibc "
7714 "version 2.2, via the wrapper function B<posix_fadvise>()."
7715 msgstr ""
7716 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7717 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7718 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7719 "ラッパー関数は B<posix_fadvise>() という名前である。"
7720
7721 #.  commit d3ac21cacc24790eb45d735769f35753f5b56ceb
7722 #. type: Plain text
7723 #: build/C/man2/posix_fadvise.2:122
7724 msgid ""
7725 "Since Linux 3.18, support for the underlying system call is optional, "
7726 "depending on the setting of the B<CONFIG_ADVISE_SYSCALLS> configuration "
7727 "option."
7728 msgstr ""
7729
7730 #. type: Plain text
7731 #: build/C/man2/posix_fadvise.2:131
7732 msgid ""
7733 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7734 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7735 msgstr ""
7736 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7737 "I<off_t> に変更された点に注意すること。"
7738
7739 #. type: Plain text
7740 #: build/C/man2/posix_fadvise.2:137
7741 msgid ""
7742 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7743 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7744 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7745 "the entire file, not just the specified region (but other open file handles "
7746 "to the same file are unaffected)."
7747 msgstr ""
7748 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7749 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7750 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7751 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7752 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7753
7754 #. type: Plain text
7755 #: build/C/man2/posix_fadvise.2:144
7756 msgid ""
7757 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7758 "into the page cache.  The amount of data read may be decreased by the kernel "
7759 "depending on virtual memory load.  (A few megabytes will usually be fully "
7760 "satisfied, and more is rarely useful.)"
7761 msgstr ""
7762 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7763 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7764 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7765 "くてもめったに役に立たない)。"
7766
7767 #. type: Plain text
7768 #: build/C/man2/posix_fadvise.2:148
7769 msgid ""
7770 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7771 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7772 "flag is a no-op."
7773 msgstr ""
7774 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7775 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7776 "フラグは何も行わない。"
7777
7778 #. type: Plain text
7779 #: build/C/man2/posix_fadvise.2:156
7780 msgid ""
7781 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7782 "specified region.  This is useful, for example, while streaming large "
7783 "files.  A program may periodically request the kernel to free cached data "
7784 "that has already been used, so that more useful cached pages are not "
7785 "discarded instead."
7786 msgstr ""
7787 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7788 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7789 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7790 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7791 "されたページが、 代わりに破棄されることはない。"
7792
7793 #. type: Plain text
7794 #: build/C/man2/posix_fadvise.2:164
7795 msgid ""
7796 "Requests to discard partial pages are ignored.  It is preferable to preserve "
7797 "needed data than discard unneeded data.  If the application requires that "
7798 "data be considered for discarding then I<offset> and I<len> must be page-"
7799 "aligned."
7800 msgstr ""
7801
7802 #. type: Plain text
7803 #: build/C/man2/posix_fadvise.2:172
7804 msgid ""
7805 "Pages that have not yet been written out will be unaffected, so if the "
7806 "application wishes to guarantee that pages will be released, it should call "
7807 "B<fsync>(2)  or B<fdatasync>(2)  first."
7808 msgstr ""
7809 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7810 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7811 "B<fdatasync>(2)  を呼ぶべきである。"
7812
7813 #. type: SS
7814 #: build/C/man2/posix_fadvise.2:172
7815 #, no-wrap
7816 msgid "Architecture-specific variants"
7817 msgstr "アーキテクチャ固有の派生バージョン"
7818
7819 #. type: Plain text
7820 #: build/C/man2/posix_fadvise.2:189
7821 msgid ""
7822 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7823 "of registers (see B<syscall>(2)  for further detail).  On such "
7824 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7825 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7826 "and I<offset> arguments.  Therefore, these architectures define a version of "
7827 "the system call that orders the arguments suitably, but otherwise is "
7828 "otherwise exactly the same as B<posix_fadvise>()."
7829 msgstr ""
7830 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7831 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7832 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7833 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7834 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7835 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7836
7837 #. type: Plain text
7838 #: build/C/man2/posix_fadvise.2:191
7839 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7840 msgstr ""
7841 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7842
7843 #. type: Plain text
7844 #: build/C/man2/posix_fadvise.2:196
7845 #, no-wrap
7846 msgid ""
7847 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7848 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7849 msgstr ""
7850 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7851 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7852
7853 #. type: Plain text
7854 #: build/C/man2/posix_fadvise.2:204
7855 msgid ""
7856 "These architecture-specific details are generally hidden from applications "
7857 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7858 "appropriate architecture-specific system call."
7859 msgstr ""
7860 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7861 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7862 "なアーキテクチャ固有のシステムコールが呼び出される。"
7863
7864 #. type: Plain text
7865 #: build/C/man2/posix_fadvise.2:209
7866 msgid ""
7867 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7868 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7869 "through to the end of the file\"."
7870 msgstr ""
7871 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7872 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7873 "いた。"
7874
7875 #.  FIXME . Write a posix_fadvise(3) page.
7876 #. type: Plain text
7877 #: build/C/man2/posix_fadvise.2:215
7878 msgid ""
7879 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7880 "B<posix_madvise>(3)"
7881 msgstr ""
7882 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7883 "B<posix_madvise>(3)"
7884
7885 #. type: TH
7886 #: build/C/man3/posix_fallocate.3:25
7887 #, no-wrap
7888 msgid "POSIX_FALLOCATE"
7889 msgstr "POSIX_FALLOCATE"
7890
7891 #. type: TH
7892 #: build/C/man3/posix_fallocate.3:25
7893 #, no-wrap
7894 msgid "2014-06-03"
7895 msgstr "2014-06-03"
7896
7897 #. type: Plain text
7898 #: build/C/man3/posix_fallocate.3:28
7899 msgid "posix_fallocate - allocate file space"
7900 msgstr "posix_fallocate - ファイルのスペースを確保する"
7901
7902 #. type: Plain text
7903 #: build/C/man3/posix_fallocate.3:33
7904 #, no-wrap
7905 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7906 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7907
7908 #. type: Plain text
7909 #: build/C/man3/posix_fallocate.3:42
7910 msgid "B<posix_fallocate>():"
7911 msgstr "B<posix_fallocate>():"
7912
7913 #. type: Plain text
7914 #: build/C/man3/posix_fallocate.3:61
7915 msgid ""
7916 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7917 "the file referred to by the descriptor I<fd> for the bytes in the range "
7918 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7919 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7920 "range are guaranteed not to fail because of lack of disk space."
7921 msgstr ""
7922 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7923 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7924 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7925 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7926 "失敗しないことが保証される。"
7927
7928 #. type: Plain text
7929 #: build/C/man3/posix_fallocate.3:66
7930 msgid ""
7931 "If the size of the file is less than I<offset>+I<len>, then the file is "
7932 "increased to this size; otherwise the file size is left unchanged."
7933 msgstr ""
7934 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7935 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7936
7937 #. type: Plain text
7938 #: build/C/man3/posix_fallocate.3:72
7939 msgid ""
7940 "B<posix_fallocate>()  returns zero on success, or an error number on "
7941 "failure.  Note that I<errno> is not set."
7942 msgstr ""
7943 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7944 "す。 I<errno> が設定されない点に注意すること。"
7945
7946 #. type: Plain text
7947 #: build/C/man3/posix_fallocate.3:81
7948 msgid "I<offset+len> exceeds the maximum file size."
7949 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7950
7951 #. type: Plain text
7952 #: build/C/man3/posix_fallocate.3:91
7953 msgid "I<fd> does not refer to a regular file."
7954 msgstr "I<fd> が通常のファイルとして参照されていない。"
7955
7956 #. type: Plain text
7957 #: build/C/man3/posix_fallocate.3:100
7958 msgid "I<fd> refers to a pipe."
7959 msgstr "I<fd> がパイプを参照している。"
7960
7961 #. type: Plain text
7962 #: build/C/man3/posix_fallocate.3:103
7963 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7964 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7965
7966 #. type: Plain text
7967 #: build/C/man3/posix_fallocate.3:108
7968 msgid "The B<posix_fallocate>()  function is thread-safe."
7969 msgstr "B<posix_fallocate>() 関数はスレッドセーフである。"
7970
7971 #. type: Plain text
7972 #: build/C/man3/posix_fallocate.3:133
7973 msgid ""
7974 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7975 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7976 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7977 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7978 "zero."
7979 msgstr ""
7980 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7981 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7982 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7983 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7984 "る。"
7985
7986 #. type: Plain text
7987 #: build/C/man3/posix_fallocate.3:138
7988 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7989 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7990
7991 #. type: TH
7992 #: build/C/man3/posix_memalign.3:29
7993 #, no-wrap
7994 msgid "POSIX_MEMALIGN"
7995 msgstr "POSIX_MEMALIGN"
7996
7997 #. type: TH
7998 #: build/C/man3/posix_memalign.3:29
7999 #, no-wrap
8000 msgid "2013-09-02"
8001 msgstr "2013-09-02"
8002
8003 #. type: Plain text
8004 #: build/C/man3/posix_memalign.3:32
8005 msgid ""
8006 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
8007 "memory"
8008 msgstr ""
8009 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
8010 "されたメモリの割り当てを行う"
8011
8012 #. type: Plain text
8013 #: build/C/man3/posix_memalign.3:35
8014 #, no-wrap
8015 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
8016 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
8017
8018 #. type: Plain text
8019 #: build/C/man3/posix_memalign.3:39
8020 #, no-wrap
8021 msgid ""
8022 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8023 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8024 "B<void *valloc(size_t >I<size>B<);>\n"
8025 msgstr ""
8026 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8027 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8028 "B<void *valloc(size_t >I<size>B<);>\n"
8029
8030 #. type: Plain text
8031 #: build/C/man3/posix_memalign.3:44
8032 #, no-wrap
8033 msgid ""
8034 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8035 "B<void *pvalloc(size_t >I<size>B<);>\n"
8036 msgstr ""
8037 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8038 "B<void *pvalloc(size_t >I<size>B<);>\n"
8039
8040 #. type: Plain text
8041 #: build/C/man3/posix_memalign.3:54
8042 msgid ""
8043 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8044 "E<gt>=\\ 600"
8045 msgstr ""
8046 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8047 "E<gt>=\\ 600"
8048
8049 #. type: Plain text
8050 #: build/C/man3/posix_memalign.3:57
8051 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8052 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8053
8054 #. type: Plain text
8055 #: build/C/man3/posix_memalign.3:59
8056 msgid "B<valloc>():"
8057 msgstr "B<valloc>():"
8058
8059 #. type: TP
8060 #: build/C/man3/posix_memalign.3:62
8061 #, no-wrap
8062 msgid "Since glibc 2.12:"
8063 msgstr "glibc 2.12 以降:"
8064
8065 #. type: Plain text
8066 #: build/C/man3/posix_memalign.3:69
8067 #, no-wrap
8068 msgid ""
8069 "_BSD_SOURCE ||\n"
8070 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8071 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8072 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8073 msgstr ""
8074 "_BSD_SOURCE ||\n"
8075 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8076 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8077 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8078
8079 #. type: TP
8080 #: build/C/man3/posix_memalign.3:71
8081 #, no-wrap
8082 msgid "Before glibc 2.12:"
8083 msgstr "glibc 2.12 より前:"
8084
8085 #. type: Plain text
8086 #: build/C/man3/posix_memalign.3:75
8087 msgid ""
8088 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8089 "_XOPEN_SOURCE_EXTENDED"
8090 msgstr ""
8091 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8092 "_XOPEN_SOURCE_EXTENDED"
8093
8094 #. type: Plain text
8095 #: build/C/man3/posix_memalign.3:82
8096 msgid ""
8097 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8098 "declaration of B<valloc>(); no feature test macros are required.)"
8099 msgstr ""
8100 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
8101 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8102
8103 #.  glibc does this:
8104 #. type: Plain text
8105 #: build/C/man3/posix_memalign.3:104
8106 msgid ""
8107 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8108 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8109 "memory will be a multiple of I<alignment>, which must be a power of two and "
8110 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8111 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8112 "successfully passed to B<free>(3)."
8113 msgstr ""
8114 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
8115 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
8116 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
8117 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
8118 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
8119 "B<free>(3)  に問題なく渡すことができる。"
8120
8121 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8122 #.  but no standards govern this.
8123 #. type: Plain text
8124 #: build/C/man3/posix_memalign.3:115
8125 msgid ""
8126 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8127 "pointer to the allocated memory.  The memory address will be a multiple of "
8128 "I<alignment>, which must be a power of two."
8129 msgstr ""
8130 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
8131 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
8132 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8133
8134 #. type: Plain text
8135 #: build/C/man3/posix_memalign.3:124
8136 msgid ""
8137 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8138 "the added restriction that I<size> should be a multiple of I<alignment>."
8139 msgstr ""
8140 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8141 "I<alignment>\n"
8142 "の倍数でなければならないという追加の制限がある点が異なる。"
8143
8144 #. type: Plain text
8145 #: build/C/man3/posix_memalign.3:133
8146 msgid ""
8147 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8148 "pointer to the allocated memory.  The memory address will be a multiple of "
8149 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8150 msgstr ""
8151 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
8152 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
8153 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
8154 "る。"
8155
8156 #. type: Plain text
8157 #: build/C/man3/posix_memalign.3:140
8158 msgid ""
8159 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8160 "the size of the allocation up to the next multiple of the system page size."
8161 msgstr ""
8162 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8163 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8164
8165 #. type: Plain text
8166 #: build/C/man3/posix_memalign.3:142
8167 msgid "For all of these functions, the memory is not zeroed."
8168 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
8169
8170 #. type: Plain text
8171 #: build/C/man3/posix_memalign.3:149
8172 msgid ""
8173 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8174 "pointer to the allocated memory, or NULL if the request fails."
8175 msgstr ""
8176 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8177 "た\n"
8178 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
8179
8180 #. type: Plain text
8181 #: build/C/man3/posix_memalign.3:157
8182 msgid ""
8183 "B<posix_memalign>()  returns zero on success, or one of the error values "
8184 "listed in the next section on failure.  The value of I<errno> is "
8185 "indeterminate after a call to B<posix_memalign>()."
8186 msgstr ""
8187 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8188 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8189 "I<errno> の値は不定である。"
8190
8191 #. type: Plain text
8192 #: build/C/man3/posix_memalign.3:164
8193 msgid ""
8194 "The I<alignment> argument was not a power of two, or was not a multiple of "
8195 "I<sizeof(void\\ *)>."
8196 msgstr ""
8197 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8198 "かった。"
8199
8200 #. type: Plain text
8201 #: build/C/man3/posix_memalign.3:167
8202 msgid "There was insufficient memory to fulfill the allocation request."
8203 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8204
8205 #. type: Plain text
8206 #: build/C/man3/posix_memalign.3:174
8207 msgid ""
8208 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8209 "available in all Linux libc libraries."
8210 msgstr ""
8211 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8212 "すべての Linux libc ライブラリで使用可能である。"
8213
8214 #. type: Plain text
8215 #: build/C/man3/posix_memalign.3:178
8216 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8217 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8218
8219 #. type: Plain text
8220 #: build/C/man3/posix_memalign.3:182
8221 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8222 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8223
8224 #. type: Plain text
8225 #: build/C/man3/posix_memalign.3:189
8226 msgid ""
8227 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8228 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8229 "POSIX.1-2001."
8230 msgstr ""
8231 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8232 "り、\n"
8233 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8234
8235 #. type: Plain text
8236 #: build/C/man3/posix_memalign.3:193
8237 msgid "The function B<pvalloc>()  is a GNU extension."
8238 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8239
8240 #. type: Plain text
8241 #: build/C/man3/posix_memalign.3:197
8242 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8243 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8244
8245 #. type: Plain text
8246 #: build/C/man3/posix_memalign.3:201
8247 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8248 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8249
8250 #. type: Plain text
8251 #: build/C/man3/posix_memalign.3:206
8252 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8253 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8254
8255 #. type: SS
8256 #: build/C/man3/posix_memalign.3:206
8257 #, no-wrap
8258 msgid "Headers"
8259 msgstr "ヘッダ"
8260
8261 #. type: Plain text
8262 #: build/C/man3/posix_memalign.3:210
8263 msgid ""
8264 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8265 "hE<gt>>."
8266 msgstr ""
8267 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8268 "の意見が一致している。"
8269
8270 #. type: Plain text
8271 #: build/C/man3/posix_memalign.3:214
8272 msgid ""
8273 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8274 "of I<E<lt>malloc.hE<gt>>."
8275 msgstr ""
8276 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8277 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8278
8279 #. type: Plain text
8280 #: build/C/man3/posix_memalign.3:221
8281 msgid ""
8282 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8283 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8284 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8285 "above)."
8286 msgstr ""
8287 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8288 "libc4,5\n"
8289 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8290 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8291
8292 #. type: Plain text
8293 #: build/C/man3/posix_memalign.3:230
8294 msgid ""
8295 "On many systems there are alignment restrictions, for example, on buffers "
8296 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8297 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8298 "use B<posix_memalign>()  to satisfy this requirement."
8299 msgstr ""
8300 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8301 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8302 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8303 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8304 "と、この必要条件を満たすことができる。"
8305
8306 #. type: Plain text
8307 #: build/C/man3/posix_memalign.3:239
8308 msgid ""
8309 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8310 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8311 "is correct."
8312 msgstr ""
8313 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8314 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8315 "確認を行わないかもしれない。"
8316
8317 #.  Other systems allow passing the result of
8318 #.  .IR valloc ()
8319 #.  to
8320 #.  .IR free (3),
8321 #.  but not to
8322 #.  .IR realloc (3).
8323 #. type: Plain text
8324 #: build/C/man3/posix_memalign.3:267
8325 msgid ""
8326 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8327 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8328 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8329 "only a pointer obtained from B<malloc>(3), while, for example, "
8330 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8331 "The glibc implementation allows memory obtained from any of these functions "
8332 "to be reclaimed with B<free>(3)."
8333 msgstr ""
8334 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8335 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8336 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8337 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8338 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8339 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8340 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8341 "B<free>(3) で再利用することができる。"
8342
8343 #. type: Plain text
8344 #: build/C/man3/posix_memalign.3:272
8345 msgid ""
8346 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8347 "these functions are needed only if you require larger alignment values."
8348 msgstr ""
8349 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8350 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8351 "ト\n"
8352 "が必要な場合だけである。"
8353
8354 #. type: Plain text
8355 #: build/C/man3/posix_memalign.3:277
8356 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8357 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8358
8359 #. type: TH
8360 #: build/C/man2/readahead.2:28
8361 #, no-wrap
8362 msgid "READAHEAD"
8363 msgstr "READAHEAD"
8364
8365 #. type: TH
8366 #: build/C/man2/readahead.2:28
8367 #, no-wrap
8368 msgid "2014-03-15"
8369 msgstr "2014-03-15"
8370
8371 #. type: Plain text
8372 #: build/C/man2/readahead.2:31
8373 msgid "readahead - initiate file readahead into page cache"
8374 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8375
8376 #. type: Plain text
8377 #: build/C/man2/readahead.2:37
8378 #, no-wrap
8379 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8380 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8381
8382 #. type: Plain text
8383 #: build/C/man2/readahead.2:44
8384 msgid ""
8385 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8386 "that file will be satisfied from the cache, and not block on disk I/O "
8387 "(assuming the readahead was initiated early enough and that other activity "
8388 "on the system did not in the meantime flush pages from the cache)."
8389 msgstr ""
8390 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8391 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8392 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8393 "ページがフラッシュされない場合である)。"
8394
8395 #. type: Plain text
8396 #: build/C/man2/readahead.2:66
8397 msgid ""
8398 "The I<fd> argument is a file descriptor identifying the file which is to be "
8399 "read.  The I<offset> argument specifies the starting point from which data "
8400 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8401 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8402 "page boundary and bytes are read up to the next page boundary greater than "
8403 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8404 "of the file.  The current file offset of the open file referred to by I<fd> "
8405 "is left unchanged."
8406 msgstr ""
8407 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8408 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8409 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8410 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8411 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8412 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8413 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8414
8415 #. type: Plain text
8416 #: build/C/man2/readahead.2:72
8417 msgid ""
8418 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8419 "I<errno> set to indicate the cause of the error."
8420 msgstr ""
8421 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8422 "ラーの原因を示す値を設定する。"
8423
8424 #. type: Plain text
8425 #: build/C/man2/readahead.2:77
8426 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8427 msgstr ""
8428 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8429 "ていない。"
8430
8431 #. type: Plain text
8432 #: build/C/man2/readahead.2:83
8433 msgid ""
8434 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8435 msgstr ""
8436 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8437 "ファイルであった。"
8438
8439 #. type: Plain text
8440 #: build/C/man2/readahead.2:88
8441 msgid ""
8442 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8443 "been provided since version 2.3."
8444 msgstr ""
8445 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8446 "は glibc バージョン 2.3 以降で行われている。"
8447
8448 #. type: Plain text
8449 #: build/C/man2/readahead.2:93
8450 msgid ""
8451 "The B<readahead>()  system call is Linux-specific, and its use should be "
8452 "avoided in portable applications."
8453 msgstr ""
8454 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8455 "は 使用を避けるべきである。"
8456
8457 #. type: Plain text
8458 #: build/C/man2/readahead.2:98
8459 msgid ""
8460 "On some 32-bit architectures, the calling signature for this system call "
8461 "differs, for the reasons described in B<syscall>(2)."
8462 msgstr ""
8463 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8464 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8465
8466 #. type: Plain text
8467 #: build/C/man2/readahead.2:107
8468 msgid ""
8469 "B<readahead>()  attempts to schedule the reads in the background and return "
8470 "immediately.  However, it may block while it reads the filesystem metadata "
8471 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8472 "on large files using indirect blocks instead of extents, giving the "
8473 "appearance that the call blocks until the requested data has been read."
8474 msgstr ""
8475 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8476 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8477 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8478 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8479 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8480 "に見える。"
8481
8482 #. type: Plain text
8483 #: build/C/man2/readahead.2:113
8484 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8485 msgstr ""
8486 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8487
8488 #. type: TH
8489 #: build/C/man2/remap_file_pages.2:28
8490 #, no-wrap
8491 msgid "REMAP_FILE_PAGES"
8492 msgstr "REMAP_FILE_PAGES"
8493
8494 #. type: Plain text
8495 #: build/C/man2/remap_file_pages.2:31
8496 msgid "remap_file_pages - create a nonlinear file mapping"
8497 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8498
8499 #. type: Plain text
8500 #: build/C/man2/remap_file_pages.2:35
8501 #, no-wrap
8502 msgid ""
8503 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8504 "B<#include E<lt>sys/mman.hE<gt>>\n"
8505 msgstr ""
8506 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8507 "B<#include E<lt>sys/mman.hE<gt>>\n"
8508
8509 #. type: Plain text
8510 #: build/C/man2/remap_file_pages.2:38
8511 #, no-wrap
8512 msgid ""
8513 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8514 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8515 msgstr ""
8516 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8517 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8518
8519 #.  commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8520 #.  http://lwn.net/Articles/597632/
8521 #. type: Plain text
8522 #: build/C/man2/remap_file_pages.2:47
8523 msgid ""
8524 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8525 "eventually be replaced by a slower in-kernel emulation.  Those few "
8526 "applications that use this system call should consider migrating to "
8527 "alternatives."
8528 msgstr ""
8529
8530 #. type: Plain text
8531 #: build/C/man2/remap_file_pages.2:59
8532 msgid ""
8533 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8534 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8535 "nonsequential order in memory.  The advantage of using "
8536 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8537 "former approach does not require the kernel to create additional VMA "
8538 "(Virtual Memory Area) data structures."
8539 msgstr ""
8540 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8541 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8542 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8543 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8544 "域)  データ構造体を追加で作成する必要がないことである。"
8545
8546 #. type: Plain text
8547 #: build/C/man2/remap_file_pages.2:61
8548 msgid "To create a nonlinear mapping we perform the following steps:"
8549 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8550
8551 #. type: TP
8552 #: build/C/man2/remap_file_pages.2:61
8553 #, no-wrap
8554 msgid "1."
8555 msgstr "1."
8556
8557 #. type: Plain text
8558 #: build/C/man2/remap_file_pages.2:69
8559 msgid ""
8560 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8561 "mapping must be created with the B<MAP_SHARED> flag."
8562 msgstr ""
8563 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8564 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8565 "い。"
8566
8567 #. type: TP
8568 #: build/C/man2/remap_file_pages.2:69
8569 #, no-wrap
8570 msgid "2."
8571 msgstr "2."
8572
8573 #. type: Plain text
8574 #: build/C/man2/remap_file_pages.2:77
8575 msgid ""
8576 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8577 "correspondence between the pages of the mapping and the pages of the file.  "
8578 "It is possible to map the same page of a file into multiple locations within "
8579 "the mapped region."
8580 msgstr ""
8581 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8582 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8583 "所に マップすることが可能である。"
8584
8585 #. type: Plain text
8586 #: build/C/man2/remap_file_pages.2:88
8587 msgid ""
8588 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8589 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8590 "system page size; I<size> is the length of the region in bytes."
8591 msgstr ""
8592 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8593 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8594 "る。 I<size> は領域の長さであり、単位はバイトである。"
8595
8596 #. type: Plain text
8597 #: build/C/man2/remap_file_pages.2:106
8598 msgid ""
8599 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8600 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8601 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8602 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8603 "and I<size> will be placed."
8604 msgstr ""
8605 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8606 "成したいページの マッピングを識別することである。 よって I<addr> は "
8607 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8608 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8609 "予定のアドレスを、 I<addr> によって指定することである。"
8610
8611 #.  This rounding is weird, and not consistent with the treatment of
8612 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8613 #.  MTK, 14 Sep 2005
8614 #. type: Plain text
8615 #: build/C/man2/remap_file_pages.2:120
8616 msgid ""
8617 "The values specified in I<addr> and I<size> should be multiples of the "
8618 "system page size.  If they are not, then the kernel rounds I<both> values "
8619 "I<down> to the nearest multiple of the page size."
8620 msgstr ""
8621 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8622 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8623 "「切り下げる」。"
8624
8625 #. type: Plain text
8626 #: build/C/man2/remap_file_pages.2:124
8627 msgid "The I<prot> argument must be specified as 0."
8628 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8629
8630 #. type: Plain text
8631 #: build/C/man2/remap_file_pages.2:132
8632 msgid ""
8633 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8634 "other than B<MAP_NONBLOCK> are ignored."
8635 msgstr ""
8636 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8637 "の全てのフラグは無視される。"
8638
8639 #. type: Plain text
8640 #: build/C/man2/remap_file_pages.2:139
8641 msgid ""
8642 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8643 "I<errno> is set appropriately."
8644 msgstr ""
8645 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8646 "れ、 I<errno> が適切に設定される。"
8647
8648 #. type: Plain text
8649 #: build/C/man2/remap_file_pages.2:147
8650 msgid ""
8651 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8652 "flag."
8653 msgstr ""
8654 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8655 "いない。"
8656
8657 #.  And possibly others from vma->vm_ops->populate()
8658 #. type: Plain text
8659 #: build/C/man2/remap_file_pages.2:156
8660 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8661 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8662
8663 #. type: Plain text
8664 #: build/C/man2/remap_file_pages.2:161
8665 msgid ""
8666 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8667 "support was added in version 2.3.3."
8668 msgstr ""
8669 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8670 "サポートは glibc バージョン 2.3.3 で追加された。"
8671
8672 #. type: Plain text
8673 #: build/C/man2/remap_file_pages.2:165
8674 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8675 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8676
8677 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8678 #. type: Plain text
8679 #: build/C/man2/remap_file_pages.2:176
8680 msgid ""
8681 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8682 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8683 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8684 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8685 "addresses."
8686 msgstr ""
8687
8688 #. type: Plain text
8689 #: build/C/man2/remap_file_pages.2:183
8690 msgid ""
8691 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8692 "B<msync>(2)"
8693 msgstr ""
8694 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8695 "B<msync>(2)"
8696
8697 #. type: TH
8698 #: build/C/man3/shm_open.3:26
8699 #, no-wrap
8700 msgid "SHM_OPEN"
8701 msgstr "SHM_OPEN"
8702
8703 #. type: TH
8704 #: build/C/man3/shm_open.3:26
8705 #, no-wrap
8706 msgid "2009-02-25"
8707 msgstr "2009-02-25"
8708
8709 #. type: Plain text
8710 #: build/C/man3/shm_open.3:29
8711 msgid ""
8712 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8713 msgstr ""
8714 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8715 "う"
8716
8717 #. type: Plain text
8718 #: build/C/man3/shm_open.3:33
8719 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8720 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8721
8722 #. type: Plain text
8723 #: build/C/man3/shm_open.3:35
8724 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8725 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8726
8727 #. type: Plain text
8728 #: build/C/man3/shm_open.3:37
8729 msgid ""
8730 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8731 msgstr ""
8732 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8733
8734 #. type: Plain text
8735 #: build/C/man3/shm_open.3:39
8736 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8737 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8738
8739 #. type: Plain text
8740 #: build/C/man3/shm_open.3:41
8741 msgid "Link with I<-lrt>."
8742 msgstr "I<-lrt> でリンクする。"
8743
8744 #. type: Plain text
8745 #: build/C/man3/shm_open.3:53
8746 msgid ""
8747 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8748 "memory object.  A POSIX shared memory object is in effect a handle which can "
8749 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8750 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8751 "removing an object previously created by B<shm_open>()."
8752 msgstr ""
8753 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8754 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8755 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を "
8756 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8757 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8758
8759 #.  glibc allows the initial slash to be omitted, and makes
8760 #.  multiple initial slashes equivalent to a single slash.
8761 #.  This differs from the implementation of POSIX message queues.
8762 #.  glibc allows subdirectory components in the name, in which
8763 #.  case the subdirectory must exist under /dev/shm, and allow the
8764 #.  required permissions if a user wants to create a shared memory
8765 #.  object in that subdirectory.
8766 #. type: Plain text
8767 #: build/C/man3/shm_open.3:74
8768 msgid ""
8769 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8770 "specifies the shared memory object to be created or opened.  For portable "
8771 "use, a shared memory object should be identified by a name of the form I</"
8772 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8773 "255) characters consisting of an initial slash, followed by one or more "
8774 "characters, none of which are slashes."
8775 msgstr ""
8776 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8777 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8778 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8779 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8780 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8781
8782 #. type: Plain text
8783 #: build/C/man3/shm_open.3:81
8784 msgid ""
8785 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8786 "or B<O_RDWR> and any of the other flags listed here:"
8787 msgstr ""
8788 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8789 "述べる他のフラグの論理和をとったもの を指定する。"
8790
8791 #. type: TP
8792 #: build/C/man3/shm_open.3:81
8793 #, no-wrap
8794 msgid "B<O_RDONLY>"
8795 msgstr "B<O_RDONLY>"
8796
8797 #. type: Plain text
8798 #: build/C/man3/shm_open.3:89
8799 msgid ""
8800 "Open the object for read access.  A shared memory object opened in this way "
8801 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8802 msgstr ""
8803 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8804 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8805 "B<mmap>(2)  することができる。"
8806
8807 #. type: TP
8808 #: build/C/man3/shm_open.3:89
8809 #, no-wrap
8810 msgid "B<O_RDWR>"
8811 msgstr "B<O_RDWR>"
8812
8813 #. type: Plain text
8814 #: build/C/man3/shm_open.3:92
8815 msgid "Open the object for read-write access."
8816 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8817
8818 #. type: TP
8819 #: build/C/man3/shm_open.3:92
8820 #, no-wrap
8821 msgid "B<O_CREAT>"
8822 msgstr "B<O_CREAT>"
8823
8824 #.  In truth it is actually the filesystem IDs on Linux, but these
8825 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8826 #. type: Plain text
8827 #: build/C/man3/shm_open.3:112
8828 msgid ""
8829 "Create the shared memory object if it does not exist.  The user and group "
8830 "ownership of the object are taken from the corresponding effective IDs of "
8831 "the calling process, and the object's permission bits are set according to "
8832 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8833 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8834 "A set of macro constants which can be used to define I<mode> is listed in "
8835 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8836 "including I<E<lt>sys/stat.hE<gt>>.)"
8837 msgstr ""
8838 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8839 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8840 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8841 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8842 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8843 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8844 "hE<gt>> のインクルードにより得られる)。"
8845
8846 #. type: Plain text
8847 #: build/C/man3/shm_open.3:118
8848 msgid ""
8849 "A new shared memory object initially has zero length\\(emthe size of the "
8850 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8851 "shared memory object are automatically initialized to 0."
8852 msgstr ""
8853 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8854 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8855 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8856
8857 #. type: TP
8858 #: build/C/man3/shm_open.3:118
8859 #, no-wrap
8860 msgid "B<O_EXCL>"
8861 msgstr "B<O_EXCL>"
8862
8863 #. type: Plain text
8864 #: build/C/man3/shm_open.3:127
8865 msgid ""
8866 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8867 "I<name> already exists, return an error.  The check for the existence of the "
8868 "object, and its creation if it does not exist, are performed atomically."
8869 msgstr ""
8870 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8871 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8872 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8873 "atomically)。"
8874
8875 #. type: TP
8876 #: build/C/man3/shm_open.3:127
8877 #, no-wrap
8878 msgid "B<O_TRUNC>"
8879 msgstr "B<O_TRUNC>"
8880
8881 #. type: Plain text
8882 #: build/C/man3/shm_open.3:130
8883 msgid "If the shared memory object already exists, truncate it to zero bytes."
8884 msgstr ""
8885 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8886 "切り詰める。"
8887
8888 #. type: Plain text
8889 #: build/C/man3/shm_open.3:133
8890 msgid ""
8891 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8892 "hE<gt>>."
8893 msgstr ""
8894 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8895
8896 #. type: Plain text
8897 #: build/C/man3/shm_open.3:144
8898 msgid ""
8899 "On successful completion B<shm_open>()  returns a new file descriptor "
8900 "referring to the shared memory object.  This file descriptor is guaranteed "
8901 "to be the lowest-numbered file descriptor not previously opened within the "
8902 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8903 "descriptor."
8904 msgstr ""
8905 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8906 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8907 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8908 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8909 "ファイル・ディスクリプタに設定される。"
8910
8911 #. type: Plain text
8912 #: build/C/man3/shm_open.3:153
8913 msgid ""
8914 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8915 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8916 "the file descriptor may be closed without affecting the memory mapping."
8917 msgstr ""
8918 "通常、これらのファイル・ディスクリプタは、この後続けて実行される "
8919 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
8920 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタを"
8921 "クローズしてもよく、 クローズしてもメモリ・マッピングに影響を与えることはな"
8922 "い。"
8923
8924 #. type: Plain text
8925 #: build/C/man3/shm_open.3:171
8926 msgid ""
8927 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8928 "shared memory object name, and, once all processes have unmapped the object, "
8929 "de-allocates and destroys the contents of the associated memory region.  "
8930 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8931 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8932 "case a new, distinct object is created)."
8933 msgstr ""
8934 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8935 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8936 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8937 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8938 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8939 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8940
8941 #. type: Plain text
8942 #: build/C/man3/shm_open.3:180
8943 msgid ""
8944 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8945 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8946 "or -1 on error."
8947 msgstr ""
8948 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8949 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8950 "を、エラーが起こった場合 -1 を返す。"
8951
8952 #. type: Plain text
8953 #: build/C/man3/shm_open.3:187
8954 msgid ""
8955 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8956 "which may appear in I<errno> include the following:"
8957 msgstr ""
8958 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8959 "される値は以下の通りである:"
8960
8961 #. type: Plain text
8962 #: build/C/man3/shm_open.3:192
8963 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8964 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8965
8966 #. type: Plain text
8967 #: build/C/man3/shm_open.3:202
8968 msgid ""
8969 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8970 "B<O_TRUNC> was specified and the caller does not have write permission on "
8971 "the object."
8972 msgstr ""
8973 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8974 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8975 "み権限が なかった。"
8976
8977 #. type: TP
8978 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
8979 #, no-wrap
8980 msgid "B<EEXIST>"
8981 msgstr "B<EEXIST>"
8982
8983 #. type: Plain text
8984 #: build/C/man3/shm_open.3:213
8985 msgid ""
8986 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8987 "shared memory object specified by I<name> already exists."
8988 msgstr ""
8989 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8990 "定された共有メモリ・オブジェクトが既に存在した。"
8991
8992 #. type: Plain text
8993 #: build/C/man3/shm_open.3:220
8994 msgid "The I<name> argument to B<shm_open>()  was invalid."
8995 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8996
8997 #. type: TP
8998 #: build/C/man3/shm_open.3:220
8999 #, no-wrap
9000 msgid "B<EMFILE>"
9001 msgstr "B<EMFILE>"
9002
9003 #. type: Plain text
9004 #: build/C/man3/shm_open.3:223
9005 msgid "The process already has the maximum number of files open."
9006 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
9007
9008 #. type: TP
9009 #: build/C/man3/shm_open.3:223
9010 #, no-wrap
9011 msgid "B<ENAMETOOLONG>"
9012 msgstr "B<ENAMETOOLONG>"
9013
9014 #. type: Plain text
9015 #: build/C/man3/shm_open.3:229
9016 msgid "The length of I<name> exceeds B<PATH_MAX>."
9017 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
9018
9019 #. type: Plain text
9020 #: build/C/man3/shm_open.3:233
9021 msgid ""
9022 "The limit on the total number of files open on the system has been reached."
9023 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
9024
9025 #. type: TP
9026 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
9027 #: build/C/man2/shmget.2:225
9028 #, no-wrap
9029 msgid "B<ENOENT>"
9030 msgstr "B<ENOENT>"
9031
9032 #. type: Plain text
9033 #: build/C/man3/shm_open.3:242
9034 msgid ""
9035 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
9036 "B<O_CREAT> was not specified."
9037 msgstr ""
9038 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
9039 "B<O_CREAT> が指定されていなかった。"
9040
9041 #. type: Plain text
9042 #: build/C/man3/shm_open.3:249
9043 msgid ""
9044 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9045 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9046
9047 #. type: Plain text
9048 #: build/C/man3/shm_open.3:251
9049 msgid "These functions are provided in glibc 2.2 and later."
9050 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9051
9052 #. type: Plain text
9053 #: build/C/man3/shm_open.3:257
9054 msgid ""
9055 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9056 "object is set to either the calling process's effective group ID or \"a "
9057 "system default group ID\"."
9058 msgstr ""
9059 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
9060 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9061 "ID」 のどちらかに設定される、と書かれている。"
9062
9063 #. type: Plain text
9064 #: build/C/man3/shm_open.3:266
9065 msgid ""
9066 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9067 "unspecified.  On Linux, this will successfully truncate an existing shared "
9068 "memory object\\(emthis may not be so on other UNIX systems."
9069 msgstr ""
9070 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9071 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
9072 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9073
9074 #. type: Plain text
9075 #: build/C/man3/shm_open.3:271
9076 msgid ""
9077 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9078 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9079 msgstr ""
9080 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
9081 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9082
9083 #. type: Plain text
9084 #: build/C/man3/shm_open.3:282
9085 msgid ""
9086 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9087 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9088 msgstr ""
9089 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9090 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9091
9092 #. type: TH
9093 #: build/C/man7/shm_overview.7:27
9094 #, no-wrap
9095 msgid "SHM_OVERVIEW"
9096 msgstr "SHM_OVERVIEW"
9097
9098 #. type: TH
9099 #: build/C/man7/shm_overview.7:27
9100 #, no-wrap
9101 msgid "2010-09-10"
9102 msgstr "2010-09-10"
9103
9104 #. type: Plain text
9105 #: build/C/man7/shm_overview.7:30
9106 msgid "shm_overview - overview of POSIX shared memory"
9107 msgstr "shm_overview - POSIX 共有メモリの概要"
9108
9109 #. type: Plain text
9110 #: build/C/man7/shm_overview.7:33
9111 msgid ""
9112 "The POSIX shared memory API allows processes to communicate information by "
9113 "sharing a region of memory."
9114 msgstr ""
9115 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
9116 "情報をやり取りすることができる。"
9117
9118 #. type: Plain text
9119 #: build/C/man7/shm_overview.7:35
9120 msgid "The interfaces employed in the API are:"
9121 msgstr "この API では以下のインターフェースが採用されている。"
9122
9123 #. type: TP
9124 #: build/C/man7/shm_overview.7:35
9125 #, no-wrap
9126 msgid "B<shm_open>(3)"
9127 msgstr "B<shm_open>(3)"
9128
9129 #. type: Plain text
9130 #: build/C/man7/shm_overview.7:42
9131 msgid ""
9132 "Create and open a new object, or open an existing object.  This is analogous "
9133 "to B<open>(2).  The call returns a file descriptor for use by the other "
9134 "interfaces listed below."
9135 msgstr ""
9136 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9137 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9138 "る ファイルディスクリプタを返す。"
9139
9140 #. type: TP
9141 #: build/C/man7/shm_overview.7:42
9142 #, no-wrap
9143 msgid "B<ftruncate>(2)"
9144 msgstr "B<ftruncate>(2)"
9145
9146 #. type: Plain text
9147 #: build/C/man7/shm_overview.7:46
9148 msgid ""
9149 "Set the size of the shared memory object.  (A newly created shared memory "
9150 "object has a length of zero.)"
9151 msgstr "共有メモリオブジェクトの大きさを設定する。"
9152
9153 #. type: Plain text
9154 #: build/C/man7/shm_overview.7:50
9155 msgid ""
9156 "Map the shared memory object into the virtual address space of the calling "
9157 "process."
9158 msgstr ""
9159 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
9160
9161 #. type: TP
9162 #: build/C/man7/shm_overview.7:50
9163 #, no-wrap
9164 msgid "B<munmap>(2)"
9165 msgstr "B<munmap>(2)"
9166
9167 #. type: Plain text
9168 #: build/C/man7/shm_overview.7:54
9169 msgid ""
9170 "Unmap the shared memory object from the virtual address space of the calling "
9171 "process."
9172 msgstr ""
9173 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
9174 "る。"
9175
9176 #. type: TP
9177 #: build/C/man7/shm_overview.7:54
9178 #, no-wrap
9179 msgid "B<shm_unlink>(3)"
9180 msgstr "B<shm_unlink>(3)"
9181
9182 #. type: Plain text
9183 #: build/C/man7/shm_overview.7:57
9184 msgid "Remove a shared memory object name."
9185 msgstr "共有メモリオブジェクト名を削除する。"
9186
9187 #. type: TP
9188 #: build/C/man7/shm_overview.7:57
9189 #, no-wrap
9190 msgid "B<close>(2)"
9191 msgstr "B<close>(2)"
9192
9193 #. type: Plain text
9194 #: build/C/man7/shm_overview.7:62
9195 msgid ""
9196 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9197 "needed."
9198 msgstr ""
9199 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
9200 "のファイルディスクリプタをクローズする。"
9201
9202 #. type: TP
9203 #: build/C/man7/shm_overview.7:62
9204 #, no-wrap
9205 msgid "B<fstat>(2)"
9206 msgstr "B<fstat>(2)"
9207
9208 #. type: Plain text
9209 #: build/C/man7/shm_overview.7:76
9210 msgid ""
9211 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9212 "the information returned by this call are the object's size (I<st_size>), "
9213 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9214 msgstr ""
9215 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
9216 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
9217 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9218
9219 #. type: TP
9220 #: build/C/man7/shm_overview.7:76
9221 #, no-wrap
9222 msgid "B<fchown>(2)"
9223 msgstr "B<fchown>(2)"
9224
9225 #. type: Plain text
9226 #: build/C/man7/shm_overview.7:79
9227 msgid "To change the ownership of a shared memory object."
9228 msgstr "共有メモリオブジェクトの所有権を変更する。"
9229
9230 #. type: TP
9231 #: build/C/man7/shm_overview.7:79
9232 #, no-wrap
9233 msgid "B<fchmod>(2)"
9234 msgstr "B<fchmod>(2)"
9235
9236 #. type: Plain text
9237 #: build/C/man7/shm_overview.7:82
9238 msgid "To change the permissions of a shared memory object."
9239 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9240
9241 #. type: SS
9242 #: build/C/man7/shm_overview.7:82
9243 #, no-wrap
9244 msgid "Versions"
9245 msgstr "Versions"
9246
9247 #. type: Plain text
9248 #: build/C/man7/shm_overview.7:84
9249 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9250 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9251
9252 #. type: SS
9253 #: build/C/man7/shm_overview.7:84
9254 #, no-wrap
9255 msgid "Persistence"
9256 msgstr "持続性"
9257
9258 #. type: Plain text
9259 #: build/C/man7/shm_overview.7:89
9260 msgid ""
9261 "POSIX shared memory objects have kernel persistence: a shared memory object "
9262 "will exist until the system is shut down, or until all processes have "
9263 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9264 msgstr ""
9265 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9266 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9267 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9268
9269 #. type: SS
9270 #: build/C/man7/shm_overview.7:89
9271 #, no-wrap
9272 msgid "Linking"
9273 msgstr "リンク"
9274
9275 #. type: Plain text
9276 #: build/C/man7/shm_overview.7:94
9277 msgid ""
9278 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9279 "to link against the real-time library, I<librt>."
9280 msgstr ""
9281 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9282 "タイムライブラリ I<librt> とリンクしなければならない。"
9283
9284 #. type: SS
9285 #: build/C/man7/shm_overview.7:94
9286 #, no-wrap
9287 msgid "Accessing shared memory objects via the filesystem"
9288 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9289
9290 #. type: Plain text
9291 #: build/C/man7/shm_overview.7:101
9292 msgid ""
9293 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9294 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9295 "supports the use of access control lists (ACLs)  to control the permissions "
9296 "of objects in the virtual filesystem."
9297 msgstr ""
9298 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9299 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9300 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9301 "スト (ACL; access control lists) を使うことができる。"
9302
9303 #. type: Plain text
9304 #: build/C/man7/shm_overview.7:106
9305 msgid ""
9306 "Typically, processes must synchronize their access to a shared memory "
9307 "object, using, for example, POSIX semaphores."
9308 msgstr ""
9309 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9310 "使ってプロセス間で同期をとらなければならない。"
9311
9312 #. type: Plain text
9313 #: build/C/man7/shm_overview.7:114
9314 msgid ""
9315 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9316 "memory API.  POSIX shared memory provides a simpler, and better designed "
9317 "interface; on the other hand POSIX shared memory is somewhat less widely "
9318 "available (especially on older systems) than System V shared memory."
9319 msgstr ""
9320 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9321 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9322 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9323 "システムが少ない (特に、古いシステムでは少ない)。"
9324
9325 #. type: Plain text
9326 #: build/C/man7/shm_overview.7:127
9327 msgid ""
9328 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9329 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9330 "B<shm_unlink>(3), B<sem_overview>(7)"
9331 msgstr ""
9332 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9333 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9334 "B<shm_unlink>(3), B<sem_overview>(7)"
9335
9336 #. type: TH
9337 #: build/C/man2/shmctl.2:45
9338 #, no-wrap
9339 msgid "SHMCTL"
9340 msgstr "SHMCTL"
9341
9342 #. type: TH
9343 #: build/C/man2/shmctl.2:45
9344 #, no-wrap
9345 msgid "2014-02-07"
9346 msgstr "2014-02-07"
9347
9348 #. type: Plain text
9349 #: build/C/man2/shmctl.2:48
9350 msgid "shmctl - System V shared memory control"
9351 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9352
9353 #. type: Plain text
9354 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9355 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9356 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9357
9358 #. type: Plain text
9359 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9360 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9361 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9362
9363 #. type: Plain text
9364 #: build/C/man2/shmctl.2:55
9365 msgid ""
9366 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9367 msgstr ""
9368 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9369
9370 #. type: Plain text
9371 #: build/C/man2/shmctl.2:62
9372 msgid ""
9373 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9374 "\\ V shared memory segment whose identifier is given in I<shmid>."
9375 msgstr ""
9376 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリ・セグメントに対し"
9377 "て I<cmd> で指示した制御命令を実行する。"
9378
9379 #. type: Plain text
9380 #: build/C/man2/shmctl.2:67
9381 msgid ""
9382 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9383 "I<E<lt>sys/shm.hE<gt>> as follows:"
9384 msgstr ""
9385 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9386 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9387
9388 #. type: Plain text
9389 #: build/C/man2/shmctl.2:81
9390 #, no-wrap
9391 msgid ""
9392 "struct shmid_ds {\n"
9393 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9394 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9395 "    time_t          shm_atime;   /* Last attach time */\n"
9396 "    time_t          shm_dtime;   /* Last detach time */\n"
9397 "    time_t          shm_ctime;   /* Last change time */\n"
9398 "    pid_t           shm_cpid;    /* PID of creator */\n"
9399 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9400 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9401 "    ...\n"
9402 "};\n"
9403 msgstr ""
9404 "struct shmid_ds {\n"
9405 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9406 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9407 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9408 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9409 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9410 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9411 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9412 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9413 "    ...\n"
9414 "};\n"
9415
9416 #. type: Plain text
9417 #: build/C/man2/shmctl.2:89
9418 msgid ""
9419 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9420 "settable using B<IPC_SET>):"
9421 msgstr ""
9422 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9423 "B<IPC_SET> を使って設定可能である):"
9424
9425 #. type: Plain text
9426 #: build/C/man2/shmctl.2:102
9427 #, no-wrap
9428 msgid ""
9429 "struct ipc_perm {\n"
9430 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9431 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9432 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9433 "    uid_t          cuid;     /* Effective UID of creator */\n"
9434 "    gid_t          cgid;     /* Effective GID of creator */\n"
9435 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9436 "                                SHM_LOCKED flags */\n"
9437 "    unsigned short __seq;    /* Sequence number */\n"
9438 "};\n"
9439 msgstr ""
9440 "struct ipc_perm {\n"
9441 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9442 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9443 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9444 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9445 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9446 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9447 "                                SHM_LOCKED フラグ */\n"
9448 "    unsigned short __seq;    /* シーケンス番号 */\n"
9449 "};\n"
9450
9451 #. type: Plain text
9452 #: build/C/man2/shmctl.2:108
9453 msgid "Valid values for I<cmd> are:"
9454 msgstr "I<cmd> として有効な値は以下の通り:"
9455
9456 #. type: TP
9457 #: build/C/man2/shmctl.2:109
9458 #, no-wrap
9459 msgid "B<IPC_STAT>"
9460 msgstr "B<IPC_STAT>"
9461
9462 #. type: Plain text
9463 #: build/C/man2/shmctl.2:118
9464 msgid ""
9465 "Copy information from the kernel data structure associated with I<shmid> "
9466 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9467 "read permission on the shared memory segment."
9468 msgstr ""
9469 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9470 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9471 "読み込み許可を持たなければならない。"
9472
9473 #. type: TP
9474 #: build/C/man2/shmctl.2:118
9475 #, no-wrap
9476 msgid "B<IPC_SET>"
9477 msgstr "B<IPC_SET>"
9478
9479 #. type: Plain text
9480 #: build/C/man2/shmctl.2:136
9481 msgid ""
9482 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9483 "I<buf> to the kernel data structure associated with this shared memory "
9484 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9485 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9486 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9487 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9488 "memory segment, or the caller must be privileged."
9489 msgstr ""
9490 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9491 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9492 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9493 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9494 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9495 "と一致するか、呼び出し元が特権を持たなければならない。"
9496
9497 #. type: TP
9498 #: build/C/man2/shmctl.2:136
9499 #, no-wrap
9500 msgid "B<IPC_RMID>"
9501 msgstr "B<IPC_RMID>"
9502
9503 #. type: Plain text
9504 #: build/C/man2/shmctl.2:149
9505 msgid ""
9506 "Mark the segment to be destroyed.  The segment will only actually be "
9507 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9508 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9509 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9510 "is ignored."
9511 msgstr ""
9512 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9513 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9514 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9515 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9516
9517 #. type: Plain text
9518 #: build/C/man2/shmctl.2:157
9519 msgid ""
9520 "If a segment has been marked for destruction, then the (nonstandard)  "
9521 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9522 "structure retrieved by B<IPC_STAT> will be set."
9523 msgstr ""
9524 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9525 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9526 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9527
9528 #. type: Plain text
9529 #: build/C/man2/shmctl.2:160
9530 msgid ""
9531 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9532 "its pages that were faulted in will remain in memory or swap."
9533 msgstr ""
9534 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9535 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9536 "る。"
9537
9538 #. type: Plain text
9539 #: build/C/man2/shmctl.2:165
9540 msgid ""
9541 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9542 "B<proc>(5)."
9543 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9544
9545 #. type: TP
9546 #: build/C/man2/shmctl.2:165
9547 #, no-wrap
9548 msgid "B<IPC_INFO> (Linux-specific)"
9549 msgstr "B<IPC_INFO> (Linux 固有)"
9550
9551 #. type: Plain text
9552 #: build/C/man2/shmctl.2:178
9553 msgid ""
9554 "Return information about system-wide shared memory limits and parameters in "
9555 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9556 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9557 "B<_GNU_SOURCE> feature test macro is defined:"
9558 msgstr ""
9559 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9560 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9561 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9562 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9563
9564 #. type: Plain text
9565 #: build/C/man2/shmctl.2:192
9566 #, no-wrap
9567 msgid ""
9568 "struct shminfo {\n"
9569 "    unsigned long shmmax; /* Maximum segment size */\n"
9570 "    unsigned long shmmin; /* Minimum segment size;\n"
9571 "                             always 1 */\n"
9572 "    unsigned long shmmni; /* Maximum number of segments */\n"
9573 "    unsigned long shmseg; /* Maximum number of segments\n"
9574 "                             that a process can attach;\n"
9575 "                             unused within kernel */\n"
9576 "    unsigned long shmall; /* Maximum number of pages of\n"
9577 "                             shared memory, system-wide */\n"
9578 "};\n"
9579 msgstr ""
9580 "struct  shminfo {\n"
9581 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9582 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9583 "                             常に 1 */\n"
9584 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9585 "    unsigned long shmseg; /* プロセスが付加できる\n"
9586 "                             セグメントの最大数。\n"
9587 "                             カーネル内では未使用 */\n"
9588 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9589 "                             システム全体での値 */\n"
9590 "};\n"
9591
9592 #. type: Plain text
9593 #: build/C/man2/shmctl.2:205
9594 msgid ""
9595 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9596 "files of the same name; see B<proc>(5)  for details."
9597 msgstr ""
9598 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9599 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9600
9601 #. type: TP
9602 #: build/C/man2/shmctl.2:205
9603 #, no-wrap
9604 msgid "B<SHM_INFO> (Linux-specific)"
9605 msgstr "B<SHM_INFO> (Linux 固有)"
9606
9607 #. type: Plain text
9608 #: build/C/man2/shmctl.2:216
9609 msgid ""
9610 "Return a I<shm_info> structure whose fields contain information about system "
9611 "resources consumed by shared memory.  This structure is defined in "
9612 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9613 msgstr ""
9614 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9615 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9616 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9617
9618 #. type: Plain text
9619 #: build/C/man2/shmctl.2:233
9620 #, no-wrap
9621 msgid ""
9622 "struct shm_info {\n"
9623 "    int           used_ids; /* # of currently existing\n"
9624 "                               segments */\n"
9625 "    unsigned long shm_tot;  /* Total number of shared\n"
9626 "                               memory pages */\n"
9627 "    unsigned long shm_rss;  /* # of resident shared\n"
9628 "                               memory pages */\n"
9629 "    unsigned long shm_swp;  /* # of swapped shared\n"
9630 "                               memory pages */\n"
9631 "    unsigned long swap_attempts;\n"
9632 "                            /* Unused since Linux 2.4 */\n"
9633 "    unsigned long swap_successes;\n"
9634 "                            /* Unused since Linux 2.4 */\n"
9635 "};\n"
9636 msgstr ""
9637 "struct shm_info {\n"
9638 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9639 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9640 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9641 "                               いない) 共有メモリページ数 */\n"
9642 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9643 "                               ページ数 */\n"
9644 "    unsigned long swap_attempts;\n"
9645 "                            /* Linux 2.4 以降では未使用 */\n"
9646 "    unsigned long swap_successes;\n"
9647 "                            /* Linux 2.4 以降では未使用 */\n"
9648 "};\n"
9649
9650 #. type: TP
9651 #: build/C/man2/shmctl.2:235
9652 #, no-wrap
9653 msgid "B<SHM_STAT> (Linux-specific)"
9654 msgstr "B<SHM_STAT> (Linux 固有)"
9655
9656 #. type: Plain text
9657 #: build/C/man2/shmctl.2:246
9658 msgid ""
9659 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9660 "argument is not a segment identifier, but instead an index into the kernel's "
9661 "internal array that maintains information about all shared memory segments "
9662 "on the system."
9663 msgstr ""
9664 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9665 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9666 "管理するカーネルの内部配列へのインデックス である。"
9667
9668 #. type: Plain text
9669 #: build/C/man2/shmctl.2:249
9670 msgid ""
9671 "The caller can prevent or allow swapping of a shared memory segment with the "
9672 "following I<cmd> values:"
9673 msgstr ""
9674 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9675 "ワップされることを防止したり、許可したりできる:"
9676
9677 #. type: TP
9678 #: build/C/man2/shmctl.2:250
9679 #, no-wrap
9680 msgid "B<SHM_LOCK> (Linux-specific)"
9681 msgstr "B<SHM_LOCK> (Linux 固有)"
9682
9683 #. type: Plain text
9684 #: build/C/man2/shmctl.2:262
9685 msgid ""
9686 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9687 "pages that are required to be present after locking is enabled.  If a "
9688 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9689 "I<shm_perm.mode> field in the associated data structure retrieved by "
9690 "B<IPC_STAT> will be set."
9691 msgstr ""
9692 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9693 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9694 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9695 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9696 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9697
9698 #. type: TP
9699 #: build/C/man2/shmctl.2:262
9700 #, no-wrap
9701 msgid "B<SHM_UNLOCK> (Linux-specific)"
9702 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9703
9704 #. type: Plain text
9705 #: build/C/man2/shmctl.2:265
9706 msgid "Unlock the segment, allowing it to be swapped out."
9707 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9708
9709 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9710 #.  be applied to a segment, regardless of ownership of the segment.
9711 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9712 #.  in 2.6.10.  MTK, May 2005
9713 #. type: Plain text
9714 #: build/C/man2/shmctl.2:283
9715 msgid ""
9716 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9717 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9718 "these operations if its effective UID matches the owner or creator UID of "
9719 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9720 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9721 msgstr ""
9722 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9723 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9724 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9725 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9726 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9727 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9728
9729 #. type: Plain text
9730 #: build/C/man2/shmctl.2:301
9731 msgid ""
9732 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9733 "highest used entry in the kernel's internal array recording information "
9734 "about all shared memory segments.  (This information can be used with "
9735 "repeated B<SHM_STAT> operations to obtain information about all shared "
9736 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9737 "the identifier of the shared memory segment whose index was given in "
9738 "I<shmid>.  Other operations return 0 on success."
9739 msgstr ""
9740 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9741 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9742 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9743 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9744 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9745 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9746
9747 #. type: Plain text
9748 #: build/C/man2/shmctl.2:305
9749 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9750 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9751
9752 #. type: Plain text
9753 #: build/C/man2/shmctl.2:314
9754 msgid ""
9755 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9756 "read access for I<shmid>, and the calling process does not have the "
9757 "B<CAP_IPC_OWNER> capability."
9758 msgstr ""
9759 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9760 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9761 "ケーパビリティ (capability) を持っていない。"
9762
9763 #. type: Plain text
9764 #: build/C/man2/shmctl.2:325
9765 msgid ""
9766 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9767 "pointed to by I<buf> isn't accessible."
9768 msgstr ""
9769 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9770 "るアドレスにアクセスできない。"
9771
9772 #. type: TP
9773 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9774 #, no-wrap
9775 msgid "B<EIDRM>"
9776 msgstr "B<EIDRM>"
9777
9778 #. type: Plain text
9779 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9780 msgid "I<shmid> points to a removed identifier."
9781 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9782
9783 #. type: Plain text
9784 #: build/C/man2/shmctl.2:337
9785 msgid ""
9786 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9787 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9788 "to an array slot that is currently unused."
9789 msgstr ""
9790 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9791 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9792 "配列のスロットを参照していた。"
9793
9794 #. type: Plain text
9795 #: build/C/man2/shmctl.2:348
9796 msgid ""
9797 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9798 "be-locked segment would mean that the total bytes in locked shared memory "
9799 "segments would exceed the limit for the real user ID of the calling "
9800 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9801 "(see B<setrlimit>(2))."
9802 msgstr ""
9803 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9804 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9805 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9806 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9807
9808 #. type: Plain text
9809 #: build/C/man2/shmctl.2:353
9810 msgid ""
9811 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9812 "in the structure pointed to by I<buf>."
9813 msgstr ""
9814 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9815 "には大き過ぎる。"
9816
9817 #. type: Plain text
9818 #: build/C/man2/shmctl.2:365
9819 msgid ""
9820 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9821 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9822 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9823 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9824 msgstr ""
9825 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9826 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9827 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9828
9829 #. type: Plain text
9830 #: build/C/man2/shmctl.2:377
9831 msgid ""
9832 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9833 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9834 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9835 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9836 msgstr ""
9837 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9838 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9839 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9840 "が特権を持たない場合にも、このエラーが起こる。)"
9841
9842 #.  SVr4 documents an additional error condition EMFILE.
9843 #. type: Plain text
9844 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9845 #: build/C/man2/shmop.2:231
9846 msgid "SVr4, POSIX.1-2001."
9847 msgstr "SVr4, POSIX.1-2001."
9848
9849 #.  Like Linux, the FreeBSD man pages still document
9850 #.  the inclusion of these header files.
9851 #. type: Plain text
9852 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9853 msgid ""
9854 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9855 "required on Linux or by any version of POSIX.  However, some old "
9856 "implementations required the inclusion of these header files, and the SVID "
9857 "also documented their inclusion.  Applications intended to be portable to "
9858 "such old systems may need to include these header files."
9859 msgstr ""
9860 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9861 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9862 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9863 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9864 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9865 "れない。"
9866
9867 #. type: Plain text
9868 #: build/C/man2/shmctl.2:407
9869 msgid ""
9870 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9871 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9872 "future, these may modified or moved to a I</proc> filesystem interface."
9873 msgstr ""
9874 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9875 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9876 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9877 "い。"
9878
9879 #. type: Plain text
9880 #: build/C/man2/shmctl.2:415
9881 msgid ""
9882 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9883 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9884 "feature is not available on other UNIX implementations; portable "
9885 "applications should avoid relying on it."
9886 msgstr ""
9887 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9888 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9889 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9890 "プリケーションではこれに依存しないようにすべきである。"
9891
9892 #. type: Plain text
9893 #: build/C/man2/shmctl.2:428
9894 msgid ""
9895 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9896 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9897 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9898 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9899 msgstr ""
9900 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9901 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9902 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9903 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9904
9905 #. type: Plain text
9906 #: build/C/man2/shmctl.2:435
9907 msgid ""
9908 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9909 "B<svipc>(7)"
9910 msgstr ""
9911 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9912 "B<shm_overview>(7), B<svipc>(7)"
9913
9914 #. type: TH
9915 #: build/C/man2/shmget.2:38
9916 #, no-wrap
9917 msgid "SHMGET"
9918 msgstr "SHMGET"
9919
9920 #. type: TH
9921 #: build/C/man2/shmget.2:38
9922 #, no-wrap
9923 msgid "2014-10-02"
9924 msgstr "2014-10-02"
9925
9926 #. type: Plain text
9927 #: build/C/man2/shmget.2:41
9928 msgid "shmget - allocates a System V shared memory segment"
9929 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9930
9931 #. type: Plain text
9932 #: build/C/man2/shmget.2:48
9933 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9934 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9935
9936 #. type: Plain text
9937 #: build/C/man2/shmget.2:72
9938 msgid ""
9939 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
9940 "associated with the value of the argument I<key>.  A new shared memory "
9941 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9942 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9943 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9944 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9945 msgstr ""
9946 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリ・セグメントの識"
9947 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9948 "共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9949 "場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメ"
9950 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9951 "きさとなる。"
9952
9953 #. type: Plain text
9954 #: build/C/man2/shmget.2:91
9955 msgid ""
9956 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9957 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9958 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9959 "| O_EXCL> for B<open>(2).)"
9960 msgstr ""
9961 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9962 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9963 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9964 "O_EXCL> を指定した場合の動作と同じである)。"
9965
9966 #. type: Plain text
9967 #: build/C/man2/shmget.2:95
9968 msgid "The value I<shmflg> is composed of:"
9969 msgstr "I<shmflg> は以下の内容から構成される:"
9970
9971 #. type: TP
9972 #: build/C/man2/shmget.2:95
9973 #, no-wrap
9974 msgid "B<IPC_CREAT>"
9975 msgstr "B<IPC_CREAT>"
9976
9977 #. type: Plain text
9978 #: build/C/man2/shmget.2:102
9979 msgid ""
9980 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
9981 "the segment associated with I<key> and check to see if the user has "
9982 "permission to access the segment."
9983 msgstr ""
9984 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9985 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9986 "可があるかどうかをチェックする。"
9987
9988 #. type: TP
9989 #: build/C/man2/shmget.2:102
9990 #, no-wrap
9991 msgid "B<IPC_EXCL>"
9992 msgstr "B<IPC_EXCL>"
9993
9994 #. type: Plain text
9995 #: build/C/man2/shmget.2:108
9996 msgid ""
9997 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
9998 "segment.  If the segment already exists, the call fails."
9999 msgstr ""
10000 "このフラグは B<IPC_CREAT> とともに使用し、 この呼び出しで確実にセグメントが作"
10001 "成されるようにする。 セグメントが既に存在した場合には、 呼び出しは失敗する。"
10002
10003 #. type: TP
10004 #: build/C/man2/shmget.2:108
10005 #, no-wrap
10006 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
10007 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
10008
10009 #. type: Plain text
10010 #: build/C/man2/shmget.2:114
10011 msgid ""
10012 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
10013 "I<Documentation/vm/hugetlbpage.txt> for further information."
10014 msgstr ""
10015 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
10016 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
10017
10018 #. type: TP
10019 #: build/C/man2/shmget.2:114
10020 #, no-wrap
10021 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
10022 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
10023
10024 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
10025 #.  specified.
10026 #. type: Plain text
10027 #: build/C/man2/shmget.2:133
10028 msgid ""
10029 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
10030 "Do not reserve swap space for this segment.  When swap space is reserved, "
10031 "one has the guarantee that it is possible to modify the segment.  When swap "
10032 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10033 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
10034 "overcommit_memory> in B<proc>(5)."
10035 msgstr ""
10036 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10037 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10038 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10039 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
10040 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
10041 "ルに関する議論も参照のこと。"
10042
10043 #. type: Plain text
10044 #: build/C/man2/shmget.2:143
10045 msgid ""
10046 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10047 "specify the permissions granted to the owner, group, and others.  These bits "
10048 "have the same format, and the same meaning, as the I<mode> argument of "
10049 "B<open>(2).  Presently, execute permissions are not used by the system."
10050 msgstr ""
10051 "上記のフラグに加えて、 I<shmflg> の下位 9 ビットは、所有者、グループ、その他"
10052 "への許可を指定する。 これらのビットは B<open>(2)  の I<mode> 引き数と同じ形式"
10053 "で同じ意味を持つ。 今のところ、システムは実行 (execute) 許可を参照しない。"
10054
10055 #. type: Plain text
10056 #: build/C/man2/shmget.2:151
10057 msgid ""
10058 "When a new shared memory segment is created, its contents are initialized to "
10059 "zero values, and its associated data structure, I<shmid_ds> (see "
10060 "B<shmctl>(2)), is initialized as follows:"
10061 msgstr ""
10062 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
10063 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10064 "期化される。"
10065
10066 #. type: Plain text
10067 #: build/C/man2/shmget.2:156
10068 msgid ""
10069 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10070 "calling process."
10071 msgstr ""
10072 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10073 "ユーザーID を設定する。"
10074
10075 #. type: Plain text
10076 #: build/C/man2/shmget.2:161
10077 msgid ""
10078 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10079 "the calling process."
10080 msgstr ""
10081 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10082 "定する。"
10083
10084 #. type: Plain text
10085 #: build/C/man2/shmget.2:166
10086 msgid ""
10087 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10088 "significant 9 bit of I<shmflg>."
10089 msgstr ""
10090 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10091
10092 #. type: Plain text
10093 #: build/C/man2/shmget.2:170
10094 msgid "I<shm_segsz> is set to the value of I<size>."
10095 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10096
10097 #. type: Plain text
10098 #: build/C/man2/shmget.2:177
10099 msgid ""
10100 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10101 msgstr ""
10102 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10103
10104 #. type: Plain text
10105 #: build/C/man2/shmget.2:180
10106 msgid "I<shm_ctime> is set to the current time."
10107 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10108
10109 #. type: Plain text
10110 #: build/C/man2/shmget.2:183
10111 msgid ""
10112 "If the shared memory segment already exists, the permissions are verified, "
10113 "and a check is made to see if it is marked for destruction."
10114 msgstr ""
10115 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10116 "(destruction) マークがつけられていないかのチェックが行われる。"
10117
10118 #. type: Plain text
10119 #: build/C/man2/shmget.2:188
10120 msgid ""
10121 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10122 "returned, and I<errno> is set to indicate the error."
10123 msgstr ""
10124 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
10125 "-1 が返り、 I<error> にエラーを示す値が設定される。"
10126
10127 #. type: Plain text
10128 #: build/C/man2/shmget.2:192
10129 msgid "On failure, I<errno> is set to one of the following:"
10130 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10131
10132 #. type: Plain text
10133 #: build/C/man2/shmget.2:198
10134 msgid ""
10135 "The user does not have permission to access the shared memory segment, and "
10136 "does not have the B<CAP_IPC_OWNER> capability."
10137 msgstr ""
10138 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
10139 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10140
10141 #. type: Plain text
10142 #: build/C/man2/shmget.2:207
10143 msgid ""
10144 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10145 "memory segment already exists for I<key>."
10146 msgstr ""
10147 "B<IPC_CREAT> と B<IPC_EXCL> が I<shmflg> に指定されたが、 I<key> に対応する共"
10148 "有メモリセグメントはすでに存在する。"
10149
10150 #. type: Plain text
10151 #: build/C/man2/shmget.2:215
10152 #, fuzzy
10153 #| msgid ""
10154 #| "A new segment was to be created and I<size> is less than B<SHMIN> or "
10155 #| "greater than B<SHMMAX>."
10156 msgid ""
10157 "A new segment was to be created and I<size> is less than B<SHMMIN> or "
10158 "greater than B<SHMMAX>."
10159 msgstr ""
10160 "新しいセグメントを作成しようとしたが、 I<size> が B<SHMMIN> より小さいか "
10161 "B<SHMMAX> よりも大きかった。"
10162
10163 #. type: Plain text
10164 #: build/C/man2/shmget.2:221
10165 msgid ""
10166 "A segment for the given I<key> exists, but I<size> is greater than the size "
10167 "of that segment."
10168 msgstr ""
10169 "指定された I<key> に対応するセグメントが既に存在するが、 I<size> がそのセグメ"
10170 "ントのサイズよりも大きかった。"
10171
10172 #. type: Plain text
10173 #: build/C/man2/shmget.2:230
10174 msgid ""
10175 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10176 msgstr ""
10177 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10178 "いなかった。"
10179
10180 #. type: Plain text
10181 #: build/C/man2/shmget.2:233
10182 msgid "No memory could be allocated for segment overhead."
10183 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
10184
10185 #. type: Plain text
10186 #: build/C/man2/shmget.2:241
10187 msgid ""
10188 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10189 "segment of the requested I<size> would cause the system to exceed the system-"
10190 "wide limit on shared memory (B<SHMALL>)."
10191 msgstr ""
10192 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
10193 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
10194 "限 (B<SHMALL>)  を超過した。"
10195
10196 #. type: Plain text
10197 #: build/C/man2/shmget.2:248
10198 msgid ""
10199 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10200 "(did not have the B<CAP_IPC_LOCK> capability)."
10201 msgstr ""
10202 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10203 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10204
10205 #. type: Plain text
10206 #: build/C/man2/shmget.2:256
10207 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10208 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10209
10210 #. type: Plain text
10211 #: build/C/man2/shmget.2:280
10212 msgid ""
10213 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10214 "value is used for I<key>, the system call ignores all but the least "
10215 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10216 msgstr ""
10217 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10218 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10219 "視し、 新しい共有メモリ・セグメントを作成する。"
10220
10221 #. type: SS
10222 #: build/C/man2/shmget.2:280
10223 #, no-wrap
10224 msgid "Shared memory limits"
10225 msgstr ""
10226
10227 #. type: Plain text
10228 #: build/C/man2/shmget.2:284
10229 msgid ""
10230 "The following limits on shared memory segment resources affect the "
10231 "B<shmget>()  call:"
10232 msgstr ""
10233 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
10234 "る:"
10235
10236 #. type: TP
10237 #: build/C/man2/shmget.2:284
10238 #, no-wrap
10239 msgid "B<SHMALL>"
10240 msgstr "B<SHMALL>"
10241
10242 #. type: Plain text
10243 #: build/C/man2/shmget.2:287
10244 #, fuzzy
10245 #| msgid "System-wide limit on the number of I<pages> of shared memory."
10246 msgid "System-wide limit on the number of pages of shared memory."
10247 msgstr "共有メモリのページ数のシステム全体での上限値。"
10248
10249 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10250 #. type: Plain text
10251 #: build/C/man2/shmget.2:293
10252 msgid ""
10253 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10254 "shmall>.  Since Linux 3.16, the default value for this limit is:"
10255 msgstr ""
10256 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10257 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10258 "る。"
10259
10260 #. type: Plain text
10261 #: build/C/man2/shmget.2:295 build/C/man2/shmget.2:330
10262 #, no-wrap
10263 msgid "    ULONG_MAX - 2^24\n"
10264 msgstr "    ULONG_MAX - 2^24\n"
10265
10266 #. type: Plain text
10267 #: build/C/man2/shmget.2:306
10268 msgid ""
10269 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10270 "systems)  is to impose no limitation on allocations.  This value, rather "
10271 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10272 "historical applications simply raised the existing limit without first "
10273 "checking its current value.  Such applications would cause the value to "
10274 "overflow if the limit was set at B<ULONG_MAX>."
10275 msgstr ""
10276
10277 #. type: Plain text
10278 #: build/C/man2/shmget.2:309
10279 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10280 msgstr ""
10281
10282 #. type: Plain text
10283 #: build/C/man2/shmget.2:311
10284 #, no-wrap
10285 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10286 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10287
10288 #. type: Plain text
10289 #: build/C/man2/shmget.2:319
10290 msgid ""
10291 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10292 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10293 "GB as the limit on the total memory used by all shared memory segments."
10294 msgstr ""
10295
10296 #. type: TP
10297 #: build/C/man2/shmget.2:319
10298 #, no-wrap
10299 msgid "B<SHMMAX>"
10300 msgstr "B<SHMMAX>"
10301
10302 #. type: Plain text
10303 #: build/C/man2/shmget.2:322
10304 msgid "Maximum size in bytes for a shared memory segment."
10305 msgstr "1 つの共有メモリセグメントの最大サイズ (バイト数)。"
10306
10307 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10308 #. type: Plain text
10309 #: build/C/man2/shmget.2:328
10310 msgid ""
10311 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10312 "shmmax>.  Since Linux 3.16, the default value for this limit is:"
10313 msgstr ""
10314 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10315 "たりできる。 Linux 3.16 以降では、 この上限値のデフォルト値は以下のとおりであ"
10316 "る。"
10317
10318 #. type: Plain text
10319 #: build/C/man2/shmget.2:339
10320 msgid ""
10321 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10322 "systems)  is to impose no limitation on allocations.  See the description of "
10323 "B<SHMALL> for a discussion of why this default value (rather than "
10324 "B<ULONG_MAX>)  is used."
10325 msgstr ""
10326
10327 #. type: Plain text
10328 #: build/C/man2/shmget.2:342
10329 msgid ""
10330 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10331 "0x2000000 (32MB)."
10332 msgstr ""
10333 "Linux 2.2 から Linux 3.15 までは、この上限値のデフォルト値は 0x2000000 "
10334 "(32MB) であった。"
10335
10336 #. type: Plain text
10337 #: build/C/man2/shmget.2:348
10338 msgid ""
10339 "Because it is not possible to map just part of a shared memory segment, the "
10340 "amount of virtual memory places another limit on the maximum size of a "
10341 "usable segment: for example, on i386 the largest segments that can be mapped "
10342 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10343 msgstr ""
10344
10345 #. type: TP
10346 #: build/C/man2/shmget.2:348
10347 #, no-wrap
10348 msgid "B<SHMMIN>"
10349 msgstr "B<SHMMIN>"
10350
10351 #. type: Plain text
10352 #: build/C/man2/shmget.2:354
10353 msgid ""
10354 "Minimum size in bytes for a shared memory segment: implementation dependent "
10355 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10356 msgstr ""
10357 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10358 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10359
10360 #. type: TP
10361 #: build/C/man2/shmget.2:354
10362 #, no-wrap
10363 msgid "B<SHMMNI>"
10364 msgstr "B<SHMMNI>"
10365
10366 #. type: Plain text
10367 #: build/C/man2/shmget.2:359
10368 msgid ""
10369 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10370 "the default value for this limit was 128; since Linux 2.4, the default value "
10371 "is 4096."
10372 msgstr ""
10373 "システム全体の共有メモリ・セグメント数の上限値。 この上限値のデフォルトは、 "
10374 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10375
10376 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10377 #.  that we could create one more segment than SHMMNI -- MTK
10378 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10379 #. type: Plain text
10380 #: build/C/man2/shmget.2:365
10381 msgid ""
10382 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10383 msgstr ""
10384 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10385 "たりできる。"
10386
10387 #. type: Plain text
10388 #: build/C/man2/shmget.2:369
10389 msgid ""
10390 "The implementation has no specific limits for the per-process maximum number "
10391 "of shared memory segments (B<SHMSEG>)."
10392 msgstr ""
10393 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10394 "上の制限はない。"
10395
10396 #. type: Plain text
10397 #: build/C/man2/shmget.2:375
10398 msgid ""
10399 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10400 "shared memory segment scheduled for deletion."
10401 msgstr ""
10402 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10403 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10404
10405 #. type: Plain text
10406 #: build/C/man2/shmget.2:381
10407 msgid ""
10408 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10409 "more clearly show its function."
10410 msgstr ""
10411 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10412 "より明確にその機能を表しているだろう。"
10413
10414 #. type: Plain text
10415 #: build/C/man2/shmget.2:389
10416 msgid ""
10417 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10418 "B<shm_overview>(7), B<svipc>(7)"
10419 msgstr ""
10420 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10421 "B<shm_overview>(7), B<svipc>(7)"
10422
10423 #. type: TH
10424 #: build/C/man2/shmop.2:41
10425 #, no-wrap
10426 msgid "SHMOP"
10427 msgstr "SHMOP"
10428
10429 #. type: Plain text
10430 #: build/C/man2/shmop.2:44
10431 msgid "shmat, shmdt - System V shared memory operations"
10432 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10433
10434 #. type: Plain text
10435 #: build/C/man2/shmop.2:48
10436 #, no-wrap
10437 msgid ""
10438 "B<#include E<lt>sys/types.hE<gt>>\n"
10439 "B<#include E<lt>sys/shm.hE<gt>>\n"
10440 msgstr ""
10441 "B<#include E<lt>sys/types.hE<gt>>\n"
10442 "B<#include E<lt>sys/shm.hE<gt>>\n"
10443
10444 #. type: Plain text
10445 #: build/C/man2/shmop.2:50
10446 #, no-wrap
10447 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10448 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10449
10450 #. type: Plain text
10451 #: build/C/man2/shmop.2:52
10452 #, no-wrap
10453 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10454 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10455
10456 #. type: SS
10457 #: build/C/man2/shmop.2:54
10458 #, no-wrap
10459 msgid "shmat()"
10460 msgstr ""
10461
10462 #. type: Plain text
10463 #: build/C/man2/shmop.2:62
10464 msgid ""
10465 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10466 "I<shmid> to the address space of the calling process.  The attaching address "
10467 "is specified by I<shmaddr> with one of the following criteria:"
10468 msgstr ""
10469 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリ・セグメント "
10470 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10471 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10472
10473 #. type: Plain text
10474 #: build/C/man2/shmop.2:68
10475 msgid ""
10476 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10477 "which to attach the segment."
10478 msgstr ""
10479 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10480 "されていない) アドレスを選択する。"
10481
10482 #. type: Plain text
10483 #: build/C/man2/shmop.2:80
10484 msgid ""
10485 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10486 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10487 "multiple of B<SHMLBA>."
10488 msgstr ""
10489 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10490 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10491 "スへ付加する。"
10492
10493 #. type: Plain text
10494 #: build/C/man2/shmop.2:84
10495 msgid ""
10496 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10497 "occurs."
10498 msgstr ""
10499 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10500 "要がある。"
10501
10502 #. type: Plain text
10503 #: build/C/man2/shmop.2:90
10504 msgid ""
10505 "In addition to B<SHM_RND>, the following flags may be specified in the "
10506 "I<shmflg> bit-mask argument:"
10507 msgstr ""
10508
10509 #. type: TP
10510 #: build/C/man2/shmop.2:90
10511 #, no-wrap
10512 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10513 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10514
10515 #. type: Plain text
10516 #: build/C/man2/shmop.2:94
10517 msgid ""
10518 "Allow the contents of the segment to be executed.  The caller must have "
10519 "execute permission on the segment."
10520 msgstr ""
10521
10522 #. type: TP
10523 #: build/C/man2/shmop.2:94
10524 #, no-wrap
10525 msgid "B<SHM_RDONLY>"
10526 msgstr "B<SHM_RDONLY>"
10527
10528 #. type: Plain text
10529 #: build/C/man2/shmop.2:102
10530 msgid ""
10531 "Attach the segment for read-only access.  The process must have read "
10532 "permission for the segment.  If this flag is not specified, the segment is "
10533 "attached for read and write access, and the process must have read and write "
10534 "permission for the segment.  There is no notion of a write-only shared "
10535 "memory segment."
10536 msgstr ""
10537 "セグメントを読み込み専用に付加する。 プロセスはそのセグメントへの読み込み許可"
10538 "を持っていなければならない。 このフラグが指定されなかった場合、そのセグメント"
10539 "は読み込みと書き込みアクセスのために付加され、 プロセスはそのセグメントに読み"
10540 "込みと書き込みの許可を持っていなければならない。 書き込み専用の共有メモリ・セ"
10541 "グメントという概念は存在しない。"
10542
10543 #. type: TP
10544 #: build/C/man2/shmop.2:102
10545 #, no-wrap
10546 msgid "B<SHM_REMAP> (Linux-specific)"
10547 msgstr "B<SHM_REMAP> (Linux 固有)"
10548
10549 #. type: Plain text
10550 #: build/C/man2/shmop.2:115
10551 msgid ""
10552 "This flag specifies that the mapping of the segment should replace any "
10553 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10554 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10555 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10556 "must not be NULL."
10557 msgstr ""
10558 "このフラグは、 セグメントのマッピングを既存のマッピングに置き換えることを指示"
10559 "する。 マッピングの範囲は、 I<shmaddr> から始まりセグメントのサイズ分だけあ"
10560 "る (通常 B<EINVAL> エラーは、このアドレス範囲にマッピングが既に存在するために"
10561 "起る)。 このフラグを指定する場合は、 I<shmaddr> が NULL であってはならない。"
10562
10563 #. type: Plain text
10564 #: build/C/man2/shmop.2:122
10565 msgid ""
10566 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10567 "The segment will automatically be detached at process exit.  The same "
10568 "segment may be attached as a read and as a read-write one, and more than "
10569 "once, in the process's address space."
10570 msgstr ""
10571 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10572 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10573 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10574 "複数回付加することもできる。"
10575
10576 #. type: Plain text
10577 #: build/C/man2/shmop.2:130
10578 msgid ""
10579 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10580 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10581 "follows:"
10582 msgstr ""
10583 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10584 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10585
10586 #. type: Plain text
10587 #: build/C/man2/shmop.2:133
10588 msgid "I<shm_atime> is set to the current time."
10589 msgstr "I<shm_atime> には現在の時刻を設定する。"
10590
10591 #. type: Plain text
10592 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10593 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10594 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10595
10596 #. type: Plain text
10597 #: build/C/man2/shmop.2:140
10598 msgid "I<shm_nattch> is incremented by one."
10599 msgstr "I<shm_nattch> を 1 増加させる。"
10600
10601 #. type: SS
10602 #: build/C/man2/shmop.2:140
10603 #, no-wrap
10604 msgid "shmdt()"
10605 msgstr ""
10606
10607 #. type: Plain text
10608 #: build/C/man2/shmop.2:151
10609 msgid ""
10610 "B<shmdt>()  detaches the shared memory segment located at the address "
10611 "specified by I<shmaddr> from the address space of the calling process.  The "
10612 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10613 "the value returned by the attaching B<shmat>()  call."
10614 msgstr ""
10615 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10616 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10617 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10618 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10619 "ない。"
10620
10621 #. type: Plain text
10622 #: build/C/man2/shmop.2:157
10623 msgid ""
10624 "On a successful B<shmdt>()  call, the system updates the members of the "
10625 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10626 msgstr ""
10627 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10628 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10629
10630 #. type: Plain text
10631 #: build/C/man2/shmop.2:160
10632 msgid "I<shm_dtime> is set to the current time."
10633 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10634
10635 #. type: Plain text
10636 #: build/C/man2/shmop.2:168
10637 msgid ""
10638 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10639 "marked for deletion, the segment is deleted."
10640 msgstr ""
10641 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10642 "セグメントは削除される。"
10643
10644 #. type: Plain text
10645 #: build/C/man2/shmop.2:176
10646 msgid ""
10647 "On success, B<shmat>()  returns the address of the attached shared memory "
10648 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10649 "indicate the cause of the error."
10650 msgstr ""
10651 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10652 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10653 "値を設定する。"
10654
10655 #. type: Plain text
10656 #: build/C/man2/shmop.2:182
10657 msgid ""
10658 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10659 "set to indicate the cause of the error."
10660 msgstr ""
10661 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10662 "ラーの原因を示す値を設定する。"
10663
10664 #. type: Plain text
10665 #: build/C/man2/shmop.2:188
10666 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10667 msgstr ""
10668 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10669
10670 #. type: Plain text
10671 #: build/C/man2/shmop.2:194
10672 msgid ""
10673 "The calling process does not have the required permissions for the requested "
10674 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10675 msgstr ""
10676 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10677 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10678
10679 #. type: Plain text
10680 #: build/C/man2/shmop.2:211
10681 msgid ""
10682 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10683 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10684 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10685 msgstr ""
10686 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10687 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10688 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10689 "れているが、 I<shmaddr> が NULL であった。"
10690
10691 #. type: Plain text
10692 #: build/C/man2/shmop.2:214
10693 msgid "Could not allocate memory for the descriptor or for the page tables."
10694 msgstr ""
10695 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10696 "とができない。"
10697
10698 #. type: Plain text
10699 #: build/C/man2/shmop.2:220
10700 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10701 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10702
10703 #.  The following since 2.6.17-rc1:
10704 #. type: Plain text
10705 #: build/C/man2/shmop.2:228
10706 msgid ""
10707 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10708 "not aligned on a page boundary."
10709 msgstr ""
10710 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10711 "I<shmaddr> がページ境界に合っていない。"
10712
10713 #. type: Plain text
10714 #: build/C/man2/shmop.2:243
10715 msgid ""
10716 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10717 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10718 "B<shmat>()  from I<char\\ *> into I<void\\ *>."
10719 msgstr ""
10720 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10721 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10722 "\\ *> に変更された。"
10723
10724 #. type: Plain text
10725 #: build/C/man2/shmop.2:248
10726 msgid ""
10727 "After a B<fork>(2), the child inherits the attached shared memory segments."
10728 msgstr ""
10729 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10730
10731 #. type: Plain text
10732 #: build/C/man2/shmop.2:252
10733 msgid ""
10734 "After an B<execve>(2), all attached shared memory segments are detached from "
10735 "the process."
10736 msgstr ""
10737 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10738 "される。"
10739
10740 #. type: Plain text
10741 #: build/C/man2/shmop.2:256
10742 msgid ""
10743 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10744 "process."
10745 msgstr ""
10746 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10747 "離される。"
10748
10749 #. type: Plain text
10750 #: build/C/man2/shmop.2:268
10751 msgid ""
10752 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10753 "way of attaching a shared memory segment.  Be aware that the shared memory "
10754 "segment attached in this way may be attached at different addresses in "
10755 "different processes.  Therefore, any pointers maintained within the shared "
10756 "memory must be made relative (typically to the starting address of the "
10757 "segment), rather than absolute."
10758 msgstr ""
10759 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10760 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10761 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10762 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10763 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10764 "る。"
10765
10766 #. type: Plain text
10767 #: build/C/man2/shmop.2:273
10768 msgid ""
10769 "On Linux, it is possible to attach a shared memory segment even if it is "
10770 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10771 "behavior and many other implementations do not support it."
10772 msgstr ""
10773 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10774 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10775 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10776
10777 #. type: Plain text
10778 #: build/C/man2/shmop.2:276
10779 msgid "The following system parameter affects B<shmat>():"
10780 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10781
10782 #. type: TP
10783 #: build/C/man2/shmop.2:276
10784 #, no-wrap
10785 msgid "B<SHMLBA>"
10786 msgstr "B<SHMLBA>"
10787
10788 #. type: Plain text
10789 #: build/C/man2/shmop.2:289
10790 msgid ""
10791 "Segment low boundary address multiple.  When explicitly specifying an attach "
10792 "address in a call to B<shmat>(), the caller should ensure that the address "
10793 "is a multiple of this value.  This is necessary on some architectures, in "
10794 "order either to ensure good CPU cache performance or to ensure that "
10795 "different attaches of the same segment have consistent views within the CPU "
10796 "cache.  B<SHMLBA> is normally some multiple of the system page size (on many "
10797 "Linux architectures, it is the same as the system page size)."
10798 msgstr ""
10799
10800 #. type: Plain text
10801 #: build/C/man2/shmop.2:293
10802 msgid ""
10803 "The implementation places no intrinsic per-process limit on the number of "
10804 "shared memory segments (B<SHMSEG>)."
10805 msgstr ""
10806 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10807 "関する実装依存の制限はない。"
10808
10809 #. type: Plain text
10810 #: build/C/man2/shmop.2:301
10811 msgid ""
10812 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10813 "B<shm_overview>(7), B<svipc>(7)"
10814 msgstr ""
10815 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10816 "B<shm_overview>(7), B<svipc>(7)"
10817
10818 #. type: TH
10819 #: build/C/man2/subpage_prot.2:30
10820 #, no-wrap
10821 msgid "SUBPAGE_PROT"
10822 msgstr "SUBPAGE_PROT"
10823
10824 #. type: TH
10825 #: build/C/man2/subpage_prot.2:30
10826 #, no-wrap
10827 msgid "2012-07-13"
10828 msgstr "2012-07-13"
10829
10830 #. type: Plain text
10831 #: build/C/man2/subpage_prot.2:33
10832 msgid "subpage_prot - define a subpage protection for an address range"
10833 msgstr ""
10834
10835 #. type: Plain text
10836 #: build/C/man2/subpage_prot.2:37
10837 #, no-wrap
10838 msgid ""
10839 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10840 "B<                  uint32_t *>I<map>B<);>\n"
10841 msgstr ""
10842 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10843 "B<                  uint32_t *>I<map>B<);>\n"
10844
10845 #. type: Plain text
10846 #: build/C/man2/subpage_prot.2:41
10847 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10848 msgstr ""
10849 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10850 "を参照。"
10851
10852 #. type: Plain text
10853 #: build/C/man2/subpage_prot.2:47
10854 msgid ""
10855 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10856 "control the access permissions on individual 4kB subpages on systems "
10857 "configured with a page size of 64kB."
10858 msgstr ""
10859
10860 #. type: Plain text
10861 #: build/C/man2/subpage_prot.2:54
10862 msgid ""
10863 "The protection map is applied to the memory pages in the region starting at "
10864 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10865 "aligned to a 64-kB boundary."
10866 msgstr ""
10867
10868 #. type: Plain text
10869 #: build/C/man2/subpage_prot.2:66
10870 msgid ""
10871 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10872 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10873 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10874 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10875 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10876 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10877 msgstr ""
10878
10879 #. type: Plain text
10880 #: build/C/man2/subpage_prot.2:71
10881 msgid ""
10882 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10883 "specified below is returned."
10884 msgstr ""
10885
10886 #. type: Plain text
10887 #: build/C/man2/subpage_prot.2:77
10888 msgid "The buffer referred to by I<map> is not accessible."
10889 msgstr ""
10890
10891 #. type: Plain text
10892 #: build/C/man2/subpage_prot.2:87
10893 msgid ""
10894 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10895 "be aligned to a multiple of the system page size, and they must not refer to "
10896 "a region outside of the address space of the process or to a region that "
10897 "consists of huge pages."
10898 msgstr ""
10899
10900 #. type: Plain text
10901 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10902 msgid "Out of memory."
10903 msgstr "メモリ不足である。"
10904
10905 #. type: Plain text
10906 #: build/C/man2/subpage_prot.2:96
10907 msgid ""
10908 "This system call is provided on the PowerPC architecture since Linux "
10909 "2.6.25.  The system call is provided only if the kernel is configured with "
10910 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10911 msgstr ""
10912
10913 #. type: Plain text
10914 #: build/C/man2/subpage_prot.2:101
10915 msgid ""
10916 "Glibc does not provide a wrapper for this system call; call it using "
10917 "B<syscall>(2)."
10918 msgstr ""
10919
10920 #. type: Plain text
10921 #: build/C/man2/subpage_prot.2:106
10922 msgid ""
10923 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10924 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10925 "field won't allow writes to a page that is otherwise write-protected."
10926 msgstr ""
10927
10928 #. type: SS
10929 #: build/C/man2/subpage_prot.2:106
10930 #, no-wrap
10931 msgid "Rationale"
10932 msgstr ""
10933
10934 #.  In the initial implementation, it was the case that:
10935 #.      In fact the whole process is switched to use 4k hardware pages when the
10936 #.      subpage_prot system call is used, but this could be improved in future
10937 #.      to switch only the affected segments.
10938 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10939 #.  the affected segment, not the whole process.
10940 #. type: Plain text
10941 #: build/C/man2/subpage_prot.2:128
10942 msgid ""
10943 "This system call is provided to assist writing emulators that operate using "
10944 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10945 "uses a smaller page size, the emulator can no longer use the memory-"
10946 "management unit (MMU)  and normal system calls for controlling page "
10947 "protections.  (The emulator could emulate the MMU by checking and possibly "
10948 "remapping the address for each memory access in software, but that is "
10949 "slow.)  The idea is that the emulator supplies an array of protection masks "
10950 "to apply to a specified range of virtual addresses.  These masks are applied "
10951 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10952 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10953 "affected.  Implicit in this is that the regions of the address space that "
10954 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10955 "hardware pages (on machines with hardware 64-kB page support)."
10956 msgstr ""
10957
10958 #. type: Plain text
10959 #: build/C/man2/subpage_prot.2:131
10960 msgid "B<mprotect>(2), B<syscall>(2)"
10961 msgstr "B<mprotect>(2), B<syscall>(2)"
10962
10963 #. type: Plain text
10964 #: build/C/man2/subpage_prot.2:134
10965 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10966 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10967
10968 #. type: TH
10969 #: build/C/man2/sync_file_range.2:30
10970 #, no-wrap
10971 msgid "SYNC_FILE_RANGE"
10972 msgstr "SYNC_FILE_RANGE"
10973
10974 #. type: Plain text
10975 #: build/C/man2/sync_file_range.2:33
10976 msgid "sync_file_range - sync a file segment with disk"
10977 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10978
10979 #. type: Plain text
10980 #: build/C/man2/sync_file_range.2:37
10981 #, no-wrap
10982 msgid ""
10983 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10984 "B<#include E<lt>fcntl.hE<gt>>\n"
10985 msgstr ""
10986 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10987 "B<#include E<lt>fcntl.hE<gt>>\n"
10988
10989 #. type: Plain text
10990 #: build/C/man2/sync_file_range.2:40
10991 #, no-wrap
10992 msgid ""
10993 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10994 "B<                    unsigned int >I<flags>B<);>\n"
10995 msgstr ""
10996 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10997 "B<                    unsigned int >I<flags>B<);>\n"
10998
10999 #. type: Plain text
11000 #: build/C/man2/sync_file_range.2:47
11001 msgid ""
11002 "B<sync_file_range>()  permits fine control when synchronizing the open file "
11003 "referred to by the file descriptor I<fd> with disk."
11004 msgstr ""
11005 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
11006 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
11007
11008 #. type: Plain text
11009 #: build/C/man2/sync_file_range.2:61
11010 msgid ""
11011 "I<offset> is the starting byte of the file range to be synchronized.  "
11012 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11013 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11014 "are synchronized.  Synchronization is in units of the system page size: "
11015 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11016 "rounded up to a page boundary."
11017 msgstr ""
11018 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11019 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11020 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11021 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11022 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11023
11024 #. type: Plain text
11025 #: build/C/man2/sync_file_range.2:65
11026 msgid "The I<flags> bit-mask argument can include any of the following values:"
11027 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11028
11029 #. type: TP
11030 #: build/C/man2/sync_file_range.2:65
11031 #, no-wrap
11032 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11033 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11034
11035 #. type: Plain text
11036 #: build/C/man2/sync_file_range.2:70
11037 msgid ""
11038 "Wait upon write-out of all pages in the specified range that have already "
11039 "been submitted to the device driver for write-out before performing any "
11040 "write."
11041 msgstr ""
11042 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11043 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11044 "つ。"
11045
11046 #. type: TP
11047 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11048 #, no-wrap
11049 msgid "B<SYNC_FILE_RANGE_WRITE>"
11050 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11051
11052 #. type: Plain text
11053 #: build/C/man2/sync_file_range.2:76
11054 msgid ""
11055 "Initiate write-out of all dirty pages in the specified range which are not "
11056 "presently submitted write-out.  Note that even this may block if you attempt "
11057 "to write more than request queue size."
11058 msgstr ""
11059 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11060 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11061 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11062 "る点に注意すること。"
11063
11064 #. type: TP
11065 #: build/C/man2/sync_file_range.2:76
11066 #, no-wrap
11067 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11068 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11069
11070 #. type: Plain text
11071 #: build/C/man2/sync_file_range.2:80
11072 msgid ""
11073 "Wait upon write-out of all pages in the range after performing any write."
11074 msgstr ""
11075 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11076 "つ。"
11077
11078 #. type: Plain text
11079 #: build/C/man2/sync_file_range.2:84
11080 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11081 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11082
11083 #. type: SS
11084 #: build/C/man2/sync_file_range.2:84
11085 #, no-wrap
11086 msgid "Warning"
11087 msgstr "警告"
11088
11089 #. type: Plain text
11090 #: build/C/man2/sync_file_range.2:100
11091 msgid ""
11092 "This system call is extremely dangerous and should not be used in portable "
11093 "programs.  None of these operations writes out the file's metadata.  "
11094 "Therefore, unless the application is strictly performing overwrites of "
11095 "already-instantiated disk blocks, there are no guarantees that the data will "
11096 "be available after a crash.  There is no user interface to know if a write "
11097 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11098 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11099 "writing into preallocated space, many filesystems also require calls into "
11100 "the block allocator, which this system call does not sync out to disk.  This "
11101 "system call does not flush disk write caches and thus does not provide any "
11102 "data integrity on systems with volatile disk write caches."
11103 msgstr ""
11104 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11105 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11106 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11107 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11108 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
11109 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11110 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11111 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11112 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11113 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11114 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11115 "コールではデータの一貫性を確保できないことになる。"
11116
11117 #. type: SS
11118 #: build/C/man2/sync_file_range.2:100
11119 #, no-wrap
11120 msgid "Some details"
11121 msgstr "詳細"
11122
11123 #. type: Plain text
11124 #: build/C/man2/sync_file_range.2:108
11125 msgid ""
11126 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11127 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11128 msgstr ""
11129 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11130 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11131
11132 #. type: Plain text
11133 #: build/C/man2/sync_file_range.2:112
11134 msgid "Useful combinations of the I<flags> bits are:"
11135 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11136
11137 #. type: TP
11138 #: build/C/man2/sync_file_range.2:112
11139 #, no-wrap
11140 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11141 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11142
11143 #. type: Plain text
11144 #: build/C/man2/sync_file_range.2:120
11145 msgid ""
11146 "Ensures that all pages in the specified range which were dirty when "
11147 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11148 "start-write-for-data-integrity operation."
11149 msgstr ""
11150 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11151 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11152 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11153 "ある。"
11154
11155 #. type: Plain text
11156 #: build/C/man2/sync_file_range.2:127
11157 msgid ""
11158 "Start write-out of all dirty pages in the specified range which are not "
11159 "presently under write-out.  This is an asynchronous flush-to-disk "
11160 "operation.  This is not suitable for data integrity operations."
11161 msgstr ""
11162 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11163 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11164 "る。データ完全性確保が必要な操作としては適切ではない。"
11165
11166 #. type: TP
11167 #: build/C/man2/sync_file_range.2:127
11168 #, no-wrap
11169 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11170 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11171
11172 #. type: Plain text
11173 #: build/C/man2/sync_file_range.2:134
11174 msgid ""
11175 "Wait for completion of write-out of all pages in the specified range.  This "
11176 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11177 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11178 "and obtain its result."
11179 msgstr ""
11180 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11181 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11182 "き、この操作の完了を待ち、結果を取得することができる。"
11183
11184 #. type: TP
11185 #: build/C/man2/sync_file_range.2:134
11186 #, no-wrap
11187 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11188 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11189
11190 #. type: Plain text
11191 #: build/C/man2/sync_file_range.2:141
11192 msgid ""
11193 "This is a write-for-data-integrity operation that will ensure that all pages "
11194 "in the specified range which were dirty when B<sync_file_range>()  was "
11195 "called are committed to disk."
11196 msgstr ""
11197 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11198 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11199 "のページが ディスクに格納されることが保証される。"
11200
11201 #. type: Plain text
11202 #: build/C/man2/sync_file_range.2:147
11203 msgid ""
11204 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11205 "I<errno> is set to indicate the error."
11206 msgstr ""
11207 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11208 "I<error> にエラーを示す値を設定する。"
11209
11210 #. type: Plain text
11211 #: build/C/man2/sync_file_range.2:152
11212 msgid "I<fd> is not a valid file descriptor."
11213 msgstr "I<fd> が有効なファイルディスクリプタではない。"
11214
11215 #. type: Plain text
11216 #: build/C/man2/sync_file_range.2:160
11217 msgid ""
11218 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11219 msgstr ""
11220 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11221 "である。"
11222
11223 #. type: Plain text
11224 #: build/C/man2/sync_file_range.2:163
11225 msgid "I/O error."
11226 msgstr "I/O エラー。"
11227
11228 #. type: Plain text
11229 #: build/C/man2/sync_file_range.2:169
11230 msgid "Out of disk space."
11231 msgstr "ディスク領域不足である。"
11232
11233 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11234 #.  (In user space at least) it isn't possible to obtain a file descriptor
11235 #.  for a symbolic link.
11236 #. type: Plain text
11237 #: build/C/man2/sync_file_range.2:177
11238 msgid ""
11239 "I<fd> refers to something other than a regular file, a block device, a "
11240 "directory, or a symbolic link."
11241 msgstr ""
11242 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11243 "以外のものを指している。"
11244
11245 #. type: Plain text
11246 #: build/C/man2/sync_file_range.2:180
11247 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11248 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11249
11250 #. type: Plain text
11251 #: build/C/man2/sync_file_range.2:183
11252 msgid ""
11253 "This system call is Linux-specific, and should be avoided in portable "
11254 "programs."
11255 msgstr ""
11256 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11257 "けるべきである。"
11258
11259 #. type: SS
11260 #: build/C/man2/sync_file_range.2:184
11261 #, no-wrap
11262 msgid "sync_file_range2()"
11263 msgstr ""
11264
11265 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11266 #. type: Plain text
11267 #: build/C/man2/sync_file_range.2:201
11268 msgid ""
11269 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11270 "in a suitable pair of registers.  On such architectures, the call signature "
11271 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11272 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11273 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11274 "different system call that orders the arguments suitably:"
11275 msgstr ""
11276 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
11277 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
11278 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
11279 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
11280 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
11281 "き数が適切な順序になった別のシステムコールが定義されている。"
11282
11283 #. type: Plain text
11284 #: build/C/man2/sync_file_range.2:206
11285 #, no-wrap
11286 msgid ""
11287 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11288 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11289 msgstr ""
11290 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11291 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11292
11293 #. type: Plain text
11294 #: build/C/man2/sync_file_range.2:211
11295 msgid ""
11296 "The behavior of this system call is otherwise exactly the same as "
11297 "B<sync_file_range>()."
11298 msgstr ""
11299 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11300 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11301 "glibc では提供されていない。"
11302
11303 #. type: Plain text
11304 #: build/C/man2/sync_file_range.2:222
11305 msgid ""
11306 "A system call with this signature first appeared on the ARM architecture in "
11307 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11308 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11309 "architectures where glibc support is provided, glibc transparently wraps "
11310 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11311 msgstr ""
11312 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
11313 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11314 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11315 "システムコールの名前が変更された。\n"
11316 "glibc によるサポートが提供されているアーキテクチャでは、\n"
11317 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11318 "B<sync_file_range2>() を適切に使用するようになっている。"
11319
11320 #. type: Plain text
11321 #: build/C/man2/sync_file_range.2:227
11322 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11323 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11324
11325 #~ msgid "2014-05-03"
11326 #~ msgstr "2014-05-03"
11327
11328 #~ msgid "2012-05-04"
11329 #~ msgstr "2012-05-04"
11330
11331 #~ msgid "2012-03-29"
11332 #~ msgstr "2012-03-29"
11333
11334 #~ msgid "2012-04-30"
11335 #~ msgstr "2012-04-30"
11336
11337 #~ msgid "2014-04-06"
11338 #~ msgstr "2014-04-06"
11339
11340 #~ msgid "2013-02-12"
11341 #~ msgstr "2013-02-12"
11342
11343 #~ msgid "2014-05-21"
11344 #~ msgstr "2014-05-21"
11345
11346 #~ msgid ""
11347 #~ "System-wide limit on the number of shared memory pages.  Since Linux 2.4, "
11348 #~ "the default value for this limit is"
11349 #~ msgstr ""
11350 #~ "システム全体の共有メモリ・ページ数の上限値。 Linux 2.2 以降では、この上限"
11351 #~ "値のデフォルトは以下である。"
11352
11353 #~ msgid "2014-04-28"
11354 #~ msgstr "2014-04-28"
11355
11356 #~ msgid ""
11357 #~ "Segment low boundary address multiple.  Must be page aligned.  For the "
11358 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
11359 #~ msgstr ""
11360 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
11361 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
11362
11363 #~ msgid "2013-04-01"
11364 #~ msgstr "2013-04-01"
11365
11366 #~ msgid "2014-05-10"
11367 #~ msgstr "2014-05-10"
11368
11369 #~ msgid "2008-04-22"
11370 #~ msgstr "2008-04-22"
11371
11372 #~ msgid "I<mode_flags>"
11373 #~ msgstr "I<mode_flags>"
11374
11375 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
11376 #~ msgstr ""
11377 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
11378
11379 #~ msgid ""
11380 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
11381 #~ "2^20 (2,097,152)."
11382 #~ msgstr ""
11383 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
11384 #~ "(2,097,152) になる。"
11385
11386 #~ msgid ""
11387 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
11388 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
11389 #~ "shmmax>)."
11390 #~ msgstr ""
11391 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
11392 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
11393 #~ "る)。"
11394
11395 #~ msgid ""
11396 #~ "System wide maximum number of shared memory segments: implementation "
11397 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
11398 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
11399 #~ msgstr ""
11400 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
11401 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
11402 #~ "で参照したり、変更したりできる)。"
11403
11404 #~ msgid ""
11405 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
11406 #~ msgstr ""
11407 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
11408 #~ "-1 が返される。"
11409
11410 #~ msgid ""
11411 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
11412 #~ "pair of registers.  On this architecture, the call signature of "
11413 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
11414 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
11415 #~ "2.6.14, ARM defines a different system call that orders the arguments "
11416 #~ "suitably:"
11417 #~ msgstr ""
11418 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
11419 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
11420 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
11421 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
11422 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
11423 #~ "システムコールが定義されている。"
11424
11425 #~ msgid ""
11426 #~ "The behavior of this system call is otherwise exactly the same as "
11427 #~ "B<posix_fadvise>().  No library support is provided for this system call "
11428 #~ "in glibc."
11429 #~ msgstr ""
11430 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
11431 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
11432 #~ "では提供されていない。"
11433
11434 #~ msgid ""
11435 #~ "The I<mode> is not supported by the file system containing the file "
11436 #~ "referred to by I<fd>."
11437 #~ msgstr ""
11438 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
11439 #~ "ない。"
11440
11441 #~ msgid ""
11442 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
11443 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
11444 #~ "these handlers."
11445 #~ msgstr ""
11446 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
11447 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
11448
11449 #~ msgid ""
11450 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
11451 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
11452 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
11453 #~ "truncated."
11454 #~ msgstr ""
11455 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
11456 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
11457 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
11458 #~ "イルの元の内容を上書きする。"
11459
11460 #~ msgid ""
11461 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
11462 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
11463 #~ msgstr ""
11464 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
11465 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
11466 #~ "リプトが付属している。"
11467
11468 #~ msgid ""
11469 #~ "This flag allocates and initializes to zero the disk space within the "
11470 #~ "range specified by I<offset> and I<len>.  After a successful call, "
11471 #~ "subsequent writes into this range are guaranteed not to fail because of "
11472 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
11473 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
11474 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
11475 #~ "less than I<offset>+I<len>."
11476 #~ msgstr ""
11477 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
11478 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
11479 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
11480 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
11481 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
11482 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
11483 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
11484 #~ "は変更されることはない。"