OSDN Git Service

(split) LDP: Translate several number of pages
[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: 2013-04-30 20:29+0900\n"
10 "PO-Revision-Date: 2013-05-06 01:59+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:38 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:38
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:39
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:41
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:47
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 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
202 "()  の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
203 "わないかもしれない。 アドレスは正しく配置されなければならない。"
204
205 #. type: Plain text
206 #: build/C/man2/alloc_hugepages.2:86
207 msgid ""
208 "The I<len> argument is the length of the required segment.  It must be a "
209 "multiple of the huge page size."
210 msgstr ""
211 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
212 "ズの倍数にしなければならない。"
213
214 #. type: Plain text
215 #: build/C/man2/alloc_hugepages.2:94
216 msgid ""
217 "The I<prot> argument specifies the memory protection of the segment.  It is "
218 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
219 msgstr ""
220 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
221 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
222
223 #. type: Plain text
224 #: build/C/man2/alloc_hugepages.2:109
225 msgid ""
226 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
227 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
228 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
229 "returned when no segment with the given key exists."
230 msgstr ""
231 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
232 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
233 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
234 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
235 "が返される。"
236
237 #. type: SH
238 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
239 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:112
240 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
241 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
242 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
243 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
244 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:78
245 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
246 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
247 #: build/C/man3/posix_memalign.3:141 build/C/man2/readahead.2:65
248 #: build/C/man2/remap_file_pages.2:124 build/C/man3/shm_open.3:169
249 #: build/C/man2/shmctl.2:279 build/C/man2/shmget.2:180
250 #: build/C/man2/shmop.2:171 build/C/man2/subpage_prot.2:66
251 #: build/C/man2/sync_file_range.2:141
252 #, no-wrap
253 msgid "RETURN VALUE"
254 msgstr "返り値"
255
256 #. type: Plain text
257 #: build/C/man2/alloc_hugepages.2:118
258 msgid ""
259 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
260 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
261 "is set appropriately."
262 msgstr ""
263 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
264 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
265 "に設定される。"
266
267 #. type: SH
268 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
269 #: build/C/man2/fallocate.2:115 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:53 build/C/man3/malloc_trim.3:56
271 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
272 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:85
273 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
274 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
275 #: build/C/man3/posix_memalign.3:155 build/C/man2/readahead.2:71
276 #: build/C/man2/remap_file_pages.2:131 build/C/man3/shm_open.3:178
277 #: build/C/man2/shmctl.2:301 build/C/man2/shmget.2:184
278 #: build/C/man2/shmop.2:185 build/C/man2/subpage_prot.2:71
279 #: build/C/man2/sync_file_range.2:147
280 #, no-wrap
281 msgid "ERRORS"
282 msgstr "エラー"
283
284 #. type: TP
285 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:154
286 #, no-wrap
287 msgid "B<ENOSYS>"
288 msgstr "B<ENOSYS>"
289
290 #. type: Plain text
291 #: build/C/man2/alloc_hugepages.2:122
292 msgid "The system call is not supported on this kernel."
293 msgstr "このシステムコールはカーネルでサポートされていない。"
294
295 #. type: SH
296 #: build/C/man2/alloc_hugepages.2:122
297 #, no-wrap
298 msgid "FILES"
299 msgstr "ファイル"
300
301 #. type: Plain text
302 #: build/C/man2/alloc_hugepages.2:126
303 msgid ""
304 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
305 "be read and written."
306 msgstr ""
307 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
308 "み書きできる。"
309
310 #. type: Plain text
311 #: build/C/man2/alloc_hugepages.2:130
312 msgid ""
313 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
314 "their size in the three variables HugePages_Total, HugePages_Free, "
315 "Hugepagesize."
316 msgstr ""
317 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
318 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
319 "る。"
320
321 #. type: SH
322 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:65
323 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:195
324 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:110
325 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
326 #: build/C/man3/malloc_info.3:61 build/C/man3/malloc_stats.3:55
327 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
328 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
329 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:497 build/C/man2/mmap2.2:77
330 #: build/C/man2/mprotect.2:113 build/C/man2/mremap.2:185
331 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
332 #: build/C/man2/posix_fadvise.2:112 build/C/man3/posix_fallocate.3:103
333 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
334 #: build/C/man2/remap_file_pages.2:153 build/C/man3/shm_open.3:249
335 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:373
336 #: build/C/man2/shmget.2:231 build/C/man2/shmop.2:231
337 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
338 #, no-wrap
339 msgid "CONFORMING TO"
340 msgstr "準拠"
341
342 #. type: Plain text
343 #: build/C/man2/alloc_hugepages.2:133
344 msgid ""
345 "These calls are specific to Linux on Intel processors, and should not be "
346 "used in programs intended to be portable."
347 msgstr ""
348 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
349 "必要なプログラムで使うべきでない。"
350
351 #. type: SH
352 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:73
353 #: build/C/man2/madvise.2:346 build/C/man3/malloc_get_state.3:88
354 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:63
355 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
356 #: build/C/man3/malloc_usable_size.3:50 build/C/man3/mcheck.3:147
357 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:515 build/C/man2/mmap2.2:79
358 #: build/C/man2/mprotect.2:122 build/C/man2/mremap.2:191
359 #: build/C/man3/mtrace.3:80 build/C/man2/posix_fadvise.2:121
360 #: build/C/man3/posix_memalign.3:219 build/C/man2/readahead.2:92
361 #: build/C/man3/shm_open.3:255 build/C/man7/shm_overview.7:103
362 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:237
363 #: build/C/man2/shmop.2:250 build/C/man2/subpage_prot.2:98
364 #: build/C/man2/sync_file_range.2:183
365 #, no-wrap
366 msgid "NOTES"
367 msgstr "注意"
368
369 #. type: Plain text
370 #: build/C/man2/alloc_hugepages.2:141
371 msgid ""
372 "These system calls are gone; they existed only in Linux 2.5.36 through to "
373 "2.5.54.  Now the hugetlbfs file system can be used instead.  Memory backed "
374 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
375 "map files in this virtual file system."
376 msgstr ""
377 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
378 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
379 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
380 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
381
382 #. type: Plain text
383 #: build/C/man2/alloc_hugepages.2:145
384 msgid ""
385 "The maximal number of huge pages can be specified using the B<hugepages=> "
386 "boot parameter."
387 msgstr ""
388 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
389
390 #. type: SH
391 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:155
392 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:203
393 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:279
394 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
395 #: build/C/man3/malloc_info.3:260 build/C/man3/malloc_stats.3:67
396 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:64
397 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
398 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:737 build/C/man2/mmap2.2:98
399 #: build/C/man2/mprotect.2:229 build/C/man2/mremap.2:214
400 #: build/C/man2/msync.2:122 build/C/man3/mtrace.3:172
401 #: build/C/man2/posix_fadvise.2:197 build/C/man3/posix_fallocate.3:133
402 #: build/C/man3/posix_memalign.3:275 build/C/man2/readahead.2:103
403 #: build/C/man2/remap_file_pages.2:164 build/C/man3/shm_open.3:280
404 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:430
405 #: build/C/man2/shmget.2:313 build/C/man2/shmop.2:295
406 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:226
407 #, no-wrap
408 msgid "COLOPHON"
409 msgstr "この文書について"
410
411 #. type: Plain text
412 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:162
413 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:210
414 #: build/C/man2/madvise.2:386 build/C/man3/mallinfo.3:286
415 #: build/C/man3/malloc_get_state.3:121 build/C/man3/malloc_hook.3:149
416 #: build/C/man3/malloc_info.3:267 build/C/man3/malloc_stats.3:74
417 #: build/C/man3/malloc_trim.3:89 build/C/man3/malloc_usable_size.3:71
418 #: build/C/man3/mallopt.3:587 build/C/man3/mcheck.3:215
419 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:744 build/C/man2/mmap2.2:105
420 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:221
421 #: build/C/man2/msync.2:129 build/C/man3/mtrace.3:179
422 #: build/C/man2/posix_fadvise.2:204 build/C/man3/posix_fallocate.3:140
423 #: build/C/man3/posix_memalign.3:282 build/C/man2/readahead.2:110
424 #: build/C/man2/remap_file_pages.2:171 build/C/man3/shm_open.3:287
425 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:437
426 #: build/C/man2/shmget.2:320 build/C/man2/shmop.2:302
427 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:233
428 msgid ""
429 "This page is part of release 3.51 of the Linux I<man-pages> project.  A "
430 "description of the project, and information about reporting bugs, can be "
431 "found at http://www.kernel.org/doc/man-pages/."
432 msgstr ""
433 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.51 の一部\n"
434 "である。プロジェクトの説明とバグ報告に関する情報は\n"
435 "http://www.kernel.org/doc/man-pages/ に書かれている。"
436
437 #. type: TH
438 #: build/C/man3/alloca.3:43
439 #, no-wrap
440 msgid "ALLOCA"
441 msgstr "ALLOCA"
442
443 #. type: TH
444 #: build/C/man3/alloca.3:43
445 #, no-wrap
446 msgid "2008-01-24"
447 msgstr "2008-01-24"
448
449 #. type: TH
450 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
451 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
452 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
453 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
454 #: build/C/man3/posix_memalign.3:29
455 #, no-wrap
456 msgid "GNU"
457 msgstr "GNU"
458
459 #. type: Plain text
460 #: build/C/man3/alloca.3:46
461 msgid "alloca - allocate memory that is automatically freed"
462 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
463
464 #. type: Plain text
465 #: build/C/man3/alloca.3:48
466 msgid "B<#include E<lt>alloca.hE<gt>>"
467 msgstr "B<#include E<lt>alloca.hE<gt>>"
468
469 #. type: Plain text
470 #: build/C/man3/alloca.3:50
471 msgid "B<void *alloca(size_t >I<size>B<);>"
472 msgstr "B<void *alloca(size_t >I<size>B<);>"
473
474 #. type: Plain text
475 #: build/C/man3/alloca.3:60
476 msgid ""
477 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
478 "frame of the caller.  This temporary space is automatically freed when the "
479 "function that called B<alloca>()  returns to its caller."
480 msgstr ""
481 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
482 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
483 "に自動的に解放される。"
484
485 #. type: Plain text
486 #: build/C/man3/alloca.3:65
487 msgid ""
488 "The B<alloca>()  function returns a pointer to the beginning of the "
489 "allocated space.  If the allocation causes stack overflow, program behavior "
490 "is undefined."
491 msgstr ""
492 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
493 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
494 "い。"
495
496 #. type: Plain text
497 #: build/C/man3/alloca.3:67
498 msgid "This function is not in POSIX.1-2001."
499 msgstr "この関数は POSIX.1-2001 にはない。"
500
501 #. type: Plain text
502 #: build/C/man3/alloca.3:73
503 msgid ""
504 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
505 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
506 "the GNU version."
507 msgstr ""
508 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
509 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
510 "は POSIX.1-2001 にはない。"
511
512 #. type: Plain text
513 #: build/C/man3/alloca.3:88
514 msgid ""
515 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
516 "applications, its use can improve efficiency compared to the use of B<malloc>"
517 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
518 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
519 "Otherwise, its use is discouraged."
520 msgstr ""
521 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
522 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
523 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
524 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
525 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
526
527 #. type: Plain text
528 #: build/C/man3/alloca.3:97
529 msgid ""
530 "Because the space allocated by B<alloca>()  is allocated within the stack "
531 "frame, that space is automatically freed if the function return is jumped "
532 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
533 msgstr ""
534 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
535 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
536 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
537
538 #. type: Plain text
539 #: build/C/man3/alloca.3:102
540 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
541 msgstr ""
542 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
543 "に!"
544
545 #. type: SS
546 #: build/C/man3/alloca.3:102
547 #, no-wrap
548 msgid "Notes on the GNU version"
549 msgstr "GNU 版についての注意"
550
551 #. type: Plain text
552 #: build/C/man3/alloca.3:124
553 msgid ""
554 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
555 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
556 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
557 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
558 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
559 msgstr ""
560 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
561 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
562 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
563 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
564 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
565 "ので注意すること。"
566
567 #. type: Plain text
568 #: build/C/man3/alloca.3:127
569 #, no-wrap
570 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
571 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
572
573 #. type: Plain text
574 #: build/C/man3/alloca.3:130
575 msgid "with messy consequences if one has a private version of this function."
576 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
577
578 #. type: Plain text
579 #: build/C/man3/alloca.3:134
580 msgid ""
581 "The fact that the code is inlined means that it is impossible to take the "
582 "address of this function, or to change its behavior by linking with a "
583 "different library."
584 msgstr ""
585 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
586 "のライブラリをリンクして動作を変更することはできない。"
587
588 #. type: Plain text
589 #: build/C/man3/alloca.3:138
590 msgid ""
591 "The inlined code often consists of a single instruction adjusting the stack "
592 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
593 "error return."
594 msgstr ""
595 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
596 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
597 "よって NULL エラーが返されることはない。"
598
599 #. type: SH
600 #: build/C/man3/alloca.3:138 build/C/man2/cacheflush.2:82
601 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
602 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
603 #: build/C/man2/posix_fadvise.2:186 build/C/man2/shmget.2:299
604 #, no-wrap
605 msgid "BUGS"
606 msgstr "バグ"
607
608 #. type: Plain text
609 #: build/C/man3/alloca.3:143
610 msgid ""
611 "There is no error indication if the stack frame cannot be extended.  "
612 "(However, after a failed allocation, the program is likely to receive a "
613 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
614 msgstr ""
615 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
616 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
617 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
618
619 #. type: Plain text
620 #: build/C/man3/alloca.3:151
621 msgid ""
622 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
623 "a function call, because the stack space reserved by B<alloca>()  would "
624 "appear on the stack in the middle of the space for the function arguments."
625 msgstr ""
626 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
627 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
628 "使われるスタック領域の中に現れてしまうためである。"
629
630 #. type: SH
631 #: build/C/man3/alloca.3:151 build/C/man2/fallocate.2:198
632 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
633 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
634 #: build/C/man3/malloc_info.3:254 build/C/man3/malloc_stats.3:61
635 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
636 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
637 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
638 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
639 #: build/C/man2/msync.2:118 build/C/man3/mtrace.3:167
640 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
641 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:97
642 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:269
643 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:423
644 #: build/C/man2/shmget.2:305 build/C/man2/shmop.2:287
645 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
646 #, no-wrap
647 msgid "SEE ALSO"
648 msgstr "関連項目"
649
650 #. type: Plain text
651 #: build/C/man3/alloca.3:155
652 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
653 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
654
655 #. type: TH
656 #: build/C/man2/cacheflush.2:25
657 #, no-wrap
658 msgid "CACHEFLUSH"
659 msgstr "CACHEFLUSH"
660
661 #. type: TH
662 #: build/C/man2/cacheflush.2:25
663 #, no-wrap
664 msgid "2007-05-26"
665 msgstr "2007-05-26"
666
667 #. type: Plain text
668 #: build/C/man2/cacheflush.2:28
669 msgid "cacheflush - flush contents of instruction and/or data cache"
670 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
671
672 #. type: Plain text
673 #: build/C/man2/cacheflush.2:31
674 #, no-wrap
675 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
676 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
677
678 #. type: Plain text
679 #: build/C/man2/cacheflush.2:33
680 #, no-wrap
681 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
682 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
683
684 #. type: Plain text
685 #: build/C/man2/cacheflush.2:43
686 msgid ""
687 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
688 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
689 "of:"
690 msgstr ""
691 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
692 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
693 "指定する:"
694
695 #. type: TP
696 #: build/C/man2/cacheflush.2:43
697 #, no-wrap
698 msgid "B<ICACHE>"
699 msgstr "B<ICACHE>"
700
701 #. type: Plain text
702 #: build/C/man2/cacheflush.2:46
703 msgid "Flush the instruction cache."
704 msgstr "命令 (instruction) キャッシュをフラッシュする。"
705
706 #. type: TP
707 #: build/C/man2/cacheflush.2:46
708 #, no-wrap
709 msgid "B<DCACHE>"
710 msgstr "B<DCACHE>"
711
712 #. type: Plain text
713 #: build/C/man2/cacheflush.2:49
714 msgid "Write back to memory and invalidate the affected valid cache lines."
715 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
716
717 #. type: TP
718 #: build/C/man2/cacheflush.2:49
719 #, no-wrap
720 msgid "B<BCACHE>"
721 msgstr "B<BCACHE>"
722
723 #. type: Plain text
724 #: build/C/man2/cacheflush.2:53
725 msgid "Same as B<(ICACHE|DCACHE)>."
726 msgstr "B<(ICACHE|DCACHE)> と同じ。"
727
728 #. type: Plain text
729 #: build/C/man2/cacheflush.2:59
730 msgid ""
731 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
732 "detected, I<errno> will indicate the error."
733 msgstr ""
734 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
735 "出された場合は I<errno> にエラーが指示される。"
736
737 #. type: TP
738 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
739 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:310
740 #: build/C/man2/subpage_prot.2:72
741 #, no-wrap
742 msgid "B<EFAULT>"
743 msgstr "B<EFAULT>"
744
745 #. type: Plain text
746 #: build/C/man2/cacheflush.2:67
747 msgid ""
748 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
749 "accessible."
750 msgstr ""
751 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
752 "能ではない。"
753
754 #. type: TP
755 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:127
756 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:54
757 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
758 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
759 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
760 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
761 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
762 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
763 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
764 #: build/C/man3/shm_open.3:211 build/C/man2/shmctl.2:324
765 #: build/C/man2/shmget.2:198 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
766 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
767 #, no-wrap
768 msgid "B<EINVAL>"
769 msgstr "B<EINVAL>"
770
771 #. type: Plain text
772 #: build/C/man2/cacheflush.2:75
773 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
774 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
775
776 #.  FIXME This system call was only on MIPS back in 1.2 days, but
777 #.  by now it is on a number of other architectures (but not i386).
778 #.  Investigate the details and update this page.
779 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
780 #. type: Plain text
781 #: build/C/man2/cacheflush.2:82
782 msgid ""
783 "This Linux-specific system call is available only on MIPS-based systems.  It "
784 "should not be used in programs intended to be portable."
785 msgstr ""
786 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
787 "植を意図したプログラムで使用すべきではない。"
788
789 #. type: Plain text
790 #: build/C/man2/cacheflush.2:89
791 msgid ""
792 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
793 "Therefore, the whole cache is always flushed."
794 msgstr ""
795 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
796 "のキャッシュがフラッシュされる。"
797
798 #. type: TH
799 #: build/C/man2/fallocate.2:11
800 #, no-wrap
801 msgid "FALLOCATE"
802 msgstr "FALLOCATE"
803
804 #. type: TH
805 #: build/C/man2/fallocate.2:11 build/C/man3/posix_fallocate.3:25
806 #: build/C/man2/shmop.2:41
807 #, no-wrap
808 msgid "2013-02-12"
809 msgstr "2013-02-12"
810
811 #. type: Plain text
812 #: build/C/man2/fallocate.2:14
813 msgid "fallocate - manipulate file space"
814 msgstr "fallocate - ファイル空間の操作"
815
816 #. type: Plain text
817 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
818 #, no-wrap
819 msgid ""
820 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
821 "B<#include E<lt>fcntl.hE<gt>>\n"
822 msgstr ""
823 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
824 "B<#include E<lt>fcntl.hE<gt>>\n"
825
826 #. type: Plain text
827 #: build/C/man2/fallocate.2:21
828 #, no-wrap
829 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
830 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
831
832 #. type: Plain text
833 #: build/C/man2/fallocate.2:27
834 msgid ""
835 "This is a nonportable, Linux-specific system call.  For the portable, "
836 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
837 "B<posix_fallocate>(3)."
838 msgstr ""
839 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
840 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
841 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
842
843 #. type: Plain text
844 #: build/C/man2/fallocate.2:37
845 msgid ""
846 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
847 "space for the file referred to by I<fd> for the byte range starting at "
848 "I<offset> and continuing for I<len> bytes."
849 msgstr ""
850 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
851 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
852 "域である。"
853
854 #. type: Plain text
855 #: build/C/man2/fallocate.2:42
856 msgid ""
857 "The I<mode> argument determines the operation to be performed on the given "
858 "range.  Details of the supported operations are given in the subsections "
859 "below."
860 msgstr ""
861 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
862 "サポートされている操作の詳細は以下のサブセクションで説明する。"
863
864 #. type: SS
865 #: build/C/man2/fallocate.2:42
866 #, no-wrap
867 msgid "Allocating disk space"
868 msgstr "ディスク領域の割り当て"
869
870 #. type: Plain text
871 #: build/C/man2/fallocate.2:61
872 msgid ""
873 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
874 "and initializes to zero the disk space within the range specified by "
875 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
876 "changed if I<offset>+I<len> is greater than the file size.  This default "
877 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
878 "library function, and is intended as a method of optimally implementing that "
879 "function."
880 msgstr ""
881 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
882 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
883 "う。\n"
884 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
885 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
886 "は、\n"
887 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
888 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
889 "ことを目的としているからである。"
890
891 #. type: Plain text
892 #: build/C/man2/fallocate.2:67
893 msgid ""
894 "After a successful call, subsequent writes into the range specified by "
895 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
896 "space."
897 msgstr ""
898 "呼び出しが成功した場合、\n"
899 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
900 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
901
902 #. type: Plain text
903 #: build/C/man2/fallocate.2:78
904 msgid ""
905 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
906 "the call is similar, but the file size will not be changed even if I<offset>"
907 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
908 "the end of the file in this manner is useful for optimizing append workloads."
909 msgstr ""
910 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
911 "ル\n"
912 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
913 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
914 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
915 "追記を最適化したい場合に役に立つ。"
916
917 #. type: Plain text
918 #: build/C/man2/fallocate.2:82
919 msgid ""
920 "Because allocation is done in block size chunks, B<fallocate>()  may "
921 "allocate a larger range of disk space than was specified."
922 msgstr ""
923 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
924 "り\n"
925 "も大きなディスク領域を割り当てることがある。"
926
927 #. type: SS
928 #: build/C/man2/fallocate.2:82
929 #, no-wrap
930 msgid "Deallocating file space"
931 msgstr "ファイル空間の割り当て解除"
932
933 #. type: Plain text
934 #: build/C/man2/fallocate.2:97
935 msgid ""
936 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
937 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
938 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
939 "range, partial file system blocks are zeroed, and whole file system blocks "
940 "are removed from the file.  After a successful call, subsequent reads from "
941 "this range will return zeroes."
942 msgstr ""
943
944 #. type: Plain text
945 #: build/C/man2/fallocate.2:108
946 msgid ""
947 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
948 "I<mode>; in other words, even when punching off the end of the file, the "
949 "file size (as reported by B<stat>(2))  does not change."
950 msgstr ""
951
952 #. type: Plain text
953 #: build/C/man2/fallocate.2:112
954 msgid ""
955 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
956 "doesn't support the operation, an error is returned."
957 msgstr ""
958
959 #. type: Plain text
960 #: build/C/man2/fallocate.2:115
961 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
962 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
963
964 #. type: TP
965 #: build/C/man2/fallocate.2:116 build/C/man2/madvise.2:279
966 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
967 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
968 #: build/C/man2/sync_file_range.2:148
969 #, no-wrap
970 msgid "B<EBADF>"
971 msgstr "B<EBADF>"
972
973 #. type: Plain text
974 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
975 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
976 msgstr ""
977 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
978 "いない。"
979
980 #. type: TP
981 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
982 #, no-wrap
983 msgid "B<EFBIG>"
984 msgstr "B<EFBIG>"
985
986 #. type: Plain text
987 #: build/C/man2/fallocate.2:124
988 msgid "I<offset>+I<len> exceeds the maximum file size."
989 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
990
991 #. type: TP
992 #: build/C/man2/fallocate.2:124
993 #, no-wrap
994 msgid "B<EINTR>"
995 msgstr "B<EINTR>"
996
997 #. type: Plain text
998 #: build/C/man2/fallocate.2:127
999 msgid "A signal was caught during execution."
1000 msgstr "実行中にシグナルが捕捉された。"
1001
1002 #. type: Plain text
1003 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:87
1004 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1005 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1006
1007 #. type: TP
1008 #: build/C/man2/fallocate.2:139 build/C/man2/madvise.2:310
1009 #: build/C/man2/sync_file_range.2:160
1010 #, no-wrap
1011 msgid "B<EIO>"
1012 msgstr "B<EIO>"
1013
1014 #. type: Plain text
1015 #: build/C/man2/fallocate.2:142
1016 msgid "An I/O error occurred while reading from or writing to a file system."
1017 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1018
1019 #. type: TP
1020 #: build/C/man2/fallocate.2:142 build/C/man2/mmap.2:452
1021 #: build/C/man3/posix_fallocate.3:87
1022 #, no-wrap
1023 msgid "B<ENODEV>"
1024 msgstr "B<ENODEV>"
1025
1026 #. type: Plain text
1027 #: build/C/man2/fallocate.2:149
1028 msgid ""
1029 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1030 "or FIFO, a different error results.)"
1031 msgstr ""
1032 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1033 "を参照している場合、別のエラーが発生する)。"
1034
1035 #. type: TP
1036 #: build/C/man2/fallocate.2:149 build/C/man3/posix_fallocate.3:91
1037 #: build/C/man2/shmget.2:216 build/C/man2/sync_file_range.2:166
1038 #, no-wrap
1039 msgid "B<ENOSPC>"
1040 msgstr "B<ENOSPC>"
1041
1042 #. type: Plain text
1043 #: build/C/man2/fallocate.2:154 build/C/man3/posix_fallocate.3:96
1044 msgid ""
1045 "There is not enough space left on the device containing the file referred to "
1046 "by I<fd>."
1047 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1048
1049 #. type: Plain text
1050 #: build/C/man2/fallocate.2:158
1051 msgid "This kernel does not implement B<fallocate>()."
1052 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1053
1054 #. type: TP
1055 #: build/C/man2/fallocate.2:158
1056 #, no-wrap
1057 msgid "B<EOPNOTSUPP>"
1058 msgstr "B<EOPNOTSUPP>"
1059
1060 #. type: Plain text
1061 #: build/C/man2/fallocate.2:167
1062 msgid ""
1063 "The file system containing the file referred to by I<fd> does not support "
1064 "this operation; or the I<mode> is not supported by the file system "
1065 "containing the file referred to by I<fd>."
1066 msgstr ""
1067 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1068 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1069 "I<mode> をサポートしていない。"
1070
1071 #. type: TP
1072 #: build/C/man2/fallocate.2:167 build/C/man2/mlock.2:143
1073 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:349
1074 #: build/C/man2/shmget.2:224
1075 #, no-wrap
1076 msgid "B<EPERM>"
1077 msgstr "B<EPERM>"
1078
1079 #. type: Plain text
1080 #: build/C/man2/fallocate.2:183
1081 msgid ""
1082 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1083 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1084 "is marked append-only (see B<chattr>(1))."
1085 msgstr ""
1086
1087 #. type: TP
1088 #: build/C/man2/fallocate.2:183 build/C/man2/posix_fadvise.2:97
1089 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1090 #, no-wrap
1091 msgid "B<ESPIPE>"
1092 msgstr "B<ESPIPE>"
1093
1094 #. type: Plain text
1095 #: build/C/man2/fallocate.2:187
1096 msgid "I<fd> refers to a pipe or FIFO."
1097 msgstr "I<fd> がパイプか FIFO を参照している。"
1098
1099 #. type: SH
1100 #: build/C/man2/fallocate.2:187 build/C/man3/malloc_info.3:58
1101 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1102 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1103 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1104 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:247
1105 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1106 #, no-wrap
1107 msgid "VERSIONS"
1108 msgstr "バージョン"
1109
1110 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1111 #. type: Plain text
1112 #: build/C/man2/fallocate.2:195
1113 msgid ""
1114 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1115 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1116 "in glibc headers only since version 2.18."
1117 msgstr ""
1118 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1119 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1120 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1121
1122 #. type: Plain text
1123 #: build/C/man2/fallocate.2:198
1124 msgid "B<fallocate>()  is Linux-specific."
1125 msgstr "B<fallocate>()  は Linux 固有である。"
1126
1127 #. type: Plain text
1128 #: build/C/man2/fallocate.2:203
1129 msgid ""
1130 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1131 msgstr ""
1132 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1133
1134 #. type: TH
1135 #: build/C/man2/madvise.2:35
1136 #, no-wrap
1137 msgid "MADVISE"
1138 msgstr "MADVISE"
1139
1140 #. type: TH
1141 #: build/C/man2/madvise.2:35 build/C/man3/malloc_info.3:25
1142 #, no-wrap
1143 msgid "2012-04-28"
1144 msgstr "2012-04-28"
1145
1146 #. type: Plain text
1147 #: build/C/man2/madvise.2:38
1148 msgid "madvise - give advice about use of memory"
1149 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1150
1151 #. type: Plain text
1152 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1153 #: build/C/man3/shm_open.3:31
1154 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1155 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1156
1157 #. type: Plain text
1158 #: build/C/man2/madvise.2:42
1159 msgid ""
1160 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1161 msgstr ""
1162 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1163
1164 #. type: Plain text
1165 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1166 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1167 msgid ""
1168 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1169 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1170
1171 #. type: Plain text
1172 #: build/C/man2/madvise.2:50
1173 msgid "B<madvise>(): _BSD_SOURCE"
1174 msgstr "B<madvise>(): _BSD_SOURCE"
1175
1176 #. type: Plain text
1177 #: build/C/man2/madvise.2:68
1178 msgid ""
1179 "The B<madvise>()  system call advises the kernel about how to handle paging "
1180 "input/output in the address range beginning at address I<addr> and with size "
1181 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1182 "to use some mapped or shared memory areas, so that the kernel can choose "
1183 "appropriate read-ahead and caching techniques.  This call does not influence "
1184 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1185 "but may influence its performance.  The kernel is free to ignore the advice."
1186 msgstr ""
1187 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1188 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1189 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1190 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1191 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1192 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1193 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1194
1195 #. type: Plain text
1196 #: build/C/man2/madvise.2:72
1197 msgid "The advice is indicated in the I<advice> argument which can be"
1198 msgstr ""
1199 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1200
1201 #. type: TP
1202 #: build/C/man2/madvise.2:72
1203 #, no-wrap
1204 msgid "B<MADV_NORMAL>"
1205 msgstr "B<MADV_NORMAL>"
1206
1207 #. type: Plain text
1208 #: build/C/man2/madvise.2:76
1209 msgid "No special treatment.  This is the default."
1210 msgstr "特別な扱いは行わない。これがデフォルトである。"
1211
1212 #. type: TP
1213 #: build/C/man2/madvise.2:76
1214 #, no-wrap
1215 msgid "B<MADV_RANDOM>"
1216 msgstr "B<MADV_RANDOM>"
1217
1218 #. type: Plain text
1219 #: build/C/man2/madvise.2:80
1220 msgid ""
1221 "Expect page references in random order.  (Hence, read ahead may be less "
1222 "useful than normally.)"
1223 msgstr ""
1224 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1225 "なさそうだ。)"
1226
1227 #. type: TP
1228 #: build/C/man2/madvise.2:80
1229 #, no-wrap
1230 msgid "B<MADV_SEQUENTIAL>"
1231 msgstr "B<MADV_SEQUENTIAL>"
1232
1233 #. type: Plain text
1234 #: build/C/man2/madvise.2:85
1235 msgid ""
1236 "Expect page references in sequential order.  (Hence, pages in the given "
1237 "range can be aggressively read ahead, and may be freed soon after they are "
1238 "accessed.)"
1239 msgstr ""
1240 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1241 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1242 "して良い。)"
1243
1244 #. type: TP
1245 #: build/C/man2/madvise.2:85
1246 #, no-wrap
1247 msgid "B<MADV_WILLNEED>"
1248 msgstr "B<MADV_WILLNEED>"
1249
1250 #. type: Plain text
1251 #: build/C/man2/madvise.2:89
1252 msgid ""
1253 "Expect access in the near future.  (Hence, it might be a good idea to read "
1254 "some pages ahead.)"
1255 msgstr ""
1256 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1257 "ておくといいだろう。)"
1258
1259 #. type: TP
1260 #: build/C/man2/madvise.2:89
1261 #, no-wrap
1262 msgid "B<MADV_DONTNEED>"
1263 msgstr "B<MADV_DONTNEED>"
1264
1265 #. type: Plain text
1266 #: build/C/man2/madvise.2:100
1267 msgid ""
1268 "Do not expect access in the near future.  (For the time being, the "
1269 "application is finished with the given range, so the kernel can free "
1270 "resources associated with it.)  Subsequent accesses of pages in this range "
1271 "will succeed, but will result either in reloading of the memory contents "
1272 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1273 "pages for mappings without an underlying file."
1274 msgstr ""
1275 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1276 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1277 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1278 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1279 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1280 "なる。"
1281
1282 #. type: TP
1283 #: build/C/man2/madvise.2:100
1284 #, no-wrap
1285 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1286 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1287
1288 #.  2.6.18-rc5
1289 #.  Databases want to use this feature to drop a section of their
1290 #.  bufferpool (shared memory segments) - without writing back to
1291 #.  disk/swap space.  This feature is also useful for supporting
1292 #.  hot-plug memory on UML.
1293 #. type: Plain text
1294 #: build/C/man2/madvise.2:113
1295 msgid ""
1296 "Free up a given range of pages and its associated backing store.  Currently, "
1297 "only shmfs/tmpfs supports this; other file systems return with the error "
1298 "B<ENOSYS>."
1299 msgstr ""
1300 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1301 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1302 "返される。"
1303
1304 #. type: TP
1305 #: build/C/man2/madvise.2:113
1306 #, no-wrap
1307 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1308 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1309
1310 #.  See http://lwn.net/Articles/171941/
1311 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1312 #.  Currently, copy-on-write may change the physical address of
1313 #.  a page even if the user requested that the page is pinned in
1314 #.  memory (either by mlock or by get_user_pages).  This happens
1315 #.  if the process forks meanwhile, and the parent writes to that
1316 #.  page.  As a result, the page is orphaned: in case of
1317 #.  get_user_pages, the application will never see any data hardware
1318 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1319 #.  the parent is not getting the realtime/security benefits of mlock.
1320 #.  In particular, this affects the Infiniband modules which do DMA from
1321 #.  and into user pages all the time.
1322 #.  This patch adds madvise options to control whether memory range is
1323 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1324 #.  from/into these pages.  Could also be useful to an application
1325 #.  wanting to speed up its forks by cutting large areas out of
1326 #.  consideration.
1327 #.  SEE ALSO: http://lwn.net/Articles/171941/
1328 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1329 #. type: Plain text
1330 #: build/C/man2/madvise.2:144
1331 msgid ""
1332 "Do not make the pages in this range available to the child after a B<fork>"
1333 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1334 "physical location of a page(s) if the parent writes to it after a B<fork>"
1335 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1336 "page(s).)"
1337 msgstr ""
1338 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1339 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1340 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1341 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1342 "を行うような場合に 問題を起こすことがある)。"
1343
1344 #. type: TP
1345 #: build/C/man2/madvise.2:144
1346 #, no-wrap
1347 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1348 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1349
1350 #. type: Plain text
1351 #: build/C/man2/madvise.2:150
1352 msgid ""
1353 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1354 "a mapping is inherited across B<fork>(2)."
1355 msgstr ""
1356 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1357 "(2)  の前後でマッピングは継承されるようになる。"
1358
1359 #. type: TP
1360 #: build/C/man2/madvise.2:150
1361 #, no-wrap
1362 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1363 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1364
1365 #. type: Plain text
1366 #: build/C/man2/madvise.2:162
1367 msgid ""
1368 "Poison a page and handle it like a hardware memory corruption.  This "
1369 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1370 "This operation may result in the calling process receiving a B<SIGBUS> and "
1371 "the page being unmapped.  This feature is intended for testing of memory "
1372 "error-handling code; it is available only if the kernel was configured with "
1373 "B<CONFIG_MEMORY_FAILURE>."
1374 msgstr ""
1375
1376 #. type: TP
1377 #: build/C/man2/madvise.2:162
1378 #, no-wrap
1379 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1380 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1381
1382 #. type: Plain text
1383 #: build/C/man2/madvise.2:180
1384 msgid ""
1385 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1386 "memory of each page in the specified range is preserved (i.e., when next "
1387 "accessed, the same content will be visible, but in a new physical page "
1388 "frame), and the original page is offlined (i.e., no longer used, and taken "
1389 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1390 "operation is invisible to (i.e., does not change the semantics of)  the "
1391 "calling process.  This feature is intended for testing of memory error-"
1392 "handling code; it is available only if the kernel was configured with "
1393 "B<CONFIG_MEMORY_FAILURE>."
1394 msgstr ""
1395
1396 #. type: TP
1397 #: build/C/man2/madvise.2:180
1398 #, no-wrap
1399 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1400 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1401
1402 #. type: Plain text
1403 #: build/C/man2/madvise.2:205
1404 msgid ""
1405 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1406 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1407 "memory that have been marked as mergeable, looking for pages with identical "
1408 "content.  These are replaced by a single write-protected page (which is "
1409 "automatically copied if a process later wants to update the content of the "
1410 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1411 "feature is intended for applications that generate many instances of the "
1412 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1413 "of processing power; use with care.  See the Linux kernel source file "
1414 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1415 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1416 "configured with B<CONFIG_KSM>."
1417 msgstr ""
1418
1419 #. type: TP
1420 #: build/C/man2/madvise.2:205
1421 #, no-wrap
1422 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1423 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1424
1425 #. type: Plain text
1426 #: build/C/man2/madvise.2:214
1427 msgid ""
1428 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1429 "address range; KSM unmerges whatever pages it had merged in the address "
1430 "range specified by I<addr> and I<length>."
1431 msgstr ""
1432
1433 #. type: TP
1434 #: build/C/man2/madvise.2:214
1435 #, no-wrap
1436 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1437 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1438
1439 #.  http://lwn.net/Articles/358904/
1440 #.  https://lwn.net/Articles/423584/
1441 #. type: Plain text
1442 #: build/C/man2/madvise.2:243
1443 msgid ""
1444 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1445 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1446 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1447 "the areas marked as huge page candidates to replace them with huge pages.  "
1448 "The kernel will also allocate huge pages directly when the region is "
1449 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1450 "feature is primarily aimed at applications that use large mappings of data "
1451 "and access large regions of that memory at a time (e.g., virtualization "
1452 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1453 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1454 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1455 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1456 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1457 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1458 msgstr ""
1459
1460 #. type: TP
1461 #: build/C/man2/madvise.2:243
1462 #, no-wrap
1463 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1464 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1465
1466 #. type: Plain text
1467 #: build/C/man2/madvise.2:250
1468 msgid ""
1469 "Ensures that memory in the address range specified by I<addr> and I<length> "
1470 "will not be collapsed into huge pages."
1471 msgstr ""
1472
1473 #. type: TP
1474 #: build/C/man2/madvise.2:250
1475 #, no-wrap
1476 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1477 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1478
1479 #. type: Plain text
1480 #: build/C/man2/madvise.2:264
1481 msgid ""
1482 "Exclude from a core dump those pages in the range specified by I<addr> and "
1483 "I<length>.  This is useful in applications that have large areas of memory "
1484 "that are known not to be useful in a core dump.  The effect of "
1485 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1486 "proc/PID/coredump_filter> file (see B<core>(5))."
1487 msgstr ""
1488
1489 #. type: TP
1490 #: build/C/man2/madvise.2:264
1491 #, no-wrap
1492 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1493 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1494
1495 #. type: Plain text
1496 #: build/C/man2/madvise.2:268
1497 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1498 msgstr ""
1499
1500 #. type: Plain text
1501 #: build/C/man2/madvise.2:275
1502 msgid ""
1503 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1504 "is set appropriately."
1505 msgstr ""
1506 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1507 "を適切な値に設定する。"
1508
1509 #. type: TP
1510 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1511 #: build/C/man2/mremap.2:136
1512 #, no-wrap
1513 msgid "B<EAGAIN>"
1514 msgstr "B<EAGAIN>"
1515
1516 #. type: Plain text
1517 #: build/C/man2/madvise.2:279
1518 msgid "A kernel resource was temporarily unavailable."
1519 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1520
1521 #. type: Plain text
1522 #: build/C/man2/madvise.2:282
1523 msgid "The map exists, but the area maps something that isn't a file."
1524 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1525
1526 #. type: Plain text
1527 #: build/C/man2/madvise.2:285
1528 msgid "This error can occur for the following reasons:"
1529 msgstr ""
1530
1531 #. type: IP
1532 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1533 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1534 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1535 #: build/C/man3/mallopt.3:241
1536 #, no-wrap
1537 msgid "*"
1538 msgstr "*"
1539
1540 #.  .I len
1541 #.  is zero,
1542 #. type: Plain text
1543 #: build/C/man2/madvise.2:292
1544 msgid "The value I<len> is negative."
1545 msgstr "I<len> が負の値である。"
1546
1547 #. type: Plain text
1548 #: build/C/man2/madvise.2:295
1549 msgid "I<addr> is not page-aligned."
1550 msgstr ""
1551
1552 #. type: Plain text
1553 #: build/C/man2/madvise.2:298
1554 msgid "I<advice> is not a valid value"
1555 msgstr "I<advice> が有効な値でない。"
1556
1557 #. type: Plain text
1558 #: build/C/man2/madvise.2:301
1559 msgid ""
1560 "The application is attempting to release locked or shared pages (with "
1561 "B<MADV_DONTNEED>)."
1562 msgstr ""
1563 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1564 "放\n"
1565 "しようとしている。"
1566
1567 #. type: Plain text
1568 #: build/C/man2/madvise.2:309
1569 msgid ""
1570 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1571 "kernel was not configured with B<CONFIG_KSM>."
1572 msgstr ""
1573
1574 #. type: Plain text
1575 #: build/C/man2/madvise.2:316
1576 msgid ""
1577 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1578 "maximum resident set size."
1579 msgstr ""
1580 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1581 "(resident set size) の最大値を越えてしまう。"
1582
1583 #. type: TP
1584 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1585 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1586 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1587 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1588 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1589 #: build/C/man2/shmctl.2:333 build/C/man2/shmget.2:213
1590 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1591 #: build/C/man2/sync_file_range.2:163
1592 #, no-wrap
1593 msgid "B<ENOMEM>"
1594 msgstr "B<ENOMEM>"
1595
1596 #. type: Plain text
1597 #: build/C/man2/madvise.2:321
1598 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1599 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1600
1601 #. type: Plain text
1602 #: build/C/man2/madvise.2:325
1603 msgid ""
1604 "Addresses in the specified range are not currently mapped, or are outside "
1605 "the address space of the process."
1606 msgstr ""
1607 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1608 "空間の内部にない。"
1609
1610 #.  FIXME . Write a posix_madvise(3) page.
1611 #. type: Plain text
1612 #: build/C/man2/madvise.2:337
1613 msgid ""
1614 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1615 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1616 "There is a similar B<posix_fadvise>(2)  for file access."
1617 msgstr ""
1618 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1619 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1620 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1621 "する。"
1622
1623 #. type: Plain text
1624 #: build/C/man2/madvise.2:346
1625 msgid ""
1626 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1627 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1628 msgstr ""
1629 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1630 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1631
1632 #. type: SS
1633 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1634 #: build/C/man2/shmget.2:293
1635 #, no-wrap
1636 msgid "Linux notes"
1637 msgstr "Linux での注意"
1638
1639 #. type: Plain text
1640 #: build/C/man2/madvise.2:355
1641 msgid ""
1642 "The current Linux implementation (2.4.0) views this system call more as a "
1643 "command than as advice and hence may return an error when it cannot do what "
1644 "it usually would do in response to this advice.  (See the ERRORS description "
1645 "above.)  This is nonstandard behavior."
1646 msgstr ""
1647 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1648 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1649 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1650 "とは異なる。"
1651
1652 #.  .SH HISTORY
1653 #.  The
1654 #.  .BR madvise ()
1655 #.  function first appeared in 4.4BSD.
1656 #. type: Plain text
1657 #: build/C/man2/madvise.2:371
1658 msgid ""
1659 "The Linux implementation requires that the address I<addr> be page-aligned, "
1660 "and allows I<length> to be zero.  If there are some parts of the specified "
1661 "address range that are not mapped, the Linux version of B<madvise>()  "
1662 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1663 "the system call, as it should)."
1664 msgstr ""
1665 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1666 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1667 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1668 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1669 "返す)。"
1670
1671 #. type: Plain text
1672 #: build/C/man2/madvise.2:379
1673 msgid ""
1674 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1675 "B<munmap>(2), B<core>(5)"
1676 msgstr ""
1677 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1678 "B<munmap>(2), B<core>(5)"
1679
1680 #. type: TH
1681 #: build/C/man3/mallinfo.3:26
1682 #, no-wrap
1683 msgid "MALLINFO"
1684 msgstr "MALLINFO"
1685
1686 #. type: TH
1687 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1688 #, no-wrap
1689 msgid "2012-05-06"
1690 msgstr "2012-05-06"
1691
1692 #. type: Plain text
1693 #: build/C/man3/mallinfo.3:29
1694 msgid "mallinfo - obtain memory allocation information"
1695 msgstr "mallinfo - メモリ割り当て情報を取得する"
1696
1697 #. type: Plain text
1698 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1699 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1700 #: build/C/man3/mallopt.3:31
1701 msgid "B<#include E<lt>malloc.hE<gt>>"
1702 msgstr "B<#include E<lt>malloc.hE<gt>>"
1703
1704 #. type: Plain text
1705 #: build/C/man3/mallinfo.3:33
1706 msgid "B<struct mallinfo mallinfo(void);>"
1707 msgstr "B<struct mallinfo mallinfo(void);>"
1708
1709 #. type: Plain text
1710 #: build/C/man3/mallinfo.3:41
1711 msgid ""
1712 "The B<mallinfo>()  function returns a copy of a structure containing "
1713 "information about memory allocations performed by B<malloc>(3)  and related "
1714 "functions.  This structure is defined as follows:"
1715 msgstr ""
1716 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1717 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1718 "この構造体は以下のように定義されている。"
1719
1720 #. type: Plain text
1721 #: build/C/man3/mallinfo.3:56
1722 #, no-wrap
1723 msgid ""
1724 "struct mallinfo {\n"
1725 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1726 "    int ordblks;   /* Number of free chunks */\n"
1727 "    int smblks;    /* Number of free fastbin blocks */\n"
1728 "    int hblks;     /* Number of mmapped regions */\n"
1729 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1730 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1731 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1732 "    int uordblks;  /* Total allocated space (bytes) */\n"
1733 "    int fordblks;  /* Total free space (bytes) */\n"
1734 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1735 "};\n"
1736 msgstr ""
1737 "struct mallinfo {\n"
1738 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1739 "    int ordblks;   /* Number of free chunks */\n"
1740 "    int smblks;    /* Number of free fastbin blocks */\n"
1741 "    int hblks;     /* Number of mmapped regions */\n"
1742 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1743 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1744 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1745 "    int uordblks;  /* Total allocated space (bytes) */\n"
1746 "    int fordblks;  /* Total free space (bytes) */\n"
1747 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1748 "};\n"
1749
1750 #. type: Plain text
1751 #: build/C/man3/mallinfo.3:62
1752 msgid ""
1753 "The fields of the I<mallinfo> structure contain the following information:"
1754 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1755
1756 #. type: TP
1757 #: build/C/man3/mallinfo.3:62
1758 #, no-wrap
1759 msgid "I<arena>"
1760 msgstr "I<arena>"
1761
1762 #. type: Plain text
1763 #: build/C/man3/mallinfo.3:68
1764 msgid ""
1765 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1766 "memory allocated on the heap).  This figure includes both in-use blocks and "
1767 "blocks on the free list."
1768 msgstr ""
1769
1770 #. type: TP
1771 #: build/C/man3/mallinfo.3:68
1772 #, no-wrap
1773 msgid "I<ordblks>"
1774 msgstr "I<ordblks>"
1775
1776 #. type: Plain text
1777 #: build/C/man3/mallinfo.3:71
1778 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1779 msgstr ""
1780
1781 #. type: TP
1782 #: build/C/man3/mallinfo.3:71
1783 #, no-wrap
1784 msgid "I<smblks>"
1785 msgstr "I<smblks>"
1786
1787 #. type: Plain text
1788 #: build/C/man3/mallinfo.3:75
1789 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1790 msgstr ""
1791
1792 #. type: TP
1793 #: build/C/man3/mallinfo.3:75
1794 #, no-wrap
1795 msgid "I<hblks>"
1796 msgstr "I<hblks>"
1797
1798 #. type: Plain text
1799 #: build/C/man3/mallinfo.3:83
1800 msgid ""
1801 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1802 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1803 msgstr ""
1804
1805 #. type: TP
1806 #: build/C/man3/mallinfo.3:83
1807 #, no-wrap
1808 msgid "I<hblkhd>"
1809 msgstr "I<hblkhd>"
1810
1811 #. type: Plain text
1812 #: build/C/man3/mallinfo.3:87
1813 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1814 msgstr ""
1815
1816 #. type: TP
1817 #: build/C/man3/mallinfo.3:87
1818 #, no-wrap
1819 msgid "I<usmblks>"
1820 msgstr "I<usmblks>"
1821
1822 #. type: Plain text
1823 #: build/C/man3/mallinfo.3:92
1824 msgid ""
1825 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1826 "of space that was ever allocated.  This field is maintained only in "
1827 "nonthreading environments."
1828 msgstr ""
1829
1830 #. type: TP
1831 #: build/C/man3/mallinfo.3:92
1832 #, no-wrap
1833 msgid "I<fsmblks>"
1834 msgstr "I<fsmblks>"
1835
1836 #. type: Plain text
1837 #: build/C/man3/mallinfo.3:95
1838 msgid "The total number of bytes in fastbin free blocks."
1839 msgstr ""
1840
1841 #. type: TP
1842 #: build/C/man3/mallinfo.3:95
1843 #, no-wrap
1844 msgid "I<uordblks>"
1845 msgstr "I<uordblks>"
1846
1847 #. type: Plain text
1848 #: build/C/man3/mallinfo.3:98
1849 msgid "The total number of bytes used by in-use allocations."
1850 msgstr ""
1851
1852 #. type: TP
1853 #: build/C/man3/mallinfo.3:98
1854 #, no-wrap
1855 msgid "I<fordblks>"
1856 msgstr "I<fordblks>"
1857
1858 #. type: Plain text
1859 #: build/C/man3/mallinfo.3:101
1860 msgid "The total number of bytes in free blocks."
1861 msgstr ""
1862
1863 #. type: TP
1864 #: build/C/man3/mallinfo.3:101
1865 #, no-wrap
1866 msgid "I<keepcost>"
1867 msgstr "I<keepcost>"
1868
1869 #.  .SH VERSIONS
1870 #.  Available already in glibc 2.0, possibly earlier
1871 #. type: Plain text
1872 #: build/C/man3/mallinfo.3:110
1873 msgid ""
1874 "The total amount of releasable free space at the top of the heap.  This is "
1875 "the maximum number of bytes that could ideally (i.e., ignoring page "
1876 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1877 msgstr ""
1878
1879 #. type: Plain text
1880 #: build/C/man3/mallinfo.3:114
1881 msgid ""
1882 "This function is not specified by POSIX or the C standards.  A similar "
1883 "function exists on many System V derivatives, and was specified in the SVID."
1884 msgstr ""
1885
1886 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1887 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1888 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1889 #.  on libc-alpha@sourceware.org
1890 #. type: Plain text
1891 #: build/C/man3/mallinfo.3:126
1892 msgid ""
1893 "B<Information is returned for only the main memory allocation area.> "
1894 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1895 "B<malloc_info>(3)  for alternatives that include information about other "
1896 "arenas."
1897 msgstr ""
1898
1899 #. type: Plain text
1900 #: build/C/man3/mallinfo.3:134
1901 msgid ""
1902 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1903 "because some internal bookkeeping values may be of type I<long>, the "
1904 "reported values may wrap around zero and thus be inaccurate."
1905 msgstr ""
1906
1907 #. type: SH
1908 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1909 #: build/C/man3/malloc_info.3:82 build/C/man3/mallopt.3:466
1910 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1911 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1912 #, no-wrap
1913 msgid "EXAMPLE"
1914 msgstr "例"
1915
1916 #. type: Plain text
1917 #: build/C/man3/mallinfo.3:140
1918 msgid ""
1919 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1920 "statistics before and after allocating and freeing some blocks of memory.  "
1921 "The statistics are displayed on standard output."
1922 msgstr ""
1923
1924 #. type: Plain text
1925 #: build/C/man3/mallinfo.3:144
1926 msgid ""
1927 "The first two command-line arguments specify the number and size of blocks "
1928 "to be allocated with B<malloc>(3)."
1929 msgstr ""
1930
1931 #. type: Plain text
1932 #: build/C/man3/mallinfo.3:158
1933 msgid ""
1934 "The remaining three arguments specify which of the allocated blocks should "
1935 "be freed with B<free>(3).  These three arguments are optional, and specify "
1936 "(in order): the step size to be used in the loop that frees blocks (the "
1937 "default is 1, meaning free all blocks in the range); the ordinal position of "
1938 "the first block to be freed (default 0, meaning the first allocated block); "
1939 "and a number one greater than the ordinal position of the last block to be "
1940 "freed (default is one greater than the maximum block number).  If these "
1941 "three arguments are omitted, then the defaults cause all allocated blocks to "
1942 "be freed."
1943 msgstr ""
1944
1945 #. type: Plain text
1946 #: build/C/man3/mallinfo.3:162
1947 msgid ""
1948 "In the following example run of the program, 1000 allocations of 100 bytes "
1949 "are performed, and then every second allocated block is freed:"
1950 msgstr ""
1951
1952 #. type: Plain text
1953 #: build/C/man3/mallinfo.3:177
1954 #, no-wrap
1955 msgid ""
1956 "$ B<./a.out 1000 100 2>\n"
1957 "============== Before allocating blocks ==============\n"
1958 "Total non-mmapped bytes (arena):       0\n"
1959 "# of free chunks (ordblks):            1\n"
1960 "# of free fastbin blocks (smblks):     0\n"
1961 "# of mapped regions (hblks):           0\n"
1962 "Bytes in mapped regions (hblkhd):      0\n"
1963 "Max. total allocated space (usmblks):  0\n"
1964 "Free bytes held in fastbins (fsmblks): 0\n"
1965 "Total allocated space (uordblks):      0\n"
1966 "Total free space (fordblks):           0\n"
1967 "Topmost releasable block (keepcost):   0\n"
1968 msgstr ""
1969 "$ B<./a.out 1000 100 2>\n"
1970 "============== Before allocating blocks ==============\n"
1971 "Total non-mmapped bytes (arena):       0\n"
1972 "# of free chunks (ordblks):            1\n"
1973 "# of free fastbin blocks (smblks):     0\n"
1974 "# of mapped regions (hblks):           0\n"
1975 "Bytes in mapped regions (hblkhd):      0\n"
1976 "Max. total allocated space (usmblks):  0\n"
1977 "Free bytes held in fastbins (fsmblks): 0\n"
1978 "Total allocated space (uordblks):      0\n"
1979 "Total free space (fordblks):           0\n"
1980 "Topmost releasable block (keepcost):   0\n"
1981
1982 #. type: Plain text
1983 #: build/C/man3/mallinfo.3:189
1984 #, no-wrap
1985 msgid ""
1986 "============== After allocating blocks ==============\n"
1987 "Total non-mmapped bytes (arena):       135168\n"
1988 "# of free chunks (ordblks):            1\n"
1989 "# of free fastbin blocks (smblks):     0\n"
1990 "# of mapped regions (hblks):           0\n"
1991 "Bytes in mapped regions (hblkhd):      0\n"
1992 "Max. total allocated space (usmblks):  0\n"
1993 "Free bytes held in fastbins (fsmblks): 0\n"
1994 "Total allocated space (uordblks):      104000\n"
1995 "Total free space (fordblks):           31168\n"
1996 "Topmost releasable block (keepcost):   31168\n"
1997 msgstr ""
1998 "============== After allocating blocks ==============\n"
1999 "Total non-mmapped bytes (arena):       135168\n"
2000 "# of free chunks (ordblks):            1\n"
2001 "# of free fastbin blocks (smblks):     0\n"
2002 "# of mapped regions (hblks):           0\n"
2003 "Bytes in mapped regions (hblkhd):      0\n"
2004 "Max. total allocated space (usmblks):  0\n"
2005 "Free bytes held in fastbins (fsmblks): 0\n"
2006 "Total allocated space (uordblks):      104000\n"
2007 "Total free space (fordblks):           31168\n"
2008 "Topmost releasable block (keepcost):   31168\n"
2009
2010 #. type: Plain text
2011 #: build/C/man3/mallinfo.3:201
2012 #, no-wrap
2013 msgid ""
2014 "============== After freeing blocks ==============\n"
2015 "Total non-mmapped bytes (arena):       135168\n"
2016 "# of free chunks (ordblks):            501\n"
2017 "# of free fastbin blocks (smblks):     0\n"
2018 "# of mapped regions (hblks):           0\n"
2019 "Bytes in mapped regions (hblkhd):      0\n"
2020 "Max. total allocated space (usmblks):  0\n"
2021 "Free bytes held in fastbins (fsmblks): 0\n"
2022 "Total allocated space (uordblks):      52000\n"
2023 "Total free space (fordblks):           83168\n"
2024 "Topmost releasable block (keepcost):   31168\n"
2025 msgstr ""
2026 "============== After freeing blocks ==============\n"
2027 "Total non-mmapped bytes (arena):       135168\n"
2028 "# of free chunks (ordblks):            501\n"
2029 "# of free fastbin blocks (smblks):     0\n"
2030 "# of mapped regions (hblks):           0\n"
2031 "Bytes in mapped regions (hblkhd):      0\n"
2032 "Max. total allocated space (usmblks):  0\n"
2033 "Free bytes held in fastbins (fsmblks): 0\n"
2034 "Total allocated space (uordblks):      52000\n"
2035 "Total free space (fordblks):           83168\n"
2036 "Topmost releasable block (keepcost):   31168\n"
2037
2038 #. type: SS
2039 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:165
2040 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2041 #: build/C/man2/mprotect.2:165
2042 #, no-wrap
2043 msgid "Program source"
2044 msgstr "プログラムのソース"
2045
2046 #. type: Plain text
2047 #: build/C/man3/mallinfo.3:208
2048 #, no-wrap
2049 msgid ""
2050 "#include E<lt>malloc.hE<gt>\n"
2051 "#include \"tlpi_hdr.h\"\n"
2052 msgstr ""
2053 "#include E<lt>malloc.hE<gt>\n"
2054 "#include \"tlpi_hdr.h\"\n"
2055
2056 #. type: Plain text
2057 #: build/C/man3/mallinfo.3:213
2058 #, no-wrap
2059 msgid ""
2060 "static void\n"
2061 "display_mallinfo(void)\n"
2062 "{\n"
2063 "    struct mallinfo mi;\n"
2064 msgstr ""
2065 "static void\n"
2066 "display_mallinfo(void)\n"
2067 "{\n"
2068 "    struct mallinfo mi;\n"
2069
2070 #. type: Plain text
2071 #: build/C/man3/mallinfo.3:215
2072 #, no-wrap
2073 msgid "    mi = mallinfo();\n"
2074 msgstr "    mi = mallinfo();\n"
2075
2076 #. type: Plain text
2077 #: build/C/man3/mallinfo.3:227
2078 #, no-wrap
2079 msgid ""
2080 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2081 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2082 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2083 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2084 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2085 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2086 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2087 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2088 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2089 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2090 "}\n"
2091 msgstr ""
2092 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2093 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2094 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2095 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2096 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2097 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2098 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2099 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2100 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2101 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2102 "}\n"
2103
2104 #. type: Plain text
2105 #: build/C/man3/mallinfo.3:235
2106 #, no-wrap
2107 msgid ""
2108 "int\n"
2109 "main(int argc, char *argv[])\n"
2110 "{\n"
2111 "#define MAX_ALLOCS 2000000\n"
2112 "    char *alloc[MAX_ALLOCS];\n"
2113 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2114 "    size_t blockSize;\n"
2115 msgstr ""
2116 "int\n"
2117 "main(int argc, char *argv[])\n"
2118 "{\n"
2119 "#define MAX_ALLOCS 2000000\n"
2120 "    char *alloc[MAX_ALLOCS];\n"
2121 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2122 "    size_t blockSize;\n"
2123
2124 #. type: Plain text
2125 #: build/C/man3/mallinfo.3:239
2126 #, no-wrap
2127 msgid ""
2128 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2129 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2130 "                \"[end-free]]]\\en\", argv[0]);\n"
2131 msgstr ""
2132 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2133 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2134 "                \"[end-free]]]\\en\", argv[0]);\n"
2135
2136 #. type: Plain text
2137 #: build/C/man3/mallinfo.3:245
2138 #, no-wrap
2139 msgid ""
2140 "    numBlocks = atoi(argv[1]);\n"
2141 "    blockSize = atoi(argv[2]);\n"
2142 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2143 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2144 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2145 msgstr ""
2146 "    numBlocks = atoi(argv[1]);\n"
2147 "    blockSize = atoi(argv[2]);\n"
2148 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2149 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2150 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2151
2152 #. type: Plain text
2153 #: build/C/man3/mallinfo.3:248
2154 #, no-wrap
2155 msgid ""
2156 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2157 "    display_mallinfo();\n"
2158 msgstr ""
2159 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2160 "    display_mallinfo();\n"
2161
2162 #. type: Plain text
2163 #: build/C/man3/mallinfo.3:252
2164 #, no-wrap
2165 msgid ""
2166 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2167 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2168 "            fatal(\"Too many allocations\");\n"
2169 msgstr ""
2170 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2171 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2172 "            fatal(\"Too many allocations\");\n"
2173
2174 #. type: Plain text
2175 #: build/C/man3/mallinfo.3:257
2176 #, no-wrap
2177 msgid ""
2178 "        alloc[j] = malloc(blockSize);\n"
2179 "        if (alloc[j] == NULL)\n"
2180 "            errExit(\"malloc\");\n"
2181 "    }\n"
2182 msgstr ""
2183 "        alloc[j] = malloc(blockSize);\n"
2184 "        if (alloc[j] == NULL)\n"
2185 "            errExit(\"malloc\");\n"
2186 "    }\n"
2187
2188 #. type: Plain text
2189 #: build/C/man3/mallinfo.3:260
2190 #, no-wrap
2191 msgid ""
2192 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2193 "    display_mallinfo();\n"
2194 msgstr ""
2195 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2196 "    display_mallinfo();\n"
2197
2198 #. type: Plain text
2199 #: build/C/man3/mallinfo.3:263
2200 #, no-wrap
2201 msgid ""
2202 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2203 "        free(alloc[j]);\n"
2204 msgstr ""
2205 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2206 "        free(alloc[j]);\n"
2207
2208 #. type: Plain text
2209 #: build/C/man3/mallinfo.3:266
2210 #, no-wrap
2211 msgid ""
2212 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2213 "    display_mallinfo();\n"
2214 msgstr ""
2215 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2216 "    display_mallinfo();\n"
2217
2218 #. type: Plain text
2219 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:253
2220 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2221 #: build/C/man2/mmap.2:711
2222 #, no-wrap
2223 msgid ""
2224 "    exit(EXIT_SUCCESS);\n"
2225 "}\n"
2226 msgstr ""
2227 "    exit(EXIT_SUCCESS);\n"
2228 "}\n"
2229
2230 #. type: Plain text
2231 #: build/C/man3/mallinfo.3:279
2232 msgid ""
2233 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2234 "B<malloc_trim>(3), B<mallopt>(3)"
2235 msgstr ""
2236 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2237 "B<malloc_trim>(3), B<mallopt>(3)"
2238
2239 #. type: TH
2240 #: build/C/man3/malloc_get_state.3:25
2241 #, no-wrap
2242 msgid "MALLOC_GET_STATE"
2243 msgstr "MALLOC_GET_STATE"
2244
2245 #. type: TH
2246 #: build/C/man3/malloc_get_state.3:25
2247 #, no-wrap
2248 msgid "2012-05-04"
2249 msgstr "2012-05-04"
2250
2251 #. type: Plain text
2252 #: build/C/man3/malloc_get_state.3:28
2253 msgid ""
2254 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2255 "implementation"
2256 msgstr ""
2257
2258 #. type: Plain text
2259 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2260 #, no-wrap
2261 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2262 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2263
2264 #. type: Plain text
2265 #: build/C/man3/malloc_get_state.3:33
2266 #, no-wrap
2267 msgid "B<void* malloc_get_state(void);>\n"
2268 msgstr "B<void* malloc_get_state(void);>\n"
2269
2270 #. type: Plain text
2271 #: build/C/man3/malloc_get_state.3:35
2272 #, no-wrap
2273 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2274 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2275
2276 #. type: Plain text
2277 #: build/C/man3/malloc_get_state.3:53
2278 msgid ""
2279 "The B<malloc_get_state>()  function records the current state of all "
2280 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2281 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2282 "is recorded in a system-dependent opaque data structure dynamically "
2283 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2284 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2285 "this memory.)"
2286 msgstr ""
2287
2288 #. type: Plain text
2289 #: build/C/man3/malloc_get_state.3:61
2290 msgid ""
2291 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2292 "internal bookkeeping variables to the values recorded in the opaque data "
2293 "structure pointed to by I<state>."
2294 msgstr ""
2295
2296 #. type: Plain text
2297 #: build/C/man3/malloc_get_state.3:68
2298 msgid ""
2299 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2300 "opaque data structure.  On error (for example, memory could not be allocated "
2301 "for the data structure), B<malloc_get_state>()  returns NULL."
2302 msgstr ""
2303
2304 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2305 #.  /* Must fail if the major version is too high. */
2306 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2307 #. type: Plain text
2308 #: build/C/man3/malloc_get_state.3:86
2309 msgid ""
2310 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2311 "that I<state> does not point to a correctly formed data structure, "
2312 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2313 "version of the data structure referred to by I<state> is a more recent "
2314 "version than this implementation knows about, B<malloc_set_state>()  returns "
2315 "-2."
2316 msgstr ""
2317
2318 #. type: Plain text
2319 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2320 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2321 msgid "These functions are GNU extensions."
2322 msgstr "これらの関数は GNU による拡張である。"
2323
2324 #. type: Plain text
2325 #: build/C/man3/malloc_get_state.3:94
2326 msgid ""
2327 "These functions are especially useful when using this B<malloc>(3)  "
2328 "implementation as part of a shared library, and the heap contents are saved/"
2329 "restored via some other method.  This technique is used by the GNU Emacs to "
2330 "implement its \"dumping\" function."
2331 msgstr ""
2332
2333 #.  i.e., calls __malloc_check_init()
2334 #.  i.e., malloc checking is not already in use
2335 #.  and the caller requested malloc checking
2336 #. type: Plain text
2337 #: build/C/man3/malloc_get_state.3:111
2338 msgid ""
2339 "Hook function pointers are never saved or restored by these functions, with "
2340 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2341 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2342 "checking hooks if possible; if malloc checking was not in use in the "
2343 "recorded state, but the caller has requested malloc checking, then the hooks "
2344 "are reset to 0."
2345 msgstr ""
2346
2347 #. type: Plain text
2348 #: build/C/man3/malloc_get_state.3:114
2349 msgid "B<malloc>(3), B<mallopt>(3)"
2350 msgstr "B<malloc>(3), B<mallopt>(3)"
2351
2352 #. type: TH
2353 #: build/C/man3/malloc_hook.3:10
2354 #, no-wrap
2355 msgid "MALLOC_HOOK"
2356 msgstr "MALLOC_HOOK"
2357
2358 #. type: TH
2359 #: build/C/man3/malloc_hook.3:10
2360 #, no-wrap
2361 msgid "2010-10-13"
2362 msgstr "2010-10-13"
2363
2364 #. type: Plain text
2365 #: build/C/man3/malloc_hook.3:15
2366 msgid ""
2367 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2368 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2369 msgstr ""
2370 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2371 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2372
2373 #. type: Plain text
2374 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2375 #: build/C/man3/posix_memalign.3:41
2376 #, no-wrap
2377 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2378 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2379
2380 #. type: Plain text
2381 #: build/C/man3/malloc_hook.3:20
2382 #, no-wrap
2383 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2384 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2385
2386 #. type: Plain text
2387 #: build/C/man3/malloc_hook.3:23
2388 #, no-wrap
2389 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2390 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2391
2392 #. type: Plain text
2393 #: build/C/man3/malloc_hook.3:26
2394 #, no-wrap
2395 msgid ""
2396 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2397 "B<                         const void *>I<caller>B<);>\n"
2398 msgstr ""
2399 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2400 "B<                         const void *>I<caller>B<);>\n"
2401
2402 #. type: Plain text
2403 #: build/C/man3/malloc_hook.3:28
2404 #, no-wrap
2405 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2406 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2407
2408 #. type: Plain text
2409 #: build/C/man3/malloc_hook.3:30
2410 #, no-wrap
2411 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2412 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2413
2414 #. type: Plain text
2415 #: build/C/man3/malloc_hook.3:32
2416 #, no-wrap
2417 msgid "B<void (*__after_morecore_hook)(void);>\n"
2418 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2419
2420 #. type: Plain text
2421 #: build/C/man3/malloc_hook.3:43
2422 msgid ""
2423 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2424 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2425 "these hooks to help you debug programs that use dynamic memory allocation, "
2426 "for example."
2427 msgstr ""
2428 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2429 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2430 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2431 "ができる。"
2432
2433 #. type: Plain text
2434 #: build/C/man3/malloc_hook.3:50
2435 msgid ""
2436 "The variable B<__malloc_initialize_hook> points at a function that is called "
2437 "once when the malloc implementation is initialized.  This is a weak "
2438 "variable, so it can be overridden in the application with a definition like "
2439 "the following:"
2440 msgstr ""
2441 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2442 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2443 "ケーション内で 以下のような定義で上書きできる:"
2444
2445 #. type: Plain text
2446 #: build/C/man3/malloc_hook.3:53
2447 #, no-wrap
2448 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2449 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2450
2451 #. type: Plain text
2452 #: build/C/man3/malloc_hook.3:58
2453 msgid ""
2454 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2455 msgstr ""
2456 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2457
2458 #. type: Plain text
2459 #: build/C/man3/malloc_hook.3:74
2460 msgid ""
2461 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2462 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2463 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2464 "except that they have a final argument I<caller> that gives the address of "
2465 "the caller of B<malloc>(3), etc."
2466 msgstr ""
2467 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2468 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2469 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2470 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2471 "出し元 (caller) のアドレスが格納される。"
2472
2473 #. type: Plain text
2474 #: build/C/man3/malloc_hook.3:80
2475 msgid ""
2476 "The variable B<__after_morecore_hook> points at a function that is called "
2477 "each time after B<sbrk>(2)  was asked for more memory."
2478 msgstr ""
2479 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2480 "後で毎回呼び出される関数へのポインタである。"
2481
2482 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2483 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2484 #. type: Plain text
2485 #: build/C/man3/malloc_hook.3:89
2486 msgid ""
2487 "The use of these hook functions is not safe in multithreaded programs, and "
2488 "they are now deprecated.  Programmers should instead preempt calls to the "
2489 "relevant functions by defining and exporting functions such as \"malloc\" "
2490 "and \"free\"."
2491 msgstr ""
2492
2493 #. type: Plain text
2494 #: build/C/man3/malloc_hook.3:91
2495 msgid "Here is a short example of how to use these variables."
2496 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2497
2498 #. type: Plain text
2499 #: build/C/man3/malloc_hook.3:95
2500 #, no-wrap
2501 msgid ""
2502 "#include E<lt>stdio.hE<gt>\n"
2503 "#include E<lt>malloc.hE<gt>\n"
2504 msgstr ""
2505 "#include E<lt>stdio.hE<gt>\n"
2506 "#include E<lt>malloc.hE<gt>\n"
2507
2508 #. type: Plain text
2509 #: build/C/man3/malloc_hook.3:99
2510 #, no-wrap
2511 msgid ""
2512 "/* Prototypes for our hooks.  */\n"
2513 "static void my_init_hook(void);\n"
2514 "static void *my_malloc_hook(size_t, const void *);\n"
2515 msgstr ""
2516 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2517 "static void my_init_hook(void);\n"
2518 "static void *my_malloc_hook(size_t, const void *);\n"
2519
2520 #. type: Plain text
2521 #: build/C/man3/malloc_hook.3:102
2522 #, no-wrap
2523 msgid ""
2524 "/* Variables to save original hooks. */\n"
2525 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2526 msgstr ""
2527 "/* 元々のフックを保存するための変数 */\n"
2528 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2529
2530 #. type: Plain text
2531 #: build/C/man3/malloc_hook.3:105
2532 #, no-wrap
2533 msgid ""
2534 "/* Override initializing hook from the C library. */\n"
2535 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2536 msgstr ""
2537 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2538 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2539
2540 #. type: Plain text
2541 #: build/C/man3/malloc_hook.3:112
2542 #, no-wrap
2543 msgid ""
2544 "static void\n"
2545 "my_init_hook(void)\n"
2546 "{\n"
2547 "    old_malloc_hook = __malloc_hook;\n"
2548 "    __malloc_hook = my_malloc_hook;\n"
2549 "}\n"
2550 msgstr ""
2551 "static void\n"
2552 "my_init_hook(void)\n"
2553 "{\n"
2554 "    old_malloc_hook = __malloc_hook;\n"
2555 "    __malloc_hook = my_malloc_hook;\n"
2556 "}\n"
2557
2558 #. type: Plain text
2559 #: build/C/man3/malloc_hook.3:117
2560 #, no-wrap
2561 msgid ""
2562 "static void *\n"
2563 "my_malloc_hook(size_t size, const void *caller)\n"
2564 "{\n"
2565 "    void *result;\n"
2566 msgstr ""
2567 "static void *\n"
2568 "my_malloc_hook(size_t size, const void *caller)\n"
2569 "{\n"
2570 "    void *result;\n"
2571
2572 #. type: Plain text
2573 #: build/C/man3/malloc_hook.3:120
2574 #, no-wrap
2575 msgid ""
2576 "    /* Restore all old hooks */\n"
2577 "    __malloc_hook = old_malloc_hook;\n"
2578 msgstr ""
2579 "    /* 元々のフックを全て戻す */\n"
2580 "    __malloc_hook = old_malloc_hook;\n"
2581
2582 #. type: Plain text
2583 #: build/C/man3/malloc_hook.3:123
2584 #, no-wrap
2585 msgid ""
2586 "    /* Call recursively */\n"
2587 "    result = malloc(size);\n"
2588 msgstr ""
2589 "    /* malloc の再帰的呼び出し */\n"
2590 "    result = malloc(size);\n"
2591
2592 #. type: Plain text
2593 #: build/C/man3/malloc_hook.3:126
2594 #, no-wrap
2595 msgid ""
2596 "    /* Save underlying hooks */\n"
2597 "    old_malloc_hook = __malloc_hook;\n"
2598 msgstr ""
2599 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2600 "    old_malloc_hook = __malloc_hook;\n"
2601
2602 #. type: Plain text
2603 #: build/C/man3/malloc_hook.3:130
2604 #, no-wrap
2605 msgid ""
2606 "    /* printf() might call malloc(), so protect it too. */\n"
2607 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2608 "            (unsigned int) size, caller, result);\n"
2609 msgstr ""
2610 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2611 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2612 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2613 "            (unsigned int) size, caller, result);\n"
2614
2615 #. type: Plain text
2616 #: build/C/man3/malloc_hook.3:133
2617 #, no-wrap
2618 msgid ""
2619 "    /* Restore our own hooks */\n"
2620 "    __malloc_hook = my_malloc_hook;\n"
2621 msgstr ""
2622 "    /* ユーザが使おうとするフックを再設定する */\n"
2623 "    __malloc_hook = my_malloc_hook;\n"
2624
2625 #. type: Plain text
2626 #: build/C/man3/malloc_hook.3:136
2627 #, no-wrap
2628 msgid ""
2629 "    return result;\n"
2630 "}\n"
2631 msgstr ""
2632 "    return result;\n"
2633 "}\n"
2634
2635 #. type: Plain text
2636 #: build/C/man3/malloc_hook.3:142
2637 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2638 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2639
2640 #. type: TH
2641 #: build/C/man3/malloc_info.3:25
2642 #, no-wrap
2643 msgid "MALLOC_INFO"
2644 msgstr "MALLOC_INFO"
2645
2646 #. type: Plain text
2647 #: build/C/man3/malloc_info.3:28
2648 msgid "malloc_info - export malloc state to a stream"
2649 msgstr ""
2650
2651 #. type: Plain text
2652 #: build/C/man3/malloc_info.3:33
2653 #, no-wrap
2654 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2655 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2656
2657 #. type: Plain text
2658 #: build/C/man3/malloc_info.3:44
2659 msgid ""
2660 "The B<malloc_info>()  function exports an XML string that describes the "
2661 "current state of the memory-allocation implementation in the caller.  The "
2662 "string is printed on the file stream I<fp>.  The exported string includes "
2663 "information about all arenas (see B<malloc>(3))."
2664 msgstr ""
2665
2666 #. type: Plain text
2667 #: build/C/man3/malloc_info.3:48
2668 msgid "As currently implemented, I<options> must be zero."
2669 msgstr ""
2670
2671 #. type: Plain text
2672 #: build/C/man3/malloc_info.3:53
2673 msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
2674 msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
2675
2676 #. type: Plain text
2677 #: build/C/man3/malloc_info.3:58
2678 msgid "I<options> was nonzero."
2679 msgstr ""
2680
2681 #. type: Plain text
2682 #: build/C/man3/malloc_info.3:61
2683 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2684 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2685
2686 #. type: Plain text
2687 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:57
2688 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2689 msgid "This function is a GNU extension."
2690 msgstr "この関数は GNU による拡張である。"
2691
2692 #. type: Plain text
2693 #: build/C/man3/malloc_info.3:69
2694 msgid ""
2695 "The memory-allocation information is provided as an XML string (rather than "
2696 "a C structure)  because the information may change over time (according to "
2697 "changes in the underlying implementation).  The output XML string includes a "
2698 "version field."
2699 msgstr ""
2700
2701 #. type: Plain text
2702 #: build/C/man3/malloc_info.3:75
2703 msgid ""
2704 "The B<open_memstream>(3)  function can be used to send the output of "
2705 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2706 msgstr ""
2707
2708 #. type: Plain text
2709 #: build/C/man3/malloc_info.3:82
2710 msgid ""
2711 "The B<malloc_info>()  function is designed to address deficiencies in "
2712 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2713 msgstr ""
2714
2715 #. type: Plain text
2716 #: build/C/man3/malloc_info.3:93
2717 msgid ""
2718 "The program below takes up to four command-line arguments, of which the "
2719 "first three are mandatory.  The first argument specifies the number of "
2720 "threads that the program should create.  All of the threads, including the "
2721 "main thread, allocate the number of blocks of memory specified by the second "
2722 "argument.  The third argument controls the size of the blocks to be "
2723 "allocated.  The main thread creates blocks of this size, the second thread "
2724 "created by the program allocates blocks of twice this size, the third thread "
2725 "allocates blocks of three times this size, and so on."
2726 msgstr ""
2727
2728 #. type: Plain text
2729 #: build/C/man3/malloc_info.3:100
2730 msgid ""
2731 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2732 "state.  The first call takes place before any threads are created or memory "
2733 "allocated.  The second call is performed after all threads have allocated "
2734 "memory."
2735 msgstr ""
2736
2737 #. type: Plain text
2738 #: build/C/man3/malloc_info.3:108
2739 msgid ""
2740 "In the following example, the command-line arguments specify the creation of "
2741 "one additional thread, and both the main thread and the additional thread "
2742 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2743 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2744 msgstr ""
2745
2746 #. type: Plain text
2747 #: build/C/man3/malloc_info.3:133
2748 #, no-wrap
2749 msgid ""
2750 "$ B<getconf GNU_LIBC_VERSION>\n"
2751 "glibc 2.13\n"
2752 "$ B<./a.out 1 10000 100>\n"
2753 "============ Before allocating blocks ============\n"
2754 "E<lt>malloc version=\"1\"E<gt>\n"
2755 "E<lt>heap nr=\"0\"E<gt>\n"
2756 "E<lt>sizesE<gt>\n"
2757 "E<lt>/sizesE<gt>\n"
2758 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2759 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2760 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2761 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2762 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2763 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2764 "E<lt>/heapE<gt>\n"
2765 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2766 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2767 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2768 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2769 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2770 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2771 "E<lt>/mallocE<gt>\n"
2772 msgstr ""
2773 "$ B<getconf GNU_LIBC_VERSION>\n"
2774 "glibc 2.13\n"
2775 "$ B<./a.out 1 10000 100>\n"
2776 "============ Before allocating blocks ============\n"
2777 "E<lt>malloc version=\"1\"E<gt>\n"
2778 "E<lt>heap nr=\"0\"E<gt>\n"
2779 "E<lt>sizesE<gt>\n"
2780 "E<lt>/sizesE<gt>\n"
2781 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2782 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2783 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2784 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2785 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2786 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2787 "E<lt>/heapE<gt>\n"
2788 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2789 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2790 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2791 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2792 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2793 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2794 "E<lt>/mallocE<gt>\n"
2795
2796 #. type: Plain text
2797 #: build/C/man3/malloc_info.3:163
2798 #, no-wrap
2799 msgid ""
2800 "============ After allocating blocks ============\n"
2801 "E<lt>malloc version=\"1\"E<gt>\n"
2802 "E<lt>heap nr=\"0\"E<gt>\n"
2803 "E<lt>sizesE<gt>\n"
2804 "E<lt>/sizesE<gt>\n"
2805 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2806 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2807 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2808 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2809 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2810 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2811 "E<lt>/heapE<gt>\n"
2812 "E<lt>heap nr=\"1\"E<gt>\n"
2813 "E<lt>sizesE<gt>\n"
2814 "E<lt>/sizesE<gt>\n"
2815 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2816 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2817 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2818 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2819 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2820 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2821 "E<lt>/heapE<gt>\n"
2822 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2823 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2824 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2825 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2826 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2827 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2828 "E<lt>/mallocE<gt>\n"
2829 msgstr ""
2830 "============ After allocating blocks ============\n"
2831 "E<lt>malloc version=\"1\"E<gt>\n"
2832 "E<lt>heap nr=\"0\"E<gt>\n"
2833 "E<lt>sizesE<gt>\n"
2834 "E<lt>/sizesE<gt>\n"
2835 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2836 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2837 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2838 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2839 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2840 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2841 "E<lt>/heapE<gt>\n"
2842 "E<lt>heap nr=\"1\"E<gt>\n"
2843 "E<lt>sizesE<gt>\n"
2844 "E<lt>/sizesE<gt>\n"
2845 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2846 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2847 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2848 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2849 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2850 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2851 "E<lt>/heapE<gt>\n"
2852 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2853 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2854 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2855 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2856 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2857 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2858 "E<lt>/mallocE<gt>\n"
2859
2860 #. type: Plain text
2861 #: build/C/man3/malloc_info.3:173
2862 #, no-wrap
2863 msgid ""
2864 "#include E<lt>unistd.hE<gt>\n"
2865 "#include E<lt>stdlib.hE<gt>\n"
2866 "#include E<lt>pthread.hE<gt>\n"
2867 "#include E<lt>malloc.hE<gt>\n"
2868 "#include E<lt>errno.hE<gt>\n"
2869 msgstr ""
2870 "#include E<lt>unistd.hE<gt>\n"
2871 "#include E<lt>stdlib.hE<gt>\n"
2872 "#include E<lt>pthread.hE<gt>\n"
2873 "#include E<lt>malloc.hE<gt>\n"
2874 "#include E<lt>errno.hE<gt>\n"
2875
2876 #. type: Plain text
2877 #: build/C/man3/malloc_info.3:176
2878 #, no-wrap
2879 msgid ""
2880 "static size_t blockSize;\n"
2881 "static int numThreads, numBlocks;\n"
2882 msgstr ""
2883 "static size_t blockSize;\n"
2884 "static int numThreads, numBlocks;\n"
2885
2886 #. type: Plain text
2887 #: build/C/man3/malloc_info.3:179
2888 #, no-wrap
2889 msgid ""
2890 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2891 "                        } while (0)\n"
2892 msgstr ""
2893 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2894 "                        } while (0)\n"
2895
2896 #. type: Plain text
2897 #: build/C/man3/malloc_info.3:185
2898 #, no-wrap
2899 msgid ""
2900 "static void *\n"
2901 "thread_func(void *arg)\n"
2902 "{\n"
2903 "    int j;\n"
2904 "    int tn = (int) arg;\n"
2905 msgstr ""
2906 "static void *\n"
2907 "thread_func(void *arg)\n"
2908 "{\n"
2909 "    int j;\n"
2910 "    int tn = (int) arg;\n"
2911
2912 #. type: Plain text
2913 #: build/C/man3/malloc_info.3:188
2914 #, no-wrap
2915 msgid ""
2916 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2917 "       the main thread) allocates a different amount of memory */\n"
2918 msgstr ""
2919 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2920 "       the main thread) allocates a different amount of memory */\n"
2921
2922 #. type: Plain text
2923 #: build/C/man3/malloc_info.3:192
2924 #, no-wrap
2925 msgid ""
2926 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2927 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2928 "            errExit(\"malloc-thread\");\n"
2929 msgstr ""
2930 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2931 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2932 "            errExit(\"malloc-thread\");\n"
2933
2934 #. type: Plain text
2935 #: build/C/man3/malloc_info.3:196
2936 #, no-wrap
2937 msgid ""
2938 "    sleep(100);         /* Sleep until main thread terminates */\n"
2939 "    return NULL;\n"
2940 "}\n"
2941 msgstr ""
2942 "    sleep(100);         /* Sleep until main thread terminates */\n"
2943 "    return NULL;\n"
2944 "}\n"
2945
2946 #. type: Plain text
2947 #: build/C/man3/malloc_info.3:202
2948 #, no-wrap
2949 msgid ""
2950 "int\n"
2951 "main(int argc, char *argv[])\n"
2952 "{\n"
2953 "    int j, tn, sleepTime;\n"
2954 "    pthread_t *thr;\n"
2955 msgstr ""
2956 "int\n"
2957 "main(int argc, char *argv[])\n"
2958 "{\n"
2959 "    int j, tn, sleepTime;\n"
2960 "    pthread_t *thr;\n"
2961
2962 #. type: Plain text
2963 #: build/C/man3/malloc_info.3:209
2964 #, no-wrap
2965 msgid ""
2966 "    if (argc E<lt> 4) {\n"
2967 "        fprintf(stderr,\n"
2968 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2969 "                argv[0]);\n"
2970 "        exit(EXIT_FAILURE);\n"
2971 "    }\n"
2972 msgstr ""
2973 "    if (argc E<lt> 4) {\n"
2974 "        fprintf(stderr,\n"
2975 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2976 "                argv[0]);\n"
2977 "        exit(EXIT_FAILURE);\n"
2978 "    }\n"
2979
2980 #. type: Plain text
2981 #: build/C/man3/malloc_info.3:214
2982 #, no-wrap
2983 msgid ""
2984 "    numThreads = atoi(argv[1]);\n"
2985 "    numBlocks = atoi(argv[2]);\n"
2986 "    blockSize = atoi(argv[3]);\n"
2987 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2988 msgstr ""
2989 "    numThreads = atoi(argv[1]);\n"
2990 "    numBlocks = atoi(argv[2]);\n"
2991 "    blockSize = atoi(argv[3]);\n"
2992 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2993
2994 #. type: Plain text
2995 #: build/C/man3/malloc_info.3:218
2996 #, no-wrap
2997 msgid ""
2998 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
2999 "    if (thr == NULL)\n"
3000 "        errExit(\"calloc\");\n"
3001 msgstr ""
3002 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3003 "    if (thr == NULL)\n"
3004 "        errExit(\"calloc\");\n"
3005
3006 #. type: Plain text
3007 #: build/C/man3/malloc_info.3:221
3008 #, no-wrap
3009 msgid ""
3010 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3011 "    malloc_info(0, stdout);\n"
3012 msgstr ""
3013 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3014 "    malloc_info(0, stdout);\n"
3015
3016 #. type: Plain text
3017 #: build/C/man3/malloc_info.3:223
3018 #, no-wrap
3019 msgid "    /* Create threads that allocate different amounts of memory */\n"
3020 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3021
3022 #. type: Plain text
3023 #: build/C/man3/malloc_info.3:229
3024 #, no-wrap
3025 msgid ""
3026 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3027 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3028 "                               (void *) tn);\n"
3029 "        if (errno != 0)\n"
3030 "            errExit(\"pthread_create\");\n"
3031 msgstr ""
3032 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3033 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3034 "                               (void *) tn);\n"
3035 "        if (errno != 0)\n"
3036 "            errExit(\"pthread_create\");\n"
3037
3038 #. type: Plain text
3039 #: build/C/man3/malloc_info.3:234
3040 #, no-wrap
3041 msgid ""
3042 "        /* If we add a sleep interval after the start-up of each\n"
3043 "           thread, the threads likely won\\(aqt contend for malloc\n"
3044 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3045 "           allocated (see malloc(3)). */\n"
3046 msgstr ""
3047 "        /* If we add a sleep interval after the start-up of each\n"
3048 "           thread, the threads likely won\\(aqt contend for malloc\n"
3049 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3050 "           allocated (see malloc(3)). */\n"
3051
3052 #. type: Plain text
3053 #: build/C/man3/malloc_info.3:238
3054 #, no-wrap
3055 msgid ""
3056 "        if (sleepTime E<gt> 0)\n"
3057 "            sleep(sleepTime);\n"
3058 "    }\n"
3059 msgstr ""
3060 "        if (sleepTime E<gt> 0)\n"
3061 "            sleep(sleepTime);\n"
3062 "    }\n"
3063
3064 #. type: Plain text
3065 #: build/C/man3/malloc_info.3:240
3066 #, no-wrap
3067 msgid "    /* The main thread also allocates some memory */\n"
3068 msgstr "    /* The main thread also allocates some memory */\n"
3069
3070 #. type: Plain text
3071 #: build/C/man3/malloc_info.3:244
3072 #, no-wrap
3073 msgid ""
3074 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3075 "        if (malloc(blockSize) == NULL)\n"
3076 "            errExit(\"malloc\");\n"
3077 msgstr ""
3078 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3079 "        if (malloc(blockSize) == NULL)\n"
3080 "            errExit(\"malloc\");\n"
3081
3082 #. type: Plain text
3083 #: build/C/man3/malloc_info.3:247
3084 #, no-wrap
3085 msgid ""
3086 "    sleep(2);           /* Give all threads a chance to\n"
3087 "                           complete allocations */\n"
3088 msgstr ""
3089 "    sleep(2);           /* Give all threads a chance to\n"
3090 "                           complete allocations */\n"
3091
3092 #. type: Plain text
3093 #: build/C/man3/malloc_info.3:250
3094 #, no-wrap
3095 msgid ""
3096 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3097 "    malloc_info(0, stdout);\n"
3098 msgstr ""
3099 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3100 "    malloc_info(0, stdout);\n"
3101
3102 #. type: Plain text
3103 #: build/C/man3/malloc_info.3:260
3104 msgid ""
3105 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3106 "B<open_memstream>(3)"
3107 msgstr ""
3108 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3109 "B<open_memstream>(3)"
3110
3111 #. type: TH
3112 #: build/C/man3/malloc_stats.3:26
3113 #, no-wrap
3114 msgid "MALLOC_STATS"
3115 msgstr "MALLOC_STATS"
3116
3117 #. type: Plain text
3118 #: build/C/man3/malloc_stats.3:29
3119 msgid "malloc_stats - print memory allocation statistics"
3120 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3121
3122 #. type: Plain text
3123 #: build/C/man3/malloc_stats.3:33
3124 msgid "B<void malloc_stats(void);>"
3125 msgstr "B<void malloc_stats(void);>"
3126
3127 #.  .SH VERSIONS
3128 #.  Available already in glibc 2.0, possibly earlier
3129 #. type: Plain text
3130 #: build/C/man3/malloc_stats.3:55
3131 msgid ""
3132 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3133 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3134 "(allocation area), this function prints the total amount of memory allocated "
3135 "and the total number of bytes consumed by in-use allocations.  (These two "
3136 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3137 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3138 "statistics for all arenas, and the maximum number of blocks and bytes that "
3139 "were ever simultaneously allocated using B<mmap>(2)."
3140 msgstr ""
3141
3142 #. type: Plain text
3143 #: build/C/man3/malloc_stats.3:61
3144 msgid ""
3145 "More detailed information about memory allocations in the main arena can be "
3146 "obtained using B<mallinfo>(3)."
3147 msgstr ""
3148
3149 #. type: Plain text
3150 #: build/C/man3/malloc_stats.3:67
3151 msgid ""
3152 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3153 msgstr ""
3154 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3155
3156 #. type: TH
3157 #: build/C/man3/malloc_trim.3:26
3158 #, no-wrap
3159 msgid "MALLOC_TRIM"
3160 msgstr "MALLOC_TRIM"
3161
3162 #. type: TH
3163 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3164 #, no-wrap
3165 msgid "2012-03-29"
3166 msgstr "2012-03-29"
3167
3168 #. type: Plain text
3169 #: build/C/man3/malloc_trim.3:29
3170 msgid "malloc_trim - release free memory from the top of the heap"
3171 msgstr ""
3172
3173 #. type: Plain text
3174 #: build/C/man3/malloc_trim.3:33
3175 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3176 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3177
3178 #. type: Plain text
3179 #: build/C/man3/malloc_trim.3:40
3180 msgid ""
3181 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3182 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3183 msgstr ""
3184
3185 #. type: Plain text
3186 #: build/C/man3/malloc_trim.3:51
3187 msgid ""
3188 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3189 "the top of the heap.  If this argument is 0, only the minimum amount of "
3190 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3191 "nonzero argument can be used to maintain some trailing space at the top of "
3192 "the heap in order to allow future allocations to be made without having to "
3193 "extend the heap with B<sbrk>(2)."
3194 msgstr ""
3195
3196 #. type: Plain text
3197 #: build/C/man3/malloc_trim.3:56
3198 msgid ""
3199 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3200 "back to the system, or 0 if it was not possible to release any memory."
3201 msgstr ""
3202
3203 #.  .SH VERSIONS
3204 #.  Available already in glibc 2.0, possibly earlier
3205 #. type: Plain text
3206 #: build/C/man3/malloc_trim.3:60
3207 msgid "No errors are defined."
3208 msgstr ""
3209
3210 #. type: Plain text
3211 #: build/C/man3/malloc_trim.3:71
3212 msgid ""
3213 "This function is automatically called by B<free>(3)  in certain "
3214 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3215 "B<mallopt>(3)."
3216 msgstr ""
3217
3218 #. type: Plain text
3219 #: build/C/man3/malloc_trim.3:74
3220 msgid ""
3221 "This function cannot release free memory located at places other than the "
3222 "top of the heap."
3223 msgstr ""
3224
3225 #.  malloc/malloc.c::mTRIm():
3226 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3227 #. type: Plain text
3228 #: build/C/man3/malloc_trim.3:78
3229 msgid "This function releases only memory in the main arena."
3230 msgstr ""
3231
3232 #. type: Plain text
3233 #: build/C/man3/malloc_trim.3:82
3234 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3235 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3236
3237 #. type: TH
3238 #: build/C/man3/malloc_usable_size.3:25
3239 #, no-wrap
3240 msgid "MALLOC_USABLE_SIZE"
3241 msgstr "MALLOC_USABLE_SIZE"
3242
3243 #. type: Plain text
3244 #: build/C/man3/malloc_usable_size.3:28
3245 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3246 msgstr ""
3247
3248 #. type: Plain text
3249 #: build/C/man3/malloc_usable_size.3:32
3250 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3251 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3252
3253 #. type: Plain text
3254 #: build/C/man3/malloc_usable_size.3:40
3255 msgid ""
3256 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3257 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3258 "B<malloc>(3)  or a related function."
3259 msgstr ""
3260
3261 #. type: Plain text
3262 #: build/C/man3/malloc_usable_size.3:48
3263 msgid ""
3264 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3265 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3266 msgstr ""
3267
3268 #. type: Plain text
3269 #: build/C/man3/malloc_usable_size.3:60
3270 msgid ""
3271 "The value returned by B<malloc_usable_size>()  may be greater than the "
3272 "requested size of the allocation because of alignment and minimum size "
3273 "constraints.  Although the excess bytes can be overwritten by the "
3274 "application without ill effects, this is not good programming practice: the "
3275 "number of excess bytes in an allocation depends on the underlying "
3276 "implementation."
3277 msgstr ""
3278
3279 #. type: Plain text
3280 #: build/C/man3/malloc_usable_size.3:62
3281 msgid "The main use of this function is for debugging and introspection."
3282 msgstr ""
3283
3284 #. type: Plain text
3285 #: build/C/man3/malloc_usable_size.3:64
3286 msgid "B<malloc>(3)"
3287 msgstr "B<malloc>(3)"
3288
3289 #. type: TH
3290 #: build/C/man3/mallopt.3:26
3291 #, no-wrap
3292 msgid "MALLOPT"
3293 msgstr "MALLOPT"
3294
3295 #. type: TH
3296 #: build/C/man3/mallopt.3:26
3297 #, no-wrap
3298 msgid "2012-04-30"
3299 msgstr "2012-04-30"
3300
3301 #. type: Plain text
3302 #: build/C/man3/mallopt.3:29
3303 msgid "mallopt - set memory allocation parameters"
3304 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3305
3306 #. type: Plain text
3307 #: build/C/man3/mallopt.3:33
3308 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3309 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3310
3311 #. type: Plain text
3312 #: build/C/man3/mallopt.3:44
3313 msgid ""
3314 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3315 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3316 "specifies the parameter to be modified, and I<value> specifies the new value "
3317 "for that parameter."
3318 msgstr ""
3319 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3320 "制御するパラメータの調整を行う。\n"
3321 "I<param> 引き数で変更するパラメータを指定し、\n"
3322 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3323
3324 #. type: Plain text
3325 #: build/C/man3/mallopt.3:47
3326 msgid "The following values can be specified for I<param>:"
3327 msgstr "I<param> には以下の値を指定することができる。"
3328
3329 #. type: TP
3330 #: build/C/man3/mallopt.3:47
3331 #, no-wrap
3332 msgid "B<M_CHECK_ACTION>"
3333 msgstr "B<M_CHECK_ACTION>"
3334
3335 #. type: Plain text
3336 #: build/C/man3/mallopt.3:53
3337 msgid ""
3338 "Setting this parameter controls how glibc responds when various kinds of "
3339 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3340 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3341 "parameter determine the glibc behavior, as follows:"
3342 msgstr ""
3343
3344 #. type: TP
3345 #: build/C/man3/mallopt.3:54
3346 #, no-wrap
3347 msgid "Bit 0"
3348 msgstr "Bit 0"
3349
3350 #. type: Plain text
3351 #: build/C/man3/mallopt.3:64
3352 msgid ""
3353 "If this bit is set, then print a one-line message on I<stderr> that provides "
3354 "details about the error.  The message starts with the string \"***\\ glibc "
3355 "detected\\ ***\", followed by the program name, the name of the memory-"
3356 "allocation function in which the error was detected, a brief description of "
3357 "the error, and the memory address where the error was detected."
3358 msgstr ""
3359
3360 #. type: TP
3361 #: build/C/man3/mallopt.3:64
3362 #, no-wrap
3363 msgid "Bit 1"
3364 msgstr "Bit 1"
3365
3366 #. type: Plain text
3367 #: build/C/man3/mallopt.3:79
3368 msgid ""
3369 "If this bit is set, then, after printing any error message specified by bit "
3370 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3371 "since 2.4, if bit 0 is also set, then, between printing the error message "
3372 "and aborting, the program also prints a stack trace in the manner of "
3373 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3374 "proc/[pid]/maps> (see B<proc>(5))."
3375 msgstr ""
3376
3377 #. type: TP
3378 #: build/C/man3/mallopt.3:79
3379 #, no-wrap
3380 msgid "Bit 2 (since glibc 2.4)"
3381 msgstr "Bit 2 (glibc 2.4 以降)"
3382
3383 #. type: Plain text
3384 #: build/C/man3/mallopt.3:86
3385 msgid ""
3386 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3387 "the one-line message describing the error is simplified to contain just the "
3388 "name of the function where the error was detected and the brief description "
3389 "of the error."
3390 msgstr ""
3391
3392 #. type: Plain text
3393 #: build/C/man3/mallopt.3:91
3394 msgid "The remaining bits in I<value> are ignored."
3395 msgstr ""
3396
3397 #. type: Plain text
3398 #: build/C/man3/mallopt.3:95
3399 msgid ""
3400 "Combining the above details, the following numeric values are meaningful for "
3401 "B<M_CHECK_ACTION>:"
3402 msgstr ""
3403
3404 #. type: IP
3405 #: build/C/man3/mallopt.3:96
3406 #, no-wrap
3407 msgid "0"
3408 msgstr "0"
3409
3410 #. type: Plain text
3411 #: build/C/man3/mallopt.3:98
3412 msgid "Ignore error conditions; continue execution (with undefined results)."
3413 msgstr ""
3414
3415 #. type: IP
3416 #: build/C/man3/mallopt.3:98
3417 #, no-wrap
3418 msgid "1"
3419 msgstr "1"
3420
3421 #. type: Plain text
3422 #: build/C/man3/mallopt.3:100
3423 msgid "Print a detailed error message and continue execution."
3424 msgstr ""
3425
3426 #. type: IP
3427 #: build/C/man3/mallopt.3:100
3428 #, no-wrap
3429 msgid "2"
3430 msgstr "2"
3431
3432 #. type: Plain text
3433 #: build/C/man3/mallopt.3:102
3434 msgid "Abort the program."
3435 msgstr ""
3436
3437 #. type: IP
3438 #: build/C/man3/mallopt.3:102
3439 #, no-wrap
3440 msgid "3"
3441 msgstr "3"
3442
3443 #. type: Plain text
3444 #: build/C/man3/mallopt.3:105
3445 msgid ""
3446 "Print detailed error message, stack trace, and memory mappings, and abort "
3447 "the program."
3448 msgstr ""
3449
3450 #. type: IP
3451 #: build/C/man3/mallopt.3:105
3452 #, no-wrap
3453 msgid "5"
3454 msgstr "5"
3455
3456 #. type: Plain text
3457 #: build/C/man3/mallopt.3:107
3458 msgid "Print a simple error message and continue execution."
3459 msgstr ""
3460
3461 #. type: IP
3462 #: build/C/man3/mallopt.3:107
3463 #, no-wrap
3464 msgid "7"
3465 msgstr "7"
3466
3467 #. type: Plain text
3468 #: build/C/man3/mallopt.3:110
3469 msgid ""
3470 "Print simple error message, stack trace, and memory mappings, and abort the "
3471 "program."
3472 msgstr ""
3473
3474 #. type: Plain text
3475 #: build/C/man3/mallopt.3:116
3476 msgid ""
3477 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3478 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3479 msgstr ""
3480
3481 #. type: Plain text
3482 #: build/C/man3/mallopt.3:121
3483 msgid ""
3484 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3485 "crash may happen much later, and the true cause of the problem is then very "
3486 "hard to track down."
3487 msgstr ""
3488
3489 #. type: TP
3490 #: build/C/man3/mallopt.3:121
3491 #, no-wrap
3492 msgid "B<M_MMAP_MAX>"
3493 msgstr "B<M_MMAP_MAX>"
3494
3495 #.  The following text adapted from comments in the glibc source:
3496 #. type: Plain text
3497 #: build/C/man3/mallopt.3:131
3498 msgid ""
3499 "This parameter specifies the maximum number of allocation requests that may "
3500 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3501 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3502 "and using more than a few of them may degrade performance."
3503 msgstr ""
3504
3505 #. type: Plain text
3506 #: build/C/man3/mallopt.3:138
3507 msgid ""
3508 "The default value is 65,536, a value which has no special significance and "
3509 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3510 "use of B<mmap>(2)  for servicing large allocation requests."
3511 msgstr ""
3512
3513 #. type: TP
3514 #: build/C/man3/mallopt.3:138
3515 #, no-wrap
3516 msgid "B<M_MMAP_THRESHOLD>"
3517 msgstr "B<M_MMAP_THRESHOLD>"
3518
3519 #. type: Plain text
3520 #: build/C/man3/mallopt.3:147
3521 msgid ""
3522 "For allocations greater than or equal to the limit specified (in bytes) by "
3523 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3524 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3525 "break using B<sbrk>(2)."
3526 msgstr ""
3527
3528 #. type: Plain text
3529 #: build/C/man3/mallopt.3:167
3530 msgid ""
3531 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3532 "allocated memory blocks can always be independently released back to the "
3533 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3534 "the top end.)  On the other hand, there are some disadvantages to the use of "
3535 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3536 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3537 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3538 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3539 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3540 msgstr ""
3541
3542 #. type: Plain text
3543 #: build/C/man3/mallopt.3:174
3544 msgid ""
3545 "The lower limit for this parameter is 0.  The upper limit is "
3546 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3547 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3548 msgstr ""
3549
3550 #. type: Plain text
3551 #: build/C/man3/mallopt.3:192
3552 msgid ""
3553 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3554 "initial value of the threshold is 128*1024, but when blocks larger than the "
3555 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3556 "are freed, the threshold is adjusted upwards to the size of the freed "
3557 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3558 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3559 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3560 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3561 "parameters is set."
3562 msgstr ""
3563
3564 #. type: TP
3565 #: build/C/man3/mallopt.3:192
3566 #, no-wrap
3567 msgid "B<M_MXFAST> (since glibc 2.3)"
3568 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3569
3570 #.  The following text adapted from comments in the glibc sources:
3571 #. type: Plain text
3572 #: build/C/man3/mallopt.3:212
3573 msgid ""
3574 "Set the upper limit for memory allocation requests that are satisfied using "
3575 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3576 "are storage areas that hold deallocated blocks of memory of the same size "
3577 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3578 "the same size can be handled very quickly by allocating from the fastbin, "
3579 "although memory fragmentation and the overall memory footprint of the "
3580 "program can increase.  The default value for this parameter is I<64*sizeof"
3581 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3582 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3583 "the use of fastbins."
3584 msgstr ""
3585
3586 #. type: TP
3587 #: build/C/man3/mallopt.3:212
3588 #, no-wrap
3589 msgid "B<M_PERTURB> (since glibc 2.4)"
3590 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3591
3592 #. type: Plain text
3593 #: build/C/man3/mallopt.3:227
3594 msgid ""
3595 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3596 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3597 "of the value in the least significant byte of I<value>, and when allocated "
3598 "memory is released using B<free>(3), the freed bytes are set to the least "
3599 "significant byte of I<value>.  This can be useful for detecting errors where "
3600 "programs incorrectly rely on allocated memory being initialized to zero, or "
3601 "reuse values in memory that has already been freed."
3602 msgstr ""
3603
3604 #. type: TP
3605 #: build/C/man3/mallopt.3:227
3606 #, no-wrap
3607 msgid "B<M_TOP_PAD>"
3608 msgstr "B<M_TOP_PAD>"
3609
3610 #. type: Plain text
3611 #: build/C/man3/mallopt.3:234
3612 msgid ""
3613 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3614 "(2)  to modify the program break.  (The measurement unit for this parameter "
3615 "is bytes.)  This parameter has an effect in the following circumstances:"
3616 msgstr ""
3617
3618 #. type: Plain text
3619 #: build/C/man3/mallopt.3:241
3620 msgid ""
3621 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3622 "the B<sbrk>(2)  request."
3623 msgstr ""
3624
3625 #. type: Plain text
3626 #: build/C/man3/mallopt.3:247
3627 msgid ""
3628 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3629 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3630 "top of the heap."
3631 msgstr ""
3632
3633 #. type: Plain text
3634 #: build/C/man3/mallopt.3:251
3635 msgid ""
3636 "In either case, the amount of padding is always rounded to a system page "
3637 "boundary."
3638 msgstr ""
3639
3640 #. type: Plain text
3641 #: build/C/man3/mallopt.3:258
3642 msgid ""
3643 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3644 "system calls (when the parameter is set low)  and wasting unused memory at "
3645 "the top of the heap (when the parameter is set high)."
3646 msgstr ""
3647
3648 #.  DEFAULT_TOP_PAD in glibc source
3649 #. type: Plain text
3650 #: build/C/man3/mallopt.3:261
3651 msgid "The default value for this parameter is 128*1024."
3652 msgstr ""
3653
3654 #. type: TP
3655 #: build/C/man3/mallopt.3:261
3656 #, no-wrap
3657 msgid "B<M_TRIM_THRESHOLD>"
3658 msgstr "B<M_TRIM_THRESHOLD>"
3659
3660 #. type: Plain text
3661 #: build/C/man3/mallopt.3:277
3662 msgid ""
3663 "When the amount of contiguous free memory at the top of the heap grows "
3664 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3665 "back to the system.  (This can be useful in programs that continue to "
3666 "execute for a long period after freeing a significant amount of memory.)  "
3667 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3668 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3669 msgstr ""
3670
3671 #. type: Plain text
3672 #: build/C/man3/mallopt.3:282
3673 msgid ""
3674 "The default value for this parameter is 128*1024.  Setting "
3675 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3676 msgstr ""
3677
3678 #
3679 #
3680 #
3681 #.  FIXME Do the arena parameters need to be documented?
3682 #.  .TP
3683 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3684 #.  .TP
3685 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3686 #.  Environment variables
3687 #.      MALLOC_ARENA_MAX_
3688 #.      MALLOC_ARENA_TEST_
3689 #.  http://udrepper.livejournal.com/20948.html describes some details
3690 #.      of the MALLOC_ARENA_* environment variables.
3691 #.  These macros aren't enabled in production releases until 2.15?
3692 #.  (see glibc malloc/Makefile)
3693 #. type: Plain text
3694 #: build/C/man3/mallopt.3:305
3695 msgid ""
3696 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3697 "of system calls (when the parameter is set low)  and wasting unused memory "
3698 "at the top of the heap (when the parameter is set high)."
3699 msgstr ""
3700
3701 #. type: SS
3702 #: build/C/man3/mallopt.3:305
3703 #, no-wrap
3704 msgid "Environment variables"
3705 msgstr "環境変数"
3706
3707 #. type: Plain text
3708 #: build/C/man3/mallopt.3:320
3709 msgid ""
3710 "A number of environment variables can be defined to modify some of the same "
3711 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3712 "advantage that the source code of the program need not be changed.  To be "
3713 "effective, these variables must be defined before the first call to a memory-"
3714 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3715 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3716 "these variables are ignored in set-user-ID and set-group-ID programs."
3717 msgstr ""
3718
3719 #. type: Plain text
3720 #: build/C/man3/mallopt.3:323
3721 msgid ""
3722 "The environment variables are as follows (note the trailing underscore at "
3723 "the end of the name of each variable):"
3724 msgstr ""
3725
3726 #. type: TP
3727 #: build/C/man3/mallopt.3:323
3728 #, no-wrap
3729 msgid "B<MALLOC_CHECK_>"
3730 msgstr "B<MALLOC_CHECK_>"
3731
3732 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3733 #.  when MALLOC_CHECK_ was set.
3734 #. type: Plain text
3735 #: build/C/man3/mallopt.3:340
3736 msgid ""
3737 "This environment variable controls the same parameter as B<mallopt>()  "
3738 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3739 "special implementation of the memory-allocation functions is used.  (This is "
3740 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3741 "performs additional error checking, but is slower than the standard set of "
3742 "memory-allocation functions.  (This implementation does not detect all "
3743 "possible errors; memory leaks can still occur.)"
3744 msgstr ""
3745
3746 #. type: Plain text
3747 #: build/C/man3/mallopt.3:345
3748 msgid ""
3749 "The value assigned to this environment variable should be a single digit, "
3750 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3751 "the initial digit are ignored."
3752 msgstr ""
3753
3754 #. type: Plain text
3755 #: build/C/man3/mallopt.3:354
3756 msgid ""
3757 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3758 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3759 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3760 "also has an effect for set-user-ID and set-group-ID programs."
3761 msgstr ""
3762
3763 #. type: TP
3764 #: build/C/man3/mallopt.3:354
3765 #, no-wrap
3766 msgid "B<MALLOC_MMAP_MAX_>"
3767 msgstr "B<MALLOC_MMAP_MAX_>"
3768
3769 #. type: Plain text
3770 #: build/C/man3/mallopt.3:359
3771 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3772 msgstr ""
3773
3774 #. type: TP
3775 #: build/C/man3/mallopt.3:359
3776 #, no-wrap
3777 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3778 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3779
3780 #. type: Plain text
3781 #: build/C/man3/mallopt.3:364
3782 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3783 msgstr ""
3784
3785 #. type: TP
3786 #: build/C/man3/mallopt.3:364
3787 #, no-wrap
3788 msgid "B<MALLOC_PERTURB_>"
3789 msgstr "B<MALLOC_PERTURB_>"
3790
3791 #. type: Plain text
3792 #: build/C/man3/mallopt.3:369
3793 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3794 msgstr ""
3795
3796 #. type: TP
3797 #: build/C/man3/mallopt.3:369
3798 #, no-wrap
3799 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3800 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3801
3802 #. type: Plain text
3803 #: build/C/man3/mallopt.3:374
3804 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3805 msgstr ""
3806
3807 #. type: TP
3808 #: build/C/man3/mallopt.3:374
3809 #, no-wrap
3810 msgid "B<MALLOC_TOP_PAD_>"
3811 msgstr "B<MALLOC_TOP_PAD_>"
3812
3813 #. type: Plain text
3814 #: build/C/man3/mallopt.3:379
3815 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3816 msgstr ""
3817
3818 #. type: Plain text
3819 #: build/C/man3/mallopt.3:384
3820 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3821 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3822
3823 #.  .SH VERSIONS
3824 #.  Available already in glibc 2.0, possibly earlier
3825 #. type: Plain text
3826 #: build/C/man3/mallopt.3:392
3827 msgid "On error, I<errno> is I<not> set."
3828 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3829
3830 #.  .SH NOTES
3831 #. type: Plain text
3832 #: build/C/man3/mallopt.3:406
3833 msgid ""
3834 "This function is not specified by POSIX or the C standards.  A similar "
3835 "function exists on many System V derivatives, but the range of values for "
3836 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3837 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3838 "implemented in glibc."
3839 msgstr ""
3840
3841 #. type: Plain text
3842 #: build/C/man3/mallopt.3:410
3843 msgid "Specifying an invalid value for I<param> does not generate an error."
3844 msgstr ""
3845
3846 #.  FIXME This looks buggy:
3847 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3848 #.  malloc requests are rounded up:
3849 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3850 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3851 #. type: Plain text
3852 #: build/C/man3/mallopt.3:418
3853 msgid ""
3854 "A calculation error within the glibc implementation means that a call of the "
3855 "form:"
3856 msgstr ""
3857
3858 #. type: Plain text
3859 #: build/C/man3/mallopt.3:421
3860 #, no-wrap
3861 msgid "    mallopt(M_MXFAST, n)\n"
3862 msgstr "    mallopt(M_MXFAST, n)\n"
3863
3864 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3865 #. type: Plain text
3866 #: build/C/man3/mallopt.3:433
3867 msgid ""
3868 "does not result in fastbins being employed for all allocations of size up to "
3869 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3870 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3871 "integer."
3872 msgstr ""
3873
3874 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3875 #.  do have an effect for set-user-ID programs (but not
3876 #.  set-group-ID programs).
3877 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3878 #. type: Plain text
3879 #: build/C/man3/mallopt.3:445
3880 msgid ""
3881 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3882 "ignored in set-group-ID programs."
3883 msgstr ""
3884
3885 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3886 #. type: Plain text
3887 #: build/C/man3/mallopt.3:466
3888 msgid ""
3889 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3890 "of allocated memory are initialized to the complement of the byte in "
3891 "I<value>, and when that memory is freed, the bytes of the region are "
3892 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3893 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3894 "precisely the block of memory being freed by the call I<free(p)>, the block "
3895 "starting at I<p+sizeof(size_t)> is initialized."
3896 msgstr ""
3897
3898 #. type: Plain text
3899 #: build/C/man3/mallopt.3:475
3900 msgid ""
3901 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3902 "is supplied with an (integer) command-line argument, then that argument is "
3903 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3904 "block of memory, and frees it twice (an error)."
3905 msgstr ""
3906
3907 #. type: Plain text
3908 #: build/C/man3/mallopt.3:479
3909 msgid ""
3910 "The following shell session shows what happens when we run this program "
3911 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3912 msgstr ""
3913
3914 #. type: Plain text
3915 #: build/C/man3/mallopt.3:499
3916 #, no-wrap
3917 msgid ""
3918 "$ B<./a.out>\n"
3919 "main(): returned from first free() call\n"
3920 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3921 "======= Backtrace: =========\n"
3922 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3923 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3924 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3925 "\\&./a.out[0x80485db]\n"
3926 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3927 "\\&./a.out[0x8048471]\n"
3928 "======= Memory map: ========\n"
3929 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3930 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3931 "[some lines omitted]\n"
3932 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3933 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3934 "Aborted (core dumped)\n"
3935 msgstr ""
3936 "$ B<./a.out>\n"
3937 "main(): returned from first free() call\n"
3938 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3939 "======= Backtrace: =========\n"
3940 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3941 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3942 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3943 "\\&./a.out[0x80485db]\n"
3944 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3945 "\\&./a.out[0x8048471]\n"
3946 "======= Memory map: ========\n"
3947 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3948 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3949 "[some lines omitted]\n"
3950 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3951 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3952 "Aborted (core dumped)\n"
3953
3954 #. type: Plain text
3955 #: build/C/man3/mallopt.3:504
3956 msgid ""
3957 "The following runs show the results when employing other values for "
3958 "B<M_CHECK_ACTION>:"
3959 msgstr ""
3960
3961 #. type: Plain text
3962 #: build/C/man3/mallopt.3:517
3963 #, no-wrap
3964 msgid ""
3965 "$ B<./a.out 1>             # Diagnose error and continue\n"
3966 "main(): returned from first free() call\n"
3967 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3968 "main(): returned from second free() call\n"
3969 "$ B<./a.out 2>             # Abort without error message\n"
3970 "main(): returned from first free() call\n"
3971 "Aborted (core dumped)\n"
3972 "$ B<./a.out 0>             # Ignore error and continue\n"
3973 "main(): returned from first free() call\n"
3974 "main(): returned from second free() call\n"
3975 msgstr ""
3976 "$ B<./a.out 1>             # Diagnose error and continue\n"
3977 "main(): returned from first free() call\n"
3978 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3979 "main(): returned from second free() call\n"
3980 "$ B<./a.out 2>             # Abort without error message\n"
3981 "main(): returned from first free() call\n"
3982 "Aborted (core dumped)\n"
3983 "$ B<./a.out 0>             # Ignore error and continue\n"
3984 "main(): returned from first free() call\n"
3985 "main(): returned from second free() call\n"
3986
3987 #. type: Plain text
3988 #: build/C/man3/mallopt.3:523
3989 msgid ""
3990 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
3991 "environment variable:"
3992 msgstr ""
3993
3994 #. type: Plain text
3995 #: build/C/man3/mallopt.3:530
3996 #, no-wrap
3997 msgid ""
3998 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3999 "main(): returned from first free() call\n"
4000 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4001 "main(): returned from second free() call\n"
4002 msgstr ""
4003 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4004 "main(): returned from first free() call\n"
4005 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4006 "main(): returned from second free() call\n"
4007
4008 #. type: Plain text
4009 #: build/C/man3/mallopt.3:538
4010 #, no-wrap
4011 msgid ""
4012 "#include E<lt>malloc.hE<gt>\n"
4013 "#include E<lt>stdio.hE<gt>\n"
4014 "#include E<lt>stdlib.hE<gt>\n"
4015 msgstr ""
4016 "#include E<lt>malloc.hE<gt>\n"
4017 "#include E<lt>stdio.hE<gt>\n"
4018 "#include E<lt>stdlib.hE<gt>\n"
4019
4020 #. type: Plain text
4021 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4022 #, no-wrap
4023 msgid ""
4024 "int\n"
4025 "main(int argc, char *argv[])\n"
4026 "{\n"
4027 "    char *p;\n"
4028 msgstr ""
4029 "int\n"
4030 "main(int argc, char *argv[])\n"
4031 "{\n"
4032 "    char *p;\n"
4033
4034 #. type: Plain text
4035 #: build/C/man3/mallopt.3:550
4036 #, no-wrap
4037 msgid ""
4038 "    if (argc E<gt> 1) {\n"
4039 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4040 "            fprintf(stderr, \"mallopt() failed\");\n"
4041 "            exit(EXIT_FAILURE);\n"
4042 "        }\n"
4043 "    }\n"
4044 msgstr ""
4045 "    if (argc E<gt> 1) {\n"
4046 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4047 "            fprintf(stderr, \"mallopt() failed\");\n"
4048 "            exit(EXIT_FAILURE);\n"
4049 "        }\n"
4050 "    }\n"
4051
4052 #. type: Plain text
4053 #: build/C/man3/mallopt.3:556
4054 #, no-wrap
4055 msgid ""
4056 "    p = malloc(1000);\n"
4057 "    if (p == NULL) {\n"
4058 "        fprintf(stderr, \"malloc() failed\");\n"
4059 "        exit(EXIT_FAILURE);\n"
4060 "    }\n"
4061 msgstr ""
4062 "    p = malloc(1000);\n"
4063 "    if (p == NULL) {\n"
4064 "        fprintf(stderr, \"malloc() failed\");\n"
4065 "        exit(EXIT_FAILURE);\n"
4066 "    }\n"
4067
4068 #. type: Plain text
4069 #: build/C/man3/mallopt.3:559
4070 #, no-wrap
4071 msgid ""
4072 "    free(p);\n"
4073 "    printf(\"main(): returned from first free() call\\en\");\n"
4074 msgstr ""
4075 "    free(p);\n"
4076 "    printf(\"main(): returned from first free() call\\en\");\n"
4077
4078 #. type: Plain text
4079 #: build/C/man3/mallopt.3:562
4080 #, no-wrap
4081 msgid ""
4082 "    free(p);\n"
4083 "    printf(\"main(): returned from second free() call\\en\");\n"
4084 msgstr ""
4085 "    free(p);\n"
4086 "    printf(\"main(): returned from second free() call\\en\");\n"
4087
4088 #. type: Plain text
4089 #: build/C/man3/mallopt.3:580
4090 msgid ""
4091 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4092 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4093 "B<mtrace>(3), B<posix_memalign>(3)"
4094 msgstr ""
4095 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4096 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4097 "B<mtrace>(3), B<posix_memalign>(3)"
4098
4099 #. type: TH
4100 #: build/C/man3/mcheck.3:25
4101 #, no-wrap
4102 msgid "MCHECK"
4103 msgstr "MCHECK"
4104
4105 #. type: TH
4106 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4107 #, no-wrap
4108 msgid "2012-04-18"
4109 msgstr "2012-04-18"
4110
4111 #. type: Plain text
4112 #: build/C/man3/mcheck.3:28
4113 msgid ""
4114 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4115 msgstr ""
4116
4117 #. type: Plain text
4118 #: build/C/man3/mcheck.3:31
4119 #, no-wrap
4120 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4121 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4122
4123 #. type: Plain text
4124 #: build/C/man3/mcheck.3:33
4125 #, no-wrap
4126 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4127 msgstr ""
4128
4129 #. type: Plain text
4130 #: build/C/man3/mcheck.3:35
4131 #, no-wrap
4132 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4133 msgstr ""
4134
4135 #. type: Plain text
4136 #: build/C/man3/mcheck.3:37
4137 #, no-wrap
4138 msgid "B<void mcheck_check_all(void);>\n"
4139 msgstr "B<void mcheck_check_all(void);>\n"
4140
4141 #. type: Plain text
4142 #: build/C/man3/mcheck.3:39
4143 #, no-wrap
4144 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4145 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4146
4147 #. type: Plain text
4148 #: build/C/man3/mcheck.3:51
4149 msgid ""
4150 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4151 "(3)  family of memory-allocation functions.  These hooks cause certain "
4152 "consistency checks to be performed on the state of the heap.  The checks can "
4153 "detect application errors such as freeing a block of memory more than once "
4154 "or corrupting the bookkeeping data structures that immediately precede a "
4155 "block of allocated memory."
4156 msgstr ""
4157
4158 #. type: Plain text
4159 #: build/C/man3/mcheck.3:63
4160 msgid ""
4161 "To be effective, the B<mcheck>()  function must be called before the first "
4162 "call to B<malloc>(3)  or a related function.  In cases where this is "
4163 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4164 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4165 "memory-allocation function."
4166 msgstr ""
4167
4168 #. type: Plain text
4169 #: build/C/man3/mcheck.3:71
4170 msgid ""
4171 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4172 "checks on all allocated blocks whenever one of the memory-allocation "
4173 "functions is called.  This can be very slow!"
4174 msgstr ""
4175
4176 #. type: Plain text
4177 #: build/C/man3/mcheck.3:78
4178 msgid ""
4179 "The B<mcheck_check_all>()  function causes an immediate check on all "
4180 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4181 "beforehand."
4182 msgstr ""
4183
4184 #. type: Plain text
4185 #: build/C/man3/mcheck.3:91
4186 msgid ""
4187 "If the system detects an inconsistency in the heap, the caller-supplied "
4188 "function pointed to by I<abortfunc> is invoked with a single argument "
4189 "argument, I<mstatus>, that indicates what type of inconsistency was "
4190 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4191 "message on I<stderr> and calls B<abort>(3)."
4192 msgstr ""
4193
4194 #. type: Plain text
4195 #: build/C/man3/mcheck.3:103
4196 msgid ""
4197 "The B<mprobe>()  function performs a consistency check on the block of "
4198 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4199 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4200 msgstr ""
4201
4202 #. type: Plain text
4203 #: build/C/man3/mcheck.3:111
4204 msgid ""
4205 "The following list describes the values returned by B<mprobe>()  or passed "
4206 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4207 msgstr ""
4208
4209 #. type: TP
4210 #: build/C/man3/mcheck.3:111
4211 #, no-wrap
4212 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4213 msgstr ""
4214
4215 #. type: Plain text
4216 #: build/C/man3/mcheck.3:116
4217 msgid ""
4218 "B<mcheck>()  was not called before the first memory allocation function was "
4219 "called.  Consistency checking is not possible."
4220 msgstr ""
4221
4222 #. type: TP
4223 #: build/C/man3/mcheck.3:116
4224 #, no-wrap
4225 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man3/mcheck.3:119
4230 msgid "No inconsistency detected."
4231 msgstr ""
4232
4233 #. type: TP
4234 #: build/C/man3/mcheck.3:119
4235 #, no-wrap
4236 msgid "B<MCHECK_HEAD>"
4237 msgstr "B<MCHECK_HEAD>"
4238
4239 #. type: Plain text
4240 #: build/C/man3/mcheck.3:122
4241 msgid "Memory preceding an allocated block was clobbered."
4242 msgstr ""
4243
4244 #. type: TP
4245 #: build/C/man3/mcheck.3:122
4246 #, no-wrap
4247 msgid "B<MCHECK_TAIL>"
4248 msgstr "B<MCHECK_TAIL>"
4249
4250 #. type: Plain text
4251 #: build/C/man3/mcheck.3:125
4252 msgid "Memory following an allocated block was clobbered."
4253 msgstr ""
4254
4255 #. type: TP
4256 #: build/C/man3/mcheck.3:125
4257 #, no-wrap
4258 msgid "B<MCHECK_FREE>"
4259 msgstr "B<MCHECK_FREE>"
4260
4261 #. type: Plain text
4262 #: build/C/man3/mcheck.3:129
4263 msgid "A block of memory was freed twice."
4264 msgstr ""
4265
4266 #. type: Plain text
4267 #: build/C/man3/mcheck.3:134
4268 msgid ""
4269 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4270 msgstr ""
4271
4272 #. type: Plain text
4273 #: build/C/man3/mcheck.3:145
4274 msgid ""
4275 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4276 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4277 "since at least glibc 2.0"
4278 msgstr ""
4279
4280 #.  But is MALLOC_CHECK_ slower?
4281 #. type: Plain text
4282 #: build/C/man3/mcheck.3:159
4283 msgid ""
4284 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4285 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4286 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4287 "application to be relinked."
4288 msgstr ""
4289
4290 #. type: Plain text
4291 #: build/C/man3/mcheck.3:165
4292 msgid ""
4293 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4294 "same block of memory twice.  The following shell session demonstrates what "
4295 "happens when running the program:"
4296 msgstr ""
4297
4298 #. type: Plain text
4299 #: build/C/man3/mcheck.3:170
4300 #, no-wrap
4301 msgid ""
4302 "$B< ./a.out>\n"
4303 "About to free\n"
4304 msgstr ""
4305
4306 #. type: Plain text
4307 #: build/C/man3/mcheck.3:174
4308 #, no-wrap
4309 msgid ""
4310 "About to free a second time\n"
4311 "block freed twice\n"
4312 "Aborted (core dumped)\n"
4313 msgstr ""
4314
4315 #. type: Plain text
4316 #: build/C/man3/mcheck.3:182
4317 #, no-wrap
4318 msgid ""
4319 "#include E<lt>stdlib.hE<gt>\n"
4320 "#include E<lt>stdio.hE<gt>\n"
4321 "#include E<lt>mcheck.hE<gt>\n"
4322 msgstr ""
4323 "#include E<lt>stdlib.hE<gt>\n"
4324 "#include E<lt>stdio.hE<gt>\n"
4325 "#include E<lt>mcheck.hE<gt>\n"
4326
4327 #. type: Plain text
4328 #: build/C/man3/mcheck.3:190
4329 #, no-wrap
4330 msgid ""
4331 "    if (mcheck(NULL) != 0) {\n"
4332 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4333 msgstr ""
4334
4335 #. type: Plain text
4336 #: build/C/man3/mcheck.3:193
4337 #, no-wrap
4338 msgid ""
4339 "        exit(EXIT_FAILURE);\n"
4340 "    }\n"
4341 msgstr ""
4342 "        exit(EXIT_FAILURE);\n"
4343 "    }\n"
4344
4345 #. type: Plain text
4346 #: build/C/man3/mcheck.3:195
4347 #, no-wrap
4348 msgid "    p = malloc(1000);\n"
4349 msgstr "    p = malloc(1000);\n"
4350
4351 #. type: Plain text
4352 #: build/C/man3/mcheck.3:200
4353 #, no-wrap
4354 msgid ""
4355 "    fprintf(stderr, \"About to free\\en\");\n"
4356 "    free(p);\n"
4357 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4358 "    free(p);\n"
4359 msgstr ""
4360
4361 #. type: Plain text
4362 #: build/C/man3/mcheck.3:208
4363 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4364 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4365
4366 #. type: TH
4367 #: build/C/man2/mlock.2:26
4368 #, no-wrap
4369 msgid "MLOCK"
4370 msgstr "MLOCK"
4371
4372 #. type: TH
4373 #: build/C/man2/mlock.2:26
4374 #, no-wrap
4375 msgid "2011-09-14"
4376 msgstr "2011-09-14"
4377
4378 #. type: Plain text
4379 #: build/C/man2/mlock.2:29
4380 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4381 msgstr "mlock - メモリのロックとロック解除を行う"
4382
4383 #. type: Plain text
4384 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4385 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4386 #, no-wrap
4387 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4388 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4389
4390 #. type: Plain text
4391 #: build/C/man2/mlock.2:35
4392 #, no-wrap
4393 msgid ""
4394 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4395 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4396 msgstr ""
4397 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4398 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4399
4400 #. type: Plain text
4401 #: build/C/man2/mlock.2:38
4402 #, no-wrap
4403 msgid ""
4404 "B<int mlockall(int >I<flags>B<);>\n"
4405 "B<int munlockall(void);>\n"
4406 msgstr ""
4407 "B<int mlockall(int >I<flags>B<);>\n"
4408 "B<int munlockall(void);>\n"
4409
4410 #. type: Plain text
4411 #: build/C/man2/mlock.2:54
4412 msgid ""
4413 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4414 "process's virtual address space into RAM, preventing that memory from being "
4415 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4416 "converse operation, respectively unlocking part or all of the calling "
4417 "process's virtual address space, so that pages in the specified virtual "
4418 "address range may once more to be swapped out if required by the kernel "
4419 "memory manager.  Memory locking and unlocking are performed in units of "
4420 "whole pages."
4421 msgstr ""
4422 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4423 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4424 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4425 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4426 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4427 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4428 "る。"
4429
4430 #. type: SS
4431 #: build/C/man2/mlock.2:54
4432 #, no-wrap
4433 msgid "mlock() and munlock()"
4434 msgstr "mlock() と munlock()"
4435
4436 #. type: Plain text
4437 #: build/C/man2/mlock.2:64
4438 msgid ""
4439 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4440 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4441 "address range are guaranteed to be resident in RAM when the call returns "
4442 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4443 msgstr ""
4444 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4445 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4446 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4447 "れるまで RAM に残り続けることが保証される。"
4448
4449 #. type: Plain text
4450 #: build/C/man2/mlock.2:73
4451 msgid ""
4452 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4453 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4454 "of the specified memory range can be moved to external swap space again by "
4455 "the kernel."
4456 msgstr ""
4457 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4458 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4459 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4460
4461 #. type: SS
4462 #: build/C/man2/mlock.2:73
4463 #, no-wrap
4464 msgid "mlockall() and munlockall()"
4465 msgstr "mlockall() と munlockall()"
4466
4467 #. type: Plain text
4468 #: build/C/man2/mlock.2:83
4469 msgid ""
4470 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4471 "process.  This includes the pages of the code, data and stack segment, as "
4472 "well as shared libraries, user space kernel data, shared memory, and memory-"
4473 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4474 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4475 "later unlocked."
4476 msgstr ""
4477 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4478 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4479 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4480 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4481 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4482 "残り続けることが保証される。"
4483
4484 #. type: Plain text
4485 #: build/C/man2/mlock.2:88
4486 msgid ""
4487 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4488 "following constants:"
4489 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4490
4491 #. type: TP
4492 #: build/C/man2/mlock.2:88
4493 #, no-wrap
4494 msgid "B<MCL_CURRENT>"
4495 msgstr "B<MCL_CURRENT>"
4496
4497 #. type: Plain text
4498 #: build/C/man2/mlock.2:92
4499 msgid ""
4500 "Lock all pages which are currently mapped into the address space of the "
4501 "process."
4502 msgstr ""
4503 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4504
4505 #. type: TP
4506 #: build/C/man2/mlock.2:92
4507 #, no-wrap
4508 msgid "B<MCL_FUTURE>"
4509 msgstr "B<MCL_FUTURE>"
4510
4511 #. type: Plain text
4512 #: build/C/man2/mlock.2:99
4513 msgid ""
4514 "Lock all pages which will become mapped into the address space of the "
4515 "process in the future.  These could be for instance new pages required by a "
4516 "growing heap and stack as well as new memory mapped files or shared memory "
4517 "regions."
4518 msgstr ""
4519 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4520 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4521 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4522
4523 #. type: Plain text
4524 #: build/C/man2/mlock.2:112
4525 msgid ""
4526 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4527 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4528 "locked bytes to exceed the permitted maximum (see below).  In the same "
4529 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4530 "expansion and deliver a B<SIGSEGV> signal to the process."
4531 msgstr ""
4532 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4533 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4534 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4535 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4536 "スに送る。"
4537
4538 #. type: Plain text
4539 #: build/C/man2/mlock.2:116
4540 msgid ""
4541 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4542 "calling process."
4543 msgstr ""
4544 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4545 "全てのページをロック解除する。"
4546
4547 #. type: Plain text
4548 #: build/C/man2/mlock.2:122
4549 msgid ""
4550 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4551 "is set appropriately, and no changes are made to any locks in the address "
4552 "space of the process."
4553 msgstr ""
4554 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4555 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4556 "れない。"
4557
4558 #. type: Plain text
4559 #: build/C/man2/mlock.2:131
4560 msgid ""
4561 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4562 "resource limit, but tried to lock more memory than the limit permitted.  "
4563 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4564 msgstr ""
4565 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4566 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4567 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4568
4569 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4570 #.  take into account whether the to-be-locked range overlaps with
4571 #.  already locked pages.  Thus, suppose we allocate
4572 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4573 #.  mlock(), and then lock the *same* page range a second time.
4574 #.  In the case, the second mlock() call will fail, since the check
4575 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4576 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4577 #. type: Plain text
4578 #: build/C/man2/mlock.2:143
4579 msgid ""
4580 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4581 "RAM."
4582 msgstr ""
4583 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4584
4585 #. SVr4 documents an additional EAGAIN error code.
4586 #. type: Plain text
4587 #: build/C/man2/mlock.2:149
4588 msgid ""
4589 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4590 "perform the requested operation."
4591 msgstr ""
4592 "呼び出し側が特権を持っていないが、\n"
4593 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4594
4595 #. type: Plain text
4596 #: build/C/man2/mlock.2:154
4597 msgid "For B<mlock>()  and B<munlock>():"
4598 msgstr "B<mlock>()  と B<munlock>()  用として:"
4599
4600 #. type: Plain text
4601 #: build/C/man2/mlock.2:157
4602 msgid "Some or all of the specified address range could not be locked."
4603 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4604
4605 #. type: Plain text
4606 #: build/C/man2/mlock.2:164
4607 msgid ""
4608 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4609 "addition may have resulted in an overflow)."
4610 msgstr ""
4611 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4612 "(例えば、加算でオーバーフローが発生したなど)。"
4613
4614 #. type: Plain text
4615 #: build/C/man2/mlock.2:169
4616 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4617 msgstr ""
4618 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4619
4620 #. type: Plain text
4621 #: build/C/man2/mlock.2:173
4622 msgid ""
4623 "Some of the specified address range does not correspond to mapped pages in "
4624 "the address space of the process."
4625 msgstr ""
4626 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4627 "い。"
4628
4629 #. type: Plain text
4630 #: build/C/man2/mlock.2:176
4631 msgid "For B<mlockall>():"
4632 msgstr "B<mlockall>()  用として:"
4633
4634 #. type: Plain text
4635 #: build/C/man2/mlock.2:179
4636 msgid "Unknown I<flags> were specified."
4637 msgstr "未知の I<flags> が指定された。"
4638
4639 #. type: Plain text
4640 #: build/C/man2/mlock.2:182
4641 msgid "For B<munlockall>():"
4642 msgstr "B<munlockall>()  用として:"
4643
4644 #. type: Plain text
4645 #: build/C/man2/mlock.2:186
4646 msgid ""
4647 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4648 msgstr ""
4649 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4650
4651 #. type: Plain text
4652 #: build/C/man2/mlock.2:188
4653 msgid "POSIX.1-2001, SVr4."
4654 msgstr "POSIX.1-2001, SVr4."
4655
4656 #. type: SH
4657 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4658 #, no-wrap
4659 msgid "AVAILABILITY"
4660 msgstr "可用性"
4661
4662 #. type: Plain text
4663 #: build/C/man2/mlock.2:200
4664 msgid ""
4665 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4666 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4667 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4668 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4669 msgstr ""
4670 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4671 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4672 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4673 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4674 "び出すことで決定できる。"
4675
4676 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4677 #.  -1: unavailable, 0: ask using sysconf().
4678 #.  glibc defines it to 1.
4679 #. type: Plain text
4680 #: build/C/man2/mlock.2:213
4681 msgid ""
4682 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4683 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4684 "than 0.  (See also B<sysconf>(3).)"
4685 msgstr ""
4686 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4687 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4688 "(B<sysconf>(3)  も参照のこと)。"
4689
4690 #. type: Plain text
4691 #: build/C/man2/mlock.2:231
4692 msgid ""
4693 "Memory locking has two main applications: real-time algorithms and high-"
4694 "security data processing.  Real-time applications require deterministic "
4695 "timing, and, like scheduling, paging is one major cause of unexpected "
4696 "program execution delays.  Real-time applications will usually also switch "
4697 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4698 "security software often handles critical bytes like passwords or secret keys "
4699 "as data structures.  As a result of paging, these secrets could be "
4700 "transferred onto a persistent swap store medium, where they might be "
4701 "accessible to the enemy long after the security software has erased the "
4702 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4703 "laptops and some desktop computers will save a copy of the system's RAM to "
4704 "disk, regardless of memory locks.)"
4705 msgstr ""
4706 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4707 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4708 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4709 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4710 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4711 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4712 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4713 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4714 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4715 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4716 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4717 "存することに注意)。"
4718
4719 #. type: Plain text
4720 #: build/C/man2/mlock.2:244
4721 msgid ""
4722 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4723 "faults should reserve enough locked stack pages before entering the time-"
4724 "critical section, so that no page fault can be caused by function calls.  "
4725 "This can be achieved by calling a function that allocates a sufficiently "
4726 "large automatic variable (an array) and writes to the memory occupied by "
4727 "this array in order to touch these stack pages.  This way, enough pages will "
4728 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4729 "that not even copy-on-write page faults can occur in the critical section."
4730 msgstr ""
4731 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4732 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4733 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4734 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4735 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4736 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4737 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4738 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4739 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4740
4741 #. type: Plain text
4742 #: build/C/man2/mlock.2:250
4743 msgid ""
4744 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4745 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4746 "terminates."
4747 msgstr ""
4748 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4749 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4750 "れる)。"
4751
4752 #. type: Plain text
4753 #: build/C/man2/mlock.2:254
4754 msgid ""
4755 "The memory lock on an address range is automatically removed if the address "
4756 "range is unmapped via B<munmap>(2)."
4757 msgstr ""
4758 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4759 "よってアンマップされた場合は削除される。"
4760
4761 #. type: Plain text
4762 #: build/C/man2/mlock.2:267
4763 msgid ""
4764 "Memory locks do not stack, that is, pages which have been locked several "
4765 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4766 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4767 "Pages which are mapped to several locations or by several processes stay "
4768 "locked into RAM as long as they are locked at least at one location or by at "
4769 "least one process."
4770 msgstr ""
4771 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4772 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4773 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4774 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4775 "のプロセスでロックされている限りは RAM に残り続ける。"
4776
4777 #. type: Plain text
4778 #: build/C/man2/mlock.2:278
4779 msgid ""
4780 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4781 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4782 "implementation to require that I<addr> is page aligned, so portable "
4783 "applications should ensure this."
4784 msgstr ""
4785 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4786 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4787 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4788 "ケーションではきちんと境界に合わせた方が良い。"
4789
4790 #. type: Plain text
4791 #: build/C/man2/mlock.2:291
4792 msgid ""
4793 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4794 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4795 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4796 msgstr ""
4797 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4798 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4799 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4800 "表示される。"
4801
4802 #. type: SS
4803 #: build/C/man2/mlock.2:291
4804 #, no-wrap
4805 msgid "Limits and permissions"
4806 msgstr "制限と権限"
4807
4808 #. type: Plain text
4809 #: build/C/man2/mlock.2:298
4810 msgid ""
4811 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4812 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4813 "defines a limit on how much memory the process may lock."
4814 msgstr ""
4815 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4816 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4817 "できるかの制限を定義する。"
4818
4819 #. type: Plain text
4820 #: build/C/man2/mlock.2:304
4821 msgid ""
4822 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4823 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4824 "instead defines a limit on how much memory an unprivileged process may lock."
4825 msgstr ""
4826 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4827 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4828 "クできるメモリ量の制限を定義する。"
4829
4830 #. type: Plain text
4831 #: build/C/man2/mlock.2:312
4832 msgid ""
4833 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4834 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4835 "was rectified in kernel 2.4.18."
4836 msgstr ""
4837 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4838 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4839 "ネル 2.4.18 で修正された。"
4840
4841 #.  See the following LKML thread:
4842 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4843 #.  "Rationale for RLIMIT_MEMLOCK"
4844 #.  23 Jan 2006
4845 #. type: Plain text
4846 #: build/C/man2/mlock.2:329
4847 msgid ""
4848 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4849 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4850 "example, setting its effective UID to a nonzero value), then subsequent "
4851 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4852 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4853 msgstr ""
4854 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4855 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4856 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4857 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4858 "B<brk>(2))  は失敗する。"
4859
4860 #. type: Plain text
4861 #: build/C/man2/mlock.2:336
4862 msgid ""
4863 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4864 "B<capabilities>(7)"
4865 msgstr ""
4866 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4867 "B<capabilities>(7)"
4868
4869 #. type: TH
4870 #: build/C/man2/mmap.2:40
4871 #, no-wrap
4872 msgid "MMAP"
4873 msgstr "MMAP"
4874
4875 #. type: TH
4876 #: build/C/man2/mmap.2:40
4877 #, no-wrap
4878 msgid "2013-04-17"
4879 msgstr "2013-04-17"
4880
4881 #. type: Plain text
4882 #: build/C/man2/mmap.2:43
4883 msgid "mmap, munmap - map or unmap files or devices into memory"
4884 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4885
4886 #. type: Plain text
4887 #: build/C/man2/mmap.2:51
4888 #, no-wrap
4889 msgid ""
4890 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4891 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4892 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4893 msgstr ""
4894 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4895 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4896 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4897
4898 #. type: Plain text
4899 #: build/C/man2/mmap.2:54
4900 msgid "See NOTES for information on feature test macro requirements."
4901 msgstr ""
4902
4903 #. type: Plain text
4904 #: build/C/man2/mmap.2:63
4905 msgid ""
4906 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4907 "process.  The starting address for the new mapping is specified in I<addr>.  "
4908 "The I<length> argument specifies the length of the mapping."
4909 msgstr ""
4910 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4911 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4912 "は I<length> 引き数で指定される。"
4913
4914 #.  Before Linux 2.6.24, the address was rounded up to the next page
4915 #.  boundary; since 2.6.24, it is rounded down!
4916 #. type: Plain text
4917 #: build/C/man2/mmap.2:77
4918 msgid ""
4919 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4920 "the mapping; this is the most portable method of creating a new mapping.  If "
4921 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4922 "the mapping; on Linux, the mapping will be created at a nearby page "
4923 "boundary.  The address of the new mapping is returned as the result of the "
4924 "call."
4925 msgstr ""
4926 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4927 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4928 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4929 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4930 "ングのアドレスは、呼び出しの返り値として返される。"
4931
4932 #. type: Plain text
4933 #: build/C/man2/mmap.2:89
4934 msgid ""
4935 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4936 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4937 "offset I<offset> in the file (or other object) referred to by the file "
4938 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4939 "by I<sysconf(_SC_PAGE_SIZE)>."
4940 msgstr ""
4941 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4942 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4943 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4944 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4945 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4946
4947 #. type: Plain text
4948 #: build/C/man2/mmap.2:97
4949 msgid ""
4950 "The I<prot> argument describes the desired memory protection of the mapping "
4951 "(and must not conflict with the open mode of the file).  It is either "
4952 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4953 msgstr ""
4954 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4955 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4956 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4957
4958 #. type: TP
4959 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
4960 #, no-wrap
4961 msgid "B<PROT_EXEC>"
4962 msgstr "B<PROT_EXEC>"
4963
4964 #. type: Plain text
4965 #: build/C/man2/mmap.2:100
4966 msgid "Pages may be executed."
4967 msgstr "ページは実行可能である。"
4968
4969 #. type: TP
4970 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
4971 #, no-wrap
4972 msgid "B<PROT_READ>"
4973 msgstr "B<PROT_READ>"
4974
4975 #. type: Plain text
4976 #: build/C/man2/mmap.2:103
4977 msgid "Pages may be read."
4978 msgstr "ページは読み込み可能である。"
4979
4980 #. type: TP
4981 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
4982 #, no-wrap
4983 msgid "B<PROT_WRITE>"
4984 msgstr "B<PROT_WRITE>"
4985
4986 #. type: Plain text
4987 #: build/C/man2/mmap.2:106
4988 msgid "Pages may be written."
4989 msgstr "ページに書き込み可能である。"
4990
4991 #. type: TP
4992 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
4993 #, no-wrap
4994 msgid "B<PROT_NONE>"
4995 msgstr "B<PROT_NONE>"
4996
4997 #. type: Plain text
4998 #: build/C/man2/mmap.2:109
4999 msgid "Pages may not be accessed."
5000 msgstr "ページにはアクセスできない。"
5001
5002 #. type: Plain text
5003 #: build/C/man2/mmap.2:118
5004 msgid ""
5005 "The I<flags> argument determines whether updates to the mapping are visible "
5006 "to other processes mapping the same region, and whether updates are carried "
5007 "through to the underlying file.  This behavior is determined by including "
5008 "exactly one of the following values in I<flags>:"
5009 msgstr ""
5010 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5011 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5012 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5013 "I<flags> に含めることで指定する。"
5014
5015 #. type: TP
5016 #: build/C/man2/mmap.2:118
5017 #, no-wrap
5018 msgid "B<MAP_SHARED>"
5019 msgstr "B<MAP_SHARED>"
5020
5021 #. type: Plain text
5022 #: build/C/man2/mmap.2:128
5023 msgid ""
5024 "Share this mapping.  Updates to the mapping are visible to other processes "
5025 "that map this file, and are carried through to the underlying file.  The "
5026 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5027 "called."
5028 msgstr ""
5029 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5030 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5031 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5032 "るまで行われないこともある。"
5033
5034 #. type: TP
5035 #: build/C/man2/mmap.2:128
5036 #, no-wrap
5037 msgid "B<MAP_PRIVATE>"
5038 msgstr "B<MAP_PRIVATE>"
5039
5040 #. type: Plain text
5041 #: build/C/man2/mmap.2:137
5042 msgid ""
5043 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5044 "visible to other processes mapping the same file, and are not carried "
5045 "through to the underlying file.  It is unspecified whether changes made to "
5046 "the file after the B<mmap>()  call are visible in the mapped region."
5047 msgstr ""
5048 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5049 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5050 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5051 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5052 "かは規定されていない。"
5053
5054 #. type: Plain text
5055 #: build/C/man2/mmap.2:139
5056 msgid "Both of these flags are described in POSIX.1-2001."
5057 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5058
5059 #. type: Plain text
5060 #: build/C/man2/mmap.2:142
5061 msgid ""
5062 "In addition, zero or more of the following values can be ORed in I<flags>:"
5063 msgstr ""
5064 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5065 "ことができる。"
5066
5067 #. type: TP
5068 #: build/C/man2/mmap.2:142
5069 #, no-wrap
5070 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5071 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5072
5073 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5074 #. type: Plain text
5075 #: build/C/man2/mmap.2:158
5076 msgid ""
5077 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5078 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5079 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5080 "as to improve context-switch performance on some early 64-bit processors.  "
5081 "Modern x86-64 processors no longer have this performance problem, so use of "
5082 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5083 "ignored when B<MAP_FIXED> is set."
5084 msgstr ""
5085 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5086 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5087 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5088 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5089 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5090 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5091 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5092 "グは無視される。"
5093
5094 #. type: TP
5095 #: build/C/man2/mmap.2:158
5096 #, no-wrap
5097 msgid "B<MAP_ANON>"
5098 msgstr "B<MAP_ANON>"
5099
5100 #. type: Plain text
5101 #: build/C/man2/mmap.2:163
5102 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5103 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5104
5105 #. type: TP
5106 #: build/C/man2/mmap.2:163
5107 #, no-wrap
5108 msgid "B<MAP_ANONYMOUS>"
5109 msgstr "B<MAP_ANONYMOUS>"
5110
5111 #. type: Plain text
5112 #: build/C/man2/mmap.2:185
5113 msgid ""
5114 "The mapping is not backed by any file; its contents are initialized to "
5115 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5116 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5117 "is specified, and portable applications should ensure this.  The use of "
5118 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5119 "only since kernel 2.4."
5120 msgstr ""
5121 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5122 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5123 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5124 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5125 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5126 "以降の Linux でのみサポートされている。"
5127
5128 #. type: TP
5129 #: build/C/man2/mmap.2:185
5130 #, no-wrap
5131 msgid "B<MAP_DENYWRITE>"
5132 msgstr "B<MAP_DENYWRITE>"
5133
5134 #.  Introduced in 1.1.36, removed in 1.3.24.
5135 #. type: Plain text
5136 #: build/C/man2/mmap.2:193
5137 msgid ""
5138 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5139 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5140 "denial-of-service attacks.)"
5141 msgstr ""
5142 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5143 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5144 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5145
5146 #. type: TP
5147 #: build/C/man2/mmap.2:193
5148 #, no-wrap
5149 msgid "B<MAP_EXECUTABLE>"
5150 msgstr "B<MAP_EXECUTABLE>"
5151
5152 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5153 #.  (Long ago, it signaled that the underlying file is an executable.
5154 #.  However, that information was not really used anywhere.)
5155 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5156 #.  MAP_DENYWRITE?
5157 #. type: Plain text
5158 #: build/C/man2/mmap.2:201
5159 msgid "This flag is ignored."
5160 msgstr "このフラグは無視される。"
5161
5162 #. type: TP
5163 #: build/C/man2/mmap.2:201
5164 #, no-wrap
5165 msgid "B<MAP_FILE>"
5166 msgstr "B<MAP_FILE>"
5167
5168 #.  On some systems, this was required as the opposite of
5169 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5170 #. type: Plain text
5171 #: build/C/man2/mmap.2:207
5172 msgid "Compatibility flag.  Ignored."
5173 msgstr "互換性のためのフラグ。無視される。"
5174
5175 #. type: TP
5176 #: build/C/man2/mmap.2:207
5177 #, no-wrap
5178 msgid "B<MAP_FIXED>"
5179 msgstr "B<MAP_FIXED>"
5180
5181 #. type: Plain text
5182 #: build/C/man2/mmap.2:225
5183 msgid ""
5184 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5185 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5186 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5187 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5188 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5189 "requiring a fixed address for a mapping is less portable, the use of this "
5190 "option is discouraged."
5191 msgstr ""
5192 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5193 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5194 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5195 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5196 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5197 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5198 "を推奨する。"
5199
5200 #. type: TP
5201 #: build/C/man2/mmap.2:225
5202 #, no-wrap
5203 msgid "B<MAP_GROWSDOWN>"
5204 msgstr "B<MAP_GROWSDOWN>"
5205
5206 #. type: Plain text
5207 #: build/C/man2/mmap.2:230
5208 msgid ""
5209 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5210 "mapping should extend downward in memory."
5211 msgstr ""
5212 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5213 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5214 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5215
5216 #. type: TP
5217 #: build/C/man2/mmap.2:230
5218 #, no-wrap
5219 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5220 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5221
5222 #. type: Plain text
5223 #: build/C/man2/mmap.2:236
5224 msgid ""
5225 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5226 "I<Documentation/vm/hugetlbpage.txt> for further information."
5227 msgstr ""
5228 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5229 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5230
5231 #. type: TP
5232 #: build/C/man2/mmap.2:236
5233 #, no-wrap
5234 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5235 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5236
5237 #.  If set, the mapped pages will not be swapped out.
5238 #. type: Plain text
5239 #: build/C/man2/mmap.2:242
5240 msgid ""
5241 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5242 "(2).  This flag is ignored in older kernels."
5243 msgstr ""
5244 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5245 "前のカーネルでは、このフラグは無視される。"
5246
5247 #. type: TP
5248 #: build/C/man2/mmap.2:242
5249 #, no-wrap
5250 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5251 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5252
5253 #. type: Plain text
5254 #: build/C/man2/mmap.2:257
5255 msgid ""
5256 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5257 "ahead: create page tables entries only for pages that are already present in "
5258 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5259 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5260 "reimplemented."
5261 msgstr "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページテーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5262
5263 #. type: TP
5264 #: build/C/man2/mmap.2:257
5265 #, no-wrap
5266 msgid "B<MAP_NORESERVE>"
5267 msgstr "B<MAP_NORESERVE>"
5268
5269 #. type: Plain text
5270 #: build/C/man2/mmap.2:272
5271 msgid ""
5272 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5273 "one has the guarantee that it is possible to modify the mapping.  When swap "
5274 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5275 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5276 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5277 "effect only for private writable mappings."
5278 msgstr "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがある。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プライベート・マッピングについてのみ効果があった。"
5279
5280 #. type: TP
5281 #: build/C/man2/mmap.2:272
5282 #, no-wrap
5283 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5284 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5285
5286 #. type: Plain text
5287 #: build/C/man2/mmap.2:279
5288 msgid ""
5289 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5290 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5291 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5292 "only since Linux 2.6.23."
5293 msgstr "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合には、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピングに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux 2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポートされている。"
5294
5295 #. type: TP
5296 #: build/C/man2/mmap.2:279
5297 #, no-wrap
5298 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5299 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5300
5301 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5302 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5303 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5304 #.  "pthread_create() slow for many threads; also time to revisit 64b
5305 #.   context switch optimization?"
5306 #. type: Plain text
5307 #: build/C/man2/mmap.2:292
5308 msgid ""
5309 "Allocate the mapping at an address suitable for a process or thread stack.  "
5310 "This flag is currently a no-op, but is used in the glibc threading "
5311 "implementation so that if some architectures require special treatment for "
5312 "stack allocations, support can later be transparently implemented for glibc."
5313 msgstr ""
5314 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5315 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5316 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5317 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5318 "る。"
5319
5320 #. type: TP
5321 #: build/C/man2/mmap.2:292
5322 #, no-wrap
5323 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5324 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5325
5326 #. type: Plain text
5327 #: build/C/man2/mmap.2:302
5328 msgid ""
5329 "Don't clear anonymous pages.  This flag is intended to improve performance "
5330 "on embedded devices.  This flag is honored only if the kernel was configured "
5331 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5332 "implications, that option is normally enabled only on embedded devices (i."
5333 "e., devices where one has complete control of the contents of user memory)."
5334 msgstr ""
5335 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5336 "ス\n"
5337 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5338 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5339 "このフラグは効果を持つ。\n"
5340 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5341 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5342
5343 #. type: Plain text
5344 #: build/C/man2/mmap.2:310
5345 msgid ""
5346 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5347 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5348 "B<MAP_ANON>)."
5349 msgstr ""
5350 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5351 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5352 "B<MAP_ANON>)  もサポートされている。"
5353
5354 #. type: Plain text
5355 #: build/C/man2/mmap.2:317
5356 msgid ""
5357 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5358 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5359 msgstr ""
5360 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5361 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5362
5363 #. type: Plain text
5364 #: build/C/man2/mmap.2:323
5365 msgid ""
5366 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5367 "attributes."
5368 msgstr ""
5369 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5370
5371 #. type: Plain text
5372 #: build/C/man2/mmap.2:331
5373 msgid ""
5374 "A file is mapped in multiples of the page size.  For a file that is not a "
5375 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5376 "writes to that region are not written out to the file.  The effect of "
5377 "changing the size of the underlying file of a mapping on the pages that "
5378 "correspond to added or removed regions of the file is unspecified."
5379 msgstr ""
5380 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5381 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5382 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5383 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5384 "マップされたページに対してどのような影響があるかは規定されていない。"
5385
5386 #. type: SS
5387 #: build/C/man2/mmap.2:331
5388 #, no-wrap
5389 msgid "munmap()"
5390 msgstr "munmap()"
5391
5392 #. type: Plain text
5393 #: build/C/man2/mmap.2:341
5394 msgid ""
5395 "The B<munmap>()  system call deletes the mappings for the specified address "
5396 "range, and causes further references to addresses within the range to "
5397 "generate invalid memory references.  The region is also automatically "
5398 "unmapped when the process is terminated.  On the other hand, closing the "
5399 "file descriptor does not unmap the region."
5400 msgstr ""
5401 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5402 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5403 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5404 "はアンマップされない。"
5405
5406 #. type: Plain text
5407 #: build/C/man2/mmap.2:351
5408 msgid ""
5409 "The address I<addr> must be a multiple of the page size.  All pages "
5410 "containing a part of the indicated range are unmapped, and subsequent "
5411 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5412 "the indicated range does not contain any mapped pages."
5413 msgstr ""
5414 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5415 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5416 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5417 "ていない場合でも エラーにならない。"
5418
5419 #. type: SS
5420 #: build/C/man2/mmap.2:351
5421 #, no-wrap
5422 msgid "Timestamps changes for file-backed mappings"
5423 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5424
5425 #. type: Plain text
5426 #: build/C/man2/mmap.2:358
5427 msgid ""
5428 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5429 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5430 "the first reference to a mapped page will update the field if it has not "
5431 "been already."
5432 msgstr ""
5433 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5434 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5435 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5436 "ページへの最初の参照があった 際に更新される。"
5437
5438 #. type: Plain text
5439 #: build/C/man2/mmap.2:375
5440 msgid ""
5441 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5442 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5443 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5444 "one occurs."
5445 msgstr ""
5446 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5447 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5448 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5449 "B<msync>(2)  が呼ばれる前までに更新される。"
5450
5451 #. type: Plain text
5452 #: build/C/man2/mmap.2:392
5453 msgid ""
5454 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5455 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5456 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5457 "and I<errno> is set (probably to B<EINVAL>)."
5458 msgstr ""
5459 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5460 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5461 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5462 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5463
5464 #. type: TP
5465 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5466 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
5467 #: build/C/man2/shmctl.2:302 build/C/man2/shmget.2:188
5468 #: build/C/man2/shmop.2:191
5469 #, no-wrap
5470 msgid "B<EACCES>"
5471 msgstr "B<EACCES>"
5472
5473 #. type: Plain text
5474 #: build/C/man2/mmap.2:413
5475 msgid ""
5476 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5477 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5478 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5479 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5480 msgstr ""
5481 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5482 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5483 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5484 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5485 "が、ファイルは追加 (append) 専用である。"
5486
5487 #. type: Plain text
5488 #: build/C/man2/mmap.2:417
5489 msgid ""
5490 "The file has been locked, or too much memory has been locked (see "
5491 "B<setrlimit>(2))."
5492 msgstr ""
5493 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5494 "(B<setrlimit>(2)  を参照)。"
5495
5496 #. type: Plain text
5497 #: build/C/man2/mmap.2:423
5498 msgid ""
5499 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5500 msgstr ""
5501 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5502 "B<MAP_ANONYMOUS> がセットされていない)。"
5503
5504 #. type: Plain text
5505 #: build/C/man2/mmap.2:431
5506 msgid ""
5507 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5508 "not aligned on a page boundary)."
5509 msgstr ""
5510 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5511 "ジ境界にアラインメントされていない)。"
5512
5513 #. type: Plain text
5514 #: build/C/man2/mmap.2:436
5515 msgid "(since Linux 2.6.12)  I<length> was 0."
5516 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5517
5518 #. type: Plain text
5519 #: build/C/man2/mmap.2:444
5520 msgid ""
5521 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5522 "both of these values."
5523 msgstr ""
5524 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5525 "しくは その両方が含まれていた。"
5526
5527 #. type: TP
5528 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:227
5529 #: build/C/man2/shmget.2:204
5530 #, no-wrap
5531 msgid "B<ENFILE>"
5532 msgstr "B<ENFILE>"
5533
5534 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5535 #. type: Plain text
5536 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:208
5537 msgid "The system limit on the total number of open files has been reached."
5538 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5539
5540 #. type: Plain text
5541 #: build/C/man2/mmap.2:456
5542 msgid ""
5543 "The underlying file system of the specified file does not support memory "
5544 "mapping."
5545 msgstr ""
5546 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5547 "していない。"
5548
5549 #. type: Plain text
5550 #: build/C/man2/mmap.2:460
5551 msgid ""
5552 "No memory is available, or the process's maximum number of mappings would "
5553 "have been exceeded."
5554 msgstr ""
5555 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5556
5557 #.  (Since 2.4.25 / 2.6.0.)
5558 #. type: Plain text
5559 #: build/C/man2/mmap.2:469
5560 msgid ""
5561 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5562 "file on a file system that was mounted no-exec."
5563 msgstr ""
5564 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5565 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5566
5567 #. type: TP
5568 #: build/C/man2/mmap.2:469
5569 #, no-wrap
5570 msgid "B<ETXTBSY>"
5571 msgstr "B<ETXTBSY>"
5572
5573 #. type: Plain text
5574 #: build/C/man2/mmap.2:475
5575 msgid ""
5576 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5577 "writing."
5578 msgstr ""
5579 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5580 "き込み用に開かれている。"
5581
5582 #. type: TP
5583 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:344
5584 #, no-wrap
5585 msgid "B<EOVERFLOW>"
5586 msgstr "B<EOVERFLOW>"
5587
5588 #. type: Plain text
5589 #: build/C/man2/mmap.2:487
5590 msgid ""
5591 "On 32-bit architecture together with the large file extension (i.e., using "
5592 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5593 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5594 msgstr ""
5595
5596 #. type: Plain text
5597 #: build/C/man2/mmap.2:489
5598 msgid "Use of a mapped region can result in these signals:"
5599 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5600
5601 #. type: TP
5602 #: build/C/man2/mmap.2:489
5603 #, no-wrap
5604 msgid "B<SIGSEGV>"
5605 msgstr "B<SIGSEGV>"
5606
5607 #. type: Plain text
5608 #: build/C/man2/mmap.2:492
5609 msgid "Attempted write into a region mapped as read-only."
5610 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5611
5612 #. type: TP
5613 #: build/C/man2/mmap.2:492
5614 #, no-wrap
5615 msgid "B<SIGBUS>"
5616 msgstr "B<SIGBUS>"
5617
5618 #. type: Plain text
5619 #: build/C/man2/mmap.2:497
5620 msgid ""
5621 "Attempted access to a portion of the buffer that does not correspond to the "
5622 "file (for example, beyond the end of the file, including the case where "
5623 "another process has truncated the file)."
5624 msgstr ""
5625 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5626 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5627 "にアクセスしようとした。"
5628
5629 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5630 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5631 #. type: Plain text
5632 #: build/C/man2/mmap.2:501
5633 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5634 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5635
5636 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5637 #.  -1: unavailable, 0: ask using sysconf().
5638 #.  glibc defines it to 1.
5639 #. type: Plain text
5640 #: build/C/man2/mmap.2:515
5641 msgid ""
5642 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5643 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5644 "value greater than 0.  (See also B<sysconf>(3).)"
5645 msgstr ""
5646 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5647 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5648 "(B<sysconf>(3)  も参照のこと)。"
5649
5650 #.  Since around glibc 2.1/2.2, depending on the platform.
5651 #. type: Plain text
5652 #: build/C/man2/mmap.2:530
5653 msgid ""
5654 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5655 "function.  Originally, this function invoked a system call of the same "
5656 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5657 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5658 "with a suitably adjusted value for I<offset>."
5659 msgstr ""
5660 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5661 "に\n"
5662 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5663 "た。\n"
5664 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5665 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5666 "B<mmap2>(2) を起動する。"
5667
5668 #. type: Plain text
5669 #: build/C/man2/mmap.2:543
5670 msgid ""
5671 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5672 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5673 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5674 "they intend to execute code in the new mapping."
5675 msgstr ""
5676 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5677 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5678 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5679 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5680 "常に B<PROT_EXEC> をセットすべきである。"
5681
5682 #. type: Plain text
5683 #: build/C/man2/mmap.2:558
5684 msgid ""
5685 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5686 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5687 "address for the mapping; the address is chosen so as not to conflict with "
5688 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5689 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5690 msgstr ""
5691 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5692 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5693 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5694 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5695 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5696
5697 #. type: Plain text
5698 #: build/C/man2/mmap.2:587
5699 msgid ""
5700 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5701 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5702 "requiring that macro specifically would have been more logical, since these "
5703 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5704 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5705 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5706 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5707 "B<MAP_STACK>."
5708 msgstr ""
5709
5710 #. type: Plain text
5711 #: build/C/man2/mmap.2:592
5712 msgid ""
5713 "On Linux there are no guarantees like those suggested above under "
5714 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5715 "the system runs out of memory."
5716 msgstr ""
5717 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5718 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5719 "終了されるか分からないからである。"
5720
5721 #. type: Plain text
5722 #: build/C/man2/mmap.2:599
5723 msgid ""
5724 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5725 "is specified as B<PROT_NONE>."
5726 msgstr ""
5727 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5728 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5729
5730 #. type: Plain text
5731 #: build/C/man2/mmap.2:614
5732 msgid ""
5733 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5734 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5735 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5736 "fails with the error B<EINVAL> for this case."
5737 msgstr ""
5738 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5739 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5740 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5741 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5742
5743 #. type: Plain text
5744 #: build/C/man2/mmap.2:630
5745 msgid ""
5746 "POSIX specifies that the system shall always zero fill any partial page at "
5747 "the end of the object and that system will never write any modification of "
5748 "the object beyond its end.  On Linux, when you write data to such partial "
5749 "page after the end of the object, the data stays in the page cache even "
5750 "after the file is closed and unmapped and even though the data is never "
5751 "written to the file itself, subsequent mappings may see the modified "
5752 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5753 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5754 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5755 msgstr ""
5756
5757 #. type: Plain text
5758 #: build/C/man2/mmap.2:642
5759 msgid ""
5760 "The following program prints part of the file specified in its first command-"
5761 "line argument to standard output.  The range of bytes to be printed is "
5762 "specified via offset and length values in the second and third command-line "
5763 "arguments.  The program creates a memory mapping of the required pages of "
5764 "the file and then uses B<write>(2)  to output the desired bytes."
5765 msgstr ""
5766 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5767 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5768 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5769 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5770 "を出力する。"
5771
5772 #. type: Plain text
5773 #: build/C/man2/mmap.2:650
5774 #, no-wrap
5775 msgid ""
5776 "#include E<lt>sys/mman.hE<gt>\n"
5777 "#include E<lt>sys/stat.hE<gt>\n"
5778 "#include E<lt>fcntl.hE<gt>\n"
5779 "#include E<lt>stdio.hE<gt>\n"
5780 "#include E<lt>stdlib.hE<gt>\n"
5781 "#include E<lt>unistd.hE<gt>\n"
5782 msgstr ""
5783 "#include E<lt>sys/mman.hE<gt>\n"
5784 "#include E<lt>sys/stat.hE<gt>\n"
5785 "#include E<lt>fcntl.hE<gt>\n"
5786 "#include E<lt>stdio.hE<gt>\n"
5787 "#include E<lt>stdlib.hE<gt>\n"
5788 "#include E<lt>unistd.hE<gt>\n"
5789
5790 #. type: Plain text
5791 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5792 #, no-wrap
5793 msgid ""
5794 "#define handle_error(msg) \\e\n"
5795 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5796 msgstr ""
5797 "#define handle_error(msg) \\e\n"
5798 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5799
5800 #. type: Plain text
5801 #: build/C/man2/mmap.2:663
5802 #, no-wrap
5803 msgid ""
5804 "int\n"
5805 "main(int argc, char *argv[])\n"
5806 "{\n"
5807 "    char *addr;\n"
5808 "    int fd;\n"
5809 "    struct stat sb;\n"
5810 "    off_t offset, pa_offset;\n"
5811 "    size_t length;\n"
5812 "    ssize_t s;\n"
5813 msgstr ""
5814 "int\n"
5815 "main(int argc, char *argv[])\n"
5816 "{\n"
5817 "    char *addr;\n"
5818 "    int fd;\n"
5819 "    struct stat sb;\n"
5820 "    off_t offset, pa_offset;\n"
5821 "    size_t length;\n"
5822 "    ssize_t s;\n"
5823
5824 #. type: Plain text
5825 #: build/C/man2/mmap.2:668
5826 #, no-wrap
5827 msgid ""
5828 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5829 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5830 "        exit(EXIT_FAILURE);\n"
5831 "    }\n"
5832 msgstr ""
5833 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5834 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5835 "        exit(EXIT_FAILURE);\n"
5836 "    }\n"
5837
5838 #. type: Plain text
5839 #: build/C/man2/mmap.2:672
5840 #, no-wrap
5841 msgid ""
5842 "    fd = open(argv[1], O_RDONLY);\n"
5843 "    if (fd == -1)\n"
5844 "        handle_error(\"open\");\n"
5845 msgstr ""
5846 "    fd = open(argv[1], O_RDONLY);\n"
5847 "    if (fd == -1)\n"
5848 "        handle_error(\"open\");\n"
5849
5850 #. type: Plain text
5851 #: build/C/man2/mmap.2:675
5852 #, no-wrap
5853 msgid ""
5854 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5855 "        handle_error(\"fstat\");\n"
5856 msgstr ""
5857 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5858 "        handle_error(\"fstat\");\n"
5859
5860 #. type: Plain text
5861 #: build/C/man2/mmap.2:679
5862 #, no-wrap
5863 msgid ""
5864 "    offset = atoi(argv[2]);\n"
5865 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5866 "        /* offset for mmap() must be page aligned */\n"
5867 msgstr ""
5868 "    offset = atoi(argv[2]);\n"
5869 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5870 "        /* offset for mmap() must be page aligned */\n"
5871
5872 #. type: Plain text
5873 #: build/C/man2/mmap.2:684
5874 #, no-wrap
5875 msgid ""
5876 "    if (offset E<gt>= sb.st_size) {\n"
5877 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5878 "        exit(EXIT_FAILURE);\n"
5879 "    }\n"
5880 msgstr ""
5881 "    if (offset E<gt>= sb.st_size) {\n"
5882 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5883 "        exit(EXIT_FAILURE);\n"
5884 "    }\n"
5885
5886 #. type: Plain text
5887 #: build/C/man2/mmap.2:690
5888 #, no-wrap
5889 msgid ""
5890 "    if (argc == 4) {\n"
5891 "        length = atoi(argv[3]);\n"
5892 "        if (offset + length E<gt> sb.st_size)\n"
5893 "            length = sb.st_size - offset;\n"
5894 "                /* Can\\(aqt display bytes past end of file */\n"
5895 msgstr ""
5896 "    if (argc == 4) {\n"
5897 "        length = atoi(argv[3]);\n"
5898 "        if (offset + length E<gt> sb.st_size)\n"
5899 "            length = sb.st_size - offset;\n"
5900 "                /* Can\\(aqt display bytes past end of file */\n"
5901
5902 #. type: Plain text
5903 #: build/C/man2/mmap.2:694
5904 #, no-wrap
5905 msgid ""
5906 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5907 "        length = sb.st_size - offset;\n"
5908 "    }\n"
5909 msgstr ""
5910 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5911 "        length = sb.st_size - offset;\n"
5912 "    }\n"
5913
5914 #. type: Plain text
5915 #: build/C/man2/mmap.2:699
5916 #, no-wrap
5917 msgid ""
5918 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5919 "                MAP_PRIVATE, fd, pa_offset);\n"
5920 "    if (addr == MAP_FAILED)\n"
5921 "        handle_error(\"mmap\");\n"
5922 msgstr ""
5923 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5924 "                MAP_PRIVATE, fd, pa_offset);\n"
5925 "    if (addr == MAP_FAILED)\n"
5926 "        handle_error(\"mmap\");\n"
5927
5928 #. type: Plain text
5929 #: build/C/man2/mmap.2:704
5930 #, no-wrap
5931 msgid ""
5932 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5933 "    if (s != length) {\n"
5934 "        if (s == -1)\n"
5935 "            handle_error(\"write\");\n"
5936 msgstr ""
5937 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5938 "    if (s != length) {\n"
5939 "        if (s == -1)\n"
5940 "            handle_error(\"write\");\n"
5941
5942 #. type: Plain text
5943 #: build/C/man2/mmap.2:708
5944 #, no-wrap
5945 msgid ""
5946 "        fprintf(stderr, \"partial write\");\n"
5947 "        exit(EXIT_FAILURE);\n"
5948 "    }\n"
5949 msgstr ""
5950 "        fprintf(stderr, \"partial write\");\n"
5951 "        exit(EXIT_FAILURE);\n"
5952 "    }\n"
5953
5954 #. type: Plain text
5955 #: build/C/man2/mmap.2:725
5956 msgid ""
5957 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5958 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5959 "(2), B<shm_open>(3), B<shm_overview>(7)"
5960 msgstr ""
5961 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5962 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5963 "(2), B<shm_open>(3), B<shm_overview>(7)"
5964
5965 #. type: Plain text
5966 #: build/C/man2/mmap.2:732
5967 msgid ""
5968 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
5969 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
5970 msgstr "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/smaps> の説明。"
5971
5972 #. type: Plain text
5973 #: build/C/man2/mmap.2:737 build/C/man2/msync.2:122
5974 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5975 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5976
5977 #. type: TH
5978 #: build/C/man2/mmap2.2:29
5979 #, no-wrap
5980 msgid "MMAP2"
5981 msgstr "MMAP2"
5982
5983 #. type: TH
5984 #: build/C/man2/mmap2.2:29
5985 #, no-wrap
5986 msgid "2012-04-16"
5987 msgstr "2012-04-16"
5988
5989 #. type: Plain text
5990 #: build/C/man2/mmap2.2:32
5991 msgid "mmap2 - map files or devices into memory"
5992 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
5993
5994 #. type: Plain text
5995 #: build/C/man2/mmap2.2:38
5996 #, no-wrap
5997 msgid ""
5998 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5999 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6000 msgstr ""
6001 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6002 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6003
6004 #. type: Plain text
6005 #: build/C/man2/mmap2.2:43
6006 msgid ""
6007 "This is probably not the system call you are interested; instead, see B<mmap>"
6008 "(2), which describes the glibc wrapper function that invokes this system "
6009 "call."
6010 msgstr ""
6011 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6012 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6013 "の\n"
6014 "ラッパー関数についての説明がある。"
6015
6016 #. type: Plain text
6017 #: build/C/man2/mmap2.2:54
6018 msgid ""
6019 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6020 "except that the final argument specifies the offset into the file in 4096-"
6021 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6022 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6023 "bytes)."
6024 msgstr ""
6025 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6026 "だ\n"
6027 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6028 "ト\n"
6029 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6030 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6031 "プ\n"
6032 "できるようになる。"
6033
6034 #. type: Plain text
6035 #: build/C/man2/mmap2.2:61
6036 msgid ""
6037 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
6038 "is returned and I<errno> is set appropriately."
6039 msgstr ""
6040 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6041 "合は -1 が返されて、 I<errno> が適切に設定される。"
6042
6043 #. type: Plain text
6044 #: build/C/man2/mmap2.2:65
6045 msgid "Problem with getting the data from user space."
6046 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6047
6048 #. type: Plain text
6049 #: build/C/man2/mmap2.2:70
6050 msgid ""
6051 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
6052 "is not a multiple of the system page size."
6053 msgstr ""
6054 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
6055 "がシステムのページサイズの倍数ではない。"
6056
6057 #. type: Plain text
6058 #: build/C/man2/mmap2.2:74
6059 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6060 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6061
6062 #. type: Plain text
6063 #: build/C/man2/mmap2.2:77
6064 msgid "B<mmap2>()  is available since Linux 2.3.31."
6065 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6066
6067 #. type: Plain text
6068 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6069 msgid "This system call is Linux-specific."
6070 msgstr "このシステムコールは Linux 独自である。"
6071
6072 #. type: Plain text
6073 #: build/C/man2/mmap2.2:85
6074 msgid ""
6075 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6076 "rather than the B<mmap>(2)  system call."
6077 msgstr ""
6078 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6079 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6080
6081 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6082 #.  On cris, it looks like the unit might also be the page size,
6083 #.  which is 8192 bytes. -- mtk, June 2007
6084 #. type: Plain text
6085 #: build/C/man2/mmap2.2:92
6086 msgid ""
6087 "On ia64, the unit for I<offset> is actually the system page size, rather "
6088 "than 4096 bytes."
6089 msgstr ""
6090 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6091 "バイトではない。"
6092
6093 #. type: Plain text
6094 #: build/C/man2/mmap2.2:98
6095 msgid ""
6096 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6097 msgstr ""
6098 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6099
6100 #. type: TH
6101 #: build/C/man2/mprotect.2:38
6102 #, no-wrap
6103 msgid "MPROTECT"
6104 msgstr "MPROTECT"
6105
6106 #. type: TH
6107 #: build/C/man2/mprotect.2:38
6108 #, no-wrap
6109 msgid "2012-08-14"
6110 msgstr "2012-08-14"
6111
6112 #. type: Plain text
6113 #: build/C/man2/mprotect.2:41
6114 msgid "mprotect - set protection on a region of memory"
6115 msgstr "mprotect - メモリ領域の保護を設定する"
6116
6117 #. type: Plain text
6118 #: build/C/man2/mprotect.2:46
6119 #, no-wrap
6120 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6121 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6122
6123 #. type: Plain text
6124 #: build/C/man2/mprotect.2:54
6125 msgid ""
6126 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6127 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6128 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6129 msgstr ""
6130 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6131 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6132 "界に一致していなければならない。"
6133
6134 #. type: Plain text
6135 #: build/C/man2/mprotect.2:59
6136 msgid ""
6137 "If the calling process tries to access memory in a manner that violates the "
6138 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6139 msgstr ""
6140 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6141 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6142
6143 #. type: Plain text
6144 #: build/C/man2/mprotect.2:64
6145 msgid ""
6146 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6147 "following list:"
6148 msgstr ""
6149 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6150 "毎の論理和 (bitwize-or) で指定する:"
6151
6152 #. type: Plain text
6153 #: build/C/man2/mprotect.2:67
6154 msgid "The memory cannot be accessed at all."
6155 msgstr "そのメモリには全くアクセスできない。"
6156
6157 #. type: Plain text
6158 #: build/C/man2/mprotect.2:70
6159 msgid "The memory can be read."
6160 msgstr "そのメモリを読み取ることができる。"
6161
6162 #. type: Plain text
6163 #: build/C/man2/mprotect.2:73
6164 msgid "The memory can be modified."
6165 msgstr "そのメモリを変更できる。"
6166
6167 #.  FIXME
6168 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6169 #. type: Plain text
6170 #: build/C/man2/mprotect.2:78
6171 msgid "The memory can be executed."
6172 msgstr "そのメモリは実行可能である。"
6173
6174 #. type: Plain text
6175 #: build/C/man2/mprotect.2:85
6176 msgid ""
6177 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6178 "I<errno> is set appropriately."
6179 msgstr ""
6180 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6181 "I<errno> が適切に設定される。"
6182
6183 #. type: Plain text
6184 #: build/C/man2/mprotect.2:95
6185 msgid ""
6186 "The memory cannot be given the specified access.  This can happen, for "
6187 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6188 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6189 msgstr ""
6190 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6191 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6192 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6193
6194 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6195 #. type: Plain text
6196 #: build/C/man2/mprotect.2:100
6197 msgid ""
6198 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6199 msgstr ""
6200 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6201
6202 #. type: Plain text
6203 #: build/C/man2/mprotect.2:103
6204 msgid "Internal kernel structures could not be allocated."
6205 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6206
6207 #. type: Plain text
6208 #: build/C/man2/mprotect.2:113
6209 msgid ""
6210 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6211 "address space of the process, or specify one or more pages that are not "
6212 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6213 "for these cases.)"
6214 msgstr ""
6215 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6216 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6217 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6218 "成されていた)。"
6219
6220 #.  SVr4 defines an additional error
6221 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6222 #. type: Plain text
6223 #: build/C/man2/mprotect.2:122
6224 msgid ""
6225 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6226 "unspecified if it is applied to a region of memory that was not obtained via "
6227 "B<mmap>(2)."
6228 msgstr ""
6229 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6230 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6231 "されている。"
6232
6233 #. type: Plain text
6234 #: build/C/man2/mprotect.2:129
6235 msgid ""
6236 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6237 "process's address space (except for the kernel vsyscall area).  In "
6238 "particular it can be used to change existing code mappings to be writable."
6239 msgstr ""
6240 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6241 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6242 "マッピングを書き込み可能にするために使われる。"
6243
6244 #. type: Plain text
6245 #: build/C/man2/mprotect.2:139
6246 msgid ""
6247 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6248 "architecture- and kernel version-dependent.  On some hardware architectures "
6249 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6250 msgstr ""
6251 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6252 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6253 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6254
6255 #. type: Plain text
6256 #: build/C/man2/mprotect.2:148
6257 msgid ""
6258 "POSIX.1-2001 says that an implementation may permit access other than that "
6259 "specified in I<prot>, but at a minimum can allow write access only if "
6260 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6261 "has been set."
6262 msgstr ""
6263 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6264 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6265 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6266 "ない点だけは 満たす必要がある。"
6267
6268 #. type: Plain text
6269 #: build/C/man2/mprotect.2:154
6270 msgid ""
6271 "The program below allocates four pages of memory, makes the third of these "
6272 "pages read-only, and then executes a loop that walks upward through the "
6273 "allocated region modifying bytes."
6274 msgstr ""
6275 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6276 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6277 "かって順番にバイト値を変更するループを実行する。"
6278
6279 #. type: Plain text
6280 #: build/C/man2/mprotect.2:157
6281 msgid ""
6282 "An example of what we might see when running the program is the following:"
6283 msgstr "プログラムを実行した場合の一例を以下に示す。"
6284
6285 #. type: Plain text
6286 #: build/C/man2/mprotect.2:163
6287 #, no-wrap
6288 msgid ""
6289 "$B< ./a.out>\n"
6290 "Start of region:        0x804c000\n"
6291 "Got SIGSEGV at address: 0x804e000\n"
6292 msgstr ""
6293 "$B< ./a.out>\n"
6294 "Start of region:        0x804c000\n"
6295 "Got SIGSEGV at address: 0x804e000\n"
6296
6297 #. type: Plain text
6298 #: build/C/man2/mprotect.2:175
6299 #, no-wrap
6300 msgid ""
6301 "#include E<lt>unistd.hE<gt>\n"
6302 "#include E<lt>signal.hE<gt>\n"
6303 "#include E<lt>stdio.hE<gt>\n"
6304 "#include E<lt>malloc.hE<gt>\n"
6305 "#include E<lt>stdlib.hE<gt>\n"
6306 "#include E<lt>errno.hE<gt>\n"
6307 "#include E<lt>sys/mman.hE<gt>\n"
6308 msgstr ""
6309 "#include E<lt>unistd.hE<gt>\n"
6310 "#include E<lt>signal.hE<gt>\n"
6311 "#include E<lt>stdio.hE<gt>\n"
6312 "#include E<lt>malloc.hE<gt>\n"
6313 "#include E<lt>stdlib.hE<gt>\n"
6314 "#include E<lt>errno.hE<gt>\n"
6315 "#include E<lt>sys/mman.hE<gt>\n"
6316
6317 #. type: Plain text
6318 #: build/C/man2/mprotect.2:180
6319 #, no-wrap
6320 msgid "char *buffer;\n"
6321 msgstr "char *buffer;\n"
6322
6323 #. type: Plain text
6324 #: build/C/man2/mprotect.2:188
6325 #, no-wrap
6326 msgid ""
6327 "static void\n"
6328 "handler(int sig, siginfo_t *si, void *unused)\n"
6329 "{\n"
6330 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6331 "            (long) si-E<gt>si_addr);\n"
6332 "    exit(EXIT_FAILURE);\n"
6333 "}\n"
6334 msgstr ""
6335 "static void\n"
6336 "handler(int sig, siginfo_t *si, void *unused)\n"
6337 "{\n"
6338 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6339 "            (long) si-E<gt>si_addr);\n"
6340 "    exit(EXIT_FAILURE);\n"
6341 "}\n"
6342
6343 #. type: Plain text
6344 #: build/C/man2/mprotect.2:195
6345 #, no-wrap
6346 msgid ""
6347 "int\n"
6348 "main(int argc, char *argv[])\n"
6349 "{\n"
6350 "    char *p;\n"
6351 "    int pagesize;\n"
6352 "    struct sigaction sa;\n"
6353 msgstr ""
6354 "int\n"
6355 "main(void)\n"
6356 "{\n"
6357 "    char *p;\n"
6358 "    int pagesize;\n"
6359 "    struct sigaction sa;\n"
6360
6361 #. type: Plain text
6362 #: build/C/man2/mprotect.2:201
6363 #, no-wrap
6364 msgid ""
6365 "    sa.sa_flags = SA_SIGINFO;\n"
6366 "    sigemptyset(&sa.sa_mask);\n"
6367 "    sa.sa_sigaction = handler;\n"
6368 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6369 "        handle_error(\"sigaction\");\n"
6370 msgstr ""
6371 "    sa.sa_flags = SA_SIGINFO;\n"
6372 "    sigemptyset(&sa.sa_mask);\n"
6373 "    sa.sa_sigaction = handler;\n"
6374 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6375 "        handle_error(\"sigaction\");\n"
6376
6377 #. type: Plain text
6378 #: build/C/man2/mprotect.2:205
6379 #, no-wrap
6380 msgid ""
6381 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6382 "    if (pagesize == -1)\n"
6383 "        handle_error(\"sysconf\");\n"
6384 msgstr ""
6385 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6386 "    if (pagesize == -1)\n"
6387 "        handle_error(\"sysconf\");\n"
6388
6389 #. type: Plain text
6390 #: build/C/man2/mprotect.2:208
6391 #, no-wrap
6392 msgid ""
6393 "    /* Allocate a buffer aligned on a page boundary;\n"
6394 "       initial protection is PROT_READ | PROT_WRITE */\n"
6395 msgstr ""
6396 "    /* Allocate a buffer aligned on a page boundary;\n"
6397 "       initial protection is PROT_READ | PROT_WRITE */\n"
6398
6399 #. type: Plain text
6400 #: build/C/man2/mprotect.2:212
6401 #, no-wrap
6402 msgid ""
6403 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6404 "    if (buffer == NULL)\n"
6405 "        handle_error(\"memalign\");\n"
6406 msgstr ""
6407 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6408 "    if (buffer == NULL)\n"
6409 "        handle_error(\"memalign\");\n"
6410
6411 #. type: Plain text
6412 #: build/C/man2/mprotect.2:214
6413 #, no-wrap
6414 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6415 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6416
6417 #. type: Plain text
6418 #: build/C/man2/mprotect.2:218
6419 #, no-wrap
6420 msgid ""
6421 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6422 "                PROT_READ) == -1)\n"
6423 "        handle_error(\"mprotect\");\n"
6424 msgstr ""
6425 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6426 "                PROT_READ) == -1)\n"
6427 "        handle_error(\"mprotect\");\n"
6428
6429 #. type: Plain text
6430 #: build/C/man2/mprotect.2:221
6431 #, no-wrap
6432 msgid ""
6433 "    for (p = buffer ; ; )\n"
6434 "        *(p++) = \\(aqa\\(aq;\n"
6435 msgstr ""
6436 "    for (p = buffer ; ; )\n"
6437 "        *(p++) = \\(aqa\\(aq;\n"
6438
6439 #. type: Plain text
6440 #: build/C/man2/mprotect.2:225
6441 #, no-wrap
6442 msgid ""
6443 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6444 "    exit(EXIT_SUCCESS);\n"
6445 "}\n"
6446 msgstr ""
6447 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6448 "    exit(EXIT_SUCCESS);\n"
6449 "}\n"
6450
6451 #. type: Plain text
6452 #: build/C/man2/mprotect.2:229
6453 msgid "B<mmap>(2), B<sysconf>(3)"
6454 msgstr "B<mmap>(2), B<sysconf>(3)"
6455
6456 #. type: TH
6457 #: build/C/man2/mremap.2:30
6458 #, no-wrap
6459 msgid "MREMAP"
6460 msgstr "MREMAP"
6461
6462 #. type: TH
6463 #: build/C/man2/mremap.2:30
6464 #, no-wrap
6465 msgid "2010-06-10"
6466 msgstr "2010-06-10"
6467
6468 #. type: Plain text
6469 #: build/C/man2/mremap.2:33
6470 msgid "mremap - remap a virtual memory address"
6471 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6472
6473 #. type: Plain text
6474 #: build/C/man2/mremap.2:36
6475 #, no-wrap
6476 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6477 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6478
6479 #. type: Plain text
6480 #: build/C/man2/mremap.2:41
6481 #, no-wrap
6482 msgid ""
6483 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6484 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6485 msgstr ""
6486 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6487 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6488
6489 #. type: Plain text
6490 #: build/C/man2/mremap.2:47
6491 msgid ""
6492 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6493 "moving it at the same time (controlled by the I<flags> argument and the "
6494 "available virtual address space)."
6495 msgstr ""
6496 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6497 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6498 "る)。"
6499
6500 #. type: Plain text
6501 #: build/C/man2/mremap.2:61
6502 msgid ""
6503 "I<old_address> is the old address of the virtual memory block that you want "
6504 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6505 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6506 "requested size of the virtual memory block after the resize.  An optional "
6507 "fifth argument, I<new_address>, may be provided; see the description of "
6508 "B<MREMAP_FIXED> below."
6509 msgstr ""
6510 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6511 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6512 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6513 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6514 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6515 "明を参照のこと。"
6516
6517 #. type: Plain text
6518 #: build/C/man2/mremap.2:73
6519 msgid ""
6520 "In Linux the memory is divided into pages.  A user process has (one or)  "
6521 "several linear virtual memory segments.  Each virtual memory segment has one "
6522 "or more mappings to real memory pages (in the page table).  Each virtual "
6523 "memory segment has its own protection (access rights), which may cause a "
6524 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6525 "to a read-only segment).  Accessing virtual memory outside of the segments "
6526 "will also cause a segmentation violation."
6527 msgstr ""
6528 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6529 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6530 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6531 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6532 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6533 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6534 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6535 "ン侵害が発生する。"
6536
6537 #. type: Plain text
6538 #: build/C/man2/mremap.2:81
6539 msgid ""
6540 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6541 "mapping between virtual addresses and memory pages.  This can be used to "
6542 "implement a very efficient B<realloc>(3)."
6543 msgstr ""
6544 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6545 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6546 "B<realloc>(3)  を実装するのに使用されている。"
6547
6548 #. type: Plain text
6549 #: build/C/man2/mremap.2:83
6550 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6551 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6552
6553 #. type: TP
6554 #: build/C/man2/mremap.2:83
6555 #, no-wrap
6556 msgid "B<MREMAP_MAYMOVE>"
6557 msgstr "B<MREMAP_MAYMOVE>"
6558
6559 #. type: Plain text
6560 #: build/C/man2/mremap.2:95
6561 msgid ""
6562 "By default, if there is not sufficient space to expand a mapping at its "
6563 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6564 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6565 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6566 "mapping location become invalid (offsets relative to the starting address of "
6567 "the mapping should be employed)."
6568 msgstr ""
6569 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6570 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6571 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6572 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6573 "レスからの相対オフセットは有効のままである)。"
6574
6575 #. type: TP
6576 #: build/C/man2/mremap.2:95
6577 #, no-wrap
6578 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6579 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6580
6581 #. type: Plain text
6582 #: build/C/man2/mremap.2:117
6583 msgid ""
6584 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6585 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
6586 "I<void *new_address>, which specifies a page-aligned address to which the "
6587 "mapping must be moved.  Any previous mapping at the address range specified "
6588 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6589 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6590 msgstr ""
6591 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6592 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
6593 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6594 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6595 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6596 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6597 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6598
6599 #. type: Plain text
6600 #: build/C/man2/mremap.2:127
6601 msgid ""
6602 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6603 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6604 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6605 "locked by the process may change."
6606 msgstr ""
6607 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6608 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6609 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6610 "の量は変化する。"
6611
6612 #. type: Plain text
6613 #: build/C/man2/mremap.2:135
6614 msgid ""
6615 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6616 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6617 "and I<errno> is set appropriately."
6618 msgstr ""
6619 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6620 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6621 "切に設定される。"
6622
6623 #. type: Plain text
6624 #: build/C/man2/mremap.2:142
6625 msgid ""
6626 "The caller tried to expand a memory segment that is locked, but this was not "
6627 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6628 msgstr ""
6629 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6630 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6631
6632 #. type: Plain text
6633 #: build/C/man2/mremap.2:151
6634 msgid ""
6635 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6636 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6637 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6638 "the whole address space requested, but those mappings are of different types."
6639 msgstr ""
6640 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6641 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6642 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6643 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6644 "を受け取るだろう。"
6645
6646 #. type: Plain text
6647 #: build/C/man2/mremap.2:179
6648 msgid ""
6649 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6650 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6651 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6652 "was invalid; or the new address range specified by I<new_address> and "
6653 "I<new_size> overlapped the old address range specified by I<old_address> and "
6654 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6655 "B<MREMAP_MAYMOVE>."
6656 msgstr ""
6657 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6658 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6659 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6660 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6661 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6662 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6663 "されていない。"
6664
6665 #. type: Plain text
6666 #: build/C/man2/mremap.2:185
6667 msgid ""
6668 "The memory area cannot be expanded at the current virtual address, and the "
6669 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6670 "(virtual) memory available."
6671 msgstr ""
6672 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6673 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6674
6675 #.  4.2BSD had a (never actually implemented)
6676 #.  .BR mremap (2)
6677 #.  call with completely different semantics.
6678 #. type: Plain text
6679 #: build/C/man2/mremap.2:191
6680 msgid ""
6681 "This call is Linux-specific, and should not be used in programs intended to "
6682 "be portable."
6683 msgstr ""
6684 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6685 "い。"
6686
6687 #. type: Plain text
6688 #: build/C/man2/mremap.2:199
6689 msgid ""
6690 "Prior to version 2.4, glibc did not expose the definition of "
6691 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6692 "I<new_address> argument."
6693 msgstr ""
6694 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6695 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6696
6697 #. type: Plain text
6698 #: build/C/man2/mremap.2:208
6699 msgid ""
6700 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6701 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6702 msgstr ""
6703 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6704 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6705
6706 #. type: Plain text
6707 #: build/C/man2/mremap.2:214
6708 msgid ""
6709 "Your favorite text book on operating systems for more information on paged "
6710 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6711 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6712 "Maurice J. Bach)"
6713 msgstr ""
6714 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6715 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6716 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6717 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6718
6719 #. type: TH
6720 #: build/C/man2/msync.2:25
6721 #, no-wrap
6722 msgid "MSYNC"
6723 msgstr "MSYNC"
6724
6725 #. type: TH
6726 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6727 #, no-wrap
6728 msgid "2008-04-22"
6729 msgstr "2008-04-22"
6730
6731 #. type: Plain text
6732 #: build/C/man2/msync.2:28
6733 msgid "msync - synchronize a file with a memory map"
6734 msgstr "msync - ファイルをマップしたメモリと同期させる"
6735
6736 #. type: Plain text
6737 #: build/C/man2/msync.2:32
6738 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6739 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6740
6741 #. type: Plain text
6742 #: build/C/man2/msync.2:48
6743 msgid ""
6744 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6745 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6746 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6747 "called.  To be more precise, the part of the file that corresponds to the "
6748 "memory area starting at I<addr> and having length I<length> is updated."
6749 msgstr ""
6750 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6751 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6752 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6753 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6754 "更新される。"
6755
6756 #. type: Plain text
6757 #: build/C/man2/msync.2:68
6758 msgid ""
6759 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6760 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6761 "specifies that an update be scheduled, but the call returns immediately.  "
6762 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6763 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6764 "they can be updated with the fresh values just written)."
6765 msgstr ""
6766 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6767 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6768 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6769 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6770 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6771 "に対する他のマッピングを無効にすることを要求する。"
6772
6773 #. type: Plain text
6774 #: build/C/man2/msync.2:73
6775 msgid ""
6776 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6777 "appropriately."
6778 msgstr ""
6779 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6780 "る。"
6781
6782 #. type: TP
6783 #: build/C/man2/msync.2:74
6784 #, no-wrap
6785 msgid "B<EBUSY>"
6786 msgstr "B<EBUSY>"
6787
6788 #. type: Plain text
6789 #: build/C/man2/msync.2:80
6790 msgid ""
6791 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6792 "specified address range."
6793 msgstr ""
6794 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6795 "存在する。"
6796
6797 #. type: Plain text
6798 #: build/C/man2/msync.2:93
6799 msgid ""
6800 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6801 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6802 "B<MS_ASYNC> are set in I<flags>."
6803 msgstr ""
6804 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6805 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6806 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6807
6808 #. type: Plain text
6809 #: build/C/man2/msync.2:96
6810 msgid "The indicated memory (or part of it) was not mapped."
6811 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6812
6813 #. type: Plain text
6814 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6815 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
6816 msgid "POSIX.1-2001."
6817 msgstr "POSIX.1-2001."
6818
6819 #. type: Plain text
6820 #: build/C/man2/msync.2:105
6821 msgid ""
6822 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6823 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6824 msgstr ""
6825 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6826 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6827
6828 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6829 #.  -1: unavailable, 0: ask using sysconf().
6830 #.  glibc defines them to 1.
6831 #. type: Plain text
6832 #: build/C/man2/msync.2:118
6833 msgid ""
6834 "On POSIX systems on which B<msync>()  is available, both "
6835 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6836 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6837 msgstr ""
6838 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6839 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6840 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6841
6842 #. type: TP
6843 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
6844 #, no-wrap
6845 msgid "B<mmap>(2)"
6846 msgstr "B<mmap>(2)"
6847
6848 #. type: TH
6849 #: build/C/man3/mtrace.3:25
6850 #, no-wrap
6851 msgid "MTRACE"
6852 msgstr "MTRACE"
6853
6854 #. type: Plain text
6855 #: build/C/man3/mtrace.3:28
6856 msgid "mtrace, muntrace - malloc tracing"
6857 msgstr "mtrace, muntrace - malloc のトレース"
6858
6859 #. type: Plain text
6860 #: build/C/man3/mtrace.3:30
6861 msgid "B<#include E<lt>mcheck.hE<gt>>"
6862 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6863
6864 #. type: Plain text
6865 #: build/C/man3/mtrace.3:32
6866 msgid "B<void mtrace(void);>"
6867 msgstr "B<void mtrace(void);>"
6868
6869 #. type: Plain text
6870 #: build/C/man3/mtrace.3:34
6871 msgid "B<void muntrace(void);>"
6872 msgstr "B<void muntrace(void);>"
6873
6874 #. type: Plain text
6875 #: build/C/man3/mtrace.3:46
6876 msgid ""
6877 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6878 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6879 "hook functions record tracing information about memory allocation and "
6880 "deallocation.  The tracing information can be used to discover memory leaks "
6881 "and attempts to free nonallocated memory in a program."
6882 msgstr ""
6883
6884 #. type: Plain text
6885 #: build/C/man3/mtrace.3:57
6886 msgid ""
6887 "The B<muntrace>()  function disables the hook functions installed by "
6888 "B<mtrace>(), so that tracing information is no longer recorded for the "
6889 "memory-allocation functions.  If no hook functions were successfully "
6890 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6891 msgstr ""
6892
6893 #. type: Plain text
6894 #: build/C/man3/mtrace.3:65
6895 msgid ""
6896 "When B<mtrace>()  is called, it checks the value of the environment variable "
6897 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
6898 "tracing information is to be recorded.  If the pathname is successfully "
6899 "opened, it is truncated to zero length."
6900 msgstr ""
6901
6902 #. type: Plain text
6903 #: build/C/man3/mtrace.3:78
6904 msgid ""
6905 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6906 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6907 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6908 "ignored, and B<mtrace>()  has no effect."
6909 msgstr ""
6910
6911 #. type: Plain text
6912 #: build/C/man3/mtrace.3:86
6913 msgid ""
6914 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6915 "program, and B<muntrace>()  is never called."
6916 msgstr ""
6917
6918 #. type: Plain text
6919 #: build/C/man3/mtrace.3:96
6920 msgid ""
6921 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
6922 "designed to be human readable.  The GNU C library provides a Perl script, "
6923 "B<mtrace>(1), that interprets the trace log and produces human-readable "
6924 "output.  For best results, the traced program should be compiled with "
6925 "debugging enabled, so that line-number information is recorded in the "
6926 "executable."
6927 msgstr ""
6928
6929 #. type: Plain text
6930 #: build/C/man3/mtrace.3:102
6931 msgid ""
6932 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
6933 "B<MALLOC_TRACE> points to a valid, writable pathname)."
6934 msgstr ""
6935
6936 #. type: Plain text
6937 #: build/C/man3/mtrace.3:108
6938 msgid ""
6939 "The line-number information produced by B<mtrace>(1)  is not always precise: "
6940 "the line number references may refer to the previous or following (non-"
6941 "blank)  line of the source code."
6942 msgstr ""
6943
6944 #. type: Plain text
6945 #: build/C/man3/mtrace.3:115
6946 msgid ""
6947 "The shell session below demonstrates the use of the B<mtrace>()  function "
6948 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
6949 "different locations.  The demonstration uses the following program:"
6950 msgstr ""
6951
6952 #. type: Plain text
6953 #: build/C/man3/mtrace.3:122
6954 #, no-wrap
6955 msgid ""
6956 "$ B<cat t_mtrace.c>\n"
6957 "#include E<lt>mcheck.hE<gt>\n"
6958 "#include E<lt>stdlib.hE<gt>\n"
6959 "#include E<lt>stdio.hE<gt>\n"
6960 msgstr ""
6961 "$ B<cat t_mtrace.c>\n"
6962 "#include E<lt>mcheck.hE<gt>\n"
6963 "#include E<lt>stdlib.hE<gt>\n"
6964 "#include E<lt>stdio.hE<gt>\n"
6965
6966 #. type: Plain text
6967 #: build/C/man3/mtrace.3:127
6968 #, no-wrap
6969 msgid ""
6970 "int\n"
6971 "main(int argc, char *argv[])\n"
6972 "{\n"
6973 "    int j;\n"
6974 msgstr ""
6975 "int\n"
6976 "main(int argc, char *argv[])\n"
6977 "{\n"
6978 "    int j;\n"
6979
6980 #. type: Plain text
6981 #: build/C/man3/mtrace.3:129
6982 #, no-wrap
6983 msgid "    mtrace();\n"
6984 msgstr "    mtrace();\n"
6985
6986 #. type: Plain text
6987 #: build/C/man3/mtrace.3:132
6988 #, no-wrap
6989 msgid ""
6990 "    for (j = 0; j E<lt> 2; j++)\n"
6991 "        malloc(100);            /* Never freed--a memory leak */\n"
6992 msgstr ""
6993 "    for (j = 0; j E<lt> 2; j++)\n"
6994 "        malloc(100);            /* Never freed--a memory leak */\n"
6995
6996 #. type: Plain text
6997 #: build/C/man3/mtrace.3:136
6998 #, no-wrap
6999 msgid ""
7000 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7001 "    exit(EXIT_SUCCESS);\n"
7002 "}\n"
7003 msgstr ""
7004 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7005 "    exit(EXIT_SUCCESS);\n"
7006 "}\n"
7007
7008 #. type: Plain text
7009 #: build/C/man3/mtrace.3:142
7010 msgid ""
7011 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7012 "memory leaks at two different locations in the program:"
7013 msgstr ""
7014
7015 #. type: Plain text
7016 #: build/C/man3/mtrace.3:155
7017 #, no-wrap
7018 msgid ""
7019 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7020 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7021 "$ B<./t_mtrace>\n"
7022 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7023 "Memory not freed:\n"
7024 "-----------------\n"
7025 "   Address     Size     Caller\n"
7026 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7027 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7028 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7029 msgstr ""
7030 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7031 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7032 "$ B<./t_mtrace>\n"
7033 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7034 "Memory not freed:\n"
7035 "-----------------\n"
7036 "   Address     Size     Caller\n"
7037 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7038 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7039 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7040
7041 #. type: Plain text
7042 #: build/C/man3/mtrace.3:167
7043 msgid ""
7044 "The first two messages about unfreed memory correspond to the two B<malloc>"
7045 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7046 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7047 msgstr ""
7048
7049 #. type: Plain text
7050 #: build/C/man3/mtrace.3:172
7051 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7052 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7053
7054 #. type: TH
7055 #: build/C/man2/posix_fadvise.2:28
7056 #, no-wrap
7057 msgid "POSIX_FADVISE"
7058 msgstr "POSIX_FADVISE"
7059
7060 #. type: TH
7061 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
7062 #: build/C/man2/sync_file_range.2:30
7063 #, no-wrap
7064 msgid "2013-04-01"
7065 msgstr "2013-04-01"
7066
7067 #. type: Plain text
7068 #: build/C/man2/posix_fadvise.2:31
7069 msgid "posix_fadvise - predeclare an access pattern for file data"
7070 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7071
7072 #. type: Plain text
7073 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7074 #, no-wrap
7075 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7076 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7077
7078 #. type: Plain text
7079 #: build/C/man2/posix_fadvise.2:37
7080 #, no-wrap
7081 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7082 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7083
7084 #. type: Plain text
7085 #: build/C/man2/posix_fadvise.2:46
7086 msgid "B<posix_fadvise>():"
7087 msgstr "B<posix_fadvise>():"
7088
7089 #. type: Plain text
7090 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7091 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7092 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7093
7094 #. type: Plain text
7095 #: build/C/man2/posix_fadvise.2:56
7096 msgid ""
7097 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7098 "data in a specific pattern in the future, thus allowing the kernel to "
7099 "perform appropriate optimizations."
7100 msgstr ""
7101 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7102 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7103 "適化を実行することが可能になる。"
7104
7105 #. type: Plain text
7106 #: build/C/man2/posix_fadvise.2:63
7107 msgid ""
7108 "The I<advice> applies to a (not necessarily existent) region starting at "
7109 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7110 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7111 "binding; it merely constitutes an expectation on behalf of the application."
7112 msgstr ""
7113 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7114 "イ\n"
7115 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7116 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7117 "ケー\n"
7118 "ションのために可能性を構成するだけである。"
7119
7120 #. type: Plain text
7121 #: build/C/man2/posix_fadvise.2:65
7122 msgid "Permissible values for I<advice> include:"
7123 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7124
7125 #. type: TP
7126 #: build/C/man2/posix_fadvise.2:65
7127 #, no-wrap
7128 msgid "B<POSIX_FADV_NORMAL>"
7129 msgstr "B<POSIX_FADV_NORMAL>"
7130
7131 #. type: Plain text
7132 #: build/C/man2/posix_fadvise.2:71
7133 msgid ""
7134 "Indicates that the application has no advice to give about its access "
7135 "pattern for the specified data.  If no advice is given for an open file, "
7136 "this is the default assumption."
7137 msgstr ""
7138 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7139 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7140 "合、 これがデフォルトで仮定される。"
7141
7142 #. type: TP
7143 #: build/C/man2/posix_fadvise.2:71
7144 #, no-wrap
7145 msgid "B<POSIX_FADV_SEQUENTIAL>"
7146 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7147
7148 #. type: Plain text
7149 #: build/C/man2/posix_fadvise.2:75
7150 msgid ""
7151 "The application expects to access the specified data sequentially (with "
7152 "lower offsets read before higher ones)."
7153 msgstr ""
7154 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7155 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7156
7157 #. type: TP
7158 #: build/C/man2/posix_fadvise.2:75
7159 #, no-wrap
7160 msgid "B<POSIX_FADV_RANDOM>"
7161 msgstr "B<POSIX_FADV_RANDOM>"
7162
7163 #. type: Plain text
7164 #: build/C/man2/posix_fadvise.2:78
7165 msgid "The specified data will be accessed in random order."
7166 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7167
7168 #. type: TP
7169 #: build/C/man2/posix_fadvise.2:78
7170 #, no-wrap
7171 msgid "B<POSIX_FADV_NOREUSE>"
7172 msgstr "B<POSIX_FADV_NOREUSE>"
7173
7174 #. type: Plain text
7175 #: build/C/man2/posix_fadvise.2:81
7176 msgid "The specified data will be accessed only once."
7177 msgstr "指定されたデータは 1 度しかアクセスされない。"
7178
7179 #. type: TP
7180 #: build/C/man2/posix_fadvise.2:81
7181 #, no-wrap
7182 msgid "B<POSIX_FADV_WILLNEED>"
7183 msgstr "B<POSIX_FADV_WILLNEED>"
7184
7185 #. type: Plain text
7186 #: build/C/man2/posix_fadvise.2:84
7187 msgid "The specified data will be accessed in the near future."
7188 msgstr "指定されたデータは近い将来アクセスされる。"
7189
7190 #. type: TP
7191 #: build/C/man2/posix_fadvise.2:84
7192 #, no-wrap
7193 msgid "B<POSIX_FADV_DONTNEED>"
7194 msgstr "B<POSIX_FADV_DONTNEED>"
7195
7196 #. type: Plain text
7197 #: build/C/man2/posix_fadvise.2:87
7198 msgid "The specified data will not be accessed in the near future."
7199 msgstr "指定されたデータは近い将来アクセスされない。"
7200
7201 #. type: Plain text
7202 #: build/C/man2/posix_fadvise.2:90
7203 msgid "On success, zero is returned.  On error, an error number is returned."
7204 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7205
7206 #. type: Plain text
7207 #: build/C/man2/posix_fadvise.2:94
7208 msgid "The I<fd> argument was not a valid file descriptor."
7209 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7210
7211 #. type: Plain text
7212 #: build/C/man2/posix_fadvise.2:97
7213 msgid "An invalid value was specified for I<advice>."
7214 msgstr "無効な値が I<advice> に指定された。"
7215
7216 #. type: Plain text
7217 #: build/C/man2/posix_fadvise.2:104
7218 msgid ""
7219 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7220 "returns B<EINVAL> in this case.)"
7221 msgstr ""
7222 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7223 "合、Linux は実際には B<EINVAL> を返す)。"
7224
7225 #.  of fadvise64_64()
7226 #. type: Plain text
7227 #: build/C/man2/posix_fadvise.2:112
7228 msgid ""
7229 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7230 "called B<fadvise64>().  Library support has been provided since glibc "
7231 "version 2.2, via the wrapper function B<posix_fadvise>()."
7232 msgstr ""
7233 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7234 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7235 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7236 "ラッパー関数は B<posix_fadvise>() という名前である。"
7237
7238 #. type: Plain text
7239 #: build/C/man2/posix_fadvise.2:121
7240 msgid ""
7241 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7242 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7243 msgstr ""
7244 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7245 "I<off_t> に変更された点に注意すること。"
7246
7247 #. type: Plain text
7248 #: build/C/man2/posix_fadvise.2:127
7249 msgid ""
7250 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7251 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7252 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7253 "the entire file, not just the specified region (but other open file handles "
7254 "to the same file are unaffected)."
7255 msgstr ""
7256 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7257 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7258 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7259 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7260 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7261
7262 #. type: Plain text
7263 #: build/C/man2/posix_fadvise.2:134
7264 msgid ""
7265 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7266 "into the page cache.  The amount of data read may be decreased by the kernel "
7267 "depending on virtual memory load.  (A few megabytes will usually be fully "
7268 "satisfied, and more is rarely useful.)"
7269 msgstr ""
7270 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7271 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7272 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7273 "くてもめったに役に立たない)。"
7274
7275 #. type: Plain text
7276 #: build/C/man2/posix_fadvise.2:138
7277 msgid ""
7278 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7279 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7280 "flag is a no-op."
7281 msgstr ""
7282 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7283 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7284 "フラグは何も行わない。"
7285
7286 #. type: Plain text
7287 #: build/C/man2/posix_fadvise.2:146
7288 msgid ""
7289 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7290 "specified region.  This is useful, for example, while streaming large "
7291 "files.  A program may periodically request the kernel to free cached data "
7292 "that has already been used, so that more useful cached pages are not "
7293 "discarded instead."
7294 msgstr ""
7295 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7296 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7297 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7298 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7299 "されたページが、 代わりに破棄されることはない。"
7300
7301 #. type: Plain text
7302 #: build/C/man2/posix_fadvise.2:154
7303 msgid ""
7304 "Pages that have not yet been written out will be unaffected, so if the "
7305 "application wishes to guarantee that pages will be released, it should call "
7306 "B<fsync>(2)  or B<fdatasync>(2)  first."
7307 msgstr ""
7308 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7309 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7310 "B<fdatasync>(2)  を呼ぶべきである。"
7311
7312 #. type: SS
7313 #: build/C/man2/posix_fadvise.2:154
7314 #, no-wrap
7315 msgid "Architecture-specific variants"
7316 msgstr "アーキテクチャ固有の派生バージョン"
7317
7318 #. type: Plain text
7319 #: build/C/man2/posix_fadvise.2:171
7320 msgid ""
7321 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7322 "of registers (see B<syscall>(2)  for further detail).  On such "
7323 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7324 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7325 "and I<len> arguments.  Therefore, these architectures define a version of "
7326 "the system call that orders the arguments suitably, but otherwise is "
7327 "otherwise exactly the same as B<posix_fadvise>()."
7328 msgstr "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステムコールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7329
7330 #. type: Plain text
7331 #: build/C/man2/posix_fadvise.2:173
7332 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7333 msgstr "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7334
7335 #. type: Plain text
7336 #: build/C/man2/posix_fadvise.2:178
7337 #, no-wrap
7338 msgid ""
7339 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7340 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7341 msgstr ""
7342 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7343 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7344
7345 #. type: Plain text
7346 #: build/C/man2/posix_fadvise.2:186
7347 msgid ""
7348 "These architecture-specific details are generally hidden from applications "
7349 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7350 "appropriate architecture-specific system call."
7351 msgstr "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテクチャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切なアーキテクチャ固有のシステムコールが呼び出される。"
7352
7353 #. type: Plain text
7354 #: build/C/man2/posix_fadvise.2:191
7355 msgid ""
7356 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7357 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7358 "through to the end of the file\"."
7359 msgstr ""
7360 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7361 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7362 "いた。"
7363
7364 #.  FIXME . Write a posix_fadvise(3) page.
7365 #. type: Plain text
7366 #: build/C/man2/posix_fadvise.2:197
7367 msgid ""
7368 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7369 "B<posix_madvise>(3)"
7370 msgstr ""
7371 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7372 "B<posix_madvise>(3)"
7373
7374 #. type: TH
7375 #: build/C/man3/posix_fallocate.3:25
7376 #, no-wrap
7377 msgid "POSIX_FALLOCATE"
7378 msgstr "POSIX_FALLOCATE"
7379
7380 #. type: Plain text
7381 #: build/C/man3/posix_fallocate.3:28
7382 msgid "posix_fallocate - allocate file space"
7383 msgstr "posix_fallocate - ファイルのスペースを確保する"
7384
7385 #. type: Plain text
7386 #: build/C/man3/posix_fallocate.3:33
7387 #, no-wrap
7388 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7389 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7390
7391 #. type: Plain text
7392 #: build/C/man3/posix_fallocate.3:42
7393 msgid "B<posix_fallocate>():"
7394 msgstr "B<posix_fallocate>():"
7395
7396 #. type: Plain text
7397 #: build/C/man3/posix_fallocate.3:61
7398 msgid ""
7399 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7400 "the file referred to by the descriptor I<fd> for the bytes in the range "
7401 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7402 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7403 "range are guaranteed not to fail because of lack of disk space."
7404 msgstr ""
7405 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7406 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7407 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7408 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7409 "失敗しないことが保証される。"
7410
7411 #. type: Plain text
7412 #: build/C/man3/posix_fallocate.3:66
7413 msgid ""
7414 "If the size of the file is less than I<offset>+I<len>, then the file is "
7415 "increased to this size; otherwise the file size is left unchanged."
7416 msgstr ""
7417 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7418 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7419
7420 #. type: Plain text
7421 #: build/C/man3/posix_fallocate.3:72
7422 msgid ""
7423 "B<posix_fallocate>()  returns zero on success, or an error number on "
7424 "failure.  Note that I<errno> is not set."
7425 msgstr ""
7426 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7427 "す。 I<errno> が設定されない点に注意すること。"
7428
7429 #. type: Plain text
7430 #: build/C/man3/posix_fallocate.3:81
7431 msgid "I<offset+len> exceeds the maximum file size."
7432 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7433
7434 #. type: Plain text
7435 #: build/C/man3/posix_fallocate.3:91
7436 msgid "I<fd> does not refer to a regular file."
7437 msgstr "I<fd> が通常のファイルとして参照されていない。"
7438
7439 #. type: Plain text
7440 #: build/C/man3/posix_fallocate.3:100
7441 msgid "I<fd> refers to a pipe."
7442 msgstr "I<fd> がパイプを参照している。"
7443
7444 #. type: Plain text
7445 #: build/C/man3/posix_fallocate.3:103
7446 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7447 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7448
7449 #. type: Plain text
7450 #: build/C/man3/posix_fallocate.3:128
7451 msgid ""
7452 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7453 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7454 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7455 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7456 "zero."
7457 msgstr ""
7458 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7459 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7460 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7461 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7462 "る。"
7463
7464 #. type: Plain text
7465 #: build/C/man3/posix_fallocate.3:133
7466 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7467 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7468
7469 #. type: TH
7470 #: build/C/man3/posix_memalign.3:29
7471 #, no-wrap
7472 msgid "POSIX_MEMALIGN"
7473 msgstr "POSIX_MEMALIGN"
7474
7475 #. type: TH
7476 #: build/C/man3/posix_memalign.3:29
7477 #, no-wrap
7478 msgid "2012-03-23"
7479 msgstr "2012-03-23"
7480
7481 #. type: Plain text
7482 #: build/C/man3/posix_memalign.3:32
7483 msgid ""
7484 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7485 "memory"
7486 msgstr ""
7487 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7488 "されたメモリの割り当てを行う"
7489
7490 #. type: Plain text
7491 #: build/C/man3/posix_memalign.3:39
7492 #, no-wrap
7493 msgid ""
7494 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7495 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7496 "B<void *valloc(size_t >I<size>B<);>\n"
7497 msgstr ""
7498 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7499 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7500 "B<void *valloc(size_t >I<size>B<);>\n"
7501
7502 #. type: Plain text
7503 #: build/C/man3/posix_memalign.3:44
7504 #, no-wrap
7505 msgid ""
7506 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7507 "B<void *pvalloc(size_t >I<size>B<);>\n"
7508 msgstr ""
7509 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7510 "B<void *pvalloc(size_t >I<size>B<);>\n"
7511
7512 #. type: Plain text
7513 #: build/C/man3/posix_memalign.3:54
7514 msgid ""
7515 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7516 "E<gt>=\\ 600"
7517 msgstr ""
7518 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7519 "E<gt>=\\ 600"
7520
7521 #. type: Plain text
7522 #: build/C/man3/posix_memalign.3:57
7523 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7524 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7525
7526 #. type: Plain text
7527 #: build/C/man3/posix_memalign.3:59
7528 msgid "B<valloc>():"
7529 msgstr "B<valloc>():"
7530
7531 #. type: TP
7532 #: build/C/man3/posix_memalign.3:62
7533 #, no-wrap
7534 msgid "Since glibc 2.12:"
7535 msgstr "glibc 2.12 以降:"
7536
7537 #. type: Plain text
7538 #: build/C/man3/posix_memalign.3:69
7539 #, no-wrap
7540 msgid ""
7541 "_BSD_SOURCE ||\n"
7542 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7543 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7544 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7545 msgstr ""
7546 "_BSD_SOURCE ||\n"
7547 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7548 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7549 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7550
7551 #. type: TP
7552 #: build/C/man3/posix_memalign.3:71
7553 #, no-wrap
7554 msgid "Before glibc 2.12:"
7555 msgstr "glibc 2.12 より前:"
7556
7557 #. type: Plain text
7558 #: build/C/man3/posix_memalign.3:75
7559 msgid ""
7560 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7561 "_XOPEN_SOURCE_EXTENDED"
7562 msgstr ""
7563 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7564 "_XOPEN_SOURCE_EXTENDED"
7565
7566 #. type: Plain text
7567 #: build/C/man3/posix_memalign.3:82
7568 msgid ""
7569 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7570 "declaration of B<valloc>(); no feature test macros are required.)"
7571 msgstr ""
7572 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7573 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7574
7575 #.  glibc does this:
7576 #. type: Plain text
7577 #: build/C/man3/posix_memalign.3:103
7578 msgid ""
7579 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7580 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7581 "memory will be a multiple of I<alignment>, which must be a power of two and "
7582 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
7583 "returns either NULL, or a unique pointer value that can later be "
7584 "successfully passed to B<free>(3)."
7585 msgstr ""
7586 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7587 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7588 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7589 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7590 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7591 "で B<free>(3)  に問題なく渡すことができる。"
7592
7593 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7594 #.  but no standards govern this.
7595 #. type: Plain text
7596 #: build/C/man3/posix_memalign.3:114
7597 msgid ""
7598 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7599 "pointer to the allocated memory.  The memory address will be a multiple of "
7600 "I<alignment>, which must be a power of two."
7601 msgstr ""
7602 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7603 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7604 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7605
7606 #. type: Plain text
7607 #: build/C/man3/posix_memalign.3:123
7608 msgid ""
7609 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7610 "the added restriction that I<size> should be a multiple of I<alignment>."
7611 msgstr ""
7612 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7613 "I<alignment>\n"
7614 "の倍数でなければならないという追加の制限がある点が異なる。"
7615
7616 #. type: Plain text
7617 #: build/C/man3/posix_memalign.3:132
7618 msgid ""
7619 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7620 "pointer to the allocated memory.  The memory address will be a multiple of "
7621 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7622 msgstr ""
7623 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7624 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7625 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7626 "る。"
7627
7628 #. type: Plain text
7629 #: build/C/man3/posix_memalign.3:139
7630 msgid ""
7631 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7632 "the size of the allocation up to the next multiple of the system page size."
7633 msgstr ""
7634 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7635 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7636
7637 #. type: Plain text
7638 #: build/C/man3/posix_memalign.3:141
7639 msgid "For all of these functions, the memory is not zeroed."
7640 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7641
7642 #. type: Plain text
7643 #: build/C/man3/posix_memalign.3:148
7644 msgid ""
7645 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7646 "pointer to the allocated memory, or NULL if the request fails."
7647 msgstr ""
7648 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7649 "た\n"
7650 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7651
7652 #. type: Plain text
7653 #: build/C/man3/posix_memalign.3:155
7654 msgid ""
7655 "B<posix_memalign>()  returns zero on success, or one of the error values "
7656 "listed in the next section on failure.  Note that I<errno> is not set."
7657 msgstr ""
7658 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7659 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7660 "ること。"
7661
7662 #. type: Plain text
7663 #: build/C/man3/posix_memalign.3:162
7664 msgid ""
7665 "The I<alignment> argument was not a power of two, or was not a multiple of "
7666 "I<sizeof(void *)>."
7667 msgstr ""
7668 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
7669 "かった。"
7670
7671 #. type: Plain text
7672 #: build/C/man3/posix_memalign.3:165
7673 msgid "There was insufficient memory to fulfill the allocation request."
7674 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7675
7676 #. type: Plain text
7677 #: build/C/man3/posix_memalign.3:172
7678 msgid ""
7679 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7680 "available in all Linux libc libraries."
7681 msgstr ""
7682 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7683 "すべての Linux libc ライブラリで使用可能である。"
7684
7685 #. type: Plain text
7686 #: build/C/man3/posix_memalign.3:176
7687 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7688 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7689
7690 #. type: Plain text
7691 #: build/C/man3/posix_memalign.3:180
7692 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7693 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7694
7695 #. type: Plain text
7696 #: build/C/man3/posix_memalign.3:187
7697 msgid ""
7698 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7699 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7700 "POSIX.1-2001."
7701 msgstr ""
7702 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7703 "り、\n"
7704 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7705
7706 #. type: Plain text
7707 #: build/C/man3/posix_memalign.3:191
7708 msgid "The function B<pvalloc>()  is a GNU extension."
7709 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7710
7711 #. type: Plain text
7712 #: build/C/man3/posix_memalign.3:195
7713 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7714 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7715
7716 #. type: Plain text
7717 #: build/C/man3/posix_memalign.3:199
7718 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7719 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7720
7721 #. type: Plain text
7722 #: build/C/man3/posix_memalign.3:204
7723 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7724 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7725
7726 #. type: SS
7727 #: build/C/man3/posix_memalign.3:204
7728 #, no-wrap
7729 msgid "Headers"
7730 msgstr "ヘッダ"
7731
7732 #. type: Plain text
7733 #: build/C/man3/posix_memalign.3:208
7734 msgid ""
7735 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7736 "hE<gt>>."
7737 msgstr ""
7738 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7739 "の意見が一致している。"
7740
7741 #. type: Plain text
7742 #: build/C/man3/posix_memalign.3:212
7743 msgid ""
7744 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7745 "of I<E<lt>malloc.hE<gt>>."
7746 msgstr ""
7747 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7748 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7749
7750 #. type: Plain text
7751 #: build/C/man3/posix_memalign.3:219
7752 msgid ""
7753 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7754 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7755 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7756 "above)."
7757 msgstr ""
7758 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7759 "libc4,5\n"
7760 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7761 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7762
7763 #. type: Plain text
7764 #: build/C/man3/posix_memalign.3:228
7765 msgid ""
7766 "On many systems there are alignment restrictions, for example, on buffers "
7767 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7768 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7769 "use B<posix_memalign>()  to satisfy this requirement."
7770 msgstr ""
7771 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7772 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7773 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7774 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7775 "と、この必要条件を満たすことができる。"
7776
7777 #. type: Plain text
7778 #: build/C/man3/posix_memalign.3:237
7779 msgid ""
7780 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7781 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7782 "is correct."
7783 msgstr ""
7784 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7785 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7786 "確認を行わないかもしれない。"
7787
7788 #.  Other systems allow passing the result of
7789 #.  .IR valloc ()
7790 #.  to
7791 #.  .IR free (3),
7792 #.  but not to
7793 #.  .IR realloc (3).
7794 #. type: Plain text
7795 #: build/C/man3/posix_memalign.3:265
7796 msgid ""
7797 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7798 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7799 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
7800 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
7801 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
7802 "implementation allows memory obtained from any of these functions to be "
7803 "reclaimed with B<free>(3)."
7804 msgstr ""
7805 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7806 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7807 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7808 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7809 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7810 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7811 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7812 "B<free>(3) で再利用することができる。"
7813
7814 #. type: Plain text
7815 #: build/C/man3/posix_memalign.3:270
7816 msgid ""
7817 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7818 "these functions are needed only if you require larger alignment values."
7819 msgstr ""
7820 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7821 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7822 "ト\n"
7823 "が必要な場合だけである。"
7824
7825 #. type: Plain text
7826 #: build/C/man3/posix_memalign.3:275
7827 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7828 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7829
7830 #. type: TH
7831 #: build/C/man2/readahead.2:28
7832 #, no-wrap
7833 msgid "READAHEAD"
7834 msgstr "READAHEAD"
7835
7836 #. type: Plain text
7837 #: build/C/man2/readahead.2:31
7838 msgid "readahead - perform file readahead into page cache"
7839 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7840
7841 #. type: Plain text
7842 #: build/C/man2/readahead.2:37
7843 #, no-wrap
7844 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7845 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7846
7847 #. type: Plain text
7848 #: build/C/man2/readahead.2:65
7849 msgid ""
7850 "B<readahead>()  populates the page cache with data from a file so that "
7851 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7852 "argument is a file descriptor identifying the file which is to be read.  The "
7853 "I<offset> argument specifies the starting point from which data is to be "
7854 "read and I<count> specifies the number of bytes to be read.  I/O is "
7855 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7856 "page boundary and bytes are read up to the next page boundary greater than "
7857 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7858 "of the file.  B<readahead>()  blocks until the specified data has been "
7859 "read.  The current file offset of the open file referred to by I<fd> is left "
7860 "unchanged."
7861 msgstr ""
7862 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7863 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7864 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7865 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7866 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7867 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7868 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7869 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7870 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7871 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7872 "更されない。"
7873
7874 #. type: Plain text
7875 #: build/C/man2/readahead.2:71
7876 msgid ""
7877 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7878 "I<errno> set to indicate the cause of the error."
7879 msgstr ""
7880 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7881 "ラーの原因を示す値を設定する。"
7882
7883 #. type: Plain text
7884 #: build/C/man2/readahead.2:76
7885 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7886 msgstr ""
7887 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7888 "ていない。"
7889
7890 #. type: Plain text
7891 #: build/C/man2/readahead.2:82
7892 msgid ""
7893 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
7894 msgstr ""
7895 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
7896 "ファイルであった。"
7897
7898 #. type: Plain text
7899 #: build/C/man2/readahead.2:87
7900 msgid ""
7901 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
7902 "been provided since version 2.3."
7903 msgstr ""
7904 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
7905 "は glibc バージョン 2.3 以降で行われている。"
7906
7907 #. type: Plain text
7908 #: build/C/man2/readahead.2:92
7909 msgid ""
7910 "The B<readahead>()  system call is Linux-specific, and its use should be "
7911 "avoided in portable applications."
7912 msgstr ""
7913 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
7914 "は 使用を避けるべきである。"
7915
7916 #. type: Plain text
7917 #: build/C/man2/readahead.2:97
7918 msgid ""
7919 "On some 32-bit architectures, the calling signature for this system call "
7920 "differs, for the reasons described in B<syscall>(2)."
7921 msgstr "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネチャーが違っている。 理由は B<syscall>(2) で説明されている。"
7922
7923 #. type: Plain text
7924 #: build/C/man2/readahead.2:103
7925 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7926 msgstr ""
7927 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7928
7929 #. type: TH
7930 #: build/C/man2/remap_file_pages.2:28
7931 #, no-wrap
7932 msgid "REMAP_FILE_PAGES"
7933 msgstr "REMAP_FILE_PAGES"
7934
7935 #. type: Plain text
7936 #: build/C/man2/remap_file_pages.2:31
7937 msgid "remap_file_pages - create a nonlinear file mapping"
7938 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
7939
7940 #. type: Plain text
7941 #: build/C/man2/remap_file_pages.2:35
7942 #, no-wrap
7943 msgid ""
7944 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7945 "B<#include E<lt>sys/mman.hE<gt>>\n"
7946 msgstr ""
7947 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7948 "B<#include E<lt>sys/mman.hE<gt>>\n"
7949
7950 #. type: Plain text
7951 #: build/C/man2/remap_file_pages.2:38
7952 #, no-wrap
7953 msgid ""
7954 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7955 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7956 msgstr ""
7957 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7958 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7959
7960 #. type: Plain text
7961 #: build/C/man2/remap_file_pages.2:51
7962 msgid ""
7963 "The B<remap_file_pages>()  system call is used to create a nonlinear "
7964 "mapping, that is, a mapping in which the pages of the file are mapped into a "
7965 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
7966 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
7967 "does not require the kernel to create additional VMA (Virtual Memory Area) "
7968 "data structures."
7969 msgstr ""
7970 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
7971 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
7972 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
7973 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
7974 "域)  データ構造体を追加で作成する必要がないことである。"
7975
7976 #. type: Plain text
7977 #: build/C/man2/remap_file_pages.2:53
7978 msgid "To create a nonlinear mapping we perform the following steps:"
7979 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
7980
7981 #. type: TP
7982 #: build/C/man2/remap_file_pages.2:53
7983 #, no-wrap
7984 msgid "1."
7985 msgstr "1."
7986
7987 #. type: Plain text
7988 #: build/C/man2/remap_file_pages.2:61
7989 msgid ""
7990 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
7991 "mapping must be created with the B<MAP_SHARED> flag."
7992 msgstr ""
7993 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
7994 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
7995 "い。"
7996
7997 #. type: TP
7998 #: build/C/man2/remap_file_pages.2:61
7999 #, no-wrap
8000 msgid "2."
8001 msgstr "2."
8002
8003 #. type: Plain text
8004 #: build/C/man2/remap_file_pages.2:69
8005 msgid ""
8006 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8007 "correspondence between the pages of the mapping and the pages of the file.  "
8008 "It is possible to map the same page of a file into multiple locations within "
8009 "the mapped region."
8010 msgstr ""
8011 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8012 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8013 "所に マップすることが可能である。"
8014
8015 #. type: Plain text
8016 #: build/C/man2/remap_file_pages.2:80
8017 msgid ""
8018 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8019 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8020 "system page size; I<size> is the length of the region in bytes."
8021 msgstr ""
8022 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8023 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8024 "る。 I<size> は領域の長さであり、単位はバイトである。"
8025
8026 #. type: Plain text
8027 #: build/C/man2/remap_file_pages.2:98
8028 msgid ""
8029 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8030 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8031 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8032 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8033 "and I<size> will be placed."
8034 msgstr ""
8035 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8036 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8037 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8038 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8039 "レスを、 I<addr> によって指定することである。"
8040
8041 #.  This rounding is weird, and not consistent with the treatment of
8042 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8043 #.  MTK, 14 Sep 2005
8044 #. type: Plain text
8045 #: build/C/man2/remap_file_pages.2:112
8046 msgid ""
8047 "The values specified in I<addr> and I<size> should be multiples of the "
8048 "system page size.  If they are not, then the kernel rounds I<both> values "
8049 "I<down> to the nearest multiple of the page size."
8050 msgstr ""
8051 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8052 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8053 "「切り下げる」。"
8054
8055 #. type: Plain text
8056 #: build/C/man2/remap_file_pages.2:116
8057 msgid "The I<prot> argument must be specified as 0."
8058 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8059
8060 #. type: Plain text
8061 #: build/C/man2/remap_file_pages.2:124
8062 msgid ""
8063 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8064 "other than B<MAP_NONBLOCK> are ignored."
8065 msgstr ""
8066 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8067 "の全てのフラグは無視される。"
8068
8069 #. type: Plain text
8070 #: build/C/man2/remap_file_pages.2:131
8071 msgid ""
8072 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8073 "I<errno> is set appropriately."
8074 msgstr ""
8075 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8076 "れ、 I<errno> が適切に設定される。"
8077
8078 #. type: Plain text
8079 #: build/C/man2/remap_file_pages.2:139
8080 msgid ""
8081 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8082 "flag."
8083 msgstr ""
8084 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8085 "いない。"
8086
8087 #.  And possibly others from vma->vm_ops->populate()
8088 #. type: Plain text
8089 #: build/C/man2/remap_file_pages.2:148
8090 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8091 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8092
8093 #. type: Plain text
8094 #: build/C/man2/remap_file_pages.2:153
8095 msgid ""
8096 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8097 "support was added in version 2.3.3."
8098 msgstr ""
8099 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8100 "サポートは glibc バージョン 2.3.3 で追加された。"
8101
8102 #. type: Plain text
8103 #: build/C/man2/remap_file_pages.2:157
8104 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8105 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8106
8107 #. type: Plain text
8108 #: build/C/man2/remap_file_pages.2:164
8109 msgid ""
8110 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8111 "B<msync>(2)"
8112 msgstr ""
8113 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8114 "B<msync>(2)"
8115
8116 #. type: TH
8117 #: build/C/man3/shm_open.3:26
8118 #, no-wrap
8119 msgid "SHM_OPEN"
8120 msgstr "SHM_OPEN"
8121
8122 #. type: TH
8123 #: build/C/man3/shm_open.3:26
8124 #, no-wrap
8125 msgid "2009-02-25"
8126 msgstr "2009-02-25"
8127
8128 #. type: Plain text
8129 #: build/C/man3/shm_open.3:29
8130 msgid ""
8131 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8132 msgstr ""
8133 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8134 "う"
8135
8136 #. type: Plain text
8137 #: build/C/man3/shm_open.3:33
8138 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8139 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8140
8141 #. type: Plain text
8142 #: build/C/man3/shm_open.3:35
8143 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8144 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8145
8146 #. type: Plain text
8147 #: build/C/man3/shm_open.3:37
8148 msgid ""
8149 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8150 msgstr ""
8151 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8152
8153 #. type: Plain text
8154 #: build/C/man3/shm_open.3:39
8155 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8156 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8157
8158 #. type: Plain text
8159 #: build/C/man3/shm_open.3:41
8160 msgid "Link with I<-lrt>."
8161 msgstr "I<-lrt> でリンクする。"
8162
8163 #. type: Plain text
8164 #: build/C/man3/shm_open.3:53
8165 msgid ""
8166 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8167 "memory object.  A POSIX shared memory object is in effect a handle which can "
8168 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8169 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8170 "removing an object previously created by B<shm_open>()."
8171 msgstr ""
8172 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8173 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8174 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8175 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8176 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8177
8178 #.  glibc allows the initial slash to be omitted, and makes
8179 #.  multiple initial slashes equivalent to a single slash.
8180 #.  This differs from the implementation of POSIX message queues.
8181 #.  glibc allows subdirectory components in the name, in which
8182 #.  case the subdirectory must exist under /dev/shm, and allow the
8183 #.  required permissions if a user wants to create a shared memory
8184 #.  object in that subdirectory.
8185 #. type: Plain text
8186 #: build/C/man3/shm_open.3:74
8187 msgid ""
8188 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8189 "specifies the shared memory object to be created or opened.  For portable "
8190 "use, a shared memory object should be identified by a name of the form I</"
8191 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8192 "255) characters consisting of an initial slash, followed by one or more "
8193 "characters, none of which are slashes."
8194 msgstr ""
8195 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8196 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8197 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8198 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8199 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8200
8201 #. type: Plain text
8202 #: build/C/man3/shm_open.3:81
8203 msgid ""
8204 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8205 "or B<O_RDWR> and any of the other flags listed here:"
8206 msgstr ""
8207 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8208 "述べる他のフラグの論理和をとったもの を指定する。"
8209
8210 #. type: TP
8211 #: build/C/man3/shm_open.3:81
8212 #, no-wrap
8213 msgid "B<O_RDONLY>"
8214 msgstr "B<O_RDONLY>"
8215
8216 #. type: Plain text
8217 #: build/C/man3/shm_open.3:87
8218 msgid ""
8219 "Open the object for read access.  A shared memory object opened in this way "
8220 "can be B<mmap>(2)ed only for read (B<PROT_READ>) access."
8221 msgstr ""
8222 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8223 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8224 "B<mmap>(2)  することができる。"
8225
8226 #. type: TP
8227 #: build/C/man3/shm_open.3:87
8228 #, no-wrap
8229 msgid "B<O_RDWR>"
8230 msgstr "B<O_RDWR>"
8231
8232 #. type: Plain text
8233 #: build/C/man3/shm_open.3:90
8234 msgid "Open the object for read-write access."
8235 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8236
8237 #. type: TP
8238 #: build/C/man3/shm_open.3:90
8239 #, no-wrap
8240 msgid "B<O_CREAT>"
8241 msgstr "B<O_CREAT>"
8242
8243 #.  In truth it is actually the file system IDs on Linux, but these
8244 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8245 #. type: Plain text
8246 #: build/C/man3/shm_open.3:110
8247 msgid ""
8248 "Create the shared memory object if it does not exist.  The user and group "
8249 "ownership of the object are taken from the corresponding effective IDs of "
8250 "the calling process, and the object's permission bits are set according to "
8251 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8252 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8253 "A set of macro constants which can be used to define I<mode> is listed in "
8254 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8255 "including I<E<lt>sys/stat.hE<gt>>.)"
8256 msgstr ""
8257 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8258 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8259 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8260 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8261 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8262 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8263 "hE<gt>> のインクルードにより得られる)。"
8264
8265 #. type: Plain text
8266 #: build/C/man3/shm_open.3:116
8267 msgid ""
8268 "A new shared memory object initially has zero length\\(emthe size of the "
8269 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8270 "shared memory object are automatically initialized to 0."
8271 msgstr ""
8272 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8273 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8274 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8275
8276 #. type: TP
8277 #: build/C/man3/shm_open.3:116
8278 #, no-wrap
8279 msgid "B<O_EXCL>"
8280 msgstr "B<O_EXCL>"
8281
8282 #. type: Plain text
8283 #: build/C/man3/shm_open.3:125
8284 msgid ""
8285 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8286 "I<name> already exists, return an error.  The check for the existence of the "
8287 "object, and its creation if it does not exist, are performed atomically."
8288 msgstr ""
8289 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8290 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8291 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8292 "atomically)。"
8293
8294 #. type: TP
8295 #: build/C/man3/shm_open.3:125
8296 #, no-wrap
8297 msgid "B<O_TRUNC>"
8298 msgstr "B<O_TRUNC>"
8299
8300 #. type: Plain text
8301 #: build/C/man3/shm_open.3:128
8302 msgid "If the shared memory object already exists, truncate it to zero bytes."
8303 msgstr ""
8304 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8305 "切り詰める。"
8306
8307 #. type: Plain text
8308 #: build/C/man3/shm_open.3:131
8309 msgid ""
8310 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8311 "hE<gt>>."
8312 msgstr ""
8313 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8314
8315 #. type: Plain text
8316 #: build/C/man3/shm_open.3:142
8317 msgid ""
8318 "On successful completion B<shm_open>()  returns a new file descriptor "
8319 "referring to the shared memory object.  This file descriptor is guaranteed "
8320 "to be the lowest-numbered file descriptor not previously opened within the "
8321 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8322 "descriptor."
8323 msgstr ""
8324 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8325 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8326 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8327 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8328 "ファイル・ディスクリプタに設定される。"
8329
8330 #. type: Plain text
8331 #: build/C/man3/shm_open.3:151
8332 msgid ""
8333 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8334 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8335 "the file descriptor may be closed without affecting the memory mapping."
8336 msgstr ""
8337 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8338 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8339 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8340 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8341
8342 #. type: Plain text
8343 #: build/C/man3/shm_open.3:169
8344 msgid ""
8345 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8346 "shared memory object name, and, once all processes have unmapped the object, "
8347 "de-allocates and destroys the contents of the associated memory region.  "
8348 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8349 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8350 "case a new, distinct object is created)."
8351 msgstr ""
8352 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8353 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8354 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8355 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8356 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8357 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8358
8359 #. type: Plain text
8360 #: build/C/man3/shm_open.3:178
8361 msgid ""
8362 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8363 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8364 "or -1 on error."
8365 msgstr ""
8366 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8367 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8368 "を、エラーが起こった場合 -1 を返す。"
8369
8370 #. type: Plain text
8371 #: build/C/man3/shm_open.3:185
8372 msgid ""
8373 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8374 "which may appear in I<errno> include the following:"
8375 msgstr ""
8376 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8377 "される値は以下の通りである:"
8378
8379 #. type: Plain text
8380 #: build/C/man3/shm_open.3:190
8381 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8382 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8383
8384 #. type: Plain text
8385 #: build/C/man3/shm_open.3:200
8386 msgid ""
8387 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8388 "B<O_TRUNC> was specified and the caller does not have write permission on "
8389 "the object."
8390 msgstr ""
8391 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8392 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8393 "み権限が なかった。"
8394
8395 #. type: TP
8396 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:194
8397 #, no-wrap
8398 msgid "B<EEXIST>"
8399 msgstr "B<EEXIST>"
8400
8401 #. type: Plain text
8402 #: build/C/man3/shm_open.3:211
8403 msgid ""
8404 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8405 "shared memory object specified by I<name> already exists."
8406 msgstr ""
8407 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8408 "定された共有メモリ・オブジェクトが既に存在した。"
8409
8410 #. type: Plain text
8411 #: build/C/man3/shm_open.3:218
8412 msgid "The I<name> argument to B<shm_open>()  was invalid."
8413 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8414
8415 #. type: TP
8416 #: build/C/man3/shm_open.3:218
8417 #, no-wrap
8418 msgid "B<EMFILE>"
8419 msgstr "B<EMFILE>"
8420
8421 #. type: Plain text
8422 #: build/C/man3/shm_open.3:221
8423 msgid "The process already has the maximum number of files open."
8424 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8425
8426 #. type: TP
8427 #: build/C/man3/shm_open.3:221
8428 #, no-wrap
8429 msgid "B<ENAMETOOLONG>"
8430 msgstr "B<ENAMETOOLONG>"
8431
8432 #. type: Plain text
8433 #: build/C/man3/shm_open.3:227
8434 msgid "The length of I<name> exceeds B<PATH_MAX>."
8435 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8436
8437 #. type: Plain text
8438 #: build/C/man3/shm_open.3:231
8439 msgid ""
8440 "The limit on the total number of files open on the system has been reached."
8441 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8442
8443 #. type: TP
8444 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
8445 #: build/C/man2/shmget.2:208
8446 #, no-wrap
8447 msgid "B<ENOENT>"
8448 msgstr "B<ENOENT>"
8449
8450 #. type: Plain text
8451 #: build/C/man3/shm_open.3:240
8452 msgid ""
8453 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8454 "B<O_CREAT> was not specified."
8455 msgstr ""
8456 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8457 "B<O_CREAT> が指定されていなかった。"
8458
8459 #. type: Plain text
8460 #: build/C/man3/shm_open.3:247
8461 msgid ""
8462 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8463 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8464
8465 #. type: Plain text
8466 #: build/C/man3/shm_open.3:249
8467 msgid "These functions are provided in glibc 2.2 and later."
8468 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8469
8470 #. type: Plain text
8471 #: build/C/man3/shm_open.3:255
8472 msgid ""
8473 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8474 "object is set to either the calling process's effective group ID or \"a "
8475 "system default group ID\"."
8476 msgstr ""
8477 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8478 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8479 "ID」 のどちらかに設定される、と書かれている。"
8480
8481 #. type: Plain text
8482 #: build/C/man3/shm_open.3:264
8483 msgid ""
8484 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8485 "unspecified.  On Linux, this will successfully truncate an existing shared "
8486 "memory object\\(emthis may not be so on other UNIX systems."
8487 msgstr ""
8488 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8489 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8490 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8491
8492 #. type: Plain text
8493 #: build/C/man3/shm_open.3:269
8494 msgid ""
8495 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8496 "dedicated file system, which is normally mounted under I</dev/shm>."
8497 msgstr ""
8498 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8499 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8500
8501 #. type: Plain text
8502 #: build/C/man3/shm_open.3:280
8503 msgid ""
8504 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8505 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8506 msgstr ""
8507 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8508 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8509
8510 #. type: TH
8511 #: build/C/man7/shm_overview.7:27
8512 #, no-wrap
8513 msgid "SHM_OVERVIEW"
8514 msgstr "SHM_OVERVIEW"
8515
8516 #. type: TH
8517 #: build/C/man7/shm_overview.7:27
8518 #, no-wrap
8519 msgid "2010-09-10"
8520 msgstr "2010-09-10"
8521
8522 #. type: Plain text
8523 #: build/C/man7/shm_overview.7:30
8524 msgid "shm_overview - overview of POSIX shared memory"
8525 msgstr "shm_overview - POSIX 共有メモリの概要"
8526
8527 #. type: Plain text
8528 #: build/C/man7/shm_overview.7:33
8529 msgid ""
8530 "The POSIX shared memory API allows processes to communicate information by "
8531 "sharing a region of memory."
8532 msgstr ""
8533 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8534 "情報をやり取りすることができる。"
8535
8536 #. type: Plain text
8537 #: build/C/man7/shm_overview.7:35
8538 msgid "The interfaces employed in the API are:"
8539 msgstr "この API では以下のインターフェースが採用されている。"
8540
8541 #. type: TP
8542 #: build/C/man7/shm_overview.7:35
8543 #, no-wrap
8544 msgid "B<shm_open>(3)"
8545 msgstr "B<shm_open>(3)"
8546
8547 #. type: Plain text
8548 #: build/C/man7/shm_overview.7:42
8549 msgid ""
8550 "Create and open a new object, or open an existing object.  This is analogous "
8551 "to B<open>(2).  The call returns a file descriptor for use by the other "
8552 "interfaces listed below."
8553 msgstr ""
8554 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8555 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8556 "る ファイルディスクリプタを返す。"
8557
8558 #. type: TP
8559 #: build/C/man7/shm_overview.7:42
8560 #, no-wrap
8561 msgid "B<ftruncate>(2)"
8562 msgstr "B<ftruncate>(2)"
8563
8564 #. type: Plain text
8565 #: build/C/man7/shm_overview.7:46
8566 msgid ""
8567 "Set the size of the shared memory object.  (A newly created shared memory "
8568 "object has a length of zero.)"
8569 msgstr "共有メモリオブジェクトの大きさを設定する。"
8570
8571 #. type: Plain text
8572 #: build/C/man7/shm_overview.7:50
8573 msgid ""
8574 "Map the shared memory object into the virtual address space of the calling "
8575 "process."
8576 msgstr ""
8577 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8578
8579 #. type: TP
8580 #: build/C/man7/shm_overview.7:50
8581 #, no-wrap
8582 msgid "B<munmap>(2)"
8583 msgstr "B<munmap>(2)"
8584
8585 #. type: Plain text
8586 #: build/C/man7/shm_overview.7:54
8587 msgid ""
8588 "Unmap the shared memory object from the virtual address space of the calling "
8589 "process."
8590 msgstr ""
8591 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8592 "る。"
8593
8594 #. type: TP
8595 #: build/C/man7/shm_overview.7:54
8596 #, no-wrap
8597 msgid "B<shm_unlink>(3)"
8598 msgstr "B<shm_unlink>(3)"
8599
8600 #. type: Plain text
8601 #: build/C/man7/shm_overview.7:57
8602 msgid "Remove a shared memory object name."
8603 msgstr "共有メモリオブジェクト名を削除する。"
8604
8605 #. type: TP
8606 #: build/C/man7/shm_overview.7:57
8607 #, no-wrap
8608 msgid "B<close>(2)"
8609 msgstr "B<close>(2)"
8610
8611 #. type: Plain text
8612 #: build/C/man7/shm_overview.7:62
8613 msgid ""
8614 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8615 "needed."
8616 msgstr ""
8617 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8618 "のファイルディスクリプタをクローズする。"
8619
8620 #. type: TP
8621 #: build/C/man7/shm_overview.7:62
8622 #, no-wrap
8623 msgid "B<fstat>(2)"
8624 msgstr "B<fstat>(2)"
8625
8626 #. type: Plain text
8627 #: build/C/man7/shm_overview.7:76
8628 msgid ""
8629 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8630 "the information returned by this call are the object's size (I<st_size>), "
8631 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8632 msgstr ""
8633 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8634 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8635 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8636
8637 #. type: TP
8638 #: build/C/man7/shm_overview.7:76
8639 #, no-wrap
8640 msgid "B<fchown>(2)"
8641 msgstr "B<fchown>(2)"
8642
8643 #. type: Plain text
8644 #: build/C/man7/shm_overview.7:79
8645 msgid "To change the ownership of a shared memory object."
8646 msgstr "共有メモリオブジェクトの所有権を変更する。"
8647
8648 #. type: TP
8649 #: build/C/man7/shm_overview.7:79
8650 #, no-wrap
8651 msgid "B<fchmod>(2)"
8652 msgstr "B<fchmod>(2)"
8653
8654 #. type: Plain text
8655 #: build/C/man7/shm_overview.7:82
8656 msgid "To change the permissions of a shared memory object."
8657 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8658
8659 #. type: SS
8660 #: build/C/man7/shm_overview.7:82
8661 #, no-wrap
8662 msgid "Versions"
8663 msgstr "Versions"
8664
8665 #. type: Plain text
8666 #: build/C/man7/shm_overview.7:84
8667 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8668 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8669
8670 #. type: SS
8671 #: build/C/man7/shm_overview.7:84
8672 #, no-wrap
8673 msgid "Persistence"
8674 msgstr "持続性"
8675
8676 #. type: Plain text
8677 #: build/C/man7/shm_overview.7:89
8678 msgid ""
8679 "POSIX shared memory objects have kernel persistence: a shared memory object "
8680 "will exist until the system is shut down, or until all processes have "
8681 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8682 msgstr ""
8683 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8684 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8685 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8686
8687 #. type: SS
8688 #: build/C/man7/shm_overview.7:89
8689 #, no-wrap
8690 msgid "Linking"
8691 msgstr "リンク"
8692
8693 #. type: Plain text
8694 #: build/C/man7/shm_overview.7:94
8695 msgid ""
8696 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8697 "to link against the real-time library, I<librt>."
8698 msgstr ""
8699 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8700 "タイムライブラリ I<librt> とリンクしなければならない。"
8701
8702 #. type: SS
8703 #: build/C/man7/shm_overview.7:94
8704 #, no-wrap
8705 msgid "Accessing shared memory objects via the file system"
8706 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8707
8708 #. type: Plain text
8709 #: build/C/man7/shm_overview.7:101
8710 msgid ""
8711 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8712 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8713 "supports the use of access control lists (ACLs)  to control the permissions "
8714 "of objects in the virtual file system."
8715 msgstr ""
8716 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8717 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8718 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8719 "スト (ACL; access control lists) を使うことができる。"
8720
8721 #. type: Plain text
8722 #: build/C/man7/shm_overview.7:106
8723 msgid ""
8724 "Typically, processes must synchronize their access to a shared memory "
8725 "object, using, for example, POSIX semaphores."
8726 msgstr ""
8727 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8728 "使ってプロセス間で同期をとらなければならない。"
8729
8730 #. type: Plain text
8731 #: build/C/man7/shm_overview.7:114
8732 msgid ""
8733 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8734 "memory API.  POSIX shared memory provides a simpler, and better designed "
8735 "interface; on the other hand POSIX shared memory is somewhat less widely "
8736 "available (especially on older systems) than System V shared memory."
8737 msgstr ""
8738 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8739 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8740 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8741 "システムが少ない (特に、古いシステムでは少ない)。"
8742
8743 #. type: Plain text
8744 #: build/C/man7/shm_overview.7:127
8745 msgid ""
8746 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8747 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8748 "B<shm_unlink>(3), B<sem_overview>(7)"
8749 msgstr ""
8750 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8751 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8752 "B<shm_unlink>(3), B<sem_overview>(7)"
8753
8754 #. type: TH
8755 #: build/C/man2/shmctl.2:45
8756 #, no-wrap
8757 msgid "SHMCTL"
8758 msgstr "SHMCTL"
8759
8760 #. type: TH
8761 #: build/C/man2/shmctl.2:45
8762 #, no-wrap
8763 msgid "2013-03-18"
8764 msgstr "2013-03-18"
8765
8766 #. type: Plain text
8767 #: build/C/man2/shmctl.2:48
8768 msgid "shmctl - System V shared memory control"
8769 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
8770
8771 #. type: Plain text
8772 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8773 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8774 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8775
8776 #. type: Plain text
8777 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8778 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8779 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8780
8781 #. type: Plain text
8782 #: build/C/man2/shmctl.2:55
8783 msgid ""
8784 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8785 msgstr ""
8786 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8787
8788 #. type: Plain text
8789 #: build/C/man2/shmctl.2:62
8790 msgid ""
8791 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8792 "System V shared memory segment whose identifier is given in I<shmid>."
8793 msgstr "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対して I<cmd> で指示した制御命令を実行する。"
8794
8795 #. type: Plain text
8796 #: build/C/man2/shmctl.2:67
8797 msgid ""
8798 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8799 "I<E<lt>sys/shm.hE<gt>> as follows:"
8800 msgstr ""
8801 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8802 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8803
8804 #. type: Plain text
8805 #: build/C/man2/shmctl.2:81
8806 #, no-wrap
8807 msgid ""
8808 "struct shmid_ds {\n"
8809 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8810 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8811 "    time_t          shm_atime;   /* Last attach time */\n"
8812 "    time_t          shm_dtime;   /* Last detach time */\n"
8813 "    time_t          shm_ctime;   /* Last change time */\n"
8814 "    pid_t           shm_cpid;    /* PID of creator */\n"
8815 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8816 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8817 "    ...\n"
8818 "};\n"
8819 msgstr ""
8820 "struct shmid_ds {\n"
8821 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8822 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8823 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8824 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8825 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8826 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8827 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8828 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8829 "    ...\n"
8830 "};\n"
8831
8832 #. type: Plain text
8833 #: build/C/man2/shmctl.2:89
8834 msgid ""
8835 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8836 "settable using B<IPC_SET>):"
8837 msgstr ""
8838 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
8839 "B<IPC_SET> を使って設定可能である):"
8840
8841 #. type: Plain text
8842 #: build/C/man2/shmctl.2:102
8843 #, no-wrap
8844 msgid ""
8845 "struct ipc_perm {\n"
8846 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8847 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8848 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8849 "    uid_t          cuid;     /* Effective UID of creator */\n"
8850 "    gid_t          cgid;     /* Effective GID of creator */\n"
8851 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8852 "                                SHM_LOCKED flags */\n"
8853 "    unsigned short __seq;    /* Sequence number */\n"
8854 "};\n"
8855 msgstr ""
8856 "struct ipc_perm {\n"
8857 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8858 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8859 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8860 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8861 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8862 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8863 "                                SHM_LOCKED フラグ */\n"
8864 "    unsigned short __seq;    /* シーケンス番号 */\n"
8865 "};\n"
8866
8867 #. type: Plain text
8868 #: build/C/man2/shmctl.2:108
8869 msgid "Valid values for I<cmd> are:"
8870 msgstr "I<cmd> として有効な値は以下の通り:"
8871
8872 #. type: TP
8873 #: build/C/man2/shmctl.2:109
8874 #, no-wrap
8875 msgid "B<IPC_STAT>"
8876 msgstr "B<IPC_STAT>"
8877
8878 #. type: Plain text
8879 #: build/C/man2/shmctl.2:118
8880 msgid ""
8881 "Copy information from the kernel data structure associated with I<shmid> "
8882 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
8883 "read permission on the shared memory segment."
8884 msgstr ""
8885 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
8886 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
8887 "読み込み許可を持たなければならない。"
8888
8889 #. type: TP
8890 #: build/C/man2/shmctl.2:118
8891 #, no-wrap
8892 msgid "B<IPC_SET>"
8893 msgstr "B<IPC_SET>"
8894
8895 #. type: Plain text
8896 #: build/C/man2/shmctl.2:136
8897 msgid ""
8898 "Write the values of some members of the I<shmid_ds> structure pointed to by "
8899 "I<buf> to the kernel data structure associated with this shared memory "
8900 "segment, updating also its I<shm_ctime> member.  The following fields can be "
8901 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
8902 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
8903 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
8904 "memory segment, or the caller must be privileged."
8905 msgstr ""
8906 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
8907 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
8908 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
8909 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
8910 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
8911 "と一致するか、呼び出し元が特権を持たなければならない。"
8912
8913 #. type: TP
8914 #: build/C/man2/shmctl.2:136
8915 #, no-wrap
8916 msgid "B<IPC_RMID>"
8917 msgstr "B<IPC_RMID>"
8918
8919 #. type: Plain text
8920 #: build/C/man2/shmctl.2:153
8921 msgid ""
8922 "Mark the segment to be destroyed.  The segment will only actually be "
8923 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
8924 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
8925 "the owner or creator, or be privileged.  If a segment has been marked for "
8926 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
8927 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
8928 "be set."
8929 msgstr ""
8930 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
8931 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
8932 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
8933 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
8934 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
8935 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
8936
8937 #. type: Plain text
8938 #: build/C/man2/shmctl.2:156
8939 msgid ""
8940 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
8941 "its pages that were faulted in will remain in memory or swap."
8942 msgstr ""
8943 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
8944 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
8945 "る。"
8946
8947 #. type: Plain text
8948 #: build/C/man2/shmctl.2:161
8949 msgid ""
8950 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
8951 "(5)."
8952 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
8953
8954 #. type: TP
8955 #: build/C/man2/shmctl.2:161
8956 #, no-wrap
8957 msgid "B<IPC_INFO> (Linux-specific)"
8958 msgstr "B<IPC_INFO> (Linux 固有)"
8959
8960 #. type: Plain text
8961 #: build/C/man2/shmctl.2:174
8962 msgid ""
8963 "Returns information about system-wide shared memory limits and parameters in "
8964 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
8965 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
8966 "B<_GNU_SOURCE> feature test macro is defined:"
8967 msgstr ""
8968 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
8969 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
8970 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8971 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8972
8973 #. type: Plain text
8974 #: build/C/man2/shmctl.2:188
8975 #, no-wrap
8976 msgid ""
8977 "struct  shminfo {\n"
8978 "    unsigned long shmmax; /* Maximum segment size */\n"
8979 "    unsigned long shmmin; /* Minimum segment size;\n"
8980 "                             always 1 */\n"
8981 "    unsigned long shmmni; /* Maximum number of segments */\n"
8982 "    unsigned long shmseg; /* Maximum number of segments\n"
8983 "                             that a process can attach;\n"
8984 "                             unused within kernel */\n"
8985 "    unsigned long shmall; /* Maximum number of pages of\n"
8986 "                             shared memory, system-wide */\n"
8987 "};\n"
8988 msgstr ""
8989 "struct  shminfo {\n"
8990 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
8991 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
8992 "                             常に 1 */\n"
8993 "    unsigned long shmmni; /* 最大セグメント数 */\n"
8994 "    unsigned long shmseg; /* プロセスが付加できる\n"
8995 "                             セグメントの最大数。\n"
8996 "                             カーネル内では未使用 */\n"
8997 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
8998 "                             システム全体での値 */\n"
8999 "};\n"
9000
9001 #. type: Plain text
9002 #: build/C/man2/shmctl.2:201
9003 msgid ""
9004 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9005 "files of the same name; see B<proc>(5)  for details."
9006 msgstr ""
9007 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9008 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9009
9010 #. type: TP
9011 #: build/C/man2/shmctl.2:201
9012 #, no-wrap
9013 msgid "B<SHM_INFO> (Linux-specific)"
9014 msgstr "B<SHM_INFO> (Linux 固有)"
9015
9016 #. type: Plain text
9017 #: build/C/man2/shmctl.2:212
9018 msgid ""
9019 "Returns a I<shm_info> structure whose fields contain information about "
9020 "system resources consumed by shared memory.  This structure is defined in "
9021 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9022 msgstr ""
9023 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9024 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9025 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9026
9027 #. type: Plain text
9028 #: build/C/man2/shmctl.2:229
9029 #, no-wrap
9030 msgid ""
9031 "struct shm_info {\n"
9032 "    int           used_ids; /* # of currently existing\n"
9033 "                               segments */\n"
9034 "    unsigned long shm_tot;  /* Total number of shared\n"
9035 "                               memory pages */\n"
9036 "    unsigned long shm_rss;  /* # of resident shared\n"
9037 "                               memory pages */\n"
9038 "    unsigned long shm_swp;  /* # of swapped shared\n"
9039 "                               memory pages */\n"
9040 "    unsigned long swap_attempts;\n"
9041 "                            /* Unused since Linux 2.4 */\n"
9042 "    unsigned long swap_successes;\n"
9043 "                            /* Unused since Linux 2.4 */\n"
9044 "};\n"
9045 msgstr ""
9046 "struct shm_info {\n"
9047 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9048 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9049 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9050 "                               いない) 共有メモリページ数 */\n"
9051 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9052 "                               ページ数 */\n"
9053 "    unsigned long swap_attempts;\n"
9054 "                            /* Linux 2.4 以降では未使用 */\n"
9055 "    unsigned long swap_successes;\n"
9056 "                            /* Linux 2.4 以降では未使用 */\n"
9057 "};\n"
9058
9059 #. type: TP
9060 #: build/C/man2/shmctl.2:231
9061 #, no-wrap
9062 msgid "B<SHM_STAT> (Linux-specific)"
9063 msgstr "B<SHM_STAT> (Linux 固有)"
9064
9065 #. type: Plain text
9066 #: build/C/man2/shmctl.2:242
9067 msgid ""
9068 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9069 "argument is not a segment identifier, but instead an index into the kernel's "
9070 "internal array that maintains information about all shared memory segments "
9071 "on the system."
9072 msgstr ""
9073 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9074 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9075 "管理するカーネルの内部配列へのインデックス である。"
9076
9077 #. type: Plain text
9078 #: build/C/man2/shmctl.2:245
9079 msgid ""
9080 "The caller can prevent or allow swapping of a shared memory segment with the "
9081 "following I<cmd> values:"
9082 msgstr ""
9083 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9084 "ワップされることを防止したり、許可したりできる:"
9085
9086 #. type: TP
9087 #: build/C/man2/shmctl.2:246
9088 #, no-wrap
9089 msgid "B<SHM_LOCK> (Linux-specific)"
9090 msgstr "B<SHM_LOCK> (Linux 固有)"
9091
9092 #. type: Plain text
9093 #: build/C/man2/shmctl.2:258
9094 msgid ""
9095 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9096 "pages that are required to be present after locking is enabled.  If a "
9097 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9098 "I<shm_perm.mode> field in the associated data structure retrieved by "
9099 "B<IPC_STAT> will be set."
9100 msgstr ""
9101 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9102 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9103 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9104 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9105 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9106
9107 #. type: TP
9108 #: build/C/man2/shmctl.2:258
9109 #, no-wrap
9110 msgid "B<SHM_UNLOCK> (Linux-specific)"
9111 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9112
9113 #. type: Plain text
9114 #: build/C/man2/shmctl.2:261
9115 msgid "Unlock the segment, allowing it to be swapped out."
9116 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9117
9118 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9119 #.  be applied to a segment, regardless of ownership of the segment.
9120 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9121 #.  in 2.6.10.  MTK, May 2005
9122 #. type: Plain text
9123 #: build/C/man2/shmctl.2:279
9124 msgid ""
9125 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9126 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9127 "these operations if its effective UID matches the owner or creator UID of "
9128 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9129 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9130 msgstr ""
9131 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9132 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9133 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9134 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9135 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9136 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9137
9138 #. type: Plain text
9139 #: build/C/man2/shmctl.2:297
9140 msgid ""
9141 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9142 "highest used entry in the kernel's internal array recording information "
9143 "about all shared memory segments.  (This information can be used with "
9144 "repeated B<SHM_STAT> operations to obtain information about all shared "
9145 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9146 "the identifier of the shared memory segment whose index was given in "
9147 "I<shmid>.  Other operations return 0 on success."
9148 msgstr ""
9149 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9150 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9151 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9152 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9153 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9154 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9155
9156 #. type: Plain text
9157 #: build/C/man2/shmctl.2:301
9158 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9159 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9160
9161 #. type: Plain text
9162 #: build/C/man2/shmctl.2:310
9163 msgid ""
9164 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9165 "read access for I<shmid>, and the calling process does not have the "
9166 "B<CAP_IPC_OWNER> capability."
9167 msgstr ""
9168 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9169 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9170 "ケーパビリティ (capability) を持っていない。"
9171
9172 #. type: Plain text
9173 #: build/C/man2/shmctl.2:321
9174 msgid ""
9175 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9176 "pointed to by I<buf> isn't accessible."
9177 msgstr ""
9178 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9179 "るアドレスにアクセスできない。"
9180
9181 #. type: TP
9182 #: build/C/man2/shmctl.2:321 build/C/man2/shmop.2:197
9183 #, no-wrap
9184 msgid "B<EIDRM>"
9185 msgstr "B<EIDRM>"
9186
9187 #. type: Plain text
9188 #: build/C/man2/shmctl.2:324 build/C/man2/shmop.2:200
9189 msgid "I<shmid> points to a removed identifier."
9190 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9191
9192 #. type: Plain text
9193 #: build/C/man2/shmctl.2:333
9194 msgid ""
9195 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9196 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9197 "to an array slot that is currently unused."
9198 msgstr ""
9199 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9200 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9201 "配列のスロットを参照していた。"
9202
9203 #. type: Plain text
9204 #: build/C/man2/shmctl.2:344
9205 msgid ""
9206 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9207 "be-locked segment would mean that the total bytes in locked shared memory "
9208 "segments would exceed the limit for the real user ID of the calling "
9209 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9210 "(see B<setrlimit>(2))."
9211 msgstr ""
9212 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9213 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9214 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9215 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9216
9217 #. type: Plain text
9218 #: build/C/man2/shmctl.2:349
9219 msgid ""
9220 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9221 "in the structure pointed to by I<buf>."
9222 msgstr ""
9223 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9224 "には大き過ぎる。"
9225
9226 #. type: Plain text
9227 #: build/C/man2/shmctl.2:361
9228 msgid ""
9229 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9230 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9231 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9232 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9233 msgstr ""
9234 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9235 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9236 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9237
9238 #. type: Plain text
9239 #: build/C/man2/shmctl.2:373
9240 msgid ""
9241 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9242 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9243 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9244 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9245 msgstr ""
9246 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9247 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9248 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9249 "が特権を持たない場合にも、このエラーが起こる。)"
9250
9251 #.  SVr4 documents an additional error condition EMFILE.
9252 #. type: Plain text
9253 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:234
9254 #: build/C/man2/shmop.2:234
9255 msgid "SVr4, POSIX.1-2001."
9256 msgstr "SVr4, POSIX.1-2001."
9257
9258 #.  Like Linux, the FreeBSD man pages still document
9259 #.  the inclusion of these header files.
9260 #. type: Plain text
9261 #: build/C/man2/shmctl.2:391 build/C/man2/shmget.2:250
9262 msgid ""
9263 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9264 "required on Linux or by any version of POSIX.  However, some old "
9265 "implementations required the inclusion of these header files, and the SVID "
9266 "also documented their inclusion.  Applications intended to be portable to "
9267 "such old systems may need to include these header files."
9268 msgstr "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらのインクルードをするように記載されている。このような古いシステムへの移植性を意図したアプリケーションではこれらのファイルをインクルードする必要があるかもしれない。"
9269
9270 #. type: Plain text
9271 #: build/C/man2/shmctl.2:402
9272 msgid ""
9273 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9274 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9275 "future these may modified or moved to a /proc file system interface."
9276 msgstr ""
9277 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9278 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9279 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9280
9281 #. type: Plain text
9282 #: build/C/man2/shmctl.2:410
9283 msgid ""
9284 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9285 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9286 "feature is not available on other UNIX implementations; portable "
9287 "applications should avoid relying on it."
9288 msgstr ""
9289 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9290 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9291 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9292 "プリケーションではこれに依存しないようにすべきである。"
9293
9294 #. type: Plain text
9295 #: build/C/man2/shmctl.2:423
9296 msgid ""
9297 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9298 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9299 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9300 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9301 msgstr ""
9302 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9303 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9304 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9305 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9306
9307 #. type: Plain text
9308 #: build/C/man2/shmctl.2:430
9309 msgid ""
9310 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9311 "B<svipc>(7)"
9312 msgstr ""
9313 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9314 "B<shm_overview>(7), B<svipc>(7)"
9315
9316 #. type: TH
9317 #: build/C/man2/shmget.2:38
9318 #, no-wrap
9319 msgid "SHMGET"
9320 msgstr "SHMGET"
9321
9322 #. type: TH
9323 #: build/C/man2/shmget.2:38
9324 #, no-wrap
9325 msgid "2012-05-31"
9326 msgstr "2012-05-31"
9327
9328 #. type: Plain text
9329 #: build/C/man2/shmget.2:41
9330 msgid "shmget - allocates a System V shared memory segment"
9331 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9332
9333 #. type: Plain text
9334 #: build/C/man2/shmget.2:48
9335 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9336 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9337
9338 #. type: Plain text
9339 #: build/C/man2/shmget.2:72
9340 msgid ""
9341 "B<shmget>()  returns the identifier of the System V shared memory segment "
9342 "associated with the value of the argument I<key>.  A new shared memory "
9343 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9344 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9345 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9346 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9347 msgstr "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさとなる。"
9348
9349 #. type: Plain text
9350 #: build/C/man2/shmget.2:91
9351 msgid ""
9352 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9353 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9354 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9355 "| O_EXCL> for B<open>(2).)"
9356 msgstr ""
9357 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9358 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9359 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9360 "O_EXCL> を指定した場合の動作と同じである)。"
9361
9362 #. type: Plain text
9363 #: build/C/man2/shmget.2:95
9364 msgid "The value I<shmflg> is composed of:"
9365 msgstr "I<shmflg> は以下の内容から構成される:"
9366
9367 #. type: TP
9368 #: build/C/man2/shmget.2:95
9369 #, no-wrap
9370 msgid "B<IPC_CREAT>"
9371 msgstr "B<IPC_CREAT>"
9372
9373 #. type: Plain text
9374 #: build/C/man2/shmget.2:102
9375 msgid ""
9376 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9377 "find the segment associated with I<key> and check to see if the user has "
9378 "permission to access the segment."
9379 msgstr ""
9380 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9381 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9382 "可があるかどうかをチェックする。"
9383
9384 #. type: TP
9385 #: build/C/man2/shmget.2:102
9386 #, no-wrap
9387 msgid "B<IPC_EXCL>"
9388 msgstr "B<IPC_EXCL>"
9389
9390 #. type: Plain text
9391 #: build/C/man2/shmget.2:105
9392 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9393 msgstr ""
9394 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9395 "証する。"
9396
9397 #. type: TP
9398 #: build/C/man2/shmget.2:105
9399 #, no-wrap
9400 msgid "I<mode_flags>"
9401 msgstr "I<mode_flags>"
9402
9403 #. type: Plain text
9404 #: build/C/man2/shmget.2:115
9405 msgid ""
9406 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9407 "group, and world.  These bits have the same format, and the same meaning, as "
9408 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9409 "not used by the system."
9410 msgstr ""
9411 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9412 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9413 "ろ、システムは実行 (execute) 許可を参照しない。"
9414
9415 #. type: TP
9416 #: build/C/man2/shmget.2:115
9417 #, no-wrap
9418 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9419 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9420
9421 #. type: Plain text
9422 #: build/C/man2/shmget.2:121
9423 msgid ""
9424 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9425 "I<Documentation/vm/hugetlbpage.txt> for further information."
9426 msgstr ""
9427 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9428 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9429
9430 #. type: TP
9431 #: build/C/man2/shmget.2:121
9432 #, no-wrap
9433 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9434 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9435
9436 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9437 #.  specified.
9438 #. type: Plain text
9439 #: build/C/man2/shmget.2:140
9440 msgid ""
9441 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9442 "Do not reserve swap space for this segment.  When swap space is reserved, "
9443 "one has the guarantee that it is possible to modify the segment.  When swap "
9444 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9445 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9446 "overcommit_memory> in B<proc>(5)."
9447 msgstr ""
9448 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9449 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9450 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9451 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9452 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9453 "ルに関する議論も参照のこと。"
9454
9455 #. type: Plain text
9456 #: build/C/man2/shmget.2:148
9457 msgid ""
9458 "When a new shared memory segment is created, its contents are initialized to "
9459 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9460 "(2)), is initialized as follows:"
9461 msgstr ""
9462 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9463 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9464 "期化される。"
9465
9466 #. type: Plain text
9467 #: build/C/man2/shmget.2:153
9468 msgid ""
9469 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9470 "calling process."
9471 msgstr ""
9472 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9473 "ユーザーID を設定する。"
9474
9475 #. type: Plain text
9476 #: build/C/man2/shmget.2:158
9477 msgid ""
9478 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9479 "the calling process."
9480 msgstr ""
9481 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9482 "定する。"
9483
9484 #. type: Plain text
9485 #: build/C/man2/shmget.2:163
9486 msgid ""
9487 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9488 "significant 9 bit of I<shmflg>."
9489 msgstr ""
9490 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9491
9492 #. type: Plain text
9493 #: build/C/man2/shmget.2:167
9494 msgid "I<shm_segsz> is set to the value of I<size>."
9495 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9496
9497 #. type: Plain text
9498 #: build/C/man2/shmget.2:174
9499 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9500 msgstr ""
9501 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9502
9503 #. type: Plain text
9504 #: build/C/man2/shmget.2:177
9505 msgid "I<shm_ctime> is set to the current time."
9506 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9507
9508 #. type: Plain text
9509 #: build/C/man2/shmget.2:180
9510 msgid ""
9511 "If the shared memory segment already exists, the permissions are verified, "
9512 "and a check is made to see if it is marked for destruction."
9513 msgstr ""
9514 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9515 "(destruction) マークがつけられていないかのチェックが行われる。"
9516
9517 #. type: Plain text
9518 #: build/C/man2/shmget.2:184
9519 msgid ""
9520 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
9521 msgstr ""
9522 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
9523 "が返される。"
9524
9525 #. type: Plain text
9526 #: build/C/man2/shmget.2:188
9527 msgid "On failure, I<errno> is set to one of the following:"
9528 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9529
9530 #. type: Plain text
9531 #: build/C/man2/shmget.2:194
9532 msgid ""
9533 "The user does not have permission to access the shared memory segment, and "
9534 "does not have the B<CAP_IPC_OWNER> capability."
9535 msgstr ""
9536 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9537 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9538
9539 #. type: Plain text
9540 #: build/C/man2/shmget.2:198
9541 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9542 msgstr ""
9543 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9544
9545 #. type: Plain text
9546 #: build/C/man2/shmget.2:204
9547 msgid ""
9548 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9549 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9550 "existed, but I<size> is greater than the size of that segment."
9551 msgstr ""
9552 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9553 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9554 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9555 "在するセグメントの サイズよりも大きかった。"
9556
9557 #. type: Plain text
9558 #: build/C/man2/shmget.2:213
9559 msgid ""
9560 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9561 msgstr ""
9562 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9563 "いなかった。"
9564
9565 #. type: Plain text
9566 #: build/C/man2/shmget.2:216
9567 msgid "No memory could be allocated for segment overhead."
9568 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9569
9570 #. type: Plain text
9571 #: build/C/man2/shmget.2:224
9572 msgid ""
9573 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9574 "segment of the requested I<size> would cause the system to exceed the system-"
9575 "wide limit on shared memory (B<SHMALL>)."
9576 msgstr ""
9577 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9578 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9579 "限 (B<SHMALL>)  を超過した。"
9580
9581 #. type: Plain text
9582 #: build/C/man2/shmget.2:231
9583 msgid ""
9584 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9585 "(did not have the B<CAP_IPC_LOCK> capability)."
9586 msgstr ""
9587 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9588 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9589
9590 #. type: Plain text
9591 #: build/C/man2/shmget.2:237
9592 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9593 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9594
9595 #. type: Plain text
9596 #: build/C/man2/shmget.2:260
9597 msgid ""
9598 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9599 "value is used for I<key>, the system call ignores everything but the least "
9600 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9601 "success)."
9602 msgstr ""
9603 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9604 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9605 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9606
9607 #. type: Plain text
9608 #: build/C/man2/shmget.2:264
9609 msgid ""
9610 "The following limits on shared memory segment resources affect the B<shmget>"
9611 "()  call:"
9612 msgstr ""
9613 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9614 "る:"
9615
9616 #. type: TP
9617 #: build/C/man2/shmget.2:264
9618 #, no-wrap
9619 msgid "B<SHMALL>"
9620 msgstr "B<SHMALL>"
9621
9622 #. type: Plain text
9623 #: build/C/man2/shmget.2:269
9624 msgid ""
9625 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9626 "and modified via I</proc/sys/kernel/shmall>)."
9627 msgstr ""
9628 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9629 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9630
9631 #. type: TP
9632 #: build/C/man2/shmget.2:269
9633 #, no-wrap
9634 msgid "B<SHMMAX>"
9635 msgstr "B<SHMMAX>"
9636
9637 #. type: Plain text
9638 #: build/C/man2/shmget.2:274
9639 msgid ""
9640 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9641 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9642 msgstr ""
9643 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9644 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9645
9646 #. type: TP
9647 #: build/C/man2/shmget.2:274
9648 #, no-wrap
9649 msgid "B<SHMMIN>"
9650 msgstr "B<SHMMIN>"
9651
9652 #. type: Plain text
9653 #: build/C/man2/shmget.2:280
9654 msgid ""
9655 "Minimum size in bytes for a shared memory segment: implementation dependent "
9656 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9657 msgstr ""
9658 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9659 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9660
9661 #. type: TP
9662 #: build/C/man2/shmget.2:280
9663 #, no-wrap
9664 msgid "B<SHMMNI>"
9665 msgstr "B<SHMMNI>"
9666
9667 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9668 #.  that we could create one more segment than SHMMNI -- MTK
9669 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9670 #. type: Plain text
9671 #: build/C/man2/shmget.2:289
9672 msgid ""
9673 "System wide maximum number of shared memory segments: implementation "
9674 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9675 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9676 msgstr ""
9677 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9678 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9679 "したり、変更したりできる)。"
9680
9681 #. type: Plain text
9682 #: build/C/man2/shmget.2:293
9683 msgid ""
9684 "The implementation has no specific limits for the per-process maximum number "
9685 "of shared memory segments (B<SHMSEG>)."
9686 msgstr ""
9687 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9688 "上の制限はない。"
9689
9690 #. type: Plain text
9691 #: build/C/man2/shmget.2:299
9692 msgid ""
9693 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9694 "shared memory segment scheduled for deletion."
9695 msgstr ""
9696 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9697 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9698
9699 #. type: Plain text
9700 #: build/C/man2/shmget.2:305
9701 msgid ""
9702 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9703 "more clearly show its function."
9704 msgstr ""
9705 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9706 "より明確にその機能を表しているだろう。"
9707
9708 #. type: Plain text
9709 #: build/C/man2/shmget.2:313
9710 msgid ""
9711 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9712 "B<shm_overview>(7), B<svipc>(7)"
9713 msgstr ""
9714 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9715 "B<shm_overview>(7), B<svipc>(7)"
9716
9717 #. type: TH
9718 #: build/C/man2/shmop.2:41
9719 #, no-wrap
9720 msgid "SHMOP"
9721 msgstr "SHMOP"
9722
9723 #. type: Plain text
9724 #: build/C/man2/shmop.2:44
9725 msgid "shmat, shmdt - System V shared memory operations"
9726 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
9727
9728 #. type: Plain text
9729 #: build/C/man2/shmop.2:48
9730 #, no-wrap
9731 msgid ""
9732 "B<#include E<lt>sys/types.hE<gt>>\n"
9733 "B<#include E<lt>sys/shm.hE<gt>>\n"
9734 msgstr ""
9735 "B<#include E<lt>sys/types.hE<gt>>\n"
9736 "B<#include E<lt>sys/shm.hE<gt>>\n"
9737
9738 #. type: Plain text
9739 #: build/C/man2/shmop.2:50
9740 #, no-wrap
9741 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9742 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9743
9744 #. type: Plain text
9745 #: build/C/man2/shmop.2:52
9746 #, no-wrap
9747 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9748 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9749
9750 #. type: Plain text
9751 #: build/C/man2/shmop.2:61
9752 msgid ""
9753 "B<shmat>()  attaches the System V shared memory segment identified by "
9754 "I<shmid> to the address space of the calling process.  The attaching address "
9755 "is specified by I<shmaddr> with one of the following criteria:"
9756 msgstr "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9757
9758 #. type: Plain text
9759 #: build/C/man2/shmop.2:67
9760 msgid ""
9761 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9762 "which to attach the segment."
9763 msgstr ""
9764 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9765 "されていない) アドレスを選択する。"
9766
9767 #. type: Plain text
9768 #: build/C/man2/shmop.2:82
9769 msgid ""
9770 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9771 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9772 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9773 "at which the attach occurs."
9774 msgstr ""
9775 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9776 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9777 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9778 "を指している必要がある。"
9779
9780 #. type: Plain text
9781 #: build/C/man2/shmop.2:92
9782 msgid ""
9783 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9784 "reading and the process must have read permission for the segment.  "
9785 "Otherwise the segment is attached for read and write and the process must "
9786 "have read and write permission for the segment.  There is no notion of a "
9787 "write-only shared memory segment."
9788 msgstr ""
9789 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9790 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9791 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9792 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9793 "の共有メモリ・セグメントという概念は存在しない。"
9794
9795 #. type: Plain text
9796 #: build/C/man2/shmop.2:107
9797 msgid ""
9798 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9799 "indicate that the mapping of the segment should replace any existing mapping "
9800 "in the range starting at I<shmaddr> and continuing for the size of the "
9801 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9802 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9803 msgstr ""
9804 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9805 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9806 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9807 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9808 "場合は、 I<shmaddr> が NULL であってはならない。"
9809
9810 #. type: Plain text
9811 #: build/C/man2/shmop.2:114
9812 msgid ""
9813 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9814 "The segment will automatically be detached at process exit.  The same "
9815 "segment may be attached as a read and as a read-write one, and more than "
9816 "once, in the process's address space."
9817 msgstr ""
9818 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9819 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9820 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9821 "複数回付加することもできる。"
9822
9823 #. type: Plain text
9824 #: build/C/man2/shmop.2:122
9825 msgid ""
9826 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9827 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9828 "follows:"
9829 msgstr ""
9830 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9831 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9832
9833 #. type: Plain text
9834 #: build/C/man2/shmop.2:125
9835 msgid "I<shm_atime> is set to the current time."
9836 msgstr "I<shm_atime> には現在の時刻を設定する。"
9837
9838 #. type: Plain text
9839 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9840 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9841 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9842
9843 #. type: Plain text
9844 #: build/C/man2/shmop.2:131
9845 msgid "I<shm_nattch> is incremented by one."
9846 msgstr "I<shm_nattch> を 1 増加させる。"
9847
9848 #. type: Plain text
9849 #: build/C/man2/shmop.2:142
9850 msgid ""
9851 "B<shmdt>()  detaches the shared memory segment located at the address "
9852 "specified by I<shmaddr> from the address space of the calling process.  The "
9853 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9854 "the value returned by the attaching B<shmat>()  call."
9855 msgstr ""
9856 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9857 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9858 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9859 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9860 "ない。"
9861
9862 #. type: Plain text
9863 #: build/C/man2/shmop.2:148
9864 msgid ""
9865 "On a successful B<shmdt>()  call the system updates the members of the "
9866 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9867 msgstr ""
9868 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9869 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9870
9871 #. type: Plain text
9872 #: build/C/man2/shmop.2:151
9873 msgid "I<shm_dtime> is set to the current time."
9874 msgstr "I<shm_dtime> には現在の時刻が設定される。"
9875
9876 #. type: Plain text
9877 #: build/C/man2/shmop.2:159
9878 msgid ""
9879 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
9880 "marked for deletion, the segment is deleted."
9881 msgstr ""
9882 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
9883 "セグメントは削除される。"
9884
9885 #. type: Plain text
9886 #: build/C/man2/shmop.2:163
9887 msgid ""
9888 "After a B<fork>(2)  the child inherits the attached shared memory segments."
9889 msgstr ""
9890 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
9891
9892 #. type: Plain text
9893 #: build/C/man2/shmop.2:167
9894 msgid ""
9895 "After an B<execve>(2)  all attached shared memory segments are detached from "
9896 "the process."
9897 msgstr ""
9898 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
9899 "される。"
9900
9901 #. type: Plain text
9902 #: build/C/man2/shmop.2:171
9903 msgid ""
9904 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
9905 "process."
9906 msgstr ""
9907 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
9908 "離される。"
9909
9910 #. type: Plain text
9911 #: build/C/man2/shmop.2:179
9912 msgid ""
9913 "On success B<shmat>()  returns the address of the attached shared memory "
9914 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
9915 "indicate the cause of the error."
9916 msgstr ""
9917 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
9918 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
9919 "値を設定する。"
9920
9921 #. type: Plain text
9922 #: build/C/man2/shmop.2:185
9923 msgid ""
9924 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
9925 "set to indicate the cause of the error."
9926 msgstr ""
9927 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
9928 "ラーの原因を示す値を設定する。"
9929
9930 #. type: Plain text
9931 #: build/C/man2/shmop.2:191
9932 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
9933 msgstr ""
9934 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
9935
9936 #. type: Plain text
9937 #: build/C/man2/shmop.2:197
9938 msgid ""
9939 "The calling process does not have the required permissions for the requested "
9940 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
9941 msgstr ""
9942 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
9943 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
9944
9945 #. type: Plain text
9946 #: build/C/man2/shmop.2:214
9947 msgid ""
9948 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
9949 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
9950 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
9951 msgstr ""
9952 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
9953 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
9954 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
9955 "れているが、 I<shmaddr> が NULL であった。"
9956
9957 #. type: Plain text
9958 #: build/C/man2/shmop.2:217
9959 msgid "Could not allocate memory for the descriptor or for the page tables."
9960 msgstr ""
9961 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
9962 "とができない。"
9963
9964 #. type: Plain text
9965 #: build/C/man2/shmop.2:223
9966 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
9967 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
9968
9969 #.  The following since 2.6.17-rc1:
9970 #. type: Plain text
9971 #: build/C/man2/shmop.2:231
9972 msgid ""
9973 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
9974 "not aligned on a page boundary."
9975 msgstr ""
9976 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
9977 "I<shmaddr> がページ境界に合っていない。"
9978
9979 #. type: Plain text
9980 #: build/C/man2/shmop.2:250
9981 msgid ""
9982 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
9983 "changed from I<char *> into I<const void *>, and the returned type of "
9984 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
9985 "I<char *> prototypes; glibc2 has I<void *>.)"
9986 msgstr ""
9987 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
9988 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
9989 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
9990 "glibc2 のプロトタイプは I<void *> である)。"
9991
9992 #. type: Plain text
9993 #: build/C/man2/shmop.2:262
9994 msgid ""
9995 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
9996 "way of attaching a shared memory segment.  Be aware that the shared memory "
9997 "segment attached in this way may be attached at different addresses in "
9998 "different processes.  Therefore, any pointers maintained within the shared "
9999 "memory must be made relative (typically to the starting address of the "
10000 "segment), rather than absolute."
10001 msgstr ""
10002 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10003 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10004 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10005 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10006 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10007 "る。"
10008
10009 #. type: Plain text
10010 #: build/C/man2/shmop.2:267
10011 msgid ""
10012 "On Linux, it is possible to attach a shared memory segment even if it is "
10013 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10014 "behavior and many other implementations do not support it."
10015 msgstr ""
10016 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10017 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10018 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10019
10020 #. type: Plain text
10021 #: build/C/man2/shmop.2:270
10022 msgid "The following system parameter affects B<shmat>():"
10023 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10024
10025 #.  FIXME A good explanation of the rationale for the existence
10026 #.  of SHMLBA would be useful here
10027 #. type: TP
10028 #: build/C/man2/shmop.2:270
10029 #, no-wrap
10030 msgid "B<SHMLBA>"
10031 msgstr "B<SHMLBA>"
10032
10033 #.  FIXME That last sentence isn't true for all Linux
10034 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10035 #.  -- MTK, Nov 04
10036 #. type: Plain text
10037 #: build/C/man2/shmop.2:283
10038 msgid ""
10039 "Segment low boundary address multiple.  Must be page aligned.  For the "
10040 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10041 msgstr ""
10042 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10043 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10044
10045 #. type: Plain text
10046 #: build/C/man2/shmop.2:287
10047 msgid ""
10048 "The implementation places no intrinsic limit on the per-process maximum "
10049 "number of shared memory segments (B<SHMSEG>)."
10050 msgstr ""
10051 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10052 "関する実装依存の制限はない。"
10053
10054 #. type: Plain text
10055 #: build/C/man2/shmop.2:295
10056 msgid ""
10057 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10058 "B<shm_overview>(7), B<svipc>(7)"
10059 msgstr ""
10060 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10061 "B<shm_overview>(7), B<svipc>(7)"
10062
10063 #. type: TH
10064 #: build/C/man2/subpage_prot.2:30
10065 #, no-wrap
10066 msgid "SUBPAGE_PROT"
10067 msgstr "SUBPAGE_PROT"
10068
10069 #. type: TH
10070 #: build/C/man2/subpage_prot.2:30
10071 #, no-wrap
10072 msgid "2012-07-13"
10073 msgstr "2012-07-13"
10074
10075 #. type: Plain text
10076 #: build/C/man2/subpage_prot.2:33
10077 msgid "subpage_prot - define a subpage protection for an address range"
10078 msgstr ""
10079
10080 #. type: Plain text
10081 #: build/C/man2/subpage_prot.2:37
10082 #, no-wrap
10083 msgid ""
10084 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10085 "B<                  uint32_t *>I<map>B<);>\n"
10086 msgstr ""
10087 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10088 "B<                  uint32_t *>I<map>B<);>\n"
10089
10090 #. type: Plain text
10091 #: build/C/man2/subpage_prot.2:41
10092 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10093 msgstr ""
10094 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10095 "を参照。"
10096
10097 #. type: Plain text
10098 #: build/C/man2/subpage_prot.2:47
10099 msgid ""
10100 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10101 "control the access permissions on individual 4kB subpages on systems "
10102 "configured with a page size of 64kB."
10103 msgstr ""
10104
10105 #. type: Plain text
10106 #: build/C/man2/subpage_prot.2:54
10107 msgid ""
10108 "The protection map is applied to the memory pages in the region starting at "
10109 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10110 "aligned to a 64-kB boundary."
10111 msgstr ""
10112
10113 #. type: Plain text
10114 #: build/C/man2/subpage_prot.2:66
10115 msgid ""
10116 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10117 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10118 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10119 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10120 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10121 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10122 msgstr ""
10123
10124 #. type: Plain text
10125 #: build/C/man2/subpage_prot.2:71
10126 msgid ""
10127 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10128 "specified below is returned."
10129 msgstr ""
10130
10131 #. type: Plain text
10132 #: build/C/man2/subpage_prot.2:77
10133 msgid "The buffer referred to by I<map> is not accessible."
10134 msgstr ""
10135
10136 #. type: Plain text
10137 #: build/C/man2/subpage_prot.2:87
10138 msgid ""
10139 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10140 "be aligned to a multiple of the system page size, and they must not refer to "
10141 "a region outside of the address space of the process or to a region that "
10142 "consists of huge pages."
10143 msgstr ""
10144
10145 #. type: Plain text
10146 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10147 msgid "Out of memory."
10148 msgstr "メモリ不足である。"
10149
10150 #. type: Plain text
10151 #: build/C/man2/subpage_prot.2:96
10152 msgid ""
10153 "This system call is provided on the PowerPC architecture since Linux "
10154 "2.6.25.  The system call is provided only if the kernel is configured with "
10155 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10156 msgstr ""
10157
10158 #. type: Plain text
10159 #: build/C/man2/subpage_prot.2:101
10160 msgid ""
10161 "Glibc does not provide a wrapper for this system call; call it using "
10162 "B<syscall>(2)."
10163 msgstr ""
10164
10165 #. type: Plain text
10166 #: build/C/man2/subpage_prot.2:106
10167 msgid ""
10168 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10169 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10170 "field won't allow writes to a page that is otherwise write-protected."
10171 msgstr ""
10172
10173 #. type: SS
10174 #: build/C/man2/subpage_prot.2:106
10175 #, no-wrap
10176 msgid "Rationale"
10177 msgstr ""
10178
10179 #.  In the initial implementation, it was the case that:
10180 #.      In fact the whole process is switched to use 4k hardware pages when the
10181 #.      subpage_prot system call is used, but this could be improved in future
10182 #.      to switch only the affected segments.
10183 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10184 #.  the affected segment, not the whole process.
10185 #. type: Plain text
10186 #: build/C/man2/subpage_prot.2:128
10187 msgid ""
10188 "This system call is provided to assist writing emulators that operate using "
10189 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10190 "uses a smaller page size, the emulator can no longer use the memory-"
10191 "management unit (MMU)  and normal system calls for controlling page "
10192 "protections.  (The emulator could emulate the MMU by checking and possibly "
10193 "remapping the address for each memory access in software, but that is "
10194 "slow.)  The idea is that the emulator supplies an array of protection masks "
10195 "to apply to a specified range of virtual addresses.  These masks are applied "
10196 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10197 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10198 "affected.  Implicit in this is that the regions of the address space that "
10199 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10200 "hardware pages (on machines with hardware 64-kB page support)."
10201 msgstr ""
10202
10203 #. type: Plain text
10204 #: build/C/man2/subpage_prot.2:131
10205 msgid "B<mprotect>(2), B<syscall>(2)"
10206 msgstr "B<mprotect>(2), B<syscall>(2)"
10207
10208 #. type: Plain text
10209 #: build/C/man2/subpage_prot.2:134
10210 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10211 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10212
10213 #. type: TH
10214 #: build/C/man2/sync_file_range.2:30
10215 #, no-wrap
10216 msgid "SYNC_FILE_RANGE"
10217 msgstr "SYNC_FILE_RANGE"
10218
10219 #. type: Plain text
10220 #: build/C/man2/sync_file_range.2:33
10221 msgid "sync_file_range - sync a file segment with disk"
10222 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10223
10224 #. type: Plain text
10225 #: build/C/man2/sync_file_range.2:37
10226 #, no-wrap
10227 msgid ""
10228 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10229 "B<#include E<lt>fcntl.hE<gt>>\n"
10230 msgstr ""
10231 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10232 "B<#include E<lt>fcntl.hE<gt>>\n"
10233
10234 #. type: Plain text
10235 #: build/C/man2/sync_file_range.2:40
10236 #, no-wrap
10237 msgid ""
10238 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10239 "B<                    unsigned int >I<flags>B<);>\n"
10240 msgstr ""
10241 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10242 "B<                    unsigned int >I<flags>B<);>\n"
10243
10244 #. type: Plain text
10245 #: build/C/man2/sync_file_range.2:47
10246 msgid ""
10247 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10248 "referred to by the file descriptor I<fd> with disk."
10249 msgstr ""
10250 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10251 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10252
10253 #. type: Plain text
10254 #: build/C/man2/sync_file_range.2:61
10255 msgid ""
10256 "I<offset> is the starting byte of the file range to be synchronized.  "
10257 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10258 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10259 "are synchronized.  Synchronization is in units of the system page size: "
10260 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10261 "rounded up to a page boundary."
10262 msgstr ""
10263 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10264 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10265 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10266 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10267 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10268
10269 #. type: Plain text
10270 #: build/C/man2/sync_file_range.2:65
10271 msgid "The I<flags> bit-mask argument can include any of the following values:"
10272 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10273
10274 #. type: TP
10275 #: build/C/man2/sync_file_range.2:65
10276 #, no-wrap
10277 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10278 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10279
10280 #. type: Plain text
10281 #: build/C/man2/sync_file_range.2:70
10282 msgid ""
10283 "Wait upon write-out of all pages in the specified range that have already "
10284 "been submitted to the device driver for write-out before performing any "
10285 "write."
10286 msgstr ""
10287 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10288 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10289 "つ。"
10290
10291 #. type: TP
10292 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10293 #, no-wrap
10294 msgid "B<SYNC_FILE_RANGE_WRITE>"
10295 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10296
10297 #. type: Plain text
10298 #: build/C/man2/sync_file_range.2:76
10299 msgid ""
10300 "Initiate write-out of all dirty pages in the specified range which are not "
10301 "presently submitted write-out.  Note that even this may block if you attempt "
10302 "to write more than request queue size."
10303 msgstr ""
10304 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10305 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10306 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10307 "る点に注意すること。"
10308
10309 #. type: TP
10310 #: build/C/man2/sync_file_range.2:76
10311 #, no-wrap
10312 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10313 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10314
10315 #. type: Plain text
10316 #: build/C/man2/sync_file_range.2:80
10317 msgid ""
10318 "Wait upon write-out of all pages in the range after performing any write."
10319 msgstr ""
10320 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10321 "つ。"
10322
10323 #. type: Plain text
10324 #: build/C/man2/sync_file_range.2:84
10325 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10326 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10327
10328 #. type: SS
10329 #: build/C/man2/sync_file_range.2:84
10330 #, no-wrap
10331 msgid "Warning"
10332 msgstr "警告"
10333
10334 #. type: Plain text
10335 #: build/C/man2/sync_file_range.2:100
10336 msgid ""
10337 "This system call is extremely dangerous and should not be used in portable "
10338 "programs.  None of these operations writes out the file's metadata.  "
10339 "Therefore, unless the application is strictly performing overwrites of "
10340 "already-instantiated disk blocks, there are no guarantees that the data will "
10341 "be available after a crash.  There is no user interface to know if a write "
10342 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10343 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10344 "When writing into preallocated space, many file systems also require calls "
10345 "into the block allocator, which this system call does not sync out to disk.  "
10346 "This system call does not flush disk write caches and thus does not provide "
10347 "any data integrity on systems with volatile disk write caches."
10348 msgstr ""
10349 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10350 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10351 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10352 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10353 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10354 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10355 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10356 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10357 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10358 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10359 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10360 "コールではデータの一貫性を確保できないことになる。"
10361
10362 #. type: SS
10363 #: build/C/man2/sync_file_range.2:100
10364 #, no-wrap
10365 msgid "Some details"
10366 msgstr "詳細"
10367
10368 #. type: Plain text
10369 #: build/C/man2/sync_file_range.2:108
10370 msgid ""
10371 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10372 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10373 msgstr ""
10374 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10375 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10376
10377 #. type: Plain text
10378 #: build/C/man2/sync_file_range.2:112
10379 msgid "Useful combinations of the I<flags> bits are:"
10380 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10381
10382 #. type: TP
10383 #: build/C/man2/sync_file_range.2:112
10384 #, no-wrap
10385 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10386 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10387
10388 #. type: Plain text
10389 #: build/C/man2/sync_file_range.2:120
10390 msgid ""
10391 "Ensures that all pages in the specified range which were dirty when "
10392 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10393 "start-write-for-data-integrity operation."
10394 msgstr ""
10395 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10396 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10397 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10398 "ある。"
10399
10400 #. type: Plain text
10401 #: build/C/man2/sync_file_range.2:127
10402 msgid ""
10403 "Start write-out of all dirty pages in the specified range which are not "
10404 "presently under write-out.  This is an asynchronous flush-to-disk "
10405 "operation.  This is not suitable for data integrity operations."
10406 msgstr ""
10407 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10408 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10409 "る。データ完全性確保が必要な操作としては適切ではない。"
10410
10411 #. type: TP
10412 #: build/C/man2/sync_file_range.2:127
10413 #, no-wrap
10414 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10415 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10416
10417 #. type: Plain text
10418 #: build/C/man2/sync_file_range.2:134
10419 msgid ""
10420 "Wait for completion of write-out of all pages in the specified range.  This "
10421 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10422 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10423 "and obtain its result."
10424 msgstr ""
10425 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10426 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10427 "き、この操作の完了を待ち、結果を取得することができる。"
10428
10429 #. type: TP
10430 #: build/C/man2/sync_file_range.2:134
10431 #, no-wrap
10432 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10433 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10434
10435 #. type: Plain text
10436 #: build/C/man2/sync_file_range.2:141
10437 msgid ""
10438 "This is a write-for-data-integrity operation that will ensure that all pages "
10439 "in the specified range which were dirty when B<sync_file_range>()  was "
10440 "called are committed to disk."
10441 msgstr ""
10442 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10443 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10444 "のページが ディスクに格納されることが保証される。"
10445
10446 #. type: Plain text
10447 #: build/C/man2/sync_file_range.2:147
10448 msgid ""
10449 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10450 "I<errno> is set to indicate the error."
10451 msgstr ""
10452 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10453 "I<error> にエラーを示す値を設定する。"
10454
10455 #. type: Plain text
10456 #: build/C/man2/sync_file_range.2:152
10457 msgid "I<fd> is not a valid file descriptor."
10458 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10459
10460 #. type: Plain text
10461 #: build/C/man2/sync_file_range.2:160
10462 msgid ""
10463 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10464 msgstr ""
10465 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10466 "である。"
10467
10468 #. type: Plain text
10469 #: build/C/man2/sync_file_range.2:163
10470 msgid "I/O error."
10471 msgstr "I/O エラー。"
10472
10473 #. type: Plain text
10474 #: build/C/man2/sync_file_range.2:169
10475 msgid "Out of disk space."
10476 msgstr "ディスク領域不足である。"
10477
10478 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10479 #.  (In user space at least) it isn't possible to obtain a file descriptor
10480 #.  for a symbolic link.
10481 #. type: Plain text
10482 #: build/C/man2/sync_file_range.2:177
10483 msgid ""
10484 "I<fd> refers to something other than a regular file, a block device, a "
10485 "directory, or a symbolic link."
10486 msgstr ""
10487 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10488 "以外のものを指している。"
10489
10490 #. type: Plain text
10491 #: build/C/man2/sync_file_range.2:180
10492 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10493 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10494
10495 #. type: Plain text
10496 #: build/C/man2/sync_file_range.2:183
10497 msgid ""
10498 "This system call is Linux-specific, and should be avoided in portable "
10499 "programs."
10500 msgstr ""
10501 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10502 "けるべきである。"
10503
10504 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10505 #. type: Plain text
10506 #: build/C/man2/sync_file_range.2:200
10507 msgid ""
10508 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10509 "in a suitable pair of registers.  On such architectures, the call signature "
10510 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10511 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10512 "(2)  for details.)  Therefore, these architectures define a different system "
10513 "call that orders the arguments suitably:"
10514 msgstr "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステムコールが定義されている。"
10515
10516 #. type: Plain text
10517 #: build/C/man2/sync_file_range.2:205
10518 #, no-wrap
10519 msgid ""
10520 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10521 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10522 msgstr ""
10523 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10524 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10525
10526 #. type: Plain text
10527 #: build/C/man2/sync_file_range.2:210
10528 msgid ""
10529 "The behavior of this system call is otherwise exactly the same as "
10530 "B<sync_file_range>()."
10531 msgstr ""
10532 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10533 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10534 "glibc では提供されていない。"
10535
10536 #. type: Plain text
10537 #: build/C/man2/sync_file_range.2:221
10538 msgid ""
10539 "A system call with this signature first appeared on the ARM architecture in "
10540 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10541 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10542 "architectures where glibc support is provided, glibc transparently wraps "
10543 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10544 msgstr ""
10545 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10546 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10547 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10548 "システムコールの名前が変更された。\n"
10549 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10550 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10551 "B<sync_file_range2>() を適切に使用するようになっている。"
10552
10553 #. type: Plain text
10554 #: build/C/man2/sync_file_range.2:226
10555 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10556 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10557
10558 #~ msgid ""
10559 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10560 #~ "pair of registers.  On this architecture, the call signature of "
10561 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10562 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10563 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10564 #~ "suitably:"
10565 #~ msgstr ""
10566 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10567 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10568 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10569 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10570 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10571 #~ "システムコールが定義されている。"
10572
10573 #~ msgid ""
10574 #~ "The behavior of this system call is otherwise exactly the same as "
10575 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10576 #~ "in glibc."
10577 #~ msgstr ""
10578 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10579 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10580 #~ "では提供されていない。"
10581
10582 #~ msgid ""
10583 #~ "The I<mode> is not supported by the file system containing the file "
10584 #~ "referred to by I<fd>."
10585 #~ msgstr ""
10586 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10587 #~ "ない。"
10588
10589 #~ msgid ""
10590 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10591 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10592 #~ msgstr ""
10593 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10594 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10595
10596 #~ msgid ""
10597 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10598 #~ "()  writes its output.  This file must be writable to the user or "
10599 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10600 #~ "truncated."
10601 #~ msgstr ""
10602 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10603 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10604 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10605 #~ "イルの元の内容を上書きする。"
10606
10607 #~ msgid ""
10608 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10609 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10610 #~ msgstr ""
10611 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10612 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10613 #~ "リプトが付属している。"
10614
10615 #~ msgid ""
10616 #~ "This flag allocates and initializes to zero the disk space within the "
10617 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10618 #~ "subsequent writes into this range are guaranteed not to fail because of "
10619 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10620 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10621 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10622 #~ "less than I<offset>+I<len>."
10623 #~ msgstr ""
10624 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10625 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10626 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10627 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10628 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10629 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10630 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10631 #~ "は変更されることはない。"
10632
10633 #~ msgid ""
10634 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10635 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10636 #~ msgstr ""
10637 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10638 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10639
10640 #~ msgid ""
10641 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10642 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10643 #~ "required."
10644 #~ msgstr ""
10645 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10646 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10647 #~ "が必要である。"
10648
10649 #~ msgid ""
10650 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10651 #~ "provided since version 2.2."
10652 #~ msgstr ""
10653 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10654 #~ "glibc バージョン 2.2 以降で行われている。"