OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[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-08-15 19:32+0900\n"
10 "PO-Revision-Date: 2013-08-15 20:31+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:171
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:119 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:55 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:180
277 #: build/C/man2/shmctl.2:301 build/C/man2/shmget.2:185
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:158
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:199
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:63 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:251
335 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:373
336 #: build/C/man2/shmget.2:232 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:65
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:257 build/C/man7/shm_overview.7:103
362 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:238
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:157
392 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:207
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:262 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:124 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:282
404 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:430
405 #: build/C/man2/shmget.2:314 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:164
413 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:214
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:269 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:131 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:289
425 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:437
426 #: build/C/man2/shmget.2:321 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.53 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.53 の一部\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 "2013-05-12"
447 msgstr "2013-05-12"
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<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
557 "included.  Otherwise (without an -ansi or -std=c* option) the glibc version "
558 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
559 "the lines:"
560 msgstr ""
561 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
562 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
563 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
564 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
565 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
566 "インクルードするが、このファイルには以下の行が含まれており、"
567
568 #. type: Plain text
569 #: build/C/man3/alloca.3:129
570 #, no-wrap
571 msgid ""
572 "    #ifdef  __GNUC__\n"
573 "    #define alloca(size)   __builtin_alloca (size)\n"
574 "    #endif\n"
575 msgstr ""
576 "    #ifdef  __GNUC__\n"
577 "    #define alloca(size)   __builtin_alloca (size)\n"
578 "    #endif\n"
579
580 #. type: Plain text
581 #: build/C/man3/alloca.3:132
582 msgid "with messy consequences if one has a private version of this function."
583 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
584
585 #. type: Plain text
586 #: build/C/man3/alloca.3:136
587 msgid ""
588 "The fact that the code is inlined means that it is impossible to take the "
589 "address of this function, or to change its behavior by linking with a "
590 "different library."
591 msgstr ""
592 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
593 "のライブラリをリンクして動作を変更することはできない。"
594
595 #. type: Plain text
596 #: build/C/man3/alloca.3:140
597 msgid ""
598 "The inlined code often consists of a single instruction adjusting the stack "
599 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
600 "error return."
601 msgstr ""
602 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
603 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
604 "よって NULL エラーが返されることはない。"
605
606 #. type: SH
607 #: build/C/man3/alloca.3:140 build/C/man2/cacheflush.2:82
608 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
609 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
610 #: build/C/man2/posix_fadvise.2:186 build/C/man2/shmget.2:300
611 #, no-wrap
612 msgid "BUGS"
613 msgstr "バグ"
614
615 #. type: Plain text
616 #: build/C/man3/alloca.3:145
617 msgid ""
618 "There is no error indication if the stack frame cannot be extended.  "
619 "(However, after a failed allocation, the program is likely to receive a "
620 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
621 msgstr ""
622 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
623 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
624 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
625
626 #. type: Plain text
627 #: build/C/man3/alloca.3:153
628 msgid ""
629 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
630 "a function call, because the stack space reserved by B<alloca>()  would "
631 "appear on the stack in the middle of the space for the function arguments."
632 msgstr ""
633 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
634 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
635 "使われるスタック領域の中に現れてしまうためである。"
636
637 #. type: SH
638 #: build/C/man3/alloca.3:153 build/C/man2/fallocate.2:202
639 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
640 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
641 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
642 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
643 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
644 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
645 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
646 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:167
647 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
648 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:97
649 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:271
650 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:423
651 #: build/C/man2/shmget.2:306 build/C/man2/shmop.2:287
652 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
653 #, no-wrap
654 msgid "SEE ALSO"
655 msgstr "関連項目"
656
657 #. type: Plain text
658 #: build/C/man3/alloca.3:157
659 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
660 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
661
662 #. type: TH
663 #: build/C/man2/cacheflush.2:25
664 #, no-wrap
665 msgid "CACHEFLUSH"
666 msgstr "CACHEFLUSH"
667
668 #. type: TH
669 #: build/C/man2/cacheflush.2:25
670 #, no-wrap
671 msgid "2007-05-26"
672 msgstr "2007-05-26"
673
674 #. type: Plain text
675 #: build/C/man2/cacheflush.2:28
676 msgid "cacheflush - flush contents of instruction and/or data cache"
677 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
678
679 #. type: Plain text
680 #: build/C/man2/cacheflush.2:31
681 #, no-wrap
682 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
683 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
684
685 #. type: Plain text
686 #: build/C/man2/cacheflush.2:33
687 #, no-wrap
688 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
689 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
690
691 #. type: Plain text
692 #: build/C/man2/cacheflush.2:43
693 msgid ""
694 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
695 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
696 "of:"
697 msgstr ""
698 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
699 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
700 "指定する:"
701
702 #. type: TP
703 #: build/C/man2/cacheflush.2:43
704 #, no-wrap
705 msgid "B<ICACHE>"
706 msgstr "B<ICACHE>"
707
708 #. type: Plain text
709 #: build/C/man2/cacheflush.2:46
710 msgid "Flush the instruction cache."
711 msgstr "命令 (instruction) キャッシュをフラッシュする。"
712
713 #. type: TP
714 #: build/C/man2/cacheflush.2:46
715 #, no-wrap
716 msgid "B<DCACHE>"
717 msgstr "B<DCACHE>"
718
719 #. type: Plain text
720 #: build/C/man2/cacheflush.2:49
721 msgid "Write back to memory and invalidate the affected valid cache lines."
722 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
723
724 #. type: TP
725 #: build/C/man2/cacheflush.2:49
726 #, no-wrap
727 msgid "B<BCACHE>"
728 msgstr "B<BCACHE>"
729
730 #. type: Plain text
731 #: build/C/man2/cacheflush.2:53
732 msgid "Same as B<(ICACHE|DCACHE)>."
733 msgstr "B<(ICACHE|DCACHE)> と同じ。"
734
735 #. type: Plain text
736 #: build/C/man2/cacheflush.2:59
737 msgid ""
738 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
739 "detected, I<errno> will indicate the error."
740 msgstr ""
741 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
742 "出された場合は I<errno> にエラーが指示される。"
743
744 #. type: TP
745 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
746 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:310
747 #: build/C/man2/subpage_prot.2:72
748 #, no-wrap
749 msgid "B<EFAULT>"
750 msgstr "B<EFAULT>"
751
752 #. type: Plain text
753 #: build/C/man2/cacheflush.2:67
754 msgid ""
755 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
756 "accessible."
757 msgstr ""
758 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
759 "能ではない。"
760
761 #. type: TP
762 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:131
763 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
764 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
765 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
766 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
767 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
768 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
769 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
770 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
771 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:324
772 #: build/C/man2/shmget.2:199 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
773 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
774 #, no-wrap
775 msgid "B<EINVAL>"
776 msgstr "B<EINVAL>"
777
778 #. type: Plain text
779 #: build/C/man2/cacheflush.2:75
780 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
781 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
782
783 #.  FIXME This system call was only on MIPS back in 1.2 days, but
784 #.  by now it is on a number of other architectures (but not i386).
785 #.  Investigate the details and update this page.
786 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
787 #. type: Plain text
788 #: build/C/man2/cacheflush.2:82
789 msgid ""
790 "This Linux-specific system call is available only on MIPS-based systems.  It "
791 "should not be used in programs intended to be portable."
792 msgstr ""
793 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
794 "植を意図したプログラムで使用すべきではない。"
795
796 #. type: Plain text
797 #: build/C/man2/cacheflush.2:89
798 msgid ""
799 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
800 "Therefore, the whole cache is always flushed."
801 msgstr ""
802 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
803 "のキャッシュがフラッシュされる。"
804
805 #. type: TH
806 #: build/C/man2/fallocate.2:11
807 #, no-wrap
808 msgid "FALLOCATE"
809 msgstr "FALLOCATE"
810
811 #. type: TH
812 #: build/C/man2/fallocate.2:11
813 #, no-wrap
814 msgid "2013-06-10"
815 msgstr "2013-06-10"
816
817 #. type: Plain text
818 #: build/C/man2/fallocate.2:14
819 msgid "fallocate - manipulate file space"
820 msgstr "fallocate - ファイル空間の操作"
821
822 #. type: Plain text
823 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
824 #, no-wrap
825 msgid ""
826 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
827 "B<#include E<lt>fcntl.hE<gt>>\n"
828 msgstr ""
829 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
830 "B<#include E<lt>fcntl.hE<gt>>\n"
831
832 #. type: Plain text
833 #: build/C/man2/fallocate.2:21
834 #, no-wrap
835 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
836 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
837
838 #. type: Plain text
839 #: build/C/man2/fallocate.2:27
840 msgid ""
841 "This is a nonportable, Linux-specific system call.  For the portable, "
842 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
843 "B<posix_fallocate>(3)."
844 msgstr ""
845 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
846 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
847 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
848
849 #. type: Plain text
850 #: build/C/man2/fallocate.2:37
851 msgid ""
852 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
853 "space for the file referred to by I<fd> for the byte range starting at "
854 "I<offset> and continuing for I<len> bytes."
855 msgstr ""
856 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
857 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
858 "域である。"
859
860 #. type: Plain text
861 #: build/C/man2/fallocate.2:42
862 msgid ""
863 "The I<mode> argument determines the operation to be performed on the given "
864 "range.  Details of the supported operations are given in the subsections "
865 "below."
866 msgstr ""
867 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
868 "サポートされている操作の詳細は以下のサブセクションで説明する。"
869
870 #. type: SS
871 #: build/C/man2/fallocate.2:42
872 #, no-wrap
873 msgid "Allocating disk space"
874 msgstr "ディスク領域の割り当て"
875
876 #. type: Plain text
877 #: build/C/man2/fallocate.2:61
878 msgid ""
879 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
880 "and initializes to zero the disk space within the range specified by "
881 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
882 "changed if I<offset>+I<len> is greater than the file size.  This default "
883 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
884 "library function, and is intended as a method of optimally implementing that "
885 "function."
886 msgstr ""
887 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
888 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
889 "う。\n"
890 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
891 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
892 "は、\n"
893 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
894 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
895 "ことを目的としているからである。"
896
897 #. type: Plain text
898 #: build/C/man2/fallocate.2:67
899 msgid ""
900 "After a successful call, subsequent writes into the range specified by "
901 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
902 "space."
903 msgstr ""
904 "呼び出しが成功した場合、\n"
905 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
906 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
907
908 #. type: Plain text
909 #: build/C/man2/fallocate.2:78
910 msgid ""
911 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
912 "the call is similar, but the file size will not be changed even if I<offset>"
913 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
914 "the end of the file in this manner is useful for optimizing append workloads."
915 msgstr ""
916 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
917 "ル\n"
918 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
919 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
920 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
921 "追記を最適化したい場合に役に立つ。"
922
923 #. type: Plain text
924 #: build/C/man2/fallocate.2:82
925 msgid ""
926 "Because allocation is done in block size chunks, B<fallocate>()  may "
927 "allocate a larger range of disk space than was specified."
928 msgstr ""
929 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
930 "り\n"
931 "も大きなディスク領域を割り当てることがある。"
932
933 #. type: SS
934 #: build/C/man2/fallocate.2:82
935 #, no-wrap
936 msgid "Deallocating file space"
937 msgstr "ファイル空間の割り当て解除"
938
939 #. type: Plain text
940 #: build/C/man2/fallocate.2:97
941 msgid ""
942 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
943 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
944 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
945 "range, partial file system blocks are zeroed, and whole file system blocks "
946 "are removed from the file.  After a successful call, subsequent reads from "
947 "this range will return zeroes."
948 msgstr ""
949 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
950 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
951 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
952 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
953 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
954 "を返す。"
955
956 #. type: Plain text
957 #: build/C/man2/fallocate.2:108
958 msgid ""
959 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
960 "I<mode>; in other words, even when punching off the end of the file, the "
961 "file size (as reported by B<stat>(2))  does not change."
962 msgstr ""
963 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
964 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
965 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
966
967 #. type: Plain text
968 #: build/C/man2/fallocate.2:112
969 msgid ""
970 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
971 "doesn't support the operation, an error is returned."
972 msgstr ""
973 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
974 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
975 "る。"
976
977 #. type: Plain text
978 #: build/C/man2/fallocate.2:119
979 msgid ""
980 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
981 "I<errno> is set to indicate the error."
982 msgstr ""
983 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
984 "にエラーを示す値を設定する。"
985
986 #. type: TP
987 #: build/C/man2/fallocate.2:120 build/C/man2/madvise.2:279
988 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
989 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
990 #: build/C/man2/sync_file_range.2:148
991 #, no-wrap
992 msgid "B<EBADF>"
993 msgstr "B<EBADF>"
994
995 #. type: Plain text
996 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
997 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
998 msgstr ""
999 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1000 "いない。"
1001
1002 #. type: TP
1003 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
1004 #, no-wrap
1005 msgid "B<EFBIG>"
1006 msgstr "B<EFBIG>"
1007
1008 #. type: Plain text
1009 #: build/C/man2/fallocate.2:128
1010 msgid "I<offset>+I<len> exceeds the maximum file size."
1011 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1012
1013 #. type: TP
1014 #: build/C/man2/fallocate.2:128
1015 #, no-wrap
1016 msgid "B<EINTR>"
1017 msgstr "B<EINTR>"
1018
1019 #. type: Plain text
1020 #: build/C/man2/fallocate.2:131
1021 msgid "A signal was caught during execution."
1022 msgstr "実行中にシグナルが捕捉された。"
1023
1024 #. type: Plain text
1025 #: build/C/man2/fallocate.2:143 build/C/man3/posix_fallocate.3:87
1026 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1027 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1028
1029 #. type: TP
1030 #: build/C/man2/fallocate.2:143 build/C/man2/madvise.2:310
1031 #: build/C/man2/sync_file_range.2:160
1032 #, no-wrap
1033 msgid "B<EIO>"
1034 msgstr "B<EIO>"
1035
1036 #. type: Plain text
1037 #: build/C/man2/fallocate.2:146
1038 msgid "An I/O error occurred while reading from or writing to a file system."
1039 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1040
1041 #. type: TP
1042 #: build/C/man2/fallocate.2:146 build/C/man2/mmap.2:452
1043 #: build/C/man3/posix_fallocate.3:87
1044 #, no-wrap
1045 msgid "B<ENODEV>"
1046 msgstr "B<ENODEV>"
1047
1048 #. type: Plain text
1049 #: build/C/man2/fallocate.2:153
1050 msgid ""
1051 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1052 "or FIFO, a different error results.)"
1053 msgstr ""
1054 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1055 "を参照している場合、別のエラーが発生する)。"
1056
1057 #. type: TP
1058 #: build/C/man2/fallocate.2:153 build/C/man3/posix_fallocate.3:91
1059 #: build/C/man2/shmget.2:217 build/C/man2/sync_file_range.2:166
1060 #, no-wrap
1061 msgid "B<ENOSPC>"
1062 msgstr "B<ENOSPC>"
1063
1064 #. type: Plain text
1065 #: build/C/man2/fallocate.2:158 build/C/man3/posix_fallocate.3:96
1066 msgid ""
1067 "There is not enough space left on the device containing the file referred to "
1068 "by I<fd>."
1069 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1070
1071 #. type: Plain text
1072 #: build/C/man2/fallocate.2:162
1073 msgid "This kernel does not implement B<fallocate>()."
1074 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1075
1076 #. type: TP
1077 #: build/C/man2/fallocate.2:162
1078 #, no-wrap
1079 msgid "B<EOPNOTSUPP>"
1080 msgstr "B<EOPNOTSUPP>"
1081
1082 #. type: Plain text
1083 #: build/C/man2/fallocate.2:171
1084 msgid ""
1085 "The file system containing the file referred to by I<fd> does not support "
1086 "this operation; or the I<mode> is not supported by the file system "
1087 "containing the file referred to by I<fd>."
1088 msgstr ""
1089 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1090 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1091 "I<mode> をサポートしていない。"
1092
1093 #. type: TP
1094 #: build/C/man2/fallocate.2:171 build/C/man2/mlock.2:143
1095 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:349
1096 #: build/C/man2/shmget.2:225
1097 #, no-wrap
1098 msgid "B<EPERM>"
1099 msgstr "B<EPERM>"
1100
1101 #. type: Plain text
1102 #: build/C/man2/fallocate.2:187
1103 msgid ""
1104 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1105 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1106 "is marked append-only (see B<chattr>(1))."
1107 msgstr ""
1108 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>"
1109 "(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> が指定されたが、 I<fd> が参照"
1110 "するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1111
1112 #. type: TP
1113 #: build/C/man2/fallocate.2:187 build/C/man2/posix_fadvise.2:97
1114 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1115 #, no-wrap
1116 msgid "B<ESPIPE>"
1117 msgstr "B<ESPIPE>"
1118
1119 #. type: Plain text
1120 #: build/C/man2/fallocate.2:191
1121 msgid "I<fd> refers to a pipe or FIFO."
1122 msgstr "I<fd> がパイプか FIFO を参照している。"
1123
1124 #. type: SH
1125 #: build/C/man2/fallocate.2:191 build/C/man3/malloc_info.3:60
1126 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1127 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1128 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1129 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1130 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1131 #, no-wrap
1132 msgid "VERSIONS"
1133 msgstr "バージョン"
1134
1135 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1136 #. type: Plain text
1137 #: build/C/man2/fallocate.2:199
1138 msgid ""
1139 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1140 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1141 "in glibc headers only since version 2.18."
1142 msgstr ""
1143 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1144 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1145 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1146
1147 #. type: Plain text
1148 #: build/C/man2/fallocate.2:202
1149 msgid "B<fallocate>()  is Linux-specific."
1150 msgstr "B<fallocate>()  は Linux 固有である。"
1151
1152 #. type: Plain text
1153 #: build/C/man2/fallocate.2:207
1154 msgid ""
1155 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1156 msgstr ""
1157 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1158
1159 #. type: TH
1160 #: build/C/man2/madvise.2:35
1161 #, no-wrap
1162 msgid "MADVISE"
1163 msgstr "MADVISE"
1164
1165 #. type: TH
1166 #: build/C/man2/madvise.2:35
1167 #, no-wrap
1168 msgid "2012-04-28"
1169 msgstr "2012-04-28"
1170
1171 #. type: Plain text
1172 #: build/C/man2/madvise.2:38
1173 msgid "madvise - give advice about use of memory"
1174 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1175
1176 #. type: Plain text
1177 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1178 #: build/C/man3/shm_open.3:31
1179 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1180 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1181
1182 #. type: Plain text
1183 #: build/C/man2/madvise.2:42
1184 msgid ""
1185 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1186 msgstr ""
1187 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1188
1189 #. type: Plain text
1190 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1191 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1192 msgid ""
1193 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1194 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1195
1196 #. type: Plain text
1197 #: build/C/man2/madvise.2:50
1198 msgid "B<madvise>(): _BSD_SOURCE"
1199 msgstr "B<madvise>(): _BSD_SOURCE"
1200
1201 #. type: Plain text
1202 #: build/C/man2/madvise.2:68
1203 msgid ""
1204 "The B<madvise>()  system call advises the kernel about how to handle paging "
1205 "input/output in the address range beginning at address I<addr> and with size "
1206 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1207 "to use some mapped or shared memory areas, so that the kernel can choose "
1208 "appropriate read-ahead and caching techniques.  This call does not influence "
1209 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1210 "but may influence its performance.  The kernel is free to ignore the advice."
1211 msgstr ""
1212 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1213 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1214 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1215 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1216 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1217 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1218 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1219
1220 #. type: Plain text
1221 #: build/C/man2/madvise.2:72
1222 msgid "The advice is indicated in the I<advice> argument which can be"
1223 msgstr ""
1224 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1225
1226 #. type: TP
1227 #: build/C/man2/madvise.2:72
1228 #, no-wrap
1229 msgid "B<MADV_NORMAL>"
1230 msgstr "B<MADV_NORMAL>"
1231
1232 #. type: Plain text
1233 #: build/C/man2/madvise.2:76
1234 msgid "No special treatment.  This is the default."
1235 msgstr "特別な扱いは行わない。これがデフォルトである。"
1236
1237 #. type: TP
1238 #: build/C/man2/madvise.2:76
1239 #, no-wrap
1240 msgid "B<MADV_RANDOM>"
1241 msgstr "B<MADV_RANDOM>"
1242
1243 #. type: Plain text
1244 #: build/C/man2/madvise.2:80
1245 msgid ""
1246 "Expect page references in random order.  (Hence, read ahead may be less "
1247 "useful than normally.)"
1248 msgstr ""
1249 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1250 "なさそうだ。)"
1251
1252 #. type: TP
1253 #: build/C/man2/madvise.2:80
1254 #, no-wrap
1255 msgid "B<MADV_SEQUENTIAL>"
1256 msgstr "B<MADV_SEQUENTIAL>"
1257
1258 #. type: Plain text
1259 #: build/C/man2/madvise.2:85
1260 msgid ""
1261 "Expect page references in sequential order.  (Hence, pages in the given "
1262 "range can be aggressively read ahead, and may be freed soon after they are "
1263 "accessed.)"
1264 msgstr ""
1265 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1266 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1267 "して良い。)"
1268
1269 #. type: TP
1270 #: build/C/man2/madvise.2:85
1271 #, no-wrap
1272 msgid "B<MADV_WILLNEED>"
1273 msgstr "B<MADV_WILLNEED>"
1274
1275 #. type: Plain text
1276 #: build/C/man2/madvise.2:89
1277 msgid ""
1278 "Expect access in the near future.  (Hence, it might be a good idea to read "
1279 "some pages ahead.)"
1280 msgstr ""
1281 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1282 "ておくといいだろう。)"
1283
1284 #. type: TP
1285 #: build/C/man2/madvise.2:89
1286 #, no-wrap
1287 msgid "B<MADV_DONTNEED>"
1288 msgstr "B<MADV_DONTNEED>"
1289
1290 #. type: Plain text
1291 #: build/C/man2/madvise.2:100
1292 msgid ""
1293 "Do not expect access in the near future.  (For the time being, the "
1294 "application is finished with the given range, so the kernel can free "
1295 "resources associated with it.)  Subsequent accesses of pages in this range "
1296 "will succeed, but will result either in reloading of the memory contents "
1297 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1298 "pages for mappings without an underlying file."
1299 msgstr ""
1300 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1301 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1302 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1303 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1304 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1305 "なる。"
1306
1307 #. type: TP
1308 #: build/C/man2/madvise.2:100
1309 #, no-wrap
1310 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1311 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1312
1313 #.  2.6.18-rc5
1314 #.  Databases want to use this feature to drop a section of their
1315 #.  bufferpool (shared memory segments) - without writing back to
1316 #.  disk/swap space.  This feature is also useful for supporting
1317 #.  hot-plug memory on UML.
1318 #. type: Plain text
1319 #: build/C/man2/madvise.2:113
1320 msgid ""
1321 "Free up a given range of pages and its associated backing store.  Currently, "
1322 "only shmfs/tmpfs supports this; other file systems return with the error "
1323 "B<ENOSYS>."
1324 msgstr ""
1325 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1326 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1327 "返される。"
1328
1329 #. type: TP
1330 #: build/C/man2/madvise.2:113
1331 #, no-wrap
1332 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1333 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1334
1335 #.  See http://lwn.net/Articles/171941/
1336 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1337 #.  Currently, copy-on-write may change the physical address of
1338 #.  a page even if the user requested that the page is pinned in
1339 #.  memory (either by mlock or by get_user_pages).  This happens
1340 #.  if the process forks meanwhile, and the parent writes to that
1341 #.  page.  As a result, the page is orphaned: in case of
1342 #.  get_user_pages, the application will never see any data hardware
1343 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1344 #.  the parent is not getting the realtime/security benefits of mlock.
1345 #.  In particular, this affects the Infiniband modules which do DMA from
1346 #.  and into user pages all the time.
1347 #.  This patch adds madvise options to control whether memory range is
1348 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1349 #.  from/into these pages.  Could also be useful to an application
1350 #.  wanting to speed up its forks by cutting large areas out of
1351 #.  consideration.
1352 #.  SEE ALSO: http://lwn.net/Articles/171941/
1353 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1354 #. type: Plain text
1355 #: build/C/man2/madvise.2:144
1356 msgid ""
1357 "Do not make the pages in this range available to the child after a B<fork>"
1358 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1359 "physical location of a page(s) if the parent writes to it after a B<fork>"
1360 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1361 "page(s).)"
1362 msgstr ""
1363 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1364 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1365 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1366 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1367 "を行うような場合に 問題を起こすことがある)。"
1368
1369 #. type: TP
1370 #: build/C/man2/madvise.2:144
1371 #, no-wrap
1372 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1373 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1374
1375 #. type: Plain text
1376 #: build/C/man2/madvise.2:150
1377 msgid ""
1378 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1379 "a mapping is inherited across B<fork>(2)."
1380 msgstr ""
1381 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1382 "(2)  の前後でマッピングは継承されるようになる。"
1383
1384 #. type: TP
1385 #: build/C/man2/madvise.2:150
1386 #, no-wrap
1387 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1388 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1389
1390 #. type: Plain text
1391 #: build/C/man2/madvise.2:162
1392 msgid ""
1393 "Poison a page and handle it like a hardware memory corruption.  This "
1394 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1395 "This operation may result in the calling process receiving a B<SIGBUS> and "
1396 "the page being unmapped.  This feature is intended for testing of memory "
1397 "error-handling code; it is available only if the kernel was configured with "
1398 "B<CONFIG_MEMORY_FAILURE>."
1399 msgstr ""
1400
1401 #. type: TP
1402 #: build/C/man2/madvise.2:162
1403 #, no-wrap
1404 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1405 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1406
1407 #. type: Plain text
1408 #: build/C/man2/madvise.2:180
1409 msgid ""
1410 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1411 "memory of each page in the specified range is preserved (i.e., when next "
1412 "accessed, the same content will be visible, but in a new physical page "
1413 "frame), and the original page is offlined (i.e., no longer used, and taken "
1414 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1415 "operation is invisible to (i.e., does not change the semantics of)  the "
1416 "calling process.  This feature is intended for testing of memory error-"
1417 "handling code; it is available only if the kernel was configured with "
1418 "B<CONFIG_MEMORY_FAILURE>."
1419 msgstr ""
1420
1421 #. type: TP
1422 #: build/C/man2/madvise.2:180
1423 #, no-wrap
1424 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1425 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1426
1427 #. type: Plain text
1428 #: build/C/man2/madvise.2:205
1429 msgid ""
1430 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1431 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1432 "memory that have been marked as mergeable, looking for pages with identical "
1433 "content.  These are replaced by a single write-protected page (which is "
1434 "automatically copied if a process later wants to update the content of the "
1435 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1436 "feature is intended for applications that generate many instances of the "
1437 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1438 "of processing power; use with care.  See the Linux kernel source file "
1439 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1440 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1441 "configured with B<CONFIG_KSM>."
1442 msgstr ""
1443
1444 #. type: TP
1445 #: build/C/man2/madvise.2:205
1446 #, no-wrap
1447 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1448 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1449
1450 #. type: Plain text
1451 #: build/C/man2/madvise.2:214
1452 msgid ""
1453 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1454 "address range; KSM unmerges whatever pages it had merged in the address "
1455 "range specified by I<addr> and I<length>."
1456 msgstr ""
1457
1458 #. type: TP
1459 #: build/C/man2/madvise.2:214
1460 #, no-wrap
1461 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1462 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1463
1464 #.  http://lwn.net/Articles/358904/
1465 #.  https://lwn.net/Articles/423584/
1466 #. type: Plain text
1467 #: build/C/man2/madvise.2:243
1468 msgid ""
1469 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1470 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1471 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1472 "the areas marked as huge page candidates to replace them with huge pages.  "
1473 "The kernel will also allocate huge pages directly when the region is "
1474 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1475 "feature is primarily aimed at applications that use large mappings of data "
1476 "and access large regions of that memory at a time (e.g., virtualization "
1477 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1478 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1479 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1480 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1481 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1482 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1483 msgstr ""
1484
1485 #. type: TP
1486 #: build/C/man2/madvise.2:243
1487 #, no-wrap
1488 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1489 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1490
1491 #. type: Plain text
1492 #: build/C/man2/madvise.2:250
1493 msgid ""
1494 "Ensures that memory in the address range specified by I<addr> and I<length> "
1495 "will not be collapsed into huge pages."
1496 msgstr ""
1497
1498 #. type: TP
1499 #: build/C/man2/madvise.2:250
1500 #, no-wrap
1501 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1502 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1503
1504 #. type: Plain text
1505 #: build/C/man2/madvise.2:264
1506 msgid ""
1507 "Exclude from a core dump those pages in the range specified by I<addr> and "
1508 "I<length>.  This is useful in applications that have large areas of memory "
1509 "that are known not to be useful in a core dump.  The effect of "
1510 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1511 "proc/PID/coredump_filter> file (see B<core>(5))."
1512 msgstr ""
1513
1514 #. type: TP
1515 #: build/C/man2/madvise.2:264
1516 #, no-wrap
1517 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1518 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1519
1520 #. type: Plain text
1521 #: build/C/man2/madvise.2:268
1522 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1523 msgstr ""
1524
1525 #. type: Plain text
1526 #: build/C/man2/madvise.2:275
1527 msgid ""
1528 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1529 "is set appropriately."
1530 msgstr ""
1531 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1532 "を適切な値に設定する。"
1533
1534 #. type: TP
1535 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1536 #: build/C/man2/mremap.2:136
1537 #, no-wrap
1538 msgid "B<EAGAIN>"
1539 msgstr "B<EAGAIN>"
1540
1541 #. type: Plain text
1542 #: build/C/man2/madvise.2:279
1543 msgid "A kernel resource was temporarily unavailable."
1544 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1545
1546 #. type: Plain text
1547 #: build/C/man2/madvise.2:282
1548 msgid "The map exists, but the area maps something that isn't a file."
1549 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1550
1551 #. type: Plain text
1552 #: build/C/man2/madvise.2:285
1553 msgid "This error can occur for the following reasons:"
1554 msgstr "このエラーは以下の理由で発生する。"
1555
1556 #. type: IP
1557 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1558 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1559 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1560 #: build/C/man3/mallopt.3:241
1561 #, no-wrap
1562 msgid "*"
1563 msgstr "*"
1564
1565 #.  .I len
1566 #.  is zero,
1567 #. type: Plain text
1568 #: build/C/man2/madvise.2:292
1569 msgid "The value I<len> is negative."
1570 msgstr "I<len> が負の値である。"
1571
1572 #. type: Plain text
1573 #: build/C/man2/madvise.2:295
1574 msgid "I<addr> is not page-aligned."
1575 msgstr "I<addr> がページ境界ではない。"
1576
1577 #. type: Plain text
1578 #: build/C/man2/madvise.2:298
1579 msgid "I<advice> is not a valid value"
1580 msgstr "I<advice> が有効な値でない。"
1581
1582 #. type: Plain text
1583 #: build/C/man2/madvise.2:301
1584 msgid ""
1585 "The application is attempting to release locked or shared pages (with "
1586 "B<MADV_DONTNEED>)."
1587 msgstr ""
1588 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1589 "放\n"
1590 "しようとしている。"
1591
1592 #. type: Plain text
1593 #: build/C/man2/madvise.2:309
1594 msgid ""
1595 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1596 "kernel was not configured with B<CONFIG_KSM>."
1597 msgstr ""
1598 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1599 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1600
1601 #. type: Plain text
1602 #: build/C/man2/madvise.2:316
1603 msgid ""
1604 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1605 "maximum resident set size."
1606 msgstr ""
1607 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1608 "(resident set size) の最大値を越えてしまう。"
1609
1610 #. type: TP
1611 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1612 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1613 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1614 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1615 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1616 #: build/C/man2/shmctl.2:333 build/C/man2/shmget.2:214
1617 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1618 #: build/C/man2/sync_file_range.2:163
1619 #, no-wrap
1620 msgid "B<ENOMEM>"
1621 msgstr "B<ENOMEM>"
1622
1623 #. type: Plain text
1624 #: build/C/man2/madvise.2:321
1625 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1626 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1627
1628 #. type: Plain text
1629 #: build/C/man2/madvise.2:325
1630 msgid ""
1631 "Addresses in the specified range are not currently mapped, or are outside "
1632 "the address space of the process."
1633 msgstr ""
1634 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1635 "空間の内部にない。"
1636
1637 #.  FIXME . Write a posix_madvise(3) page.
1638 #. type: Plain text
1639 #: build/C/man2/madvise.2:337
1640 msgid ""
1641 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1642 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1643 "There is a similar B<posix_fadvise>(2)  for file access."
1644 msgstr ""
1645 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1646 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1647 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1648 "する。"
1649
1650 #. type: Plain text
1651 #: build/C/man2/madvise.2:346
1652 msgid ""
1653 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1654 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1655 msgstr ""
1656 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1657 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1658
1659 #. type: SS
1660 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1661 #: build/C/man2/shmget.2:294
1662 #, no-wrap
1663 msgid "Linux notes"
1664 msgstr "Linux での注意"
1665
1666 #. type: Plain text
1667 #: build/C/man2/madvise.2:355
1668 msgid ""
1669 "The current Linux implementation (2.4.0) views this system call more as a "
1670 "command than as advice and hence may return an error when it cannot do what "
1671 "it usually would do in response to this advice.  (See the ERRORS description "
1672 "above.)  This is nonstandard behavior."
1673 msgstr ""
1674 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1675 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1676 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1677 "とは異なる。"
1678
1679 #.  .SH HISTORY
1680 #.  The
1681 #.  .BR madvise ()
1682 #.  function first appeared in 4.4BSD.
1683 #. type: Plain text
1684 #: build/C/man2/madvise.2:371
1685 msgid ""
1686 "The Linux implementation requires that the address I<addr> be page-aligned, "
1687 "and allows I<length> to be zero.  If there are some parts of the specified "
1688 "address range that are not mapped, the Linux version of B<madvise>()  "
1689 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1690 "the system call, as it should)."
1691 msgstr ""
1692 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1693 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1694 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1695 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1696 "返す)。"
1697
1698 #. type: Plain text
1699 #: build/C/man2/madvise.2:379
1700 msgid ""
1701 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1702 "B<munmap>(2), B<core>(5)"
1703 msgstr ""
1704 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1705 "B<munmap>(2), B<core>(5)"
1706
1707 #. type: TH
1708 #: build/C/man3/mallinfo.3:26
1709 #, no-wrap
1710 msgid "MALLINFO"
1711 msgstr "MALLINFO"
1712
1713 #. type: TH
1714 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1715 #, no-wrap
1716 msgid "2012-05-06"
1717 msgstr "2012-05-06"
1718
1719 #. type: Plain text
1720 #: build/C/man3/mallinfo.3:29
1721 msgid "mallinfo - obtain memory allocation information"
1722 msgstr "mallinfo - メモリ割り当て情報を取得する"
1723
1724 #. type: Plain text
1725 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1726 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1727 #: build/C/man3/mallopt.3:31
1728 msgid "B<#include E<lt>malloc.hE<gt>>"
1729 msgstr "B<#include E<lt>malloc.hE<gt>>"
1730
1731 #. type: Plain text
1732 #: build/C/man3/mallinfo.3:33
1733 msgid "B<struct mallinfo mallinfo(void);>"
1734 msgstr "B<struct mallinfo mallinfo(void);>"
1735
1736 #. type: Plain text
1737 #: build/C/man3/mallinfo.3:41
1738 msgid ""
1739 "The B<mallinfo>()  function returns a copy of a structure containing "
1740 "information about memory allocations performed by B<malloc>(3)  and related "
1741 "functions.  This structure is defined as follows:"
1742 msgstr ""
1743 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1744 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1745 "この構造体は以下のように定義されている。"
1746
1747 #. type: Plain text
1748 #: build/C/man3/mallinfo.3:56
1749 #, no-wrap
1750 msgid ""
1751 "struct mallinfo {\n"
1752 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1753 "    int ordblks;   /* Number of free chunks */\n"
1754 "    int smblks;    /* Number of free fastbin blocks */\n"
1755 "    int hblks;     /* Number of mmapped regions */\n"
1756 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1757 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1758 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1759 "    int uordblks;  /* Total allocated space (bytes) */\n"
1760 "    int fordblks;  /* Total free space (bytes) */\n"
1761 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1762 "};\n"
1763 msgstr ""
1764 "struct mallinfo {\n"
1765 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1766 "    int ordblks;   /* Number of free chunks */\n"
1767 "    int smblks;    /* Number of free fastbin blocks */\n"
1768 "    int hblks;     /* Number of mmapped regions */\n"
1769 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1770 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1771 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1772 "    int uordblks;  /* Total allocated space (bytes) */\n"
1773 "    int fordblks;  /* Total free space (bytes) */\n"
1774 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1775 "};\n"
1776
1777 #. type: Plain text
1778 #: build/C/man3/mallinfo.3:62
1779 msgid ""
1780 "The fields of the I<mallinfo> structure contain the following information:"
1781 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1782
1783 #. type: TP
1784 #: build/C/man3/mallinfo.3:62
1785 #, no-wrap
1786 msgid "I<arena>"
1787 msgstr "I<arena>"
1788
1789 #. type: Plain text
1790 #: build/C/man3/mallinfo.3:68
1791 msgid ""
1792 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1793 "memory allocated on the heap).  This figure includes both in-use blocks and "
1794 "blocks on the free list."
1795 msgstr ""
1796
1797 #. type: TP
1798 #: build/C/man3/mallinfo.3:68
1799 #, no-wrap
1800 msgid "I<ordblks>"
1801 msgstr "I<ordblks>"
1802
1803 #. type: Plain text
1804 #: build/C/man3/mallinfo.3:71
1805 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1806 msgstr ""
1807
1808 #. type: TP
1809 #: build/C/man3/mallinfo.3:71
1810 #, no-wrap
1811 msgid "I<smblks>"
1812 msgstr "I<smblks>"
1813
1814 #. type: Plain text
1815 #: build/C/man3/mallinfo.3:75
1816 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1817 msgstr ""
1818
1819 #. type: TP
1820 #: build/C/man3/mallinfo.3:75
1821 #, no-wrap
1822 msgid "I<hblks>"
1823 msgstr "I<hblks>"
1824
1825 #. type: Plain text
1826 #: build/C/man3/mallinfo.3:83
1827 msgid ""
1828 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1829 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1830 msgstr ""
1831
1832 #. type: TP
1833 #: build/C/man3/mallinfo.3:83
1834 #, no-wrap
1835 msgid "I<hblkhd>"
1836 msgstr "I<hblkhd>"
1837
1838 #. type: Plain text
1839 #: build/C/man3/mallinfo.3:87
1840 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1841 msgstr ""
1842
1843 #. type: TP
1844 #: build/C/man3/mallinfo.3:87
1845 #, no-wrap
1846 msgid "I<usmblks>"
1847 msgstr "I<usmblks>"
1848
1849 #. type: Plain text
1850 #: build/C/man3/mallinfo.3:92
1851 msgid ""
1852 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1853 "of space that was ever allocated.  This field is maintained only in "
1854 "nonthreading environments."
1855 msgstr ""
1856
1857 #. type: TP
1858 #: build/C/man3/mallinfo.3:92
1859 #, no-wrap
1860 msgid "I<fsmblks>"
1861 msgstr "I<fsmblks>"
1862
1863 #. type: Plain text
1864 #: build/C/man3/mallinfo.3:95
1865 msgid "The total number of bytes in fastbin free blocks."
1866 msgstr ""
1867
1868 #. type: TP
1869 #: build/C/man3/mallinfo.3:95
1870 #, no-wrap
1871 msgid "I<uordblks>"
1872 msgstr "I<uordblks>"
1873
1874 #. type: Plain text
1875 #: build/C/man3/mallinfo.3:98
1876 msgid "The total number of bytes used by in-use allocations."
1877 msgstr ""
1878
1879 #. type: TP
1880 #: build/C/man3/mallinfo.3:98
1881 #, no-wrap
1882 msgid "I<fordblks>"
1883 msgstr "I<fordblks>"
1884
1885 #. type: Plain text
1886 #: build/C/man3/mallinfo.3:101
1887 msgid "The total number of bytes in free blocks."
1888 msgstr ""
1889
1890 #. type: TP
1891 #: build/C/man3/mallinfo.3:101
1892 #, no-wrap
1893 msgid "I<keepcost>"
1894 msgstr "I<keepcost>"
1895
1896 #.  .SH VERSIONS
1897 #.  Available already in glibc 2.0, possibly earlier
1898 #. type: Plain text
1899 #: build/C/man3/mallinfo.3:110
1900 msgid ""
1901 "The total amount of releasable free space at the top of the heap.  This is "
1902 "the maximum number of bytes that could ideally (i.e., ignoring page "
1903 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1904 msgstr ""
1905
1906 #. type: Plain text
1907 #: build/C/man3/mallinfo.3:114
1908 msgid ""
1909 "This function is not specified by POSIX or the C standards.  A similar "
1910 "function exists on many System V derivatives, and was specified in the SVID."
1911 msgstr ""
1912
1913 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1914 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1915 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1916 #.  on libc-alpha@sourceware.org
1917 #. type: Plain text
1918 #: build/C/man3/mallinfo.3:126
1919 msgid ""
1920 "B<Information is returned for only the main memory allocation area.> "
1921 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1922 "B<malloc_info>(3)  for alternatives that include information about other "
1923 "arenas."
1924 msgstr ""
1925
1926 #. type: Plain text
1927 #: build/C/man3/mallinfo.3:134
1928 msgid ""
1929 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1930 "because some internal bookkeeping values may be of type I<long>, the "
1931 "reported values may wrap around zero and thus be inaccurate."
1932 msgstr ""
1933
1934 #. type: SH
1935 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1936 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
1937 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1938 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1939 #, no-wrap
1940 msgid "EXAMPLE"
1941 msgstr "例"
1942
1943 #. type: Plain text
1944 #: build/C/man3/mallinfo.3:140
1945 msgid ""
1946 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1947 "statistics before and after allocating and freeing some blocks of memory.  "
1948 "The statistics are displayed on standard output."
1949 msgstr ""
1950
1951 #. type: Plain text
1952 #: build/C/man3/mallinfo.3:144
1953 msgid ""
1954 "The first two command-line arguments specify the number and size of blocks "
1955 "to be allocated with B<malloc>(3)."
1956 msgstr ""
1957
1958 #. type: Plain text
1959 #: build/C/man3/mallinfo.3:158
1960 msgid ""
1961 "The remaining three arguments specify which of the allocated blocks should "
1962 "be freed with B<free>(3).  These three arguments are optional, and specify "
1963 "(in order): the step size to be used in the loop that frees blocks (the "
1964 "default is 1, meaning free all blocks in the range); the ordinal position of "
1965 "the first block to be freed (default 0, meaning the first allocated block); "
1966 "and a number one greater than the ordinal position of the last block to be "
1967 "freed (default is one greater than the maximum block number).  If these "
1968 "three arguments are omitted, then the defaults cause all allocated blocks to "
1969 "be freed."
1970 msgstr ""
1971
1972 #. type: Plain text
1973 #: build/C/man3/mallinfo.3:162
1974 msgid ""
1975 "In the following example run of the program, 1000 allocations of 100 bytes "
1976 "are performed, and then every second allocated block is freed:"
1977 msgstr ""
1978
1979 #. type: Plain text
1980 #: build/C/man3/mallinfo.3:177
1981 #, no-wrap
1982 msgid ""
1983 "$ B<./a.out 1000 100 2>\n"
1984 "============== Before allocating blocks ==============\n"
1985 "Total non-mmapped bytes (arena):       0\n"
1986 "# of free chunks (ordblks):            1\n"
1987 "# of free fastbin blocks (smblks):     0\n"
1988 "# of mapped regions (hblks):           0\n"
1989 "Bytes in mapped regions (hblkhd):      0\n"
1990 "Max. total allocated space (usmblks):  0\n"
1991 "Free bytes held in fastbins (fsmblks): 0\n"
1992 "Total allocated space (uordblks):      0\n"
1993 "Total free space (fordblks):           0\n"
1994 "Topmost releasable block (keepcost):   0\n"
1995 msgstr ""
1996 "$ B<./a.out 1000 100 2>\n"
1997 "============== Before allocating blocks ==============\n"
1998 "Total non-mmapped bytes (arena):       0\n"
1999 "# of free chunks (ordblks):            1\n"
2000 "# of free fastbin blocks (smblks):     0\n"
2001 "# of mapped regions (hblks):           0\n"
2002 "Bytes in mapped regions (hblkhd):      0\n"
2003 "Max. total allocated space (usmblks):  0\n"
2004 "Free bytes held in fastbins (fsmblks): 0\n"
2005 "Total allocated space (uordblks):      0\n"
2006 "Total free space (fordblks):           0\n"
2007 "Topmost releasable block (keepcost):   0\n"
2008
2009 #. type: Plain text
2010 #: build/C/man3/mallinfo.3:189
2011 #, no-wrap
2012 msgid ""
2013 "============== After allocating blocks ==============\n"
2014 "Total non-mmapped bytes (arena):       135168\n"
2015 "# of free chunks (ordblks):            1\n"
2016 "# of free fastbin blocks (smblks):     0\n"
2017 "# of mapped regions (hblks):           0\n"
2018 "Bytes in mapped regions (hblkhd):      0\n"
2019 "Max. total allocated space (usmblks):  0\n"
2020 "Free bytes held in fastbins (fsmblks): 0\n"
2021 "Total allocated space (uordblks):      104000\n"
2022 "Total free space (fordblks):           31168\n"
2023 "Topmost releasable block (keepcost):   31168\n"
2024 msgstr ""
2025 "============== After allocating blocks ==============\n"
2026 "Total non-mmapped bytes (arena):       135168\n"
2027 "# of free chunks (ordblks):            1\n"
2028 "# of free fastbin blocks (smblks):     0\n"
2029 "# of mapped regions (hblks):           0\n"
2030 "Bytes in mapped regions (hblkhd):      0\n"
2031 "Max. total allocated space (usmblks):  0\n"
2032 "Free bytes held in fastbins (fsmblks): 0\n"
2033 "Total allocated space (uordblks):      104000\n"
2034 "Total free space (fordblks):           31168\n"
2035 "Topmost releasable block (keepcost):   31168\n"
2036
2037 #. type: Plain text
2038 #: build/C/man3/mallinfo.3:201
2039 #, no-wrap
2040 msgid ""
2041 "============== After freeing blocks ==============\n"
2042 "Total non-mmapped bytes (arena):       135168\n"
2043 "# of free chunks (ordblks):            501\n"
2044 "# of free fastbin blocks (smblks):     0\n"
2045 "# of mapped regions (hblks):           0\n"
2046 "Bytes in mapped regions (hblkhd):      0\n"
2047 "Max. total allocated space (usmblks):  0\n"
2048 "Free bytes held in fastbins (fsmblks): 0\n"
2049 "Total allocated space (uordblks):      52000\n"
2050 "Total free space (fordblks):           83168\n"
2051 "Topmost releasable block (keepcost):   31168\n"
2052 msgstr ""
2053 "============== After freeing blocks ==============\n"
2054 "Total non-mmapped bytes (arena):       135168\n"
2055 "# of free chunks (ordblks):            501\n"
2056 "# of free fastbin blocks (smblks):     0\n"
2057 "# of mapped regions (hblks):           0\n"
2058 "Bytes in mapped regions (hblkhd):      0\n"
2059 "Max. total allocated space (usmblks):  0\n"
2060 "Free bytes held in fastbins (fsmblks): 0\n"
2061 "Total allocated space (uordblks):      52000\n"
2062 "Total free space (fordblks):           83168\n"
2063 "Topmost releasable block (keepcost):   31168\n"
2064
2065 #. type: SS
2066 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2067 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2068 #: build/C/man2/mprotect.2:165
2069 #, no-wrap
2070 msgid "Program source"
2071 msgstr "プログラムのソース"
2072
2073 #. type: Plain text
2074 #: build/C/man3/mallinfo.3:208
2075 #, no-wrap
2076 msgid ""
2077 "#include E<lt>malloc.hE<gt>\n"
2078 "#include \"tlpi_hdr.h\"\n"
2079 msgstr ""
2080 "#include E<lt>malloc.hE<gt>\n"
2081 "#include \"tlpi_hdr.h\"\n"
2082
2083 #. type: Plain text
2084 #: build/C/man3/mallinfo.3:213
2085 #, no-wrap
2086 msgid ""
2087 "static void\n"
2088 "display_mallinfo(void)\n"
2089 "{\n"
2090 "    struct mallinfo mi;\n"
2091 msgstr ""
2092 "static void\n"
2093 "display_mallinfo(void)\n"
2094 "{\n"
2095 "    struct mallinfo mi;\n"
2096
2097 #. type: Plain text
2098 #: build/C/man3/mallinfo.3:215
2099 #, no-wrap
2100 msgid "    mi = mallinfo();\n"
2101 msgstr "    mi = mallinfo();\n"
2102
2103 #. type: Plain text
2104 #: build/C/man3/mallinfo.3:227
2105 #, no-wrap
2106 msgid ""
2107 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2108 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2109 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2110 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2111 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2112 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2113 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2114 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2115 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2116 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2117 "}\n"
2118 msgstr ""
2119 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2120 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2121 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2122 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2123 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2124 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2125 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2126 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2127 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2128 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2129 "}\n"
2130
2131 #. type: Plain text
2132 #: build/C/man3/mallinfo.3:235
2133 #, no-wrap
2134 msgid ""
2135 "int\n"
2136 "main(int argc, char *argv[])\n"
2137 "{\n"
2138 "#define MAX_ALLOCS 2000000\n"
2139 "    char *alloc[MAX_ALLOCS];\n"
2140 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2141 "    size_t blockSize;\n"
2142 msgstr ""
2143 "int\n"
2144 "main(int argc, char *argv[])\n"
2145 "{\n"
2146 "#define MAX_ALLOCS 2000000\n"
2147 "    char *alloc[MAX_ALLOCS];\n"
2148 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2149 "    size_t blockSize;\n"
2150
2151 #. type: Plain text
2152 #: build/C/man3/mallinfo.3:239
2153 #, no-wrap
2154 msgid ""
2155 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2156 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2157 "                \"[end-free]]]\\en\", argv[0]);\n"
2158 msgstr ""
2159 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2160 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2161 "                \"[end-free]]]\\en\", argv[0]);\n"
2162
2163 #. type: Plain text
2164 #: build/C/man3/mallinfo.3:245
2165 #, no-wrap
2166 msgid ""
2167 "    numBlocks = atoi(argv[1]);\n"
2168 "    blockSize = atoi(argv[2]);\n"
2169 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2170 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2171 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2172 msgstr ""
2173 "    numBlocks = atoi(argv[1]);\n"
2174 "    blockSize = atoi(argv[2]);\n"
2175 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2176 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2177 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2178
2179 #. type: Plain text
2180 #: build/C/man3/mallinfo.3:248
2181 #, no-wrap
2182 msgid ""
2183 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2184 "    display_mallinfo();\n"
2185 msgstr ""
2186 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2187 "    display_mallinfo();\n"
2188
2189 #. type: Plain text
2190 #: build/C/man3/mallinfo.3:252
2191 #, no-wrap
2192 msgid ""
2193 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2194 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2195 "            fatal(\"Too many allocations\");\n"
2196 msgstr ""
2197 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2198 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2199 "            fatal(\"Too many allocations\");\n"
2200
2201 #. type: Plain text
2202 #: build/C/man3/mallinfo.3:257
2203 #, no-wrap
2204 msgid ""
2205 "        alloc[j] = malloc(blockSize);\n"
2206 "        if (alloc[j] == NULL)\n"
2207 "            errExit(\"malloc\");\n"
2208 "    }\n"
2209 msgstr ""
2210 "        alloc[j] = malloc(blockSize);\n"
2211 "        if (alloc[j] == NULL)\n"
2212 "            errExit(\"malloc\");\n"
2213 "    }\n"
2214
2215 #. type: Plain text
2216 #: build/C/man3/mallinfo.3:260
2217 #, no-wrap
2218 msgid ""
2219 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2220 "    display_mallinfo();\n"
2221 msgstr ""
2222 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2223 "    display_mallinfo();\n"
2224
2225 #. type: Plain text
2226 #: build/C/man3/mallinfo.3:263
2227 #, no-wrap
2228 msgid ""
2229 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2230 "        free(alloc[j]);\n"
2231 msgstr ""
2232 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2233 "        free(alloc[j]);\n"
2234
2235 #. type: Plain text
2236 #: build/C/man3/mallinfo.3:266
2237 #, no-wrap
2238 msgid ""
2239 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2240 "    display_mallinfo();\n"
2241 msgstr ""
2242 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2243 "    display_mallinfo();\n"
2244
2245 #. type: Plain text
2246 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2247 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2248 #: build/C/man2/mmap.2:711
2249 #, no-wrap
2250 msgid ""
2251 "    exit(EXIT_SUCCESS);\n"
2252 "}\n"
2253 msgstr ""
2254 "    exit(EXIT_SUCCESS);\n"
2255 "}\n"
2256
2257 #. type: Plain text
2258 #: build/C/man3/mallinfo.3:279
2259 msgid ""
2260 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2261 "B<malloc_trim>(3), B<mallopt>(3)"
2262 msgstr ""
2263 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2264 "B<malloc_trim>(3), B<mallopt>(3)"
2265
2266 #. type: TH
2267 #: build/C/man3/malloc_get_state.3:25
2268 #, no-wrap
2269 msgid "MALLOC_GET_STATE"
2270 msgstr "MALLOC_GET_STATE"
2271
2272 #. type: TH
2273 #: build/C/man3/malloc_get_state.3:25
2274 #, no-wrap
2275 msgid "2012-05-04"
2276 msgstr "2012-05-04"
2277
2278 #. type: Plain text
2279 #: build/C/man3/malloc_get_state.3:28
2280 msgid ""
2281 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2282 "implementation"
2283 msgstr ""
2284
2285 #. type: Plain text
2286 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2287 #, no-wrap
2288 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2289 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2290
2291 #. type: Plain text
2292 #: build/C/man3/malloc_get_state.3:33
2293 #, no-wrap
2294 msgid "B<void* malloc_get_state(void);>\n"
2295 msgstr "B<void* malloc_get_state(void);>\n"
2296
2297 #. type: Plain text
2298 #: build/C/man3/malloc_get_state.3:35
2299 #, no-wrap
2300 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2301 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2302
2303 #. type: Plain text
2304 #: build/C/man3/malloc_get_state.3:53
2305 msgid ""
2306 "The B<malloc_get_state>()  function records the current state of all "
2307 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2308 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2309 "is recorded in a system-dependent opaque data structure dynamically "
2310 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2311 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2312 "this memory.)"
2313 msgstr ""
2314
2315 #. type: Plain text
2316 #: build/C/man3/malloc_get_state.3:61
2317 msgid ""
2318 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2319 "internal bookkeeping variables to the values recorded in the opaque data "
2320 "structure pointed to by I<state>."
2321 msgstr ""
2322
2323 #. type: Plain text
2324 #: build/C/man3/malloc_get_state.3:68
2325 msgid ""
2326 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2327 "opaque data structure.  On error (for example, memory could not be allocated "
2328 "for the data structure), B<malloc_get_state>()  returns NULL."
2329 msgstr ""
2330
2331 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2332 #.  /* Must fail if the major version is too high. */
2333 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2334 #. type: Plain text
2335 #: build/C/man3/malloc_get_state.3:86
2336 msgid ""
2337 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2338 "that I<state> does not point to a correctly formed data structure, "
2339 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2340 "version of the data structure referred to by I<state> is a more recent "
2341 "version than this implementation knows about, B<malloc_set_state>()  returns "
2342 "-2."
2343 msgstr ""
2344
2345 #. type: Plain text
2346 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2347 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2348 msgid "These functions are GNU extensions."
2349 msgstr "これらの関数は GNU による拡張である。"
2350
2351 #. type: Plain text
2352 #: build/C/man3/malloc_get_state.3:94
2353 msgid ""
2354 "These functions are especially useful when using this B<malloc>(3)  "
2355 "implementation as part of a shared library, and the heap contents are saved/"
2356 "restored via some other method.  This technique is used by the GNU Emacs to "
2357 "implement its \"dumping\" function."
2358 msgstr ""
2359
2360 #.  i.e., calls __malloc_check_init()
2361 #.  i.e., malloc checking is not already in use
2362 #.  and the caller requested malloc checking
2363 #. type: Plain text
2364 #: build/C/man3/malloc_get_state.3:111
2365 msgid ""
2366 "Hook function pointers are never saved or restored by these functions, with "
2367 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2368 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2369 "checking hooks if possible; if malloc checking was not in use in the "
2370 "recorded state, but the caller has requested malloc checking, then the hooks "
2371 "are reset to 0."
2372 msgstr ""
2373
2374 #. type: Plain text
2375 #: build/C/man3/malloc_get_state.3:114
2376 msgid "B<malloc>(3), B<mallopt>(3)"
2377 msgstr "B<malloc>(3), B<mallopt>(3)"
2378
2379 #. type: TH
2380 #: build/C/man3/malloc_hook.3:10
2381 #, no-wrap
2382 msgid "MALLOC_HOOK"
2383 msgstr "MALLOC_HOOK"
2384
2385 #. type: TH
2386 #: build/C/man3/malloc_hook.3:10
2387 #, no-wrap
2388 msgid "2010-10-13"
2389 msgstr "2010-10-13"
2390
2391 #. type: Plain text
2392 #: build/C/man3/malloc_hook.3:15
2393 msgid ""
2394 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2395 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2396 msgstr ""
2397 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2398 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2399
2400 #. type: Plain text
2401 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2402 #: build/C/man3/posix_memalign.3:41
2403 #, no-wrap
2404 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2405 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2406
2407 #. type: Plain text
2408 #: build/C/man3/malloc_hook.3:20
2409 #, no-wrap
2410 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2411 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2412
2413 #. type: Plain text
2414 #: build/C/man3/malloc_hook.3:23
2415 #, no-wrap
2416 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2417 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2418
2419 #. type: Plain text
2420 #: build/C/man3/malloc_hook.3:26
2421 #, no-wrap
2422 msgid ""
2423 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2424 "B<                         const void *>I<caller>B<);>\n"
2425 msgstr ""
2426 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2427 "B<                         const void *>I<caller>B<);>\n"
2428
2429 #. type: Plain text
2430 #: build/C/man3/malloc_hook.3:28
2431 #, no-wrap
2432 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2433 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2434
2435 #. type: Plain text
2436 #: build/C/man3/malloc_hook.3:30
2437 #, no-wrap
2438 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2439 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2440
2441 #. type: Plain text
2442 #: build/C/man3/malloc_hook.3:32
2443 #, no-wrap
2444 msgid "B<void (*__after_morecore_hook)(void);>\n"
2445 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2446
2447 #. type: Plain text
2448 #: build/C/man3/malloc_hook.3:43
2449 msgid ""
2450 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2451 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2452 "these hooks to help you debug programs that use dynamic memory allocation, "
2453 "for example."
2454 msgstr ""
2455 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2456 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2457 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2458 "ができる。"
2459
2460 #. type: Plain text
2461 #: build/C/man3/malloc_hook.3:50
2462 msgid ""
2463 "The variable B<__malloc_initialize_hook> points at a function that is called "
2464 "once when the malloc implementation is initialized.  This is a weak "
2465 "variable, so it can be overridden in the application with a definition like "
2466 "the following:"
2467 msgstr ""
2468 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2469 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2470 "ケーション内で 以下のような定義で上書きできる:"
2471
2472 #. type: Plain text
2473 #: build/C/man3/malloc_hook.3:53
2474 #, no-wrap
2475 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2476 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2477
2478 #. type: Plain text
2479 #: build/C/man3/malloc_hook.3:58
2480 msgid ""
2481 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2482 msgstr ""
2483 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2484
2485 #. type: Plain text
2486 #: build/C/man3/malloc_hook.3:74
2487 msgid ""
2488 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2489 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2490 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2491 "except that they have a final argument I<caller> that gives the address of "
2492 "the caller of B<malloc>(3), etc."
2493 msgstr ""
2494 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2495 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2496 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2497 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2498 "出し元 (caller) のアドレスが格納される。"
2499
2500 #. type: Plain text
2501 #: build/C/man3/malloc_hook.3:80
2502 msgid ""
2503 "The variable B<__after_morecore_hook> points at a function that is called "
2504 "each time after B<sbrk>(2)  was asked for more memory."
2505 msgstr ""
2506 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2507 "後で毎回呼び出される関数へのポインタである。"
2508
2509 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2510 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2511 #. type: Plain text
2512 #: build/C/man3/malloc_hook.3:89
2513 msgid ""
2514 "The use of these hook functions is not safe in multithreaded programs, and "
2515 "they are now deprecated.  Programmers should instead preempt calls to the "
2516 "relevant functions by defining and exporting functions such as \"malloc\" "
2517 "and \"free\"."
2518 msgstr ""
2519 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2520 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2521 "公開して、 関連する関数を呼び出すようにすべきである。"
2522
2523 #. type: Plain text
2524 #: build/C/man3/malloc_hook.3:91
2525 msgid "Here is a short example of how to use these variables."
2526 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2527
2528 #. type: Plain text
2529 #: build/C/man3/malloc_hook.3:95
2530 #, no-wrap
2531 msgid ""
2532 "#include E<lt>stdio.hE<gt>\n"
2533 "#include E<lt>malloc.hE<gt>\n"
2534 msgstr ""
2535 "#include E<lt>stdio.hE<gt>\n"
2536 "#include E<lt>malloc.hE<gt>\n"
2537
2538 #. type: Plain text
2539 #: build/C/man3/malloc_hook.3:99
2540 #, no-wrap
2541 msgid ""
2542 "/* Prototypes for our hooks.  */\n"
2543 "static void my_init_hook(void);\n"
2544 "static void *my_malloc_hook(size_t, const void *);\n"
2545 msgstr ""
2546 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2547 "static void my_init_hook(void);\n"
2548 "static void *my_malloc_hook(size_t, const void *);\n"
2549
2550 #. type: Plain text
2551 #: build/C/man3/malloc_hook.3:102
2552 #, no-wrap
2553 msgid ""
2554 "/* Variables to save original hooks. */\n"
2555 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2556 msgstr ""
2557 "/* 元々のフックを保存するための変数 */\n"
2558 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2559
2560 #. type: Plain text
2561 #: build/C/man3/malloc_hook.3:105
2562 #, no-wrap
2563 msgid ""
2564 "/* Override initializing hook from the C library. */\n"
2565 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2566 msgstr ""
2567 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2568 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2569
2570 #. type: Plain text
2571 #: build/C/man3/malloc_hook.3:112
2572 #, no-wrap
2573 msgid ""
2574 "static void\n"
2575 "my_init_hook(void)\n"
2576 "{\n"
2577 "    old_malloc_hook = __malloc_hook;\n"
2578 "    __malloc_hook = my_malloc_hook;\n"
2579 "}\n"
2580 msgstr ""
2581 "static void\n"
2582 "my_init_hook(void)\n"
2583 "{\n"
2584 "    old_malloc_hook = __malloc_hook;\n"
2585 "    __malloc_hook = my_malloc_hook;\n"
2586 "}\n"
2587
2588 #. type: Plain text
2589 #: build/C/man3/malloc_hook.3:117
2590 #, no-wrap
2591 msgid ""
2592 "static void *\n"
2593 "my_malloc_hook(size_t size, const void *caller)\n"
2594 "{\n"
2595 "    void *result;\n"
2596 msgstr ""
2597 "static void *\n"
2598 "my_malloc_hook(size_t size, const void *caller)\n"
2599 "{\n"
2600 "    void *result;\n"
2601
2602 #. type: Plain text
2603 #: build/C/man3/malloc_hook.3:120
2604 #, no-wrap
2605 msgid ""
2606 "    /* Restore all old hooks */\n"
2607 "    __malloc_hook = old_malloc_hook;\n"
2608 msgstr ""
2609 "    /* 元々のフックを全て戻す */\n"
2610 "    __malloc_hook = old_malloc_hook;\n"
2611
2612 #. type: Plain text
2613 #: build/C/man3/malloc_hook.3:123
2614 #, no-wrap
2615 msgid ""
2616 "    /* Call recursively */\n"
2617 "    result = malloc(size);\n"
2618 msgstr ""
2619 "    /* malloc の再帰的呼び出し */\n"
2620 "    result = malloc(size);\n"
2621
2622 #. type: Plain text
2623 #: build/C/man3/malloc_hook.3:126
2624 #, no-wrap
2625 msgid ""
2626 "    /* Save underlying hooks */\n"
2627 "    old_malloc_hook = __malloc_hook;\n"
2628 msgstr ""
2629 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2630 "    old_malloc_hook = __malloc_hook;\n"
2631
2632 #. type: Plain text
2633 #: build/C/man3/malloc_hook.3:130
2634 #, no-wrap
2635 msgid ""
2636 "    /* printf() might call malloc(), so protect it too. */\n"
2637 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2638 "            (unsigned int) size, caller, result);\n"
2639 msgstr ""
2640 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2641 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2642 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2643 "            (unsigned int) size, caller, result);\n"
2644
2645 #. type: Plain text
2646 #: build/C/man3/malloc_hook.3:133
2647 #, no-wrap
2648 msgid ""
2649 "    /* Restore our own hooks */\n"
2650 "    __malloc_hook = my_malloc_hook;\n"
2651 msgstr ""
2652 "    /* ユーザが使おうとするフックを再設定する */\n"
2653 "    __malloc_hook = my_malloc_hook;\n"
2654
2655 #. type: Plain text
2656 #: build/C/man3/malloc_hook.3:136
2657 #, no-wrap
2658 msgid ""
2659 "    return result;\n"
2660 "}\n"
2661 msgstr ""
2662 "    return result;\n"
2663 "}\n"
2664
2665 #. type: Plain text
2666 #: build/C/man3/malloc_hook.3:142
2667 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2668 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2669
2670 #. type: TH
2671 #: build/C/man3/malloc_info.3:25
2672 #, no-wrap
2673 msgid "MALLOC_INFO"
2674 msgstr "MALLOC_INFO"
2675
2676 #. type: TH
2677 #: build/C/man3/malloc_info.3:25 build/C/man2/shmget.2:38
2678 #, no-wrap
2679 msgid "2013-04-19"
2680 msgstr "2013-04-19"
2681
2682 #. type: Plain text
2683 #: build/C/man3/malloc_info.3:28
2684 msgid "malloc_info - export malloc state to a stream"
2685 msgstr "malloc_info - malloc の状態をストリームに出力する"
2686
2687 #. type: Plain text
2688 #: build/C/man3/malloc_info.3:33
2689 #, no-wrap
2690 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2691 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2692
2693 #. type: Plain text
2694 #: build/C/man3/malloc_info.3:44
2695 msgid ""
2696 "The B<malloc_info>()  function exports an XML string that describes the "
2697 "current state of the memory-allocation implementation in the caller.  The "
2698 "string is printed on the file stream I<fp>.  The exported string includes "
2699 "information about all arenas (see B<malloc>(3))."
2700 msgstr ""
2701 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
2702 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
2703 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
2704
2705 #. type: Plain text
2706 #: build/C/man3/malloc_info.3:48
2707 msgid "As currently implemented, I<options> must be zero."
2708 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
2709
2710 #. type: Plain text
2711 #: build/C/man3/malloc_info.3:55
2712 msgid ""
2713 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
2714 "I<errno> set to indicate the cause."
2715 msgstr ""
2716 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
2717 "I<errno> にエラーの原因を示す値を設定する。"
2718
2719 #. type: Plain text
2720 #: build/C/man3/malloc_info.3:60
2721 msgid "I<options> was nonzero."
2722 msgstr "I<options> が 0 でなかった。"
2723
2724 #. type: Plain text
2725 #: build/C/man3/malloc_info.3:63
2726 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2727 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2728
2729 #. type: Plain text
2730 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2731 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2732 msgid "This function is a GNU extension."
2733 msgstr "この関数は GNU による拡張である。"
2734
2735 #. type: Plain text
2736 #: build/C/man3/malloc_info.3:71
2737 msgid ""
2738 "The memory-allocation information is provided as an XML string (rather than "
2739 "a C structure)  because the information may change over time (according to "
2740 "changes in the underlying implementation).  The output XML string includes a "
2741 "version field."
2742 msgstr ""
2743 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
2744 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
2745 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
2746
2747 #. type: Plain text
2748 #: build/C/man3/malloc_info.3:77
2749 msgid ""
2750 "The B<open_memstream>(3)  function can be used to send the output of "
2751 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2752 msgstr ""
2753 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
2754 "なくメモリ内のバッファに直接送ることができる。"
2755
2756 #. type: Plain text
2757 #: build/C/man3/malloc_info.3:84
2758 msgid ""
2759 "The B<malloc_info>()  function is designed to address deficiencies in "
2760 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2761 msgstr ""
2762 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
2763 "るために設定された。"
2764
2765 #. type: Plain text
2766 #: build/C/man3/malloc_info.3:95
2767 msgid ""
2768 "The program below takes up to four command-line arguments, of which the "
2769 "first three are mandatory.  The first argument specifies the number of "
2770 "threads that the program should create.  All of the threads, including the "
2771 "main thread, allocate the number of blocks of memory specified by the second "
2772 "argument.  The third argument controls the size of the blocks to be "
2773 "allocated.  The main thread creates blocks of this size, the second thread "
2774 "created by the program allocates blocks of twice this size, the third thread "
2775 "allocates blocks of three times this size, and so on."
2776 msgstr ""
2777
2778 #. type: Plain text
2779 #: build/C/man3/malloc_info.3:102
2780 msgid ""
2781 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2782 "state.  The first call takes place before any threads are created or memory "
2783 "allocated.  The second call is performed after all threads have allocated "
2784 "memory."
2785 msgstr ""
2786
2787 #. type: Plain text
2788 #: build/C/man3/malloc_info.3:110
2789 msgid ""
2790 "In the following example, the command-line arguments specify the creation of "
2791 "one additional thread, and both the main thread and the additional thread "
2792 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2793 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2794 msgstr ""
2795
2796 #. type: Plain text
2797 #: build/C/man3/malloc_info.3:135
2798 #, no-wrap
2799 msgid ""
2800 "$ B<getconf GNU_LIBC_VERSION>\n"
2801 "glibc 2.13\n"
2802 "$ B<./a.out 1 10000 100>\n"
2803 "============ Before allocating blocks ============\n"
2804 "E<lt>malloc version=\"1\"E<gt>\n"
2805 "E<lt>heap nr=\"0\"E<gt>\n"
2806 "E<lt>sizesE<gt>\n"
2807 "E<lt>/sizesE<gt>\n"
2808 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2809 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2810 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2811 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2812 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2813 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2814 "E<lt>/heapE<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=\"135168\"/E<gt>\n"
2818 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2819 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2820 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2821 "E<lt>/mallocE<gt>\n"
2822 msgstr ""
2823 "$ B<getconf GNU_LIBC_VERSION>\n"
2824 "glibc 2.13\n"
2825 "$ B<./a.out 1 10000 100>\n"
2826 "============ Before allocating blocks ============\n"
2827 "E<lt>malloc version=\"1\"E<gt>\n"
2828 "E<lt>heap nr=\"0\"E<gt>\n"
2829 "E<lt>sizesE<gt>\n"
2830 "E<lt>/sizesE<gt>\n"
2831 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2832 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2833 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2834 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2835 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2836 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2837 "E<lt>/heapE<gt>\n"
2838 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2839 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2840 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2841 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2842 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2843 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2844 "E<lt>/mallocE<gt>\n"
2845
2846 #. type: Plain text
2847 #: build/C/man3/malloc_info.3:165
2848 #, no-wrap
2849 msgid ""
2850 "============ After allocating blocks ============\n"
2851 "E<lt>malloc version=\"1\"E<gt>\n"
2852 "E<lt>heap nr=\"0\"E<gt>\n"
2853 "E<lt>sizesE<gt>\n"
2854 "E<lt>/sizesE<gt>\n"
2855 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2856 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2857 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2858 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2859 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2860 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2861 "E<lt>/heapE<gt>\n"
2862 "E<lt>heap nr=\"1\"E<gt>\n"
2863 "E<lt>sizesE<gt>\n"
2864 "E<lt>/sizesE<gt>\n"
2865 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2866 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2867 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2868 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2869 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2870 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2871 "E<lt>/heapE<gt>\n"
2872 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2873 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2874 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2875 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2876 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2877 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2878 "E<lt>/mallocE<gt>\n"
2879 msgstr ""
2880 "============ After allocating blocks ============\n"
2881 "E<lt>malloc version=\"1\"E<gt>\n"
2882 "E<lt>heap nr=\"0\"E<gt>\n"
2883 "E<lt>sizesE<gt>\n"
2884 "E<lt>/sizesE<gt>\n"
2885 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2886 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2887 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2888 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2889 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2890 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2891 "E<lt>/heapE<gt>\n"
2892 "E<lt>heap nr=\"1\"E<gt>\n"
2893 "E<lt>sizesE<gt>\n"
2894 "E<lt>/sizesE<gt>\n"
2895 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2896 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2897 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2898 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2899 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2900 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2901 "E<lt>/heapE<gt>\n"
2902 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2903 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2904 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2905 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2906 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2907 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2908 "E<lt>/mallocE<gt>\n"
2909
2910 #. type: Plain text
2911 #: build/C/man3/malloc_info.3:175
2912 #, no-wrap
2913 msgid ""
2914 "#include E<lt>unistd.hE<gt>\n"
2915 "#include E<lt>stdlib.hE<gt>\n"
2916 "#include E<lt>pthread.hE<gt>\n"
2917 "#include E<lt>malloc.hE<gt>\n"
2918 "#include E<lt>errno.hE<gt>\n"
2919 msgstr ""
2920 "#include E<lt>unistd.hE<gt>\n"
2921 "#include E<lt>stdlib.hE<gt>\n"
2922 "#include E<lt>pthread.hE<gt>\n"
2923 "#include E<lt>malloc.hE<gt>\n"
2924 "#include E<lt>errno.hE<gt>\n"
2925
2926 #. type: Plain text
2927 #: build/C/man3/malloc_info.3:178
2928 #, no-wrap
2929 msgid ""
2930 "static size_t blockSize;\n"
2931 "static int numThreads, numBlocks;\n"
2932 msgstr ""
2933 "static size_t blockSize;\n"
2934 "static int numThreads, numBlocks;\n"
2935
2936 #. type: Plain text
2937 #: build/C/man3/malloc_info.3:181
2938 #, no-wrap
2939 msgid ""
2940 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2941 "                        } while (0)\n"
2942 msgstr ""
2943 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2944 "                        } while (0)\n"
2945
2946 #. type: Plain text
2947 #: build/C/man3/malloc_info.3:187
2948 #, no-wrap
2949 msgid ""
2950 "static void *\n"
2951 "thread_func(void *arg)\n"
2952 "{\n"
2953 "    int j;\n"
2954 "    int tn = (int) arg;\n"
2955 msgstr ""
2956 "static void *\n"
2957 "thread_func(void *arg)\n"
2958 "{\n"
2959 "    int j;\n"
2960 "    int tn = (int) arg;\n"
2961
2962 #. type: Plain text
2963 #: build/C/man3/malloc_info.3:190
2964 #, no-wrap
2965 msgid ""
2966 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2967 "       the main thread) allocates a different amount of memory */\n"
2968 msgstr ""
2969 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2970 "       the main thread) allocates a different amount of memory */\n"
2971
2972 #. type: Plain text
2973 #: build/C/man3/malloc_info.3:194
2974 #, no-wrap
2975 msgid ""
2976 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2977 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2978 "            errExit(\"malloc-thread\");\n"
2979 msgstr ""
2980 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2981 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2982 "            errExit(\"malloc-thread\");\n"
2983
2984 #. type: Plain text
2985 #: build/C/man3/malloc_info.3:198
2986 #, no-wrap
2987 msgid ""
2988 "    sleep(100);         /* Sleep until main thread terminates */\n"
2989 "    return NULL;\n"
2990 "}\n"
2991 msgstr ""
2992 "    sleep(100);         /* Sleep until main thread terminates */\n"
2993 "    return NULL;\n"
2994 "}\n"
2995
2996 #. type: Plain text
2997 #: build/C/man3/malloc_info.3:204
2998 #, no-wrap
2999 msgid ""
3000 "int\n"
3001 "main(int argc, char *argv[])\n"
3002 "{\n"
3003 "    int j, tn, sleepTime;\n"
3004 "    pthread_t *thr;\n"
3005 msgstr ""
3006 "int\n"
3007 "main(int argc, char *argv[])\n"
3008 "{\n"
3009 "    int j, tn, sleepTime;\n"
3010 "    pthread_t *thr;\n"
3011
3012 #. type: Plain text
3013 #: build/C/man3/malloc_info.3:211
3014 #, no-wrap
3015 msgid ""
3016 "    if (argc E<lt> 4) {\n"
3017 "        fprintf(stderr,\n"
3018 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3019 "                argv[0]);\n"
3020 "        exit(EXIT_FAILURE);\n"
3021 "    }\n"
3022 msgstr ""
3023 "    if (argc E<lt> 4) {\n"
3024 "        fprintf(stderr,\n"
3025 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3026 "                argv[0]);\n"
3027 "        exit(EXIT_FAILURE);\n"
3028 "    }\n"
3029
3030 #. type: Plain text
3031 #: build/C/man3/malloc_info.3:216
3032 #, no-wrap
3033 msgid ""
3034 "    numThreads = atoi(argv[1]);\n"
3035 "    numBlocks = atoi(argv[2]);\n"
3036 "    blockSize = atoi(argv[3]);\n"
3037 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3038 msgstr ""
3039 "    numThreads = atoi(argv[1]);\n"
3040 "    numBlocks = atoi(argv[2]);\n"
3041 "    blockSize = atoi(argv[3]);\n"
3042 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3043
3044 #. type: Plain text
3045 #: build/C/man3/malloc_info.3:220
3046 #, no-wrap
3047 msgid ""
3048 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3049 "    if (thr == NULL)\n"
3050 "        errExit(\"calloc\");\n"
3051 msgstr ""
3052 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3053 "    if (thr == NULL)\n"
3054 "        errExit(\"calloc\");\n"
3055
3056 #. type: Plain text
3057 #: build/C/man3/malloc_info.3:223
3058 #, no-wrap
3059 msgid ""
3060 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3061 "    malloc_info(0, stdout);\n"
3062 msgstr ""
3063 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3064 "    malloc_info(0, stdout);\n"
3065
3066 #. type: Plain text
3067 #: build/C/man3/malloc_info.3:225
3068 #, no-wrap
3069 msgid "    /* Create threads that allocate different amounts of memory */\n"
3070 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3071
3072 #. type: Plain text
3073 #: build/C/man3/malloc_info.3:231
3074 #, no-wrap
3075 msgid ""
3076 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3077 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3078 "                               (void *) tn);\n"
3079 "        if (errno != 0)\n"
3080 "            errExit(\"pthread_create\");\n"
3081 msgstr ""
3082 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3083 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3084 "                               (void *) tn);\n"
3085 "        if (errno != 0)\n"
3086 "            errExit(\"pthread_create\");\n"
3087
3088 #. type: Plain text
3089 #: build/C/man3/malloc_info.3:236
3090 #, no-wrap
3091 msgid ""
3092 "        /* If we add a sleep interval after the start-up of each\n"
3093 "           thread, the threads likely won\\(aqt contend for malloc\n"
3094 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3095 "           allocated (see malloc(3)). */\n"
3096 msgstr ""
3097 "        /* If we add a sleep interval after the start-up of each\n"
3098 "           thread, the threads likely won\\(aqt contend for malloc\n"
3099 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3100 "           allocated (see malloc(3)). */\n"
3101
3102 #. type: Plain text
3103 #: build/C/man3/malloc_info.3:240
3104 #, no-wrap
3105 msgid ""
3106 "        if (sleepTime E<gt> 0)\n"
3107 "            sleep(sleepTime);\n"
3108 "    }\n"
3109 msgstr ""
3110 "        if (sleepTime E<gt> 0)\n"
3111 "            sleep(sleepTime);\n"
3112 "    }\n"
3113
3114 #. type: Plain text
3115 #: build/C/man3/malloc_info.3:242
3116 #, no-wrap
3117 msgid "    /* The main thread also allocates some memory */\n"
3118 msgstr "    /* The main thread also allocates some memory */\n"
3119
3120 #. type: Plain text
3121 #: build/C/man3/malloc_info.3:246
3122 #, no-wrap
3123 msgid ""
3124 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3125 "        if (malloc(blockSize) == NULL)\n"
3126 "            errExit(\"malloc\");\n"
3127 msgstr ""
3128 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3129 "        if (malloc(blockSize) == NULL)\n"
3130 "            errExit(\"malloc\");\n"
3131
3132 #. type: Plain text
3133 #: build/C/man3/malloc_info.3:249
3134 #, no-wrap
3135 msgid ""
3136 "    sleep(2);           /* Give all threads a chance to\n"
3137 "                           complete allocations */\n"
3138 msgstr ""
3139 "    sleep(2);           /* Give all threads a chance to\n"
3140 "                           complete allocations */\n"
3141
3142 #. type: Plain text
3143 #: build/C/man3/malloc_info.3:252
3144 #, no-wrap
3145 msgid ""
3146 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3147 "    malloc_info(0, stdout);\n"
3148 msgstr ""
3149 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3150 "    malloc_info(0, stdout);\n"
3151
3152 #. type: Plain text
3153 #: build/C/man3/malloc_info.3:262
3154 msgid ""
3155 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3156 "B<open_memstream>(3)"
3157 msgstr ""
3158 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3159 "B<open_memstream>(3)"
3160
3161 #. type: TH
3162 #: build/C/man3/malloc_stats.3:26
3163 #, no-wrap
3164 msgid "MALLOC_STATS"
3165 msgstr "MALLOC_STATS"
3166
3167 #. type: Plain text
3168 #: build/C/man3/malloc_stats.3:29
3169 msgid "malloc_stats - print memory allocation statistics"
3170 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3171
3172 #. type: Plain text
3173 #: build/C/man3/malloc_stats.3:33
3174 msgid "B<void malloc_stats(void);>"
3175 msgstr "B<void malloc_stats(void);>"
3176
3177 #.  .SH VERSIONS
3178 #.  Available already in glibc 2.0, possibly earlier
3179 #. type: Plain text
3180 #: build/C/man3/malloc_stats.3:55
3181 msgid ""
3182 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3183 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3184 "(allocation area), this function prints the total amount of memory allocated "
3185 "and the total number of bytes consumed by in-use allocations.  (These two "
3186 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3187 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3188 "statistics for all arenas, and the maximum number of blocks and bytes that "
3189 "were ever simultaneously allocated using B<mmap>(2)."
3190 msgstr ""
3191 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3192 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3193 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3194 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3195 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3196 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3197 "ロック数とバイト数の最大値を表示する。"
3198
3199 #. type: Plain text
3200 #: build/C/man3/malloc_stats.3:61
3201 msgid ""
3202 "More detailed information about memory allocations in the main arena can be "
3203 "obtained using B<mallinfo>(3)."
3204 msgstr ""
3205 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3206 "報を取得できる。"
3207
3208 #. type: Plain text
3209 #: build/C/man3/malloc_stats.3:67
3210 msgid ""
3211 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3212 msgstr ""
3213 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3214
3215 #. type: TH
3216 #: build/C/man3/malloc_trim.3:26
3217 #, no-wrap
3218 msgid "MALLOC_TRIM"
3219 msgstr "MALLOC_TRIM"
3220
3221 #. type: TH
3222 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3223 #, no-wrap
3224 msgid "2012-03-29"
3225 msgstr "2012-03-29"
3226
3227 #. type: Plain text
3228 #: build/C/man3/malloc_trim.3:29
3229 msgid "malloc_trim - release free memory from the top of the heap"
3230 msgstr ""
3231
3232 #. type: Plain text
3233 #: build/C/man3/malloc_trim.3:33
3234 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3235 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3236
3237 #. type: Plain text
3238 #: build/C/man3/malloc_trim.3:40
3239 msgid ""
3240 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3241 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3242 msgstr ""
3243
3244 #. type: Plain text
3245 #: build/C/man3/malloc_trim.3:51
3246 msgid ""
3247 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3248 "the top of the heap.  If this argument is 0, only the minimum amount of "
3249 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3250 "nonzero argument can be used to maintain some trailing space at the top of "
3251 "the heap in order to allow future allocations to be made without having to "
3252 "extend the heap with B<sbrk>(2)."
3253 msgstr ""
3254
3255 #. type: Plain text
3256 #: build/C/man3/malloc_trim.3:56
3257 msgid ""
3258 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3259 "back to the system, or 0 if it was not possible to release any memory."
3260 msgstr ""
3261
3262 #.  .SH VERSIONS
3263 #.  Available already in glibc 2.0, possibly earlier
3264 #. type: Plain text
3265 #: build/C/man3/malloc_trim.3:60
3266 msgid "No errors are defined."
3267 msgstr ""
3268
3269 #. type: Plain text
3270 #: build/C/man3/malloc_trim.3:71
3271 msgid ""
3272 "This function is automatically called by B<free>(3)  in certain "
3273 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3274 "B<mallopt>(3)."
3275 msgstr ""
3276
3277 #. type: Plain text
3278 #: build/C/man3/malloc_trim.3:74
3279 msgid ""
3280 "This function cannot release free memory located at places other than the "
3281 "top of the heap."
3282 msgstr ""
3283
3284 #.  malloc/malloc.c::mTRIm():
3285 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3286 #. type: Plain text
3287 #: build/C/man3/malloc_trim.3:78
3288 msgid "This function releases only memory in the main arena."
3289 msgstr ""
3290
3291 #. type: Plain text
3292 #: build/C/man3/malloc_trim.3:82
3293 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3294 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3295
3296 #. type: TH
3297 #: build/C/man3/malloc_usable_size.3:25
3298 #, no-wrap
3299 msgid "MALLOC_USABLE_SIZE"
3300 msgstr "MALLOC_USABLE_SIZE"
3301
3302 #. type: Plain text
3303 #: build/C/man3/malloc_usable_size.3:28
3304 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3305 msgstr ""
3306
3307 #. type: Plain text
3308 #: build/C/man3/malloc_usable_size.3:32
3309 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3310 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3311
3312 #. type: Plain text
3313 #: build/C/man3/malloc_usable_size.3:40
3314 msgid ""
3315 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3316 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3317 "B<malloc>(3)  or a related function."
3318 msgstr ""
3319
3320 #. type: Plain text
3321 #: build/C/man3/malloc_usable_size.3:48
3322 msgid ""
3323 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3324 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3325 msgstr ""
3326
3327 #. type: Plain text
3328 #: build/C/man3/malloc_usable_size.3:60
3329 msgid ""
3330 "The value returned by B<malloc_usable_size>()  may be greater than the "
3331 "requested size of the allocation because of alignment and minimum size "
3332 "constraints.  Although the excess bytes can be overwritten by the "
3333 "application without ill effects, this is not good programming practice: the "
3334 "number of excess bytes in an allocation depends on the underlying "
3335 "implementation."
3336 msgstr ""
3337
3338 #. type: Plain text
3339 #: build/C/man3/malloc_usable_size.3:62
3340 msgid "The main use of this function is for debugging and introspection."
3341 msgstr ""
3342
3343 #. type: Plain text
3344 #: build/C/man3/malloc_usable_size.3:64
3345 msgid "B<malloc>(3)"
3346 msgstr "B<malloc>(3)"
3347
3348 #. type: TH
3349 #: build/C/man3/mallopt.3:26
3350 #, no-wrap
3351 msgid "MALLOPT"
3352 msgstr "MALLOPT"
3353
3354 #. type: TH
3355 #: build/C/man3/mallopt.3:26
3356 #, no-wrap
3357 msgid "2012-04-30"
3358 msgstr "2012-04-30"
3359
3360 #. type: Plain text
3361 #: build/C/man3/mallopt.3:29
3362 msgid "mallopt - set memory allocation parameters"
3363 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3364
3365 #. type: Plain text
3366 #: build/C/man3/mallopt.3:33
3367 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3368 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3369
3370 #. type: Plain text
3371 #: build/C/man3/mallopt.3:44
3372 msgid ""
3373 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3374 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3375 "specifies the parameter to be modified, and I<value> specifies the new value "
3376 "for that parameter."
3377 msgstr ""
3378 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3379 "制御するパラメータの調整を行う。\n"
3380 "I<param> 引き数で変更するパラメータを指定し、\n"
3381 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3382
3383 #. type: Plain text
3384 #: build/C/man3/mallopt.3:47
3385 msgid "The following values can be specified for I<param>:"
3386 msgstr "I<param> には以下の値を指定することができる。"
3387
3388 #. type: TP
3389 #: build/C/man3/mallopt.3:47
3390 #, no-wrap
3391 msgid "B<M_CHECK_ACTION>"
3392 msgstr "B<M_CHECK_ACTION>"
3393
3394 #. type: Plain text
3395 #: build/C/man3/mallopt.3:53
3396 msgid ""
3397 "Setting this parameter controls how glibc responds when various kinds of "
3398 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3399 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3400 "parameter determine the glibc behavior, as follows:"
3401 msgstr ""
3402
3403 #. type: TP
3404 #: build/C/man3/mallopt.3:54
3405 #, no-wrap
3406 msgid "Bit 0"
3407 msgstr "Bit 0"
3408
3409 #. type: Plain text
3410 #: build/C/man3/mallopt.3:64
3411 msgid ""
3412 "If this bit is set, then print a one-line message on I<stderr> that provides "
3413 "details about the error.  The message starts with the string \"***\\ glibc "
3414 "detected\\ ***\", followed by the program name, the name of the memory-"
3415 "allocation function in which the error was detected, a brief description of "
3416 "the error, and the memory address where the error was detected."
3417 msgstr ""
3418
3419 #. type: TP
3420 #: build/C/man3/mallopt.3:64
3421 #, no-wrap
3422 msgid "Bit 1"
3423 msgstr "Bit 1"
3424
3425 #. type: Plain text
3426 #: build/C/man3/mallopt.3:79
3427 msgid ""
3428 "If this bit is set, then, after printing any error message specified by bit "
3429 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3430 "since 2.4, if bit 0 is also set, then, between printing the error message "
3431 "and aborting, the program also prints a stack trace in the manner of "
3432 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3433 "proc/[pid]/maps> (see B<proc>(5))."
3434 msgstr ""
3435
3436 #. type: TP
3437 #: build/C/man3/mallopt.3:79
3438 #, no-wrap
3439 msgid "Bit 2 (since glibc 2.4)"
3440 msgstr "Bit 2 (glibc 2.4 以降)"
3441
3442 #. type: Plain text
3443 #: build/C/man3/mallopt.3:86
3444 msgid ""
3445 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3446 "the one-line message describing the error is simplified to contain just the "
3447 "name of the function where the error was detected and the brief description "
3448 "of the error."
3449 msgstr ""
3450
3451 #. type: Plain text
3452 #: build/C/man3/mallopt.3:91
3453 msgid "The remaining bits in I<value> are ignored."
3454 msgstr ""
3455
3456 #. type: Plain text
3457 #: build/C/man3/mallopt.3:95
3458 msgid ""
3459 "Combining the above details, the following numeric values are meaningful for "
3460 "B<M_CHECK_ACTION>:"
3461 msgstr ""
3462
3463 #. type: IP
3464 #: build/C/man3/mallopt.3:96
3465 #, no-wrap
3466 msgid "0"
3467 msgstr "0"
3468
3469 #. type: Plain text
3470 #: build/C/man3/mallopt.3:98
3471 msgid "Ignore error conditions; continue execution (with undefined results)."
3472 msgstr ""
3473
3474 #. type: IP
3475 #: build/C/man3/mallopt.3:98
3476 #, no-wrap
3477 msgid "1"
3478 msgstr "1"
3479
3480 #. type: Plain text
3481 #: build/C/man3/mallopt.3:100
3482 msgid "Print a detailed error message and continue execution."
3483 msgstr ""
3484
3485 #. type: IP
3486 #: build/C/man3/mallopt.3:100
3487 #, no-wrap
3488 msgid "2"
3489 msgstr "2"
3490
3491 #. type: Plain text
3492 #: build/C/man3/mallopt.3:102
3493 msgid "Abort the program."
3494 msgstr ""
3495
3496 #. type: IP
3497 #: build/C/man3/mallopt.3:102
3498 #, no-wrap
3499 msgid "3"
3500 msgstr "3"
3501
3502 #. type: Plain text
3503 #: build/C/man3/mallopt.3:105
3504 msgid ""
3505 "Print detailed error message, stack trace, and memory mappings, and abort "
3506 "the program."
3507 msgstr ""
3508
3509 #. type: IP
3510 #: build/C/man3/mallopt.3:105
3511 #, no-wrap
3512 msgid "5"
3513 msgstr "5"
3514
3515 #. type: Plain text
3516 #: build/C/man3/mallopt.3:107
3517 msgid "Print a simple error message and continue execution."
3518 msgstr ""
3519
3520 #. type: IP
3521 #: build/C/man3/mallopt.3:107
3522 #, no-wrap
3523 msgid "7"
3524 msgstr "7"
3525
3526 #. type: Plain text
3527 #: build/C/man3/mallopt.3:110
3528 msgid ""
3529 "Print simple error message, stack trace, and memory mappings, and abort the "
3530 "program."
3531 msgstr ""
3532
3533 #. type: Plain text
3534 #: build/C/man3/mallopt.3:116
3535 msgid ""
3536 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3537 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3538 msgstr ""
3539
3540 #. type: Plain text
3541 #: build/C/man3/mallopt.3:121
3542 msgid ""
3543 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3544 "crash may happen much later, and the true cause of the problem is then very "
3545 "hard to track down."
3546 msgstr ""
3547
3548 #. type: TP
3549 #: build/C/man3/mallopt.3:121
3550 #, no-wrap
3551 msgid "B<M_MMAP_MAX>"
3552 msgstr "B<M_MMAP_MAX>"
3553
3554 #.  The following text adapted from comments in the glibc source:
3555 #. type: Plain text
3556 #: build/C/man3/mallopt.3:131
3557 msgid ""
3558 "This parameter specifies the maximum number of allocation requests that may "
3559 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3560 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3561 "and using more than a few of them may degrade performance."
3562 msgstr ""
3563
3564 #. type: Plain text
3565 #: build/C/man3/mallopt.3:138
3566 msgid ""
3567 "The default value is 65,536, a value which has no special significance and "
3568 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3569 "use of B<mmap>(2)  for servicing large allocation requests."
3570 msgstr ""
3571
3572 #. type: TP
3573 #: build/C/man3/mallopt.3:138
3574 #, no-wrap
3575 msgid "B<M_MMAP_THRESHOLD>"
3576 msgstr "B<M_MMAP_THRESHOLD>"
3577
3578 #. type: Plain text
3579 #: build/C/man3/mallopt.3:147
3580 msgid ""
3581 "For allocations greater than or equal to the limit specified (in bytes) by "
3582 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3583 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3584 "break using B<sbrk>(2)."
3585 msgstr ""
3586
3587 #. type: Plain text
3588 #: build/C/man3/mallopt.3:167
3589 msgid ""
3590 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3591 "allocated memory blocks can always be independently released back to the "
3592 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3593 "the top end.)  On the other hand, there are some disadvantages to the use of "
3594 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3595 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3596 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3597 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3598 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3599 msgstr ""
3600
3601 #. type: Plain text
3602 #: build/C/man3/mallopt.3:174
3603 msgid ""
3604 "The lower limit for this parameter is 0.  The upper limit is "
3605 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3606 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3607 msgstr ""
3608
3609 #. type: Plain text
3610 #: build/C/man3/mallopt.3:192
3611 msgid ""
3612 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3613 "initial value of the threshold is 128*1024, but when blocks larger than the "
3614 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3615 "are freed, the threshold is adjusted upwards to the size of the freed "
3616 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3617 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3618 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3619 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3620 "parameters is set."
3621 msgstr ""
3622
3623 #. type: TP
3624 #: build/C/man3/mallopt.3:192
3625 #, no-wrap
3626 msgid "B<M_MXFAST> (since glibc 2.3)"
3627 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3628
3629 #.  The following text adapted from comments in the glibc sources:
3630 #. type: Plain text
3631 #: build/C/man3/mallopt.3:212
3632 msgid ""
3633 "Set the upper limit for memory allocation requests that are satisfied using "
3634 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3635 "are storage areas that hold deallocated blocks of memory of the same size "
3636 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3637 "the same size can be handled very quickly by allocating from the fastbin, "
3638 "although memory fragmentation and the overall memory footprint of the "
3639 "program can increase.  The default value for this parameter is I<64*sizeof"
3640 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3641 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3642 "the use of fastbins."
3643 msgstr ""
3644
3645 #. type: TP
3646 #: build/C/man3/mallopt.3:212
3647 #, no-wrap
3648 msgid "B<M_PERTURB> (since glibc 2.4)"
3649 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3650
3651 #. type: Plain text
3652 #: build/C/man3/mallopt.3:227
3653 msgid ""
3654 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3655 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3656 "of the value in the least significant byte of I<value>, and when allocated "
3657 "memory is released using B<free>(3), the freed bytes are set to the least "
3658 "significant byte of I<value>.  This can be useful for detecting errors where "
3659 "programs incorrectly rely on allocated memory being initialized to zero, or "
3660 "reuse values in memory that has already been freed."
3661 msgstr ""
3662
3663 #. type: TP
3664 #: build/C/man3/mallopt.3:227
3665 #, no-wrap
3666 msgid "B<M_TOP_PAD>"
3667 msgstr "B<M_TOP_PAD>"
3668
3669 #. type: Plain text
3670 #: build/C/man3/mallopt.3:234
3671 msgid ""
3672 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3673 "(2)  to modify the program break.  (The measurement unit for this parameter "
3674 "is bytes.)  This parameter has an effect in the following circumstances:"
3675 msgstr ""
3676
3677 #. type: Plain text
3678 #: build/C/man3/mallopt.3:241
3679 msgid ""
3680 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3681 "the B<sbrk>(2)  request."
3682 msgstr ""
3683
3684 #. type: Plain text
3685 #: build/C/man3/mallopt.3:247
3686 msgid ""
3687 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3688 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3689 "top of the heap."
3690 msgstr ""
3691
3692 #. type: Plain text
3693 #: build/C/man3/mallopt.3:251
3694 msgid ""
3695 "In either case, the amount of padding is always rounded to a system page "
3696 "boundary."
3697 msgstr ""
3698
3699 #. type: Plain text
3700 #: build/C/man3/mallopt.3:258
3701 msgid ""
3702 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3703 "system calls (when the parameter is set low)  and wasting unused memory at "
3704 "the top of the heap (when the parameter is set high)."
3705 msgstr ""
3706
3707 #.  DEFAULT_TOP_PAD in glibc source
3708 #. type: Plain text
3709 #: build/C/man3/mallopt.3:261
3710 msgid "The default value for this parameter is 128*1024."
3711 msgstr ""
3712
3713 #. type: TP
3714 #: build/C/man3/mallopt.3:261
3715 #, no-wrap
3716 msgid "B<M_TRIM_THRESHOLD>"
3717 msgstr "B<M_TRIM_THRESHOLD>"
3718
3719 #. type: Plain text
3720 #: build/C/man3/mallopt.3:277
3721 msgid ""
3722 "When the amount of contiguous free memory at the top of the heap grows "
3723 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3724 "back to the system.  (This can be useful in programs that continue to "
3725 "execute for a long period after freeing a significant amount of memory.)  "
3726 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3727 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3728 msgstr ""
3729
3730 #. type: Plain text
3731 #: build/C/man3/mallopt.3:282
3732 msgid ""
3733 "The default value for this parameter is 128*1024.  Setting "
3734 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3735 msgstr ""
3736
3737 #
3738 #
3739 #
3740 #.  FIXME Do the arena parameters need to be documented?
3741 #.  .TP
3742 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3743 #.  .TP
3744 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3745 #.  Environment variables
3746 #.      MALLOC_ARENA_MAX_
3747 #.      MALLOC_ARENA_TEST_
3748 #.  http://udrepper.livejournal.com/20948.html describes some details
3749 #.      of the MALLOC_ARENA_* environment variables.
3750 #.  These macros aren't enabled in production releases until 2.15?
3751 #.  (see glibc malloc/Makefile)
3752 #. type: Plain text
3753 #: build/C/man3/mallopt.3:305
3754 msgid ""
3755 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3756 "of system calls (when the parameter is set low)  and wasting unused memory "
3757 "at the top of the heap (when the parameter is set high)."
3758 msgstr ""
3759
3760 #. type: SS
3761 #: build/C/man3/mallopt.3:305
3762 #, no-wrap
3763 msgid "Environment variables"
3764 msgstr "環境変数"
3765
3766 #. type: Plain text
3767 #: build/C/man3/mallopt.3:320
3768 msgid ""
3769 "A number of environment variables can be defined to modify some of the same "
3770 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3771 "advantage that the source code of the program need not be changed.  To be "
3772 "effective, these variables must be defined before the first call to a memory-"
3773 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3774 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3775 "these variables are ignored in set-user-ID and set-group-ID programs."
3776 msgstr ""
3777
3778 #. type: Plain text
3779 #: build/C/man3/mallopt.3:323
3780 msgid ""
3781 "The environment variables are as follows (note the trailing underscore at "
3782 "the end of the name of each variable):"
3783 msgstr ""
3784
3785 #. type: TP
3786 #: build/C/man3/mallopt.3:323
3787 #, no-wrap
3788 msgid "B<MALLOC_CHECK_>"
3789 msgstr "B<MALLOC_CHECK_>"
3790
3791 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3792 #.  when MALLOC_CHECK_ was set.
3793 #. type: Plain text
3794 #: build/C/man3/mallopt.3:340
3795 msgid ""
3796 "This environment variable controls the same parameter as B<mallopt>()  "
3797 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3798 "special implementation of the memory-allocation functions is used.  (This is "
3799 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3800 "performs additional error checking, but is slower than the standard set of "
3801 "memory-allocation functions.  (This implementation does not detect all "
3802 "possible errors; memory leaks can still occur.)"
3803 msgstr ""
3804
3805 #. type: Plain text
3806 #: build/C/man3/mallopt.3:345
3807 msgid ""
3808 "The value assigned to this environment variable should be a single digit, "
3809 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3810 "the initial digit are ignored."
3811 msgstr ""
3812
3813 #. type: Plain text
3814 #: build/C/man3/mallopt.3:354
3815 msgid ""
3816 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3817 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3818 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3819 "also has an effect for set-user-ID and set-group-ID programs."
3820 msgstr ""
3821
3822 #. type: TP
3823 #: build/C/man3/mallopt.3:354
3824 #, no-wrap
3825 msgid "B<MALLOC_MMAP_MAX_>"
3826 msgstr "B<MALLOC_MMAP_MAX_>"
3827
3828 #. type: Plain text
3829 #: build/C/man3/mallopt.3:359
3830 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3831 msgstr ""
3832
3833 #. type: TP
3834 #: build/C/man3/mallopt.3:359
3835 #, no-wrap
3836 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3837 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3838
3839 #. type: Plain text
3840 #: build/C/man3/mallopt.3:364
3841 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3842 msgstr ""
3843
3844 #. type: TP
3845 #: build/C/man3/mallopt.3:364
3846 #, no-wrap
3847 msgid "B<MALLOC_PERTURB_>"
3848 msgstr "B<MALLOC_PERTURB_>"
3849
3850 #. type: Plain text
3851 #: build/C/man3/mallopt.3:369
3852 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3853 msgstr ""
3854
3855 #. type: TP
3856 #: build/C/man3/mallopt.3:369
3857 #, no-wrap
3858 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3859 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3860
3861 #. type: Plain text
3862 #: build/C/man3/mallopt.3:374
3863 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3864 msgstr ""
3865
3866 #. type: TP
3867 #: build/C/man3/mallopt.3:374
3868 #, no-wrap
3869 msgid "B<MALLOC_TOP_PAD_>"
3870 msgstr "B<MALLOC_TOP_PAD_>"
3871
3872 #. type: Plain text
3873 #: build/C/man3/mallopt.3:379
3874 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3875 msgstr ""
3876
3877 #. type: Plain text
3878 #: build/C/man3/mallopt.3:384
3879 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3880 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3881
3882 #.  .SH VERSIONS
3883 #.  Available already in glibc 2.0, possibly earlier
3884 #. type: Plain text
3885 #: build/C/man3/mallopt.3:392
3886 msgid "On error, I<errno> is I<not> set."
3887 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3888
3889 #.  .SH NOTES
3890 #. type: Plain text
3891 #: build/C/man3/mallopt.3:406
3892 msgid ""
3893 "This function is not specified by POSIX or the C standards.  A similar "
3894 "function exists on many System V derivatives, but the range of values for "
3895 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3896 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3897 "implemented in glibc."
3898 msgstr ""
3899
3900 #. type: Plain text
3901 #: build/C/man3/mallopt.3:410
3902 msgid "Specifying an invalid value for I<param> does not generate an error."
3903 msgstr ""
3904
3905 #.  FIXME This looks buggy:
3906 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3907 #.  malloc requests are rounded up:
3908 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3909 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3910 #. type: Plain text
3911 #: build/C/man3/mallopt.3:418
3912 msgid ""
3913 "A calculation error within the glibc implementation means that a call of the "
3914 "form:"
3915 msgstr ""
3916
3917 #. type: Plain text
3918 #: build/C/man3/mallopt.3:421
3919 #, no-wrap
3920 msgid "    mallopt(M_MXFAST, n)\n"
3921 msgstr "    mallopt(M_MXFAST, n)\n"
3922
3923 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3924 #. type: Plain text
3925 #: build/C/man3/mallopt.3:433
3926 msgid ""
3927 "does not result in fastbins being employed for all allocations of size up to "
3928 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3929 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3930 "integer."
3931 msgstr ""
3932
3933 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3934 #.  do have an effect for set-user-ID programs (but not
3935 #.  set-group-ID programs).
3936 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3937 #. type: Plain text
3938 #: build/C/man3/mallopt.3:445
3939 msgid ""
3940 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3941 "ignored in set-group-ID programs."
3942 msgstr ""
3943
3944 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3945 #. type: Plain text
3946 #: build/C/man3/mallopt.3:466
3947 msgid ""
3948 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3949 "of allocated memory are initialized to the complement of the byte in "
3950 "I<value>, and when that memory is freed, the bytes of the region are "
3951 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3952 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3953 "precisely the block of memory being freed by the call I<free(p)>, the block "
3954 "starting at I<p+sizeof(size_t)> is initialized."
3955 msgstr ""
3956
3957 #. type: Plain text
3958 #: build/C/man3/mallopt.3:475
3959 msgid ""
3960 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3961 "is supplied with an (integer) command-line argument, then that argument is "
3962 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3963 "block of memory, and frees it twice (an error)."
3964 msgstr ""
3965
3966 #. type: Plain text
3967 #: build/C/man3/mallopt.3:479
3968 msgid ""
3969 "The following shell session shows what happens when we run this program "
3970 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3971 msgstr ""
3972
3973 #. type: Plain text
3974 #: build/C/man3/mallopt.3:499
3975 #, no-wrap
3976 msgid ""
3977 "$ B<./a.out>\n"
3978 "main(): returned from first free() call\n"
3979 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3980 "======= Backtrace: =========\n"
3981 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3982 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3983 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3984 "\\&./a.out[0x80485db]\n"
3985 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3986 "\\&./a.out[0x8048471]\n"
3987 "======= Memory map: ========\n"
3988 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3989 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3990 "[some lines omitted]\n"
3991 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3992 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3993 "Aborted (core dumped)\n"
3994 msgstr ""
3995 "$ B<./a.out>\n"
3996 "main(): returned from first free() call\n"
3997 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3998 "======= Backtrace: =========\n"
3999 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4000 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4001 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4002 "\\&./a.out[0x80485db]\n"
4003 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4004 "\\&./a.out[0x8048471]\n"
4005 "======= Memory map: ========\n"
4006 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4007 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4008 "[some lines omitted]\n"
4009 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4010 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4011 "Aborted (core dumped)\n"
4012
4013 #. type: Plain text
4014 #: build/C/man3/mallopt.3:504
4015 msgid ""
4016 "The following runs show the results when employing other values for "
4017 "B<M_CHECK_ACTION>:"
4018 msgstr ""
4019
4020 #. type: Plain text
4021 #: build/C/man3/mallopt.3:517
4022 #, no-wrap
4023 msgid ""
4024 "$ B<./a.out 1>             # Diagnose error and continue\n"
4025 "main(): returned from first free() call\n"
4026 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4027 "main(): returned from second free() call\n"
4028 "$ B<./a.out 2>             # Abort without error message\n"
4029 "main(): returned from first free() call\n"
4030 "Aborted (core dumped)\n"
4031 "$ B<./a.out 0>             # Ignore error and continue\n"
4032 "main(): returned from first free() call\n"
4033 "main(): returned from second free() call\n"
4034 msgstr ""
4035 "$ B<./a.out 1>             # Diagnose error and continue\n"
4036 "main(): returned from first free() call\n"
4037 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4038 "main(): returned from second free() call\n"
4039 "$ B<./a.out 2>             # Abort without error message\n"
4040 "main(): returned from first free() call\n"
4041 "Aborted (core dumped)\n"
4042 "$ B<./a.out 0>             # Ignore error and continue\n"
4043 "main(): returned from first free() call\n"
4044 "main(): returned from second free() call\n"
4045
4046 #. type: Plain text
4047 #: build/C/man3/mallopt.3:523
4048 msgid ""
4049 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4050 "environment variable:"
4051 msgstr ""
4052
4053 #. type: Plain text
4054 #: build/C/man3/mallopt.3:530
4055 #, no-wrap
4056 msgid ""
4057 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4058 "main(): returned from first free() call\n"
4059 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4060 "main(): returned from second free() call\n"
4061 msgstr ""
4062 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4063 "main(): returned from first free() call\n"
4064 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4065 "main(): returned from second free() call\n"
4066
4067 #. type: Plain text
4068 #: build/C/man3/mallopt.3:538
4069 #, no-wrap
4070 msgid ""
4071 "#include E<lt>malloc.hE<gt>\n"
4072 "#include E<lt>stdio.hE<gt>\n"
4073 "#include E<lt>stdlib.hE<gt>\n"
4074 msgstr ""
4075 "#include E<lt>malloc.hE<gt>\n"
4076 "#include E<lt>stdio.hE<gt>\n"
4077 "#include E<lt>stdlib.hE<gt>\n"
4078
4079 #. type: Plain text
4080 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4081 #, no-wrap
4082 msgid ""
4083 "int\n"
4084 "main(int argc, char *argv[])\n"
4085 "{\n"
4086 "    char *p;\n"
4087 msgstr ""
4088 "int\n"
4089 "main(int argc, char *argv[])\n"
4090 "{\n"
4091 "    char *p;\n"
4092
4093 #. type: Plain text
4094 #: build/C/man3/mallopt.3:550
4095 #, no-wrap
4096 msgid ""
4097 "    if (argc E<gt> 1) {\n"
4098 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4099 "            fprintf(stderr, \"mallopt() failed\");\n"
4100 "            exit(EXIT_FAILURE);\n"
4101 "        }\n"
4102 "    }\n"
4103 msgstr ""
4104 "    if (argc E<gt> 1) {\n"
4105 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4106 "            fprintf(stderr, \"mallopt() failed\");\n"
4107 "            exit(EXIT_FAILURE);\n"
4108 "        }\n"
4109 "    }\n"
4110
4111 #. type: Plain text
4112 #: build/C/man3/mallopt.3:556
4113 #, no-wrap
4114 msgid ""
4115 "    p = malloc(1000);\n"
4116 "    if (p == NULL) {\n"
4117 "        fprintf(stderr, \"malloc() failed\");\n"
4118 "        exit(EXIT_FAILURE);\n"
4119 "    }\n"
4120 msgstr ""
4121 "    p = malloc(1000);\n"
4122 "    if (p == NULL) {\n"
4123 "        fprintf(stderr, \"malloc() failed\");\n"
4124 "        exit(EXIT_FAILURE);\n"
4125 "    }\n"
4126
4127 #. type: Plain text
4128 #: build/C/man3/mallopt.3:559
4129 #, no-wrap
4130 msgid ""
4131 "    free(p);\n"
4132 "    printf(\"main(): returned from first free() call\\en\");\n"
4133 msgstr ""
4134 "    free(p);\n"
4135 "    printf(\"main(): returned from first free() call\\en\");\n"
4136
4137 #. type: Plain text
4138 #: build/C/man3/mallopt.3:562
4139 #, no-wrap
4140 msgid ""
4141 "    free(p);\n"
4142 "    printf(\"main(): returned from second free() call\\en\");\n"
4143 msgstr ""
4144 "    free(p);\n"
4145 "    printf(\"main(): returned from second free() call\\en\");\n"
4146
4147 #. type: Plain text
4148 #: build/C/man3/mallopt.3:580
4149 msgid ""
4150 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4151 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4152 "B<mtrace>(3), B<posix_memalign>(3)"
4153 msgstr ""
4154 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4155 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4156 "B<mtrace>(3), B<posix_memalign>(3)"
4157
4158 #. type: TH
4159 #: build/C/man3/mcheck.3:25
4160 #, no-wrap
4161 msgid "MCHECK"
4162 msgstr "MCHECK"
4163
4164 #. type: TH
4165 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4166 #, no-wrap
4167 msgid "2012-04-18"
4168 msgstr "2012-04-18"
4169
4170 #. type: Plain text
4171 #: build/C/man3/mcheck.3:28
4172 msgid ""
4173 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4174 msgstr ""
4175
4176 #. type: Plain text
4177 #: build/C/man3/mcheck.3:31
4178 #, no-wrap
4179 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4180 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4181
4182 #. type: Plain text
4183 #: build/C/man3/mcheck.3:33
4184 #, no-wrap
4185 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4186 msgstr ""
4187
4188 #. type: Plain text
4189 #: build/C/man3/mcheck.3:35
4190 #, no-wrap
4191 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4192 msgstr ""
4193
4194 #. type: Plain text
4195 #: build/C/man3/mcheck.3:37
4196 #, no-wrap
4197 msgid "B<void mcheck_check_all(void);>\n"
4198 msgstr "B<void mcheck_check_all(void);>\n"
4199
4200 #. type: Plain text
4201 #: build/C/man3/mcheck.3:39
4202 #, no-wrap
4203 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4204 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4205
4206 #. type: Plain text
4207 #: build/C/man3/mcheck.3:51
4208 msgid ""
4209 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4210 "(3)  family of memory-allocation functions.  These hooks cause certain "
4211 "consistency checks to be performed on the state of the heap.  The checks can "
4212 "detect application errors such as freeing a block of memory more than once "
4213 "or corrupting the bookkeeping data structures that immediately precede a "
4214 "block of allocated memory."
4215 msgstr ""
4216
4217 #. type: Plain text
4218 #: build/C/man3/mcheck.3:63
4219 msgid ""
4220 "To be effective, the B<mcheck>()  function must be called before the first "
4221 "call to B<malloc>(3)  or a related function.  In cases where this is "
4222 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4223 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4224 "memory-allocation function."
4225 msgstr ""
4226
4227 #. type: Plain text
4228 #: build/C/man3/mcheck.3:71
4229 msgid ""
4230 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4231 "checks on all allocated blocks whenever one of the memory-allocation "
4232 "functions is called.  This can be very slow!"
4233 msgstr ""
4234
4235 #. type: Plain text
4236 #: build/C/man3/mcheck.3:78
4237 msgid ""
4238 "The B<mcheck_check_all>()  function causes an immediate check on all "
4239 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4240 "beforehand."
4241 msgstr ""
4242
4243 #. type: Plain text
4244 #: build/C/man3/mcheck.3:91
4245 msgid ""
4246 "If the system detects an inconsistency in the heap, the caller-supplied "
4247 "function pointed to by I<abortfunc> is invoked with a single argument "
4248 "argument, I<mstatus>, that indicates what type of inconsistency was "
4249 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4250 "message on I<stderr> and calls B<abort>(3)."
4251 msgstr ""
4252
4253 #. type: Plain text
4254 #: build/C/man3/mcheck.3:103
4255 msgid ""
4256 "The B<mprobe>()  function performs a consistency check on the block of "
4257 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4258 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4259 msgstr ""
4260
4261 #. type: Plain text
4262 #: build/C/man3/mcheck.3:111
4263 msgid ""
4264 "The following list describes the values returned by B<mprobe>()  or passed "
4265 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4266 msgstr ""
4267
4268 #. type: TP
4269 #: build/C/man3/mcheck.3:111
4270 #, no-wrap
4271 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4272 msgstr ""
4273
4274 #. type: Plain text
4275 #: build/C/man3/mcheck.3:116
4276 msgid ""
4277 "B<mcheck>()  was not called before the first memory allocation function was "
4278 "called.  Consistency checking is not possible."
4279 msgstr ""
4280
4281 #. type: TP
4282 #: build/C/man3/mcheck.3:116
4283 #, no-wrap
4284 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4285 msgstr ""
4286
4287 #. type: Plain text
4288 #: build/C/man3/mcheck.3:119
4289 msgid "No inconsistency detected."
4290 msgstr ""
4291
4292 #. type: TP
4293 #: build/C/man3/mcheck.3:119
4294 #, no-wrap
4295 msgid "B<MCHECK_HEAD>"
4296 msgstr "B<MCHECK_HEAD>"
4297
4298 #. type: Plain text
4299 #: build/C/man3/mcheck.3:122
4300 msgid "Memory preceding an allocated block was clobbered."
4301 msgstr ""
4302
4303 #. type: TP
4304 #: build/C/man3/mcheck.3:122
4305 #, no-wrap
4306 msgid "B<MCHECK_TAIL>"
4307 msgstr "B<MCHECK_TAIL>"
4308
4309 #. type: Plain text
4310 #: build/C/man3/mcheck.3:125
4311 msgid "Memory following an allocated block was clobbered."
4312 msgstr ""
4313
4314 #. type: TP
4315 #: build/C/man3/mcheck.3:125
4316 #, no-wrap
4317 msgid "B<MCHECK_FREE>"
4318 msgstr "B<MCHECK_FREE>"
4319
4320 #. type: Plain text
4321 #: build/C/man3/mcheck.3:129
4322 msgid "A block of memory was freed twice."
4323 msgstr ""
4324
4325 #. type: Plain text
4326 #: build/C/man3/mcheck.3:134
4327 msgid ""
4328 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4329 msgstr ""
4330
4331 #. type: Plain text
4332 #: build/C/man3/mcheck.3:145
4333 msgid ""
4334 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4335 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4336 "since at least glibc 2.0"
4337 msgstr ""
4338
4339 #.  But is MALLOC_CHECK_ slower?
4340 #. type: Plain text
4341 #: build/C/man3/mcheck.3:159
4342 msgid ""
4343 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4344 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4345 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4346 "application to be relinked."
4347 msgstr ""
4348
4349 #. type: Plain text
4350 #: build/C/man3/mcheck.3:165
4351 msgid ""
4352 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4353 "same block of memory twice.  The following shell session demonstrates what "
4354 "happens when running the program:"
4355 msgstr ""
4356
4357 #. type: Plain text
4358 #: build/C/man3/mcheck.3:170
4359 #, no-wrap
4360 msgid ""
4361 "$B< ./a.out>\n"
4362 "About to free\n"
4363 msgstr ""
4364
4365 #. type: Plain text
4366 #: build/C/man3/mcheck.3:174
4367 #, no-wrap
4368 msgid ""
4369 "About to free a second time\n"
4370 "block freed twice\n"
4371 "Aborted (core dumped)\n"
4372 msgstr ""
4373
4374 #. type: Plain text
4375 #: build/C/man3/mcheck.3:182
4376 #, no-wrap
4377 msgid ""
4378 "#include E<lt>stdlib.hE<gt>\n"
4379 "#include E<lt>stdio.hE<gt>\n"
4380 "#include E<lt>mcheck.hE<gt>\n"
4381 msgstr ""
4382 "#include E<lt>stdlib.hE<gt>\n"
4383 "#include E<lt>stdio.hE<gt>\n"
4384 "#include E<lt>mcheck.hE<gt>\n"
4385
4386 #. type: Plain text
4387 #: build/C/man3/mcheck.3:190
4388 #, no-wrap
4389 msgid ""
4390 "    if (mcheck(NULL) != 0) {\n"
4391 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4392 msgstr ""
4393
4394 #. type: Plain text
4395 #: build/C/man3/mcheck.3:193
4396 #, no-wrap
4397 msgid ""
4398 "        exit(EXIT_FAILURE);\n"
4399 "    }\n"
4400 msgstr ""
4401 "        exit(EXIT_FAILURE);\n"
4402 "    }\n"
4403
4404 #. type: Plain text
4405 #: build/C/man3/mcheck.3:195
4406 #, no-wrap
4407 msgid "    p = malloc(1000);\n"
4408 msgstr "    p = malloc(1000);\n"
4409
4410 #. type: Plain text
4411 #: build/C/man3/mcheck.3:200
4412 #, no-wrap
4413 msgid ""
4414 "    fprintf(stderr, \"About to free\\en\");\n"
4415 "    free(p);\n"
4416 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4417 "    free(p);\n"
4418 msgstr ""
4419
4420 #. type: Plain text
4421 #: build/C/man3/mcheck.3:208
4422 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4423 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4424
4425 #. type: TH
4426 #: build/C/man2/mlock.2:26
4427 #, no-wrap
4428 msgid "MLOCK"
4429 msgstr "MLOCK"
4430
4431 #. type: TH
4432 #: build/C/man2/mlock.2:26
4433 #, no-wrap
4434 msgid "2011-09-14"
4435 msgstr "2011-09-14"
4436
4437 #. type: Plain text
4438 #: build/C/man2/mlock.2:29
4439 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4440 msgstr "mlock - メモリのロックとロック解除を行う"
4441
4442 #. type: Plain text
4443 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4444 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4445 #, no-wrap
4446 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4447 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4448
4449 #. type: Plain text
4450 #: build/C/man2/mlock.2:35
4451 #, no-wrap
4452 msgid ""
4453 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4454 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4455 msgstr ""
4456 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4457 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4458
4459 #. type: Plain text
4460 #: build/C/man2/mlock.2:38
4461 #, no-wrap
4462 msgid ""
4463 "B<int mlockall(int >I<flags>B<);>\n"
4464 "B<int munlockall(void);>\n"
4465 msgstr ""
4466 "B<int mlockall(int >I<flags>B<);>\n"
4467 "B<int munlockall(void);>\n"
4468
4469 #. type: Plain text
4470 #: build/C/man2/mlock.2:54
4471 msgid ""
4472 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4473 "process's virtual address space into RAM, preventing that memory from being "
4474 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4475 "converse operation, respectively unlocking part or all of the calling "
4476 "process's virtual address space, so that pages in the specified virtual "
4477 "address range may once more to be swapped out if required by the kernel "
4478 "memory manager.  Memory locking and unlocking are performed in units of "
4479 "whole pages."
4480 msgstr ""
4481 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4482 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4483 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4484 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4485 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4486 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4487 "る。"
4488
4489 #. type: SS
4490 #: build/C/man2/mlock.2:54
4491 #, no-wrap
4492 msgid "mlock() and munlock()"
4493 msgstr "mlock() と munlock()"
4494
4495 #. type: Plain text
4496 #: build/C/man2/mlock.2:64
4497 msgid ""
4498 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4499 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4500 "address range are guaranteed to be resident in RAM when the call returns "
4501 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4502 msgstr ""
4503 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4504 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4505 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4506 "れるまで RAM に残り続けることが保証される。"
4507
4508 #. type: Plain text
4509 #: build/C/man2/mlock.2:73
4510 msgid ""
4511 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4512 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4513 "of the specified memory range can be moved to external swap space again by "
4514 "the kernel."
4515 msgstr ""
4516 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4517 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4518 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4519
4520 #. type: SS
4521 #: build/C/man2/mlock.2:73
4522 #, no-wrap
4523 msgid "mlockall() and munlockall()"
4524 msgstr "mlockall() と munlockall()"
4525
4526 #. type: Plain text
4527 #: build/C/man2/mlock.2:83
4528 msgid ""
4529 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4530 "process.  This includes the pages of the code, data and stack segment, as "
4531 "well as shared libraries, user space kernel data, shared memory, and memory-"
4532 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4533 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4534 "later unlocked."
4535 msgstr ""
4536 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4537 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4538 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4539 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4540 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4541 "残り続けることが保証される。"
4542
4543 #. type: Plain text
4544 #: build/C/man2/mlock.2:88
4545 msgid ""
4546 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4547 "following constants:"
4548 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4549
4550 #. type: TP
4551 #: build/C/man2/mlock.2:88
4552 #, no-wrap
4553 msgid "B<MCL_CURRENT>"
4554 msgstr "B<MCL_CURRENT>"
4555
4556 #. type: Plain text
4557 #: build/C/man2/mlock.2:92
4558 msgid ""
4559 "Lock all pages which are currently mapped into the address space of the "
4560 "process."
4561 msgstr ""
4562 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4563
4564 #. type: TP
4565 #: build/C/man2/mlock.2:92
4566 #, no-wrap
4567 msgid "B<MCL_FUTURE>"
4568 msgstr "B<MCL_FUTURE>"
4569
4570 #. type: Plain text
4571 #: build/C/man2/mlock.2:99
4572 msgid ""
4573 "Lock all pages which will become mapped into the address space of the "
4574 "process in the future.  These could be for instance new pages required by a "
4575 "growing heap and stack as well as new memory mapped files or shared memory "
4576 "regions."
4577 msgstr ""
4578 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4579 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4580 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4581
4582 #. type: Plain text
4583 #: build/C/man2/mlock.2:112
4584 msgid ""
4585 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4586 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4587 "locked bytes to exceed the permitted maximum (see below).  In the same "
4588 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4589 "expansion and deliver a B<SIGSEGV> signal to the process."
4590 msgstr ""
4591 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4592 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4593 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4594 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4595 "スに送る。"
4596
4597 #. type: Plain text
4598 #: build/C/man2/mlock.2:116
4599 msgid ""
4600 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4601 "calling process."
4602 msgstr ""
4603 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4604 "全てのページをロック解除する。"
4605
4606 #. type: Plain text
4607 #: build/C/man2/mlock.2:122
4608 msgid ""
4609 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4610 "is set appropriately, and no changes are made to any locks in the address "
4611 "space of the process."
4612 msgstr ""
4613 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4614 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4615 "れない。"
4616
4617 #. type: Plain text
4618 #: build/C/man2/mlock.2:131
4619 msgid ""
4620 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4621 "resource limit, but tried to lock more memory than the limit permitted.  "
4622 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4623 msgstr ""
4624 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4625 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4626 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4627
4628 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4629 #.  take into account whether the to-be-locked range overlaps with
4630 #.  already locked pages.  Thus, suppose we allocate
4631 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4632 #.  mlock(), and then lock the *same* page range a second time.
4633 #.  In the case, the second mlock() call will fail, since the check
4634 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4635 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4636 #. type: Plain text
4637 #: build/C/man2/mlock.2:143
4638 msgid ""
4639 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4640 "RAM."
4641 msgstr ""
4642 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4643
4644 #. SVr4 documents an additional EAGAIN error code.
4645 #. type: Plain text
4646 #: build/C/man2/mlock.2:149
4647 msgid ""
4648 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4649 "perform the requested operation."
4650 msgstr ""
4651 "呼び出し側が特権を持っていないが、\n"
4652 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4653
4654 #. type: Plain text
4655 #: build/C/man2/mlock.2:154
4656 msgid "For B<mlock>()  and B<munlock>():"
4657 msgstr "B<mlock>()  と B<munlock>()  用として:"
4658
4659 #. type: Plain text
4660 #: build/C/man2/mlock.2:157
4661 msgid "Some or all of the specified address range could not be locked."
4662 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4663
4664 #. type: Plain text
4665 #: build/C/man2/mlock.2:164
4666 msgid ""
4667 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4668 "addition may have resulted in an overflow)."
4669 msgstr ""
4670 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4671 "(例えば、加算でオーバーフローが発生したなど)。"
4672
4673 #. type: Plain text
4674 #: build/C/man2/mlock.2:169
4675 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4676 msgstr ""
4677 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4678
4679 #. type: Plain text
4680 #: build/C/man2/mlock.2:173
4681 msgid ""
4682 "Some of the specified address range does not correspond to mapped pages in "
4683 "the address space of the process."
4684 msgstr ""
4685 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4686 "い。"
4687
4688 #. type: Plain text
4689 #: build/C/man2/mlock.2:176
4690 msgid "For B<mlockall>():"
4691 msgstr "B<mlockall>()  用として:"
4692
4693 #. type: Plain text
4694 #: build/C/man2/mlock.2:179
4695 msgid "Unknown I<flags> were specified."
4696 msgstr "未知の I<flags> が指定された。"
4697
4698 #. type: Plain text
4699 #: build/C/man2/mlock.2:182
4700 msgid "For B<munlockall>():"
4701 msgstr "B<munlockall>()  用として:"
4702
4703 #. type: Plain text
4704 #: build/C/man2/mlock.2:186
4705 msgid ""
4706 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4707 msgstr ""
4708 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4709
4710 #. type: Plain text
4711 #: build/C/man2/mlock.2:188
4712 msgid "POSIX.1-2001, SVr4."
4713 msgstr "POSIX.1-2001, SVr4."
4714
4715 #. type: SH
4716 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4717 #, no-wrap
4718 msgid "AVAILABILITY"
4719 msgstr "可用性"
4720
4721 #. type: Plain text
4722 #: build/C/man2/mlock.2:200
4723 msgid ""
4724 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4725 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4726 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4727 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4728 msgstr ""
4729 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4730 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4731 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4732 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4733 "び出すことで決定できる。"
4734
4735 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4736 #.  -1: unavailable, 0: ask using sysconf().
4737 #.  glibc defines it to 1.
4738 #. type: Plain text
4739 #: build/C/man2/mlock.2:213
4740 msgid ""
4741 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4742 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4743 "than 0.  (See also B<sysconf>(3).)"
4744 msgstr ""
4745 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4746 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4747 "(B<sysconf>(3)  も参照のこと)。"
4748
4749 #. type: Plain text
4750 #: build/C/man2/mlock.2:231
4751 msgid ""
4752 "Memory locking has two main applications: real-time algorithms and high-"
4753 "security data processing.  Real-time applications require deterministic "
4754 "timing, and, like scheduling, paging is one major cause of unexpected "
4755 "program execution delays.  Real-time applications will usually also switch "
4756 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4757 "security software often handles critical bytes like passwords or secret keys "
4758 "as data structures.  As a result of paging, these secrets could be "
4759 "transferred onto a persistent swap store medium, where they might be "
4760 "accessible to the enemy long after the security software has erased the "
4761 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4762 "laptops and some desktop computers will save a copy of the system's RAM to "
4763 "disk, regardless of memory locks.)"
4764 msgstr ""
4765 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4766 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4767 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4768 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4769 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4770 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4771 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4772 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4773 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4774 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4775 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4776 "存することに注意)。"
4777
4778 #. type: Plain text
4779 #: build/C/man2/mlock.2:244
4780 msgid ""
4781 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4782 "faults should reserve enough locked stack pages before entering the time-"
4783 "critical section, so that no page fault can be caused by function calls.  "
4784 "This can be achieved by calling a function that allocates a sufficiently "
4785 "large automatic variable (an array) and writes to the memory occupied by "
4786 "this array in order to touch these stack pages.  This way, enough pages will "
4787 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4788 "that not even copy-on-write page faults can occur in the critical section."
4789 msgstr ""
4790 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4791 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4792 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4793 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4794 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4795 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4796 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4797 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4798 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4799
4800 #. type: Plain text
4801 #: build/C/man2/mlock.2:250
4802 msgid ""
4803 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4804 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4805 "terminates."
4806 msgstr ""
4807 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4808 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4809 "れる)。"
4810
4811 #. type: Plain text
4812 #: build/C/man2/mlock.2:254
4813 msgid ""
4814 "The memory lock on an address range is automatically removed if the address "
4815 "range is unmapped via B<munmap>(2)."
4816 msgstr ""
4817 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4818 "よってアンマップされた場合は削除される。"
4819
4820 #. type: Plain text
4821 #: build/C/man2/mlock.2:267
4822 msgid ""
4823 "Memory locks do not stack, that is, pages which have been locked several "
4824 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4825 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4826 "Pages which are mapped to several locations or by several processes stay "
4827 "locked into RAM as long as they are locked at least at one location or by at "
4828 "least one process."
4829 msgstr ""
4830 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4831 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4832 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4833 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4834 "のプロセスでロックされている限りは RAM に残り続ける。"
4835
4836 #. type: Plain text
4837 #: build/C/man2/mlock.2:278
4838 msgid ""
4839 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4840 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4841 "implementation to require that I<addr> is page aligned, so portable "
4842 "applications should ensure this."
4843 msgstr ""
4844 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4845 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4846 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4847 "ケーションではきちんと境界に合わせた方が良い。"
4848
4849 #. type: Plain text
4850 #: build/C/man2/mlock.2:291
4851 msgid ""
4852 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4853 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4854 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4855 msgstr ""
4856 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4857 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4858 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4859 "表示される。"
4860
4861 #. type: SS
4862 #: build/C/man2/mlock.2:291
4863 #, no-wrap
4864 msgid "Limits and permissions"
4865 msgstr "制限と権限"
4866
4867 #. type: Plain text
4868 #: build/C/man2/mlock.2:298
4869 msgid ""
4870 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4871 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4872 "defines a limit on how much memory the process may lock."
4873 msgstr ""
4874 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4875 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4876 "できるかの制限を定義する。"
4877
4878 #. type: Plain text
4879 #: build/C/man2/mlock.2:304
4880 msgid ""
4881 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4882 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4883 "instead defines a limit on how much memory an unprivileged process may lock."
4884 msgstr ""
4885 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4886 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4887 "クできるメモリ量の制限を定義する。"
4888
4889 #. type: Plain text
4890 #: build/C/man2/mlock.2:312
4891 msgid ""
4892 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4893 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4894 "was rectified in kernel 2.4.18."
4895 msgstr ""
4896 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4897 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4898 "ネル 2.4.18 で修正された。"
4899
4900 #.  See the following LKML thread:
4901 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4902 #.  "Rationale for RLIMIT_MEMLOCK"
4903 #.  23 Jan 2006
4904 #. type: Plain text
4905 #: build/C/man2/mlock.2:329
4906 msgid ""
4907 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4908 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4909 "example, setting its effective UID to a nonzero value), then subsequent "
4910 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4911 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4912 msgstr ""
4913 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4914 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4915 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4916 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4917 "B<brk>(2))  は失敗する。"
4918
4919 #. type: Plain text
4920 #: build/C/man2/mlock.2:336
4921 msgid ""
4922 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4923 "B<capabilities>(7)"
4924 msgstr ""
4925 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4926 "B<capabilities>(7)"
4927
4928 #. type: TH
4929 #: build/C/man2/mmap.2:40
4930 #, no-wrap
4931 msgid "MMAP"
4932 msgstr "MMAP"
4933
4934 #. type: TH
4935 #: build/C/man2/mmap.2:40
4936 #, no-wrap
4937 msgid "2013-04-17"
4938 msgstr "2013-04-17"
4939
4940 #. type: Plain text
4941 #: build/C/man2/mmap.2:43
4942 msgid "mmap, munmap - map or unmap files or devices into memory"
4943 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4944
4945 #. type: Plain text
4946 #: build/C/man2/mmap.2:51
4947 #, no-wrap
4948 msgid ""
4949 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4950 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4951 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4952 msgstr ""
4953 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4954 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4955 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4956
4957 #. type: Plain text
4958 #: build/C/man2/mmap.2:54
4959 msgid "See NOTES for information on feature test macro requirements."
4960 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
4961
4962 #. type: Plain text
4963 #: build/C/man2/mmap.2:63
4964 msgid ""
4965 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4966 "process.  The starting address for the new mapping is specified in I<addr>.  "
4967 "The I<length> argument specifies the length of the mapping."
4968 msgstr ""
4969 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4970 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4971 "は I<length> 引き数で指定される。"
4972
4973 #.  Before Linux 2.6.24, the address was rounded up to the next page
4974 #.  boundary; since 2.6.24, it is rounded down!
4975 #. type: Plain text
4976 #: build/C/man2/mmap.2:77
4977 msgid ""
4978 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4979 "the mapping; this is the most portable method of creating a new mapping.  If "
4980 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4981 "the mapping; on Linux, the mapping will be created at a nearby page "
4982 "boundary.  The address of the new mapping is returned as the result of the "
4983 "call."
4984 msgstr ""
4985 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4986 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4987 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4988 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4989 "ングのアドレスは、呼び出しの返り値として返される。"
4990
4991 #. type: Plain text
4992 #: build/C/man2/mmap.2:89
4993 msgid ""
4994 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4995 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4996 "offset I<offset> in the file (or other object) referred to by the file "
4997 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4998 "by I<sysconf(_SC_PAGE_SIZE)>."
4999 msgstr ""
5000 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5001 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5002 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5003 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
5004 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5005
5006 #. type: Plain text
5007 #: build/C/man2/mmap.2:97
5008 msgid ""
5009 "The I<prot> argument describes the desired memory protection of the mapping "
5010 "(and must not conflict with the open mode of the file).  It is either "
5011 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5012 msgstr ""
5013 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5014 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5015 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5016
5017 #. type: TP
5018 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5019 #, no-wrap
5020 msgid "B<PROT_EXEC>"
5021 msgstr "B<PROT_EXEC>"
5022
5023 #. type: Plain text
5024 #: build/C/man2/mmap.2:100
5025 msgid "Pages may be executed."
5026 msgstr "ページは実行可能である。"
5027
5028 #. type: TP
5029 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5030 #, no-wrap
5031 msgid "B<PROT_READ>"
5032 msgstr "B<PROT_READ>"
5033
5034 #. type: Plain text
5035 #: build/C/man2/mmap.2:103
5036 msgid "Pages may be read."
5037 msgstr "ページは読み込み可能である。"
5038
5039 #. type: TP
5040 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5041 #, no-wrap
5042 msgid "B<PROT_WRITE>"
5043 msgstr "B<PROT_WRITE>"
5044
5045 #. type: Plain text
5046 #: build/C/man2/mmap.2:106
5047 msgid "Pages may be written."
5048 msgstr "ページに書き込み可能である。"
5049
5050 #. type: TP
5051 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5052 #, no-wrap
5053 msgid "B<PROT_NONE>"
5054 msgstr "B<PROT_NONE>"
5055
5056 #. type: Plain text
5057 #: build/C/man2/mmap.2:109
5058 msgid "Pages may not be accessed."
5059 msgstr "ページにはアクセスできない。"
5060
5061 #. type: Plain text
5062 #: build/C/man2/mmap.2:118
5063 msgid ""
5064 "The I<flags> argument determines whether updates to the mapping are visible "
5065 "to other processes mapping the same region, and whether updates are carried "
5066 "through to the underlying file.  This behavior is determined by including "
5067 "exactly one of the following values in I<flags>:"
5068 msgstr ""
5069 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5070 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5071 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5072 "I<flags> に含めることで指定する。"
5073
5074 #. type: TP
5075 #: build/C/man2/mmap.2:118
5076 #, no-wrap
5077 msgid "B<MAP_SHARED>"
5078 msgstr "B<MAP_SHARED>"
5079
5080 #. type: Plain text
5081 #: build/C/man2/mmap.2:128
5082 msgid ""
5083 "Share this mapping.  Updates to the mapping are visible to other processes "
5084 "that map this file, and are carried through to the underlying file.  The "
5085 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5086 "called."
5087 msgstr ""
5088 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5089 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5090 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5091 "るまで行われないこともある。"
5092
5093 #. type: TP
5094 #: build/C/man2/mmap.2:128
5095 #, no-wrap
5096 msgid "B<MAP_PRIVATE>"
5097 msgstr "B<MAP_PRIVATE>"
5098
5099 #. type: Plain text
5100 #: build/C/man2/mmap.2:137
5101 msgid ""
5102 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5103 "visible to other processes mapping the same file, and are not carried "
5104 "through to the underlying file.  It is unspecified whether changes made to "
5105 "the file after the B<mmap>()  call are visible in the mapped region."
5106 msgstr ""
5107 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5108 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5109 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5110 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5111 "かは規定されていない。"
5112
5113 #. type: Plain text
5114 #: build/C/man2/mmap.2:139
5115 msgid "Both of these flags are described in POSIX.1-2001."
5116 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5117
5118 #. type: Plain text
5119 #: build/C/man2/mmap.2:142
5120 msgid ""
5121 "In addition, zero or more of the following values can be ORed in I<flags>:"
5122 msgstr ""
5123 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5124 "ことができる。"
5125
5126 #. type: TP
5127 #: build/C/man2/mmap.2:142
5128 #, no-wrap
5129 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5130 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5131
5132 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5133 #. type: Plain text
5134 #: build/C/man2/mmap.2:158
5135 msgid ""
5136 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5137 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5138 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5139 "as to improve context-switch performance on some early 64-bit processors.  "
5140 "Modern x86-64 processors no longer have this performance problem, so use of "
5141 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5142 "ignored when B<MAP_FIXED> is set."
5143 msgstr ""
5144 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5145 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5146 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5147 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5148 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5149 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5150 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5151 "グは無視される。"
5152
5153 #. type: TP
5154 #: build/C/man2/mmap.2:158
5155 #, no-wrap
5156 msgid "B<MAP_ANON>"
5157 msgstr "B<MAP_ANON>"
5158
5159 #. type: Plain text
5160 #: build/C/man2/mmap.2:163
5161 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5162 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5163
5164 #. type: TP
5165 #: build/C/man2/mmap.2:163
5166 #, no-wrap
5167 msgid "B<MAP_ANONYMOUS>"
5168 msgstr "B<MAP_ANONYMOUS>"
5169
5170 #. type: Plain text
5171 #: build/C/man2/mmap.2:185
5172 msgid ""
5173 "The mapping is not backed by any file; its contents are initialized to "
5174 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5175 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5176 "is specified, and portable applications should ensure this.  The use of "
5177 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5178 "only since kernel 2.4."
5179 msgstr ""
5180 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5181 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5182 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5183 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5184 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5185 "以降の Linux でのみサポートされている。"
5186
5187 #. type: TP
5188 #: build/C/man2/mmap.2:185
5189 #, no-wrap
5190 msgid "B<MAP_DENYWRITE>"
5191 msgstr "B<MAP_DENYWRITE>"
5192
5193 #.  Introduced in 1.1.36, removed in 1.3.24.
5194 #. type: Plain text
5195 #: build/C/man2/mmap.2:193
5196 msgid ""
5197 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5198 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5199 "denial-of-service attacks.)"
5200 msgstr ""
5201 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5202 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5203 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5204
5205 #. type: TP
5206 #: build/C/man2/mmap.2:193
5207 #, no-wrap
5208 msgid "B<MAP_EXECUTABLE>"
5209 msgstr "B<MAP_EXECUTABLE>"
5210
5211 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5212 #.  (Long ago, it signaled that the underlying file is an executable.
5213 #.  However, that information was not really used anywhere.)
5214 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5215 #.  MAP_DENYWRITE?
5216 #. type: Plain text
5217 #: build/C/man2/mmap.2:201
5218 msgid "This flag is ignored."
5219 msgstr "このフラグは無視される。"
5220
5221 #. type: TP
5222 #: build/C/man2/mmap.2:201
5223 #, no-wrap
5224 msgid "B<MAP_FILE>"
5225 msgstr "B<MAP_FILE>"
5226
5227 #.  On some systems, this was required as the opposite of
5228 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5229 #. type: Plain text
5230 #: build/C/man2/mmap.2:207
5231 msgid "Compatibility flag.  Ignored."
5232 msgstr "互換性のためのフラグ。無視される。"
5233
5234 #. type: TP
5235 #: build/C/man2/mmap.2:207
5236 #, no-wrap
5237 msgid "B<MAP_FIXED>"
5238 msgstr "B<MAP_FIXED>"
5239
5240 #. type: Plain text
5241 #: build/C/man2/mmap.2:225
5242 msgid ""
5243 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5244 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5245 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5246 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5247 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5248 "requiring a fixed address for a mapping is less portable, the use of this "
5249 "option is discouraged."
5250 msgstr ""
5251 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5252 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5253 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5254 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5255 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5256 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5257 "を推奨する。"
5258
5259 #. type: TP
5260 #: build/C/man2/mmap.2:225
5261 #, no-wrap
5262 msgid "B<MAP_GROWSDOWN>"
5263 msgstr "B<MAP_GROWSDOWN>"
5264
5265 #. type: Plain text
5266 #: build/C/man2/mmap.2:230
5267 msgid ""
5268 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5269 "mapping should extend downward in memory."
5270 msgstr ""
5271 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5272 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5273 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5274
5275 #. type: TP
5276 #: build/C/man2/mmap.2:230
5277 #, no-wrap
5278 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5279 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5280
5281 #. type: Plain text
5282 #: build/C/man2/mmap.2:236
5283 msgid ""
5284 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5285 "I<Documentation/vm/hugetlbpage.txt> for further information."
5286 msgstr ""
5287 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5288 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5289
5290 #. type: TP
5291 #: build/C/man2/mmap.2:236
5292 #, no-wrap
5293 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5294 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5295
5296 #.  If set, the mapped pages will not be swapped out.
5297 #. type: Plain text
5298 #: build/C/man2/mmap.2:242
5299 msgid ""
5300 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5301 "(2).  This flag is ignored in older kernels."
5302 msgstr ""
5303 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5304 "前のカーネルでは、このフラグは無視される。"
5305
5306 #. type: TP
5307 #: build/C/man2/mmap.2:242
5308 #, no-wrap
5309 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5310 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5311
5312 #. type: Plain text
5313 #: build/C/man2/mmap.2:257
5314 msgid ""
5315 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5316 "ahead: create page tables entries only for pages that are already present in "
5317 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5318 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5319 "reimplemented."
5320 msgstr ""
5321 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5322 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5323 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5324 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5325 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5326
5327 #. type: TP
5328 #: build/C/man2/mmap.2:257
5329 #, no-wrap
5330 msgid "B<MAP_NORESERVE>"
5331 msgstr "B<MAP_NORESERVE>"
5332
5333 #. type: Plain text
5334 #: build/C/man2/mmap.2:272
5335 msgid ""
5336 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5337 "one has the guarantee that it is possible to modify the mapping.  When swap "
5338 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5339 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5340 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5341 "effect only for private writable mappings."
5342 msgstr ""
5343 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5344 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5345 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5346 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5347 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5348 "イベート・マッピングについてのみ効果があった。"
5349
5350 #. type: TP
5351 #: build/C/man2/mmap.2:272
5352 #, no-wrap
5353 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5354 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5355
5356 #. type: Plain text
5357 #: build/C/man2/mmap.2:279
5358 msgid ""
5359 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5360 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5361 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5362 "only since Linux 2.6.23."
5363 msgstr ""
5364 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5365 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5366 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5367 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5368 "されている。"
5369
5370 #. type: TP
5371 #: build/C/man2/mmap.2:279
5372 #, no-wrap
5373 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5374 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5375
5376 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5377 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5378 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5379 #.  "pthread_create() slow for many threads; also time to revisit 64b
5380 #.   context switch optimization?"
5381 #. type: Plain text
5382 #: build/C/man2/mmap.2:292
5383 msgid ""
5384 "Allocate the mapping at an address suitable for a process or thread stack.  "
5385 "This flag is currently a no-op, but is used in the glibc threading "
5386 "implementation so that if some architectures require special treatment for "
5387 "stack allocations, support can later be transparently implemented for glibc."
5388 msgstr ""
5389 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5390 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5391 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5392 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5393 "る。"
5394
5395 #. type: TP
5396 #: build/C/man2/mmap.2:292
5397 #, no-wrap
5398 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5399 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5400
5401 #. type: Plain text
5402 #: build/C/man2/mmap.2:302
5403 msgid ""
5404 "Don't clear anonymous pages.  This flag is intended to improve performance "
5405 "on embedded devices.  This flag is honored only if the kernel was configured "
5406 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5407 "implications, that option is normally enabled only on embedded devices (i."
5408 "e., devices where one has complete control of the contents of user memory)."
5409 msgstr ""
5410 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5411 "ス\n"
5412 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5413 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5414 "このフラグは効果を持つ。\n"
5415 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5416 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5417
5418 #. type: Plain text
5419 #: build/C/man2/mmap.2:310
5420 msgid ""
5421 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5422 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5423 "B<MAP_ANON>)."
5424 msgstr ""
5425 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5426 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5427 "B<MAP_ANON>)  もサポートされている。"
5428
5429 #. type: Plain text
5430 #: build/C/man2/mmap.2:317
5431 msgid ""
5432 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5433 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5434 msgstr ""
5435 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5436 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5437
5438 #. type: Plain text
5439 #: build/C/man2/mmap.2:323
5440 msgid ""
5441 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5442 "attributes."
5443 msgstr ""
5444 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5445
5446 #. type: Plain text
5447 #: build/C/man2/mmap.2:331
5448 msgid ""
5449 "A file is mapped in multiples of the page size.  For a file that is not a "
5450 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5451 "writes to that region are not written out to the file.  The effect of "
5452 "changing the size of the underlying file of a mapping on the pages that "
5453 "correspond to added or removed regions of the file is unspecified."
5454 msgstr ""
5455 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5456 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5457 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5458 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5459 "マップされたページに対してどのような影響があるかは規定されていない。"
5460
5461 #. type: SS
5462 #: build/C/man2/mmap.2:331
5463 #, no-wrap
5464 msgid "munmap()"
5465 msgstr "munmap()"
5466
5467 #. type: Plain text
5468 #: build/C/man2/mmap.2:341
5469 msgid ""
5470 "The B<munmap>()  system call deletes the mappings for the specified address "
5471 "range, and causes further references to addresses within the range to "
5472 "generate invalid memory references.  The region is also automatically "
5473 "unmapped when the process is terminated.  On the other hand, closing the "
5474 "file descriptor does not unmap the region."
5475 msgstr ""
5476 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5477 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5478 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5479 "はアンマップされない。"
5480
5481 #. type: Plain text
5482 #: build/C/man2/mmap.2:351
5483 msgid ""
5484 "The address I<addr> must be a multiple of the page size.  All pages "
5485 "containing a part of the indicated range are unmapped, and subsequent "
5486 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5487 "the indicated range does not contain any mapped pages."
5488 msgstr ""
5489 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5490 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5491 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5492 "ていない場合でも エラーにならない。"
5493
5494 #. type: SS
5495 #: build/C/man2/mmap.2:351
5496 #, no-wrap
5497 msgid "Timestamps changes for file-backed mappings"
5498 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5499
5500 #. type: Plain text
5501 #: build/C/man2/mmap.2:358
5502 msgid ""
5503 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5504 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5505 "the first reference to a mapped page will update the field if it has not "
5506 "been already."
5507 msgstr ""
5508 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5509 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5510 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5511 "ページへの最初の参照があった 際に更新される。"
5512
5513 #. type: Plain text
5514 #: build/C/man2/mmap.2:375
5515 msgid ""
5516 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5517 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5518 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5519 "one occurs."
5520 msgstr ""
5521 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5522 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5523 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5524 "B<msync>(2)  が呼ばれる前までに更新される。"
5525
5526 #. type: Plain text
5527 #: build/C/man2/mmap.2:392
5528 msgid ""
5529 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5530 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5531 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5532 "and I<errno> is set (probably to B<EINVAL>)."
5533 msgstr ""
5534 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5535 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5536 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5537 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5538
5539 #. type: TP
5540 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5541 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5542 #: build/C/man2/shmctl.2:302 build/C/man2/shmget.2:189
5543 #: build/C/man2/shmop.2:191
5544 #, no-wrap
5545 msgid "B<EACCES>"
5546 msgstr "B<EACCES>"
5547
5548 #. type: Plain text
5549 #: build/C/man2/mmap.2:413
5550 msgid ""
5551 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5552 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5553 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5554 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5555 msgstr ""
5556 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5557 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5558 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5559 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5560 "が、ファイルは追加 (append) 専用である。"
5561
5562 #. type: Plain text
5563 #: build/C/man2/mmap.2:417
5564 msgid ""
5565 "The file has been locked, or too much memory has been locked (see "
5566 "B<setrlimit>(2))."
5567 msgstr ""
5568 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5569 "(B<setrlimit>(2)  を参照)。"
5570
5571 #. type: Plain text
5572 #: build/C/man2/mmap.2:423
5573 msgid ""
5574 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5575 msgstr ""
5576 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5577 "B<MAP_ANONYMOUS> がセットされていない)。"
5578
5579 #. type: Plain text
5580 #: build/C/man2/mmap.2:431
5581 msgid ""
5582 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5583 "not aligned on a page boundary)."
5584 msgstr ""
5585 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5586 "ジ境界にアラインメントされていない)。"
5587
5588 #. type: Plain text
5589 #: build/C/man2/mmap.2:436
5590 msgid "(since Linux 2.6.12)  I<length> was 0."
5591 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5592
5593 #. type: Plain text
5594 #: build/C/man2/mmap.2:444
5595 msgid ""
5596 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5597 "both of these values."
5598 msgstr ""
5599 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5600 "しくは その両方が含まれていた。"
5601
5602 #. type: TP
5603 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:229
5604 #: build/C/man2/shmget.2:205
5605 #, no-wrap
5606 msgid "B<ENFILE>"
5607 msgstr "B<ENFILE>"
5608
5609 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5610 #. type: Plain text
5611 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:209
5612 msgid "The system limit on the total number of open files has been reached."
5613 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5614
5615 #. type: Plain text
5616 #: build/C/man2/mmap.2:456
5617 msgid ""
5618 "The underlying file system of the specified file does not support memory "
5619 "mapping."
5620 msgstr ""
5621 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5622 "していない。"
5623
5624 #. type: Plain text
5625 #: build/C/man2/mmap.2:460
5626 msgid ""
5627 "No memory is available, or the process's maximum number of mappings would "
5628 "have been exceeded."
5629 msgstr ""
5630 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5631
5632 #.  (Since 2.4.25 / 2.6.0.)
5633 #. type: Plain text
5634 #: build/C/man2/mmap.2:469
5635 msgid ""
5636 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5637 "file on a file system that was mounted no-exec."
5638 msgstr ""
5639 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5640 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5641
5642 #. type: TP
5643 #: build/C/man2/mmap.2:469
5644 #, no-wrap
5645 msgid "B<ETXTBSY>"
5646 msgstr "B<ETXTBSY>"
5647
5648 #. type: Plain text
5649 #: build/C/man2/mmap.2:475
5650 msgid ""
5651 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5652 "writing."
5653 msgstr ""
5654 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5655 "き込み用に開かれている。"
5656
5657 #. type: TP
5658 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:344
5659 #, no-wrap
5660 msgid "B<EOVERFLOW>"
5661 msgstr "B<EOVERFLOW>"
5662
5663 #. type: Plain text
5664 #: build/C/man2/mmap.2:487
5665 msgid ""
5666 "On 32-bit architecture together with the large file extension (i.e., using "
5667 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5668 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5669 msgstr ""
5670 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5671 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
5672 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
5673 "しまう) 場合がある。"
5674
5675 #. type: Plain text
5676 #: build/C/man2/mmap.2:489
5677 msgid "Use of a mapped region can result in these signals:"
5678 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5679
5680 #. type: TP
5681 #: build/C/man2/mmap.2:489
5682 #, no-wrap
5683 msgid "B<SIGSEGV>"
5684 msgstr "B<SIGSEGV>"
5685
5686 #. type: Plain text
5687 #: build/C/man2/mmap.2:492
5688 msgid "Attempted write into a region mapped as read-only."
5689 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5690
5691 #. type: TP
5692 #: build/C/man2/mmap.2:492
5693 #, no-wrap
5694 msgid "B<SIGBUS>"
5695 msgstr "B<SIGBUS>"
5696
5697 #. type: Plain text
5698 #: build/C/man2/mmap.2:497
5699 msgid ""
5700 "Attempted access to a portion of the buffer that does not correspond to the "
5701 "file (for example, beyond the end of the file, including the case where "
5702 "another process has truncated the file)."
5703 msgstr ""
5704 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5705 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5706 "にアクセスしようとした。"
5707
5708 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5709 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5710 #. type: Plain text
5711 #: build/C/man2/mmap.2:501
5712 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5713 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5714
5715 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5716 #.  -1: unavailable, 0: ask using sysconf().
5717 #.  glibc defines it to 1.
5718 #. type: Plain text
5719 #: build/C/man2/mmap.2:515
5720 msgid ""
5721 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5722 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5723 "value greater than 0.  (See also B<sysconf>(3).)"
5724 msgstr ""
5725 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5726 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5727 "(B<sysconf>(3)  も参照のこと)。"
5728
5729 #.  Since around glibc 2.1/2.2, depending on the platform.
5730 #. type: Plain text
5731 #: build/C/man2/mmap.2:530
5732 msgid ""
5733 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5734 "function.  Originally, this function invoked a system call of the same "
5735 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5736 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5737 "with a suitably adjusted value for I<offset>."
5738 msgstr ""
5739 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5740 "に\n"
5741 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5742 "た。\n"
5743 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5744 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5745 "B<mmap2>(2) を起動する。"
5746
5747 #. type: Plain text
5748 #: build/C/man2/mmap.2:543
5749 msgid ""
5750 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5751 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5752 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5753 "they intend to execute code in the new mapping."
5754 msgstr ""
5755 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5756 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5757 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5758 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5759 "常に B<PROT_EXEC> をセットすべきである。"
5760
5761 #. type: Plain text
5762 #: build/C/man2/mmap.2:558
5763 msgid ""
5764 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5765 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5766 "address for the mapping; the address is chosen so as not to conflict with "
5767 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5768 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5769 msgstr ""
5770 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5771 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5772 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5773 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5774 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5775
5776 #. type: Plain text
5777 #: build/C/man2/mmap.2:587
5778 msgid ""
5779 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5780 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5781 "requiring that macro specifically would have been more logical, since these "
5782 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5783 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5784 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5785 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5786 "B<MAP_STACK>."
5787 msgstr ""
5788 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
5789 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
5790 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
5791 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
5792 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
5793 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5794 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
5795 "B<MAP_STACK> である。"
5796
5797 #. type: Plain text
5798 #: build/C/man2/mmap.2:592
5799 msgid ""
5800 "On Linux there are no guarantees like those suggested above under "
5801 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5802 "the system runs out of memory."
5803 msgstr ""
5804 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5805 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5806 "終了されるか分からないからである。"
5807
5808 #. type: Plain text
5809 #: build/C/man2/mmap.2:599
5810 msgid ""
5811 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5812 "is specified as B<PROT_NONE>."
5813 msgstr ""
5814 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5815 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5816
5817 #. type: Plain text
5818 #: build/C/man2/mmap.2:614
5819 msgid ""
5820 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5821 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5822 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5823 "fails with the error B<EINVAL> for this case."
5824 msgstr ""
5825 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5826 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5827 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5828 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5829
5830 #. type: Plain text
5831 #: build/C/man2/mmap.2:630
5832 msgid ""
5833 "POSIX specifies that the system shall always zero fill any partial page at "
5834 "the end of the object and that system will never write any modification of "
5835 "the object beyond its end.  On Linux, when you write data to such partial "
5836 "page after the end of the object, the data stays in the page cache even "
5837 "after the file is closed and unmapped and even though the data is never "
5838 "written to the file itself, subsequent mappings may see the modified "
5839 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5840 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5841 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5842 msgstr ""
5843 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
5844 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
5845 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
5846 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
5847 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
5848 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
5849 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
5850 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
5851 "共有メモリインターフェースを使った場合)。"
5852
5853 #. type: Plain text
5854 #: build/C/man2/mmap.2:642
5855 msgid ""
5856 "The following program prints part of the file specified in its first command-"
5857 "line argument to standard output.  The range of bytes to be printed is "
5858 "specified via offset and length values in the second and third command-line "
5859 "arguments.  The program creates a memory mapping of the required pages of "
5860 "the file and then uses B<write>(2)  to output the desired bytes."
5861 msgstr ""
5862 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5863 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5864 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5865 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5866 "を出力する。"
5867
5868 #. type: Plain text
5869 #: build/C/man2/mmap.2:650
5870 #, no-wrap
5871 msgid ""
5872 "#include E<lt>sys/mman.hE<gt>\n"
5873 "#include E<lt>sys/stat.hE<gt>\n"
5874 "#include E<lt>fcntl.hE<gt>\n"
5875 "#include E<lt>stdio.hE<gt>\n"
5876 "#include E<lt>stdlib.hE<gt>\n"
5877 "#include E<lt>unistd.hE<gt>\n"
5878 msgstr ""
5879 "#include E<lt>sys/mman.hE<gt>\n"
5880 "#include E<lt>sys/stat.hE<gt>\n"
5881 "#include E<lt>fcntl.hE<gt>\n"
5882 "#include E<lt>stdio.hE<gt>\n"
5883 "#include E<lt>stdlib.hE<gt>\n"
5884 "#include E<lt>unistd.hE<gt>\n"
5885
5886 #. type: Plain text
5887 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5888 #, no-wrap
5889 msgid ""
5890 "#define handle_error(msg) \\e\n"
5891 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5892 msgstr ""
5893 "#define handle_error(msg) \\e\n"
5894 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5895
5896 #. type: Plain text
5897 #: build/C/man2/mmap.2:663
5898 #, no-wrap
5899 msgid ""
5900 "int\n"
5901 "main(int argc, char *argv[])\n"
5902 "{\n"
5903 "    char *addr;\n"
5904 "    int fd;\n"
5905 "    struct stat sb;\n"
5906 "    off_t offset, pa_offset;\n"
5907 "    size_t length;\n"
5908 "    ssize_t s;\n"
5909 msgstr ""
5910 "int\n"
5911 "main(int argc, char *argv[])\n"
5912 "{\n"
5913 "    char *addr;\n"
5914 "    int fd;\n"
5915 "    struct stat sb;\n"
5916 "    off_t offset, pa_offset;\n"
5917 "    size_t length;\n"
5918 "    ssize_t s;\n"
5919
5920 #. type: Plain text
5921 #: build/C/man2/mmap.2:668
5922 #, no-wrap
5923 msgid ""
5924 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5925 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5926 "        exit(EXIT_FAILURE);\n"
5927 "    }\n"
5928 msgstr ""
5929 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5930 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5931 "        exit(EXIT_FAILURE);\n"
5932 "    }\n"
5933
5934 #. type: Plain text
5935 #: build/C/man2/mmap.2:672
5936 #, no-wrap
5937 msgid ""
5938 "    fd = open(argv[1], O_RDONLY);\n"
5939 "    if (fd == -1)\n"
5940 "        handle_error(\"open\");\n"
5941 msgstr ""
5942 "    fd = open(argv[1], O_RDONLY);\n"
5943 "    if (fd == -1)\n"
5944 "        handle_error(\"open\");\n"
5945
5946 #. type: Plain text
5947 #: build/C/man2/mmap.2:675
5948 #, no-wrap
5949 msgid ""
5950 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5951 "        handle_error(\"fstat\");\n"
5952 msgstr ""
5953 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5954 "        handle_error(\"fstat\");\n"
5955
5956 #. type: Plain text
5957 #: build/C/man2/mmap.2:679
5958 #, no-wrap
5959 msgid ""
5960 "    offset = atoi(argv[2]);\n"
5961 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5962 "        /* offset for mmap() must be page aligned */\n"
5963 msgstr ""
5964 "    offset = atoi(argv[2]);\n"
5965 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5966 "        /* offset for mmap() must be page aligned */\n"
5967
5968 #. type: Plain text
5969 #: build/C/man2/mmap.2:684
5970 #, no-wrap
5971 msgid ""
5972 "    if (offset E<gt>= sb.st_size) {\n"
5973 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5974 "        exit(EXIT_FAILURE);\n"
5975 "    }\n"
5976 msgstr ""
5977 "    if (offset E<gt>= sb.st_size) {\n"
5978 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5979 "        exit(EXIT_FAILURE);\n"
5980 "    }\n"
5981
5982 #. type: Plain text
5983 #: build/C/man2/mmap.2:690
5984 #, no-wrap
5985 msgid ""
5986 "    if (argc == 4) {\n"
5987 "        length = atoi(argv[3]);\n"
5988 "        if (offset + length E<gt> sb.st_size)\n"
5989 "            length = sb.st_size - offset;\n"
5990 "                /* Can\\(aqt display bytes past end of file */\n"
5991 msgstr ""
5992 "    if (argc == 4) {\n"
5993 "        length = atoi(argv[3]);\n"
5994 "        if (offset + length E<gt> sb.st_size)\n"
5995 "            length = sb.st_size - offset;\n"
5996 "                /* Can\\(aqt display bytes past end of file */\n"
5997
5998 #. type: Plain text
5999 #: build/C/man2/mmap.2:694
6000 #, no-wrap
6001 msgid ""
6002 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6003 "        length = sb.st_size - offset;\n"
6004 "    }\n"
6005 msgstr ""
6006 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6007 "        length = sb.st_size - offset;\n"
6008 "    }\n"
6009
6010 #. type: Plain text
6011 #: build/C/man2/mmap.2:699
6012 #, no-wrap
6013 msgid ""
6014 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6015 "                MAP_PRIVATE, fd, pa_offset);\n"
6016 "    if (addr == MAP_FAILED)\n"
6017 "        handle_error(\"mmap\");\n"
6018 msgstr ""
6019 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6020 "                MAP_PRIVATE, fd, pa_offset);\n"
6021 "    if (addr == MAP_FAILED)\n"
6022 "        handle_error(\"mmap\");\n"
6023
6024 #. type: Plain text
6025 #: build/C/man2/mmap.2:704
6026 #, no-wrap
6027 msgid ""
6028 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6029 "    if (s != length) {\n"
6030 "        if (s == -1)\n"
6031 "            handle_error(\"write\");\n"
6032 msgstr ""
6033 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6034 "    if (s != length) {\n"
6035 "        if (s == -1)\n"
6036 "            handle_error(\"write\");\n"
6037
6038 #. type: Plain text
6039 #: build/C/man2/mmap.2:708
6040 #, no-wrap
6041 msgid ""
6042 "        fprintf(stderr, \"partial write\");\n"
6043 "        exit(EXIT_FAILURE);\n"
6044 "    }\n"
6045 msgstr ""
6046 "        fprintf(stderr, \"partial write\");\n"
6047 "        exit(EXIT_FAILURE);\n"
6048 "    }\n"
6049
6050 #. type: Plain text
6051 #: build/C/man2/mmap.2:725
6052 msgid ""
6053 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6054 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6055 "(2), B<shm_open>(3), B<shm_overview>(7)"
6056 msgstr ""
6057 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6058 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6059 "(2), B<shm_open>(3), B<shm_overview>(7)"
6060
6061 #. type: Plain text
6062 #: build/C/man2/mmap.2:732
6063 msgid ""
6064 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6065 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6066 msgstr ""
6067 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6068 "smaps> の説明。"
6069
6070 #. type: Plain text
6071 #: build/C/man2/mmap.2:737 build/C/man2/msync.2:124
6072 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6073 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6074
6075 #. type: TH
6076 #: build/C/man2/mmap2.2:29
6077 #, no-wrap
6078 msgid "MMAP2"
6079 msgstr "MMAP2"
6080
6081 #. type: TH
6082 #: build/C/man2/mmap2.2:29
6083 #, no-wrap
6084 msgid "2012-04-16"
6085 msgstr "2012-04-16"
6086
6087 #. type: Plain text
6088 #: build/C/man2/mmap2.2:32
6089 msgid "mmap2 - map files or devices into memory"
6090 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mmap2.2:38
6094 #, no-wrap
6095 msgid ""
6096 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6097 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6098 msgstr ""
6099 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6100 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6101
6102 #. type: Plain text
6103 #: build/C/man2/mmap2.2:43
6104 msgid ""
6105 "This is probably not the system call you are interested; instead, see B<mmap>"
6106 "(2), which describes the glibc wrapper function that invokes this system "
6107 "call."
6108 msgstr ""
6109 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6110 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6111 "の\n"
6112 "ラッパー関数についての説明がある。"
6113
6114 #. type: Plain text
6115 #: build/C/man2/mmap2.2:54
6116 msgid ""
6117 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6118 "except that the final argument specifies the offset into the file in 4096-"
6119 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6120 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6121 "bytes)."
6122 msgstr ""
6123 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6124 "だ\n"
6125 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6126 "ト\n"
6127 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6128 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6129 "プ\n"
6130 "できるようになる。"
6131
6132 #. type: Plain text
6133 #: build/C/man2/mmap2.2:61
6134 msgid ""
6135 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
6136 "is returned and I<errno> is set appropriately."
6137 msgstr ""
6138 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6139 "合は -1 が返されて、 I<errno> が適切に設定される。"
6140
6141 #. type: Plain text
6142 #: build/C/man2/mmap2.2:65
6143 msgid "Problem with getting the data from user space."
6144 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mmap2.2:70
6148 msgid ""
6149 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6150 "4096> is not a multiple of the system page size."
6151 msgstr ""
6152 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6153 "4096> がシステムのページサイズの倍数ではない。"
6154
6155 #. type: Plain text
6156 #: build/C/man2/mmap2.2:74
6157 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6158 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6159
6160 #. type: Plain text
6161 #: build/C/man2/mmap2.2:77
6162 msgid "B<mmap2>()  is available since Linux 2.3.31."
6163 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6164
6165 #. type: Plain text
6166 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6167 msgid "This system call is Linux-specific."
6168 msgstr "このシステムコールは Linux 独自である。"
6169
6170 #. type: Plain text
6171 #: build/C/man2/mmap2.2:85
6172 msgid ""
6173 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6174 "rather than the B<mmap>(2)  system call."
6175 msgstr ""
6176 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6177 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6178
6179 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6180 #.  On cris, it looks like the unit might also be the page size,
6181 #.  which is 8192 bytes. -- mtk, June 2007
6182 #. type: Plain text
6183 #: build/C/man2/mmap2.2:92
6184 msgid ""
6185 "On ia64, the unit for I<offset> is actually the system page size, rather "
6186 "than 4096 bytes."
6187 msgstr ""
6188 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6189 "バイトではない。"
6190
6191 #. type: Plain text
6192 #: build/C/man2/mmap2.2:98
6193 msgid ""
6194 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6195 msgstr ""
6196 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6197
6198 #. type: TH
6199 #: build/C/man2/mprotect.2:38
6200 #, no-wrap
6201 msgid "MPROTECT"
6202 msgstr "MPROTECT"
6203
6204 #. type: TH
6205 #: build/C/man2/mprotect.2:38
6206 #, no-wrap
6207 msgid "2012-08-14"
6208 msgstr "2012-08-14"
6209
6210 #. type: Plain text
6211 #: build/C/man2/mprotect.2:41
6212 msgid "mprotect - set protection on a region of memory"
6213 msgstr "mprotect - メモリ領域の保護を設定する"
6214
6215 #. type: Plain text
6216 #: build/C/man2/mprotect.2:46
6217 #, no-wrap
6218 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6219 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6220
6221 #. type: Plain text
6222 #: build/C/man2/mprotect.2:54
6223 msgid ""
6224 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6225 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6226 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6227 msgstr ""
6228 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6229 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6230 "界に一致していなければならない。"
6231
6232 #. type: Plain text
6233 #: build/C/man2/mprotect.2:59
6234 msgid ""
6235 "If the calling process tries to access memory in a manner that violates the "
6236 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6237 msgstr ""
6238 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6239 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6240
6241 #. type: Plain text
6242 #: build/C/man2/mprotect.2:64
6243 msgid ""
6244 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6245 "following list:"
6246 msgstr ""
6247 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6248 "毎の論理和 (bitwize-or) で指定する:"
6249
6250 #. type: Plain text
6251 #: build/C/man2/mprotect.2:67
6252 msgid "The memory cannot be accessed at all."
6253 msgstr "そのメモリには全くアクセスできない。"
6254
6255 #. type: Plain text
6256 #: build/C/man2/mprotect.2:70
6257 msgid "The memory can be read."
6258 msgstr "そのメモリを読み取ることができる。"
6259
6260 #. type: Plain text
6261 #: build/C/man2/mprotect.2:73
6262 msgid "The memory can be modified."
6263 msgstr "そのメモリを変更できる。"
6264
6265 #.  FIXME
6266 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6267 #. type: Plain text
6268 #: build/C/man2/mprotect.2:78
6269 msgid "The memory can be executed."
6270 msgstr "そのメモリは実行可能である。"
6271
6272 #. type: Plain text
6273 #: build/C/man2/mprotect.2:85
6274 msgid ""
6275 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6276 "I<errno> is set appropriately."
6277 msgstr ""
6278 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6279 "I<errno> が適切に設定される。"
6280
6281 #. type: Plain text
6282 #: build/C/man2/mprotect.2:95
6283 msgid ""
6284 "The memory cannot be given the specified access.  This can happen, for "
6285 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6286 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6287 msgstr ""
6288 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6289 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6290 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6291
6292 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6293 #. type: Plain text
6294 #: build/C/man2/mprotect.2:100
6295 msgid ""
6296 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6297 msgstr ""
6298 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6299
6300 #. type: Plain text
6301 #: build/C/man2/mprotect.2:103
6302 msgid "Internal kernel structures could not be allocated."
6303 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6304
6305 #. type: Plain text
6306 #: build/C/man2/mprotect.2:113
6307 msgid ""
6308 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6309 "address space of the process, or specify one or more pages that are not "
6310 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6311 "for these cases.)"
6312 msgstr ""
6313 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6314 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6315 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6316 "成されていた)。"
6317
6318 #.  SVr4 defines an additional error
6319 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6320 #. type: Plain text
6321 #: build/C/man2/mprotect.2:122
6322 msgid ""
6323 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6324 "unspecified if it is applied to a region of memory that was not obtained via "
6325 "B<mmap>(2)."
6326 msgstr ""
6327 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6328 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6329 "されている。"
6330
6331 #. type: Plain text
6332 #: build/C/man2/mprotect.2:129
6333 msgid ""
6334 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6335 "process's address space (except for the kernel vsyscall area).  In "
6336 "particular it can be used to change existing code mappings to be writable."
6337 msgstr ""
6338 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6339 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6340 "マッピングを書き込み可能にするために使われる。"
6341
6342 #. type: Plain text
6343 #: build/C/man2/mprotect.2:139
6344 msgid ""
6345 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6346 "architecture- and kernel version-dependent.  On some hardware architectures "
6347 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6348 msgstr ""
6349 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6350 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6351 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6352
6353 #. type: Plain text
6354 #: build/C/man2/mprotect.2:148
6355 msgid ""
6356 "POSIX.1-2001 says that an implementation may permit access other than that "
6357 "specified in I<prot>, but at a minimum can allow write access only if "
6358 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6359 "has been set."
6360 msgstr ""
6361 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6362 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6363 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6364 "ない点だけは 満たす必要がある。"
6365
6366 #. type: Plain text
6367 #: build/C/man2/mprotect.2:154
6368 msgid ""
6369 "The program below allocates four pages of memory, makes the third of these "
6370 "pages read-only, and then executes a loop that walks upward through the "
6371 "allocated region modifying bytes."
6372 msgstr ""
6373 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6374 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6375 "かって順番にバイト値を変更するループを実行する。"
6376
6377 #. type: Plain text
6378 #: build/C/man2/mprotect.2:157
6379 msgid ""
6380 "An example of what we might see when running the program is the following:"
6381 msgstr "プログラムを実行した場合の一例を以下に示す。"
6382
6383 #. type: Plain text
6384 #: build/C/man2/mprotect.2:163
6385 #, no-wrap
6386 msgid ""
6387 "$B< ./a.out>\n"
6388 "Start of region:        0x804c000\n"
6389 "Got SIGSEGV at address: 0x804e000\n"
6390 msgstr ""
6391 "$B< ./a.out>\n"
6392 "Start of region:        0x804c000\n"
6393 "Got SIGSEGV at address: 0x804e000\n"
6394
6395 #. type: Plain text
6396 #: build/C/man2/mprotect.2:175
6397 #, no-wrap
6398 msgid ""
6399 "#include E<lt>unistd.hE<gt>\n"
6400 "#include E<lt>signal.hE<gt>\n"
6401 "#include E<lt>stdio.hE<gt>\n"
6402 "#include E<lt>malloc.hE<gt>\n"
6403 "#include E<lt>stdlib.hE<gt>\n"
6404 "#include E<lt>errno.hE<gt>\n"
6405 "#include E<lt>sys/mman.hE<gt>\n"
6406 msgstr ""
6407 "#include E<lt>unistd.hE<gt>\n"
6408 "#include E<lt>signal.hE<gt>\n"
6409 "#include E<lt>stdio.hE<gt>\n"
6410 "#include E<lt>malloc.hE<gt>\n"
6411 "#include E<lt>stdlib.hE<gt>\n"
6412 "#include E<lt>errno.hE<gt>\n"
6413 "#include E<lt>sys/mman.hE<gt>\n"
6414
6415 #. type: Plain text
6416 #: build/C/man2/mprotect.2:180
6417 #, no-wrap
6418 msgid "char *buffer;\n"
6419 msgstr "char *buffer;\n"
6420
6421 #. type: Plain text
6422 #: build/C/man2/mprotect.2:188
6423 #, no-wrap
6424 msgid ""
6425 "static void\n"
6426 "handler(int sig, siginfo_t *si, void *unused)\n"
6427 "{\n"
6428 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6429 "            (long) si-E<gt>si_addr);\n"
6430 "    exit(EXIT_FAILURE);\n"
6431 "}\n"
6432 msgstr ""
6433 "static void\n"
6434 "handler(int sig, siginfo_t *si, void *unused)\n"
6435 "{\n"
6436 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6437 "            (long) si-E<gt>si_addr);\n"
6438 "    exit(EXIT_FAILURE);\n"
6439 "}\n"
6440
6441 #. type: Plain text
6442 #: build/C/man2/mprotect.2:195
6443 #, no-wrap
6444 msgid ""
6445 "int\n"
6446 "main(int argc, char *argv[])\n"
6447 "{\n"
6448 "    char *p;\n"
6449 "    int pagesize;\n"
6450 "    struct sigaction sa;\n"
6451 msgstr ""
6452 "int\n"
6453 "main(void)\n"
6454 "{\n"
6455 "    char *p;\n"
6456 "    int pagesize;\n"
6457 "    struct sigaction sa;\n"
6458
6459 #. type: Plain text
6460 #: build/C/man2/mprotect.2:201
6461 #, no-wrap
6462 msgid ""
6463 "    sa.sa_flags = SA_SIGINFO;\n"
6464 "    sigemptyset(&sa.sa_mask);\n"
6465 "    sa.sa_sigaction = handler;\n"
6466 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6467 "        handle_error(\"sigaction\");\n"
6468 msgstr ""
6469 "    sa.sa_flags = SA_SIGINFO;\n"
6470 "    sigemptyset(&sa.sa_mask);\n"
6471 "    sa.sa_sigaction = handler;\n"
6472 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6473 "        handle_error(\"sigaction\");\n"
6474
6475 #. type: Plain text
6476 #: build/C/man2/mprotect.2:205
6477 #, no-wrap
6478 msgid ""
6479 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6480 "    if (pagesize == -1)\n"
6481 "        handle_error(\"sysconf\");\n"
6482 msgstr ""
6483 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6484 "    if (pagesize == -1)\n"
6485 "        handle_error(\"sysconf\");\n"
6486
6487 #. type: Plain text
6488 #: build/C/man2/mprotect.2:208
6489 #, no-wrap
6490 msgid ""
6491 "    /* Allocate a buffer aligned on a page boundary;\n"
6492 "       initial protection is PROT_READ | PROT_WRITE */\n"
6493 msgstr ""
6494 "    /* Allocate a buffer aligned on a page boundary;\n"
6495 "       initial protection is PROT_READ | PROT_WRITE */\n"
6496
6497 #. type: Plain text
6498 #: build/C/man2/mprotect.2:212
6499 #, no-wrap
6500 msgid ""
6501 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6502 "    if (buffer == NULL)\n"
6503 "        handle_error(\"memalign\");\n"
6504 msgstr ""
6505 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6506 "    if (buffer == NULL)\n"
6507 "        handle_error(\"memalign\");\n"
6508
6509 #. type: Plain text
6510 #: build/C/man2/mprotect.2:214
6511 #, no-wrap
6512 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6513 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6514
6515 #. type: Plain text
6516 #: build/C/man2/mprotect.2:218
6517 #, no-wrap
6518 msgid ""
6519 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6520 "                PROT_READ) == -1)\n"
6521 "        handle_error(\"mprotect\");\n"
6522 msgstr ""
6523 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6524 "                PROT_READ) == -1)\n"
6525 "        handle_error(\"mprotect\");\n"
6526
6527 #. type: Plain text
6528 #: build/C/man2/mprotect.2:221
6529 #, no-wrap
6530 msgid ""
6531 "    for (p = buffer ; ; )\n"
6532 "        *(p++) = \\(aqa\\(aq;\n"
6533 msgstr ""
6534 "    for (p = buffer ; ; )\n"
6535 "        *(p++) = \\(aqa\\(aq;\n"
6536
6537 #. type: Plain text
6538 #: build/C/man2/mprotect.2:225
6539 #, no-wrap
6540 msgid ""
6541 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6542 "    exit(EXIT_SUCCESS);\n"
6543 "}\n"
6544 msgstr ""
6545 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6546 "    exit(EXIT_SUCCESS);\n"
6547 "}\n"
6548
6549 #. type: Plain text
6550 #: build/C/man2/mprotect.2:229
6551 msgid "B<mmap>(2), B<sysconf>(3)"
6552 msgstr "B<mmap>(2), B<sysconf>(3)"
6553
6554 #. type: TH
6555 #: build/C/man2/mremap.2:30
6556 #, no-wrap
6557 msgid "MREMAP"
6558 msgstr "MREMAP"
6559
6560 #. type: TH
6561 #: build/C/man2/mremap.2:30
6562 #, no-wrap
6563 msgid "2010-06-10"
6564 msgstr "2010-06-10"
6565
6566 #. type: Plain text
6567 #: build/C/man2/mremap.2:33
6568 msgid "mremap - remap a virtual memory address"
6569 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6570
6571 #. type: Plain text
6572 #: build/C/man2/mremap.2:36
6573 #, no-wrap
6574 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6575 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6576
6577 #. type: Plain text
6578 #: build/C/man2/mremap.2:41
6579 #, no-wrap
6580 msgid ""
6581 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6582 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6583 msgstr ""
6584 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6585 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6586
6587 #. type: Plain text
6588 #: build/C/man2/mremap.2:47
6589 msgid ""
6590 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6591 "moving it at the same time (controlled by the I<flags> argument and the "
6592 "available virtual address space)."
6593 msgstr ""
6594 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6595 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6596 "る)。"
6597
6598 #. type: Plain text
6599 #: build/C/man2/mremap.2:61
6600 msgid ""
6601 "I<old_address> is the old address of the virtual memory block that you want "
6602 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6603 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6604 "requested size of the virtual memory block after the resize.  An optional "
6605 "fifth argument, I<new_address>, may be provided; see the description of "
6606 "B<MREMAP_FIXED> below."
6607 msgstr ""
6608 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6609 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6610 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6611 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6612 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6613 "明を参照のこと。"
6614
6615 #. type: Plain text
6616 #: build/C/man2/mremap.2:73
6617 msgid ""
6618 "In Linux the memory is divided into pages.  A user process has (one or)  "
6619 "several linear virtual memory segments.  Each virtual memory segment has one "
6620 "or more mappings to real memory pages (in the page table).  Each virtual "
6621 "memory segment has its own protection (access rights), which may cause a "
6622 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6623 "to a read-only segment).  Accessing virtual memory outside of the segments "
6624 "will also cause a segmentation violation."
6625 msgstr ""
6626 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6627 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6628 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6629 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6630 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6631 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6632 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6633 "ン侵害が発生する。"
6634
6635 #. type: Plain text
6636 #: build/C/man2/mremap.2:81
6637 msgid ""
6638 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6639 "mapping between virtual addresses and memory pages.  This can be used to "
6640 "implement a very efficient B<realloc>(3)."
6641 msgstr ""
6642 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6643 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6644 "B<realloc>(3)  を実装するのに使用されている。"
6645
6646 #. type: Plain text
6647 #: build/C/man2/mremap.2:83
6648 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6649 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6650
6651 #. type: TP
6652 #: build/C/man2/mremap.2:83
6653 #, no-wrap
6654 msgid "B<MREMAP_MAYMOVE>"
6655 msgstr "B<MREMAP_MAYMOVE>"
6656
6657 #. type: Plain text
6658 #: build/C/man2/mremap.2:95
6659 msgid ""
6660 "By default, if there is not sufficient space to expand a mapping at its "
6661 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6662 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6663 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6664 "mapping location become invalid (offsets relative to the starting address of "
6665 "the mapping should be employed)."
6666 msgstr ""
6667 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6668 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6669 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6670 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6671 "レスからの相対オフセットは有効のままである)。"
6672
6673 #. type: TP
6674 #: build/C/man2/mremap.2:95
6675 #, no-wrap
6676 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6677 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6678
6679 #. type: Plain text
6680 #: build/C/man2/mremap.2:117
6681 msgid ""
6682 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6683 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
6684 "\\ *new_address>, which specifies a page-aligned address to which the "
6685 "mapping must be moved.  Any previous mapping at the address range specified "
6686 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6687 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6688 msgstr ""
6689 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6690 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
6691 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6692 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6693 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6694 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6695 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6696
6697 #. type: Plain text
6698 #: build/C/man2/mremap.2:127
6699 msgid ""
6700 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6701 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6702 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6703 "locked by the process may change."
6704 msgstr ""
6705 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6706 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6707 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6708 "の量は変化する。"
6709
6710 #. type: Plain text
6711 #: build/C/man2/mremap.2:135
6712 msgid ""
6713 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6714 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6715 "and I<errno> is set appropriately."
6716 msgstr ""
6717 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6718 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6719 "切に設定される。"
6720
6721 #. type: Plain text
6722 #: build/C/man2/mremap.2:142
6723 msgid ""
6724 "The caller tried to expand a memory segment that is locked, but this was not "
6725 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6726 msgstr ""
6727 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6728 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6729
6730 #. type: Plain text
6731 #: build/C/man2/mremap.2:151
6732 msgid ""
6733 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6734 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6735 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6736 "the whole address space requested, but those mappings are of different types."
6737 msgstr ""
6738 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6739 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6740 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6741 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6742 "を受け取るだろう。"
6743
6744 #. type: Plain text
6745 #: build/C/man2/mremap.2:179
6746 msgid ""
6747 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6748 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6749 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6750 "was invalid; or the new address range specified by I<new_address> and "
6751 "I<new_size> overlapped the old address range specified by I<old_address> and "
6752 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6753 "B<MREMAP_MAYMOVE>."
6754 msgstr ""
6755 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6756 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6757 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6758 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6759 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6760 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6761 "されていない。"
6762
6763 #. type: Plain text
6764 #: build/C/man2/mremap.2:185
6765 msgid ""
6766 "The memory area cannot be expanded at the current virtual address, and the "
6767 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6768 "(virtual) memory available."
6769 msgstr ""
6770 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6771 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6772
6773 #.  4.2BSD had a (never actually implemented)
6774 #.  .BR mremap (2)
6775 #.  call with completely different semantics.
6776 #. type: Plain text
6777 #: build/C/man2/mremap.2:191
6778 msgid ""
6779 "This call is Linux-specific, and should not be used in programs intended to "
6780 "be portable."
6781 msgstr ""
6782 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6783 "い。"
6784
6785 #. type: Plain text
6786 #: build/C/man2/mremap.2:199
6787 msgid ""
6788 "Prior to version 2.4, glibc did not expose the definition of "
6789 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6790 "I<new_address> argument."
6791 msgstr ""
6792 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6793 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6794
6795 #. type: Plain text
6796 #: build/C/man2/mremap.2:208
6797 msgid ""
6798 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6799 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6800 msgstr ""
6801 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6802 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6803
6804 #. type: Plain text
6805 #: build/C/man2/mremap.2:214
6806 msgid ""
6807 "Your favorite text book on operating systems for more information on paged "
6808 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6809 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6810 "Maurice J. Bach)"
6811 msgstr ""
6812 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6813 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6814 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6815 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6816
6817 #. type: TH
6818 #: build/C/man2/msync.2:25
6819 #, no-wrap
6820 msgid "MSYNC"
6821 msgstr "MSYNC"
6822
6823 #. type: TH
6824 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6825 #, no-wrap
6826 msgid "2008-04-22"
6827 msgstr "2008-04-22"
6828
6829 #. type: Plain text
6830 #: build/C/man2/msync.2:28
6831 msgid "msync - synchronize a file with a memory map"
6832 msgstr "msync - ファイルをマップしたメモリと同期させる"
6833
6834 #. type: Plain text
6835 #: build/C/man2/msync.2:32
6836 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6837 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6838
6839 #. type: Plain text
6840 #: build/C/man2/msync.2:48
6841 msgid ""
6842 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6843 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6844 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6845 "called.  To be more precise, the part of the file that corresponds to the "
6846 "memory area starting at I<addr> and having length I<length> is updated."
6847 msgstr ""
6848 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6849 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6850 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6851 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6852 "更新される。"
6853
6854 #. type: Plain text
6855 #: build/C/man2/msync.2:68
6856 msgid ""
6857 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6858 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6859 "specifies that an update be scheduled, but the call returns immediately.  "
6860 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6861 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6862 "they can be updated with the fresh values just written)."
6863 msgstr ""
6864 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6865 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6866 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6867 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6868 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6869 "に対する他のマッピングを無効にすることを要求する。"
6870
6871 #. type: Plain text
6872 #: build/C/man2/msync.2:73
6873 msgid ""
6874 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6875 "appropriately."
6876 msgstr ""
6877 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6878 "る。"
6879
6880 #. type: TP
6881 #: build/C/man2/msync.2:74
6882 #, no-wrap
6883 msgid "B<EBUSY>"
6884 msgstr "B<EBUSY>"
6885
6886 #. type: Plain text
6887 #: build/C/man2/msync.2:80
6888 msgid ""
6889 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6890 "specified address range."
6891 msgstr ""
6892 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6893 "存在する。"
6894
6895 #. type: Plain text
6896 #: build/C/man2/msync.2:93
6897 msgid ""
6898 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6899 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6900 "B<MS_ASYNC> are set in I<flags>."
6901 msgstr ""
6902 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6903 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6904 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6905
6906 #. type: Plain text
6907 #: build/C/man2/msync.2:96
6908 msgid "The indicated memory (or part of it) was not mapped."
6909 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6910
6911 #. type: Plain text
6912 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6913 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
6914 msgid "POSIX.1-2001."
6915 msgstr "POSIX.1-2001."
6916
6917 #. type: Plain text
6918 #: build/C/man2/msync.2:105
6919 msgid ""
6920 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6921 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6922 msgstr ""
6923 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6924 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6925
6926 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6927 #.  -1: unavailable, 0: ask using sysconf().
6928 #.  glibc defines them to 1.
6929 #. type: Plain text
6930 #: build/C/man2/msync.2:120
6931 msgid ""
6932 "On POSIX systems on which B<msync>()  is available, both "
6933 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6934 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6935 msgstr ""
6936 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6937 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6938 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6939
6940 #. type: TP
6941 #: build/C/man2/msync.2:122 build/C/man7/shm_overview.7:46
6942 #, no-wrap
6943 msgid "B<mmap>(2)"
6944 msgstr "B<mmap>(2)"
6945
6946 #. type: TH
6947 #: build/C/man3/mtrace.3:25
6948 #, no-wrap
6949 msgid "MTRACE"
6950 msgstr "MTRACE"
6951
6952 #. type: Plain text
6953 #: build/C/man3/mtrace.3:28
6954 msgid "mtrace, muntrace - malloc tracing"
6955 msgstr "mtrace, muntrace - malloc のトレース"
6956
6957 #. type: Plain text
6958 #: build/C/man3/mtrace.3:30
6959 msgid "B<#include E<lt>mcheck.hE<gt>>"
6960 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6961
6962 #. type: Plain text
6963 #: build/C/man3/mtrace.3:32
6964 msgid "B<void mtrace(void);>"
6965 msgstr "B<void mtrace(void);>"
6966
6967 #. type: Plain text
6968 #: build/C/man3/mtrace.3:34
6969 msgid "B<void muntrace(void);>"
6970 msgstr "B<void muntrace(void);>"
6971
6972 #. type: Plain text
6973 #: build/C/man3/mtrace.3:46
6974 msgid ""
6975 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6976 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6977 "hook functions record tracing information about memory allocation and "
6978 "deallocation.  The tracing information can be used to discover memory leaks "
6979 "and attempts to free nonallocated memory in a program."
6980 msgstr ""
6981
6982 #. type: Plain text
6983 #: build/C/man3/mtrace.3:57
6984 msgid ""
6985 "The B<muntrace>()  function disables the hook functions installed by "
6986 "B<mtrace>(), so that tracing information is no longer recorded for the "
6987 "memory-allocation functions.  If no hook functions were successfully "
6988 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6989 msgstr ""
6990
6991 #. type: Plain text
6992 #: build/C/man3/mtrace.3:65
6993 msgid ""
6994 "When B<mtrace>()  is called, it checks the value of the environment variable "
6995 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
6996 "tracing information is to be recorded.  If the pathname is successfully "
6997 "opened, it is truncated to zero length."
6998 msgstr ""
6999
7000 #. type: Plain text
7001 #: build/C/man3/mtrace.3:78
7002 msgid ""
7003 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7004 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7005 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7006 "ignored, and B<mtrace>()  has no effect."
7007 msgstr ""
7008
7009 #. type: Plain text
7010 #: build/C/man3/mtrace.3:86
7011 msgid ""
7012 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7013 "program, and B<muntrace>()  is never called."
7014 msgstr ""
7015
7016 #. type: Plain text
7017 #: build/C/man3/mtrace.3:96
7018 msgid ""
7019 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7020 "designed to be human readable.  The GNU C library provides a Perl script, "
7021 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7022 "output.  For best results, the traced program should be compiled with "
7023 "debugging enabled, so that line-number information is recorded in the "
7024 "executable."
7025 msgstr ""
7026
7027 #. type: Plain text
7028 #: build/C/man3/mtrace.3:102
7029 msgid ""
7030 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7031 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7032 msgstr ""
7033
7034 #. type: Plain text
7035 #: build/C/man3/mtrace.3:108
7036 msgid ""
7037 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7038 "the line number references may refer to the previous or following (non-"
7039 "blank)  line of the source code."
7040 msgstr ""
7041
7042 #. type: Plain text
7043 #: build/C/man3/mtrace.3:115
7044 msgid ""
7045 "The shell session below demonstrates the use of the B<mtrace>()  function "
7046 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7047 "different locations.  The demonstration uses the following program:"
7048 msgstr ""
7049
7050 #. type: Plain text
7051 #: build/C/man3/mtrace.3:122
7052 #, no-wrap
7053 msgid ""
7054 "$ B<cat t_mtrace.c>\n"
7055 "#include E<lt>mcheck.hE<gt>\n"
7056 "#include E<lt>stdlib.hE<gt>\n"
7057 "#include E<lt>stdio.hE<gt>\n"
7058 msgstr ""
7059 "$ B<cat t_mtrace.c>\n"
7060 "#include E<lt>mcheck.hE<gt>\n"
7061 "#include E<lt>stdlib.hE<gt>\n"
7062 "#include E<lt>stdio.hE<gt>\n"
7063
7064 #. type: Plain text
7065 #: build/C/man3/mtrace.3:127
7066 #, no-wrap
7067 msgid ""
7068 "int\n"
7069 "main(int argc, char *argv[])\n"
7070 "{\n"
7071 "    int j;\n"
7072 msgstr ""
7073 "int\n"
7074 "main(int argc, char *argv[])\n"
7075 "{\n"
7076 "    int j;\n"
7077
7078 #. type: Plain text
7079 #: build/C/man3/mtrace.3:129
7080 #, no-wrap
7081 msgid "    mtrace();\n"
7082 msgstr "    mtrace();\n"
7083
7084 #. type: Plain text
7085 #: build/C/man3/mtrace.3:132
7086 #, no-wrap
7087 msgid ""
7088 "    for (j = 0; j E<lt> 2; j++)\n"
7089 "        malloc(100);            /* Never freed--a memory leak */\n"
7090 msgstr ""
7091 "    for (j = 0; j E<lt> 2; j++)\n"
7092 "        malloc(100);            /* Never freed--a memory leak */\n"
7093
7094 #. type: Plain text
7095 #: build/C/man3/mtrace.3:136
7096 #, no-wrap
7097 msgid ""
7098 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7099 "    exit(EXIT_SUCCESS);\n"
7100 "}\n"
7101 msgstr ""
7102 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7103 "    exit(EXIT_SUCCESS);\n"
7104 "}\n"
7105
7106 #. type: Plain text
7107 #: build/C/man3/mtrace.3:142
7108 msgid ""
7109 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7110 "memory leaks at two different locations in the program:"
7111 msgstr ""
7112
7113 #. type: Plain text
7114 #: build/C/man3/mtrace.3:155
7115 #, no-wrap
7116 msgid ""
7117 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7118 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7119 "$ B<./t_mtrace>\n"
7120 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7121 "Memory not freed:\n"
7122 "-----------------\n"
7123 "   Address     Size     Caller\n"
7124 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7125 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7126 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7127 msgstr ""
7128 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7129 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7130 "$ B<./t_mtrace>\n"
7131 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7132 "Memory not freed:\n"
7133 "-----------------\n"
7134 "   Address     Size     Caller\n"
7135 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7136 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7137 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7138
7139 #. type: Plain text
7140 #: build/C/man3/mtrace.3:167
7141 msgid ""
7142 "The first two messages about unfreed memory correspond to the two B<malloc>"
7143 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7144 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7145 msgstr ""
7146
7147 #. type: Plain text
7148 #: build/C/man3/mtrace.3:172
7149 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7150 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7151
7152 #. type: TH
7153 #: build/C/man2/posix_fadvise.2:28
7154 #, no-wrap
7155 msgid "POSIX_FADVISE"
7156 msgstr "POSIX_FADVISE"
7157
7158 #. type: TH
7159 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
7160 #: build/C/man2/sync_file_range.2:30
7161 #, no-wrap
7162 msgid "2013-04-01"
7163 msgstr "2013-04-01"
7164
7165 #. type: Plain text
7166 #: build/C/man2/posix_fadvise.2:31
7167 msgid "posix_fadvise - predeclare an access pattern for file data"
7168 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7169
7170 #. type: Plain text
7171 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7172 #, no-wrap
7173 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7174 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7175
7176 #. type: Plain text
7177 #: build/C/man2/posix_fadvise.2:37
7178 #, no-wrap
7179 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7180 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7181
7182 #. type: Plain text
7183 #: build/C/man2/posix_fadvise.2:46
7184 msgid "B<posix_fadvise>():"
7185 msgstr "B<posix_fadvise>():"
7186
7187 #. type: Plain text
7188 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7189 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7190 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7191
7192 #. type: Plain text
7193 #: build/C/man2/posix_fadvise.2:56
7194 msgid ""
7195 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7196 "data in a specific pattern in the future, thus allowing the kernel to "
7197 "perform appropriate optimizations."
7198 msgstr ""
7199 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7200 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7201 "適化を実行することが可能になる。"
7202
7203 #. type: Plain text
7204 #: build/C/man2/posix_fadvise.2:63
7205 msgid ""
7206 "The I<advice> applies to a (not necessarily existent) region starting at "
7207 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7208 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7209 "binding; it merely constitutes an expectation on behalf of the application."
7210 msgstr ""
7211 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7212 "イ\n"
7213 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7214 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7215 "ケー\n"
7216 "ションのために可能性を構成するだけである。"
7217
7218 #. type: Plain text
7219 #: build/C/man2/posix_fadvise.2:65
7220 msgid "Permissible values for I<advice> include:"
7221 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7222
7223 #. type: TP
7224 #: build/C/man2/posix_fadvise.2:65
7225 #, no-wrap
7226 msgid "B<POSIX_FADV_NORMAL>"
7227 msgstr "B<POSIX_FADV_NORMAL>"
7228
7229 #. type: Plain text
7230 #: build/C/man2/posix_fadvise.2:71
7231 msgid ""
7232 "Indicates that the application has no advice to give about its access "
7233 "pattern for the specified data.  If no advice is given for an open file, "
7234 "this is the default assumption."
7235 msgstr ""
7236 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7237 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7238 "合、 これがデフォルトで仮定される。"
7239
7240 #. type: TP
7241 #: build/C/man2/posix_fadvise.2:71
7242 #, no-wrap
7243 msgid "B<POSIX_FADV_SEQUENTIAL>"
7244 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7245
7246 #. type: Plain text
7247 #: build/C/man2/posix_fadvise.2:75
7248 msgid ""
7249 "The application expects to access the specified data sequentially (with "
7250 "lower offsets read before higher ones)."
7251 msgstr ""
7252 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7253 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7254
7255 #. type: TP
7256 #: build/C/man2/posix_fadvise.2:75
7257 #, no-wrap
7258 msgid "B<POSIX_FADV_RANDOM>"
7259 msgstr "B<POSIX_FADV_RANDOM>"
7260
7261 #. type: Plain text
7262 #: build/C/man2/posix_fadvise.2:78
7263 msgid "The specified data will be accessed in random order."
7264 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7265
7266 #. type: TP
7267 #: build/C/man2/posix_fadvise.2:78
7268 #, no-wrap
7269 msgid "B<POSIX_FADV_NOREUSE>"
7270 msgstr "B<POSIX_FADV_NOREUSE>"
7271
7272 #. type: Plain text
7273 #: build/C/man2/posix_fadvise.2:81
7274 msgid "The specified data will be accessed only once."
7275 msgstr "指定されたデータは 1 度しかアクセスされない。"
7276
7277 #. type: TP
7278 #: build/C/man2/posix_fadvise.2:81
7279 #, no-wrap
7280 msgid "B<POSIX_FADV_WILLNEED>"
7281 msgstr "B<POSIX_FADV_WILLNEED>"
7282
7283 #. type: Plain text
7284 #: build/C/man2/posix_fadvise.2:84
7285 msgid "The specified data will be accessed in the near future."
7286 msgstr "指定されたデータは近い将来アクセスされる。"
7287
7288 #. type: TP
7289 #: build/C/man2/posix_fadvise.2:84
7290 #, no-wrap
7291 msgid "B<POSIX_FADV_DONTNEED>"
7292 msgstr "B<POSIX_FADV_DONTNEED>"
7293
7294 #. type: Plain text
7295 #: build/C/man2/posix_fadvise.2:87
7296 msgid "The specified data will not be accessed in the near future."
7297 msgstr "指定されたデータは近い将来アクセスされない。"
7298
7299 #. type: Plain text
7300 #: build/C/man2/posix_fadvise.2:90
7301 msgid "On success, zero is returned.  On error, an error number is returned."
7302 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7303
7304 #. type: Plain text
7305 #: build/C/man2/posix_fadvise.2:94
7306 msgid "The I<fd> argument was not a valid file descriptor."
7307 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7308
7309 #. type: Plain text
7310 #: build/C/man2/posix_fadvise.2:97
7311 msgid "An invalid value was specified for I<advice>."
7312 msgstr "無効な値が I<advice> に指定された。"
7313
7314 #. type: Plain text
7315 #: build/C/man2/posix_fadvise.2:104
7316 msgid ""
7317 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7318 "returns B<EINVAL> in this case.)"
7319 msgstr ""
7320 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7321 "合、Linux は実際には B<EINVAL> を返す)。"
7322
7323 #.  of fadvise64_64()
7324 #. type: Plain text
7325 #: build/C/man2/posix_fadvise.2:112
7326 msgid ""
7327 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7328 "called B<fadvise64>().  Library support has been provided since glibc "
7329 "version 2.2, via the wrapper function B<posix_fadvise>()."
7330 msgstr ""
7331 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7332 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7333 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7334 "ラッパー関数は B<posix_fadvise>() という名前である。"
7335
7336 #. type: Plain text
7337 #: build/C/man2/posix_fadvise.2:121
7338 msgid ""
7339 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7340 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7341 msgstr ""
7342 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7343 "I<off_t> に変更された点に注意すること。"
7344
7345 #. type: Plain text
7346 #: build/C/man2/posix_fadvise.2:127
7347 msgid ""
7348 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7349 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7350 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7351 "the entire file, not just the specified region (but other open file handles "
7352 "to the same file are unaffected)."
7353 msgstr ""
7354 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7355 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7356 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7357 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7358 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7359
7360 #. type: Plain text
7361 #: build/C/man2/posix_fadvise.2:134
7362 msgid ""
7363 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7364 "into the page cache.  The amount of data read may be decreased by the kernel "
7365 "depending on virtual memory load.  (A few megabytes will usually be fully "
7366 "satisfied, and more is rarely useful.)"
7367 msgstr ""
7368 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7369 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7370 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7371 "くてもめったに役に立たない)。"
7372
7373 #. type: Plain text
7374 #: build/C/man2/posix_fadvise.2:138
7375 msgid ""
7376 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7377 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7378 "flag is a no-op."
7379 msgstr ""
7380 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7381 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7382 "フラグは何も行わない。"
7383
7384 #. type: Plain text
7385 #: build/C/man2/posix_fadvise.2:146
7386 msgid ""
7387 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7388 "specified region.  This is useful, for example, while streaming large "
7389 "files.  A program may periodically request the kernel to free cached data "
7390 "that has already been used, so that more useful cached pages are not "
7391 "discarded instead."
7392 msgstr ""
7393 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7394 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7395 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7396 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7397 "されたページが、 代わりに破棄されることはない。"
7398
7399 #. type: Plain text
7400 #: build/C/man2/posix_fadvise.2:154
7401 msgid ""
7402 "Pages that have not yet been written out will be unaffected, so if the "
7403 "application wishes to guarantee that pages will be released, it should call "
7404 "B<fsync>(2)  or B<fdatasync>(2)  first."
7405 msgstr ""
7406 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7407 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7408 "B<fdatasync>(2)  を呼ぶべきである。"
7409
7410 #. type: SS
7411 #: build/C/man2/posix_fadvise.2:154
7412 #, no-wrap
7413 msgid "Architecture-specific variants"
7414 msgstr "アーキテクチャ固有の派生バージョン"
7415
7416 #. type: Plain text
7417 #: build/C/man2/posix_fadvise.2:171
7418 msgid ""
7419 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7420 "of registers (see B<syscall>(2)  for further detail).  On such "
7421 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7422 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7423 "and I<len> arguments.  Therefore, these architectures define a version of "
7424 "the system call that orders the arguments suitably, but otherwise is "
7425 "otherwise exactly the same as B<posix_fadvise>()."
7426 msgstr ""
7427 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7428 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7429 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7430 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7431 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7432 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7433
7434 #. type: Plain text
7435 #: build/C/man2/posix_fadvise.2:173
7436 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7437 msgstr ""
7438 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7439
7440 #. type: Plain text
7441 #: build/C/man2/posix_fadvise.2:178
7442 #, no-wrap
7443 msgid ""
7444 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7445 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7446 msgstr ""
7447 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7448 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7449
7450 #. type: Plain text
7451 #: build/C/man2/posix_fadvise.2:186
7452 msgid ""
7453 "These architecture-specific details are generally hidden from applications "
7454 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7455 "appropriate architecture-specific system call."
7456 msgstr ""
7457 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7458 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7459 "なアーキテクチャ固有のシステムコールが呼び出される。"
7460
7461 #. type: Plain text
7462 #: build/C/man2/posix_fadvise.2:191
7463 msgid ""
7464 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7465 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7466 "through to the end of the file\"."
7467 msgstr ""
7468 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7469 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7470 "いた。"
7471
7472 #.  FIXME . Write a posix_fadvise(3) page.
7473 #. type: Plain text
7474 #: build/C/man2/posix_fadvise.2:197
7475 msgid ""
7476 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7477 "B<posix_madvise>(3)"
7478 msgstr ""
7479 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7480 "B<posix_madvise>(3)"
7481
7482 #. type: TH
7483 #: build/C/man3/posix_fallocate.3:25
7484 #, no-wrap
7485 msgid "POSIX_FALLOCATE"
7486 msgstr "POSIX_FALLOCATE"
7487
7488 #. type: TH
7489 #: build/C/man3/posix_fallocate.3:25 build/C/man2/shmop.2:41
7490 #, no-wrap
7491 msgid "2013-02-12"
7492 msgstr "2013-02-12"
7493
7494 #. type: Plain text
7495 #: build/C/man3/posix_fallocate.3:28
7496 msgid "posix_fallocate - allocate file space"
7497 msgstr "posix_fallocate - ファイルのスペースを確保する"
7498
7499 #. type: Plain text
7500 #: build/C/man3/posix_fallocate.3:33
7501 #, no-wrap
7502 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7503 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7504
7505 #. type: Plain text
7506 #: build/C/man3/posix_fallocate.3:42
7507 msgid "B<posix_fallocate>():"
7508 msgstr "B<posix_fallocate>():"
7509
7510 #. type: Plain text
7511 #: build/C/man3/posix_fallocate.3:61
7512 msgid ""
7513 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7514 "the file referred to by the descriptor I<fd> for the bytes in the range "
7515 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7516 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7517 "range are guaranteed not to fail because of lack of disk space."
7518 msgstr ""
7519 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7520 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7521 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7522 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7523 "失敗しないことが保証される。"
7524
7525 #. type: Plain text
7526 #: build/C/man3/posix_fallocate.3:66
7527 msgid ""
7528 "If the size of the file is less than I<offset>+I<len>, then the file is "
7529 "increased to this size; otherwise the file size is left unchanged."
7530 msgstr ""
7531 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7532 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7533
7534 #. type: Plain text
7535 #: build/C/man3/posix_fallocate.3:72
7536 msgid ""
7537 "B<posix_fallocate>()  returns zero on success, or an error number on "
7538 "failure.  Note that I<errno> is not set."
7539 msgstr ""
7540 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7541 "す。 I<errno> が設定されない点に注意すること。"
7542
7543 #. type: Plain text
7544 #: build/C/man3/posix_fallocate.3:81
7545 msgid "I<offset+len> exceeds the maximum file size."
7546 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7547
7548 #. type: Plain text
7549 #: build/C/man3/posix_fallocate.3:91
7550 msgid "I<fd> does not refer to a regular file."
7551 msgstr "I<fd> が通常のファイルとして参照されていない。"
7552
7553 #. type: Plain text
7554 #: build/C/man3/posix_fallocate.3:100
7555 msgid "I<fd> refers to a pipe."
7556 msgstr "I<fd> がパイプを参照している。"
7557
7558 #. type: Plain text
7559 #: build/C/man3/posix_fallocate.3:103
7560 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7561 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7562
7563 #. type: Plain text
7564 #: build/C/man3/posix_fallocate.3:128
7565 msgid ""
7566 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7567 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7568 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7569 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7570 "zero."
7571 msgstr ""
7572 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7573 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7574 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7575 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7576 "る。"
7577
7578 #. type: Plain text
7579 #: build/C/man3/posix_fallocate.3:133
7580 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7581 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7582
7583 #. type: TH
7584 #: build/C/man3/posix_memalign.3:29
7585 #, no-wrap
7586 msgid "POSIX_MEMALIGN"
7587 msgstr "POSIX_MEMALIGN"
7588
7589 #. type: TH
7590 #: build/C/man3/posix_memalign.3:29
7591 #, no-wrap
7592 msgid "2012-03-23"
7593 msgstr "2012-03-23"
7594
7595 #. type: Plain text
7596 #: build/C/man3/posix_memalign.3:32
7597 msgid ""
7598 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7599 "memory"
7600 msgstr ""
7601 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7602 "されたメモリの割り当てを行う"
7603
7604 #. type: Plain text
7605 #: build/C/man3/posix_memalign.3:39
7606 #, no-wrap
7607 msgid ""
7608 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7609 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7610 "B<void *valloc(size_t >I<size>B<);>\n"
7611 msgstr ""
7612 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7613 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7614 "B<void *valloc(size_t >I<size>B<);>\n"
7615
7616 #. type: Plain text
7617 #: build/C/man3/posix_memalign.3:44
7618 #, no-wrap
7619 msgid ""
7620 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7621 "B<void *pvalloc(size_t >I<size>B<);>\n"
7622 msgstr ""
7623 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7624 "B<void *pvalloc(size_t >I<size>B<);>\n"
7625
7626 #. type: Plain text
7627 #: build/C/man3/posix_memalign.3:54
7628 msgid ""
7629 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7630 "E<gt>=\\ 600"
7631 msgstr ""
7632 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7633 "E<gt>=\\ 600"
7634
7635 #. type: Plain text
7636 #: build/C/man3/posix_memalign.3:57
7637 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7638 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7639
7640 #. type: Plain text
7641 #: build/C/man3/posix_memalign.3:59
7642 msgid "B<valloc>():"
7643 msgstr "B<valloc>():"
7644
7645 #. type: TP
7646 #: build/C/man3/posix_memalign.3:62
7647 #, no-wrap
7648 msgid "Since glibc 2.12:"
7649 msgstr "glibc 2.12 以降:"
7650
7651 #. type: Plain text
7652 #: build/C/man3/posix_memalign.3:69
7653 #, no-wrap
7654 msgid ""
7655 "_BSD_SOURCE ||\n"
7656 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7657 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7658 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7659 msgstr ""
7660 "_BSD_SOURCE ||\n"
7661 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7662 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7663 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7664
7665 #. type: TP
7666 #: build/C/man3/posix_memalign.3:71
7667 #, no-wrap
7668 msgid "Before glibc 2.12:"
7669 msgstr "glibc 2.12 より前:"
7670
7671 #. type: Plain text
7672 #: build/C/man3/posix_memalign.3:75
7673 msgid ""
7674 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7675 "_XOPEN_SOURCE_EXTENDED"
7676 msgstr ""
7677 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7678 "_XOPEN_SOURCE_EXTENDED"
7679
7680 #. type: Plain text
7681 #: build/C/man3/posix_memalign.3:82
7682 msgid ""
7683 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7684 "declaration of B<valloc>(); no feature test macros are required.)"
7685 msgstr ""
7686 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7687 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7688
7689 #.  glibc does this:
7690 #. type: Plain text
7691 #: build/C/man3/posix_memalign.3:103
7692 msgid ""
7693 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7694 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7695 "memory will be a multiple of I<alignment>, which must be a power of two and "
7696 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then B<posix_memalign>"
7697 "()  returns either NULL, or a unique pointer value that can later be "
7698 "successfully passed to B<free>(3)."
7699 msgstr ""
7700 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7701 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7702 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7703 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7704 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7705 "で B<free>(3)  に問題なく渡すことができる。"
7706
7707 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7708 #.  but no standards govern this.
7709 #. type: Plain text
7710 #: build/C/man3/posix_memalign.3:114
7711 msgid ""
7712 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7713 "pointer to the allocated memory.  The memory address will be a multiple of "
7714 "I<alignment>, which must be a power of two."
7715 msgstr ""
7716 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7717 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7718 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7719
7720 #. type: Plain text
7721 #: build/C/man3/posix_memalign.3:123
7722 msgid ""
7723 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7724 "the added restriction that I<size> should be a multiple of I<alignment>."
7725 msgstr ""
7726 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7727 "I<alignment>\n"
7728 "の倍数でなければならないという追加の制限がある点が異なる。"
7729
7730 #. type: Plain text
7731 #: build/C/man3/posix_memalign.3:132
7732 msgid ""
7733 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7734 "pointer to the allocated memory.  The memory address will be a multiple of "
7735 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7736 msgstr ""
7737 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7738 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7739 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7740 "る。"
7741
7742 #. type: Plain text
7743 #: build/C/man3/posix_memalign.3:139
7744 msgid ""
7745 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7746 "the size of the allocation up to the next multiple of the system page size."
7747 msgstr ""
7748 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7749 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7750
7751 #. type: Plain text
7752 #: build/C/man3/posix_memalign.3:141
7753 msgid "For all of these functions, the memory is not zeroed."
7754 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7755
7756 #. type: Plain text
7757 #: build/C/man3/posix_memalign.3:148
7758 msgid ""
7759 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7760 "pointer to the allocated memory, or NULL if the request fails."
7761 msgstr ""
7762 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7763 "た\n"
7764 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7765
7766 #. type: Plain text
7767 #: build/C/man3/posix_memalign.3:155
7768 msgid ""
7769 "B<posix_memalign>()  returns zero on success, or one of the error values "
7770 "listed in the next section on failure.  Note that I<errno> is not set."
7771 msgstr ""
7772 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7773 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7774 "ること。"
7775
7776 #. type: Plain text
7777 #: build/C/man3/posix_memalign.3:162
7778 msgid ""
7779 "The I<alignment> argument was not a power of two, or was not a multiple of "
7780 "I<sizeof(void\\ *)>."
7781 msgstr ""
7782 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
7783 "かった。"
7784
7785 #. type: Plain text
7786 #: build/C/man3/posix_memalign.3:165
7787 msgid "There was insufficient memory to fulfill the allocation request."
7788 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7789
7790 #. type: Plain text
7791 #: build/C/man3/posix_memalign.3:172
7792 msgid ""
7793 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7794 "available in all Linux libc libraries."
7795 msgstr ""
7796 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7797 "すべての Linux libc ライブラリで使用可能である。"
7798
7799 #. type: Plain text
7800 #: build/C/man3/posix_memalign.3:176
7801 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7802 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7803
7804 #. type: Plain text
7805 #: build/C/man3/posix_memalign.3:180
7806 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7807 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7808
7809 #. type: Plain text
7810 #: build/C/man3/posix_memalign.3:187
7811 msgid ""
7812 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7813 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7814 "POSIX.1-2001."
7815 msgstr ""
7816 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7817 "り、\n"
7818 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7819
7820 #. type: Plain text
7821 #: build/C/man3/posix_memalign.3:191
7822 msgid "The function B<pvalloc>()  is a GNU extension."
7823 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7824
7825 #. type: Plain text
7826 #: build/C/man3/posix_memalign.3:195
7827 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7828 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7829
7830 #. type: Plain text
7831 #: build/C/man3/posix_memalign.3:199
7832 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7833 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7834
7835 #. type: Plain text
7836 #: build/C/man3/posix_memalign.3:204
7837 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7838 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7839
7840 #. type: SS
7841 #: build/C/man3/posix_memalign.3:204
7842 #, no-wrap
7843 msgid "Headers"
7844 msgstr "ヘッダ"
7845
7846 #. type: Plain text
7847 #: build/C/man3/posix_memalign.3:208
7848 msgid ""
7849 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7850 "hE<gt>>."
7851 msgstr ""
7852 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7853 "の意見が一致している。"
7854
7855 #. type: Plain text
7856 #: build/C/man3/posix_memalign.3:212
7857 msgid ""
7858 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7859 "of I<E<lt>malloc.hE<gt>>."
7860 msgstr ""
7861 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7862 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7863
7864 #. type: Plain text
7865 #: build/C/man3/posix_memalign.3:219
7866 msgid ""
7867 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7868 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7869 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7870 "above)."
7871 msgstr ""
7872 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7873 "libc4,5\n"
7874 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7875 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7876
7877 #. type: Plain text
7878 #: build/C/man3/posix_memalign.3:228
7879 msgid ""
7880 "On many systems there are alignment restrictions, for example, on buffers "
7881 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7882 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7883 "use B<posix_memalign>()  to satisfy this requirement."
7884 msgstr ""
7885 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7886 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7887 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7888 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7889 "と、この必要条件を満たすことができる。"
7890
7891 #. type: Plain text
7892 #: build/C/man3/posix_memalign.3:237
7893 msgid ""
7894 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7895 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7896 "is correct."
7897 msgstr ""
7898 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7899 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7900 "確認を行わないかもしれない。"
7901
7902 #.  Other systems allow passing the result of
7903 #.  .IR valloc ()
7904 #.  to
7905 #.  .IR free (3),
7906 #.  but not to
7907 #.  .IR realloc (3).
7908 #. type: Plain text
7909 #: build/C/man3/posix_memalign.3:265
7910 msgid ""
7911 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7912 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7913 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
7914 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
7915 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
7916 "implementation allows memory obtained from any of these functions to be "
7917 "reclaimed with B<free>(3)."
7918 msgstr ""
7919 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7920 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7921 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7922 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7923 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7924 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7925 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7926 "B<free>(3) で再利用することができる。"
7927
7928 #. type: Plain text
7929 #: build/C/man3/posix_memalign.3:270
7930 msgid ""
7931 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7932 "these functions are needed only if you require larger alignment values."
7933 msgstr ""
7934 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7935 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7936 "ト\n"
7937 "が必要な場合だけである。"
7938
7939 #. type: Plain text
7940 #: build/C/man3/posix_memalign.3:275
7941 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7942 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7943
7944 #. type: TH
7945 #: build/C/man2/readahead.2:28
7946 #, no-wrap
7947 msgid "READAHEAD"
7948 msgstr "READAHEAD"
7949
7950 #. type: Plain text
7951 #: build/C/man2/readahead.2:31
7952 msgid "readahead - perform file readahead into page cache"
7953 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7954
7955 #. type: Plain text
7956 #: build/C/man2/readahead.2:37
7957 #, no-wrap
7958 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7959 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7960
7961 #. type: Plain text
7962 #: build/C/man2/readahead.2:65
7963 msgid ""
7964 "B<readahead>()  populates the page cache with data from a file so that "
7965 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7966 "argument is a file descriptor identifying the file which is to be read.  The "
7967 "I<offset> argument specifies the starting point from which data is to be "
7968 "read and I<count> specifies the number of bytes to be read.  I/O is "
7969 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7970 "page boundary and bytes are read up to the next page boundary greater than "
7971 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7972 "of the file.  B<readahead>()  blocks until the specified data has been "
7973 "read.  The current file offset of the open file referred to by I<fd> is left "
7974 "unchanged."
7975 msgstr ""
7976 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7977 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7978 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7979 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7980 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7981 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7982 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7983 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7984 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7985 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7986 "更されない。"
7987
7988 #. type: Plain text
7989 #: build/C/man2/readahead.2:71
7990 msgid ""
7991 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7992 "I<errno> set to indicate the cause of the error."
7993 msgstr ""
7994 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7995 "ラーの原因を示す値を設定する。"
7996
7997 #. type: Plain text
7998 #: build/C/man2/readahead.2:76
7999 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8000 msgstr ""
8001 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8002 "ていない。"
8003
8004 #. type: Plain text
8005 #: build/C/man2/readahead.2:82
8006 msgid ""
8007 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8008 msgstr ""
8009 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8010 "ファイルであった。"
8011
8012 #. type: Plain text
8013 #: build/C/man2/readahead.2:87
8014 msgid ""
8015 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8016 "been provided since version 2.3."
8017 msgstr ""
8018 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8019 "は glibc バージョン 2.3 以降で行われている。"
8020
8021 #. type: Plain text
8022 #: build/C/man2/readahead.2:92
8023 msgid ""
8024 "The B<readahead>()  system call is Linux-specific, and its use should be "
8025 "avoided in portable applications."
8026 msgstr ""
8027 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8028 "は 使用を避けるべきである。"
8029
8030 #. type: Plain text
8031 #: build/C/man2/readahead.2:97
8032 msgid ""
8033 "On some 32-bit architectures, the calling signature for this system call "
8034 "differs, for the reasons described in B<syscall>(2)."
8035 msgstr ""
8036 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8037 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8038
8039 #. type: Plain text
8040 #: build/C/man2/readahead.2:103
8041 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8042 msgstr ""
8043 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8044
8045 #. type: TH
8046 #: build/C/man2/remap_file_pages.2:28
8047 #, no-wrap
8048 msgid "REMAP_FILE_PAGES"
8049 msgstr "REMAP_FILE_PAGES"
8050
8051 #. type: Plain text
8052 #: build/C/man2/remap_file_pages.2:31
8053 msgid "remap_file_pages - create a nonlinear file mapping"
8054 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8055
8056 #. type: Plain text
8057 #: build/C/man2/remap_file_pages.2:35
8058 #, no-wrap
8059 msgid ""
8060 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8061 "B<#include E<lt>sys/mman.hE<gt>>\n"
8062 msgstr ""
8063 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8064 "B<#include E<lt>sys/mman.hE<gt>>\n"
8065
8066 #. type: Plain text
8067 #: build/C/man2/remap_file_pages.2:38
8068 #, no-wrap
8069 msgid ""
8070 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8071 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8072 msgstr ""
8073 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8074 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8075
8076 #. type: Plain text
8077 #: build/C/man2/remap_file_pages.2:51
8078 msgid ""
8079 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8080 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8081 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8082 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8083 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8084 "data structures."
8085 msgstr ""
8086 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8087 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8088 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8089 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8090 "域)  データ構造体を追加で作成する必要がないことである。"
8091
8092 #. type: Plain text
8093 #: build/C/man2/remap_file_pages.2:53
8094 msgid "To create a nonlinear mapping we perform the following steps:"
8095 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8096
8097 #. type: TP
8098 #: build/C/man2/remap_file_pages.2:53
8099 #, no-wrap
8100 msgid "1."
8101 msgstr "1."
8102
8103 #. type: Plain text
8104 #: build/C/man2/remap_file_pages.2:61
8105 msgid ""
8106 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8107 "mapping must be created with the B<MAP_SHARED> flag."
8108 msgstr ""
8109 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8110 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8111 "い。"
8112
8113 #. type: TP
8114 #: build/C/man2/remap_file_pages.2:61
8115 #, no-wrap
8116 msgid "2."
8117 msgstr "2."
8118
8119 #. type: Plain text
8120 #: build/C/man2/remap_file_pages.2:69
8121 msgid ""
8122 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8123 "correspondence between the pages of the mapping and the pages of the file.  "
8124 "It is possible to map the same page of a file into multiple locations within "
8125 "the mapped region."
8126 msgstr ""
8127 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8128 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8129 "所に マップすることが可能である。"
8130
8131 #. type: Plain text
8132 #: build/C/man2/remap_file_pages.2:80
8133 msgid ""
8134 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8135 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8136 "system page size; I<size> is the length of the region in bytes."
8137 msgstr ""
8138 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8139 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8140 "る。 I<size> は領域の長さであり、単位はバイトである。"
8141
8142 #. type: Plain text
8143 #: build/C/man2/remap_file_pages.2:98
8144 msgid ""
8145 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8146 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8147 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8148 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8149 "and I<size> will be placed."
8150 msgstr ""
8151 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8152 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8153 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8154 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8155 "レスを、 I<addr> によって指定することである。"
8156
8157 #.  This rounding is weird, and not consistent with the treatment of
8158 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8159 #.  MTK, 14 Sep 2005
8160 #. type: Plain text
8161 #: build/C/man2/remap_file_pages.2:112
8162 msgid ""
8163 "The values specified in I<addr> and I<size> should be multiples of the "
8164 "system page size.  If they are not, then the kernel rounds I<both> values "
8165 "I<down> to the nearest multiple of the page size."
8166 msgstr ""
8167 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8168 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8169 "「切り下げる」。"
8170
8171 #. type: Plain text
8172 #: build/C/man2/remap_file_pages.2:116
8173 msgid "The I<prot> argument must be specified as 0."
8174 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8175
8176 #. type: Plain text
8177 #: build/C/man2/remap_file_pages.2:124
8178 msgid ""
8179 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8180 "other than B<MAP_NONBLOCK> are ignored."
8181 msgstr ""
8182 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8183 "の全てのフラグは無視される。"
8184
8185 #. type: Plain text
8186 #: build/C/man2/remap_file_pages.2:131
8187 msgid ""
8188 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8189 "I<errno> is set appropriately."
8190 msgstr ""
8191 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8192 "れ、 I<errno> が適切に設定される。"
8193
8194 #. type: Plain text
8195 #: build/C/man2/remap_file_pages.2:139
8196 msgid ""
8197 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8198 "flag."
8199 msgstr ""
8200 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8201 "いない。"
8202
8203 #.  And possibly others from vma->vm_ops->populate()
8204 #. type: Plain text
8205 #: build/C/man2/remap_file_pages.2:148
8206 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8207 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8208
8209 #. type: Plain text
8210 #: build/C/man2/remap_file_pages.2:153
8211 msgid ""
8212 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8213 "support was added in version 2.3.3."
8214 msgstr ""
8215 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8216 "サポートは glibc バージョン 2.3.3 で追加された。"
8217
8218 #. type: Plain text
8219 #: build/C/man2/remap_file_pages.2:157
8220 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8221 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8222
8223 #. type: Plain text
8224 #: build/C/man2/remap_file_pages.2:164
8225 msgid ""
8226 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8227 "B<msync>(2)"
8228 msgstr ""
8229 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8230 "B<msync>(2)"
8231
8232 #. type: TH
8233 #: build/C/man3/shm_open.3:26
8234 #, no-wrap
8235 msgid "SHM_OPEN"
8236 msgstr "SHM_OPEN"
8237
8238 #. type: TH
8239 #: build/C/man3/shm_open.3:26
8240 #, no-wrap
8241 msgid "2009-02-25"
8242 msgstr "2009-02-25"
8243
8244 #. type: Plain text
8245 #: build/C/man3/shm_open.3:29
8246 msgid ""
8247 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8248 msgstr ""
8249 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8250 "う"
8251
8252 #. type: Plain text
8253 #: build/C/man3/shm_open.3:33
8254 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8255 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8256
8257 #. type: Plain text
8258 #: build/C/man3/shm_open.3:35
8259 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8260 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8261
8262 #. type: Plain text
8263 #: build/C/man3/shm_open.3:37
8264 msgid ""
8265 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8266 msgstr ""
8267 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8268
8269 #. type: Plain text
8270 #: build/C/man3/shm_open.3:39
8271 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8272 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8273
8274 #. type: Plain text
8275 #: build/C/man3/shm_open.3:41
8276 msgid "Link with I<-lrt>."
8277 msgstr "I<-lrt> でリンクする。"
8278
8279 #. type: Plain text
8280 #: build/C/man3/shm_open.3:53
8281 msgid ""
8282 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8283 "memory object.  A POSIX shared memory object is in effect a handle which can "
8284 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8285 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8286 "removing an object previously created by B<shm_open>()."
8287 msgstr ""
8288 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8289 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8290 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8291 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8292 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8293
8294 #.  glibc allows the initial slash to be omitted, and makes
8295 #.  multiple initial slashes equivalent to a single slash.
8296 #.  This differs from the implementation of POSIX message queues.
8297 #.  glibc allows subdirectory components in the name, in which
8298 #.  case the subdirectory must exist under /dev/shm, and allow the
8299 #.  required permissions if a user wants to create a shared memory
8300 #.  object in that subdirectory.
8301 #. type: Plain text
8302 #: build/C/man3/shm_open.3:74
8303 msgid ""
8304 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8305 "specifies the shared memory object to be created or opened.  For portable "
8306 "use, a shared memory object should be identified by a name of the form I</"
8307 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8308 "255) characters consisting of an initial slash, followed by one or more "
8309 "characters, none of which are slashes."
8310 msgstr ""
8311 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8312 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8313 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8314 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8315 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8316
8317 #. type: Plain text
8318 #: build/C/man3/shm_open.3:81
8319 msgid ""
8320 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8321 "or B<O_RDWR> and any of the other flags listed here:"
8322 msgstr ""
8323 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8324 "述べる他のフラグの論理和をとったもの を指定する。"
8325
8326 #. type: TP
8327 #: build/C/man3/shm_open.3:81
8328 #, no-wrap
8329 msgid "B<O_RDONLY>"
8330 msgstr "B<O_RDONLY>"
8331
8332 #. type: Plain text
8333 #: build/C/man3/shm_open.3:89
8334 msgid ""
8335 "Open the object for read access.  A shared memory object opened in this way "
8336 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8337 msgstr ""
8338 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8339 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8340 "B<mmap>(2)  することができる。"
8341
8342 #. type: TP
8343 #: build/C/man3/shm_open.3:89
8344 #, no-wrap
8345 msgid "B<O_RDWR>"
8346 msgstr "B<O_RDWR>"
8347
8348 #. type: Plain text
8349 #: build/C/man3/shm_open.3:92
8350 msgid "Open the object for read-write access."
8351 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8352
8353 #. type: TP
8354 #: build/C/man3/shm_open.3:92
8355 #, no-wrap
8356 msgid "B<O_CREAT>"
8357 msgstr "B<O_CREAT>"
8358
8359 #.  In truth it is actually the file system IDs on Linux, but these
8360 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8361 #. type: Plain text
8362 #: build/C/man3/shm_open.3:112
8363 msgid ""
8364 "Create the shared memory object if it does not exist.  The user and group "
8365 "ownership of the object are taken from the corresponding effective IDs of "
8366 "the calling process, and the object's permission bits are set according to "
8367 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8368 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8369 "A set of macro constants which can be used to define I<mode> is listed in "
8370 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8371 "including I<E<lt>sys/stat.hE<gt>>.)"
8372 msgstr ""
8373 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8374 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8375 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8376 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8377 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8378 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8379 "hE<gt>> のインクルードにより得られる)。"
8380
8381 #. type: Plain text
8382 #: build/C/man3/shm_open.3:118
8383 msgid ""
8384 "A new shared memory object initially has zero length\\(emthe size of the "
8385 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8386 "shared memory object are automatically initialized to 0."
8387 msgstr ""
8388 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8389 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8390 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8391
8392 #. type: TP
8393 #: build/C/man3/shm_open.3:118
8394 #, no-wrap
8395 msgid "B<O_EXCL>"
8396 msgstr "B<O_EXCL>"
8397
8398 #. type: Plain text
8399 #: build/C/man3/shm_open.3:127
8400 msgid ""
8401 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8402 "I<name> already exists, return an error.  The check for the existence of the "
8403 "object, and its creation if it does not exist, are performed atomically."
8404 msgstr ""
8405 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8406 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8407 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8408 "atomically)。"
8409
8410 #. type: TP
8411 #: build/C/man3/shm_open.3:127
8412 #, no-wrap
8413 msgid "B<O_TRUNC>"
8414 msgstr "B<O_TRUNC>"
8415
8416 #. type: Plain text
8417 #: build/C/man3/shm_open.3:130
8418 msgid "If the shared memory object already exists, truncate it to zero bytes."
8419 msgstr ""
8420 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8421 "切り詰める。"
8422
8423 #. type: Plain text
8424 #: build/C/man3/shm_open.3:133
8425 msgid ""
8426 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8427 "hE<gt>>."
8428 msgstr ""
8429 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8430
8431 #. type: Plain text
8432 #: build/C/man3/shm_open.3:144
8433 msgid ""
8434 "On successful completion B<shm_open>()  returns a new file descriptor "
8435 "referring to the shared memory object.  This file descriptor is guaranteed "
8436 "to be the lowest-numbered file descriptor not previously opened within the "
8437 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8438 "descriptor."
8439 msgstr ""
8440 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8441 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8442 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8443 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8444 "ファイル・ディスクリプタに設定される。"
8445
8446 #. type: Plain text
8447 #: build/C/man3/shm_open.3:153
8448 msgid ""
8449 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8450 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8451 "the file descriptor may be closed without affecting the memory mapping."
8452 msgstr ""
8453 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8454 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8455 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8456 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8457
8458 #. type: Plain text
8459 #: build/C/man3/shm_open.3:171
8460 msgid ""
8461 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8462 "shared memory object name, and, once all processes have unmapped the object, "
8463 "de-allocates and destroys the contents of the associated memory region.  "
8464 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8465 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8466 "case a new, distinct object is created)."
8467 msgstr ""
8468 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8469 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8470 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8471 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8472 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8473 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8474
8475 #. type: Plain text
8476 #: build/C/man3/shm_open.3:180
8477 msgid ""
8478 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8479 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8480 "or -1 on error."
8481 msgstr ""
8482 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8483 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8484 "を、エラーが起こった場合 -1 を返す。"
8485
8486 #. type: Plain text
8487 #: build/C/man3/shm_open.3:187
8488 msgid ""
8489 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8490 "which may appear in I<errno> include the following:"
8491 msgstr ""
8492 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8493 "される値は以下の通りである:"
8494
8495 #. type: Plain text
8496 #: build/C/man3/shm_open.3:192
8497 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8498 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8499
8500 #. type: Plain text
8501 #: build/C/man3/shm_open.3:202
8502 msgid ""
8503 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8504 "B<O_TRUNC> was specified and the caller does not have write permission on "
8505 "the object."
8506 msgstr ""
8507 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8508 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8509 "み権限が なかった。"
8510
8511 #. type: TP
8512 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:195
8513 #, no-wrap
8514 msgid "B<EEXIST>"
8515 msgstr "B<EEXIST>"
8516
8517 #. type: Plain text
8518 #: build/C/man3/shm_open.3:213
8519 msgid ""
8520 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8521 "shared memory object specified by I<name> already exists."
8522 msgstr ""
8523 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8524 "定された共有メモリ・オブジェクトが既に存在した。"
8525
8526 #. type: Plain text
8527 #: build/C/man3/shm_open.3:220
8528 msgid "The I<name> argument to B<shm_open>()  was invalid."
8529 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8530
8531 #. type: TP
8532 #: build/C/man3/shm_open.3:220
8533 #, no-wrap
8534 msgid "B<EMFILE>"
8535 msgstr "B<EMFILE>"
8536
8537 #. type: Plain text
8538 #: build/C/man3/shm_open.3:223
8539 msgid "The process already has the maximum number of files open."
8540 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8541
8542 #. type: TP
8543 #: build/C/man3/shm_open.3:223
8544 #, no-wrap
8545 msgid "B<ENAMETOOLONG>"
8546 msgstr "B<ENAMETOOLONG>"
8547
8548 #. type: Plain text
8549 #: build/C/man3/shm_open.3:229
8550 msgid "The length of I<name> exceeds B<PATH_MAX>."
8551 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8552
8553 #. type: Plain text
8554 #: build/C/man3/shm_open.3:233
8555 msgid ""
8556 "The limit on the total number of files open on the system has been reached."
8557 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8558
8559 #. type: TP
8560 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8561 #: build/C/man2/shmget.2:209
8562 #, no-wrap
8563 msgid "B<ENOENT>"
8564 msgstr "B<ENOENT>"
8565
8566 #. type: Plain text
8567 #: build/C/man3/shm_open.3:242
8568 msgid ""
8569 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8570 "B<O_CREAT> was not specified."
8571 msgstr ""
8572 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8573 "B<O_CREAT> が指定されていなかった。"
8574
8575 #. type: Plain text
8576 #: build/C/man3/shm_open.3:249
8577 msgid ""
8578 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8579 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8580
8581 #. type: Plain text
8582 #: build/C/man3/shm_open.3:251
8583 msgid "These functions are provided in glibc 2.2 and later."
8584 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8585
8586 #. type: Plain text
8587 #: build/C/man3/shm_open.3:257
8588 msgid ""
8589 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8590 "object is set to either the calling process's effective group ID or \"a "
8591 "system default group ID\"."
8592 msgstr ""
8593 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8594 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8595 "ID」 のどちらかに設定される、と書かれている。"
8596
8597 #. type: Plain text
8598 #: build/C/man3/shm_open.3:266
8599 msgid ""
8600 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8601 "unspecified.  On Linux, this will successfully truncate an existing shared "
8602 "memory object\\(emthis may not be so on other UNIX systems."
8603 msgstr ""
8604 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8605 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8606 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8607
8608 #. type: Plain text
8609 #: build/C/man3/shm_open.3:271
8610 msgid ""
8611 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8612 "dedicated file system, which is normally mounted under I</dev/shm>."
8613 msgstr ""
8614 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8615 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8616
8617 #. type: Plain text
8618 #: build/C/man3/shm_open.3:282
8619 msgid ""
8620 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8621 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8622 msgstr ""
8623 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8624 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8625
8626 #. type: TH
8627 #: build/C/man7/shm_overview.7:27
8628 #, no-wrap
8629 msgid "SHM_OVERVIEW"
8630 msgstr "SHM_OVERVIEW"
8631
8632 #. type: TH
8633 #: build/C/man7/shm_overview.7:27
8634 #, no-wrap
8635 msgid "2010-09-10"
8636 msgstr "2010-09-10"
8637
8638 #. type: Plain text
8639 #: build/C/man7/shm_overview.7:30
8640 msgid "shm_overview - overview of POSIX shared memory"
8641 msgstr "shm_overview - POSIX 共有メモリの概要"
8642
8643 #. type: Plain text
8644 #: build/C/man7/shm_overview.7:33
8645 msgid ""
8646 "The POSIX shared memory API allows processes to communicate information by "
8647 "sharing a region of memory."
8648 msgstr ""
8649 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8650 "情報をやり取りすることができる。"
8651
8652 #. type: Plain text
8653 #: build/C/man7/shm_overview.7:35
8654 msgid "The interfaces employed in the API are:"
8655 msgstr "この API では以下のインターフェースが採用されている。"
8656
8657 #. type: TP
8658 #: build/C/man7/shm_overview.7:35
8659 #, no-wrap
8660 msgid "B<shm_open>(3)"
8661 msgstr "B<shm_open>(3)"
8662
8663 #. type: Plain text
8664 #: build/C/man7/shm_overview.7:42
8665 msgid ""
8666 "Create and open a new object, or open an existing object.  This is analogous "
8667 "to B<open>(2).  The call returns a file descriptor for use by the other "
8668 "interfaces listed below."
8669 msgstr ""
8670 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8671 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8672 "る ファイルディスクリプタを返す。"
8673
8674 #. type: TP
8675 #: build/C/man7/shm_overview.7:42
8676 #, no-wrap
8677 msgid "B<ftruncate>(2)"
8678 msgstr "B<ftruncate>(2)"
8679
8680 #. type: Plain text
8681 #: build/C/man7/shm_overview.7:46
8682 msgid ""
8683 "Set the size of the shared memory object.  (A newly created shared memory "
8684 "object has a length of zero.)"
8685 msgstr "共有メモリオブジェクトの大きさを設定する。"
8686
8687 #. type: Plain text
8688 #: build/C/man7/shm_overview.7:50
8689 msgid ""
8690 "Map the shared memory object into the virtual address space of the calling "
8691 "process."
8692 msgstr ""
8693 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8694
8695 #. type: TP
8696 #: build/C/man7/shm_overview.7:50
8697 #, no-wrap
8698 msgid "B<munmap>(2)"
8699 msgstr "B<munmap>(2)"
8700
8701 #. type: Plain text
8702 #: build/C/man7/shm_overview.7:54
8703 msgid ""
8704 "Unmap the shared memory object from the virtual address space of the calling "
8705 "process."
8706 msgstr ""
8707 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8708 "る。"
8709
8710 #. type: TP
8711 #: build/C/man7/shm_overview.7:54
8712 #, no-wrap
8713 msgid "B<shm_unlink>(3)"
8714 msgstr "B<shm_unlink>(3)"
8715
8716 #. type: Plain text
8717 #: build/C/man7/shm_overview.7:57
8718 msgid "Remove a shared memory object name."
8719 msgstr "共有メモリオブジェクト名を削除する。"
8720
8721 #. type: TP
8722 #: build/C/man7/shm_overview.7:57
8723 #, no-wrap
8724 msgid "B<close>(2)"
8725 msgstr "B<close>(2)"
8726
8727 #. type: Plain text
8728 #: build/C/man7/shm_overview.7:62
8729 msgid ""
8730 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8731 "needed."
8732 msgstr ""
8733 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8734 "のファイルディスクリプタをクローズする。"
8735
8736 #. type: TP
8737 #: build/C/man7/shm_overview.7:62
8738 #, no-wrap
8739 msgid "B<fstat>(2)"
8740 msgstr "B<fstat>(2)"
8741
8742 #. type: Plain text
8743 #: build/C/man7/shm_overview.7:76
8744 msgid ""
8745 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8746 "the information returned by this call are the object's size (I<st_size>), "
8747 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8748 msgstr ""
8749 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8750 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8751 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8752
8753 #. type: TP
8754 #: build/C/man7/shm_overview.7:76
8755 #, no-wrap
8756 msgid "B<fchown>(2)"
8757 msgstr "B<fchown>(2)"
8758
8759 #. type: Plain text
8760 #: build/C/man7/shm_overview.7:79
8761 msgid "To change the ownership of a shared memory object."
8762 msgstr "共有メモリオブジェクトの所有権を変更する。"
8763
8764 #. type: TP
8765 #: build/C/man7/shm_overview.7:79
8766 #, no-wrap
8767 msgid "B<fchmod>(2)"
8768 msgstr "B<fchmod>(2)"
8769
8770 #. type: Plain text
8771 #: build/C/man7/shm_overview.7:82
8772 msgid "To change the permissions of a shared memory object."
8773 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8774
8775 #. type: SS
8776 #: build/C/man7/shm_overview.7:82
8777 #, no-wrap
8778 msgid "Versions"
8779 msgstr "Versions"
8780
8781 #. type: Plain text
8782 #: build/C/man7/shm_overview.7:84
8783 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8784 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8785
8786 #. type: SS
8787 #: build/C/man7/shm_overview.7:84
8788 #, no-wrap
8789 msgid "Persistence"
8790 msgstr "持続性"
8791
8792 #. type: Plain text
8793 #: build/C/man7/shm_overview.7:89
8794 msgid ""
8795 "POSIX shared memory objects have kernel persistence: a shared memory object "
8796 "will exist until the system is shut down, or until all processes have "
8797 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8798 msgstr ""
8799 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8800 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8801 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8802
8803 #. type: SS
8804 #: build/C/man7/shm_overview.7:89
8805 #, no-wrap
8806 msgid "Linking"
8807 msgstr "リンク"
8808
8809 #. type: Plain text
8810 #: build/C/man7/shm_overview.7:94
8811 msgid ""
8812 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8813 "to link against the real-time library, I<librt>."
8814 msgstr ""
8815 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8816 "タイムライブラリ I<librt> とリンクしなければならない。"
8817
8818 #. type: SS
8819 #: build/C/man7/shm_overview.7:94
8820 #, no-wrap
8821 msgid "Accessing shared memory objects via the file system"
8822 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8823
8824 #. type: Plain text
8825 #: build/C/man7/shm_overview.7:101
8826 msgid ""
8827 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8828 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8829 "supports the use of access control lists (ACLs)  to control the permissions "
8830 "of objects in the virtual file system."
8831 msgstr ""
8832 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8833 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8834 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8835 "スト (ACL; access control lists) を使うことができる。"
8836
8837 #. type: Plain text
8838 #: build/C/man7/shm_overview.7:106
8839 msgid ""
8840 "Typically, processes must synchronize their access to a shared memory "
8841 "object, using, for example, POSIX semaphores."
8842 msgstr ""
8843 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8844 "使ってプロセス間で同期をとらなければならない。"
8845
8846 #. type: Plain text
8847 #: build/C/man7/shm_overview.7:114
8848 msgid ""
8849 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8850 "memory API.  POSIX shared memory provides a simpler, and better designed "
8851 "interface; on the other hand POSIX shared memory is somewhat less widely "
8852 "available (especially on older systems) than System V shared memory."
8853 msgstr ""
8854 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8855 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8856 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8857 "システムが少ない (特に、古いシステムでは少ない)。"
8858
8859 #. type: Plain text
8860 #: build/C/man7/shm_overview.7:127
8861 msgid ""
8862 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8863 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8864 "B<shm_unlink>(3), B<sem_overview>(7)"
8865 msgstr ""
8866 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8867 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8868 "B<shm_unlink>(3), B<sem_overview>(7)"
8869
8870 #. type: TH
8871 #: build/C/man2/shmctl.2:45
8872 #, no-wrap
8873 msgid "SHMCTL"
8874 msgstr "SHMCTL"
8875
8876 #. type: TH
8877 #: build/C/man2/shmctl.2:45
8878 #, no-wrap
8879 msgid "2013-03-18"
8880 msgstr "2013-03-18"
8881
8882 #. type: Plain text
8883 #: build/C/man2/shmctl.2:48
8884 msgid "shmctl - System V shared memory control"
8885 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
8886
8887 #. type: Plain text
8888 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8889 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8890 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8891
8892 #. type: Plain text
8893 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8894 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8895 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8896
8897 #. type: Plain text
8898 #: build/C/man2/shmctl.2:55
8899 msgid ""
8900 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8901 msgstr ""
8902 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8903
8904 #. type: Plain text
8905 #: build/C/man2/shmctl.2:62
8906 msgid ""
8907 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8908 "System V shared memory segment whose identifier is given in I<shmid>."
8909 msgstr ""
8910 "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対し"
8911 "て I<cmd> で指示した制御命令を実行する。"
8912
8913 #. type: Plain text
8914 #: build/C/man2/shmctl.2:67
8915 msgid ""
8916 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8917 "I<E<lt>sys/shm.hE<gt>> as follows:"
8918 msgstr ""
8919 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8920 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8921
8922 #. type: Plain text
8923 #: build/C/man2/shmctl.2:81
8924 #, no-wrap
8925 msgid ""
8926 "struct shmid_ds {\n"
8927 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8928 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8929 "    time_t          shm_atime;   /* Last attach time */\n"
8930 "    time_t          shm_dtime;   /* Last detach time */\n"
8931 "    time_t          shm_ctime;   /* Last change time */\n"
8932 "    pid_t           shm_cpid;    /* PID of creator */\n"
8933 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8934 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8935 "    ...\n"
8936 "};\n"
8937 msgstr ""
8938 "struct shmid_ds {\n"
8939 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8940 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8941 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8942 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8943 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8944 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8945 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8946 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8947 "    ...\n"
8948 "};\n"
8949
8950 #. type: Plain text
8951 #: build/C/man2/shmctl.2:89
8952 msgid ""
8953 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8954 "settable using B<IPC_SET>):"
8955 msgstr ""
8956 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
8957 "B<IPC_SET> を使って設定可能である):"
8958
8959 #. type: Plain text
8960 #: build/C/man2/shmctl.2:102
8961 #, no-wrap
8962 msgid ""
8963 "struct ipc_perm {\n"
8964 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8965 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8966 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8967 "    uid_t          cuid;     /* Effective UID of creator */\n"
8968 "    gid_t          cgid;     /* Effective GID of creator */\n"
8969 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8970 "                                SHM_LOCKED flags */\n"
8971 "    unsigned short __seq;    /* Sequence number */\n"
8972 "};\n"
8973 msgstr ""
8974 "struct ipc_perm {\n"
8975 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8976 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8977 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8978 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8979 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8980 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8981 "                                SHM_LOCKED フラグ */\n"
8982 "    unsigned short __seq;    /* シーケンス番号 */\n"
8983 "};\n"
8984
8985 #. type: Plain text
8986 #: build/C/man2/shmctl.2:108
8987 msgid "Valid values for I<cmd> are:"
8988 msgstr "I<cmd> として有効な値は以下の通り:"
8989
8990 #. type: TP
8991 #: build/C/man2/shmctl.2:109
8992 #, no-wrap
8993 msgid "B<IPC_STAT>"
8994 msgstr "B<IPC_STAT>"
8995
8996 #. type: Plain text
8997 #: build/C/man2/shmctl.2:118
8998 msgid ""
8999 "Copy information from the kernel data structure associated with I<shmid> "
9000 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9001 "read permission on the shared memory segment."
9002 msgstr ""
9003 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9004 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9005 "読み込み許可を持たなければならない。"
9006
9007 #. type: TP
9008 #: build/C/man2/shmctl.2:118
9009 #, no-wrap
9010 msgid "B<IPC_SET>"
9011 msgstr "B<IPC_SET>"
9012
9013 #. type: Plain text
9014 #: build/C/man2/shmctl.2:136
9015 msgid ""
9016 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9017 "I<buf> to the kernel data structure associated with this shared memory "
9018 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9019 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9020 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9021 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9022 "memory segment, or the caller must be privileged."
9023 msgstr ""
9024 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9025 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9026 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9027 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9028 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9029 "と一致するか、呼び出し元が特権を持たなければならない。"
9030
9031 #. type: TP
9032 #: build/C/man2/shmctl.2:136
9033 #, no-wrap
9034 msgid "B<IPC_RMID>"
9035 msgstr "B<IPC_RMID>"
9036
9037 #. type: Plain text
9038 #: build/C/man2/shmctl.2:153
9039 msgid ""
9040 "Mark the segment to be destroyed.  The segment will only actually be "
9041 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9042 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9043 "the owner or creator, or be privileged.  If a segment has been marked for "
9044 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
9045 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
9046 "be set."
9047 msgstr ""
9048 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9049 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9050 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
9051 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
9052 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
9053 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
9054
9055 #. type: Plain text
9056 #: build/C/man2/shmctl.2:156
9057 msgid ""
9058 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9059 "its pages that were faulted in will remain in memory or swap."
9060 msgstr ""
9061 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9062 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9063 "る。"
9064
9065 #. type: Plain text
9066 #: build/C/man2/shmctl.2:161
9067 msgid ""
9068 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9069 "(5)."
9070 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9071
9072 #. type: TP
9073 #: build/C/man2/shmctl.2:161
9074 #, no-wrap
9075 msgid "B<IPC_INFO> (Linux-specific)"
9076 msgstr "B<IPC_INFO> (Linux 固有)"
9077
9078 #. type: Plain text
9079 #: build/C/man2/shmctl.2:174
9080 msgid ""
9081 "Returns information about system-wide shared memory limits and parameters in "
9082 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9083 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9084 "B<_GNU_SOURCE> feature test macro is defined:"
9085 msgstr ""
9086 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9087 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9088 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9089 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9090
9091 #. type: Plain text
9092 #: build/C/man2/shmctl.2:188
9093 #, no-wrap
9094 msgid ""
9095 "struct  shminfo {\n"
9096 "    unsigned long shmmax; /* Maximum segment size */\n"
9097 "    unsigned long shmmin; /* Minimum segment size;\n"
9098 "                             always 1 */\n"
9099 "    unsigned long shmmni; /* Maximum number of segments */\n"
9100 "    unsigned long shmseg; /* Maximum number of segments\n"
9101 "                             that a process can attach;\n"
9102 "                             unused within kernel */\n"
9103 "    unsigned long shmall; /* Maximum number of pages of\n"
9104 "                             shared memory, system-wide */\n"
9105 "};\n"
9106 msgstr ""
9107 "struct  shminfo {\n"
9108 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9109 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9110 "                             常に 1 */\n"
9111 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9112 "    unsigned long shmseg; /* プロセスが付加できる\n"
9113 "                             セグメントの最大数。\n"
9114 "                             カーネル内では未使用 */\n"
9115 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9116 "                             システム全体での値 */\n"
9117 "};\n"
9118
9119 #. type: Plain text
9120 #: build/C/man2/shmctl.2:201
9121 msgid ""
9122 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9123 "files of the same name; see B<proc>(5)  for details."
9124 msgstr ""
9125 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9126 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9127
9128 #. type: TP
9129 #: build/C/man2/shmctl.2:201
9130 #, no-wrap
9131 msgid "B<SHM_INFO> (Linux-specific)"
9132 msgstr "B<SHM_INFO> (Linux 固有)"
9133
9134 #. type: Plain text
9135 #: build/C/man2/shmctl.2:212
9136 msgid ""
9137 "Returns a I<shm_info> structure whose fields contain information about "
9138 "system resources consumed by shared memory.  This structure is defined in "
9139 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9140 msgstr ""
9141 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9142 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9143 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9144
9145 #. type: Plain text
9146 #: build/C/man2/shmctl.2:229
9147 #, no-wrap
9148 msgid ""
9149 "struct shm_info {\n"
9150 "    int           used_ids; /* # of currently existing\n"
9151 "                               segments */\n"
9152 "    unsigned long shm_tot;  /* Total number of shared\n"
9153 "                               memory pages */\n"
9154 "    unsigned long shm_rss;  /* # of resident shared\n"
9155 "                               memory pages */\n"
9156 "    unsigned long shm_swp;  /* # of swapped shared\n"
9157 "                               memory pages */\n"
9158 "    unsigned long swap_attempts;\n"
9159 "                            /* Unused since Linux 2.4 */\n"
9160 "    unsigned long swap_successes;\n"
9161 "                            /* Unused since Linux 2.4 */\n"
9162 "};\n"
9163 msgstr ""
9164 "struct shm_info {\n"
9165 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9166 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9167 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9168 "                               いない) 共有メモリページ数 */\n"
9169 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9170 "                               ページ数 */\n"
9171 "    unsigned long swap_attempts;\n"
9172 "                            /* Linux 2.4 以降では未使用 */\n"
9173 "    unsigned long swap_successes;\n"
9174 "                            /* Linux 2.4 以降では未使用 */\n"
9175 "};\n"
9176
9177 #. type: TP
9178 #: build/C/man2/shmctl.2:231
9179 #, no-wrap
9180 msgid "B<SHM_STAT> (Linux-specific)"
9181 msgstr "B<SHM_STAT> (Linux 固有)"
9182
9183 #. type: Plain text
9184 #: build/C/man2/shmctl.2:242
9185 msgid ""
9186 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9187 "argument is not a segment identifier, but instead an index into the kernel's "
9188 "internal array that maintains information about all shared memory segments "
9189 "on the system."
9190 msgstr ""
9191 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9192 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9193 "管理するカーネルの内部配列へのインデックス である。"
9194
9195 #. type: Plain text
9196 #: build/C/man2/shmctl.2:245
9197 msgid ""
9198 "The caller can prevent or allow swapping of a shared memory segment with the "
9199 "following I<cmd> values:"
9200 msgstr ""
9201 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9202 "ワップされることを防止したり、許可したりできる:"
9203
9204 #. type: TP
9205 #: build/C/man2/shmctl.2:246
9206 #, no-wrap
9207 msgid "B<SHM_LOCK> (Linux-specific)"
9208 msgstr "B<SHM_LOCK> (Linux 固有)"
9209
9210 #. type: Plain text
9211 #: build/C/man2/shmctl.2:258
9212 msgid ""
9213 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9214 "pages that are required to be present after locking is enabled.  If a "
9215 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9216 "I<shm_perm.mode> field in the associated data structure retrieved by "
9217 "B<IPC_STAT> will be set."
9218 msgstr ""
9219 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9220 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9221 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9222 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9223 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9224
9225 #. type: TP
9226 #: build/C/man2/shmctl.2:258
9227 #, no-wrap
9228 msgid "B<SHM_UNLOCK> (Linux-specific)"
9229 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9230
9231 #. type: Plain text
9232 #: build/C/man2/shmctl.2:261
9233 msgid "Unlock the segment, allowing it to be swapped out."
9234 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9235
9236 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9237 #.  be applied to a segment, regardless of ownership of the segment.
9238 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9239 #.  in 2.6.10.  MTK, May 2005
9240 #. type: Plain text
9241 #: build/C/man2/shmctl.2:279
9242 msgid ""
9243 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9244 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9245 "these operations if its effective UID matches the owner or creator UID of "
9246 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9247 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9248 msgstr ""
9249 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9250 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9251 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9252 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9253 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9254 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9255
9256 #. type: Plain text
9257 #: build/C/man2/shmctl.2:297
9258 msgid ""
9259 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9260 "highest used entry in the kernel's internal array recording information "
9261 "about all shared memory segments.  (This information can be used with "
9262 "repeated B<SHM_STAT> operations to obtain information about all shared "
9263 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9264 "the identifier of the shared memory segment whose index was given in "
9265 "I<shmid>.  Other operations return 0 on success."
9266 msgstr ""
9267 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9268 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9269 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9270 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9271 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9272 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9273
9274 #. type: Plain text
9275 #: build/C/man2/shmctl.2:301
9276 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9277 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9278
9279 #. type: Plain text
9280 #: build/C/man2/shmctl.2:310
9281 msgid ""
9282 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9283 "read access for I<shmid>, and the calling process does not have the "
9284 "B<CAP_IPC_OWNER> capability."
9285 msgstr ""
9286 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9287 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9288 "ケーパビリティ (capability) を持っていない。"
9289
9290 #. type: Plain text
9291 #: build/C/man2/shmctl.2:321
9292 msgid ""
9293 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9294 "pointed to by I<buf> isn't accessible."
9295 msgstr ""
9296 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9297 "るアドレスにアクセスできない。"
9298
9299 #. type: TP
9300 #: build/C/man2/shmctl.2:321 build/C/man2/shmop.2:197
9301 #, no-wrap
9302 msgid "B<EIDRM>"
9303 msgstr "B<EIDRM>"
9304
9305 #. type: Plain text
9306 #: build/C/man2/shmctl.2:324 build/C/man2/shmop.2:200
9307 msgid "I<shmid> points to a removed identifier."
9308 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9309
9310 #. type: Plain text
9311 #: build/C/man2/shmctl.2:333
9312 msgid ""
9313 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9314 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9315 "to an array slot that is currently unused."
9316 msgstr ""
9317 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9318 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9319 "配列のスロットを参照していた。"
9320
9321 #. type: Plain text
9322 #: build/C/man2/shmctl.2:344
9323 msgid ""
9324 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9325 "be-locked segment would mean that the total bytes in locked shared memory "
9326 "segments would exceed the limit for the real user ID of the calling "
9327 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9328 "(see B<setrlimit>(2))."
9329 msgstr ""
9330 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9331 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9332 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9333 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9334
9335 #. type: Plain text
9336 #: build/C/man2/shmctl.2:349
9337 msgid ""
9338 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9339 "in the structure pointed to by I<buf>."
9340 msgstr ""
9341 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9342 "には大き過ぎる。"
9343
9344 #. type: Plain text
9345 #: build/C/man2/shmctl.2:361
9346 msgid ""
9347 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9348 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9349 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9350 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9351 msgstr ""
9352 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9353 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9354 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9355
9356 #. type: Plain text
9357 #: build/C/man2/shmctl.2:373
9358 msgid ""
9359 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9360 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9361 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9362 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9363 msgstr ""
9364 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9365 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9366 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9367 "が特権を持たない場合にも、このエラーが起こる。)"
9368
9369 #.  SVr4 documents an additional error condition EMFILE.
9370 #. type: Plain text
9371 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:235
9372 #: build/C/man2/shmop.2:234
9373 msgid "SVr4, POSIX.1-2001."
9374 msgstr "SVr4, POSIX.1-2001."
9375
9376 #.  Like Linux, the FreeBSD man pages still document
9377 #.  the inclusion of these header files.
9378 #. type: Plain text
9379 #: build/C/man2/shmctl.2:391 build/C/man2/shmget.2:251
9380 msgid ""
9381 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9382 "required on Linux or by any version of POSIX.  However, some old "
9383 "implementations required the inclusion of these header files, and the SVID "
9384 "also documented their inclusion.  Applications intended to be portable to "
9385 "such old systems may need to include these header files."
9386 msgstr ""
9387 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9388 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9389 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9390 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9391 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9392 "れない。"
9393
9394 #. type: Plain text
9395 #: build/C/man2/shmctl.2:402
9396 msgid ""
9397 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9398 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9399 "future these may modified or moved to a /proc file system interface."
9400 msgstr ""
9401 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9402 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9403 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9404
9405 #. type: Plain text
9406 #: build/C/man2/shmctl.2:410
9407 msgid ""
9408 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9409 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9410 "feature is not available on other UNIX implementations; portable "
9411 "applications should avoid relying on it."
9412 msgstr ""
9413 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9414 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9415 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9416 "プリケーションではこれに依存しないようにすべきである。"
9417
9418 #. type: Plain text
9419 #: build/C/man2/shmctl.2:423
9420 msgid ""
9421 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9422 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9423 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9424 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9425 msgstr ""
9426 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9427 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9428 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9429 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9430
9431 #. type: Plain text
9432 #: build/C/man2/shmctl.2:430
9433 msgid ""
9434 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9435 "B<svipc>(7)"
9436 msgstr ""
9437 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9438 "B<shm_overview>(7), B<svipc>(7)"
9439
9440 #. type: TH
9441 #: build/C/man2/shmget.2:38
9442 #, no-wrap
9443 msgid "SHMGET"
9444 msgstr "SHMGET"
9445
9446 #. type: Plain text
9447 #: build/C/man2/shmget.2:41
9448 msgid "shmget - allocates a System V shared memory segment"
9449 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9450
9451 #. type: Plain text
9452 #: build/C/man2/shmget.2:48
9453 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9454 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9455
9456 #. type: Plain text
9457 #: build/C/man2/shmget.2:72
9458 msgid ""
9459 "B<shmget>()  returns the identifier of the System V shared memory segment "
9460 "associated with the value of the argument I<key>.  A new shared memory "
9461 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9462 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9463 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9464 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9465 msgstr ""
9466 "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別"
9467 "子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共"
9468 "有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場"
9469 "合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメン"
9470 "トは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大き"
9471 "さとなる。"
9472
9473 #. type: Plain text
9474 #: build/C/man2/shmget.2:91
9475 msgid ""
9476 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9477 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9478 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9479 "| O_EXCL> for B<open>(2).)"
9480 msgstr ""
9481 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9482 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9483 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9484 "O_EXCL> を指定した場合の動作と同じである)。"
9485
9486 #. type: Plain text
9487 #: build/C/man2/shmget.2:95
9488 msgid "The value I<shmflg> is composed of:"
9489 msgstr "I<shmflg> は以下の内容から構成される:"
9490
9491 #. type: TP
9492 #: build/C/man2/shmget.2:95
9493 #, no-wrap
9494 msgid "B<IPC_CREAT>"
9495 msgstr "B<IPC_CREAT>"
9496
9497 #. type: Plain text
9498 #: build/C/man2/shmget.2:102
9499 msgid ""
9500 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9501 "find the segment associated with I<key> and check to see if the user has "
9502 "permission to access the segment."
9503 msgstr ""
9504 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9505 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9506 "可があるかどうかをチェックする。"
9507
9508 #. type: TP
9509 #: build/C/man2/shmget.2:102
9510 #, no-wrap
9511 msgid "B<IPC_EXCL>"
9512 msgstr "B<IPC_EXCL>"
9513
9514 #. type: Plain text
9515 #: build/C/man2/shmget.2:105
9516 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9517 msgstr ""
9518 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9519 "証する。"
9520
9521 #. type: TP
9522 #: build/C/man2/shmget.2:105
9523 #, no-wrap
9524 msgid "I<mode_flags>"
9525 msgstr "I<mode_flags>"
9526
9527 #. type: Plain text
9528 #: build/C/man2/shmget.2:115
9529 msgid ""
9530 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9531 "group, and world.  These bits have the same format, and the same meaning, as "
9532 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9533 "not used by the system."
9534 msgstr ""
9535 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9536 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9537 "ろ、システムは実行 (execute) 許可を参照しない。"
9538
9539 #. type: TP
9540 #: build/C/man2/shmget.2:115
9541 #, no-wrap
9542 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9543 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9544
9545 #. type: Plain text
9546 #: build/C/man2/shmget.2:121
9547 msgid ""
9548 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9549 "I<Documentation/vm/hugetlbpage.txt> for further information."
9550 msgstr ""
9551 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9552 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9553
9554 #. type: TP
9555 #: build/C/man2/shmget.2:121
9556 #, no-wrap
9557 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9558 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9559
9560 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9561 #.  specified.
9562 #. type: Plain text
9563 #: build/C/man2/shmget.2:140
9564 msgid ""
9565 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9566 "Do not reserve swap space for this segment.  When swap space is reserved, "
9567 "one has the guarantee that it is possible to modify the segment.  When swap "
9568 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9569 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9570 "overcommit_memory> in B<proc>(5)."
9571 msgstr ""
9572 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9573 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9574 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9575 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9576 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9577 "ルに関する議論も参照のこと。"
9578
9579 #. type: Plain text
9580 #: build/C/man2/shmget.2:148
9581 msgid ""
9582 "When a new shared memory segment is created, its contents are initialized to "
9583 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9584 "(2)), is initialized as follows:"
9585 msgstr ""
9586 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9587 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9588 "期化される。"
9589
9590 #. type: Plain text
9591 #: build/C/man2/shmget.2:153
9592 msgid ""
9593 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9594 "calling process."
9595 msgstr ""
9596 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9597 "ユーザーID を設定する。"
9598
9599 #. type: Plain text
9600 #: build/C/man2/shmget.2:158
9601 msgid ""
9602 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9603 "the calling process."
9604 msgstr ""
9605 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9606 "定する。"
9607
9608 #. type: Plain text
9609 #: build/C/man2/shmget.2:163
9610 msgid ""
9611 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9612 "significant 9 bit of I<shmflg>."
9613 msgstr ""
9614 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9615
9616 #. type: Plain text
9617 #: build/C/man2/shmget.2:167
9618 msgid "I<shm_segsz> is set to the value of I<size>."
9619 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9620
9621 #. type: Plain text
9622 #: build/C/man2/shmget.2:174
9623 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9624 msgstr ""
9625 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9626
9627 #. type: Plain text
9628 #: build/C/man2/shmget.2:177
9629 msgid "I<shm_ctime> is set to the current time."
9630 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9631
9632 #. type: Plain text
9633 #: build/C/man2/shmget.2:180
9634 msgid ""
9635 "If the shared memory segment already exists, the permissions are verified, "
9636 "and a check is made to see if it is marked for destruction."
9637 msgstr ""
9638 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9639 "(destruction) マークがつけられていないかのチェックが行われる。"
9640
9641 #. type: Plain text
9642 #: build/C/man2/shmget.2:185
9643 msgid ""
9644 "On success, a valid shared memory identifier is returned.  On errir, -1 is "
9645 "returned, and I<errno> is set to indicate the error."
9646 msgstr ""
9647 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
9648 "-1 が返り、 I<error> にエラーを示す値が設定される。"
9649
9650 #. type: Plain text
9651 #: build/C/man2/shmget.2:189
9652 msgid "On failure, I<errno> is set to one of the following:"
9653 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9654
9655 #. type: Plain text
9656 #: build/C/man2/shmget.2:195
9657 msgid ""
9658 "The user does not have permission to access the shared memory segment, and "
9659 "does not have the B<CAP_IPC_OWNER> capability."
9660 msgstr ""
9661 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9662 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9663
9664 #. type: Plain text
9665 #: build/C/man2/shmget.2:199
9666 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9667 msgstr ""
9668 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9669
9670 #. type: Plain text
9671 #: build/C/man2/shmget.2:205
9672 msgid ""
9673 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9674 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9675 "existed, but I<size> is greater than the size of that segment."
9676 msgstr ""
9677 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9678 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9679 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9680 "在するセグメントの サイズよりも大きかった。"
9681
9682 #. type: Plain text
9683 #: build/C/man2/shmget.2:214
9684 msgid ""
9685 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9686 msgstr ""
9687 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9688 "いなかった。"
9689
9690 #. type: Plain text
9691 #: build/C/man2/shmget.2:217
9692 msgid "No memory could be allocated for segment overhead."
9693 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9694
9695 #. type: Plain text
9696 #: build/C/man2/shmget.2:225
9697 msgid ""
9698 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9699 "segment of the requested I<size> would cause the system to exceed the system-"
9700 "wide limit on shared memory (B<SHMALL>)."
9701 msgstr ""
9702 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9703 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9704 "限 (B<SHMALL>)  を超過した。"
9705
9706 #. type: Plain text
9707 #: build/C/man2/shmget.2:232
9708 msgid ""
9709 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9710 "(did not have the B<CAP_IPC_LOCK> capability)."
9711 msgstr ""
9712 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9713 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9714
9715 #. type: Plain text
9716 #: build/C/man2/shmget.2:238
9717 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9718 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9719
9720 #. type: Plain text
9721 #: build/C/man2/shmget.2:261
9722 msgid ""
9723 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9724 "value is used for I<key>, the system call ignores everything but the least "
9725 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9726 "success)."
9727 msgstr ""
9728 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9729 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9730 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9731
9732 #. type: Plain text
9733 #: build/C/man2/shmget.2:265
9734 msgid ""
9735 "The following limits on shared memory segment resources affect the B<shmget>"
9736 "()  call:"
9737 msgstr ""
9738 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9739 "る:"
9740
9741 #. type: TP
9742 #: build/C/man2/shmget.2:265
9743 #, no-wrap
9744 msgid "B<SHMALL>"
9745 msgstr "B<SHMALL>"
9746
9747 #. type: Plain text
9748 #: build/C/man2/shmget.2:270
9749 msgid ""
9750 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9751 "and modified via I</proc/sys/kernel/shmall>)."
9752 msgstr ""
9753 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9754 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9755
9756 #. type: TP
9757 #: build/C/man2/shmget.2:270
9758 #, no-wrap
9759 msgid "B<SHMMAX>"
9760 msgstr "B<SHMMAX>"
9761
9762 #. type: Plain text
9763 #: build/C/man2/shmget.2:275
9764 msgid ""
9765 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9766 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9767 msgstr ""
9768 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9769 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9770
9771 #. type: TP
9772 #: build/C/man2/shmget.2:275
9773 #, no-wrap
9774 msgid "B<SHMMIN>"
9775 msgstr "B<SHMMIN>"
9776
9777 #. type: Plain text
9778 #: build/C/man2/shmget.2:281
9779 msgid ""
9780 "Minimum size in bytes for a shared memory segment: implementation dependent "
9781 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9782 msgstr ""
9783 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9784 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9785
9786 #. type: TP
9787 #: build/C/man2/shmget.2:281
9788 #, no-wrap
9789 msgid "B<SHMMNI>"
9790 msgstr "B<SHMMNI>"
9791
9792 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9793 #.  that we could create one more segment than SHMMNI -- MTK
9794 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9795 #. type: Plain text
9796 #: build/C/man2/shmget.2:290
9797 msgid ""
9798 "System wide maximum number of shared memory segments: implementation "
9799 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9800 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9801 msgstr ""
9802 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9803 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9804 "したり、変更したりできる)。"
9805
9806 #. type: Plain text
9807 #: build/C/man2/shmget.2:294
9808 msgid ""
9809 "The implementation has no specific limits for the per-process maximum number "
9810 "of shared memory segments (B<SHMSEG>)."
9811 msgstr ""
9812 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9813 "上の制限はない。"
9814
9815 #. type: Plain text
9816 #: build/C/man2/shmget.2:300
9817 msgid ""
9818 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9819 "shared memory segment scheduled for deletion."
9820 msgstr ""
9821 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9822 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9823
9824 #. type: Plain text
9825 #: build/C/man2/shmget.2:306
9826 msgid ""
9827 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9828 "more clearly show its function."
9829 msgstr ""
9830 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9831 "より明確にその機能を表しているだろう。"
9832
9833 #. type: Plain text
9834 #: build/C/man2/shmget.2:314
9835 msgid ""
9836 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9837 "B<shm_overview>(7), B<svipc>(7)"
9838 msgstr ""
9839 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9840 "B<shm_overview>(7), B<svipc>(7)"
9841
9842 #. type: TH
9843 #: build/C/man2/shmop.2:41
9844 #, no-wrap
9845 msgid "SHMOP"
9846 msgstr "SHMOP"
9847
9848 #. type: Plain text
9849 #: build/C/man2/shmop.2:44
9850 msgid "shmat, shmdt - System V shared memory operations"
9851 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
9852
9853 #. type: Plain text
9854 #: build/C/man2/shmop.2:48
9855 #, no-wrap
9856 msgid ""
9857 "B<#include E<lt>sys/types.hE<gt>>\n"
9858 "B<#include E<lt>sys/shm.hE<gt>>\n"
9859 msgstr ""
9860 "B<#include E<lt>sys/types.hE<gt>>\n"
9861 "B<#include E<lt>sys/shm.hE<gt>>\n"
9862
9863 #. type: Plain text
9864 #: build/C/man2/shmop.2:50
9865 #, no-wrap
9866 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9867 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9868
9869 #. type: Plain text
9870 #: build/C/man2/shmop.2:52
9871 #, no-wrap
9872 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9873 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9874
9875 #. type: Plain text
9876 #: build/C/man2/shmop.2:61
9877 msgid ""
9878 "B<shmat>()  attaches the System V shared memory segment identified by "
9879 "I<shmid> to the address space of the calling process.  The attaching address "
9880 "is specified by I<shmaddr> with one of the following criteria:"
9881 msgstr ""
9882 "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared "
9883 "memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付"
9884 "加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9885
9886 #. type: Plain text
9887 #: build/C/man2/shmop.2:67
9888 msgid ""
9889 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9890 "which to attach the segment."
9891 msgstr ""
9892 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9893 "されていない) アドレスを選択する。"
9894
9895 #. type: Plain text
9896 #: build/C/man2/shmop.2:82
9897 msgid ""
9898 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9899 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9900 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9901 "at which the attach occurs."
9902 msgstr ""
9903 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9904 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9905 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9906 "を指している必要がある。"
9907
9908 #. type: Plain text
9909 #: build/C/man2/shmop.2:92
9910 msgid ""
9911 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9912 "reading and the process must have read permission for the segment.  "
9913 "Otherwise the segment is attached for read and write and the process must "
9914 "have read and write permission for the segment.  There is no notion of a "
9915 "write-only shared memory segment."
9916 msgstr ""
9917 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9918 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9919 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9920 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9921 "の共有メモリ・セグメントという概念は存在しない。"
9922
9923 #. type: Plain text
9924 #: build/C/man2/shmop.2:107
9925 msgid ""
9926 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9927 "indicate that the mapping of the segment should replace any existing mapping "
9928 "in the range starting at I<shmaddr> and continuing for the size of the "
9929 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9930 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9931 msgstr ""
9932 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9933 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9934 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9935 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9936 "場合は、 I<shmaddr> が NULL であってはならない。"
9937
9938 #. type: Plain text
9939 #: build/C/man2/shmop.2:114
9940 msgid ""
9941 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9942 "The segment will automatically be detached at process exit.  The same "
9943 "segment may be attached as a read and as a read-write one, and more than "
9944 "once, in the process's address space."
9945 msgstr ""
9946 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9947 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9948 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9949 "複数回付加することもできる。"
9950
9951 #. type: Plain text
9952 #: build/C/man2/shmop.2:122
9953 msgid ""
9954 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9955 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9956 "follows:"
9957 msgstr ""
9958 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9959 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9960
9961 #. type: Plain text
9962 #: build/C/man2/shmop.2:125
9963 msgid "I<shm_atime> is set to the current time."
9964 msgstr "I<shm_atime> には現在の時刻を設定する。"
9965
9966 #. type: Plain text
9967 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9968 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9969 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9970
9971 #. type: Plain text
9972 #: build/C/man2/shmop.2:131
9973 msgid "I<shm_nattch> is incremented by one."
9974 msgstr "I<shm_nattch> を 1 増加させる。"
9975
9976 #. type: Plain text
9977 #: build/C/man2/shmop.2:142
9978 msgid ""
9979 "B<shmdt>()  detaches the shared memory segment located at the address "
9980 "specified by I<shmaddr> from the address space of the calling process.  The "
9981 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9982 "the value returned by the attaching B<shmat>()  call."
9983 msgstr ""
9984 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9985 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9986 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9987 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9988 "ない。"
9989
9990 #. type: Plain text
9991 #: build/C/man2/shmop.2:148
9992 msgid ""
9993 "On a successful B<shmdt>()  call the system updates the members of the "
9994 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9995 msgstr ""
9996 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9997 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9998
9999 #. type: Plain text
10000 #: build/C/man2/shmop.2:151
10001 msgid "I<shm_dtime> is set to the current time."
10002 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10003
10004 #. type: Plain text
10005 #: build/C/man2/shmop.2:159
10006 msgid ""
10007 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10008 "marked for deletion, the segment is deleted."
10009 msgstr ""
10010 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10011 "セグメントは削除される。"
10012
10013 #. type: Plain text
10014 #: build/C/man2/shmop.2:163
10015 msgid ""
10016 "After a B<fork>(2)  the child inherits the attached shared memory segments."
10017 msgstr ""
10018 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10019
10020 #. type: Plain text
10021 #: build/C/man2/shmop.2:167
10022 msgid ""
10023 "After an B<execve>(2)  all attached shared memory segments are detached from "
10024 "the process."
10025 msgstr ""
10026 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10027 "される。"
10028
10029 #. type: Plain text
10030 #: build/C/man2/shmop.2:171
10031 msgid ""
10032 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
10033 "process."
10034 msgstr ""
10035 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10036 "離される。"
10037
10038 #. type: Plain text
10039 #: build/C/man2/shmop.2:179
10040 msgid ""
10041 "On success B<shmat>()  returns the address of the attached shared memory "
10042 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10043 "indicate the cause of the error."
10044 msgstr ""
10045 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10046 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10047 "値を設定する。"
10048
10049 #. type: Plain text
10050 #: build/C/man2/shmop.2:185
10051 msgid ""
10052 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10053 "set to indicate the cause of the error."
10054 msgstr ""
10055 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10056 "ラーの原因を示す値を設定する。"
10057
10058 #. type: Plain text
10059 #: build/C/man2/shmop.2:191
10060 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10061 msgstr ""
10062 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10063
10064 #. type: Plain text
10065 #: build/C/man2/shmop.2:197
10066 msgid ""
10067 "The calling process does not have the required permissions for the requested "
10068 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10069 msgstr ""
10070 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10071 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10072
10073 #. type: Plain text
10074 #: build/C/man2/shmop.2:214
10075 msgid ""
10076 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10077 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10078 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10079 msgstr ""
10080 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10081 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10082 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10083 "れているが、 I<shmaddr> が NULL であった。"
10084
10085 #. type: Plain text
10086 #: build/C/man2/shmop.2:217
10087 msgid "Could not allocate memory for the descriptor or for the page tables."
10088 msgstr ""
10089 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10090 "とができない。"
10091
10092 #. type: Plain text
10093 #: build/C/man2/shmop.2:223
10094 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10095 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10096
10097 #.  The following since 2.6.17-rc1:
10098 #. type: Plain text
10099 #: build/C/man2/shmop.2:231
10100 msgid ""
10101 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10102 "not aligned on a page boundary."
10103 msgstr ""
10104 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10105 "I<shmaddr> がページ境界に合っていない。"
10106
10107 #. type: Plain text
10108 #: build/C/man2/shmop.2:250
10109 msgid ""
10110 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10111 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10112 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10113 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10114 msgstr ""
10115 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10116 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10117 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10118 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10119
10120 #. type: Plain text
10121 #: build/C/man2/shmop.2:262
10122 msgid ""
10123 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10124 "way of attaching a shared memory segment.  Be aware that the shared memory "
10125 "segment attached in this way may be attached at different addresses in "
10126 "different processes.  Therefore, any pointers maintained within the shared "
10127 "memory must be made relative (typically to the starting address of the "
10128 "segment), rather than absolute."
10129 msgstr ""
10130 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10131 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10132 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10133 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10134 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10135 "る。"
10136
10137 #. type: Plain text
10138 #: build/C/man2/shmop.2:267
10139 msgid ""
10140 "On Linux, it is possible to attach a shared memory segment even if it is "
10141 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10142 "behavior and many other implementations do not support it."
10143 msgstr ""
10144 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10145 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10146 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10147
10148 #. type: Plain text
10149 #: build/C/man2/shmop.2:270
10150 msgid "The following system parameter affects B<shmat>():"
10151 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10152
10153 #.  FIXME A good explanation of the rationale for the existence
10154 #.  of SHMLBA would be useful here
10155 #. type: TP
10156 #: build/C/man2/shmop.2:270
10157 #, no-wrap
10158 msgid "B<SHMLBA>"
10159 msgstr "B<SHMLBA>"
10160
10161 #.  FIXME That last sentence isn't true for all Linux
10162 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10163 #.  -- MTK, Nov 04
10164 #. type: Plain text
10165 #: build/C/man2/shmop.2:283
10166 msgid ""
10167 "Segment low boundary address multiple.  Must be page aligned.  For the "
10168 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10169 msgstr ""
10170 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10171 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10172
10173 #. type: Plain text
10174 #: build/C/man2/shmop.2:287
10175 msgid ""
10176 "The implementation places no intrinsic limit on the per-process maximum "
10177 "number of shared memory segments (B<SHMSEG>)."
10178 msgstr ""
10179 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10180 "関する実装依存の制限はない。"
10181
10182 #. type: Plain text
10183 #: build/C/man2/shmop.2:295
10184 msgid ""
10185 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10186 "B<shm_overview>(7), B<svipc>(7)"
10187 msgstr ""
10188 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10189 "B<shm_overview>(7), B<svipc>(7)"
10190
10191 #. type: TH
10192 #: build/C/man2/subpage_prot.2:30
10193 #, no-wrap
10194 msgid "SUBPAGE_PROT"
10195 msgstr "SUBPAGE_PROT"
10196
10197 #. type: TH
10198 #: build/C/man2/subpage_prot.2:30
10199 #, no-wrap
10200 msgid "2012-07-13"
10201 msgstr "2012-07-13"
10202
10203 #. type: Plain text
10204 #: build/C/man2/subpage_prot.2:33
10205 msgid "subpage_prot - define a subpage protection for an address range"
10206 msgstr ""
10207
10208 #. type: Plain text
10209 #: build/C/man2/subpage_prot.2:37
10210 #, no-wrap
10211 msgid ""
10212 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10213 "B<                  uint32_t *>I<map>B<);>\n"
10214 msgstr ""
10215 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10216 "B<                  uint32_t *>I<map>B<);>\n"
10217
10218 #. type: Plain text
10219 #: build/C/man2/subpage_prot.2:41
10220 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10221 msgstr ""
10222 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10223 "を参照。"
10224
10225 #. type: Plain text
10226 #: build/C/man2/subpage_prot.2:47
10227 msgid ""
10228 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10229 "control the access permissions on individual 4kB subpages on systems "
10230 "configured with a page size of 64kB."
10231 msgstr ""
10232
10233 #. type: Plain text
10234 #: build/C/man2/subpage_prot.2:54
10235 msgid ""
10236 "The protection map is applied to the memory pages in the region starting at "
10237 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10238 "aligned to a 64-kB boundary."
10239 msgstr ""
10240
10241 #. type: Plain text
10242 #: build/C/man2/subpage_prot.2:66
10243 msgid ""
10244 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10245 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10246 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10247 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10248 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10249 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10250 msgstr ""
10251
10252 #. type: Plain text
10253 #: build/C/man2/subpage_prot.2:71
10254 msgid ""
10255 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10256 "specified below is returned."
10257 msgstr ""
10258
10259 #. type: Plain text
10260 #: build/C/man2/subpage_prot.2:77
10261 msgid "The buffer referred to by I<map> is not accessible."
10262 msgstr ""
10263
10264 #. type: Plain text
10265 #: build/C/man2/subpage_prot.2:87
10266 msgid ""
10267 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10268 "be aligned to a multiple of the system page size, and they must not refer to "
10269 "a region outside of the address space of the process or to a region that "
10270 "consists of huge pages."
10271 msgstr ""
10272
10273 #. type: Plain text
10274 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10275 msgid "Out of memory."
10276 msgstr "メモリ不足である。"
10277
10278 #. type: Plain text
10279 #: build/C/man2/subpage_prot.2:96
10280 msgid ""
10281 "This system call is provided on the PowerPC architecture since Linux "
10282 "2.6.25.  The system call is provided only if the kernel is configured with "
10283 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10284 msgstr ""
10285
10286 #. type: Plain text
10287 #: build/C/man2/subpage_prot.2:101
10288 msgid ""
10289 "Glibc does not provide a wrapper for this system call; call it using "
10290 "B<syscall>(2)."
10291 msgstr ""
10292
10293 #. type: Plain text
10294 #: build/C/man2/subpage_prot.2:106
10295 msgid ""
10296 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10297 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10298 "field won't allow writes to a page that is otherwise write-protected."
10299 msgstr ""
10300
10301 #. type: SS
10302 #: build/C/man2/subpage_prot.2:106
10303 #, no-wrap
10304 msgid "Rationale"
10305 msgstr ""
10306
10307 #.  In the initial implementation, it was the case that:
10308 #.      In fact the whole process is switched to use 4k hardware pages when the
10309 #.      subpage_prot system call is used, but this could be improved in future
10310 #.      to switch only the affected segments.
10311 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10312 #.  the affected segment, not the whole process.
10313 #. type: Plain text
10314 #: build/C/man2/subpage_prot.2:128
10315 msgid ""
10316 "This system call is provided to assist writing emulators that operate using "
10317 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10318 "uses a smaller page size, the emulator can no longer use the memory-"
10319 "management unit (MMU)  and normal system calls for controlling page "
10320 "protections.  (The emulator could emulate the MMU by checking and possibly "
10321 "remapping the address for each memory access in software, but that is "
10322 "slow.)  The idea is that the emulator supplies an array of protection masks "
10323 "to apply to a specified range of virtual addresses.  These masks are applied "
10324 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10325 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10326 "affected.  Implicit in this is that the regions of the address space that "
10327 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10328 "hardware pages (on machines with hardware 64-kB page support)."
10329 msgstr ""
10330
10331 #. type: Plain text
10332 #: build/C/man2/subpage_prot.2:131
10333 msgid "B<mprotect>(2), B<syscall>(2)"
10334 msgstr "B<mprotect>(2), B<syscall>(2)"
10335
10336 #. type: Plain text
10337 #: build/C/man2/subpage_prot.2:134
10338 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10339 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10340
10341 #. type: TH
10342 #: build/C/man2/sync_file_range.2:30
10343 #, no-wrap
10344 msgid "SYNC_FILE_RANGE"
10345 msgstr "SYNC_FILE_RANGE"
10346
10347 #. type: Plain text
10348 #: build/C/man2/sync_file_range.2:33
10349 msgid "sync_file_range - sync a file segment with disk"
10350 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10351
10352 #. type: Plain text
10353 #: build/C/man2/sync_file_range.2:37
10354 #, no-wrap
10355 msgid ""
10356 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10357 "B<#include E<lt>fcntl.hE<gt>>\n"
10358 msgstr ""
10359 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10360 "B<#include E<lt>fcntl.hE<gt>>\n"
10361
10362 #. type: Plain text
10363 #: build/C/man2/sync_file_range.2:40
10364 #, no-wrap
10365 msgid ""
10366 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10367 "B<                    unsigned int >I<flags>B<);>\n"
10368 msgstr ""
10369 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10370 "B<                    unsigned int >I<flags>B<);>\n"
10371
10372 #. type: Plain text
10373 #: build/C/man2/sync_file_range.2:47
10374 msgid ""
10375 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10376 "referred to by the file descriptor I<fd> with disk."
10377 msgstr ""
10378 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10379 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10380
10381 #. type: Plain text
10382 #: build/C/man2/sync_file_range.2:61
10383 msgid ""
10384 "I<offset> is the starting byte of the file range to be synchronized.  "
10385 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10386 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10387 "are synchronized.  Synchronization is in units of the system page size: "
10388 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10389 "rounded up to a page boundary."
10390 msgstr ""
10391 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10392 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10393 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10394 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10395 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10396
10397 #. type: Plain text
10398 #: build/C/man2/sync_file_range.2:65
10399 msgid "The I<flags> bit-mask argument can include any of the following values:"
10400 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10401
10402 #. type: TP
10403 #: build/C/man2/sync_file_range.2:65
10404 #, no-wrap
10405 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10406 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10407
10408 #. type: Plain text
10409 #: build/C/man2/sync_file_range.2:70
10410 msgid ""
10411 "Wait upon write-out of all pages in the specified range that have already "
10412 "been submitted to the device driver for write-out before performing any "
10413 "write."
10414 msgstr ""
10415 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10416 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10417 "つ。"
10418
10419 #. type: TP
10420 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10421 #, no-wrap
10422 msgid "B<SYNC_FILE_RANGE_WRITE>"
10423 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10424
10425 #. type: Plain text
10426 #: build/C/man2/sync_file_range.2:76
10427 msgid ""
10428 "Initiate write-out of all dirty pages in the specified range which are not "
10429 "presently submitted write-out.  Note that even this may block if you attempt "
10430 "to write more than request queue size."
10431 msgstr ""
10432 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10433 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10434 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10435 "る点に注意すること。"
10436
10437 #. type: TP
10438 #: build/C/man2/sync_file_range.2:76
10439 #, no-wrap
10440 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10441 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10442
10443 #. type: Plain text
10444 #: build/C/man2/sync_file_range.2:80
10445 msgid ""
10446 "Wait upon write-out of all pages in the range after performing any write."
10447 msgstr ""
10448 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10449 "つ。"
10450
10451 #. type: Plain text
10452 #: build/C/man2/sync_file_range.2:84
10453 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10454 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10455
10456 #. type: SS
10457 #: build/C/man2/sync_file_range.2:84
10458 #, no-wrap
10459 msgid "Warning"
10460 msgstr "警告"
10461
10462 #. type: Plain text
10463 #: build/C/man2/sync_file_range.2:100
10464 msgid ""
10465 "This system call is extremely dangerous and should not be used in portable "
10466 "programs.  None of these operations writes out the file's metadata.  "
10467 "Therefore, unless the application is strictly performing overwrites of "
10468 "already-instantiated disk blocks, there are no guarantees that the data will "
10469 "be available after a crash.  There is no user interface to know if a write "
10470 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10471 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10472 "When writing into preallocated space, many file systems also require calls "
10473 "into the block allocator, which this system call does not sync out to disk.  "
10474 "This system call does not flush disk write caches and thus does not provide "
10475 "any data integrity on systems with volatile disk write caches."
10476 msgstr ""
10477 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10478 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10479 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10480 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10481 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10482 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10483 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10484 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10485 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10486 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10487 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10488 "コールではデータの一貫性を確保できないことになる。"
10489
10490 #. type: SS
10491 #: build/C/man2/sync_file_range.2:100
10492 #, no-wrap
10493 msgid "Some details"
10494 msgstr "詳細"
10495
10496 #. type: Plain text
10497 #: build/C/man2/sync_file_range.2:108
10498 msgid ""
10499 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10500 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10501 msgstr ""
10502 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10503 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10504
10505 #. type: Plain text
10506 #: build/C/man2/sync_file_range.2:112
10507 msgid "Useful combinations of the I<flags> bits are:"
10508 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10509
10510 #. type: TP
10511 #: build/C/man2/sync_file_range.2:112
10512 #, no-wrap
10513 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10514 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10515
10516 #. type: Plain text
10517 #: build/C/man2/sync_file_range.2:120
10518 msgid ""
10519 "Ensures that all pages in the specified range which were dirty when "
10520 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10521 "start-write-for-data-integrity operation."
10522 msgstr ""
10523 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10524 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10525 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10526 "ある。"
10527
10528 #. type: Plain text
10529 #: build/C/man2/sync_file_range.2:127
10530 msgid ""
10531 "Start write-out of all dirty pages in the specified range which are not "
10532 "presently under write-out.  This is an asynchronous flush-to-disk "
10533 "operation.  This is not suitable for data integrity operations."
10534 msgstr ""
10535 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10536 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10537 "る。データ完全性確保が必要な操作としては適切ではない。"
10538
10539 #. type: TP
10540 #: build/C/man2/sync_file_range.2:127
10541 #, no-wrap
10542 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10543 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10544
10545 #. type: Plain text
10546 #: build/C/man2/sync_file_range.2:134
10547 msgid ""
10548 "Wait for completion of write-out of all pages in the specified range.  This "
10549 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10550 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10551 "and obtain its result."
10552 msgstr ""
10553 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10554 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10555 "き、この操作の完了を待ち、結果を取得することができる。"
10556
10557 #. type: TP
10558 #: build/C/man2/sync_file_range.2:134
10559 #, no-wrap
10560 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10561 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10562
10563 #. type: Plain text
10564 #: build/C/man2/sync_file_range.2:141
10565 msgid ""
10566 "This is a write-for-data-integrity operation that will ensure that all pages "
10567 "in the specified range which were dirty when B<sync_file_range>()  was "
10568 "called are committed to disk."
10569 msgstr ""
10570 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10571 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10572 "のページが ディスクに格納されることが保証される。"
10573
10574 #. type: Plain text
10575 #: build/C/man2/sync_file_range.2:147
10576 msgid ""
10577 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10578 "I<errno> is set to indicate the error."
10579 msgstr ""
10580 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10581 "I<error> にエラーを示す値を設定する。"
10582
10583 #. type: Plain text
10584 #: build/C/man2/sync_file_range.2:152
10585 msgid "I<fd> is not a valid file descriptor."
10586 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10587
10588 #. type: Plain text
10589 #: build/C/man2/sync_file_range.2:160
10590 msgid ""
10591 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10592 msgstr ""
10593 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10594 "である。"
10595
10596 #. type: Plain text
10597 #: build/C/man2/sync_file_range.2:163
10598 msgid "I/O error."
10599 msgstr "I/O エラー。"
10600
10601 #. type: Plain text
10602 #: build/C/man2/sync_file_range.2:169
10603 msgid "Out of disk space."
10604 msgstr "ディスク領域不足である。"
10605
10606 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10607 #.  (In user space at least) it isn't possible to obtain a file descriptor
10608 #.  for a symbolic link.
10609 #. type: Plain text
10610 #: build/C/man2/sync_file_range.2:177
10611 msgid ""
10612 "I<fd> refers to something other than a regular file, a block device, a "
10613 "directory, or a symbolic link."
10614 msgstr ""
10615 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10616 "以外のものを指している。"
10617
10618 #. type: Plain text
10619 #: build/C/man2/sync_file_range.2:180
10620 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10621 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10622
10623 #. type: Plain text
10624 #: build/C/man2/sync_file_range.2:183
10625 msgid ""
10626 "This system call is Linux-specific, and should be avoided in portable "
10627 "programs."
10628 msgstr ""
10629 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10630 "けるべきである。"
10631
10632 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10633 #. type: Plain text
10634 #: build/C/man2/sync_file_range.2:200
10635 msgid ""
10636 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10637 "in a suitable pair of registers.  On such architectures, the call signature "
10638 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10639 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10640 "(2)  for details.)  Therefore, these architectures define a different system "
10641 "call that orders the arguments suitably:"
10642 msgstr ""
10643 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
10644 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
10645 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
10646 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
10647 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
10648 "き数が適切な順序になった別のシステムコールが定義されている。"
10649
10650 #. type: Plain text
10651 #: build/C/man2/sync_file_range.2:205
10652 #, no-wrap
10653 msgid ""
10654 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10655 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10656 msgstr ""
10657 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10658 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10659
10660 #. type: Plain text
10661 #: build/C/man2/sync_file_range.2:210
10662 msgid ""
10663 "The behavior of this system call is otherwise exactly the same as "
10664 "B<sync_file_range>()."
10665 msgstr ""
10666 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10667 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10668 "glibc では提供されていない。"
10669
10670 #. type: Plain text
10671 #: build/C/man2/sync_file_range.2:221
10672 msgid ""
10673 "A system call with this signature first appeared on the ARM architecture in "
10674 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10675 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10676 "architectures where glibc support is provided, glibc transparently wraps "
10677 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10678 msgstr ""
10679 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10680 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10681 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10682 "システムコールの名前が変更された。\n"
10683 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10684 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10685 "B<sync_file_range2>() を適切に使用するようになっている。"
10686
10687 #. type: Plain text
10688 #: build/C/man2/sync_file_range.2:226
10689 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10690 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10691
10692 #~ msgid "2008-01-24"
10693 #~ msgstr "2008-01-24"
10694
10695 #~ msgid "B<fallocate>()  returns zero on success, and -1 on failure."
10696 #~ msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
10697
10698 #~ msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
10699 #~ msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
10700
10701 #~ msgid "2012-05-31"
10702 #~ msgstr "2012-05-31"
10703
10704 #~ msgid ""
10705 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
10706 #~ msgstr ""
10707 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
10708 #~ "-1 が返される。"
10709
10710 #~ msgid ""
10711 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10712 #~ "pair of registers.  On this architecture, the call signature of "
10713 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10714 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10715 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10716 #~ "suitably:"
10717 #~ msgstr ""
10718 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10719 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10720 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10721 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10722 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10723 #~ "システムコールが定義されている。"
10724
10725 #~ msgid ""
10726 #~ "The behavior of this system call is otherwise exactly the same as "
10727 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10728 #~ "in glibc."
10729 #~ msgstr ""
10730 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10731 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10732 #~ "では提供されていない。"
10733
10734 #~ msgid ""
10735 #~ "The I<mode> is not supported by the file system containing the file "
10736 #~ "referred to by I<fd>."
10737 #~ msgstr ""
10738 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10739 #~ "ない。"
10740
10741 #~ msgid ""
10742 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10743 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10744 #~ msgstr ""
10745 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10746 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10747
10748 #~ msgid ""
10749 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10750 #~ "()  writes its output.  This file must be writable to the user or "
10751 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10752 #~ "truncated."
10753 #~ msgstr ""
10754 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10755 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10756 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10757 #~ "イルの元の内容を上書きする。"
10758
10759 #~ msgid ""
10760 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10761 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10762 #~ msgstr ""
10763 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10764 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10765 #~ "リプトが付属している。"
10766
10767 #~ msgid ""
10768 #~ "This flag allocates and initializes to zero the disk space within the "
10769 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10770 #~ "subsequent writes into this range are guaranteed not to fail because of "
10771 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10772 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10773 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10774 #~ "less than I<offset>+I<len>."
10775 #~ msgstr ""
10776 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10777 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10778 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10779 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10780 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10781 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10782 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10783 #~ "は変更されることはない。"
10784
10785 #~ msgid ""
10786 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10787 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10788 #~ msgstr ""
10789 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10790 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10791
10792 #~ msgid ""
10793 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10794 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10795 #~ "required."
10796 #~ msgstr ""
10797 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10798 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10799 #~ "が必要である。"
10800
10801 #~ msgid ""
10802 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10803 #~ "provided since version 2.2."
10804 #~ msgstr ""
10805 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10806 #~ "glibc バージョン 2.2 以降で行われている。"