OSDN Git Service

(split) LDP: Translate snapshot
[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-07-15 16:08+0900\n"
10 "PO-Revision-Date: 2013-07-24 02:26+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.52 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.52 の一部\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 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定され、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定されない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> をインクルードするが、このファイルには以下の行が含まれており、"
561
562 #. type: Plain text
563 #: build/C/man3/alloca.3:129
564 #, no-wrap
565 msgid ""
566 "    #ifdef  __GNUC__\n"
567 "    #define alloca(size)   __builtin_alloca (size)\n"
568 "    #endif\n"
569 msgstr ""
570 "    #ifdef  __GNUC__\n"
571 "    #define alloca(size)   __builtin_alloca (size)\n"
572 "    #endif\n"
573
574 #. type: Plain text
575 #: build/C/man3/alloca.3:132
576 msgid "with messy consequences if one has a private version of this function."
577 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
578
579 #. type: Plain text
580 #: build/C/man3/alloca.3:136
581 msgid ""
582 "The fact that the code is inlined means that it is impossible to take the "
583 "address of this function, or to change its behavior by linking with a "
584 "different library."
585 msgstr ""
586 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
587 "のライブラリをリンクして動作を変更することはできない。"
588
589 #. type: Plain text
590 #: build/C/man3/alloca.3:140
591 msgid ""
592 "The inlined code often consists of a single instruction adjusting the stack "
593 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
594 "error return."
595 msgstr ""
596 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
597 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
598 "よって NULL エラーが返されることはない。"
599
600 #. type: SH
601 #: build/C/man3/alloca.3:140 build/C/man2/cacheflush.2:82
602 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
603 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
604 #: build/C/man2/posix_fadvise.2:186 build/C/man2/shmget.2:300
605 #, no-wrap
606 msgid "BUGS"
607 msgstr "バグ"
608
609 #. type: Plain text
610 #: build/C/man3/alloca.3:145
611 msgid ""
612 "There is no error indication if the stack frame cannot be extended.  "
613 "(However, after a failed allocation, the program is likely to receive a "
614 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
615 msgstr ""
616 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
617 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
618 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
619
620 #. type: Plain text
621 #: build/C/man3/alloca.3:153
622 msgid ""
623 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
624 "a function call, because the stack space reserved by B<alloca>()  would "
625 "appear on the stack in the middle of the space for the function arguments."
626 msgstr ""
627 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
628 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
629 "使われるスタック領域の中に現れてしまうためである。"
630
631 #. type: SH
632 #: build/C/man3/alloca.3:153 build/C/man2/fallocate.2:202
633 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
634 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
635 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
636 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
637 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
638 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
639 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
640 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:167
641 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
642 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:97
643 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:271
644 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:423
645 #: build/C/man2/shmget.2:306 build/C/man2/shmop.2:287
646 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
647 #, no-wrap
648 msgid "SEE ALSO"
649 msgstr "関連項目"
650
651 #. type: Plain text
652 #: build/C/man3/alloca.3:157
653 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
654 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
655
656 #. type: TH
657 #: build/C/man2/cacheflush.2:25
658 #, no-wrap
659 msgid "CACHEFLUSH"
660 msgstr "CACHEFLUSH"
661
662 #. type: TH
663 #: build/C/man2/cacheflush.2:25
664 #, no-wrap
665 msgid "2007-05-26"
666 msgstr "2007-05-26"
667
668 #. type: Plain text
669 #: build/C/man2/cacheflush.2:28
670 msgid "cacheflush - flush contents of instruction and/or data cache"
671 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
672
673 #. type: Plain text
674 #: build/C/man2/cacheflush.2:31
675 #, no-wrap
676 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
677 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
678
679 #. type: Plain text
680 #: build/C/man2/cacheflush.2:33
681 #, no-wrap
682 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
683 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
684
685 #. type: Plain text
686 #: build/C/man2/cacheflush.2:43
687 msgid ""
688 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
689 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
690 "of:"
691 msgstr ""
692 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
693 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
694 "指定する:"
695
696 #. type: TP
697 #: build/C/man2/cacheflush.2:43
698 #, no-wrap
699 msgid "B<ICACHE>"
700 msgstr "B<ICACHE>"
701
702 #. type: Plain text
703 #: build/C/man2/cacheflush.2:46
704 msgid "Flush the instruction cache."
705 msgstr "命令 (instruction) キャッシュをフラッシュする。"
706
707 #. type: TP
708 #: build/C/man2/cacheflush.2:46
709 #, no-wrap
710 msgid "B<DCACHE>"
711 msgstr "B<DCACHE>"
712
713 #. type: Plain text
714 #: build/C/man2/cacheflush.2:49
715 msgid "Write back to memory and invalidate the affected valid cache lines."
716 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
717
718 #. type: TP
719 #: build/C/man2/cacheflush.2:49
720 #, no-wrap
721 msgid "B<BCACHE>"
722 msgstr "B<BCACHE>"
723
724 #. type: Plain text
725 #: build/C/man2/cacheflush.2:53
726 msgid "Same as B<(ICACHE|DCACHE)>."
727 msgstr "B<(ICACHE|DCACHE)> と同じ。"
728
729 #. type: Plain text
730 #: build/C/man2/cacheflush.2:59
731 msgid ""
732 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
733 "detected, I<errno> will indicate the error."
734 msgstr ""
735 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
736 "出された場合は I<errno> にエラーが指示される。"
737
738 #. type: TP
739 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
740 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:310
741 #: build/C/man2/subpage_prot.2:72
742 #, no-wrap
743 msgid "B<EFAULT>"
744 msgstr "B<EFAULT>"
745
746 #. type: Plain text
747 #: build/C/man2/cacheflush.2:67
748 msgid ""
749 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
750 "accessible."
751 msgstr ""
752 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
753 "能ではない。"
754
755 #. type: TP
756 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:131
757 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
758 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
759 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
760 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
761 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
762 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
763 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
764 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
765 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:324
766 #: build/C/man2/shmget.2:199 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
767 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
768 #, no-wrap
769 msgid "B<EINVAL>"
770 msgstr "B<EINVAL>"
771
772 #. type: Plain text
773 #: build/C/man2/cacheflush.2:75
774 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
775 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
776
777 #.  FIXME This system call was only on MIPS back in 1.2 days, but
778 #.  by now it is on a number of other architectures (but not i386).
779 #.  Investigate the details and update this page.
780 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
781 #. type: Plain text
782 #: build/C/man2/cacheflush.2:82
783 msgid ""
784 "This Linux-specific system call is available only on MIPS-based systems.  It "
785 "should not be used in programs intended to be portable."
786 msgstr ""
787 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
788 "植を意図したプログラムで使用すべきではない。"
789
790 #. type: Plain text
791 #: build/C/man2/cacheflush.2:89
792 msgid ""
793 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
794 "Therefore, the whole cache is always flushed."
795 msgstr ""
796 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
797 "のキャッシュがフラッシュされる。"
798
799 #. type: TH
800 #: build/C/man2/fallocate.2:11
801 #, no-wrap
802 msgid "FALLOCATE"
803 msgstr "FALLOCATE"
804
805 #. type: TH
806 #: build/C/man2/fallocate.2:11
807 #, no-wrap
808 msgid "2013-06-10"
809 msgstr "2013-06-10"
810
811 #. type: Plain text
812 #: build/C/man2/fallocate.2:14
813 msgid "fallocate - manipulate file space"
814 msgstr "fallocate - ファイル空間の操作"
815
816 #. type: Plain text
817 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
818 #, no-wrap
819 msgid ""
820 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
821 "B<#include E<lt>fcntl.hE<gt>>\n"
822 msgstr ""
823 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
824 "B<#include E<lt>fcntl.hE<gt>>\n"
825
826 #. type: Plain text
827 #: build/C/man2/fallocate.2:21
828 #, no-wrap
829 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
830 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
831
832 #. type: Plain text
833 #: build/C/man2/fallocate.2:27
834 msgid ""
835 "This is a nonportable, Linux-specific system call.  For the portable, "
836 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
837 "B<posix_fallocate>(3)."
838 msgstr ""
839 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
840 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
841 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
842
843 #. type: Plain text
844 #: build/C/man2/fallocate.2:37
845 msgid ""
846 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
847 "space for the file referred to by I<fd> for the byte range starting at "
848 "I<offset> and continuing for I<len> bytes."
849 msgstr ""
850 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
851 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
852 "域である。"
853
854 #. type: Plain text
855 #: build/C/man2/fallocate.2:42
856 msgid ""
857 "The I<mode> argument determines the operation to be performed on the given "
858 "range.  Details of the supported operations are given in the subsections "
859 "below."
860 msgstr ""
861 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
862 "サポートされている操作の詳細は以下のサブセクションで説明する。"
863
864 #. type: SS
865 #: build/C/man2/fallocate.2:42
866 #, no-wrap
867 msgid "Allocating disk space"
868 msgstr "ディスク領域の割り当て"
869
870 #. type: Plain text
871 #: build/C/man2/fallocate.2:61
872 msgid ""
873 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
874 "and initializes to zero the disk space within the range specified by "
875 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
876 "changed if I<offset>+I<len> is greater than the file size.  This default "
877 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
878 "library function, and is intended as a method of optimally implementing that "
879 "function."
880 msgstr ""
881 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
882 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
883 "う。\n"
884 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
885 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
886 "は、\n"
887 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
888 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
889 "ことを目的としているからである。"
890
891 #. type: Plain text
892 #: build/C/man2/fallocate.2:67
893 msgid ""
894 "After a successful call, subsequent writes into the range specified by "
895 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
896 "space."
897 msgstr ""
898 "呼び出しが成功した場合、\n"
899 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
900 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
901
902 #. type: Plain text
903 #: build/C/man2/fallocate.2:78
904 msgid ""
905 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
906 "the call is similar, but the file size will not be changed even if I<offset>"
907 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
908 "the end of the file in this manner is useful for optimizing append workloads."
909 msgstr ""
910 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
911 "ル\n"
912 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
913 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
914 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
915 "追記を最適化したい場合に役に立つ。"
916
917 #. type: Plain text
918 #: build/C/man2/fallocate.2:82
919 msgid ""
920 "Because allocation is done in block size chunks, B<fallocate>()  may "
921 "allocate a larger range of disk space than was specified."
922 msgstr ""
923 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
924 "り\n"
925 "も大きなディスク領域を割り当てることがある。"
926
927 #. type: SS
928 #: build/C/man2/fallocate.2:82
929 #, no-wrap
930 msgid "Deallocating file space"
931 msgstr "ファイル空間の割り当て解除"
932
933 #. type: Plain text
934 #: build/C/man2/fallocate.2:97
935 msgid ""
936 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
937 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
938 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
939 "range, partial file system blocks are zeroed, and whole file system blocks "
940 "are removed from the file.  After a successful call, subsequent reads from "
941 "this range will return zeroes."
942 msgstr ""
943 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
944 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
945 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
946 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
947 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
948 "を返す。"
949
950 #. type: Plain text
951 #: build/C/man2/fallocate.2:108
952 msgid ""
953 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
954 "I<mode>; in other words, even when punching off the end of the file, the "
955 "file size (as reported by B<stat>(2))  does not change."
956 msgstr ""
957 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
958 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
959 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
960
961 #. type: Plain text
962 #: build/C/man2/fallocate.2:112
963 msgid ""
964 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
965 "doesn't support the operation, an error is returned."
966 msgstr ""
967 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
968 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
969 "る。"
970
971 #. type: Plain text
972 #: build/C/man2/fallocate.2:119
973 msgid ""
974 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
975 "I<errno> is set to indicate the error."
976 msgstr "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> にエラーを示す値を設定する。"
977
978 #. type: TP
979 #: build/C/man2/fallocate.2:120 build/C/man2/madvise.2:279
980 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
981 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
982 #: build/C/man2/sync_file_range.2:148
983 #, no-wrap
984 msgid "B<EBADF>"
985 msgstr "B<EBADF>"
986
987 #. type: Plain text
988 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
989 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
990 msgstr ""
991 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
992 "いない。"
993
994 #. type: TP
995 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
996 #, no-wrap
997 msgid "B<EFBIG>"
998 msgstr "B<EFBIG>"
999
1000 #. type: Plain text
1001 #: build/C/man2/fallocate.2:128
1002 msgid "I<offset>+I<len> exceeds the maximum file size."
1003 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1004
1005 #. type: TP
1006 #: build/C/man2/fallocate.2:128
1007 #, no-wrap
1008 msgid "B<EINTR>"
1009 msgstr "B<EINTR>"
1010
1011 #. type: Plain text
1012 #: build/C/man2/fallocate.2:131
1013 msgid "A signal was caught during execution."
1014 msgstr "実行中にシグナルが捕捉された。"
1015
1016 #. type: Plain text
1017 #: build/C/man2/fallocate.2:143 build/C/man3/posix_fallocate.3:87
1018 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1019 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1020
1021 #. type: TP
1022 #: build/C/man2/fallocate.2:143 build/C/man2/madvise.2:310
1023 #: build/C/man2/sync_file_range.2:160
1024 #, no-wrap
1025 msgid "B<EIO>"
1026 msgstr "B<EIO>"
1027
1028 #. type: Plain text
1029 #: build/C/man2/fallocate.2:146
1030 msgid "An I/O error occurred while reading from or writing to a file system."
1031 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1032
1033 #. type: TP
1034 #: build/C/man2/fallocate.2:146 build/C/man2/mmap.2:452
1035 #: build/C/man3/posix_fallocate.3:87
1036 #, no-wrap
1037 msgid "B<ENODEV>"
1038 msgstr "B<ENODEV>"
1039
1040 #. type: Plain text
1041 #: build/C/man2/fallocate.2:153
1042 msgid ""
1043 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1044 "or FIFO, a different error results.)"
1045 msgstr ""
1046 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1047 "を参照している場合、別のエラーが発生する)。"
1048
1049 #. type: TP
1050 #: build/C/man2/fallocate.2:153 build/C/man3/posix_fallocate.3:91
1051 #: build/C/man2/shmget.2:217 build/C/man2/sync_file_range.2:166
1052 #, no-wrap
1053 msgid "B<ENOSPC>"
1054 msgstr "B<ENOSPC>"
1055
1056 #. type: Plain text
1057 #: build/C/man2/fallocate.2:158 build/C/man3/posix_fallocate.3:96
1058 msgid ""
1059 "There is not enough space left on the device containing the file referred to "
1060 "by I<fd>."
1061 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1062
1063 #. type: Plain text
1064 #: build/C/man2/fallocate.2:162
1065 msgid "This kernel does not implement B<fallocate>()."
1066 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1067
1068 #. type: TP
1069 #: build/C/man2/fallocate.2:162
1070 #, no-wrap
1071 msgid "B<EOPNOTSUPP>"
1072 msgstr "B<EOPNOTSUPP>"
1073
1074 #. type: Plain text
1075 #: build/C/man2/fallocate.2:171
1076 msgid ""
1077 "The file system containing the file referred to by I<fd> does not support "
1078 "this operation; or the I<mode> is not supported by the file system "
1079 "containing the file referred to by I<fd>."
1080 msgstr ""
1081 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1082 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1083 "I<mode> をサポートしていない。"
1084
1085 #. type: TP
1086 #: build/C/man2/fallocate.2:171 build/C/man2/mlock.2:143
1087 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:349
1088 #: build/C/man2/shmget.2:225
1089 #, no-wrap
1090 msgid "B<EPERM>"
1091 msgstr "B<EPERM>"
1092
1093 #. type: Plain text
1094 #: build/C/man2/fallocate.2:187
1095 msgid ""
1096 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1097 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1098 "is marked append-only (see B<chattr>(1))."
1099 msgstr ""
1100 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>"
1101 "(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> が指定されたが、 I<fd> が参照"
1102 "するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1103
1104 #. type: TP
1105 #: build/C/man2/fallocate.2:187 build/C/man2/posix_fadvise.2:97
1106 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1107 #, no-wrap
1108 msgid "B<ESPIPE>"
1109 msgstr "B<ESPIPE>"
1110
1111 #. type: Plain text
1112 #: build/C/man2/fallocate.2:191
1113 msgid "I<fd> refers to a pipe or FIFO."
1114 msgstr "I<fd> がパイプか FIFO を参照している。"
1115
1116 #. type: SH
1117 #: build/C/man2/fallocate.2:191 build/C/man3/malloc_info.3:60
1118 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1119 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1120 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1121 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1122 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1123 #, no-wrap
1124 msgid "VERSIONS"
1125 msgstr "バージョン"
1126
1127 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1128 #. type: Plain text
1129 #: build/C/man2/fallocate.2:199
1130 msgid ""
1131 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1132 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1133 "in glibc headers only since version 2.18."
1134 msgstr ""
1135 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1136 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1137 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1138
1139 #. type: Plain text
1140 #: build/C/man2/fallocate.2:202
1141 msgid "B<fallocate>()  is Linux-specific."
1142 msgstr "B<fallocate>()  は Linux 固有である。"
1143
1144 #. type: Plain text
1145 #: build/C/man2/fallocate.2:207
1146 msgid ""
1147 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1148 msgstr ""
1149 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1150
1151 #. type: TH
1152 #: build/C/man2/madvise.2:35
1153 #, no-wrap
1154 msgid "MADVISE"
1155 msgstr "MADVISE"
1156
1157 #. type: TH
1158 #: build/C/man2/madvise.2:35
1159 #, no-wrap
1160 msgid "2012-04-28"
1161 msgstr "2012-04-28"
1162
1163 #. type: Plain text
1164 #: build/C/man2/madvise.2:38
1165 msgid "madvise - give advice about use of memory"
1166 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1167
1168 #. type: Plain text
1169 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1170 #: build/C/man3/shm_open.3:31
1171 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1172 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1173
1174 #. type: Plain text
1175 #: build/C/man2/madvise.2:42
1176 msgid ""
1177 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1178 msgstr ""
1179 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1180
1181 #. type: Plain text
1182 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1183 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1184 msgid ""
1185 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1186 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1187
1188 #. type: Plain text
1189 #: build/C/man2/madvise.2:50
1190 msgid "B<madvise>(): _BSD_SOURCE"
1191 msgstr "B<madvise>(): _BSD_SOURCE"
1192
1193 #. type: Plain text
1194 #: build/C/man2/madvise.2:68
1195 msgid ""
1196 "The B<madvise>()  system call advises the kernel about how to handle paging "
1197 "input/output in the address range beginning at address I<addr> and with size "
1198 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1199 "to use some mapped or shared memory areas, so that the kernel can choose "
1200 "appropriate read-ahead and caching techniques.  This call does not influence "
1201 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1202 "but may influence its performance.  The kernel is free to ignore the advice."
1203 msgstr ""
1204 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1205 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1206 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1207 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1208 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1209 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1210 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1211
1212 #. type: Plain text
1213 #: build/C/man2/madvise.2:72
1214 msgid "The advice is indicated in the I<advice> argument which can be"
1215 msgstr ""
1216 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1217
1218 #. type: TP
1219 #: build/C/man2/madvise.2:72
1220 #, no-wrap
1221 msgid "B<MADV_NORMAL>"
1222 msgstr "B<MADV_NORMAL>"
1223
1224 #. type: Plain text
1225 #: build/C/man2/madvise.2:76
1226 msgid "No special treatment.  This is the default."
1227 msgstr "特別な扱いは行わない。これがデフォルトである。"
1228
1229 #. type: TP
1230 #: build/C/man2/madvise.2:76
1231 #, no-wrap
1232 msgid "B<MADV_RANDOM>"
1233 msgstr "B<MADV_RANDOM>"
1234
1235 #. type: Plain text
1236 #: build/C/man2/madvise.2:80
1237 msgid ""
1238 "Expect page references in random order.  (Hence, read ahead may be less "
1239 "useful than normally.)"
1240 msgstr ""
1241 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1242 "なさそうだ。)"
1243
1244 #. type: TP
1245 #: build/C/man2/madvise.2:80
1246 #, no-wrap
1247 msgid "B<MADV_SEQUENTIAL>"
1248 msgstr "B<MADV_SEQUENTIAL>"
1249
1250 #. type: Plain text
1251 #: build/C/man2/madvise.2:85
1252 msgid ""
1253 "Expect page references in sequential order.  (Hence, pages in the given "
1254 "range can be aggressively read ahead, and may be freed soon after they are "
1255 "accessed.)"
1256 msgstr ""
1257 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1258 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1259 "して良い。)"
1260
1261 #. type: TP
1262 #: build/C/man2/madvise.2:85
1263 #, no-wrap
1264 msgid "B<MADV_WILLNEED>"
1265 msgstr "B<MADV_WILLNEED>"
1266
1267 #. type: Plain text
1268 #: build/C/man2/madvise.2:89
1269 msgid ""
1270 "Expect access in the near future.  (Hence, it might be a good idea to read "
1271 "some pages ahead.)"
1272 msgstr ""
1273 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1274 "ておくといいだろう。)"
1275
1276 #. type: TP
1277 #: build/C/man2/madvise.2:89
1278 #, no-wrap
1279 msgid "B<MADV_DONTNEED>"
1280 msgstr "B<MADV_DONTNEED>"
1281
1282 #. type: Plain text
1283 #: build/C/man2/madvise.2:100
1284 msgid ""
1285 "Do not expect access in the near future.  (For the time being, the "
1286 "application is finished with the given range, so the kernel can free "
1287 "resources associated with it.)  Subsequent accesses of pages in this range "
1288 "will succeed, but will result either in reloading of the memory contents "
1289 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1290 "pages for mappings without an underlying file."
1291 msgstr ""
1292 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1293 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1294 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1295 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1296 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1297 "なる。"
1298
1299 #. type: TP
1300 #: build/C/man2/madvise.2:100
1301 #, no-wrap
1302 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1303 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1304
1305 #.  2.6.18-rc5
1306 #.  Databases want to use this feature to drop a section of their
1307 #.  bufferpool (shared memory segments) - without writing back to
1308 #.  disk/swap space.  This feature is also useful for supporting
1309 #.  hot-plug memory on UML.
1310 #. type: Plain text
1311 #: build/C/man2/madvise.2:113
1312 msgid ""
1313 "Free up a given range of pages and its associated backing store.  Currently, "
1314 "only shmfs/tmpfs supports this; other file systems return with the error "
1315 "B<ENOSYS>."
1316 msgstr ""
1317 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1318 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1319 "返される。"
1320
1321 #. type: TP
1322 #: build/C/man2/madvise.2:113
1323 #, no-wrap
1324 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1325 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1326
1327 #.  See http://lwn.net/Articles/171941/
1328 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1329 #.  Currently, copy-on-write may change the physical address of
1330 #.  a page even if the user requested that the page is pinned in
1331 #.  memory (either by mlock or by get_user_pages).  This happens
1332 #.  if the process forks meanwhile, and the parent writes to that
1333 #.  page.  As a result, the page is orphaned: in case of
1334 #.  get_user_pages, the application will never see any data hardware
1335 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1336 #.  the parent is not getting the realtime/security benefits of mlock.
1337 #.  In particular, this affects the Infiniband modules which do DMA from
1338 #.  and into user pages all the time.
1339 #.  This patch adds madvise options to control whether memory range is
1340 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1341 #.  from/into these pages.  Could also be useful to an application
1342 #.  wanting to speed up its forks by cutting large areas out of
1343 #.  consideration.
1344 #.  SEE ALSO: http://lwn.net/Articles/171941/
1345 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1346 #. type: Plain text
1347 #: build/C/man2/madvise.2:144
1348 msgid ""
1349 "Do not make the pages in this range available to the child after a B<fork>"
1350 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1351 "physical location of a page(s) if the parent writes to it after a B<fork>"
1352 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1353 "page(s).)"
1354 msgstr ""
1355 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1356 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1357 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1358 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1359 "を行うような場合に 問題を起こすことがある)。"
1360
1361 #. type: TP
1362 #: build/C/man2/madvise.2:144
1363 #, no-wrap
1364 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1365 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1366
1367 #. type: Plain text
1368 #: build/C/man2/madvise.2:150
1369 msgid ""
1370 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1371 "a mapping is inherited across B<fork>(2)."
1372 msgstr ""
1373 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1374 "(2)  の前後でマッピングは継承されるようになる。"
1375
1376 #. type: TP
1377 #: build/C/man2/madvise.2:150
1378 #, no-wrap
1379 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1380 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1381
1382 #. type: Plain text
1383 #: build/C/man2/madvise.2:162
1384 msgid ""
1385 "Poison a page and handle it like a hardware memory corruption.  This "
1386 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1387 "This operation may result in the calling process receiving a B<SIGBUS> and "
1388 "the page being unmapped.  This feature is intended for testing of memory "
1389 "error-handling code; it is available only if the kernel was configured with "
1390 "B<CONFIG_MEMORY_FAILURE>."
1391 msgstr ""
1392
1393 #. type: TP
1394 #: build/C/man2/madvise.2:162
1395 #, no-wrap
1396 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1397 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1398
1399 #. type: Plain text
1400 #: build/C/man2/madvise.2:180
1401 msgid ""
1402 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1403 "memory of each page in the specified range is preserved (i.e., when next "
1404 "accessed, the same content will be visible, but in a new physical page "
1405 "frame), and the original page is offlined (i.e., no longer used, and taken "
1406 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1407 "operation is invisible to (i.e., does not change the semantics of)  the "
1408 "calling process.  This feature is intended for testing of memory error-"
1409 "handling code; it is available only if the kernel was configured with "
1410 "B<CONFIG_MEMORY_FAILURE>."
1411 msgstr ""
1412
1413 #. type: TP
1414 #: build/C/man2/madvise.2:180
1415 #, no-wrap
1416 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1417 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1418
1419 #. type: Plain text
1420 #: build/C/man2/madvise.2:205
1421 msgid ""
1422 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1423 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1424 "memory that have been marked as mergeable, looking for pages with identical "
1425 "content.  These are replaced by a single write-protected page (which is "
1426 "automatically copied if a process later wants to update the content of the "
1427 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1428 "feature is intended for applications that generate many instances of the "
1429 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1430 "of processing power; use with care.  See the Linux kernel source file "
1431 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1432 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1433 "configured with B<CONFIG_KSM>."
1434 msgstr ""
1435
1436 #. type: TP
1437 #: build/C/man2/madvise.2:205
1438 #, no-wrap
1439 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1440 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1441
1442 #. type: Plain text
1443 #: build/C/man2/madvise.2:214
1444 msgid ""
1445 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1446 "address range; KSM unmerges whatever pages it had merged in the address "
1447 "range specified by I<addr> and I<length>."
1448 msgstr ""
1449
1450 #. type: TP
1451 #: build/C/man2/madvise.2:214
1452 #, no-wrap
1453 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1454 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1455
1456 #.  http://lwn.net/Articles/358904/
1457 #.  https://lwn.net/Articles/423584/
1458 #. type: Plain text
1459 #: build/C/man2/madvise.2:243
1460 msgid ""
1461 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1462 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1463 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1464 "the areas marked as huge page candidates to replace them with huge pages.  "
1465 "The kernel will also allocate huge pages directly when the region is "
1466 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1467 "feature is primarily aimed at applications that use large mappings of data "
1468 "and access large regions of that memory at a time (e.g., virtualization "
1469 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1470 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1471 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1472 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1473 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1474 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1475 msgstr ""
1476
1477 #. type: TP
1478 #: build/C/man2/madvise.2:243
1479 #, no-wrap
1480 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1481 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1482
1483 #. type: Plain text
1484 #: build/C/man2/madvise.2:250
1485 msgid ""
1486 "Ensures that memory in the address range specified by I<addr> and I<length> "
1487 "will not be collapsed into huge pages."
1488 msgstr ""
1489
1490 #. type: TP
1491 #: build/C/man2/madvise.2:250
1492 #, no-wrap
1493 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1494 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1495
1496 #. type: Plain text
1497 #: build/C/man2/madvise.2:264
1498 msgid ""
1499 "Exclude from a core dump those pages in the range specified by I<addr> and "
1500 "I<length>.  This is useful in applications that have large areas of memory "
1501 "that are known not to be useful in a core dump.  The effect of "
1502 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1503 "proc/PID/coredump_filter> file (see B<core>(5))."
1504 msgstr ""
1505
1506 #. type: TP
1507 #: build/C/man2/madvise.2:264
1508 #, no-wrap
1509 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1510 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1511
1512 #. type: Plain text
1513 #: build/C/man2/madvise.2:268
1514 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1515 msgstr ""
1516
1517 #. type: Plain text
1518 #: build/C/man2/madvise.2:275
1519 msgid ""
1520 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1521 "is set appropriately."
1522 msgstr ""
1523 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1524 "を適切な値に設定する。"
1525
1526 #. type: TP
1527 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1528 #: build/C/man2/mremap.2:136
1529 #, no-wrap
1530 msgid "B<EAGAIN>"
1531 msgstr "B<EAGAIN>"
1532
1533 #. type: Plain text
1534 #: build/C/man2/madvise.2:279
1535 msgid "A kernel resource was temporarily unavailable."
1536 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1537
1538 #. type: Plain text
1539 #: build/C/man2/madvise.2:282
1540 msgid "The map exists, but the area maps something that isn't a file."
1541 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1542
1543 #. type: Plain text
1544 #: build/C/man2/madvise.2:285
1545 msgid "This error can occur for the following reasons:"
1546 msgstr ""
1547
1548 #. type: IP
1549 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1550 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1551 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1552 #: build/C/man3/mallopt.3:241
1553 #, no-wrap
1554 msgid "*"
1555 msgstr "*"
1556
1557 #.  .I len
1558 #.  is zero,
1559 #. type: Plain text
1560 #: build/C/man2/madvise.2:292
1561 msgid "The value I<len> is negative."
1562 msgstr "I<len> が負の値である。"
1563
1564 #. type: Plain text
1565 #: build/C/man2/madvise.2:295
1566 msgid "I<addr> is not page-aligned."
1567 msgstr ""
1568
1569 #. type: Plain text
1570 #: build/C/man2/madvise.2:298
1571 msgid "I<advice> is not a valid value"
1572 msgstr "I<advice> が有効な値でない。"
1573
1574 #. type: Plain text
1575 #: build/C/man2/madvise.2:301
1576 msgid ""
1577 "The application is attempting to release locked or shared pages (with "
1578 "B<MADV_DONTNEED>)."
1579 msgstr ""
1580 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1581 "放\n"
1582 "しようとしている。"
1583
1584 #. type: Plain text
1585 #: build/C/man2/madvise.2:309
1586 msgid ""
1587 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1588 "kernel was not configured with B<CONFIG_KSM>."
1589 msgstr ""
1590
1591 #. type: Plain text
1592 #: build/C/man2/madvise.2:316
1593 msgid ""
1594 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1595 "maximum resident set size."
1596 msgstr ""
1597 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1598 "(resident set size) の最大値を越えてしまう。"
1599
1600 #. type: TP
1601 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1602 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1603 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1604 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1605 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1606 #: build/C/man2/shmctl.2:333 build/C/man2/shmget.2:214
1607 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1608 #: build/C/man2/sync_file_range.2:163
1609 #, no-wrap
1610 msgid "B<ENOMEM>"
1611 msgstr "B<ENOMEM>"
1612
1613 #. type: Plain text
1614 #: build/C/man2/madvise.2:321
1615 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1616 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1617
1618 #. type: Plain text
1619 #: build/C/man2/madvise.2:325
1620 msgid ""
1621 "Addresses in the specified range are not currently mapped, or are outside "
1622 "the address space of the process."
1623 msgstr ""
1624 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1625 "空間の内部にない。"
1626
1627 #.  FIXME . Write a posix_madvise(3) page.
1628 #. type: Plain text
1629 #: build/C/man2/madvise.2:337
1630 msgid ""
1631 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1632 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1633 "There is a similar B<posix_fadvise>(2)  for file access."
1634 msgstr ""
1635 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1636 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1637 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1638 "する。"
1639
1640 #. type: Plain text
1641 #: build/C/man2/madvise.2:346
1642 msgid ""
1643 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1644 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1645 msgstr ""
1646 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1647 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1648
1649 #. type: SS
1650 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1651 #: build/C/man2/shmget.2:294
1652 #, no-wrap
1653 msgid "Linux notes"
1654 msgstr "Linux での注意"
1655
1656 #. type: Plain text
1657 #: build/C/man2/madvise.2:355
1658 msgid ""
1659 "The current Linux implementation (2.4.0) views this system call more as a "
1660 "command than as advice and hence may return an error when it cannot do what "
1661 "it usually would do in response to this advice.  (See the ERRORS description "
1662 "above.)  This is nonstandard behavior."
1663 msgstr ""
1664 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1665 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1666 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1667 "とは異なる。"
1668
1669 #.  .SH HISTORY
1670 #.  The
1671 #.  .BR madvise ()
1672 #.  function first appeared in 4.4BSD.
1673 #. type: Plain text
1674 #: build/C/man2/madvise.2:371
1675 msgid ""
1676 "The Linux implementation requires that the address I<addr> be page-aligned, "
1677 "and allows I<length> to be zero.  If there are some parts of the specified "
1678 "address range that are not mapped, the Linux version of B<madvise>()  "
1679 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1680 "the system call, as it should)."
1681 msgstr ""
1682 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1683 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1684 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1685 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1686 "返す)。"
1687
1688 #. type: Plain text
1689 #: build/C/man2/madvise.2:379
1690 msgid ""
1691 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1692 "B<munmap>(2), B<core>(5)"
1693 msgstr ""
1694 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1695 "B<munmap>(2), B<core>(5)"
1696
1697 #. type: TH
1698 #: build/C/man3/mallinfo.3:26
1699 #, no-wrap
1700 msgid "MALLINFO"
1701 msgstr "MALLINFO"
1702
1703 #. type: TH
1704 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1705 #, no-wrap
1706 msgid "2012-05-06"
1707 msgstr "2012-05-06"
1708
1709 #. type: Plain text
1710 #: build/C/man3/mallinfo.3:29
1711 msgid "mallinfo - obtain memory allocation information"
1712 msgstr "mallinfo - メモリ割り当て情報を取得する"
1713
1714 #. type: Plain text
1715 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1716 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1717 #: build/C/man3/mallopt.3:31
1718 msgid "B<#include E<lt>malloc.hE<gt>>"
1719 msgstr "B<#include E<lt>malloc.hE<gt>>"
1720
1721 #. type: Plain text
1722 #: build/C/man3/mallinfo.3:33
1723 msgid "B<struct mallinfo mallinfo(void);>"
1724 msgstr "B<struct mallinfo mallinfo(void);>"
1725
1726 #. type: Plain text
1727 #: build/C/man3/mallinfo.3:41
1728 msgid ""
1729 "The B<mallinfo>()  function returns a copy of a structure containing "
1730 "information about memory allocations performed by B<malloc>(3)  and related "
1731 "functions.  This structure is defined as follows:"
1732 msgstr ""
1733 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1734 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1735 "この構造体は以下のように定義されている。"
1736
1737 #. type: Plain text
1738 #: build/C/man3/mallinfo.3:56
1739 #, no-wrap
1740 msgid ""
1741 "struct mallinfo {\n"
1742 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1743 "    int ordblks;   /* Number of free chunks */\n"
1744 "    int smblks;    /* Number of free fastbin blocks */\n"
1745 "    int hblks;     /* Number of mmapped regions */\n"
1746 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1747 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1748 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1749 "    int uordblks;  /* Total allocated space (bytes) */\n"
1750 "    int fordblks;  /* Total free space (bytes) */\n"
1751 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1752 "};\n"
1753 msgstr ""
1754 "struct mallinfo {\n"
1755 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1756 "    int ordblks;   /* Number of free chunks */\n"
1757 "    int smblks;    /* Number of free fastbin blocks */\n"
1758 "    int hblks;     /* Number of mmapped regions */\n"
1759 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1760 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1761 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1762 "    int uordblks;  /* Total allocated space (bytes) */\n"
1763 "    int fordblks;  /* Total free space (bytes) */\n"
1764 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1765 "};\n"
1766
1767 #. type: Plain text
1768 #: build/C/man3/mallinfo.3:62
1769 msgid ""
1770 "The fields of the I<mallinfo> structure contain the following information:"
1771 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1772
1773 #. type: TP
1774 #: build/C/man3/mallinfo.3:62
1775 #, no-wrap
1776 msgid "I<arena>"
1777 msgstr "I<arena>"
1778
1779 #. type: Plain text
1780 #: build/C/man3/mallinfo.3:68
1781 msgid ""
1782 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1783 "memory allocated on the heap).  This figure includes both in-use blocks and "
1784 "blocks on the free list."
1785 msgstr ""
1786
1787 #. type: TP
1788 #: build/C/man3/mallinfo.3:68
1789 #, no-wrap
1790 msgid "I<ordblks>"
1791 msgstr "I<ordblks>"
1792
1793 #. type: Plain text
1794 #: build/C/man3/mallinfo.3:71
1795 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1796 msgstr ""
1797
1798 #. type: TP
1799 #: build/C/man3/mallinfo.3:71
1800 #, no-wrap
1801 msgid "I<smblks>"
1802 msgstr "I<smblks>"
1803
1804 #. type: Plain text
1805 #: build/C/man3/mallinfo.3:75
1806 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1807 msgstr ""
1808
1809 #. type: TP
1810 #: build/C/man3/mallinfo.3:75
1811 #, no-wrap
1812 msgid "I<hblks>"
1813 msgstr "I<hblks>"
1814
1815 #. type: Plain text
1816 #: build/C/man3/mallinfo.3:83
1817 msgid ""
1818 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1819 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1820 msgstr ""
1821
1822 #. type: TP
1823 #: build/C/man3/mallinfo.3:83
1824 #, no-wrap
1825 msgid "I<hblkhd>"
1826 msgstr "I<hblkhd>"
1827
1828 #. type: Plain text
1829 #: build/C/man3/mallinfo.3:87
1830 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1831 msgstr ""
1832
1833 #. type: TP
1834 #: build/C/man3/mallinfo.3:87
1835 #, no-wrap
1836 msgid "I<usmblks>"
1837 msgstr "I<usmblks>"
1838
1839 #. type: Plain text
1840 #: build/C/man3/mallinfo.3:92
1841 msgid ""
1842 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1843 "of space that was ever allocated.  This field is maintained only in "
1844 "nonthreading environments."
1845 msgstr ""
1846
1847 #. type: TP
1848 #: build/C/man3/mallinfo.3:92
1849 #, no-wrap
1850 msgid "I<fsmblks>"
1851 msgstr "I<fsmblks>"
1852
1853 #. type: Plain text
1854 #: build/C/man3/mallinfo.3:95
1855 msgid "The total number of bytes in fastbin free blocks."
1856 msgstr ""
1857
1858 #. type: TP
1859 #: build/C/man3/mallinfo.3:95
1860 #, no-wrap
1861 msgid "I<uordblks>"
1862 msgstr "I<uordblks>"
1863
1864 #. type: Plain text
1865 #: build/C/man3/mallinfo.3:98
1866 msgid "The total number of bytes used by in-use allocations."
1867 msgstr ""
1868
1869 #. type: TP
1870 #: build/C/man3/mallinfo.3:98
1871 #, no-wrap
1872 msgid "I<fordblks>"
1873 msgstr "I<fordblks>"
1874
1875 #. type: Plain text
1876 #: build/C/man3/mallinfo.3:101
1877 msgid "The total number of bytes in free blocks."
1878 msgstr ""
1879
1880 #. type: TP
1881 #: build/C/man3/mallinfo.3:101
1882 #, no-wrap
1883 msgid "I<keepcost>"
1884 msgstr "I<keepcost>"
1885
1886 #.  .SH VERSIONS
1887 #.  Available already in glibc 2.0, possibly earlier
1888 #. type: Plain text
1889 #: build/C/man3/mallinfo.3:110
1890 msgid ""
1891 "The total amount of releasable free space at the top of the heap.  This is "
1892 "the maximum number of bytes that could ideally (i.e., ignoring page "
1893 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1894 msgstr ""
1895
1896 #. type: Plain text
1897 #: build/C/man3/mallinfo.3:114
1898 msgid ""
1899 "This function is not specified by POSIX or the C standards.  A similar "
1900 "function exists on many System V derivatives, and was specified in the SVID."
1901 msgstr ""
1902
1903 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1904 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1905 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1906 #.  on libc-alpha@sourceware.org
1907 #. type: Plain text
1908 #: build/C/man3/mallinfo.3:126
1909 msgid ""
1910 "B<Information is returned for only the main memory allocation area.> "
1911 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1912 "B<malloc_info>(3)  for alternatives that include information about other "
1913 "arenas."
1914 msgstr ""
1915
1916 #. type: Plain text
1917 #: build/C/man3/mallinfo.3:134
1918 msgid ""
1919 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1920 "because some internal bookkeeping values may be of type I<long>, the "
1921 "reported values may wrap around zero and thus be inaccurate."
1922 msgstr ""
1923
1924 #. type: SH
1925 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1926 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
1927 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1928 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1929 #, no-wrap
1930 msgid "EXAMPLE"
1931 msgstr "例"
1932
1933 #. type: Plain text
1934 #: build/C/man3/mallinfo.3:140
1935 msgid ""
1936 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1937 "statistics before and after allocating and freeing some blocks of memory.  "
1938 "The statistics are displayed on standard output."
1939 msgstr ""
1940
1941 #. type: Plain text
1942 #: build/C/man3/mallinfo.3:144
1943 msgid ""
1944 "The first two command-line arguments specify the number and size of blocks "
1945 "to be allocated with B<malloc>(3)."
1946 msgstr ""
1947
1948 #. type: Plain text
1949 #: build/C/man3/mallinfo.3:158
1950 msgid ""
1951 "The remaining three arguments specify which of the allocated blocks should "
1952 "be freed with B<free>(3).  These three arguments are optional, and specify "
1953 "(in order): the step size to be used in the loop that frees blocks (the "
1954 "default is 1, meaning free all blocks in the range); the ordinal position of "
1955 "the first block to be freed (default 0, meaning the first allocated block); "
1956 "and a number one greater than the ordinal position of the last block to be "
1957 "freed (default is one greater than the maximum block number).  If these "
1958 "three arguments are omitted, then the defaults cause all allocated blocks to "
1959 "be freed."
1960 msgstr ""
1961
1962 #. type: Plain text
1963 #: build/C/man3/mallinfo.3:162
1964 msgid ""
1965 "In the following example run of the program, 1000 allocations of 100 bytes "
1966 "are performed, and then every second allocated block is freed:"
1967 msgstr ""
1968
1969 #. type: Plain text
1970 #: build/C/man3/mallinfo.3:177
1971 #, no-wrap
1972 msgid ""
1973 "$ B<./a.out 1000 100 2>\n"
1974 "============== Before allocating blocks ==============\n"
1975 "Total non-mmapped bytes (arena):       0\n"
1976 "# of free chunks (ordblks):            1\n"
1977 "# of free fastbin blocks (smblks):     0\n"
1978 "# of mapped regions (hblks):           0\n"
1979 "Bytes in mapped regions (hblkhd):      0\n"
1980 "Max. total allocated space (usmblks):  0\n"
1981 "Free bytes held in fastbins (fsmblks): 0\n"
1982 "Total allocated space (uordblks):      0\n"
1983 "Total free space (fordblks):           0\n"
1984 "Topmost releasable block (keepcost):   0\n"
1985 msgstr ""
1986 "$ B<./a.out 1000 100 2>\n"
1987 "============== Before allocating blocks ==============\n"
1988 "Total non-mmapped bytes (arena):       0\n"
1989 "# of free chunks (ordblks):            1\n"
1990 "# of free fastbin blocks (smblks):     0\n"
1991 "# of mapped regions (hblks):           0\n"
1992 "Bytes in mapped regions (hblkhd):      0\n"
1993 "Max. total allocated space (usmblks):  0\n"
1994 "Free bytes held in fastbins (fsmblks): 0\n"
1995 "Total allocated space (uordblks):      0\n"
1996 "Total free space (fordblks):           0\n"
1997 "Topmost releasable block (keepcost):   0\n"
1998
1999 #. type: Plain text
2000 #: build/C/man3/mallinfo.3:189
2001 #, no-wrap
2002 msgid ""
2003 "============== After allocating blocks ==============\n"
2004 "Total non-mmapped bytes (arena):       135168\n"
2005 "# of free chunks (ordblks):            1\n"
2006 "# of free fastbin blocks (smblks):     0\n"
2007 "# of mapped regions (hblks):           0\n"
2008 "Bytes in mapped regions (hblkhd):      0\n"
2009 "Max. total allocated space (usmblks):  0\n"
2010 "Free bytes held in fastbins (fsmblks): 0\n"
2011 "Total allocated space (uordblks):      104000\n"
2012 "Total free space (fordblks):           31168\n"
2013 "Topmost releasable block (keepcost):   31168\n"
2014 msgstr ""
2015 "============== After allocating blocks ==============\n"
2016 "Total non-mmapped bytes (arena):       135168\n"
2017 "# of free chunks (ordblks):            1\n"
2018 "# of free fastbin blocks (smblks):     0\n"
2019 "# of mapped regions (hblks):           0\n"
2020 "Bytes in mapped regions (hblkhd):      0\n"
2021 "Max. total allocated space (usmblks):  0\n"
2022 "Free bytes held in fastbins (fsmblks): 0\n"
2023 "Total allocated space (uordblks):      104000\n"
2024 "Total free space (fordblks):           31168\n"
2025 "Topmost releasable block (keepcost):   31168\n"
2026
2027 #. type: Plain text
2028 #: build/C/man3/mallinfo.3:201
2029 #, no-wrap
2030 msgid ""
2031 "============== After freeing blocks ==============\n"
2032 "Total non-mmapped bytes (arena):       135168\n"
2033 "# of free chunks (ordblks):            501\n"
2034 "# of free fastbin blocks (smblks):     0\n"
2035 "# of mapped regions (hblks):           0\n"
2036 "Bytes in mapped regions (hblkhd):      0\n"
2037 "Max. total allocated space (usmblks):  0\n"
2038 "Free bytes held in fastbins (fsmblks): 0\n"
2039 "Total allocated space (uordblks):      52000\n"
2040 "Total free space (fordblks):           83168\n"
2041 "Topmost releasable block (keepcost):   31168\n"
2042 msgstr ""
2043 "============== After freeing blocks ==============\n"
2044 "Total non-mmapped bytes (arena):       135168\n"
2045 "# of free chunks (ordblks):            501\n"
2046 "# of free fastbin blocks (smblks):     0\n"
2047 "# of mapped regions (hblks):           0\n"
2048 "Bytes in mapped regions (hblkhd):      0\n"
2049 "Max. total allocated space (usmblks):  0\n"
2050 "Free bytes held in fastbins (fsmblks): 0\n"
2051 "Total allocated space (uordblks):      52000\n"
2052 "Total free space (fordblks):           83168\n"
2053 "Topmost releasable block (keepcost):   31168\n"
2054
2055 #. type: SS
2056 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2057 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2058 #: build/C/man2/mprotect.2:165
2059 #, no-wrap
2060 msgid "Program source"
2061 msgstr "プログラムのソース"
2062
2063 #. type: Plain text
2064 #: build/C/man3/mallinfo.3:208
2065 #, no-wrap
2066 msgid ""
2067 "#include E<lt>malloc.hE<gt>\n"
2068 "#include \"tlpi_hdr.h\"\n"
2069 msgstr ""
2070 "#include E<lt>malloc.hE<gt>\n"
2071 "#include \"tlpi_hdr.h\"\n"
2072
2073 #. type: Plain text
2074 #: build/C/man3/mallinfo.3:213
2075 #, no-wrap
2076 msgid ""
2077 "static void\n"
2078 "display_mallinfo(void)\n"
2079 "{\n"
2080 "    struct mallinfo mi;\n"
2081 msgstr ""
2082 "static void\n"
2083 "display_mallinfo(void)\n"
2084 "{\n"
2085 "    struct mallinfo mi;\n"
2086
2087 #. type: Plain text
2088 #: build/C/man3/mallinfo.3:215
2089 #, no-wrap
2090 msgid "    mi = mallinfo();\n"
2091 msgstr "    mi = mallinfo();\n"
2092
2093 #. type: Plain text
2094 #: build/C/man3/mallinfo.3:227
2095 #, no-wrap
2096 msgid ""
2097 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2098 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2099 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2100 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2101 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2102 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2103 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2104 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2105 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2106 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2107 "}\n"
2108 msgstr ""
2109 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2110 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2111 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2112 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2113 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2114 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2115 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2116 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2117 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2118 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2119 "}\n"
2120
2121 #. type: Plain text
2122 #: build/C/man3/mallinfo.3:235
2123 #, no-wrap
2124 msgid ""
2125 "int\n"
2126 "main(int argc, char *argv[])\n"
2127 "{\n"
2128 "#define MAX_ALLOCS 2000000\n"
2129 "    char *alloc[MAX_ALLOCS];\n"
2130 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2131 "    size_t blockSize;\n"
2132 msgstr ""
2133 "int\n"
2134 "main(int argc, char *argv[])\n"
2135 "{\n"
2136 "#define MAX_ALLOCS 2000000\n"
2137 "    char *alloc[MAX_ALLOCS];\n"
2138 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2139 "    size_t blockSize;\n"
2140
2141 #. type: Plain text
2142 #: build/C/man3/mallinfo.3:239
2143 #, no-wrap
2144 msgid ""
2145 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2146 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2147 "                \"[end-free]]]\\en\", argv[0]);\n"
2148 msgstr ""
2149 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2150 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2151 "                \"[end-free]]]\\en\", argv[0]);\n"
2152
2153 #. type: Plain text
2154 #: build/C/man3/mallinfo.3:245
2155 #, no-wrap
2156 msgid ""
2157 "    numBlocks = atoi(argv[1]);\n"
2158 "    blockSize = atoi(argv[2]);\n"
2159 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2160 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2161 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2162 msgstr ""
2163 "    numBlocks = atoi(argv[1]);\n"
2164 "    blockSize = atoi(argv[2]);\n"
2165 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2166 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2167 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2168
2169 #. type: Plain text
2170 #: build/C/man3/mallinfo.3:248
2171 #, no-wrap
2172 msgid ""
2173 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2174 "    display_mallinfo();\n"
2175 msgstr ""
2176 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2177 "    display_mallinfo();\n"
2178
2179 #. type: Plain text
2180 #: build/C/man3/mallinfo.3:252
2181 #, no-wrap
2182 msgid ""
2183 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2184 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2185 "            fatal(\"Too many allocations\");\n"
2186 msgstr ""
2187 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2188 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2189 "            fatal(\"Too many allocations\");\n"
2190
2191 #. type: Plain text
2192 #: build/C/man3/mallinfo.3:257
2193 #, no-wrap
2194 msgid ""
2195 "        alloc[j] = malloc(blockSize);\n"
2196 "        if (alloc[j] == NULL)\n"
2197 "            errExit(\"malloc\");\n"
2198 "    }\n"
2199 msgstr ""
2200 "        alloc[j] = malloc(blockSize);\n"
2201 "        if (alloc[j] == NULL)\n"
2202 "            errExit(\"malloc\");\n"
2203 "    }\n"
2204
2205 #. type: Plain text
2206 #: build/C/man3/mallinfo.3:260
2207 #, no-wrap
2208 msgid ""
2209 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2210 "    display_mallinfo();\n"
2211 msgstr ""
2212 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2213 "    display_mallinfo();\n"
2214
2215 #. type: Plain text
2216 #: build/C/man3/mallinfo.3:263
2217 #, no-wrap
2218 msgid ""
2219 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2220 "        free(alloc[j]);\n"
2221 msgstr ""
2222 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2223 "        free(alloc[j]);\n"
2224
2225 #. type: Plain text
2226 #: build/C/man3/mallinfo.3:266
2227 #, no-wrap
2228 msgid ""
2229 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2230 "    display_mallinfo();\n"
2231 msgstr ""
2232 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2233 "    display_mallinfo();\n"
2234
2235 #. type: Plain text
2236 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2237 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2238 #: build/C/man2/mmap.2:711
2239 #, no-wrap
2240 msgid ""
2241 "    exit(EXIT_SUCCESS);\n"
2242 "}\n"
2243 msgstr ""
2244 "    exit(EXIT_SUCCESS);\n"
2245 "}\n"
2246
2247 #. type: Plain text
2248 #: build/C/man3/mallinfo.3:279
2249 msgid ""
2250 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2251 "B<malloc_trim>(3), B<mallopt>(3)"
2252 msgstr ""
2253 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2254 "B<malloc_trim>(3), B<mallopt>(3)"
2255
2256 #. type: TH
2257 #: build/C/man3/malloc_get_state.3:25
2258 #, no-wrap
2259 msgid "MALLOC_GET_STATE"
2260 msgstr "MALLOC_GET_STATE"
2261
2262 #. type: TH
2263 #: build/C/man3/malloc_get_state.3:25
2264 #, no-wrap
2265 msgid "2012-05-04"
2266 msgstr "2012-05-04"
2267
2268 #. type: Plain text
2269 #: build/C/man3/malloc_get_state.3:28
2270 msgid ""
2271 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2272 "implementation"
2273 msgstr ""
2274
2275 #. type: Plain text
2276 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2277 #, no-wrap
2278 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2279 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2280
2281 #. type: Plain text
2282 #: build/C/man3/malloc_get_state.3:33
2283 #, no-wrap
2284 msgid "B<void* malloc_get_state(void);>\n"
2285 msgstr "B<void* malloc_get_state(void);>\n"
2286
2287 #. type: Plain text
2288 #: build/C/man3/malloc_get_state.3:35
2289 #, no-wrap
2290 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2291 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2292
2293 #. type: Plain text
2294 #: build/C/man3/malloc_get_state.3:53
2295 msgid ""
2296 "The B<malloc_get_state>()  function records the current state of all "
2297 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2298 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2299 "is recorded in a system-dependent opaque data structure dynamically "
2300 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2301 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2302 "this memory.)"
2303 msgstr ""
2304
2305 #. type: Plain text
2306 #: build/C/man3/malloc_get_state.3:61
2307 msgid ""
2308 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2309 "internal bookkeeping variables to the values recorded in the opaque data "
2310 "structure pointed to by I<state>."
2311 msgstr ""
2312
2313 #. type: Plain text
2314 #: build/C/man3/malloc_get_state.3:68
2315 msgid ""
2316 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2317 "opaque data structure.  On error (for example, memory could not be allocated "
2318 "for the data structure), B<malloc_get_state>()  returns NULL."
2319 msgstr ""
2320
2321 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2322 #.  /* Must fail if the major version is too high. */
2323 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2324 #. type: Plain text
2325 #: build/C/man3/malloc_get_state.3:86
2326 msgid ""
2327 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2328 "that I<state> does not point to a correctly formed data structure, "
2329 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2330 "version of the data structure referred to by I<state> is a more recent "
2331 "version than this implementation knows about, B<malloc_set_state>()  returns "
2332 "-2."
2333 msgstr ""
2334
2335 #. type: Plain text
2336 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2337 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2338 msgid "These functions are GNU extensions."
2339 msgstr "これらの関数は GNU による拡張である。"
2340
2341 #. type: Plain text
2342 #: build/C/man3/malloc_get_state.3:94
2343 msgid ""
2344 "These functions are especially useful when using this B<malloc>(3)  "
2345 "implementation as part of a shared library, and the heap contents are saved/"
2346 "restored via some other method.  This technique is used by the GNU Emacs to "
2347 "implement its \"dumping\" function."
2348 msgstr ""
2349
2350 #.  i.e., calls __malloc_check_init()
2351 #.  i.e., malloc checking is not already in use
2352 #.  and the caller requested malloc checking
2353 #. type: Plain text
2354 #: build/C/man3/malloc_get_state.3:111
2355 msgid ""
2356 "Hook function pointers are never saved or restored by these functions, with "
2357 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2358 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2359 "checking hooks if possible; if malloc checking was not in use in the "
2360 "recorded state, but the caller has requested malloc checking, then the hooks "
2361 "are reset to 0."
2362 msgstr ""
2363
2364 #. type: Plain text
2365 #: build/C/man3/malloc_get_state.3:114
2366 msgid "B<malloc>(3), B<mallopt>(3)"
2367 msgstr "B<malloc>(3), B<mallopt>(3)"
2368
2369 #. type: TH
2370 #: build/C/man3/malloc_hook.3:10
2371 #, no-wrap
2372 msgid "MALLOC_HOOK"
2373 msgstr "MALLOC_HOOK"
2374
2375 #. type: TH
2376 #: build/C/man3/malloc_hook.3:10
2377 #, no-wrap
2378 msgid "2010-10-13"
2379 msgstr "2010-10-13"
2380
2381 #. type: Plain text
2382 #: build/C/man3/malloc_hook.3:15
2383 msgid ""
2384 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2385 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2386 msgstr ""
2387 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2388 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2389
2390 #. type: Plain text
2391 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2392 #: build/C/man3/posix_memalign.3:41
2393 #, no-wrap
2394 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2395 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2396
2397 #. type: Plain text
2398 #: build/C/man3/malloc_hook.3:20
2399 #, no-wrap
2400 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2401 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2402
2403 #. type: Plain text
2404 #: build/C/man3/malloc_hook.3:23
2405 #, no-wrap
2406 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2407 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2408
2409 #. type: Plain text
2410 #: build/C/man3/malloc_hook.3:26
2411 #, no-wrap
2412 msgid ""
2413 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2414 "B<                         const void *>I<caller>B<);>\n"
2415 msgstr ""
2416 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2417 "B<                         const void *>I<caller>B<);>\n"
2418
2419 #. type: Plain text
2420 #: build/C/man3/malloc_hook.3:28
2421 #, no-wrap
2422 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2423 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2424
2425 #. type: Plain text
2426 #: build/C/man3/malloc_hook.3:30
2427 #, no-wrap
2428 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2429 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2430
2431 #. type: Plain text
2432 #: build/C/man3/malloc_hook.3:32
2433 #, no-wrap
2434 msgid "B<void (*__after_morecore_hook)(void);>\n"
2435 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2436
2437 #. type: Plain text
2438 #: build/C/man3/malloc_hook.3:43
2439 msgid ""
2440 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2441 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2442 "these hooks to help you debug programs that use dynamic memory allocation, "
2443 "for example."
2444 msgstr ""
2445 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2446 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2447 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2448 "ができる。"
2449
2450 #. type: Plain text
2451 #: build/C/man3/malloc_hook.3:50
2452 msgid ""
2453 "The variable B<__malloc_initialize_hook> points at a function that is called "
2454 "once when the malloc implementation is initialized.  This is a weak "
2455 "variable, so it can be overridden in the application with a definition like "
2456 "the following:"
2457 msgstr ""
2458 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2459 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2460 "ケーション内で 以下のような定義で上書きできる:"
2461
2462 #. type: Plain text
2463 #: build/C/man3/malloc_hook.3:53
2464 #, no-wrap
2465 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2466 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2467
2468 #. type: Plain text
2469 #: build/C/man3/malloc_hook.3:58
2470 msgid ""
2471 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2472 msgstr ""
2473 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2474
2475 #. type: Plain text
2476 #: build/C/man3/malloc_hook.3:74
2477 msgid ""
2478 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2479 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2480 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2481 "except that they have a final argument I<caller> that gives the address of "
2482 "the caller of B<malloc>(3), etc."
2483 msgstr ""
2484 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2485 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2486 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2487 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2488 "出し元 (caller) のアドレスが格納される。"
2489
2490 #. type: Plain text
2491 #: build/C/man3/malloc_hook.3:80
2492 msgid ""
2493 "The variable B<__after_morecore_hook> points at a function that is called "
2494 "each time after B<sbrk>(2)  was asked for more memory."
2495 msgstr ""
2496 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2497 "後で毎回呼び出される関数へのポインタである。"
2498
2499 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2500 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2501 #. type: Plain text
2502 #: build/C/man3/malloc_hook.3:89
2503 msgid ""
2504 "The use of these hook functions is not safe in multithreaded programs, and "
2505 "they are now deprecated.  Programmers should instead preempt calls to the "
2506 "relevant functions by defining and exporting functions such as \"malloc\" "
2507 "and \"free\"."
2508 msgstr ""
2509 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2510 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2511 "公開して、 関連する関数を呼び出すようにすべきである。"
2512
2513 #. type: Plain text
2514 #: build/C/man3/malloc_hook.3:91
2515 msgid "Here is a short example of how to use these variables."
2516 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2517
2518 #. type: Plain text
2519 #: build/C/man3/malloc_hook.3:95
2520 #, no-wrap
2521 msgid ""
2522 "#include E<lt>stdio.hE<gt>\n"
2523 "#include E<lt>malloc.hE<gt>\n"
2524 msgstr ""
2525 "#include E<lt>stdio.hE<gt>\n"
2526 "#include E<lt>malloc.hE<gt>\n"
2527
2528 #. type: Plain text
2529 #: build/C/man3/malloc_hook.3:99
2530 #, no-wrap
2531 msgid ""
2532 "/* Prototypes for our hooks.  */\n"
2533 "static void my_init_hook(void);\n"
2534 "static void *my_malloc_hook(size_t, const void *);\n"
2535 msgstr ""
2536 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2537 "static void my_init_hook(void);\n"
2538 "static void *my_malloc_hook(size_t, const void *);\n"
2539
2540 #. type: Plain text
2541 #: build/C/man3/malloc_hook.3:102
2542 #, no-wrap
2543 msgid ""
2544 "/* Variables to save original hooks. */\n"
2545 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2546 msgstr ""
2547 "/* 元々のフックを保存するための変数 */\n"
2548 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2549
2550 #. type: Plain text
2551 #: build/C/man3/malloc_hook.3:105
2552 #, no-wrap
2553 msgid ""
2554 "/* Override initializing hook from the C library. */\n"
2555 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2556 msgstr ""
2557 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2558 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2559
2560 #. type: Plain text
2561 #: build/C/man3/malloc_hook.3:112
2562 #, no-wrap
2563 msgid ""
2564 "static void\n"
2565 "my_init_hook(void)\n"
2566 "{\n"
2567 "    old_malloc_hook = __malloc_hook;\n"
2568 "    __malloc_hook = my_malloc_hook;\n"
2569 "}\n"
2570 msgstr ""
2571 "static void\n"
2572 "my_init_hook(void)\n"
2573 "{\n"
2574 "    old_malloc_hook = __malloc_hook;\n"
2575 "    __malloc_hook = my_malloc_hook;\n"
2576 "}\n"
2577
2578 #. type: Plain text
2579 #: build/C/man3/malloc_hook.3:117
2580 #, no-wrap
2581 msgid ""
2582 "static void *\n"
2583 "my_malloc_hook(size_t size, const void *caller)\n"
2584 "{\n"
2585 "    void *result;\n"
2586 msgstr ""
2587 "static void *\n"
2588 "my_malloc_hook(size_t size, const void *caller)\n"
2589 "{\n"
2590 "    void *result;\n"
2591
2592 #. type: Plain text
2593 #: build/C/man3/malloc_hook.3:120
2594 #, no-wrap
2595 msgid ""
2596 "    /* Restore all old hooks */\n"
2597 "    __malloc_hook = old_malloc_hook;\n"
2598 msgstr ""
2599 "    /* 元々のフックを全て戻す */\n"
2600 "    __malloc_hook = old_malloc_hook;\n"
2601
2602 #. type: Plain text
2603 #: build/C/man3/malloc_hook.3:123
2604 #, no-wrap
2605 msgid ""
2606 "    /* Call recursively */\n"
2607 "    result = malloc(size);\n"
2608 msgstr ""
2609 "    /* malloc の再帰的呼び出し */\n"
2610 "    result = malloc(size);\n"
2611
2612 #. type: Plain text
2613 #: build/C/man3/malloc_hook.3:126
2614 #, no-wrap
2615 msgid ""
2616 "    /* Save underlying hooks */\n"
2617 "    old_malloc_hook = __malloc_hook;\n"
2618 msgstr ""
2619 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2620 "    old_malloc_hook = __malloc_hook;\n"
2621
2622 #. type: Plain text
2623 #: build/C/man3/malloc_hook.3:130
2624 #, no-wrap
2625 msgid ""
2626 "    /* printf() might call malloc(), so protect it too. */\n"
2627 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2628 "            (unsigned int) size, caller, result);\n"
2629 msgstr ""
2630 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2631 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2632 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2633 "            (unsigned int) size, caller, result);\n"
2634
2635 #. type: Plain text
2636 #: build/C/man3/malloc_hook.3:133
2637 #, no-wrap
2638 msgid ""
2639 "    /* Restore our own hooks */\n"
2640 "    __malloc_hook = my_malloc_hook;\n"
2641 msgstr ""
2642 "    /* ユーザが使おうとするフックを再設定する */\n"
2643 "    __malloc_hook = my_malloc_hook;\n"
2644
2645 #. type: Plain text
2646 #: build/C/man3/malloc_hook.3:136
2647 #, no-wrap
2648 msgid ""
2649 "    return result;\n"
2650 "}\n"
2651 msgstr ""
2652 "    return result;\n"
2653 "}\n"
2654
2655 #. type: Plain text
2656 #: build/C/man3/malloc_hook.3:142
2657 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2658 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2659
2660 #. type: TH
2661 #: build/C/man3/malloc_info.3:25
2662 #, no-wrap
2663 msgid "MALLOC_INFO"
2664 msgstr "MALLOC_INFO"
2665
2666 #. type: TH
2667 #: build/C/man3/malloc_info.3:25 build/C/man2/shmget.2:38
2668 #, no-wrap
2669 msgid "2013-04-19"
2670 msgstr "2013-04-19"
2671
2672 #. type: Plain text
2673 #: build/C/man3/malloc_info.3:28
2674 msgid "malloc_info - export malloc state to a stream"
2675 msgstr ""
2676
2677 #. type: Plain text
2678 #: build/C/man3/malloc_info.3:33
2679 #, no-wrap
2680 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2681 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2682
2683 #. type: Plain text
2684 #: build/C/man3/malloc_info.3:44
2685 msgid ""
2686 "The B<malloc_info>()  function exports an XML string that describes the "
2687 "current state of the memory-allocation implementation in the caller.  The "
2688 "string is printed on the file stream I<fp>.  The exported string includes "
2689 "information about all arenas (see B<malloc>(3))."
2690 msgstr ""
2691
2692 #. type: Plain text
2693 #: build/C/man3/malloc_info.3:48
2694 msgid "As currently implemented, I<options> must be zero."
2695 msgstr ""
2696
2697 #. type: Plain text
2698 #: build/C/man3/malloc_info.3:55
2699 msgid ""
2700 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
2701 "I<errno> set to indicate the cause."
2702 msgstr "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
2703
2704 #. type: Plain text
2705 #: build/C/man3/malloc_info.3:60
2706 msgid "I<options> was nonzero."
2707 msgstr ""
2708
2709 #. type: Plain text
2710 #: build/C/man3/malloc_info.3:63
2711 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2712 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2713
2714 #. type: Plain text
2715 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2716 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2717 msgid "This function is a GNU extension."
2718 msgstr "この関数は GNU による拡張である。"
2719
2720 #. type: Plain text
2721 #: build/C/man3/malloc_info.3:71
2722 msgid ""
2723 "The memory-allocation information is provided as an XML string (rather than "
2724 "a C structure)  because the information may change over time (according to "
2725 "changes in the underlying implementation).  The output XML string includes a "
2726 "version field."
2727 msgstr ""
2728
2729 #. type: Plain text
2730 #: build/C/man3/malloc_info.3:77
2731 msgid ""
2732 "The B<open_memstream>(3)  function can be used to send the output of "
2733 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2734 msgstr ""
2735
2736 #. type: Plain text
2737 #: build/C/man3/malloc_info.3:84
2738 msgid ""
2739 "The B<malloc_info>()  function is designed to address deficiencies in "
2740 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2741 msgstr ""
2742
2743 #. type: Plain text
2744 #: build/C/man3/malloc_info.3:95
2745 msgid ""
2746 "The program below takes up to four command-line arguments, of which the "
2747 "first three are mandatory.  The first argument specifies the number of "
2748 "threads that the program should create.  All of the threads, including the "
2749 "main thread, allocate the number of blocks of memory specified by the second "
2750 "argument.  The third argument controls the size of the blocks to be "
2751 "allocated.  The main thread creates blocks of this size, the second thread "
2752 "created by the program allocates blocks of twice this size, the third thread "
2753 "allocates blocks of three times this size, and so on."
2754 msgstr ""
2755
2756 #. type: Plain text
2757 #: build/C/man3/malloc_info.3:102
2758 msgid ""
2759 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2760 "state.  The first call takes place before any threads are created or memory "
2761 "allocated.  The second call is performed after all threads have allocated "
2762 "memory."
2763 msgstr ""
2764
2765 #. type: Plain text
2766 #: build/C/man3/malloc_info.3:110
2767 msgid ""
2768 "In the following example, the command-line arguments specify the creation of "
2769 "one additional thread, and both the main thread and the additional thread "
2770 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2771 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2772 msgstr ""
2773
2774 #. type: Plain text
2775 #: build/C/man3/malloc_info.3:135
2776 #, no-wrap
2777 msgid ""
2778 "$ B<getconf GNU_LIBC_VERSION>\n"
2779 "glibc 2.13\n"
2780 "$ B<./a.out 1 10000 100>\n"
2781 "============ Before allocating blocks ============\n"
2782 "E<lt>malloc version=\"1\"E<gt>\n"
2783 "E<lt>heap nr=\"0\"E<gt>\n"
2784 "E<lt>sizesE<gt>\n"
2785 "E<lt>/sizesE<gt>\n"
2786 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2787 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2788 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2789 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2790 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2791 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2792 "E<lt>/heapE<gt>\n"
2793 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2794 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2795 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2796 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2797 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2798 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2799 "E<lt>/mallocE<gt>\n"
2800 msgstr ""
2801 "$ B<getconf GNU_LIBC_VERSION>\n"
2802 "glibc 2.13\n"
2803 "$ B<./a.out 1 10000 100>\n"
2804 "============ Before allocating blocks ============\n"
2805 "E<lt>malloc version=\"1\"E<gt>\n"
2806 "E<lt>heap nr=\"0\"E<gt>\n"
2807 "E<lt>sizesE<gt>\n"
2808 "E<lt>/sizesE<gt>\n"
2809 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2810 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2811 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2812 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2813 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2814 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2815 "E<lt>/heapE<gt>\n"
2816 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2817 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2818 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2819 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2820 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2821 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2822 "E<lt>/mallocE<gt>\n"
2823
2824 #. type: Plain text
2825 #: build/C/man3/malloc_info.3:165
2826 #, no-wrap
2827 msgid ""
2828 "============ After allocating blocks ============\n"
2829 "E<lt>malloc version=\"1\"E<gt>\n"
2830 "E<lt>heap nr=\"0\"E<gt>\n"
2831 "E<lt>sizesE<gt>\n"
2832 "E<lt>/sizesE<gt>\n"
2833 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2834 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2835 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2836 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2837 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2838 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2839 "E<lt>/heapE<gt>\n"
2840 "E<lt>heap nr=\"1\"E<gt>\n"
2841 "E<lt>sizesE<gt>\n"
2842 "E<lt>/sizesE<gt>\n"
2843 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2844 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2845 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2846 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2847 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2848 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2849 "E<lt>/heapE<gt>\n"
2850 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2851 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2852 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2853 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2854 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2855 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2856 "E<lt>/mallocE<gt>\n"
2857 msgstr ""
2858 "============ After allocating blocks ============\n"
2859 "E<lt>malloc version=\"1\"E<gt>\n"
2860 "E<lt>heap nr=\"0\"E<gt>\n"
2861 "E<lt>sizesE<gt>\n"
2862 "E<lt>/sizesE<gt>\n"
2863 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2864 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2865 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2866 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2867 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2868 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2869 "E<lt>/heapE<gt>\n"
2870 "E<lt>heap nr=\"1\"E<gt>\n"
2871 "E<lt>sizesE<gt>\n"
2872 "E<lt>/sizesE<gt>\n"
2873 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2874 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2875 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2876 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2877 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2878 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2879 "E<lt>/heapE<gt>\n"
2880 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2881 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2882 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2883 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2884 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2885 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2886 "E<lt>/mallocE<gt>\n"
2887
2888 #. type: Plain text
2889 #: build/C/man3/malloc_info.3:175
2890 #, no-wrap
2891 msgid ""
2892 "#include E<lt>unistd.hE<gt>\n"
2893 "#include E<lt>stdlib.hE<gt>\n"
2894 "#include E<lt>pthread.hE<gt>\n"
2895 "#include E<lt>malloc.hE<gt>\n"
2896 "#include E<lt>errno.hE<gt>\n"
2897 msgstr ""
2898 "#include E<lt>unistd.hE<gt>\n"
2899 "#include E<lt>stdlib.hE<gt>\n"
2900 "#include E<lt>pthread.hE<gt>\n"
2901 "#include E<lt>malloc.hE<gt>\n"
2902 "#include E<lt>errno.hE<gt>\n"
2903
2904 #. type: Plain text
2905 #: build/C/man3/malloc_info.3:178
2906 #, no-wrap
2907 msgid ""
2908 "static size_t blockSize;\n"
2909 "static int numThreads, numBlocks;\n"
2910 msgstr ""
2911 "static size_t blockSize;\n"
2912 "static int numThreads, numBlocks;\n"
2913
2914 #. type: Plain text
2915 #: build/C/man3/malloc_info.3:181
2916 #, no-wrap
2917 msgid ""
2918 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2919 "                        } while (0)\n"
2920 msgstr ""
2921 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2922 "                        } while (0)\n"
2923
2924 #. type: Plain text
2925 #: build/C/man3/malloc_info.3:187
2926 #, no-wrap
2927 msgid ""
2928 "static void *\n"
2929 "thread_func(void *arg)\n"
2930 "{\n"
2931 "    int j;\n"
2932 "    int tn = (int) arg;\n"
2933 msgstr ""
2934 "static void *\n"
2935 "thread_func(void *arg)\n"
2936 "{\n"
2937 "    int j;\n"
2938 "    int tn = (int) arg;\n"
2939
2940 #. type: Plain text
2941 #: build/C/man3/malloc_info.3:190
2942 #, no-wrap
2943 msgid ""
2944 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2945 "       the main thread) allocates a different amount of memory */\n"
2946 msgstr ""
2947 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2948 "       the main thread) allocates a different amount of memory */\n"
2949
2950 #. type: Plain text
2951 #: build/C/man3/malloc_info.3:194
2952 #, no-wrap
2953 msgid ""
2954 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2955 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2956 "            errExit(\"malloc-thread\");\n"
2957 msgstr ""
2958 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2959 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2960 "            errExit(\"malloc-thread\");\n"
2961
2962 #. type: Plain text
2963 #: build/C/man3/malloc_info.3:198
2964 #, no-wrap
2965 msgid ""
2966 "    sleep(100);         /* Sleep until main thread terminates */\n"
2967 "    return NULL;\n"
2968 "}\n"
2969 msgstr ""
2970 "    sleep(100);         /* Sleep until main thread terminates */\n"
2971 "    return NULL;\n"
2972 "}\n"
2973
2974 #. type: Plain text
2975 #: build/C/man3/malloc_info.3:204
2976 #, no-wrap
2977 msgid ""
2978 "int\n"
2979 "main(int argc, char *argv[])\n"
2980 "{\n"
2981 "    int j, tn, sleepTime;\n"
2982 "    pthread_t *thr;\n"
2983 msgstr ""
2984 "int\n"
2985 "main(int argc, char *argv[])\n"
2986 "{\n"
2987 "    int j, tn, sleepTime;\n"
2988 "    pthread_t *thr;\n"
2989
2990 #. type: Plain text
2991 #: build/C/man3/malloc_info.3:211
2992 #, no-wrap
2993 msgid ""
2994 "    if (argc E<lt> 4) {\n"
2995 "        fprintf(stderr,\n"
2996 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2997 "                argv[0]);\n"
2998 "        exit(EXIT_FAILURE);\n"
2999 "    }\n"
3000 msgstr ""
3001 "    if (argc E<lt> 4) {\n"
3002 "        fprintf(stderr,\n"
3003 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3004 "                argv[0]);\n"
3005 "        exit(EXIT_FAILURE);\n"
3006 "    }\n"
3007
3008 #. type: Plain text
3009 #: build/C/man3/malloc_info.3:216
3010 #, no-wrap
3011 msgid ""
3012 "    numThreads = atoi(argv[1]);\n"
3013 "    numBlocks = atoi(argv[2]);\n"
3014 "    blockSize = atoi(argv[3]);\n"
3015 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3016 msgstr ""
3017 "    numThreads = atoi(argv[1]);\n"
3018 "    numBlocks = atoi(argv[2]);\n"
3019 "    blockSize = atoi(argv[3]);\n"
3020 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3021
3022 #. type: Plain text
3023 #: build/C/man3/malloc_info.3:220
3024 #, no-wrap
3025 msgid ""
3026 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3027 "    if (thr == NULL)\n"
3028 "        errExit(\"calloc\");\n"
3029 msgstr ""
3030 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3031 "    if (thr == NULL)\n"
3032 "        errExit(\"calloc\");\n"
3033
3034 #. type: Plain text
3035 #: build/C/man3/malloc_info.3:223
3036 #, no-wrap
3037 msgid ""
3038 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3039 "    malloc_info(0, stdout);\n"
3040 msgstr ""
3041 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3042 "    malloc_info(0, stdout);\n"
3043
3044 #. type: Plain text
3045 #: build/C/man3/malloc_info.3:225
3046 #, no-wrap
3047 msgid "    /* Create threads that allocate different amounts of memory */\n"
3048 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3049
3050 #. type: Plain text
3051 #: build/C/man3/malloc_info.3:231
3052 #, no-wrap
3053 msgid ""
3054 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3055 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3056 "                               (void *) tn);\n"
3057 "        if (errno != 0)\n"
3058 "            errExit(\"pthread_create\");\n"
3059 msgstr ""
3060 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3061 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3062 "                               (void *) tn);\n"
3063 "        if (errno != 0)\n"
3064 "            errExit(\"pthread_create\");\n"
3065
3066 #. type: Plain text
3067 #: build/C/man3/malloc_info.3:236
3068 #, no-wrap
3069 msgid ""
3070 "        /* If we add a sleep interval after the start-up of each\n"
3071 "           thread, the threads likely won\\(aqt contend for malloc\n"
3072 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3073 "           allocated (see malloc(3)). */\n"
3074 msgstr ""
3075 "        /* If we add a sleep interval after the start-up of each\n"
3076 "           thread, the threads likely won\\(aqt contend for malloc\n"
3077 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3078 "           allocated (see malloc(3)). */\n"
3079
3080 #. type: Plain text
3081 #: build/C/man3/malloc_info.3:240
3082 #, no-wrap
3083 msgid ""
3084 "        if (sleepTime E<gt> 0)\n"
3085 "            sleep(sleepTime);\n"
3086 "    }\n"
3087 msgstr ""
3088 "        if (sleepTime E<gt> 0)\n"
3089 "            sleep(sleepTime);\n"
3090 "    }\n"
3091
3092 #. type: Plain text
3093 #: build/C/man3/malloc_info.3:242
3094 #, no-wrap
3095 msgid "    /* The main thread also allocates some memory */\n"
3096 msgstr "    /* The main thread also allocates some memory */\n"
3097
3098 #. type: Plain text
3099 #: build/C/man3/malloc_info.3:246
3100 #, no-wrap
3101 msgid ""
3102 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3103 "        if (malloc(blockSize) == NULL)\n"
3104 "            errExit(\"malloc\");\n"
3105 msgstr ""
3106 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3107 "        if (malloc(blockSize) == NULL)\n"
3108 "            errExit(\"malloc\");\n"
3109
3110 #. type: Plain text
3111 #: build/C/man3/malloc_info.3:249
3112 #, no-wrap
3113 msgid ""
3114 "    sleep(2);           /* Give all threads a chance to\n"
3115 "                           complete allocations */\n"
3116 msgstr ""
3117 "    sleep(2);           /* Give all threads a chance to\n"
3118 "                           complete allocations */\n"
3119
3120 #. type: Plain text
3121 #: build/C/man3/malloc_info.3:252
3122 #, no-wrap
3123 msgid ""
3124 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3125 "    malloc_info(0, stdout);\n"
3126 msgstr ""
3127 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3128 "    malloc_info(0, stdout);\n"
3129
3130 #. type: Plain text
3131 #: build/C/man3/malloc_info.3:262
3132 msgid ""
3133 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3134 "B<open_memstream>(3)"
3135 msgstr ""
3136 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3137 "B<open_memstream>(3)"
3138
3139 #. type: TH
3140 #: build/C/man3/malloc_stats.3:26
3141 #, no-wrap
3142 msgid "MALLOC_STATS"
3143 msgstr "MALLOC_STATS"
3144
3145 #. type: Plain text
3146 #: build/C/man3/malloc_stats.3:29
3147 msgid "malloc_stats - print memory allocation statistics"
3148 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3149
3150 #. type: Plain text
3151 #: build/C/man3/malloc_stats.3:33
3152 msgid "B<void malloc_stats(void);>"
3153 msgstr "B<void malloc_stats(void);>"
3154
3155 #.  .SH VERSIONS
3156 #.  Available already in glibc 2.0, possibly earlier
3157 #. type: Plain text
3158 #: build/C/man3/malloc_stats.3:55
3159 msgid ""
3160 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3161 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3162 "(allocation area), this function prints the total amount of memory allocated "
3163 "and the total number of bytes consumed by in-use allocations.  (These two "
3164 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3165 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3166 "statistics for all arenas, and the maximum number of blocks and bytes that "
3167 "were ever simultaneously allocated using B<mmap>(2)."
3168 msgstr ""
3169 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3170 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3171 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3172 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3173 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3174 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3175 "ロック数とバイト数の最大値を表示する。"
3176
3177 #. type: Plain text
3178 #: build/C/man3/malloc_stats.3:61
3179 msgid ""
3180 "More detailed information about memory allocations in the main arena can be "
3181 "obtained using B<mallinfo>(3)."
3182 msgstr ""
3183 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3184 "報を取得できる。"
3185
3186 #. type: Plain text
3187 #: build/C/man3/malloc_stats.3:67
3188 msgid ""
3189 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3190 msgstr ""
3191 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3192
3193 #. type: TH
3194 #: build/C/man3/malloc_trim.3:26
3195 #, no-wrap
3196 msgid "MALLOC_TRIM"
3197 msgstr "MALLOC_TRIM"
3198
3199 #. type: TH
3200 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3201 #, no-wrap
3202 msgid "2012-03-29"
3203 msgstr "2012-03-29"
3204
3205 #. type: Plain text
3206 #: build/C/man3/malloc_trim.3:29
3207 msgid "malloc_trim - release free memory from the top of the heap"
3208 msgstr ""
3209
3210 #. type: Plain text
3211 #: build/C/man3/malloc_trim.3:33
3212 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3213 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3214
3215 #. type: Plain text
3216 #: build/C/man3/malloc_trim.3:40
3217 msgid ""
3218 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3219 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3220 msgstr ""
3221
3222 #. type: Plain text
3223 #: build/C/man3/malloc_trim.3:51
3224 msgid ""
3225 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3226 "the top of the heap.  If this argument is 0, only the minimum amount of "
3227 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3228 "nonzero argument can be used to maintain some trailing space at the top of "
3229 "the heap in order to allow future allocations to be made without having to "
3230 "extend the heap with B<sbrk>(2)."
3231 msgstr ""
3232
3233 #. type: Plain text
3234 #: build/C/man3/malloc_trim.3:56
3235 msgid ""
3236 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3237 "back to the system, or 0 if it was not possible to release any memory."
3238 msgstr ""
3239
3240 #.  .SH VERSIONS
3241 #.  Available already in glibc 2.0, possibly earlier
3242 #. type: Plain text
3243 #: build/C/man3/malloc_trim.3:60
3244 msgid "No errors are defined."
3245 msgstr ""
3246
3247 #. type: Plain text
3248 #: build/C/man3/malloc_trim.3:71
3249 msgid ""
3250 "This function is automatically called by B<free>(3)  in certain "
3251 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3252 "B<mallopt>(3)."
3253 msgstr ""
3254
3255 #. type: Plain text
3256 #: build/C/man3/malloc_trim.3:74
3257 msgid ""
3258 "This function cannot release free memory located at places other than the "
3259 "top of the heap."
3260 msgstr ""
3261
3262 #.  malloc/malloc.c::mTRIm():
3263 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3264 #. type: Plain text
3265 #: build/C/man3/malloc_trim.3:78
3266 msgid "This function releases only memory in the main arena."
3267 msgstr ""
3268
3269 #. type: Plain text
3270 #: build/C/man3/malloc_trim.3:82
3271 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3272 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3273
3274 #. type: TH
3275 #: build/C/man3/malloc_usable_size.3:25
3276 #, no-wrap
3277 msgid "MALLOC_USABLE_SIZE"
3278 msgstr "MALLOC_USABLE_SIZE"
3279
3280 #. type: Plain text
3281 #: build/C/man3/malloc_usable_size.3:28
3282 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3283 msgstr ""
3284
3285 #. type: Plain text
3286 #: build/C/man3/malloc_usable_size.3:32
3287 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3288 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3289
3290 #. type: Plain text
3291 #: build/C/man3/malloc_usable_size.3:40
3292 msgid ""
3293 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3294 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3295 "B<malloc>(3)  or a related function."
3296 msgstr ""
3297
3298 #. type: Plain text
3299 #: build/C/man3/malloc_usable_size.3:48
3300 msgid ""
3301 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3302 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3303 msgstr ""
3304
3305 #. type: Plain text
3306 #: build/C/man3/malloc_usable_size.3:60
3307 msgid ""
3308 "The value returned by B<malloc_usable_size>()  may be greater than the "
3309 "requested size of the allocation because of alignment and minimum size "
3310 "constraints.  Although the excess bytes can be overwritten by the "
3311 "application without ill effects, this is not good programming practice: the "
3312 "number of excess bytes in an allocation depends on the underlying "
3313 "implementation."
3314 msgstr ""
3315
3316 #. type: Plain text
3317 #: build/C/man3/malloc_usable_size.3:62
3318 msgid "The main use of this function is for debugging and introspection."
3319 msgstr ""
3320
3321 #. type: Plain text
3322 #: build/C/man3/malloc_usable_size.3:64
3323 msgid "B<malloc>(3)"
3324 msgstr "B<malloc>(3)"
3325
3326 #. type: TH
3327 #: build/C/man3/mallopt.3:26
3328 #, no-wrap
3329 msgid "MALLOPT"
3330 msgstr "MALLOPT"
3331
3332 #. type: TH
3333 #: build/C/man3/mallopt.3:26
3334 #, no-wrap
3335 msgid "2012-04-30"
3336 msgstr "2012-04-30"
3337
3338 #. type: Plain text
3339 #: build/C/man3/mallopt.3:29
3340 msgid "mallopt - set memory allocation parameters"
3341 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3342
3343 #. type: Plain text
3344 #: build/C/man3/mallopt.3:33
3345 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3346 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3347
3348 #. type: Plain text
3349 #: build/C/man3/mallopt.3:44
3350 msgid ""
3351 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3352 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3353 "specifies the parameter to be modified, and I<value> specifies the new value "
3354 "for that parameter."
3355 msgstr ""
3356 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3357 "制御するパラメータの調整を行う。\n"
3358 "I<param> 引き数で変更するパラメータを指定し、\n"
3359 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3360
3361 #. type: Plain text
3362 #: build/C/man3/mallopt.3:47
3363 msgid "The following values can be specified for I<param>:"
3364 msgstr "I<param> には以下の値を指定することができる。"
3365
3366 #. type: TP
3367 #: build/C/man3/mallopt.3:47
3368 #, no-wrap
3369 msgid "B<M_CHECK_ACTION>"
3370 msgstr "B<M_CHECK_ACTION>"
3371
3372 #. type: Plain text
3373 #: build/C/man3/mallopt.3:53
3374 msgid ""
3375 "Setting this parameter controls how glibc responds when various kinds of "
3376 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3377 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3378 "parameter determine the glibc behavior, as follows:"
3379 msgstr ""
3380
3381 #. type: TP
3382 #: build/C/man3/mallopt.3:54
3383 #, no-wrap
3384 msgid "Bit 0"
3385 msgstr "Bit 0"
3386
3387 #. type: Plain text
3388 #: build/C/man3/mallopt.3:64
3389 msgid ""
3390 "If this bit is set, then print a one-line message on I<stderr> that provides "
3391 "details about the error.  The message starts with the string \"***\\ glibc "
3392 "detected\\ ***\", followed by the program name, the name of the memory-"
3393 "allocation function in which the error was detected, a brief description of "
3394 "the error, and the memory address where the error was detected."
3395 msgstr ""
3396
3397 #. type: TP
3398 #: build/C/man3/mallopt.3:64
3399 #, no-wrap
3400 msgid "Bit 1"
3401 msgstr "Bit 1"
3402
3403 #. type: Plain text
3404 #: build/C/man3/mallopt.3:79
3405 msgid ""
3406 "If this bit is set, then, after printing any error message specified by bit "
3407 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3408 "since 2.4, if bit 0 is also set, then, between printing the error message "
3409 "and aborting, the program also prints a stack trace in the manner of "
3410 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3411 "proc/[pid]/maps> (see B<proc>(5))."
3412 msgstr ""
3413
3414 #. type: TP
3415 #: build/C/man3/mallopt.3:79
3416 #, no-wrap
3417 msgid "Bit 2 (since glibc 2.4)"
3418 msgstr "Bit 2 (glibc 2.4 以降)"
3419
3420 #. type: Plain text
3421 #: build/C/man3/mallopt.3:86
3422 msgid ""
3423 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3424 "the one-line message describing the error is simplified to contain just the "
3425 "name of the function where the error was detected and the brief description "
3426 "of the error."
3427 msgstr ""
3428
3429 #. type: Plain text
3430 #: build/C/man3/mallopt.3:91
3431 msgid "The remaining bits in I<value> are ignored."
3432 msgstr ""
3433
3434 #. type: Plain text
3435 #: build/C/man3/mallopt.3:95
3436 msgid ""
3437 "Combining the above details, the following numeric values are meaningful for "
3438 "B<M_CHECK_ACTION>:"
3439 msgstr ""
3440
3441 #. type: IP
3442 #: build/C/man3/mallopt.3:96
3443 #, no-wrap
3444 msgid "0"
3445 msgstr "0"
3446
3447 #. type: Plain text
3448 #: build/C/man3/mallopt.3:98
3449 msgid "Ignore error conditions; continue execution (with undefined results)."
3450 msgstr ""
3451
3452 #. type: IP
3453 #: build/C/man3/mallopt.3:98
3454 #, no-wrap
3455 msgid "1"
3456 msgstr "1"
3457
3458 #. type: Plain text
3459 #: build/C/man3/mallopt.3:100
3460 msgid "Print a detailed error message and continue execution."
3461 msgstr ""
3462
3463 #. type: IP
3464 #: build/C/man3/mallopt.3:100
3465 #, no-wrap
3466 msgid "2"
3467 msgstr "2"
3468
3469 #. type: Plain text
3470 #: build/C/man3/mallopt.3:102
3471 msgid "Abort the program."
3472 msgstr ""
3473
3474 #. type: IP
3475 #: build/C/man3/mallopt.3:102
3476 #, no-wrap
3477 msgid "3"
3478 msgstr "3"
3479
3480 #. type: Plain text
3481 #: build/C/man3/mallopt.3:105
3482 msgid ""
3483 "Print detailed error message, stack trace, and memory mappings, and abort "
3484 "the program."
3485 msgstr ""
3486
3487 #. type: IP
3488 #: build/C/man3/mallopt.3:105
3489 #, no-wrap
3490 msgid "5"
3491 msgstr "5"
3492
3493 #. type: Plain text
3494 #: build/C/man3/mallopt.3:107
3495 msgid "Print a simple error message and continue execution."
3496 msgstr ""
3497
3498 #. type: IP
3499 #: build/C/man3/mallopt.3:107
3500 #, no-wrap
3501 msgid "7"
3502 msgstr "7"
3503
3504 #. type: Plain text
3505 #: build/C/man3/mallopt.3:110
3506 msgid ""
3507 "Print simple error message, stack trace, and memory mappings, and abort the "
3508 "program."
3509 msgstr ""
3510
3511 #. type: Plain text
3512 #: build/C/man3/mallopt.3:116
3513 msgid ""
3514 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3515 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3516 msgstr ""
3517
3518 #. type: Plain text
3519 #: build/C/man3/mallopt.3:121
3520 msgid ""
3521 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3522 "crash may happen much later, and the true cause of the problem is then very "
3523 "hard to track down."
3524 msgstr ""
3525
3526 #. type: TP
3527 #: build/C/man3/mallopt.3:121
3528 #, no-wrap
3529 msgid "B<M_MMAP_MAX>"
3530 msgstr "B<M_MMAP_MAX>"
3531
3532 #.  The following text adapted from comments in the glibc source:
3533 #. type: Plain text
3534 #: build/C/man3/mallopt.3:131
3535 msgid ""
3536 "This parameter specifies the maximum number of allocation requests that may "
3537 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3538 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3539 "and using more than a few of them may degrade performance."
3540 msgstr ""
3541
3542 #. type: Plain text
3543 #: build/C/man3/mallopt.3:138
3544 msgid ""
3545 "The default value is 65,536, a value which has no special significance and "
3546 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3547 "use of B<mmap>(2)  for servicing large allocation requests."
3548 msgstr ""
3549
3550 #. type: TP
3551 #: build/C/man3/mallopt.3:138
3552 #, no-wrap
3553 msgid "B<M_MMAP_THRESHOLD>"
3554 msgstr "B<M_MMAP_THRESHOLD>"
3555
3556 #. type: Plain text
3557 #: build/C/man3/mallopt.3:147
3558 msgid ""
3559 "For allocations greater than or equal to the limit specified (in bytes) by "
3560 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3561 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3562 "break using B<sbrk>(2)."
3563 msgstr ""
3564
3565 #. type: Plain text
3566 #: build/C/man3/mallopt.3:167
3567 msgid ""
3568 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3569 "allocated memory blocks can always be independently released back to the "
3570 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3571 "the top end.)  On the other hand, there are some disadvantages to the use of "
3572 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3573 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3574 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3575 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3576 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3577 msgstr ""
3578
3579 #. type: Plain text
3580 #: build/C/man3/mallopt.3:174
3581 msgid ""
3582 "The lower limit for this parameter is 0.  The upper limit is "
3583 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3584 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3585 msgstr ""
3586
3587 #. type: Plain text
3588 #: build/C/man3/mallopt.3:192
3589 msgid ""
3590 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3591 "initial value of the threshold is 128*1024, but when blocks larger than the "
3592 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3593 "are freed, the threshold is adjusted upwards to the size of the freed "
3594 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3595 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3596 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3597 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3598 "parameters is set."
3599 msgstr ""
3600
3601 #. type: TP
3602 #: build/C/man3/mallopt.3:192
3603 #, no-wrap
3604 msgid "B<M_MXFAST> (since glibc 2.3)"
3605 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3606
3607 #.  The following text adapted from comments in the glibc sources:
3608 #. type: Plain text
3609 #: build/C/man3/mallopt.3:212
3610 msgid ""
3611 "Set the upper limit for memory allocation requests that are satisfied using "
3612 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3613 "are storage areas that hold deallocated blocks of memory of the same size "
3614 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3615 "the same size can be handled very quickly by allocating from the fastbin, "
3616 "although memory fragmentation and the overall memory footprint of the "
3617 "program can increase.  The default value for this parameter is I<64*sizeof"
3618 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3619 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3620 "the use of fastbins."
3621 msgstr ""
3622
3623 #. type: TP
3624 #: build/C/man3/mallopt.3:212
3625 #, no-wrap
3626 msgid "B<M_PERTURB> (since glibc 2.4)"
3627 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3628
3629 #. type: Plain text
3630 #: build/C/man3/mallopt.3:227
3631 msgid ""
3632 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3633 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3634 "of the value in the least significant byte of I<value>, and when allocated "
3635 "memory is released using B<free>(3), the freed bytes are set to the least "
3636 "significant byte of I<value>.  This can be useful for detecting errors where "
3637 "programs incorrectly rely on allocated memory being initialized to zero, or "
3638 "reuse values in memory that has already been freed."
3639 msgstr ""
3640
3641 #. type: TP
3642 #: build/C/man3/mallopt.3:227
3643 #, no-wrap
3644 msgid "B<M_TOP_PAD>"
3645 msgstr "B<M_TOP_PAD>"
3646
3647 #. type: Plain text
3648 #: build/C/man3/mallopt.3:234
3649 msgid ""
3650 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3651 "(2)  to modify the program break.  (The measurement unit for this parameter "
3652 "is bytes.)  This parameter has an effect in the following circumstances:"
3653 msgstr ""
3654
3655 #. type: Plain text
3656 #: build/C/man3/mallopt.3:241
3657 msgid ""
3658 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3659 "the B<sbrk>(2)  request."
3660 msgstr ""
3661
3662 #. type: Plain text
3663 #: build/C/man3/mallopt.3:247
3664 msgid ""
3665 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3666 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3667 "top of the heap."
3668 msgstr ""
3669
3670 #. type: Plain text
3671 #: build/C/man3/mallopt.3:251
3672 msgid ""
3673 "In either case, the amount of padding is always rounded to a system page "
3674 "boundary."
3675 msgstr ""
3676
3677 #. type: Plain text
3678 #: build/C/man3/mallopt.3:258
3679 msgid ""
3680 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3681 "system calls (when the parameter is set low)  and wasting unused memory at "
3682 "the top of the heap (when the parameter is set high)."
3683 msgstr ""
3684
3685 #.  DEFAULT_TOP_PAD in glibc source
3686 #. type: Plain text
3687 #: build/C/man3/mallopt.3:261
3688 msgid "The default value for this parameter is 128*1024."
3689 msgstr ""
3690
3691 #. type: TP
3692 #: build/C/man3/mallopt.3:261
3693 #, no-wrap
3694 msgid "B<M_TRIM_THRESHOLD>"
3695 msgstr "B<M_TRIM_THRESHOLD>"
3696
3697 #. type: Plain text
3698 #: build/C/man3/mallopt.3:277
3699 msgid ""
3700 "When the amount of contiguous free memory at the top of the heap grows "
3701 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3702 "back to the system.  (This can be useful in programs that continue to "
3703 "execute for a long period after freeing a significant amount of memory.)  "
3704 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3705 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3706 msgstr ""
3707
3708 #. type: Plain text
3709 #: build/C/man3/mallopt.3:282
3710 msgid ""
3711 "The default value for this parameter is 128*1024.  Setting "
3712 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3713 msgstr ""
3714
3715 #
3716 #
3717 #
3718 #.  FIXME Do the arena parameters need to be documented?
3719 #.  .TP
3720 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3721 #.  .TP
3722 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3723 #.  Environment variables
3724 #.      MALLOC_ARENA_MAX_
3725 #.      MALLOC_ARENA_TEST_
3726 #.  http://udrepper.livejournal.com/20948.html describes some details
3727 #.      of the MALLOC_ARENA_* environment variables.
3728 #.  These macros aren't enabled in production releases until 2.15?
3729 #.  (see glibc malloc/Makefile)
3730 #. type: Plain text
3731 #: build/C/man3/mallopt.3:305
3732 msgid ""
3733 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3734 "of system calls (when the parameter is set low)  and wasting unused memory "
3735 "at the top of the heap (when the parameter is set high)."
3736 msgstr ""
3737
3738 #. type: SS
3739 #: build/C/man3/mallopt.3:305
3740 #, no-wrap
3741 msgid "Environment variables"
3742 msgstr "環境変数"
3743
3744 #. type: Plain text
3745 #: build/C/man3/mallopt.3:320
3746 msgid ""
3747 "A number of environment variables can be defined to modify some of the same "
3748 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3749 "advantage that the source code of the program need not be changed.  To be "
3750 "effective, these variables must be defined before the first call to a memory-"
3751 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3752 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3753 "these variables are ignored in set-user-ID and set-group-ID programs."
3754 msgstr ""
3755
3756 #. type: Plain text
3757 #: build/C/man3/mallopt.3:323
3758 msgid ""
3759 "The environment variables are as follows (note the trailing underscore at "
3760 "the end of the name of each variable):"
3761 msgstr ""
3762
3763 #. type: TP
3764 #: build/C/man3/mallopt.3:323
3765 #, no-wrap
3766 msgid "B<MALLOC_CHECK_>"
3767 msgstr "B<MALLOC_CHECK_>"
3768
3769 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3770 #.  when MALLOC_CHECK_ was set.
3771 #. type: Plain text
3772 #: build/C/man3/mallopt.3:340
3773 msgid ""
3774 "This environment variable controls the same parameter as B<mallopt>()  "
3775 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3776 "special implementation of the memory-allocation functions is used.  (This is "
3777 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3778 "performs additional error checking, but is slower than the standard set of "
3779 "memory-allocation functions.  (This implementation does not detect all "
3780 "possible errors; memory leaks can still occur.)"
3781 msgstr ""
3782
3783 #. type: Plain text
3784 #: build/C/man3/mallopt.3:345
3785 msgid ""
3786 "The value assigned to this environment variable should be a single digit, "
3787 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3788 "the initial digit are ignored."
3789 msgstr ""
3790
3791 #. type: Plain text
3792 #: build/C/man3/mallopt.3:354
3793 msgid ""
3794 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3795 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3796 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3797 "also has an effect for set-user-ID and set-group-ID programs."
3798 msgstr ""
3799
3800 #. type: TP
3801 #: build/C/man3/mallopt.3:354
3802 #, no-wrap
3803 msgid "B<MALLOC_MMAP_MAX_>"
3804 msgstr "B<MALLOC_MMAP_MAX_>"
3805
3806 #. type: Plain text
3807 #: build/C/man3/mallopt.3:359
3808 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3809 msgstr ""
3810
3811 #. type: TP
3812 #: build/C/man3/mallopt.3:359
3813 #, no-wrap
3814 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3815 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3816
3817 #. type: Plain text
3818 #: build/C/man3/mallopt.3:364
3819 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3820 msgstr ""
3821
3822 #. type: TP
3823 #: build/C/man3/mallopt.3:364
3824 #, no-wrap
3825 msgid "B<MALLOC_PERTURB_>"
3826 msgstr "B<MALLOC_PERTURB_>"
3827
3828 #. type: Plain text
3829 #: build/C/man3/mallopt.3:369
3830 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3831 msgstr ""
3832
3833 #. type: TP
3834 #: build/C/man3/mallopt.3:369
3835 #, no-wrap
3836 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3837 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3838
3839 #. type: Plain text
3840 #: build/C/man3/mallopt.3:374
3841 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3842 msgstr ""
3843
3844 #. type: TP
3845 #: build/C/man3/mallopt.3:374
3846 #, no-wrap
3847 msgid "B<MALLOC_TOP_PAD_>"
3848 msgstr "B<MALLOC_TOP_PAD_>"
3849
3850 #. type: Plain text
3851 #: build/C/man3/mallopt.3:379
3852 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3853 msgstr ""
3854
3855 #. type: Plain text
3856 #: build/C/man3/mallopt.3:384
3857 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3858 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3859
3860 #.  .SH VERSIONS
3861 #.  Available already in glibc 2.0, possibly earlier
3862 #. type: Plain text
3863 #: build/C/man3/mallopt.3:392
3864 msgid "On error, I<errno> is I<not> set."
3865 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3866
3867 #.  .SH NOTES
3868 #. type: Plain text
3869 #: build/C/man3/mallopt.3:406
3870 msgid ""
3871 "This function is not specified by POSIX or the C standards.  A similar "
3872 "function exists on many System V derivatives, but the range of values for "
3873 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3874 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3875 "implemented in glibc."
3876 msgstr ""
3877
3878 #. type: Plain text
3879 #: build/C/man3/mallopt.3:410
3880 msgid "Specifying an invalid value for I<param> does not generate an error."
3881 msgstr ""
3882
3883 #.  FIXME This looks buggy:
3884 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3885 #.  malloc requests are rounded up:
3886 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3887 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3888 #. type: Plain text
3889 #: build/C/man3/mallopt.3:418
3890 msgid ""
3891 "A calculation error within the glibc implementation means that a call of the "
3892 "form:"
3893 msgstr ""
3894
3895 #. type: Plain text
3896 #: build/C/man3/mallopt.3:421
3897 #, no-wrap
3898 msgid "    mallopt(M_MXFAST, n)\n"
3899 msgstr "    mallopt(M_MXFAST, n)\n"
3900
3901 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3902 #. type: Plain text
3903 #: build/C/man3/mallopt.3:433
3904 msgid ""
3905 "does not result in fastbins being employed for all allocations of size up to "
3906 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3907 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3908 "integer."
3909 msgstr ""
3910
3911 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3912 #.  do have an effect for set-user-ID programs (but not
3913 #.  set-group-ID programs).
3914 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3915 #. type: Plain text
3916 #: build/C/man3/mallopt.3:445
3917 msgid ""
3918 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3919 "ignored in set-group-ID programs."
3920 msgstr ""
3921
3922 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3923 #. type: Plain text
3924 #: build/C/man3/mallopt.3:466
3925 msgid ""
3926 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3927 "of allocated memory are initialized to the complement of the byte in "
3928 "I<value>, and when that memory is freed, the bytes of the region are "
3929 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3930 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3931 "precisely the block of memory being freed by the call I<free(p)>, the block "
3932 "starting at I<p+sizeof(size_t)> is initialized."
3933 msgstr ""
3934
3935 #. type: Plain text
3936 #: build/C/man3/mallopt.3:475
3937 msgid ""
3938 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3939 "is supplied with an (integer) command-line argument, then that argument is "
3940 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3941 "block of memory, and frees it twice (an error)."
3942 msgstr ""
3943
3944 #. type: Plain text
3945 #: build/C/man3/mallopt.3:479
3946 msgid ""
3947 "The following shell session shows what happens when we run this program "
3948 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3949 msgstr ""
3950
3951 #. type: Plain text
3952 #: build/C/man3/mallopt.3:499
3953 #, no-wrap
3954 msgid ""
3955 "$ B<./a.out>\n"
3956 "main(): returned from first free() call\n"
3957 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3958 "======= Backtrace: =========\n"
3959 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3960 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3961 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3962 "\\&./a.out[0x80485db]\n"
3963 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3964 "\\&./a.out[0x8048471]\n"
3965 "======= Memory map: ========\n"
3966 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3967 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3968 "[some lines omitted]\n"
3969 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3970 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3971 "Aborted (core dumped)\n"
3972 msgstr ""
3973 "$ B<./a.out>\n"
3974 "main(): returned from first free() call\n"
3975 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3976 "======= Backtrace: =========\n"
3977 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3978 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3979 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3980 "\\&./a.out[0x80485db]\n"
3981 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3982 "\\&./a.out[0x8048471]\n"
3983 "======= Memory map: ========\n"
3984 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3985 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3986 "[some lines omitted]\n"
3987 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3988 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3989 "Aborted (core dumped)\n"
3990
3991 #. type: Plain text
3992 #: build/C/man3/mallopt.3:504
3993 msgid ""
3994 "The following runs show the results when employing other values for "
3995 "B<M_CHECK_ACTION>:"
3996 msgstr ""
3997
3998 #. type: Plain text
3999 #: build/C/man3/mallopt.3:517
4000 #, no-wrap
4001 msgid ""
4002 "$ B<./a.out 1>             # Diagnose error and continue\n"
4003 "main(): returned from first free() call\n"
4004 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4005 "main(): returned from second free() call\n"
4006 "$ B<./a.out 2>             # Abort without error message\n"
4007 "main(): returned from first free() call\n"
4008 "Aborted (core dumped)\n"
4009 "$ B<./a.out 0>             # Ignore error and continue\n"
4010 "main(): returned from first free() call\n"
4011 "main(): returned from second free() call\n"
4012 msgstr ""
4013 "$ B<./a.out 1>             # Diagnose error and continue\n"
4014 "main(): returned from first free() call\n"
4015 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4016 "main(): returned from second free() call\n"
4017 "$ B<./a.out 2>             # Abort without error message\n"
4018 "main(): returned from first free() call\n"
4019 "Aborted (core dumped)\n"
4020 "$ B<./a.out 0>             # Ignore error and continue\n"
4021 "main(): returned from first free() call\n"
4022 "main(): returned from second free() call\n"
4023
4024 #. type: Plain text
4025 #: build/C/man3/mallopt.3:523
4026 msgid ""
4027 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4028 "environment variable:"
4029 msgstr ""
4030
4031 #. type: Plain text
4032 #: build/C/man3/mallopt.3:530
4033 #, no-wrap
4034 msgid ""
4035 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4036 "main(): returned from first free() call\n"
4037 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4038 "main(): returned from second free() call\n"
4039 msgstr ""
4040 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4041 "main(): returned from first free() call\n"
4042 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4043 "main(): returned from second free() call\n"
4044
4045 #. type: Plain text
4046 #: build/C/man3/mallopt.3:538
4047 #, no-wrap
4048 msgid ""
4049 "#include E<lt>malloc.hE<gt>\n"
4050 "#include E<lt>stdio.hE<gt>\n"
4051 "#include E<lt>stdlib.hE<gt>\n"
4052 msgstr ""
4053 "#include E<lt>malloc.hE<gt>\n"
4054 "#include E<lt>stdio.hE<gt>\n"
4055 "#include E<lt>stdlib.hE<gt>\n"
4056
4057 #. type: Plain text
4058 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4059 #, no-wrap
4060 msgid ""
4061 "int\n"
4062 "main(int argc, char *argv[])\n"
4063 "{\n"
4064 "    char *p;\n"
4065 msgstr ""
4066 "int\n"
4067 "main(int argc, char *argv[])\n"
4068 "{\n"
4069 "    char *p;\n"
4070
4071 #. type: Plain text
4072 #: build/C/man3/mallopt.3:550
4073 #, no-wrap
4074 msgid ""
4075 "    if (argc E<gt> 1) {\n"
4076 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4077 "            fprintf(stderr, \"mallopt() failed\");\n"
4078 "            exit(EXIT_FAILURE);\n"
4079 "        }\n"
4080 "    }\n"
4081 msgstr ""
4082 "    if (argc E<gt> 1) {\n"
4083 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4084 "            fprintf(stderr, \"mallopt() failed\");\n"
4085 "            exit(EXIT_FAILURE);\n"
4086 "        }\n"
4087 "    }\n"
4088
4089 #. type: Plain text
4090 #: build/C/man3/mallopt.3:556
4091 #, no-wrap
4092 msgid ""
4093 "    p = malloc(1000);\n"
4094 "    if (p == NULL) {\n"
4095 "        fprintf(stderr, \"malloc() failed\");\n"
4096 "        exit(EXIT_FAILURE);\n"
4097 "    }\n"
4098 msgstr ""
4099 "    p = malloc(1000);\n"
4100 "    if (p == NULL) {\n"
4101 "        fprintf(stderr, \"malloc() failed\");\n"
4102 "        exit(EXIT_FAILURE);\n"
4103 "    }\n"
4104
4105 #. type: Plain text
4106 #: build/C/man3/mallopt.3:559
4107 #, no-wrap
4108 msgid ""
4109 "    free(p);\n"
4110 "    printf(\"main(): returned from first free() call\\en\");\n"
4111 msgstr ""
4112 "    free(p);\n"
4113 "    printf(\"main(): returned from first free() call\\en\");\n"
4114
4115 #. type: Plain text
4116 #: build/C/man3/mallopt.3:562
4117 #, no-wrap
4118 msgid ""
4119 "    free(p);\n"
4120 "    printf(\"main(): returned from second free() call\\en\");\n"
4121 msgstr ""
4122 "    free(p);\n"
4123 "    printf(\"main(): returned from second free() call\\en\");\n"
4124
4125 #. type: Plain text
4126 #: build/C/man3/mallopt.3:580
4127 msgid ""
4128 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4129 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4130 "B<mtrace>(3), B<posix_memalign>(3)"
4131 msgstr ""
4132 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4133 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4134 "B<mtrace>(3), B<posix_memalign>(3)"
4135
4136 #. type: TH
4137 #: build/C/man3/mcheck.3:25
4138 #, no-wrap
4139 msgid "MCHECK"
4140 msgstr "MCHECK"
4141
4142 #. type: TH
4143 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4144 #, no-wrap
4145 msgid "2012-04-18"
4146 msgstr "2012-04-18"
4147
4148 #. type: Plain text
4149 #: build/C/man3/mcheck.3:28
4150 msgid ""
4151 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4152 msgstr ""
4153
4154 #. type: Plain text
4155 #: build/C/man3/mcheck.3:31
4156 #, no-wrap
4157 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4158 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4159
4160 #. type: Plain text
4161 #: build/C/man3/mcheck.3:33
4162 #, no-wrap
4163 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4164 msgstr ""
4165
4166 #. type: Plain text
4167 #: build/C/man3/mcheck.3:35
4168 #, no-wrap
4169 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4170 msgstr ""
4171
4172 #. type: Plain text
4173 #: build/C/man3/mcheck.3:37
4174 #, no-wrap
4175 msgid "B<void mcheck_check_all(void);>\n"
4176 msgstr "B<void mcheck_check_all(void);>\n"
4177
4178 #. type: Plain text
4179 #: build/C/man3/mcheck.3:39
4180 #, no-wrap
4181 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4182 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4183
4184 #. type: Plain text
4185 #: build/C/man3/mcheck.3:51
4186 msgid ""
4187 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4188 "(3)  family of memory-allocation functions.  These hooks cause certain "
4189 "consistency checks to be performed on the state of the heap.  The checks can "
4190 "detect application errors such as freeing a block of memory more than once "
4191 "or corrupting the bookkeeping data structures that immediately precede a "
4192 "block of allocated memory."
4193 msgstr ""
4194
4195 #. type: Plain text
4196 #: build/C/man3/mcheck.3:63
4197 msgid ""
4198 "To be effective, the B<mcheck>()  function must be called before the first "
4199 "call to B<malloc>(3)  or a related function.  In cases where this is "
4200 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4201 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4202 "memory-allocation function."
4203 msgstr ""
4204
4205 #. type: Plain text
4206 #: build/C/man3/mcheck.3:71
4207 msgid ""
4208 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4209 "checks on all allocated blocks whenever one of the memory-allocation "
4210 "functions is called.  This can be very slow!"
4211 msgstr ""
4212
4213 #. type: Plain text
4214 #: build/C/man3/mcheck.3:78
4215 msgid ""
4216 "The B<mcheck_check_all>()  function causes an immediate check on all "
4217 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4218 "beforehand."
4219 msgstr ""
4220
4221 #. type: Plain text
4222 #: build/C/man3/mcheck.3:91
4223 msgid ""
4224 "If the system detects an inconsistency in the heap, the caller-supplied "
4225 "function pointed to by I<abortfunc> is invoked with a single argument "
4226 "argument, I<mstatus>, that indicates what type of inconsistency was "
4227 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4228 "message on I<stderr> and calls B<abort>(3)."
4229 msgstr ""
4230
4231 #. type: Plain text
4232 #: build/C/man3/mcheck.3:103
4233 msgid ""
4234 "The B<mprobe>()  function performs a consistency check on the block of "
4235 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4236 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4237 msgstr ""
4238
4239 #. type: Plain text
4240 #: build/C/man3/mcheck.3:111
4241 msgid ""
4242 "The following list describes the values returned by B<mprobe>()  or passed "
4243 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4244 msgstr ""
4245
4246 #. type: TP
4247 #: build/C/man3/mcheck.3:111
4248 #, no-wrap
4249 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4250 msgstr ""
4251
4252 #. type: Plain text
4253 #: build/C/man3/mcheck.3:116
4254 msgid ""
4255 "B<mcheck>()  was not called before the first memory allocation function was "
4256 "called.  Consistency checking is not possible."
4257 msgstr ""
4258
4259 #. type: TP
4260 #: build/C/man3/mcheck.3:116
4261 #, no-wrap
4262 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4263 msgstr ""
4264
4265 #. type: Plain text
4266 #: build/C/man3/mcheck.3:119
4267 msgid "No inconsistency detected."
4268 msgstr ""
4269
4270 #. type: TP
4271 #: build/C/man3/mcheck.3:119
4272 #, no-wrap
4273 msgid "B<MCHECK_HEAD>"
4274 msgstr "B<MCHECK_HEAD>"
4275
4276 #. type: Plain text
4277 #: build/C/man3/mcheck.3:122
4278 msgid "Memory preceding an allocated block was clobbered."
4279 msgstr ""
4280
4281 #. type: TP
4282 #: build/C/man3/mcheck.3:122
4283 #, no-wrap
4284 msgid "B<MCHECK_TAIL>"
4285 msgstr "B<MCHECK_TAIL>"
4286
4287 #. type: Plain text
4288 #: build/C/man3/mcheck.3:125
4289 msgid "Memory following an allocated block was clobbered."
4290 msgstr ""
4291
4292 #. type: TP
4293 #: build/C/man3/mcheck.3:125
4294 #, no-wrap
4295 msgid "B<MCHECK_FREE>"
4296 msgstr "B<MCHECK_FREE>"
4297
4298 #. type: Plain text
4299 #: build/C/man3/mcheck.3:129
4300 msgid "A block of memory was freed twice."
4301 msgstr ""
4302
4303 #. type: Plain text
4304 #: build/C/man3/mcheck.3:134
4305 msgid ""
4306 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4307 msgstr ""
4308
4309 #. type: Plain text
4310 #: build/C/man3/mcheck.3:145
4311 msgid ""
4312 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4313 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4314 "since at least glibc 2.0"
4315 msgstr ""
4316
4317 #.  But is MALLOC_CHECK_ slower?
4318 #. type: Plain text
4319 #: build/C/man3/mcheck.3:159
4320 msgid ""
4321 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4322 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4323 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4324 "application to be relinked."
4325 msgstr ""
4326
4327 #. type: Plain text
4328 #: build/C/man3/mcheck.3:165
4329 msgid ""
4330 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4331 "same block of memory twice.  The following shell session demonstrates what "
4332 "happens when running the program:"
4333 msgstr ""
4334
4335 #. type: Plain text
4336 #: build/C/man3/mcheck.3:170
4337 #, no-wrap
4338 msgid ""
4339 "$B< ./a.out>\n"
4340 "About to free\n"
4341 msgstr ""
4342
4343 #. type: Plain text
4344 #: build/C/man3/mcheck.3:174
4345 #, no-wrap
4346 msgid ""
4347 "About to free a second time\n"
4348 "block freed twice\n"
4349 "Aborted (core dumped)\n"
4350 msgstr ""
4351
4352 #. type: Plain text
4353 #: build/C/man3/mcheck.3:182
4354 #, no-wrap
4355 msgid ""
4356 "#include E<lt>stdlib.hE<gt>\n"
4357 "#include E<lt>stdio.hE<gt>\n"
4358 "#include E<lt>mcheck.hE<gt>\n"
4359 msgstr ""
4360 "#include E<lt>stdlib.hE<gt>\n"
4361 "#include E<lt>stdio.hE<gt>\n"
4362 "#include E<lt>mcheck.hE<gt>\n"
4363
4364 #. type: Plain text
4365 #: build/C/man3/mcheck.3:190
4366 #, no-wrap
4367 msgid ""
4368 "    if (mcheck(NULL) != 0) {\n"
4369 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4370 msgstr ""
4371
4372 #. type: Plain text
4373 #: build/C/man3/mcheck.3:193
4374 #, no-wrap
4375 msgid ""
4376 "        exit(EXIT_FAILURE);\n"
4377 "    }\n"
4378 msgstr ""
4379 "        exit(EXIT_FAILURE);\n"
4380 "    }\n"
4381
4382 #. type: Plain text
4383 #: build/C/man3/mcheck.3:195
4384 #, no-wrap
4385 msgid "    p = malloc(1000);\n"
4386 msgstr "    p = malloc(1000);\n"
4387
4388 #. type: Plain text
4389 #: build/C/man3/mcheck.3:200
4390 #, no-wrap
4391 msgid ""
4392 "    fprintf(stderr, \"About to free\\en\");\n"
4393 "    free(p);\n"
4394 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4395 "    free(p);\n"
4396 msgstr ""
4397
4398 #. type: Plain text
4399 #: build/C/man3/mcheck.3:208
4400 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4401 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4402
4403 #. type: TH
4404 #: build/C/man2/mlock.2:26
4405 #, no-wrap
4406 msgid "MLOCK"
4407 msgstr "MLOCK"
4408
4409 #. type: TH
4410 #: build/C/man2/mlock.2:26
4411 #, no-wrap
4412 msgid "2011-09-14"
4413 msgstr "2011-09-14"
4414
4415 #. type: Plain text
4416 #: build/C/man2/mlock.2:29
4417 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4418 msgstr "mlock - メモリのロックとロック解除を行う"
4419
4420 #. type: Plain text
4421 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4422 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4423 #, no-wrap
4424 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4425 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4426
4427 #. type: Plain text
4428 #: build/C/man2/mlock.2:35
4429 #, no-wrap
4430 msgid ""
4431 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4432 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4433 msgstr ""
4434 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4435 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4436
4437 #. type: Plain text
4438 #: build/C/man2/mlock.2:38
4439 #, no-wrap
4440 msgid ""
4441 "B<int mlockall(int >I<flags>B<);>\n"
4442 "B<int munlockall(void);>\n"
4443 msgstr ""
4444 "B<int mlockall(int >I<flags>B<);>\n"
4445 "B<int munlockall(void);>\n"
4446
4447 #. type: Plain text
4448 #: build/C/man2/mlock.2:54
4449 msgid ""
4450 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4451 "process's virtual address space into RAM, preventing that memory from being "
4452 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4453 "converse operation, respectively unlocking part or all of the calling "
4454 "process's virtual address space, so that pages in the specified virtual "
4455 "address range may once more to be swapped out if required by the kernel "
4456 "memory manager.  Memory locking and unlocking are performed in units of "
4457 "whole pages."
4458 msgstr ""
4459 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4460 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4461 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4462 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4463 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4464 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4465 "る。"
4466
4467 #. type: SS
4468 #: build/C/man2/mlock.2:54
4469 #, no-wrap
4470 msgid "mlock() and munlock()"
4471 msgstr "mlock() と munlock()"
4472
4473 #. type: Plain text
4474 #: build/C/man2/mlock.2:64
4475 msgid ""
4476 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4477 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4478 "address range are guaranteed to be resident in RAM when the call returns "
4479 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4480 msgstr ""
4481 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4482 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4483 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4484 "れるまで RAM に残り続けることが保証される。"
4485
4486 #. type: Plain text
4487 #: build/C/man2/mlock.2:73
4488 msgid ""
4489 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4490 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4491 "of the specified memory range can be moved to external swap space again by "
4492 "the kernel."
4493 msgstr ""
4494 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4495 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4496 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4497
4498 #. type: SS
4499 #: build/C/man2/mlock.2:73
4500 #, no-wrap
4501 msgid "mlockall() and munlockall()"
4502 msgstr "mlockall() と munlockall()"
4503
4504 #. type: Plain text
4505 #: build/C/man2/mlock.2:83
4506 msgid ""
4507 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4508 "process.  This includes the pages of the code, data and stack segment, as "
4509 "well as shared libraries, user space kernel data, shared memory, and memory-"
4510 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4511 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4512 "later unlocked."
4513 msgstr ""
4514 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4515 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4516 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4517 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4518 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4519 "残り続けることが保証される。"
4520
4521 #. type: Plain text
4522 #: build/C/man2/mlock.2:88
4523 msgid ""
4524 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4525 "following constants:"
4526 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4527
4528 #. type: TP
4529 #: build/C/man2/mlock.2:88
4530 #, no-wrap
4531 msgid "B<MCL_CURRENT>"
4532 msgstr "B<MCL_CURRENT>"
4533
4534 #. type: Plain text
4535 #: build/C/man2/mlock.2:92
4536 msgid ""
4537 "Lock all pages which are currently mapped into the address space of the "
4538 "process."
4539 msgstr ""
4540 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4541
4542 #. type: TP
4543 #: build/C/man2/mlock.2:92
4544 #, no-wrap
4545 msgid "B<MCL_FUTURE>"
4546 msgstr "B<MCL_FUTURE>"
4547
4548 #. type: Plain text
4549 #: build/C/man2/mlock.2:99
4550 msgid ""
4551 "Lock all pages which will become mapped into the address space of the "
4552 "process in the future.  These could be for instance new pages required by a "
4553 "growing heap and stack as well as new memory mapped files or shared memory "
4554 "regions."
4555 msgstr ""
4556 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4557 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4558 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4559
4560 #. type: Plain text
4561 #: build/C/man2/mlock.2:112
4562 msgid ""
4563 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4564 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4565 "locked bytes to exceed the permitted maximum (see below).  In the same "
4566 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4567 "expansion and deliver a B<SIGSEGV> signal to the process."
4568 msgstr ""
4569 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4570 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4571 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4572 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4573 "スに送る。"
4574
4575 #. type: Plain text
4576 #: build/C/man2/mlock.2:116
4577 msgid ""
4578 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4579 "calling process."
4580 msgstr ""
4581 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4582 "全てのページをロック解除する。"
4583
4584 #. type: Plain text
4585 #: build/C/man2/mlock.2:122
4586 msgid ""
4587 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4588 "is set appropriately, and no changes are made to any locks in the address "
4589 "space of the process."
4590 msgstr ""
4591 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4592 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4593 "れない。"
4594
4595 #. type: Plain text
4596 #: build/C/man2/mlock.2:131
4597 msgid ""
4598 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4599 "resource limit, but tried to lock more memory than the limit permitted.  "
4600 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4601 msgstr ""
4602 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4603 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4604 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4605
4606 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4607 #.  take into account whether the to-be-locked range overlaps with
4608 #.  already locked pages.  Thus, suppose we allocate
4609 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4610 #.  mlock(), and then lock the *same* page range a second time.
4611 #.  In the case, the second mlock() call will fail, since the check
4612 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4613 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4614 #. type: Plain text
4615 #: build/C/man2/mlock.2:143
4616 msgid ""
4617 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4618 "RAM."
4619 msgstr ""
4620 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4621
4622 #. SVr4 documents an additional EAGAIN error code.
4623 #. type: Plain text
4624 #: build/C/man2/mlock.2:149
4625 msgid ""
4626 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4627 "perform the requested operation."
4628 msgstr ""
4629 "呼び出し側が特権を持っていないが、\n"
4630 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4631
4632 #. type: Plain text
4633 #: build/C/man2/mlock.2:154
4634 msgid "For B<mlock>()  and B<munlock>():"
4635 msgstr "B<mlock>()  と B<munlock>()  用として:"
4636
4637 #. type: Plain text
4638 #: build/C/man2/mlock.2:157
4639 msgid "Some or all of the specified address range could not be locked."
4640 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4641
4642 #. type: Plain text
4643 #: build/C/man2/mlock.2:164
4644 msgid ""
4645 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4646 "addition may have resulted in an overflow)."
4647 msgstr ""
4648 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4649 "(例えば、加算でオーバーフローが発生したなど)。"
4650
4651 #. type: Plain text
4652 #: build/C/man2/mlock.2:169
4653 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4654 msgstr ""
4655 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4656
4657 #. type: Plain text
4658 #: build/C/man2/mlock.2:173
4659 msgid ""
4660 "Some of the specified address range does not correspond to mapped pages in "
4661 "the address space of the process."
4662 msgstr ""
4663 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4664 "い。"
4665
4666 #. type: Plain text
4667 #: build/C/man2/mlock.2:176
4668 msgid "For B<mlockall>():"
4669 msgstr "B<mlockall>()  用として:"
4670
4671 #. type: Plain text
4672 #: build/C/man2/mlock.2:179
4673 msgid "Unknown I<flags> were specified."
4674 msgstr "未知の I<flags> が指定された。"
4675
4676 #. type: Plain text
4677 #: build/C/man2/mlock.2:182
4678 msgid "For B<munlockall>():"
4679 msgstr "B<munlockall>()  用として:"
4680
4681 #. type: Plain text
4682 #: build/C/man2/mlock.2:186
4683 msgid ""
4684 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4685 msgstr ""
4686 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4687
4688 #. type: Plain text
4689 #: build/C/man2/mlock.2:188
4690 msgid "POSIX.1-2001, SVr4."
4691 msgstr "POSIX.1-2001, SVr4."
4692
4693 #. type: SH
4694 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4695 #, no-wrap
4696 msgid "AVAILABILITY"
4697 msgstr "可用性"
4698
4699 #. type: Plain text
4700 #: build/C/man2/mlock.2:200
4701 msgid ""
4702 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4703 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4704 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4705 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4706 msgstr ""
4707 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4708 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4709 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4710 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4711 "び出すことで決定できる。"
4712
4713 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4714 #.  -1: unavailable, 0: ask using sysconf().
4715 #.  glibc defines it to 1.
4716 #. type: Plain text
4717 #: build/C/man2/mlock.2:213
4718 msgid ""
4719 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4720 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4721 "than 0.  (See also B<sysconf>(3).)"
4722 msgstr ""
4723 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4724 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4725 "(B<sysconf>(3)  も参照のこと)。"
4726
4727 #. type: Plain text
4728 #: build/C/man2/mlock.2:231
4729 msgid ""
4730 "Memory locking has two main applications: real-time algorithms and high-"
4731 "security data processing.  Real-time applications require deterministic "
4732 "timing, and, like scheduling, paging is one major cause of unexpected "
4733 "program execution delays.  Real-time applications will usually also switch "
4734 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4735 "security software often handles critical bytes like passwords or secret keys "
4736 "as data structures.  As a result of paging, these secrets could be "
4737 "transferred onto a persistent swap store medium, where they might be "
4738 "accessible to the enemy long after the security software has erased the "
4739 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4740 "laptops and some desktop computers will save a copy of the system's RAM to "
4741 "disk, regardless of memory locks.)"
4742 msgstr ""
4743 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4744 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4745 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4746 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4747 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4748 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4749 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4750 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4751 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4752 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4753 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4754 "存することに注意)。"
4755
4756 #. type: Plain text
4757 #: build/C/man2/mlock.2:244
4758 msgid ""
4759 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4760 "faults should reserve enough locked stack pages before entering the time-"
4761 "critical section, so that no page fault can be caused by function calls.  "
4762 "This can be achieved by calling a function that allocates a sufficiently "
4763 "large automatic variable (an array) and writes to the memory occupied by "
4764 "this array in order to touch these stack pages.  This way, enough pages will "
4765 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4766 "that not even copy-on-write page faults can occur in the critical section."
4767 msgstr ""
4768 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4769 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4770 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4771 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4772 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4773 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4774 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4775 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4776 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4777
4778 #. type: Plain text
4779 #: build/C/man2/mlock.2:250
4780 msgid ""
4781 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4782 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4783 "terminates."
4784 msgstr ""
4785 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4786 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4787 "れる)。"
4788
4789 #. type: Plain text
4790 #: build/C/man2/mlock.2:254
4791 msgid ""
4792 "The memory lock on an address range is automatically removed if the address "
4793 "range is unmapped via B<munmap>(2)."
4794 msgstr ""
4795 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4796 "よってアンマップされた場合は削除される。"
4797
4798 #. type: Plain text
4799 #: build/C/man2/mlock.2:267
4800 msgid ""
4801 "Memory locks do not stack, that is, pages which have been locked several "
4802 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4803 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4804 "Pages which are mapped to several locations or by several processes stay "
4805 "locked into RAM as long as they are locked at least at one location or by at "
4806 "least one process."
4807 msgstr ""
4808 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4809 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4810 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4811 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4812 "のプロセスでロックされている限りは RAM に残り続ける。"
4813
4814 #. type: Plain text
4815 #: build/C/man2/mlock.2:278
4816 msgid ""
4817 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4818 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4819 "implementation to require that I<addr> is page aligned, so portable "
4820 "applications should ensure this."
4821 msgstr ""
4822 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4823 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4824 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4825 "ケーションではきちんと境界に合わせた方が良い。"
4826
4827 #. type: Plain text
4828 #: build/C/man2/mlock.2:291
4829 msgid ""
4830 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4831 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4832 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4833 msgstr ""
4834 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4835 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4836 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4837 "表示される。"
4838
4839 #. type: SS
4840 #: build/C/man2/mlock.2:291
4841 #, no-wrap
4842 msgid "Limits and permissions"
4843 msgstr "制限と権限"
4844
4845 #. type: Plain text
4846 #: build/C/man2/mlock.2:298
4847 msgid ""
4848 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4849 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4850 "defines a limit on how much memory the process may lock."
4851 msgstr ""
4852 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4853 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4854 "できるかの制限を定義する。"
4855
4856 #. type: Plain text
4857 #: build/C/man2/mlock.2:304
4858 msgid ""
4859 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4860 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4861 "instead defines a limit on how much memory an unprivileged process may lock."
4862 msgstr ""
4863 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4864 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4865 "クできるメモリ量の制限を定義する。"
4866
4867 #. type: Plain text
4868 #: build/C/man2/mlock.2:312
4869 msgid ""
4870 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4871 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4872 "was rectified in kernel 2.4.18."
4873 msgstr ""
4874 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4875 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4876 "ネル 2.4.18 で修正された。"
4877
4878 #.  See the following LKML thread:
4879 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4880 #.  "Rationale for RLIMIT_MEMLOCK"
4881 #.  23 Jan 2006
4882 #. type: Plain text
4883 #: build/C/man2/mlock.2:329
4884 msgid ""
4885 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4886 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4887 "example, setting its effective UID to a nonzero value), then subsequent "
4888 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4889 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4890 msgstr ""
4891 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4892 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4893 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4894 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4895 "B<brk>(2))  は失敗する。"
4896
4897 #. type: Plain text
4898 #: build/C/man2/mlock.2:336
4899 msgid ""
4900 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4901 "B<capabilities>(7)"
4902 msgstr ""
4903 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4904 "B<capabilities>(7)"
4905
4906 #. type: TH
4907 #: build/C/man2/mmap.2:40
4908 #, no-wrap
4909 msgid "MMAP"
4910 msgstr "MMAP"
4911
4912 #. type: TH
4913 #: build/C/man2/mmap.2:40
4914 #, no-wrap
4915 msgid "2013-04-17"
4916 msgstr "2013-04-17"
4917
4918 #. type: Plain text
4919 #: build/C/man2/mmap.2:43
4920 msgid "mmap, munmap - map or unmap files or devices into memory"
4921 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4922
4923 #. type: Plain text
4924 #: build/C/man2/mmap.2:51
4925 #, no-wrap
4926 msgid ""
4927 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4928 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4929 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4930 msgstr ""
4931 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4932 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4933 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4934
4935 #. type: Plain text
4936 #: build/C/man2/mmap.2:54
4937 msgid "See NOTES for information on feature test macro requirements."
4938 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
4939
4940 #. type: Plain text
4941 #: build/C/man2/mmap.2:63
4942 msgid ""
4943 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4944 "process.  The starting address for the new mapping is specified in I<addr>.  "
4945 "The I<length> argument specifies the length of the mapping."
4946 msgstr ""
4947 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4948 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4949 "は I<length> 引き数で指定される。"
4950
4951 #.  Before Linux 2.6.24, the address was rounded up to the next page
4952 #.  boundary; since 2.6.24, it is rounded down!
4953 #. type: Plain text
4954 #: build/C/man2/mmap.2:77
4955 msgid ""
4956 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4957 "the mapping; this is the most portable method of creating a new mapping.  If "
4958 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4959 "the mapping; on Linux, the mapping will be created at a nearby page "
4960 "boundary.  The address of the new mapping is returned as the result of the "
4961 "call."
4962 msgstr ""
4963 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4964 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4965 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4966 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4967 "ングのアドレスは、呼び出しの返り値として返される。"
4968
4969 #. type: Plain text
4970 #: build/C/man2/mmap.2:89
4971 msgid ""
4972 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4973 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4974 "offset I<offset> in the file (or other object) referred to by the file "
4975 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4976 "by I<sysconf(_SC_PAGE_SIZE)>."
4977 msgstr ""
4978 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4979 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4980 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4981 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4982 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4983
4984 #. type: Plain text
4985 #: build/C/man2/mmap.2:97
4986 msgid ""
4987 "The I<prot> argument describes the desired memory protection of the mapping "
4988 "(and must not conflict with the open mode of the file).  It is either "
4989 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4990 msgstr ""
4991 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4992 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4993 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4994
4995 #. type: TP
4996 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
4997 #, no-wrap
4998 msgid "B<PROT_EXEC>"
4999 msgstr "B<PROT_EXEC>"
5000
5001 #. type: Plain text
5002 #: build/C/man2/mmap.2:100
5003 msgid "Pages may be executed."
5004 msgstr "ページは実行可能である。"
5005
5006 #. type: TP
5007 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5008 #, no-wrap
5009 msgid "B<PROT_READ>"
5010 msgstr "B<PROT_READ>"
5011
5012 #. type: Plain text
5013 #: build/C/man2/mmap.2:103
5014 msgid "Pages may be read."
5015 msgstr "ページは読み込み可能である。"
5016
5017 #. type: TP
5018 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5019 #, no-wrap
5020 msgid "B<PROT_WRITE>"
5021 msgstr "B<PROT_WRITE>"
5022
5023 #. type: Plain text
5024 #: build/C/man2/mmap.2:106
5025 msgid "Pages may be written."
5026 msgstr "ページに書き込み可能である。"
5027
5028 #. type: TP
5029 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5030 #, no-wrap
5031 msgid "B<PROT_NONE>"
5032 msgstr "B<PROT_NONE>"
5033
5034 #. type: Plain text
5035 #: build/C/man2/mmap.2:109
5036 msgid "Pages may not be accessed."
5037 msgstr "ページにはアクセスできない。"
5038
5039 #. type: Plain text
5040 #: build/C/man2/mmap.2:118
5041 msgid ""
5042 "The I<flags> argument determines whether updates to the mapping are visible "
5043 "to other processes mapping the same region, and whether updates are carried "
5044 "through to the underlying file.  This behavior is determined by including "
5045 "exactly one of the following values in I<flags>:"
5046 msgstr ""
5047 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5048 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5049 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5050 "I<flags> に含めることで指定する。"
5051
5052 #. type: TP
5053 #: build/C/man2/mmap.2:118
5054 #, no-wrap
5055 msgid "B<MAP_SHARED>"
5056 msgstr "B<MAP_SHARED>"
5057
5058 #. type: Plain text
5059 #: build/C/man2/mmap.2:128
5060 msgid ""
5061 "Share this mapping.  Updates to the mapping are visible to other processes "
5062 "that map this file, and are carried through to the underlying file.  The "
5063 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5064 "called."
5065 msgstr ""
5066 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5067 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5068 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5069 "るまで行われないこともある。"
5070
5071 #. type: TP
5072 #: build/C/man2/mmap.2:128
5073 #, no-wrap
5074 msgid "B<MAP_PRIVATE>"
5075 msgstr "B<MAP_PRIVATE>"
5076
5077 #. type: Plain text
5078 #: build/C/man2/mmap.2:137
5079 msgid ""
5080 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5081 "visible to other processes mapping the same file, and are not carried "
5082 "through to the underlying file.  It is unspecified whether changes made to "
5083 "the file after the B<mmap>()  call are visible in the mapped region."
5084 msgstr ""
5085 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5086 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5087 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5088 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5089 "かは規定されていない。"
5090
5091 #. type: Plain text
5092 #: build/C/man2/mmap.2:139
5093 msgid "Both of these flags are described in POSIX.1-2001."
5094 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5095
5096 #. type: Plain text
5097 #: build/C/man2/mmap.2:142
5098 msgid ""
5099 "In addition, zero or more of the following values can be ORed in I<flags>:"
5100 msgstr ""
5101 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5102 "ことができる。"
5103
5104 #. type: TP
5105 #: build/C/man2/mmap.2:142
5106 #, no-wrap
5107 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5108 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5109
5110 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5111 #. type: Plain text
5112 #: build/C/man2/mmap.2:158
5113 msgid ""
5114 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5115 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5116 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5117 "as to improve context-switch performance on some early 64-bit processors.  "
5118 "Modern x86-64 processors no longer have this performance problem, so use of "
5119 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5120 "ignored when B<MAP_FIXED> is set."
5121 msgstr ""
5122 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5123 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5124 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5125 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5126 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5127 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5128 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5129 "グは無視される。"
5130
5131 #. type: TP
5132 #: build/C/man2/mmap.2:158
5133 #, no-wrap
5134 msgid "B<MAP_ANON>"
5135 msgstr "B<MAP_ANON>"
5136
5137 #. type: Plain text
5138 #: build/C/man2/mmap.2:163
5139 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5140 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5141
5142 #. type: TP
5143 #: build/C/man2/mmap.2:163
5144 #, no-wrap
5145 msgid "B<MAP_ANONYMOUS>"
5146 msgstr "B<MAP_ANONYMOUS>"
5147
5148 #. type: Plain text
5149 #: build/C/man2/mmap.2:185
5150 msgid ""
5151 "The mapping is not backed by any file; its contents are initialized to "
5152 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5153 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5154 "is specified, and portable applications should ensure this.  The use of "
5155 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5156 "only since kernel 2.4."
5157 msgstr ""
5158 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5159 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5160 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5161 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5162 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5163 "以降の Linux でのみサポートされている。"
5164
5165 #. type: TP
5166 #: build/C/man2/mmap.2:185
5167 #, no-wrap
5168 msgid "B<MAP_DENYWRITE>"
5169 msgstr "B<MAP_DENYWRITE>"
5170
5171 #.  Introduced in 1.1.36, removed in 1.3.24.
5172 #. type: Plain text
5173 #: build/C/man2/mmap.2:193
5174 msgid ""
5175 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5176 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5177 "denial-of-service attacks.)"
5178 msgstr ""
5179 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5180 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5181 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5182
5183 #. type: TP
5184 #: build/C/man2/mmap.2:193
5185 #, no-wrap
5186 msgid "B<MAP_EXECUTABLE>"
5187 msgstr "B<MAP_EXECUTABLE>"
5188
5189 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5190 #.  (Long ago, it signaled that the underlying file is an executable.
5191 #.  However, that information was not really used anywhere.)
5192 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5193 #.  MAP_DENYWRITE?
5194 #. type: Plain text
5195 #: build/C/man2/mmap.2:201
5196 msgid "This flag is ignored."
5197 msgstr "このフラグは無視される。"
5198
5199 #. type: TP
5200 #: build/C/man2/mmap.2:201
5201 #, no-wrap
5202 msgid "B<MAP_FILE>"
5203 msgstr "B<MAP_FILE>"
5204
5205 #.  On some systems, this was required as the opposite of
5206 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5207 #. type: Plain text
5208 #: build/C/man2/mmap.2:207
5209 msgid "Compatibility flag.  Ignored."
5210 msgstr "互換性のためのフラグ。無視される。"
5211
5212 #. type: TP
5213 #: build/C/man2/mmap.2:207
5214 #, no-wrap
5215 msgid "B<MAP_FIXED>"
5216 msgstr "B<MAP_FIXED>"
5217
5218 #. type: Plain text
5219 #: build/C/man2/mmap.2:225
5220 msgid ""
5221 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5222 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5223 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5224 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5225 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5226 "requiring a fixed address for a mapping is less portable, the use of this "
5227 "option is discouraged."
5228 msgstr ""
5229 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5230 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5231 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5232 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5233 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5234 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5235 "を推奨する。"
5236
5237 #. type: TP
5238 #: build/C/man2/mmap.2:225
5239 #, no-wrap
5240 msgid "B<MAP_GROWSDOWN>"
5241 msgstr "B<MAP_GROWSDOWN>"
5242
5243 #. type: Plain text
5244 #: build/C/man2/mmap.2:230
5245 msgid ""
5246 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5247 "mapping should extend downward in memory."
5248 msgstr ""
5249 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5250 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5251 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5252
5253 #. type: TP
5254 #: build/C/man2/mmap.2:230
5255 #, no-wrap
5256 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5257 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5258
5259 #. type: Plain text
5260 #: build/C/man2/mmap.2:236
5261 msgid ""
5262 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5263 "I<Documentation/vm/hugetlbpage.txt> for further information."
5264 msgstr ""
5265 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5266 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5267
5268 #. type: TP
5269 #: build/C/man2/mmap.2:236
5270 #, no-wrap
5271 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5272 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5273
5274 #.  If set, the mapped pages will not be swapped out.
5275 #. type: Plain text
5276 #: build/C/man2/mmap.2:242
5277 msgid ""
5278 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5279 "(2).  This flag is ignored in older kernels."
5280 msgstr ""
5281 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5282 "前のカーネルでは、このフラグは無視される。"
5283
5284 #. type: TP
5285 #: build/C/man2/mmap.2:242
5286 #, no-wrap
5287 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5288 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5289
5290 #. type: Plain text
5291 #: build/C/man2/mmap.2:257
5292 msgid ""
5293 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5294 "ahead: create page tables entries only for pages that are already present in "
5295 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5296 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5297 "reimplemented."
5298 msgstr ""
5299 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5300 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5301 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5302 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5303 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5304
5305 #. type: TP
5306 #: build/C/man2/mmap.2:257
5307 #, no-wrap
5308 msgid "B<MAP_NORESERVE>"
5309 msgstr "B<MAP_NORESERVE>"
5310
5311 #. type: Plain text
5312 #: build/C/man2/mmap.2:272
5313 msgid ""
5314 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5315 "one has the guarantee that it is possible to modify the mapping.  When swap "
5316 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5317 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5318 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5319 "effect only for private writable mappings."
5320 msgstr ""
5321 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5322 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5323 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5324 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5325 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5326 "イベート・マッピングについてのみ効果があった。"
5327
5328 #. type: TP
5329 #: build/C/man2/mmap.2:272
5330 #, no-wrap
5331 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5332 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5333
5334 #. type: Plain text
5335 #: build/C/man2/mmap.2:279
5336 msgid ""
5337 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5338 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5339 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5340 "only since Linux 2.6.23."
5341 msgstr ""
5342 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5343 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5344 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5345 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5346 "されている。"
5347
5348 #. type: TP
5349 #: build/C/man2/mmap.2:279
5350 #, no-wrap
5351 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5352 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5353
5354 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5355 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5356 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5357 #.  "pthread_create() slow for many threads; also time to revisit 64b
5358 #.   context switch optimization?"
5359 #. type: Plain text
5360 #: build/C/man2/mmap.2:292
5361 msgid ""
5362 "Allocate the mapping at an address suitable for a process or thread stack.  "
5363 "This flag is currently a no-op, but is used in the glibc threading "
5364 "implementation so that if some architectures require special treatment for "
5365 "stack allocations, support can later be transparently implemented for glibc."
5366 msgstr ""
5367 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5368 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5369 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5370 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5371 "る。"
5372
5373 #. type: TP
5374 #: build/C/man2/mmap.2:292
5375 #, no-wrap
5376 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5377 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5378
5379 #. type: Plain text
5380 #: build/C/man2/mmap.2:302
5381 msgid ""
5382 "Don't clear anonymous pages.  This flag is intended to improve performance "
5383 "on embedded devices.  This flag is honored only if the kernel was configured "
5384 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5385 "implications, that option is normally enabled only on embedded devices (i."
5386 "e., devices where one has complete control of the contents of user memory)."
5387 msgstr ""
5388 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5389 "ス\n"
5390 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5391 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5392 "このフラグは効果を持つ。\n"
5393 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5394 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5395
5396 #. type: Plain text
5397 #: build/C/man2/mmap.2:310
5398 msgid ""
5399 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5400 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5401 "B<MAP_ANON>)."
5402 msgstr ""
5403 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5404 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5405 "B<MAP_ANON>)  もサポートされている。"
5406
5407 #. type: Plain text
5408 #: build/C/man2/mmap.2:317
5409 msgid ""
5410 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5411 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5412 msgstr ""
5413 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5414 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5415
5416 #. type: Plain text
5417 #: build/C/man2/mmap.2:323
5418 msgid ""
5419 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5420 "attributes."
5421 msgstr ""
5422 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5423
5424 #. type: Plain text
5425 #: build/C/man2/mmap.2:331
5426 msgid ""
5427 "A file is mapped in multiples of the page size.  For a file that is not a "
5428 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5429 "writes to that region are not written out to the file.  The effect of "
5430 "changing the size of the underlying file of a mapping on the pages that "
5431 "correspond to added or removed regions of the file is unspecified."
5432 msgstr ""
5433 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5434 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5435 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5436 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5437 "マップされたページに対してどのような影響があるかは規定されていない。"
5438
5439 #. type: SS
5440 #: build/C/man2/mmap.2:331
5441 #, no-wrap
5442 msgid "munmap()"
5443 msgstr "munmap()"
5444
5445 #. type: Plain text
5446 #: build/C/man2/mmap.2:341
5447 msgid ""
5448 "The B<munmap>()  system call deletes the mappings for the specified address "
5449 "range, and causes further references to addresses within the range to "
5450 "generate invalid memory references.  The region is also automatically "
5451 "unmapped when the process is terminated.  On the other hand, closing the "
5452 "file descriptor does not unmap the region."
5453 msgstr ""
5454 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5455 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5456 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5457 "はアンマップされない。"
5458
5459 #. type: Plain text
5460 #: build/C/man2/mmap.2:351
5461 msgid ""
5462 "The address I<addr> must be a multiple of the page size.  All pages "
5463 "containing a part of the indicated range are unmapped, and subsequent "
5464 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5465 "the indicated range does not contain any mapped pages."
5466 msgstr ""
5467 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5468 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5469 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5470 "ていない場合でも エラーにならない。"
5471
5472 #. type: SS
5473 #: build/C/man2/mmap.2:351
5474 #, no-wrap
5475 msgid "Timestamps changes for file-backed mappings"
5476 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5477
5478 #. type: Plain text
5479 #: build/C/man2/mmap.2:358
5480 msgid ""
5481 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5482 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5483 "the first reference to a mapped page will update the field if it has not "
5484 "been already."
5485 msgstr ""
5486 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5487 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5488 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5489 "ページへの最初の参照があった 際に更新される。"
5490
5491 #. type: Plain text
5492 #: build/C/man2/mmap.2:375
5493 msgid ""
5494 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5495 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5496 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5497 "one occurs."
5498 msgstr ""
5499 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5500 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5501 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5502 "B<msync>(2)  が呼ばれる前までに更新される。"
5503
5504 #. type: Plain text
5505 #: build/C/man2/mmap.2:392
5506 msgid ""
5507 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5508 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5509 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5510 "and I<errno> is set (probably to B<EINVAL>)."
5511 msgstr ""
5512 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5513 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5514 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5515 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5516
5517 #. type: TP
5518 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5519 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5520 #: build/C/man2/shmctl.2:302 build/C/man2/shmget.2:189
5521 #: build/C/man2/shmop.2:191
5522 #, no-wrap
5523 msgid "B<EACCES>"
5524 msgstr "B<EACCES>"
5525
5526 #. type: Plain text
5527 #: build/C/man2/mmap.2:413
5528 msgid ""
5529 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5530 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5531 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5532 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5533 msgstr ""
5534 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5535 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5536 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5537 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5538 "が、ファイルは追加 (append) 専用である。"
5539
5540 #. type: Plain text
5541 #: build/C/man2/mmap.2:417
5542 msgid ""
5543 "The file has been locked, or too much memory has been locked (see "
5544 "B<setrlimit>(2))."
5545 msgstr ""
5546 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5547 "(B<setrlimit>(2)  を参照)。"
5548
5549 #. type: Plain text
5550 #: build/C/man2/mmap.2:423
5551 msgid ""
5552 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5553 msgstr ""
5554 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5555 "B<MAP_ANONYMOUS> がセットされていない)。"
5556
5557 #. type: Plain text
5558 #: build/C/man2/mmap.2:431
5559 msgid ""
5560 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5561 "not aligned on a page boundary)."
5562 msgstr ""
5563 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5564 "ジ境界にアラインメントされていない)。"
5565
5566 #. type: Plain text
5567 #: build/C/man2/mmap.2:436
5568 msgid "(since Linux 2.6.12)  I<length> was 0."
5569 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5570
5571 #. type: Plain text
5572 #: build/C/man2/mmap.2:444
5573 msgid ""
5574 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5575 "both of these values."
5576 msgstr ""
5577 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5578 "しくは その両方が含まれていた。"
5579
5580 #. type: TP
5581 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:229
5582 #: build/C/man2/shmget.2:205
5583 #, no-wrap
5584 msgid "B<ENFILE>"
5585 msgstr "B<ENFILE>"
5586
5587 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5588 #. type: Plain text
5589 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:209
5590 msgid "The system limit on the total number of open files has been reached."
5591 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5592
5593 #. type: Plain text
5594 #: build/C/man2/mmap.2:456
5595 msgid ""
5596 "The underlying file system of the specified file does not support memory "
5597 "mapping."
5598 msgstr ""
5599 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5600 "していない。"
5601
5602 #. type: Plain text
5603 #: build/C/man2/mmap.2:460
5604 msgid ""
5605 "No memory is available, or the process's maximum number of mappings would "
5606 "have been exceeded."
5607 msgstr ""
5608 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5609
5610 #.  (Since 2.4.25 / 2.6.0.)
5611 #. type: Plain text
5612 #: build/C/man2/mmap.2:469
5613 msgid ""
5614 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5615 "file on a file system that was mounted no-exec."
5616 msgstr ""
5617 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5618 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5619
5620 #. type: TP
5621 #: build/C/man2/mmap.2:469
5622 #, no-wrap
5623 msgid "B<ETXTBSY>"
5624 msgstr "B<ETXTBSY>"
5625
5626 #. type: Plain text
5627 #: build/C/man2/mmap.2:475
5628 msgid ""
5629 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5630 "writing."
5631 msgstr ""
5632 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5633 "き込み用に開かれている。"
5634
5635 #. type: TP
5636 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:344
5637 #, no-wrap
5638 msgid "B<EOVERFLOW>"
5639 msgstr "B<EOVERFLOW>"
5640
5641 #. type: Plain text
5642 #: build/C/man2/mmap.2:487
5643 msgid ""
5644 "On 32-bit architecture together with the large file extension (i.e., using "
5645 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5646 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5647 msgstr ""
5648 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5649 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
5650 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
5651 "しまう) 場合がある。"
5652
5653 #. type: Plain text
5654 #: build/C/man2/mmap.2:489
5655 msgid "Use of a mapped region can result in these signals:"
5656 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5657
5658 #. type: TP
5659 #: build/C/man2/mmap.2:489
5660 #, no-wrap
5661 msgid "B<SIGSEGV>"
5662 msgstr "B<SIGSEGV>"
5663
5664 #. type: Plain text
5665 #: build/C/man2/mmap.2:492
5666 msgid "Attempted write into a region mapped as read-only."
5667 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5668
5669 #. type: TP
5670 #: build/C/man2/mmap.2:492
5671 #, no-wrap
5672 msgid "B<SIGBUS>"
5673 msgstr "B<SIGBUS>"
5674
5675 #. type: Plain text
5676 #: build/C/man2/mmap.2:497
5677 msgid ""
5678 "Attempted access to a portion of the buffer that does not correspond to the "
5679 "file (for example, beyond the end of the file, including the case where "
5680 "another process has truncated the file)."
5681 msgstr ""
5682 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5683 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5684 "にアクセスしようとした。"
5685
5686 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5687 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5688 #. type: Plain text
5689 #: build/C/man2/mmap.2:501
5690 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5691 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5692
5693 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5694 #.  -1: unavailable, 0: ask using sysconf().
5695 #.  glibc defines it to 1.
5696 #. type: Plain text
5697 #: build/C/man2/mmap.2:515
5698 msgid ""
5699 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5700 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5701 "value greater than 0.  (See also B<sysconf>(3).)"
5702 msgstr ""
5703 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5704 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5705 "(B<sysconf>(3)  も参照のこと)。"
5706
5707 #.  Since around glibc 2.1/2.2, depending on the platform.
5708 #. type: Plain text
5709 #: build/C/man2/mmap.2:530
5710 msgid ""
5711 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5712 "function.  Originally, this function invoked a system call of the same "
5713 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5714 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5715 "with a suitably adjusted value for I<offset>."
5716 msgstr ""
5717 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5718 "に\n"
5719 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5720 "た。\n"
5721 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5722 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5723 "B<mmap2>(2) を起動する。"
5724
5725 #. type: Plain text
5726 #: build/C/man2/mmap.2:543
5727 msgid ""
5728 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5729 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5730 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5731 "they intend to execute code in the new mapping."
5732 msgstr ""
5733 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5734 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5735 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5736 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5737 "常に B<PROT_EXEC> をセットすべきである。"
5738
5739 #. type: Plain text
5740 #: build/C/man2/mmap.2:558
5741 msgid ""
5742 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5743 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5744 "address for the mapping; the address is chosen so as not to conflict with "
5745 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5746 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5747 msgstr ""
5748 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5749 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5750 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5751 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5752 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5753
5754 #. type: Plain text
5755 #: build/C/man2/mmap.2:587
5756 msgid ""
5757 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5758 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5759 "requiring that macro specifically would have been more logical, since these "
5760 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5761 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5762 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5763 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5764 "B<MAP_STACK>."
5765 msgstr ""
5766 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
5767 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
5768 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
5769 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
5770 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
5771 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5772 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
5773 "B<MAP_STACK> である。"
5774
5775 #. type: Plain text
5776 #: build/C/man2/mmap.2:592
5777 msgid ""
5778 "On Linux there are no guarantees like those suggested above under "
5779 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5780 "the system runs out of memory."
5781 msgstr ""
5782 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5783 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5784 "終了されるか分からないからである。"
5785
5786 #. type: Plain text
5787 #: build/C/man2/mmap.2:599
5788 msgid ""
5789 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5790 "is specified as B<PROT_NONE>."
5791 msgstr ""
5792 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5793 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5794
5795 #. type: Plain text
5796 #: build/C/man2/mmap.2:614
5797 msgid ""
5798 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5799 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5800 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5801 "fails with the error B<EINVAL> for this case."
5802 msgstr ""
5803 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5804 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5805 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5806 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5807
5808 #. type: Plain text
5809 #: build/C/man2/mmap.2:630
5810 msgid ""
5811 "POSIX specifies that the system shall always zero fill any partial page at "
5812 "the end of the object and that system will never write any modification of "
5813 "the object beyond its end.  On Linux, when you write data to such partial "
5814 "page after the end of the object, the data stays in the page cache even "
5815 "after the file is closed and unmapped and even though the data is never "
5816 "written to the file itself, subsequent mappings may see the modified "
5817 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5818 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5819 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5820 msgstr ""
5821 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
5822 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
5823 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
5824 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
5825 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
5826 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
5827 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
5828 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
5829 "共有メモリインターフェースを使った場合)。"
5830
5831 #. type: Plain text
5832 #: build/C/man2/mmap.2:642
5833 msgid ""
5834 "The following program prints part of the file specified in its first command-"
5835 "line argument to standard output.  The range of bytes to be printed is "
5836 "specified via offset and length values in the second and third command-line "
5837 "arguments.  The program creates a memory mapping of the required pages of "
5838 "the file and then uses B<write>(2)  to output the desired bytes."
5839 msgstr ""
5840 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5841 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5842 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5843 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5844 "を出力する。"
5845
5846 #. type: Plain text
5847 #: build/C/man2/mmap.2:650
5848 #, no-wrap
5849 msgid ""
5850 "#include E<lt>sys/mman.hE<gt>\n"
5851 "#include E<lt>sys/stat.hE<gt>\n"
5852 "#include E<lt>fcntl.hE<gt>\n"
5853 "#include E<lt>stdio.hE<gt>\n"
5854 "#include E<lt>stdlib.hE<gt>\n"
5855 "#include E<lt>unistd.hE<gt>\n"
5856 msgstr ""
5857 "#include E<lt>sys/mman.hE<gt>\n"
5858 "#include E<lt>sys/stat.hE<gt>\n"
5859 "#include E<lt>fcntl.hE<gt>\n"
5860 "#include E<lt>stdio.hE<gt>\n"
5861 "#include E<lt>stdlib.hE<gt>\n"
5862 "#include E<lt>unistd.hE<gt>\n"
5863
5864 #. type: Plain text
5865 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5866 #, no-wrap
5867 msgid ""
5868 "#define handle_error(msg) \\e\n"
5869 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5870 msgstr ""
5871 "#define handle_error(msg) \\e\n"
5872 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5873
5874 #. type: Plain text
5875 #: build/C/man2/mmap.2:663
5876 #, no-wrap
5877 msgid ""
5878 "int\n"
5879 "main(int argc, char *argv[])\n"
5880 "{\n"
5881 "    char *addr;\n"
5882 "    int fd;\n"
5883 "    struct stat sb;\n"
5884 "    off_t offset, pa_offset;\n"
5885 "    size_t length;\n"
5886 "    ssize_t s;\n"
5887 msgstr ""
5888 "int\n"
5889 "main(int argc, char *argv[])\n"
5890 "{\n"
5891 "    char *addr;\n"
5892 "    int fd;\n"
5893 "    struct stat sb;\n"
5894 "    off_t offset, pa_offset;\n"
5895 "    size_t length;\n"
5896 "    ssize_t s;\n"
5897
5898 #. type: Plain text
5899 #: build/C/man2/mmap.2:668
5900 #, no-wrap
5901 msgid ""
5902 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5903 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5904 "        exit(EXIT_FAILURE);\n"
5905 "    }\n"
5906 msgstr ""
5907 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5908 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5909 "        exit(EXIT_FAILURE);\n"
5910 "    }\n"
5911
5912 #. type: Plain text
5913 #: build/C/man2/mmap.2:672
5914 #, no-wrap
5915 msgid ""
5916 "    fd = open(argv[1], O_RDONLY);\n"
5917 "    if (fd == -1)\n"
5918 "        handle_error(\"open\");\n"
5919 msgstr ""
5920 "    fd = open(argv[1], O_RDONLY);\n"
5921 "    if (fd == -1)\n"
5922 "        handle_error(\"open\");\n"
5923
5924 #. type: Plain text
5925 #: build/C/man2/mmap.2:675
5926 #, no-wrap
5927 msgid ""
5928 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5929 "        handle_error(\"fstat\");\n"
5930 msgstr ""
5931 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5932 "        handle_error(\"fstat\");\n"
5933
5934 #. type: Plain text
5935 #: build/C/man2/mmap.2:679
5936 #, no-wrap
5937 msgid ""
5938 "    offset = atoi(argv[2]);\n"
5939 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5940 "        /* offset for mmap() must be page aligned */\n"
5941 msgstr ""
5942 "    offset = atoi(argv[2]);\n"
5943 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5944 "        /* offset for mmap() must be page aligned */\n"
5945
5946 #. type: Plain text
5947 #: build/C/man2/mmap.2:684
5948 #, no-wrap
5949 msgid ""
5950 "    if (offset E<gt>= sb.st_size) {\n"
5951 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5952 "        exit(EXIT_FAILURE);\n"
5953 "    }\n"
5954 msgstr ""
5955 "    if (offset E<gt>= sb.st_size) {\n"
5956 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5957 "        exit(EXIT_FAILURE);\n"
5958 "    }\n"
5959
5960 #. type: Plain text
5961 #: build/C/man2/mmap.2:690
5962 #, no-wrap
5963 msgid ""
5964 "    if (argc == 4) {\n"
5965 "        length = atoi(argv[3]);\n"
5966 "        if (offset + length E<gt> sb.st_size)\n"
5967 "            length = sb.st_size - offset;\n"
5968 "                /* Can\\(aqt display bytes past end of file */\n"
5969 msgstr ""
5970 "    if (argc == 4) {\n"
5971 "        length = atoi(argv[3]);\n"
5972 "        if (offset + length E<gt> sb.st_size)\n"
5973 "            length = sb.st_size - offset;\n"
5974 "                /* Can\\(aqt display bytes past end of file */\n"
5975
5976 #. type: Plain text
5977 #: build/C/man2/mmap.2:694
5978 #, no-wrap
5979 msgid ""
5980 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5981 "        length = sb.st_size - offset;\n"
5982 "    }\n"
5983 msgstr ""
5984 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5985 "        length = sb.st_size - offset;\n"
5986 "    }\n"
5987
5988 #. type: Plain text
5989 #: build/C/man2/mmap.2:699
5990 #, no-wrap
5991 msgid ""
5992 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5993 "                MAP_PRIVATE, fd, pa_offset);\n"
5994 "    if (addr == MAP_FAILED)\n"
5995 "        handle_error(\"mmap\");\n"
5996 msgstr ""
5997 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5998 "                MAP_PRIVATE, fd, pa_offset);\n"
5999 "    if (addr == MAP_FAILED)\n"
6000 "        handle_error(\"mmap\");\n"
6001
6002 #. type: Plain text
6003 #: build/C/man2/mmap.2:704
6004 #, no-wrap
6005 msgid ""
6006 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6007 "    if (s != length) {\n"
6008 "        if (s == -1)\n"
6009 "            handle_error(\"write\");\n"
6010 msgstr ""
6011 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6012 "    if (s != length) {\n"
6013 "        if (s == -1)\n"
6014 "            handle_error(\"write\");\n"
6015
6016 #. type: Plain text
6017 #: build/C/man2/mmap.2:708
6018 #, no-wrap
6019 msgid ""
6020 "        fprintf(stderr, \"partial write\");\n"
6021 "        exit(EXIT_FAILURE);\n"
6022 "    }\n"
6023 msgstr ""
6024 "        fprintf(stderr, \"partial write\");\n"
6025 "        exit(EXIT_FAILURE);\n"
6026 "    }\n"
6027
6028 #. type: Plain text
6029 #: build/C/man2/mmap.2:725
6030 msgid ""
6031 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6032 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6033 "(2), B<shm_open>(3), B<shm_overview>(7)"
6034 msgstr ""
6035 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6036 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6037 "(2), B<shm_open>(3), B<shm_overview>(7)"
6038
6039 #. type: Plain text
6040 #: build/C/man2/mmap.2:732
6041 msgid ""
6042 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6043 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6044 msgstr ""
6045 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6046 "smaps> の説明。"
6047
6048 #. type: Plain text
6049 #: build/C/man2/mmap.2:737 build/C/man2/msync.2:124
6050 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6051 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6052
6053 #. type: TH
6054 #: build/C/man2/mmap2.2:29
6055 #, no-wrap
6056 msgid "MMAP2"
6057 msgstr "MMAP2"
6058
6059 #. type: TH
6060 #: build/C/man2/mmap2.2:29
6061 #, no-wrap
6062 msgid "2012-04-16"
6063 msgstr "2012-04-16"
6064
6065 #. type: Plain text
6066 #: build/C/man2/mmap2.2:32
6067 msgid "mmap2 - map files or devices into memory"
6068 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6069
6070 #. type: Plain text
6071 #: build/C/man2/mmap2.2:38
6072 #, no-wrap
6073 msgid ""
6074 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6075 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6076 msgstr ""
6077 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6078 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6079
6080 #. type: Plain text
6081 #: build/C/man2/mmap2.2:43
6082 msgid ""
6083 "This is probably not the system call you are interested; instead, see B<mmap>"
6084 "(2), which describes the glibc wrapper function that invokes this system "
6085 "call."
6086 msgstr ""
6087 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6088 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6089 "の\n"
6090 "ラッパー関数についての説明がある。"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mmap2.2:54
6094 msgid ""
6095 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6096 "except that the final argument specifies the offset into the file in 4096-"
6097 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6098 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6099 "bytes)."
6100 msgstr ""
6101 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6102 "だ\n"
6103 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6104 "ト\n"
6105 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6106 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6107 "プ\n"
6108 "できるようになる。"
6109
6110 #. type: Plain text
6111 #: build/C/man2/mmap2.2:61
6112 msgid ""
6113 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
6114 "is returned and I<errno> is set appropriately."
6115 msgstr ""
6116 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6117 "合は -1 が返されて、 I<errno> が適切に設定される。"
6118
6119 #. type: Plain text
6120 #: build/C/man2/mmap2.2:65
6121 msgid "Problem with getting the data from user space."
6122 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6123
6124 #. type: Plain text
6125 #: build/C/man2/mmap2.2:70
6126 msgid ""
6127 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6128 "4096> is not a multiple of the system page size."
6129 msgstr "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ 4096> がシステムのページサイズの倍数ではない。"
6130
6131 #. type: Plain text
6132 #: build/C/man2/mmap2.2:74
6133 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6134 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6135
6136 #. type: Plain text
6137 #: build/C/man2/mmap2.2:77
6138 msgid "B<mmap2>()  is available since Linux 2.3.31."
6139 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6140
6141 #. type: Plain text
6142 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6143 msgid "This system call is Linux-specific."
6144 msgstr "このシステムコールは Linux 独自である。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mmap2.2:85
6148 msgid ""
6149 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6150 "rather than the B<mmap>(2)  system call."
6151 msgstr ""
6152 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6153 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6154
6155 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6156 #.  On cris, it looks like the unit might also be the page size,
6157 #.  which is 8192 bytes. -- mtk, June 2007
6158 #. type: Plain text
6159 #: build/C/man2/mmap2.2:92
6160 msgid ""
6161 "On ia64, the unit for I<offset> is actually the system page size, rather "
6162 "than 4096 bytes."
6163 msgstr ""
6164 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6165 "バイトではない。"
6166
6167 #. type: Plain text
6168 #: build/C/man2/mmap2.2:98
6169 msgid ""
6170 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6171 msgstr ""
6172 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6173
6174 #. type: TH
6175 #: build/C/man2/mprotect.2:38
6176 #, no-wrap
6177 msgid "MPROTECT"
6178 msgstr "MPROTECT"
6179
6180 #. type: TH
6181 #: build/C/man2/mprotect.2:38
6182 #, no-wrap
6183 msgid "2012-08-14"
6184 msgstr "2012-08-14"
6185
6186 #. type: Plain text
6187 #: build/C/man2/mprotect.2:41
6188 msgid "mprotect - set protection on a region of memory"
6189 msgstr "mprotect - メモリ領域の保護を設定する"
6190
6191 #. type: Plain text
6192 #: build/C/man2/mprotect.2:46
6193 #, no-wrap
6194 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6195 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6196
6197 #. type: Plain text
6198 #: build/C/man2/mprotect.2:54
6199 msgid ""
6200 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6201 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6202 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6203 msgstr ""
6204 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6205 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6206 "界に一致していなければならない。"
6207
6208 #. type: Plain text
6209 #: build/C/man2/mprotect.2:59
6210 msgid ""
6211 "If the calling process tries to access memory in a manner that violates the "
6212 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6213 msgstr ""
6214 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6215 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6216
6217 #. type: Plain text
6218 #: build/C/man2/mprotect.2:64
6219 msgid ""
6220 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6221 "following list:"
6222 msgstr ""
6223 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6224 "毎の論理和 (bitwize-or) で指定する:"
6225
6226 #. type: Plain text
6227 #: build/C/man2/mprotect.2:67
6228 msgid "The memory cannot be accessed at all."
6229 msgstr "そのメモリには全くアクセスできない。"
6230
6231 #. type: Plain text
6232 #: build/C/man2/mprotect.2:70
6233 msgid "The memory can be read."
6234 msgstr "そのメモリを読み取ることができる。"
6235
6236 #. type: Plain text
6237 #: build/C/man2/mprotect.2:73
6238 msgid "The memory can be modified."
6239 msgstr "そのメモリを変更できる。"
6240
6241 #.  FIXME
6242 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6243 #. type: Plain text
6244 #: build/C/man2/mprotect.2:78
6245 msgid "The memory can be executed."
6246 msgstr "そのメモリは実行可能である。"
6247
6248 #. type: Plain text
6249 #: build/C/man2/mprotect.2:85
6250 msgid ""
6251 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6252 "I<errno> is set appropriately."
6253 msgstr ""
6254 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6255 "I<errno> が適切に設定される。"
6256
6257 #. type: Plain text
6258 #: build/C/man2/mprotect.2:95
6259 msgid ""
6260 "The memory cannot be given the specified access.  This can happen, for "
6261 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6262 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6263 msgstr ""
6264 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6265 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6266 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6267
6268 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6269 #. type: Plain text
6270 #: build/C/man2/mprotect.2:100
6271 msgid ""
6272 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6273 msgstr ""
6274 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6275
6276 #. type: Plain text
6277 #: build/C/man2/mprotect.2:103
6278 msgid "Internal kernel structures could not be allocated."
6279 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6280
6281 #. type: Plain text
6282 #: build/C/man2/mprotect.2:113
6283 msgid ""
6284 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6285 "address space of the process, or specify one or more pages that are not "
6286 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6287 "for these cases.)"
6288 msgstr ""
6289 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6290 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6291 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6292 "成されていた)。"
6293
6294 #.  SVr4 defines an additional error
6295 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6296 #. type: Plain text
6297 #: build/C/man2/mprotect.2:122
6298 msgid ""
6299 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6300 "unspecified if it is applied to a region of memory that was not obtained via "
6301 "B<mmap>(2)."
6302 msgstr ""
6303 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6304 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6305 "されている。"
6306
6307 #. type: Plain text
6308 #: build/C/man2/mprotect.2:129
6309 msgid ""
6310 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6311 "process's address space (except for the kernel vsyscall area).  In "
6312 "particular it can be used to change existing code mappings to be writable."
6313 msgstr ""
6314 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6315 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6316 "マッピングを書き込み可能にするために使われる。"
6317
6318 #. type: Plain text
6319 #: build/C/man2/mprotect.2:139
6320 msgid ""
6321 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6322 "architecture- and kernel version-dependent.  On some hardware architectures "
6323 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6324 msgstr ""
6325 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6326 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6327 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6328
6329 #. type: Plain text
6330 #: build/C/man2/mprotect.2:148
6331 msgid ""
6332 "POSIX.1-2001 says that an implementation may permit access other than that "
6333 "specified in I<prot>, but at a minimum can allow write access only if "
6334 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6335 "has been set."
6336 msgstr ""
6337 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6338 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6339 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6340 "ない点だけは 満たす必要がある。"
6341
6342 #. type: Plain text
6343 #: build/C/man2/mprotect.2:154
6344 msgid ""
6345 "The program below allocates four pages of memory, makes the third of these "
6346 "pages read-only, and then executes a loop that walks upward through the "
6347 "allocated region modifying bytes."
6348 msgstr ""
6349 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6350 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6351 "かって順番にバイト値を変更するループを実行する。"
6352
6353 #. type: Plain text
6354 #: build/C/man2/mprotect.2:157
6355 msgid ""
6356 "An example of what we might see when running the program is the following:"
6357 msgstr "プログラムを実行した場合の一例を以下に示す。"
6358
6359 #. type: Plain text
6360 #: build/C/man2/mprotect.2:163
6361 #, no-wrap
6362 msgid ""
6363 "$B< ./a.out>\n"
6364 "Start of region:        0x804c000\n"
6365 "Got SIGSEGV at address: 0x804e000\n"
6366 msgstr ""
6367 "$B< ./a.out>\n"
6368 "Start of region:        0x804c000\n"
6369 "Got SIGSEGV at address: 0x804e000\n"
6370
6371 #. type: Plain text
6372 #: build/C/man2/mprotect.2:175
6373 #, no-wrap
6374 msgid ""
6375 "#include E<lt>unistd.hE<gt>\n"
6376 "#include E<lt>signal.hE<gt>\n"
6377 "#include E<lt>stdio.hE<gt>\n"
6378 "#include E<lt>malloc.hE<gt>\n"
6379 "#include E<lt>stdlib.hE<gt>\n"
6380 "#include E<lt>errno.hE<gt>\n"
6381 "#include E<lt>sys/mman.hE<gt>\n"
6382 msgstr ""
6383 "#include E<lt>unistd.hE<gt>\n"
6384 "#include E<lt>signal.hE<gt>\n"
6385 "#include E<lt>stdio.hE<gt>\n"
6386 "#include E<lt>malloc.hE<gt>\n"
6387 "#include E<lt>stdlib.hE<gt>\n"
6388 "#include E<lt>errno.hE<gt>\n"
6389 "#include E<lt>sys/mman.hE<gt>\n"
6390
6391 #. type: Plain text
6392 #: build/C/man2/mprotect.2:180
6393 #, no-wrap
6394 msgid "char *buffer;\n"
6395 msgstr "char *buffer;\n"
6396
6397 #. type: Plain text
6398 #: build/C/man2/mprotect.2:188
6399 #, no-wrap
6400 msgid ""
6401 "static void\n"
6402 "handler(int sig, siginfo_t *si, void *unused)\n"
6403 "{\n"
6404 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6405 "            (long) si-E<gt>si_addr);\n"
6406 "    exit(EXIT_FAILURE);\n"
6407 "}\n"
6408 msgstr ""
6409 "static void\n"
6410 "handler(int sig, siginfo_t *si, void *unused)\n"
6411 "{\n"
6412 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6413 "            (long) si-E<gt>si_addr);\n"
6414 "    exit(EXIT_FAILURE);\n"
6415 "}\n"
6416
6417 #. type: Plain text
6418 #: build/C/man2/mprotect.2:195
6419 #, no-wrap
6420 msgid ""
6421 "int\n"
6422 "main(int argc, char *argv[])\n"
6423 "{\n"
6424 "    char *p;\n"
6425 "    int pagesize;\n"
6426 "    struct sigaction sa;\n"
6427 msgstr ""
6428 "int\n"
6429 "main(void)\n"
6430 "{\n"
6431 "    char *p;\n"
6432 "    int pagesize;\n"
6433 "    struct sigaction sa;\n"
6434
6435 #. type: Plain text
6436 #: build/C/man2/mprotect.2:201
6437 #, no-wrap
6438 msgid ""
6439 "    sa.sa_flags = SA_SIGINFO;\n"
6440 "    sigemptyset(&sa.sa_mask);\n"
6441 "    sa.sa_sigaction = handler;\n"
6442 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6443 "        handle_error(\"sigaction\");\n"
6444 msgstr ""
6445 "    sa.sa_flags = SA_SIGINFO;\n"
6446 "    sigemptyset(&sa.sa_mask);\n"
6447 "    sa.sa_sigaction = handler;\n"
6448 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6449 "        handle_error(\"sigaction\");\n"
6450
6451 #. type: Plain text
6452 #: build/C/man2/mprotect.2:205
6453 #, no-wrap
6454 msgid ""
6455 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6456 "    if (pagesize == -1)\n"
6457 "        handle_error(\"sysconf\");\n"
6458 msgstr ""
6459 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6460 "    if (pagesize == -1)\n"
6461 "        handle_error(\"sysconf\");\n"
6462
6463 #. type: Plain text
6464 #: build/C/man2/mprotect.2:208
6465 #, no-wrap
6466 msgid ""
6467 "    /* Allocate a buffer aligned on a page boundary;\n"
6468 "       initial protection is PROT_READ | PROT_WRITE */\n"
6469 msgstr ""
6470 "    /* Allocate a buffer aligned on a page boundary;\n"
6471 "       initial protection is PROT_READ | PROT_WRITE */\n"
6472
6473 #. type: Plain text
6474 #: build/C/man2/mprotect.2:212
6475 #, no-wrap
6476 msgid ""
6477 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6478 "    if (buffer == NULL)\n"
6479 "        handle_error(\"memalign\");\n"
6480 msgstr ""
6481 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6482 "    if (buffer == NULL)\n"
6483 "        handle_error(\"memalign\");\n"
6484
6485 #. type: Plain text
6486 #: build/C/man2/mprotect.2:214
6487 #, no-wrap
6488 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6489 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6490
6491 #. type: Plain text
6492 #: build/C/man2/mprotect.2:218
6493 #, no-wrap
6494 msgid ""
6495 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6496 "                PROT_READ) == -1)\n"
6497 "        handle_error(\"mprotect\");\n"
6498 msgstr ""
6499 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6500 "                PROT_READ) == -1)\n"
6501 "        handle_error(\"mprotect\");\n"
6502
6503 #. type: Plain text
6504 #: build/C/man2/mprotect.2:221
6505 #, no-wrap
6506 msgid ""
6507 "    for (p = buffer ; ; )\n"
6508 "        *(p++) = \\(aqa\\(aq;\n"
6509 msgstr ""
6510 "    for (p = buffer ; ; )\n"
6511 "        *(p++) = \\(aqa\\(aq;\n"
6512
6513 #. type: Plain text
6514 #: build/C/man2/mprotect.2:225
6515 #, no-wrap
6516 msgid ""
6517 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6518 "    exit(EXIT_SUCCESS);\n"
6519 "}\n"
6520 msgstr ""
6521 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6522 "    exit(EXIT_SUCCESS);\n"
6523 "}\n"
6524
6525 #. type: Plain text
6526 #: build/C/man2/mprotect.2:229
6527 msgid "B<mmap>(2), B<sysconf>(3)"
6528 msgstr "B<mmap>(2), B<sysconf>(3)"
6529
6530 #. type: TH
6531 #: build/C/man2/mremap.2:30
6532 #, no-wrap
6533 msgid "MREMAP"
6534 msgstr "MREMAP"
6535
6536 #. type: TH
6537 #: build/C/man2/mremap.2:30
6538 #, no-wrap
6539 msgid "2010-06-10"
6540 msgstr "2010-06-10"
6541
6542 #. type: Plain text
6543 #: build/C/man2/mremap.2:33
6544 msgid "mremap - remap a virtual memory address"
6545 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6546
6547 #. type: Plain text
6548 #: build/C/man2/mremap.2:36
6549 #, no-wrap
6550 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6551 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6552
6553 #. type: Plain text
6554 #: build/C/man2/mremap.2:41
6555 #, no-wrap
6556 msgid ""
6557 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6558 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6559 msgstr ""
6560 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6561 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6562
6563 #. type: Plain text
6564 #: build/C/man2/mremap.2:47
6565 msgid ""
6566 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6567 "moving it at the same time (controlled by the I<flags> argument and the "
6568 "available virtual address space)."
6569 msgstr ""
6570 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6571 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6572 "る)。"
6573
6574 #. type: Plain text
6575 #: build/C/man2/mremap.2:61
6576 msgid ""
6577 "I<old_address> is the old address of the virtual memory block that you want "
6578 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6579 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6580 "requested size of the virtual memory block after the resize.  An optional "
6581 "fifth argument, I<new_address>, may be provided; see the description of "
6582 "B<MREMAP_FIXED> below."
6583 msgstr ""
6584 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6585 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6586 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6587 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6588 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6589 "明を参照のこと。"
6590
6591 #. type: Plain text
6592 #: build/C/man2/mremap.2:73
6593 msgid ""
6594 "In Linux the memory is divided into pages.  A user process has (one or)  "
6595 "several linear virtual memory segments.  Each virtual memory segment has one "
6596 "or more mappings to real memory pages (in the page table).  Each virtual "
6597 "memory segment has its own protection (access rights), which may cause a "
6598 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6599 "to a read-only segment).  Accessing virtual memory outside of the segments "
6600 "will also cause a segmentation violation."
6601 msgstr ""
6602 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6603 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6604 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6605 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6606 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6607 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6608 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6609 "ン侵害が発生する。"
6610
6611 #. type: Plain text
6612 #: build/C/man2/mremap.2:81
6613 msgid ""
6614 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6615 "mapping between virtual addresses and memory pages.  This can be used to "
6616 "implement a very efficient B<realloc>(3)."
6617 msgstr ""
6618 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6619 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6620 "B<realloc>(3)  を実装するのに使用されている。"
6621
6622 #. type: Plain text
6623 #: build/C/man2/mremap.2:83
6624 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6625 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6626
6627 #. type: TP
6628 #: build/C/man2/mremap.2:83
6629 #, no-wrap
6630 msgid "B<MREMAP_MAYMOVE>"
6631 msgstr "B<MREMAP_MAYMOVE>"
6632
6633 #. type: Plain text
6634 #: build/C/man2/mremap.2:95
6635 msgid ""
6636 "By default, if there is not sufficient space to expand a mapping at its "
6637 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6638 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6639 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6640 "mapping location become invalid (offsets relative to the starting address of "
6641 "the mapping should be employed)."
6642 msgstr ""
6643 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6644 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6645 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6646 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6647 "レスからの相対オフセットは有効のままである)。"
6648
6649 #. type: TP
6650 #: build/C/man2/mremap.2:95
6651 #, no-wrap
6652 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6653 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6654
6655 #. type: Plain text
6656 #: build/C/man2/mremap.2:117
6657 msgid ""
6658 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6659 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
6660 "\\ *new_address>, which specifies a page-aligned address to which the "
6661 "mapping must be moved.  Any previous mapping at the address range specified "
6662 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6663 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6664 msgstr "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられる。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ *new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定する。 このアドレスはページ境界に合っていなければならない。 I<new_address> と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 そのマッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 B<MREMAP_MAYMOVE> も指定しなければならない。"
6665
6666 #. type: Plain text
6667 #: build/C/man2/mremap.2:127
6668 msgid ""
6669 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6670 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6671 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6672 "locked by the process may change."
6673 msgstr ""
6674 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6675 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6676 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6677 "の量は変化する。"
6678
6679 #. type: Plain text
6680 #: build/C/man2/mremap.2:135
6681 msgid ""
6682 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6683 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6684 "and I<errno> is set appropriately."
6685 msgstr ""
6686 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6687 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6688 "切に設定される。"
6689
6690 #. type: Plain text
6691 #: build/C/man2/mremap.2:142
6692 msgid ""
6693 "The caller tried to expand a memory segment that is locked, but this was not "
6694 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6695 msgstr ""
6696 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6697 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6698
6699 #. type: Plain text
6700 #: build/C/man2/mremap.2:151
6701 msgid ""
6702 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6703 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6704 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6705 "the whole address space requested, but those mappings are of different types."
6706 msgstr ""
6707 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6708 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6709 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6710 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6711 "を受け取るだろう。"
6712
6713 #. type: Plain text
6714 #: build/C/man2/mremap.2:179
6715 msgid ""
6716 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6717 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6718 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6719 "was invalid; or the new address range specified by I<new_address> and "
6720 "I<new_size> overlapped the old address range specified by I<old_address> and "
6721 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6722 "B<MREMAP_MAYMOVE>."
6723 msgstr ""
6724 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6725 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6726 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6727 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6728 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6729 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6730 "されていない。"
6731
6732 #. type: Plain text
6733 #: build/C/man2/mremap.2:185
6734 msgid ""
6735 "The memory area cannot be expanded at the current virtual address, and the "
6736 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6737 "(virtual) memory available."
6738 msgstr ""
6739 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6740 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6741
6742 #.  4.2BSD had a (never actually implemented)
6743 #.  .BR mremap (2)
6744 #.  call with completely different semantics.
6745 #. type: Plain text
6746 #: build/C/man2/mremap.2:191
6747 msgid ""
6748 "This call is Linux-specific, and should not be used in programs intended to "
6749 "be portable."
6750 msgstr ""
6751 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6752 "い。"
6753
6754 #. type: Plain text
6755 #: build/C/man2/mremap.2:199
6756 msgid ""
6757 "Prior to version 2.4, glibc did not expose the definition of "
6758 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6759 "I<new_address> argument."
6760 msgstr ""
6761 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6762 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6763
6764 #. type: Plain text
6765 #: build/C/man2/mremap.2:208
6766 msgid ""
6767 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6768 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6769 msgstr ""
6770 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6771 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6772
6773 #. type: Plain text
6774 #: build/C/man2/mremap.2:214
6775 msgid ""
6776 "Your favorite text book on operating systems for more information on paged "
6777 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6778 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6779 "Maurice J. Bach)"
6780 msgstr ""
6781 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6782 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6783 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6784 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6785
6786 #. type: TH
6787 #: build/C/man2/msync.2:25
6788 #, no-wrap
6789 msgid "MSYNC"
6790 msgstr "MSYNC"
6791
6792 #. type: TH
6793 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6794 #, no-wrap
6795 msgid "2008-04-22"
6796 msgstr "2008-04-22"
6797
6798 #. type: Plain text
6799 #: build/C/man2/msync.2:28
6800 msgid "msync - synchronize a file with a memory map"
6801 msgstr "msync - ファイルをマップしたメモリと同期させる"
6802
6803 #. type: Plain text
6804 #: build/C/man2/msync.2:32
6805 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6806 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6807
6808 #. type: Plain text
6809 #: build/C/man2/msync.2:48
6810 msgid ""
6811 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6812 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6813 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6814 "called.  To be more precise, the part of the file that corresponds to the "
6815 "memory area starting at I<addr> and having length I<length> is updated."
6816 msgstr ""
6817 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6818 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6819 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6820 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6821 "更新される。"
6822
6823 #. type: Plain text
6824 #: build/C/man2/msync.2:68
6825 msgid ""
6826 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6827 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6828 "specifies that an update be scheduled, but the call returns immediately.  "
6829 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6830 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6831 "they can be updated with the fresh values just written)."
6832 msgstr ""
6833 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6834 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6835 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6836 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6837 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6838 "に対する他のマッピングを無効にすることを要求する。"
6839
6840 #. type: Plain text
6841 #: build/C/man2/msync.2:73
6842 msgid ""
6843 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6844 "appropriately."
6845 msgstr ""
6846 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6847 "る。"
6848
6849 #. type: TP
6850 #: build/C/man2/msync.2:74
6851 #, no-wrap
6852 msgid "B<EBUSY>"
6853 msgstr "B<EBUSY>"
6854
6855 #. type: Plain text
6856 #: build/C/man2/msync.2:80
6857 msgid ""
6858 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6859 "specified address range."
6860 msgstr ""
6861 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6862 "存在する。"
6863
6864 #. type: Plain text
6865 #: build/C/man2/msync.2:93
6866 msgid ""
6867 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6868 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6869 "B<MS_ASYNC> are set in I<flags>."
6870 msgstr ""
6871 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6872 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6873 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6874
6875 #. type: Plain text
6876 #: build/C/man2/msync.2:96
6877 msgid "The indicated memory (or part of it) was not mapped."
6878 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6879
6880 #. type: Plain text
6881 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6882 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
6883 msgid "POSIX.1-2001."
6884 msgstr "POSIX.1-2001."
6885
6886 #. type: Plain text
6887 #: build/C/man2/msync.2:105
6888 msgid ""
6889 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6890 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6891 msgstr ""
6892 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6893 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6894
6895 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6896 #.  -1: unavailable, 0: ask using sysconf().
6897 #.  glibc defines them to 1.
6898 #. type: Plain text
6899 #: build/C/man2/msync.2:120
6900 msgid ""
6901 "On POSIX systems on which B<msync>()  is available, both "
6902 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6903 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6904 msgstr ""
6905 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6906 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6907 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6908
6909 #. type: TP
6910 #: build/C/man2/msync.2:122 build/C/man7/shm_overview.7:46
6911 #, no-wrap
6912 msgid "B<mmap>(2)"
6913 msgstr "B<mmap>(2)"
6914
6915 #. type: TH
6916 #: build/C/man3/mtrace.3:25
6917 #, no-wrap
6918 msgid "MTRACE"
6919 msgstr "MTRACE"
6920
6921 #. type: Plain text
6922 #: build/C/man3/mtrace.3:28
6923 msgid "mtrace, muntrace - malloc tracing"
6924 msgstr "mtrace, muntrace - malloc のトレース"
6925
6926 #. type: Plain text
6927 #: build/C/man3/mtrace.3:30
6928 msgid "B<#include E<lt>mcheck.hE<gt>>"
6929 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6930
6931 #. type: Plain text
6932 #: build/C/man3/mtrace.3:32
6933 msgid "B<void mtrace(void);>"
6934 msgstr "B<void mtrace(void);>"
6935
6936 #. type: Plain text
6937 #: build/C/man3/mtrace.3:34
6938 msgid "B<void muntrace(void);>"
6939 msgstr "B<void muntrace(void);>"
6940
6941 #. type: Plain text
6942 #: build/C/man3/mtrace.3:46
6943 msgid ""
6944 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6945 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6946 "hook functions record tracing information about memory allocation and "
6947 "deallocation.  The tracing information can be used to discover memory leaks "
6948 "and attempts to free nonallocated memory in a program."
6949 msgstr ""
6950
6951 #. type: Plain text
6952 #: build/C/man3/mtrace.3:57
6953 msgid ""
6954 "The B<muntrace>()  function disables the hook functions installed by "
6955 "B<mtrace>(), so that tracing information is no longer recorded for the "
6956 "memory-allocation functions.  If no hook functions were successfully "
6957 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6958 msgstr ""
6959
6960 #. type: Plain text
6961 #: build/C/man3/mtrace.3:65
6962 msgid ""
6963 "When B<mtrace>()  is called, it checks the value of the environment variable "
6964 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
6965 "tracing information is to be recorded.  If the pathname is successfully "
6966 "opened, it is truncated to zero length."
6967 msgstr ""
6968
6969 #. type: Plain text
6970 #: build/C/man3/mtrace.3:78
6971 msgid ""
6972 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6973 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6974 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6975 "ignored, and B<mtrace>()  has no effect."
6976 msgstr ""
6977
6978 #. type: Plain text
6979 #: build/C/man3/mtrace.3:86
6980 msgid ""
6981 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6982 "program, and B<muntrace>()  is never called."
6983 msgstr ""
6984
6985 #. type: Plain text
6986 #: build/C/man3/mtrace.3:96
6987 msgid ""
6988 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
6989 "designed to be human readable.  The GNU C library provides a Perl script, "
6990 "B<mtrace>(1), that interprets the trace log and produces human-readable "
6991 "output.  For best results, the traced program should be compiled with "
6992 "debugging enabled, so that line-number information is recorded in the "
6993 "executable."
6994 msgstr ""
6995
6996 #. type: Plain text
6997 #: build/C/man3/mtrace.3:102
6998 msgid ""
6999 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7000 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7001 msgstr ""
7002
7003 #. type: Plain text
7004 #: build/C/man3/mtrace.3:108
7005 msgid ""
7006 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7007 "the line number references may refer to the previous or following (non-"
7008 "blank)  line of the source code."
7009 msgstr ""
7010
7011 #. type: Plain text
7012 #: build/C/man3/mtrace.3:115
7013 msgid ""
7014 "The shell session below demonstrates the use of the B<mtrace>()  function "
7015 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7016 "different locations.  The demonstration uses the following program:"
7017 msgstr ""
7018
7019 #. type: Plain text
7020 #: build/C/man3/mtrace.3:122
7021 #, no-wrap
7022 msgid ""
7023 "$ B<cat t_mtrace.c>\n"
7024 "#include E<lt>mcheck.hE<gt>\n"
7025 "#include E<lt>stdlib.hE<gt>\n"
7026 "#include E<lt>stdio.hE<gt>\n"
7027 msgstr ""
7028 "$ B<cat t_mtrace.c>\n"
7029 "#include E<lt>mcheck.hE<gt>\n"
7030 "#include E<lt>stdlib.hE<gt>\n"
7031 "#include E<lt>stdio.hE<gt>\n"
7032
7033 #. type: Plain text
7034 #: build/C/man3/mtrace.3:127
7035 #, no-wrap
7036 msgid ""
7037 "int\n"
7038 "main(int argc, char *argv[])\n"
7039 "{\n"
7040 "    int j;\n"
7041 msgstr ""
7042 "int\n"
7043 "main(int argc, char *argv[])\n"
7044 "{\n"
7045 "    int j;\n"
7046
7047 #. type: Plain text
7048 #: build/C/man3/mtrace.3:129
7049 #, no-wrap
7050 msgid "    mtrace();\n"
7051 msgstr "    mtrace();\n"
7052
7053 #. type: Plain text
7054 #: build/C/man3/mtrace.3:132
7055 #, no-wrap
7056 msgid ""
7057 "    for (j = 0; j E<lt> 2; j++)\n"
7058 "        malloc(100);            /* Never freed--a memory leak */\n"
7059 msgstr ""
7060 "    for (j = 0; j E<lt> 2; j++)\n"
7061 "        malloc(100);            /* Never freed--a memory leak */\n"
7062
7063 #. type: Plain text
7064 #: build/C/man3/mtrace.3:136
7065 #, no-wrap
7066 msgid ""
7067 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7068 "    exit(EXIT_SUCCESS);\n"
7069 "}\n"
7070 msgstr ""
7071 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7072 "    exit(EXIT_SUCCESS);\n"
7073 "}\n"
7074
7075 #. type: Plain text
7076 #: build/C/man3/mtrace.3:142
7077 msgid ""
7078 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7079 "memory leaks at two different locations in the program:"
7080 msgstr ""
7081
7082 #. type: Plain text
7083 #: build/C/man3/mtrace.3:155
7084 #, no-wrap
7085 msgid ""
7086 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7087 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7088 "$ B<./t_mtrace>\n"
7089 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7090 "Memory not freed:\n"
7091 "-----------------\n"
7092 "   Address     Size     Caller\n"
7093 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7094 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7095 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7096 msgstr ""
7097 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7098 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7099 "$ B<./t_mtrace>\n"
7100 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7101 "Memory not freed:\n"
7102 "-----------------\n"
7103 "   Address     Size     Caller\n"
7104 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7105 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7106 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7107
7108 #. type: Plain text
7109 #: build/C/man3/mtrace.3:167
7110 msgid ""
7111 "The first two messages about unfreed memory correspond to the two B<malloc>"
7112 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7113 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7114 msgstr ""
7115
7116 #. type: Plain text
7117 #: build/C/man3/mtrace.3:172
7118 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7119 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7120
7121 #. type: TH
7122 #: build/C/man2/posix_fadvise.2:28
7123 #, no-wrap
7124 msgid "POSIX_FADVISE"
7125 msgstr "POSIX_FADVISE"
7126
7127 #. type: TH
7128 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
7129 #: build/C/man2/sync_file_range.2:30
7130 #, no-wrap
7131 msgid "2013-04-01"
7132 msgstr "2013-04-01"
7133
7134 #. type: Plain text
7135 #: build/C/man2/posix_fadvise.2:31
7136 msgid "posix_fadvise - predeclare an access pattern for file data"
7137 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7138
7139 #. type: Plain text
7140 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7141 #, no-wrap
7142 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7143 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7144
7145 #. type: Plain text
7146 #: build/C/man2/posix_fadvise.2:37
7147 #, no-wrap
7148 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7149 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7150
7151 #. type: Plain text
7152 #: build/C/man2/posix_fadvise.2:46
7153 msgid "B<posix_fadvise>():"
7154 msgstr "B<posix_fadvise>():"
7155
7156 #. type: Plain text
7157 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7158 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7159 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7160
7161 #. type: Plain text
7162 #: build/C/man2/posix_fadvise.2:56
7163 msgid ""
7164 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7165 "data in a specific pattern in the future, thus allowing the kernel to "
7166 "perform appropriate optimizations."
7167 msgstr ""
7168 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7169 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7170 "適化を実行することが可能になる。"
7171
7172 #. type: Plain text
7173 #: build/C/man2/posix_fadvise.2:63
7174 msgid ""
7175 "The I<advice> applies to a (not necessarily existent) region starting at "
7176 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7177 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7178 "binding; it merely constitutes an expectation on behalf of the application."
7179 msgstr ""
7180 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7181 "イ\n"
7182 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7183 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7184 "ケー\n"
7185 "ションのために可能性を構成するだけである。"
7186
7187 #. type: Plain text
7188 #: build/C/man2/posix_fadvise.2:65
7189 msgid "Permissible values for I<advice> include:"
7190 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7191
7192 #. type: TP
7193 #: build/C/man2/posix_fadvise.2:65
7194 #, no-wrap
7195 msgid "B<POSIX_FADV_NORMAL>"
7196 msgstr "B<POSIX_FADV_NORMAL>"
7197
7198 #. type: Plain text
7199 #: build/C/man2/posix_fadvise.2:71
7200 msgid ""
7201 "Indicates that the application has no advice to give about its access "
7202 "pattern for the specified data.  If no advice is given for an open file, "
7203 "this is the default assumption."
7204 msgstr ""
7205 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7206 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7207 "合、 これがデフォルトで仮定される。"
7208
7209 #. type: TP
7210 #: build/C/man2/posix_fadvise.2:71
7211 #, no-wrap
7212 msgid "B<POSIX_FADV_SEQUENTIAL>"
7213 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7214
7215 #. type: Plain text
7216 #: build/C/man2/posix_fadvise.2:75
7217 msgid ""
7218 "The application expects to access the specified data sequentially (with "
7219 "lower offsets read before higher ones)."
7220 msgstr ""
7221 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7222 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7223
7224 #. type: TP
7225 #: build/C/man2/posix_fadvise.2:75
7226 #, no-wrap
7227 msgid "B<POSIX_FADV_RANDOM>"
7228 msgstr "B<POSIX_FADV_RANDOM>"
7229
7230 #. type: Plain text
7231 #: build/C/man2/posix_fadvise.2:78
7232 msgid "The specified data will be accessed in random order."
7233 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7234
7235 #. type: TP
7236 #: build/C/man2/posix_fadvise.2:78
7237 #, no-wrap
7238 msgid "B<POSIX_FADV_NOREUSE>"
7239 msgstr "B<POSIX_FADV_NOREUSE>"
7240
7241 #. type: Plain text
7242 #: build/C/man2/posix_fadvise.2:81
7243 msgid "The specified data will be accessed only once."
7244 msgstr "指定されたデータは 1 度しかアクセスされない。"
7245
7246 #. type: TP
7247 #: build/C/man2/posix_fadvise.2:81
7248 #, no-wrap
7249 msgid "B<POSIX_FADV_WILLNEED>"
7250 msgstr "B<POSIX_FADV_WILLNEED>"
7251
7252 #. type: Plain text
7253 #: build/C/man2/posix_fadvise.2:84
7254 msgid "The specified data will be accessed in the near future."
7255 msgstr "指定されたデータは近い将来アクセスされる。"
7256
7257 #. type: TP
7258 #: build/C/man2/posix_fadvise.2:84
7259 #, no-wrap
7260 msgid "B<POSIX_FADV_DONTNEED>"
7261 msgstr "B<POSIX_FADV_DONTNEED>"
7262
7263 #. type: Plain text
7264 #: build/C/man2/posix_fadvise.2:87
7265 msgid "The specified data will not be accessed in the near future."
7266 msgstr "指定されたデータは近い将来アクセスされない。"
7267
7268 #. type: Plain text
7269 #: build/C/man2/posix_fadvise.2:90
7270 msgid "On success, zero is returned.  On error, an error number is returned."
7271 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7272
7273 #. type: Plain text
7274 #: build/C/man2/posix_fadvise.2:94
7275 msgid "The I<fd> argument was not a valid file descriptor."
7276 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7277
7278 #. type: Plain text
7279 #: build/C/man2/posix_fadvise.2:97
7280 msgid "An invalid value was specified for I<advice>."
7281 msgstr "無効な値が I<advice> に指定された。"
7282
7283 #. type: Plain text
7284 #: build/C/man2/posix_fadvise.2:104
7285 msgid ""
7286 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7287 "returns B<EINVAL> in this case.)"
7288 msgstr ""
7289 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7290 "合、Linux は実際には B<EINVAL> を返す)。"
7291
7292 #.  of fadvise64_64()
7293 #. type: Plain text
7294 #: build/C/man2/posix_fadvise.2:112
7295 msgid ""
7296 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7297 "called B<fadvise64>().  Library support has been provided since glibc "
7298 "version 2.2, via the wrapper function B<posix_fadvise>()."
7299 msgstr ""
7300 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7301 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7302 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7303 "ラッパー関数は B<posix_fadvise>() という名前である。"
7304
7305 #. type: Plain text
7306 #: build/C/man2/posix_fadvise.2:121
7307 msgid ""
7308 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7309 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7310 msgstr ""
7311 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7312 "I<off_t> に変更された点に注意すること。"
7313
7314 #. type: Plain text
7315 #: build/C/man2/posix_fadvise.2:127
7316 msgid ""
7317 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7318 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7319 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7320 "the entire file, not just the specified region (but other open file handles "
7321 "to the same file are unaffected)."
7322 msgstr ""
7323 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7324 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7325 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7326 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7327 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7328
7329 #. type: Plain text
7330 #: build/C/man2/posix_fadvise.2:134
7331 msgid ""
7332 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7333 "into the page cache.  The amount of data read may be decreased by the kernel "
7334 "depending on virtual memory load.  (A few megabytes will usually be fully "
7335 "satisfied, and more is rarely useful.)"
7336 msgstr ""
7337 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7338 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7339 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7340 "くてもめったに役に立たない)。"
7341
7342 #. type: Plain text
7343 #: build/C/man2/posix_fadvise.2:138
7344 msgid ""
7345 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7346 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7347 "flag is a no-op."
7348 msgstr ""
7349 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7350 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7351 "フラグは何も行わない。"
7352
7353 #. type: Plain text
7354 #: build/C/man2/posix_fadvise.2:146
7355 msgid ""
7356 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7357 "specified region.  This is useful, for example, while streaming large "
7358 "files.  A program may periodically request the kernel to free cached data "
7359 "that has already been used, so that more useful cached pages are not "
7360 "discarded instead."
7361 msgstr ""
7362 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7363 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7364 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7365 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7366 "されたページが、 代わりに破棄されることはない。"
7367
7368 #. type: Plain text
7369 #: build/C/man2/posix_fadvise.2:154
7370 msgid ""
7371 "Pages that have not yet been written out will be unaffected, so if the "
7372 "application wishes to guarantee that pages will be released, it should call "
7373 "B<fsync>(2)  or B<fdatasync>(2)  first."
7374 msgstr ""
7375 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7376 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7377 "B<fdatasync>(2)  を呼ぶべきである。"
7378
7379 #. type: SS
7380 #: build/C/man2/posix_fadvise.2:154
7381 #, no-wrap
7382 msgid "Architecture-specific variants"
7383 msgstr "アーキテクチャ固有の派生バージョン"
7384
7385 #. type: Plain text
7386 #: build/C/man2/posix_fadvise.2:171
7387 msgid ""
7388 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7389 "of registers (see B<syscall>(2)  for further detail).  On such "
7390 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7391 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7392 "and I<len> arguments.  Therefore, these architectures define a version of "
7393 "the system call that orders the arguments suitably, but otherwise is "
7394 "otherwise exactly the same as B<posix_fadvise>()."
7395 msgstr ""
7396 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7397 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7398 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7399 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7400 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7401 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7402
7403 #. type: Plain text
7404 #: build/C/man2/posix_fadvise.2:173
7405 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7406 msgstr ""
7407 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7408
7409 #. type: Plain text
7410 #: build/C/man2/posix_fadvise.2:178
7411 #, no-wrap
7412 msgid ""
7413 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7414 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7415 msgstr ""
7416 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7417 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7418
7419 #. type: Plain text
7420 #: build/C/man2/posix_fadvise.2:186
7421 msgid ""
7422 "These architecture-specific details are generally hidden from applications "
7423 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7424 "appropriate architecture-specific system call."
7425 msgstr ""
7426 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7427 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7428 "なアーキテクチャ固有のシステムコールが呼び出される。"
7429
7430 #. type: Plain text
7431 #: build/C/man2/posix_fadvise.2:191
7432 msgid ""
7433 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7434 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7435 "through to the end of the file\"."
7436 msgstr ""
7437 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7438 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7439 "いた。"
7440
7441 #.  FIXME . Write a posix_fadvise(3) page.
7442 #. type: Plain text
7443 #: build/C/man2/posix_fadvise.2:197
7444 msgid ""
7445 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7446 "B<posix_madvise>(3)"
7447 msgstr ""
7448 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7449 "B<posix_madvise>(3)"
7450
7451 #. type: TH
7452 #: build/C/man3/posix_fallocate.3:25
7453 #, no-wrap
7454 msgid "POSIX_FALLOCATE"
7455 msgstr "POSIX_FALLOCATE"
7456
7457 #. type: TH
7458 #: build/C/man3/posix_fallocate.3:25 build/C/man2/shmop.2:41
7459 #, no-wrap
7460 msgid "2013-02-12"
7461 msgstr "2013-02-12"
7462
7463 #. type: Plain text
7464 #: build/C/man3/posix_fallocate.3:28
7465 msgid "posix_fallocate - allocate file space"
7466 msgstr "posix_fallocate - ファイルのスペースを確保する"
7467
7468 #. type: Plain text
7469 #: build/C/man3/posix_fallocate.3:33
7470 #, no-wrap
7471 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7472 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7473
7474 #. type: Plain text
7475 #: build/C/man3/posix_fallocate.3:42
7476 msgid "B<posix_fallocate>():"
7477 msgstr "B<posix_fallocate>():"
7478
7479 #. type: Plain text
7480 #: build/C/man3/posix_fallocate.3:61
7481 msgid ""
7482 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7483 "the file referred to by the descriptor I<fd> for the bytes in the range "
7484 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7485 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7486 "range are guaranteed not to fail because of lack of disk space."
7487 msgstr ""
7488 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7489 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7490 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7491 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7492 "失敗しないことが保証される。"
7493
7494 #. type: Plain text
7495 #: build/C/man3/posix_fallocate.3:66
7496 msgid ""
7497 "If the size of the file is less than I<offset>+I<len>, then the file is "
7498 "increased to this size; otherwise the file size is left unchanged."
7499 msgstr ""
7500 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7501 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7502
7503 #. type: Plain text
7504 #: build/C/man3/posix_fallocate.3:72
7505 msgid ""
7506 "B<posix_fallocate>()  returns zero on success, or an error number on "
7507 "failure.  Note that I<errno> is not set."
7508 msgstr ""
7509 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7510 "す。 I<errno> が設定されない点に注意すること。"
7511
7512 #. type: Plain text
7513 #: build/C/man3/posix_fallocate.3:81
7514 msgid "I<offset+len> exceeds the maximum file size."
7515 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7516
7517 #. type: Plain text
7518 #: build/C/man3/posix_fallocate.3:91
7519 msgid "I<fd> does not refer to a regular file."
7520 msgstr "I<fd> が通常のファイルとして参照されていない。"
7521
7522 #. type: Plain text
7523 #: build/C/man3/posix_fallocate.3:100
7524 msgid "I<fd> refers to a pipe."
7525 msgstr "I<fd> がパイプを参照している。"
7526
7527 #. type: Plain text
7528 #: build/C/man3/posix_fallocate.3:103
7529 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7530 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7531
7532 #. type: Plain text
7533 #: build/C/man3/posix_fallocate.3:128
7534 msgid ""
7535 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7536 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7537 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7538 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7539 "zero."
7540 msgstr ""
7541 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7542 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7543 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7544 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7545 "る。"
7546
7547 #. type: Plain text
7548 #: build/C/man3/posix_fallocate.3:133
7549 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7550 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7551
7552 #. type: TH
7553 #: build/C/man3/posix_memalign.3:29
7554 #, no-wrap
7555 msgid "POSIX_MEMALIGN"
7556 msgstr "POSIX_MEMALIGN"
7557
7558 #. type: TH
7559 #: build/C/man3/posix_memalign.3:29
7560 #, no-wrap
7561 msgid "2012-03-23"
7562 msgstr "2012-03-23"
7563
7564 #. type: Plain text
7565 #: build/C/man3/posix_memalign.3:32
7566 msgid ""
7567 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7568 "memory"
7569 msgstr ""
7570 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7571 "されたメモリの割り当てを行う"
7572
7573 #. type: Plain text
7574 #: build/C/man3/posix_memalign.3:39
7575 #, no-wrap
7576 msgid ""
7577 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7578 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7579 "B<void *valloc(size_t >I<size>B<);>\n"
7580 msgstr ""
7581 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7582 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7583 "B<void *valloc(size_t >I<size>B<);>\n"
7584
7585 #. type: Plain text
7586 #: build/C/man3/posix_memalign.3:44
7587 #, no-wrap
7588 msgid ""
7589 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7590 "B<void *pvalloc(size_t >I<size>B<);>\n"
7591 msgstr ""
7592 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7593 "B<void *pvalloc(size_t >I<size>B<);>\n"
7594
7595 #. type: Plain text
7596 #: build/C/man3/posix_memalign.3:54
7597 msgid ""
7598 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7599 "E<gt>=\\ 600"
7600 msgstr ""
7601 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7602 "E<gt>=\\ 600"
7603
7604 #. type: Plain text
7605 #: build/C/man3/posix_memalign.3:57
7606 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7607 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7608
7609 #. type: Plain text
7610 #: build/C/man3/posix_memalign.3:59
7611 msgid "B<valloc>():"
7612 msgstr "B<valloc>():"
7613
7614 #. type: TP
7615 #: build/C/man3/posix_memalign.3:62
7616 #, no-wrap
7617 msgid "Since glibc 2.12:"
7618 msgstr "glibc 2.12 以降:"
7619
7620 #. type: Plain text
7621 #: build/C/man3/posix_memalign.3:69
7622 #, no-wrap
7623 msgid ""
7624 "_BSD_SOURCE ||\n"
7625 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7626 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7627 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7628 msgstr ""
7629 "_BSD_SOURCE ||\n"
7630 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7631 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7632 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7633
7634 #. type: TP
7635 #: build/C/man3/posix_memalign.3:71
7636 #, no-wrap
7637 msgid "Before glibc 2.12:"
7638 msgstr "glibc 2.12 より前:"
7639
7640 #. type: Plain text
7641 #: build/C/man3/posix_memalign.3:75
7642 msgid ""
7643 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7644 "_XOPEN_SOURCE_EXTENDED"
7645 msgstr ""
7646 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7647 "_XOPEN_SOURCE_EXTENDED"
7648
7649 #. type: Plain text
7650 #: build/C/man3/posix_memalign.3:82
7651 msgid ""
7652 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7653 "declaration of B<valloc>(); no feature test macros are required.)"
7654 msgstr ""
7655 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7656 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7657
7658 #.  glibc does this:
7659 #. type: Plain text
7660 #: build/C/man3/posix_memalign.3:103
7661 msgid ""
7662 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7663 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7664 "memory will be a multiple of I<alignment>, which must be a power of two and "
7665 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then B<posix_memalign>"
7666 "()  returns either NULL, or a unique pointer value that can later be "
7667 "successfully passed to B<free>(3)."
7668 msgstr "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられたメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレスは I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後で B<free>(3)  に問題なく渡すことができる。"
7669
7670 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7671 #.  but no standards govern this.
7672 #. type: Plain text
7673 #: build/C/man3/posix_memalign.3:114
7674 msgid ""
7675 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7676 "pointer to the allocated memory.  The memory address will be a multiple of "
7677 "I<alignment>, which must be a power of two."
7678 msgstr ""
7679 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7680 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7681 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7682
7683 #. type: Plain text
7684 #: build/C/man3/posix_memalign.3:123
7685 msgid ""
7686 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7687 "the added restriction that I<size> should be a multiple of I<alignment>."
7688 msgstr ""
7689 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7690 "I<alignment>\n"
7691 "の倍数でなければならないという追加の制限がある点が異なる。"
7692
7693 #. type: Plain text
7694 #: build/C/man3/posix_memalign.3:132
7695 msgid ""
7696 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7697 "pointer to the allocated memory.  The memory address will be a multiple of "
7698 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7699 msgstr ""
7700 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7701 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7702 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7703 "る。"
7704
7705 #. type: Plain text
7706 #: build/C/man3/posix_memalign.3:139
7707 msgid ""
7708 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7709 "the size of the allocation up to the next multiple of the system page size."
7710 msgstr ""
7711 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7712 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7713
7714 #. type: Plain text
7715 #: build/C/man3/posix_memalign.3:141
7716 msgid "For all of these functions, the memory is not zeroed."
7717 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7718
7719 #. type: Plain text
7720 #: build/C/man3/posix_memalign.3:148
7721 msgid ""
7722 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7723 "pointer to the allocated memory, or NULL if the request fails."
7724 msgstr ""
7725 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7726 "た\n"
7727 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7728
7729 #. type: Plain text
7730 #: build/C/man3/posix_memalign.3:155
7731 msgid ""
7732 "B<posix_memalign>()  returns zero on success, or one of the error values "
7733 "listed in the next section on failure.  Note that I<errno> is not set."
7734 msgstr ""
7735 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7736 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7737 "ること。"
7738
7739 #. type: Plain text
7740 #: build/C/man3/posix_memalign.3:162
7741 msgid ""
7742 "The I<alignment> argument was not a power of two, or was not a multiple of "
7743 "I<sizeof(void\\ *)>."
7744 msgstr "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でなかった。"
7745
7746 #. type: Plain text
7747 #: build/C/man3/posix_memalign.3:165
7748 msgid "There was insufficient memory to fulfill the allocation request."
7749 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7750
7751 #. type: Plain text
7752 #: build/C/man3/posix_memalign.3:172
7753 msgid ""
7754 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7755 "available in all Linux libc libraries."
7756 msgstr ""
7757 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7758 "すべての Linux libc ライブラリで使用可能である。"
7759
7760 #. type: Plain text
7761 #: build/C/man3/posix_memalign.3:176
7762 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7763 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7764
7765 #. type: Plain text
7766 #: build/C/man3/posix_memalign.3:180
7767 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7768 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7769
7770 #. type: Plain text
7771 #: build/C/man3/posix_memalign.3:187
7772 msgid ""
7773 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7774 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7775 "POSIX.1-2001."
7776 msgstr ""
7777 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7778 "り、\n"
7779 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7780
7781 #. type: Plain text
7782 #: build/C/man3/posix_memalign.3:191
7783 msgid "The function B<pvalloc>()  is a GNU extension."
7784 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7785
7786 #. type: Plain text
7787 #: build/C/man3/posix_memalign.3:195
7788 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7789 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7790
7791 #. type: Plain text
7792 #: build/C/man3/posix_memalign.3:199
7793 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7794 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7795
7796 #. type: Plain text
7797 #: build/C/man3/posix_memalign.3:204
7798 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7799 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7800
7801 #. type: SS
7802 #: build/C/man3/posix_memalign.3:204
7803 #, no-wrap
7804 msgid "Headers"
7805 msgstr "ヘッダ"
7806
7807 #. type: Plain text
7808 #: build/C/man3/posix_memalign.3:208
7809 msgid ""
7810 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7811 "hE<gt>>."
7812 msgstr ""
7813 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7814 "の意見が一致している。"
7815
7816 #. type: Plain text
7817 #: build/C/man3/posix_memalign.3:212
7818 msgid ""
7819 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7820 "of I<E<lt>malloc.hE<gt>>."
7821 msgstr ""
7822 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7823 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7824
7825 #. type: Plain text
7826 #: build/C/man3/posix_memalign.3:219
7827 msgid ""
7828 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7829 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7830 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7831 "above)."
7832 msgstr ""
7833 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7834 "libc4,5\n"
7835 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7836 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7837
7838 #. type: Plain text
7839 #: build/C/man3/posix_memalign.3:228
7840 msgid ""
7841 "On many systems there are alignment restrictions, for example, on buffers "
7842 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7843 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7844 "use B<posix_memalign>()  to satisfy this requirement."
7845 msgstr ""
7846 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7847 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7848 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7849 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7850 "と、この必要条件を満たすことができる。"
7851
7852 #. type: Plain text
7853 #: build/C/man3/posix_memalign.3:237
7854 msgid ""
7855 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7856 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7857 "is correct."
7858 msgstr ""
7859 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7860 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7861 "確認を行わないかもしれない。"
7862
7863 #.  Other systems allow passing the result of
7864 #.  .IR valloc ()
7865 #.  to
7866 #.  .IR free (3),
7867 #.  but not to
7868 #.  .IR realloc (3).
7869 #. type: Plain text
7870 #: build/C/man3/posix_memalign.3:265
7871 msgid ""
7872 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7873 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7874 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
7875 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
7876 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
7877 "implementation allows memory obtained from any of these functions to be "
7878 "reclaimed with B<free>(3)."
7879 msgstr ""
7880 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7881 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7882 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7883 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7884 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7885 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7886 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7887 "B<free>(3) で再利用することができる。"
7888
7889 #. type: Plain text
7890 #: build/C/man3/posix_memalign.3:270
7891 msgid ""
7892 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7893 "these functions are needed only if you require larger alignment values."
7894 msgstr ""
7895 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7896 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7897 "ト\n"
7898 "が必要な場合だけである。"
7899
7900 #. type: Plain text
7901 #: build/C/man3/posix_memalign.3:275
7902 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7903 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7904
7905 #. type: TH
7906 #: build/C/man2/readahead.2:28
7907 #, no-wrap
7908 msgid "READAHEAD"
7909 msgstr "READAHEAD"
7910
7911 #. type: Plain text
7912 #: build/C/man2/readahead.2:31
7913 msgid "readahead - perform file readahead into page cache"
7914 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7915
7916 #. type: Plain text
7917 #: build/C/man2/readahead.2:37
7918 #, no-wrap
7919 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7920 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7921
7922 #. type: Plain text
7923 #: build/C/man2/readahead.2:65
7924 msgid ""
7925 "B<readahead>()  populates the page cache with data from a file so that "
7926 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7927 "argument is a file descriptor identifying the file which is to be read.  The "
7928 "I<offset> argument specifies the starting point from which data is to be "
7929 "read and I<count> specifies the number of bytes to be read.  I/O is "
7930 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7931 "page boundary and bytes are read up to the next page boundary greater than "
7932 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7933 "of the file.  B<readahead>()  blocks until the specified data has been "
7934 "read.  The current file offset of the open file referred to by I<fd> is left "
7935 "unchanged."
7936 msgstr ""
7937 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7938 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7939 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7940 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7941 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7942 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7943 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7944 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7945 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7946 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7947 "更されない。"
7948
7949 #. type: Plain text
7950 #: build/C/man2/readahead.2:71
7951 msgid ""
7952 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7953 "I<errno> set to indicate the cause of the error."
7954 msgstr ""
7955 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7956 "ラーの原因を示す値を設定する。"
7957
7958 #. type: Plain text
7959 #: build/C/man2/readahead.2:76
7960 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7961 msgstr ""
7962 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7963 "ていない。"
7964
7965 #. type: Plain text
7966 #: build/C/man2/readahead.2:82
7967 msgid ""
7968 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
7969 msgstr ""
7970 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
7971 "ファイルであった。"
7972
7973 #. type: Plain text
7974 #: build/C/man2/readahead.2:87
7975 msgid ""
7976 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
7977 "been provided since version 2.3."
7978 msgstr ""
7979 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
7980 "は glibc バージョン 2.3 以降で行われている。"
7981
7982 #. type: Plain text
7983 #: build/C/man2/readahead.2:92
7984 msgid ""
7985 "The B<readahead>()  system call is Linux-specific, and its use should be "
7986 "avoided in portable applications."
7987 msgstr ""
7988 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
7989 "は 使用を避けるべきである。"
7990
7991 #. type: Plain text
7992 #: build/C/man2/readahead.2:97
7993 msgid ""
7994 "On some 32-bit architectures, the calling signature for this system call "
7995 "differs, for the reasons described in B<syscall>(2)."
7996 msgstr ""
7997 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
7998 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
7999
8000 #. type: Plain text
8001 #: build/C/man2/readahead.2:103
8002 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8003 msgstr ""
8004 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8005
8006 #. type: TH
8007 #: build/C/man2/remap_file_pages.2:28
8008 #, no-wrap
8009 msgid "REMAP_FILE_PAGES"
8010 msgstr "REMAP_FILE_PAGES"
8011
8012 #. type: Plain text
8013 #: build/C/man2/remap_file_pages.2:31
8014 msgid "remap_file_pages - create a nonlinear file mapping"
8015 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8016
8017 #. type: Plain text
8018 #: build/C/man2/remap_file_pages.2:35
8019 #, no-wrap
8020 msgid ""
8021 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8022 "B<#include E<lt>sys/mman.hE<gt>>\n"
8023 msgstr ""
8024 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8025 "B<#include E<lt>sys/mman.hE<gt>>\n"
8026
8027 #. type: Plain text
8028 #: build/C/man2/remap_file_pages.2:38
8029 #, no-wrap
8030 msgid ""
8031 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8032 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8033 msgstr ""
8034 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8035 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8036
8037 #. type: Plain text
8038 #: build/C/man2/remap_file_pages.2:51
8039 msgid ""
8040 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8041 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8042 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8043 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8044 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8045 "data structures."
8046 msgstr ""
8047 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8048 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8049 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8050 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8051 "域)  データ構造体を追加で作成する必要がないことである。"
8052
8053 #. type: Plain text
8054 #: build/C/man2/remap_file_pages.2:53
8055 msgid "To create a nonlinear mapping we perform the following steps:"
8056 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8057
8058 #. type: TP
8059 #: build/C/man2/remap_file_pages.2:53
8060 #, no-wrap
8061 msgid "1."
8062 msgstr "1."
8063
8064 #. type: Plain text
8065 #: build/C/man2/remap_file_pages.2:61
8066 msgid ""
8067 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8068 "mapping must be created with the B<MAP_SHARED> flag."
8069 msgstr ""
8070 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8071 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8072 "い。"
8073
8074 #. type: TP
8075 #: build/C/man2/remap_file_pages.2:61
8076 #, no-wrap
8077 msgid "2."
8078 msgstr "2."
8079
8080 #. type: Plain text
8081 #: build/C/man2/remap_file_pages.2:69
8082 msgid ""
8083 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8084 "correspondence between the pages of the mapping and the pages of the file.  "
8085 "It is possible to map the same page of a file into multiple locations within "
8086 "the mapped region."
8087 msgstr ""
8088 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8089 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8090 "所に マップすることが可能である。"
8091
8092 #. type: Plain text
8093 #: build/C/man2/remap_file_pages.2:80
8094 msgid ""
8095 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8096 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8097 "system page size; I<size> is the length of the region in bytes."
8098 msgstr ""
8099 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8100 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8101 "る。 I<size> は領域の長さであり、単位はバイトである。"
8102
8103 #. type: Plain text
8104 #: build/C/man2/remap_file_pages.2:98
8105 msgid ""
8106 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8107 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8108 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8109 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8110 "and I<size> will be placed."
8111 msgstr ""
8112 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8113 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8114 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8115 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8116 "レスを、 I<addr> によって指定することである。"
8117
8118 #.  This rounding is weird, and not consistent with the treatment of
8119 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8120 #.  MTK, 14 Sep 2005
8121 #. type: Plain text
8122 #: build/C/man2/remap_file_pages.2:112
8123 msgid ""
8124 "The values specified in I<addr> and I<size> should be multiples of the "
8125 "system page size.  If they are not, then the kernel rounds I<both> values "
8126 "I<down> to the nearest multiple of the page size."
8127 msgstr ""
8128 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8129 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8130 "「切り下げる」。"
8131
8132 #. type: Plain text
8133 #: build/C/man2/remap_file_pages.2:116
8134 msgid "The I<prot> argument must be specified as 0."
8135 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8136
8137 #. type: Plain text
8138 #: build/C/man2/remap_file_pages.2:124
8139 msgid ""
8140 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8141 "other than B<MAP_NONBLOCK> are ignored."
8142 msgstr ""
8143 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8144 "の全てのフラグは無視される。"
8145
8146 #. type: Plain text
8147 #: build/C/man2/remap_file_pages.2:131
8148 msgid ""
8149 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8150 "I<errno> is set appropriately."
8151 msgstr ""
8152 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8153 "れ、 I<errno> が適切に設定される。"
8154
8155 #. type: Plain text
8156 #: build/C/man2/remap_file_pages.2:139
8157 msgid ""
8158 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8159 "flag."
8160 msgstr ""
8161 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8162 "いない。"
8163
8164 #.  And possibly others from vma->vm_ops->populate()
8165 #. type: Plain text
8166 #: build/C/man2/remap_file_pages.2:148
8167 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8168 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8169
8170 #. type: Plain text
8171 #: build/C/man2/remap_file_pages.2:153
8172 msgid ""
8173 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8174 "support was added in version 2.3.3."
8175 msgstr ""
8176 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8177 "サポートは glibc バージョン 2.3.3 で追加された。"
8178
8179 #. type: Plain text
8180 #: build/C/man2/remap_file_pages.2:157
8181 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8182 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8183
8184 #. type: Plain text
8185 #: build/C/man2/remap_file_pages.2:164
8186 msgid ""
8187 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8188 "B<msync>(2)"
8189 msgstr ""
8190 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8191 "B<msync>(2)"
8192
8193 #. type: TH
8194 #: build/C/man3/shm_open.3:26
8195 #, no-wrap
8196 msgid "SHM_OPEN"
8197 msgstr "SHM_OPEN"
8198
8199 #. type: TH
8200 #: build/C/man3/shm_open.3:26
8201 #, no-wrap
8202 msgid "2009-02-25"
8203 msgstr "2009-02-25"
8204
8205 #. type: Plain text
8206 #: build/C/man3/shm_open.3:29
8207 msgid ""
8208 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8209 msgstr ""
8210 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8211 "う"
8212
8213 #. type: Plain text
8214 #: build/C/man3/shm_open.3:33
8215 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8216 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8217
8218 #. type: Plain text
8219 #: build/C/man3/shm_open.3:35
8220 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8221 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8222
8223 #. type: Plain text
8224 #: build/C/man3/shm_open.3:37
8225 msgid ""
8226 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8227 msgstr ""
8228 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8229
8230 #. type: Plain text
8231 #: build/C/man3/shm_open.3:39
8232 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8233 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8234
8235 #. type: Plain text
8236 #: build/C/man3/shm_open.3:41
8237 msgid "Link with I<-lrt>."
8238 msgstr "I<-lrt> でリンクする。"
8239
8240 #. type: Plain text
8241 #: build/C/man3/shm_open.3:53
8242 msgid ""
8243 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8244 "memory object.  A POSIX shared memory object is in effect a handle which can "
8245 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8246 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8247 "removing an object previously created by B<shm_open>()."
8248 msgstr ""
8249 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8250 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8251 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8252 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8253 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8254
8255 #.  glibc allows the initial slash to be omitted, and makes
8256 #.  multiple initial slashes equivalent to a single slash.
8257 #.  This differs from the implementation of POSIX message queues.
8258 #.  glibc allows subdirectory components in the name, in which
8259 #.  case the subdirectory must exist under /dev/shm, and allow the
8260 #.  required permissions if a user wants to create a shared memory
8261 #.  object in that subdirectory.
8262 #. type: Plain text
8263 #: build/C/man3/shm_open.3:74
8264 msgid ""
8265 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8266 "specifies the shared memory object to be created or opened.  For portable "
8267 "use, a shared memory object should be identified by a name of the form I</"
8268 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8269 "255) characters consisting of an initial slash, followed by one or more "
8270 "characters, none of which are slashes."
8271 msgstr ""
8272 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8273 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8274 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8275 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8276 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8277
8278 #. type: Plain text
8279 #: build/C/man3/shm_open.3:81
8280 msgid ""
8281 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8282 "or B<O_RDWR> and any of the other flags listed here:"
8283 msgstr ""
8284 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8285 "述べる他のフラグの論理和をとったもの を指定する。"
8286
8287 #. type: TP
8288 #: build/C/man3/shm_open.3:81
8289 #, no-wrap
8290 msgid "B<O_RDONLY>"
8291 msgstr "B<O_RDONLY>"
8292
8293 #. type: Plain text
8294 #: build/C/man3/shm_open.3:89
8295 msgid ""
8296 "Open the object for read access.  A shared memory object opened in this way "
8297 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8298 msgstr ""
8299 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8300 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8301 "B<mmap>(2)  することができる。"
8302
8303 #. type: TP
8304 #: build/C/man3/shm_open.3:89
8305 #, no-wrap
8306 msgid "B<O_RDWR>"
8307 msgstr "B<O_RDWR>"
8308
8309 #. type: Plain text
8310 #: build/C/man3/shm_open.3:92
8311 msgid "Open the object for read-write access."
8312 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8313
8314 #. type: TP
8315 #: build/C/man3/shm_open.3:92
8316 #, no-wrap
8317 msgid "B<O_CREAT>"
8318 msgstr "B<O_CREAT>"
8319
8320 #.  In truth it is actually the file system IDs on Linux, but these
8321 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8322 #. type: Plain text
8323 #: build/C/man3/shm_open.3:112
8324 msgid ""
8325 "Create the shared memory object if it does not exist.  The user and group "
8326 "ownership of the object are taken from the corresponding effective IDs of "
8327 "the calling process, and the object's permission bits are set according to "
8328 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8329 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8330 "A set of macro constants which can be used to define I<mode> is listed in "
8331 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8332 "including I<E<lt>sys/stat.hE<gt>>.)"
8333 msgstr ""
8334 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8335 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8336 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8337 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8338 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8339 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8340 "hE<gt>> のインクルードにより得られる)。"
8341
8342 #. type: Plain text
8343 #: build/C/man3/shm_open.3:118
8344 msgid ""
8345 "A new shared memory object initially has zero length\\(emthe size of the "
8346 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8347 "shared memory object are automatically initialized to 0."
8348 msgstr ""
8349 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8350 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8351 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8352
8353 #. type: TP
8354 #: build/C/man3/shm_open.3:118
8355 #, no-wrap
8356 msgid "B<O_EXCL>"
8357 msgstr "B<O_EXCL>"
8358
8359 #. type: Plain text
8360 #: build/C/man3/shm_open.3:127
8361 msgid ""
8362 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8363 "I<name> already exists, return an error.  The check for the existence of the "
8364 "object, and its creation if it does not exist, are performed atomically."
8365 msgstr ""
8366 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8367 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8368 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8369 "atomically)。"
8370
8371 #. type: TP
8372 #: build/C/man3/shm_open.3:127
8373 #, no-wrap
8374 msgid "B<O_TRUNC>"
8375 msgstr "B<O_TRUNC>"
8376
8377 #. type: Plain text
8378 #: build/C/man3/shm_open.3:130
8379 msgid "If the shared memory object already exists, truncate it to zero bytes."
8380 msgstr ""
8381 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8382 "切り詰める。"
8383
8384 #. type: Plain text
8385 #: build/C/man3/shm_open.3:133
8386 msgid ""
8387 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8388 "hE<gt>>."
8389 msgstr ""
8390 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8391
8392 #. type: Plain text
8393 #: build/C/man3/shm_open.3:144
8394 msgid ""
8395 "On successful completion B<shm_open>()  returns a new file descriptor "
8396 "referring to the shared memory object.  This file descriptor is guaranteed "
8397 "to be the lowest-numbered file descriptor not previously opened within the "
8398 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8399 "descriptor."
8400 msgstr ""
8401 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8402 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8403 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8404 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8405 "ファイル・ディスクリプタに設定される。"
8406
8407 #. type: Plain text
8408 #: build/C/man3/shm_open.3:153
8409 msgid ""
8410 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8411 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8412 "the file descriptor may be closed without affecting the memory mapping."
8413 msgstr ""
8414 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8415 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8416 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8417 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8418
8419 #. type: Plain text
8420 #: build/C/man3/shm_open.3:171
8421 msgid ""
8422 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8423 "shared memory object name, and, once all processes have unmapped the object, "
8424 "de-allocates and destroys the contents of the associated memory region.  "
8425 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8426 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8427 "case a new, distinct object is created)."
8428 msgstr ""
8429 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8430 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8431 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8432 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8433 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8434 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8435
8436 #. type: Plain text
8437 #: build/C/man3/shm_open.3:180
8438 msgid ""
8439 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8440 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8441 "or -1 on error."
8442 msgstr ""
8443 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8444 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8445 "を、エラーが起こった場合 -1 を返す。"
8446
8447 #. type: Plain text
8448 #: build/C/man3/shm_open.3:187
8449 msgid ""
8450 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8451 "which may appear in I<errno> include the following:"
8452 msgstr ""
8453 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8454 "される値は以下の通りである:"
8455
8456 #. type: Plain text
8457 #: build/C/man3/shm_open.3:192
8458 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8459 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8460
8461 #. type: Plain text
8462 #: build/C/man3/shm_open.3:202
8463 msgid ""
8464 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8465 "B<O_TRUNC> was specified and the caller does not have write permission on "
8466 "the object."
8467 msgstr ""
8468 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8469 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8470 "み権限が なかった。"
8471
8472 #. type: TP
8473 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:195
8474 #, no-wrap
8475 msgid "B<EEXIST>"
8476 msgstr "B<EEXIST>"
8477
8478 #. type: Plain text
8479 #: build/C/man3/shm_open.3:213
8480 msgid ""
8481 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8482 "shared memory object specified by I<name> already exists."
8483 msgstr ""
8484 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8485 "定された共有メモリ・オブジェクトが既に存在した。"
8486
8487 #. type: Plain text
8488 #: build/C/man3/shm_open.3:220
8489 msgid "The I<name> argument to B<shm_open>()  was invalid."
8490 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8491
8492 #. type: TP
8493 #: build/C/man3/shm_open.3:220
8494 #, no-wrap
8495 msgid "B<EMFILE>"
8496 msgstr "B<EMFILE>"
8497
8498 #. type: Plain text
8499 #: build/C/man3/shm_open.3:223
8500 msgid "The process already has the maximum number of files open."
8501 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8502
8503 #. type: TP
8504 #: build/C/man3/shm_open.3:223
8505 #, no-wrap
8506 msgid "B<ENAMETOOLONG>"
8507 msgstr "B<ENAMETOOLONG>"
8508
8509 #. type: Plain text
8510 #: build/C/man3/shm_open.3:229
8511 msgid "The length of I<name> exceeds B<PATH_MAX>."
8512 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8513
8514 #. type: Plain text
8515 #: build/C/man3/shm_open.3:233
8516 msgid ""
8517 "The limit on the total number of files open on the system has been reached."
8518 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8519
8520 #. type: TP
8521 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8522 #: build/C/man2/shmget.2:209
8523 #, no-wrap
8524 msgid "B<ENOENT>"
8525 msgstr "B<ENOENT>"
8526
8527 #. type: Plain text
8528 #: build/C/man3/shm_open.3:242
8529 msgid ""
8530 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8531 "B<O_CREAT> was not specified."
8532 msgstr ""
8533 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8534 "B<O_CREAT> が指定されていなかった。"
8535
8536 #. type: Plain text
8537 #: build/C/man3/shm_open.3:249
8538 msgid ""
8539 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8540 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8541
8542 #. type: Plain text
8543 #: build/C/man3/shm_open.3:251
8544 msgid "These functions are provided in glibc 2.2 and later."
8545 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8546
8547 #. type: Plain text
8548 #: build/C/man3/shm_open.3:257
8549 msgid ""
8550 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8551 "object is set to either the calling process's effective group ID or \"a "
8552 "system default group ID\"."
8553 msgstr ""
8554 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8555 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8556 "ID」 のどちらかに設定される、と書かれている。"
8557
8558 #. type: Plain text
8559 #: build/C/man3/shm_open.3:266
8560 msgid ""
8561 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8562 "unspecified.  On Linux, this will successfully truncate an existing shared "
8563 "memory object\\(emthis may not be so on other UNIX systems."
8564 msgstr ""
8565 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8566 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8567 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8568
8569 #. type: Plain text
8570 #: build/C/man3/shm_open.3:271
8571 msgid ""
8572 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8573 "dedicated file system, which is normally mounted under I</dev/shm>."
8574 msgstr ""
8575 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8576 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8577
8578 #. type: Plain text
8579 #: build/C/man3/shm_open.3:282
8580 msgid ""
8581 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8582 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8583 msgstr ""
8584 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8585 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8586
8587 #. type: TH
8588 #: build/C/man7/shm_overview.7:27
8589 #, no-wrap
8590 msgid "SHM_OVERVIEW"
8591 msgstr "SHM_OVERVIEW"
8592
8593 #. type: TH
8594 #: build/C/man7/shm_overview.7:27
8595 #, no-wrap
8596 msgid "2010-09-10"
8597 msgstr "2010-09-10"
8598
8599 #. type: Plain text
8600 #: build/C/man7/shm_overview.7:30
8601 msgid "shm_overview - overview of POSIX shared memory"
8602 msgstr "shm_overview - POSIX 共有メモリの概要"
8603
8604 #. type: Plain text
8605 #: build/C/man7/shm_overview.7:33
8606 msgid ""
8607 "The POSIX shared memory API allows processes to communicate information by "
8608 "sharing a region of memory."
8609 msgstr ""
8610 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8611 "情報をやり取りすることができる。"
8612
8613 #. type: Plain text
8614 #: build/C/man7/shm_overview.7:35
8615 msgid "The interfaces employed in the API are:"
8616 msgstr "この API では以下のインターフェースが採用されている。"
8617
8618 #. type: TP
8619 #: build/C/man7/shm_overview.7:35
8620 #, no-wrap
8621 msgid "B<shm_open>(3)"
8622 msgstr "B<shm_open>(3)"
8623
8624 #. type: Plain text
8625 #: build/C/man7/shm_overview.7:42
8626 msgid ""
8627 "Create and open a new object, or open an existing object.  This is analogous "
8628 "to B<open>(2).  The call returns a file descriptor for use by the other "
8629 "interfaces listed below."
8630 msgstr ""
8631 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8632 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8633 "る ファイルディスクリプタを返す。"
8634
8635 #. type: TP
8636 #: build/C/man7/shm_overview.7:42
8637 #, no-wrap
8638 msgid "B<ftruncate>(2)"
8639 msgstr "B<ftruncate>(2)"
8640
8641 #. type: Plain text
8642 #: build/C/man7/shm_overview.7:46
8643 msgid ""
8644 "Set the size of the shared memory object.  (A newly created shared memory "
8645 "object has a length of zero.)"
8646 msgstr "共有メモリオブジェクトの大きさを設定する。"
8647
8648 #. type: Plain text
8649 #: build/C/man7/shm_overview.7:50
8650 msgid ""
8651 "Map the shared memory object into the virtual address space of the calling "
8652 "process."
8653 msgstr ""
8654 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8655
8656 #. type: TP
8657 #: build/C/man7/shm_overview.7:50
8658 #, no-wrap
8659 msgid "B<munmap>(2)"
8660 msgstr "B<munmap>(2)"
8661
8662 #. type: Plain text
8663 #: build/C/man7/shm_overview.7:54
8664 msgid ""
8665 "Unmap the shared memory object from the virtual address space of the calling "
8666 "process."
8667 msgstr ""
8668 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8669 "る。"
8670
8671 #. type: TP
8672 #: build/C/man7/shm_overview.7:54
8673 #, no-wrap
8674 msgid "B<shm_unlink>(3)"
8675 msgstr "B<shm_unlink>(3)"
8676
8677 #. type: Plain text
8678 #: build/C/man7/shm_overview.7:57
8679 msgid "Remove a shared memory object name."
8680 msgstr "共有メモリオブジェクト名を削除する。"
8681
8682 #. type: TP
8683 #: build/C/man7/shm_overview.7:57
8684 #, no-wrap
8685 msgid "B<close>(2)"
8686 msgstr "B<close>(2)"
8687
8688 #. type: Plain text
8689 #: build/C/man7/shm_overview.7:62
8690 msgid ""
8691 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8692 "needed."
8693 msgstr ""
8694 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8695 "のファイルディスクリプタをクローズする。"
8696
8697 #. type: TP
8698 #: build/C/man7/shm_overview.7:62
8699 #, no-wrap
8700 msgid "B<fstat>(2)"
8701 msgstr "B<fstat>(2)"
8702
8703 #. type: Plain text
8704 #: build/C/man7/shm_overview.7:76
8705 msgid ""
8706 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8707 "the information returned by this call are the object's size (I<st_size>), "
8708 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8709 msgstr ""
8710 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8711 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8712 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8713
8714 #. type: TP
8715 #: build/C/man7/shm_overview.7:76
8716 #, no-wrap
8717 msgid "B<fchown>(2)"
8718 msgstr "B<fchown>(2)"
8719
8720 #. type: Plain text
8721 #: build/C/man7/shm_overview.7:79
8722 msgid "To change the ownership of a shared memory object."
8723 msgstr "共有メモリオブジェクトの所有権を変更する。"
8724
8725 #. type: TP
8726 #: build/C/man7/shm_overview.7:79
8727 #, no-wrap
8728 msgid "B<fchmod>(2)"
8729 msgstr "B<fchmod>(2)"
8730
8731 #. type: Plain text
8732 #: build/C/man7/shm_overview.7:82
8733 msgid "To change the permissions of a shared memory object."
8734 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8735
8736 #. type: SS
8737 #: build/C/man7/shm_overview.7:82
8738 #, no-wrap
8739 msgid "Versions"
8740 msgstr "Versions"
8741
8742 #. type: Plain text
8743 #: build/C/man7/shm_overview.7:84
8744 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8745 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8746
8747 #. type: SS
8748 #: build/C/man7/shm_overview.7:84
8749 #, no-wrap
8750 msgid "Persistence"
8751 msgstr "持続性"
8752
8753 #. type: Plain text
8754 #: build/C/man7/shm_overview.7:89
8755 msgid ""
8756 "POSIX shared memory objects have kernel persistence: a shared memory object "
8757 "will exist until the system is shut down, or until all processes have "
8758 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8759 msgstr ""
8760 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8761 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8762 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8763
8764 #. type: SS
8765 #: build/C/man7/shm_overview.7:89
8766 #, no-wrap
8767 msgid "Linking"
8768 msgstr "リンク"
8769
8770 #. type: Plain text
8771 #: build/C/man7/shm_overview.7:94
8772 msgid ""
8773 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8774 "to link against the real-time library, I<librt>."
8775 msgstr ""
8776 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8777 "タイムライブラリ I<librt> とリンクしなければならない。"
8778
8779 #. type: SS
8780 #: build/C/man7/shm_overview.7:94
8781 #, no-wrap
8782 msgid "Accessing shared memory objects via the file system"
8783 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8784
8785 #. type: Plain text
8786 #: build/C/man7/shm_overview.7:101
8787 msgid ""
8788 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8789 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8790 "supports the use of access control lists (ACLs)  to control the permissions "
8791 "of objects in the virtual file system."
8792 msgstr ""
8793 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8794 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8795 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8796 "スト (ACL; access control lists) を使うことができる。"
8797
8798 #. type: Plain text
8799 #: build/C/man7/shm_overview.7:106
8800 msgid ""
8801 "Typically, processes must synchronize their access to a shared memory "
8802 "object, using, for example, POSIX semaphores."
8803 msgstr ""
8804 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8805 "使ってプロセス間で同期をとらなければならない。"
8806
8807 #. type: Plain text
8808 #: build/C/man7/shm_overview.7:114
8809 msgid ""
8810 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8811 "memory API.  POSIX shared memory provides a simpler, and better designed "
8812 "interface; on the other hand POSIX shared memory is somewhat less widely "
8813 "available (especially on older systems) than System V shared memory."
8814 msgstr ""
8815 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8816 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8817 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8818 "システムが少ない (特に、古いシステムでは少ない)。"
8819
8820 #. type: Plain text
8821 #: build/C/man7/shm_overview.7:127
8822 msgid ""
8823 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8824 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8825 "B<shm_unlink>(3), B<sem_overview>(7)"
8826 msgstr ""
8827 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8828 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8829 "B<shm_unlink>(3), B<sem_overview>(7)"
8830
8831 #. type: TH
8832 #: build/C/man2/shmctl.2:45
8833 #, no-wrap
8834 msgid "SHMCTL"
8835 msgstr "SHMCTL"
8836
8837 #. type: TH
8838 #: build/C/man2/shmctl.2:45
8839 #, no-wrap
8840 msgid "2013-03-18"
8841 msgstr "2013-03-18"
8842
8843 #. type: Plain text
8844 #: build/C/man2/shmctl.2:48
8845 msgid "shmctl - System V shared memory control"
8846 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
8847
8848 #. type: Plain text
8849 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8850 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8851 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8852
8853 #. type: Plain text
8854 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8855 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8856 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8857
8858 #. type: Plain text
8859 #: build/C/man2/shmctl.2:55
8860 msgid ""
8861 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8862 msgstr ""
8863 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8864
8865 #. type: Plain text
8866 #: build/C/man2/shmctl.2:62
8867 msgid ""
8868 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8869 "System V shared memory segment whose identifier is given in I<shmid>."
8870 msgstr ""
8871 "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対し"
8872 "て I<cmd> で指示した制御命令を実行する。"
8873
8874 #. type: Plain text
8875 #: build/C/man2/shmctl.2:67
8876 msgid ""
8877 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8878 "I<E<lt>sys/shm.hE<gt>> as follows:"
8879 msgstr ""
8880 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8881 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8882
8883 #. type: Plain text
8884 #: build/C/man2/shmctl.2:81
8885 #, no-wrap
8886 msgid ""
8887 "struct shmid_ds {\n"
8888 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8889 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8890 "    time_t          shm_atime;   /* Last attach time */\n"
8891 "    time_t          shm_dtime;   /* Last detach time */\n"
8892 "    time_t          shm_ctime;   /* Last change time */\n"
8893 "    pid_t           shm_cpid;    /* PID of creator */\n"
8894 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8895 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8896 "    ...\n"
8897 "};\n"
8898 msgstr ""
8899 "struct shmid_ds {\n"
8900 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8901 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8902 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8903 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8904 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8905 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8906 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8907 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8908 "    ...\n"
8909 "};\n"
8910
8911 #. type: Plain text
8912 #: build/C/man2/shmctl.2:89
8913 msgid ""
8914 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8915 "settable using B<IPC_SET>):"
8916 msgstr ""
8917 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
8918 "B<IPC_SET> を使って設定可能である):"
8919
8920 #. type: Plain text
8921 #: build/C/man2/shmctl.2:102
8922 #, no-wrap
8923 msgid ""
8924 "struct ipc_perm {\n"
8925 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8926 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8927 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8928 "    uid_t          cuid;     /* Effective UID of creator */\n"
8929 "    gid_t          cgid;     /* Effective GID of creator */\n"
8930 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8931 "                                SHM_LOCKED flags */\n"
8932 "    unsigned short __seq;    /* Sequence number */\n"
8933 "};\n"
8934 msgstr ""
8935 "struct ipc_perm {\n"
8936 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8937 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8938 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8939 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8940 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8941 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8942 "                                SHM_LOCKED フラグ */\n"
8943 "    unsigned short __seq;    /* シーケンス番号 */\n"
8944 "};\n"
8945
8946 #. type: Plain text
8947 #: build/C/man2/shmctl.2:108
8948 msgid "Valid values for I<cmd> are:"
8949 msgstr "I<cmd> として有効な値は以下の通り:"
8950
8951 #. type: TP
8952 #: build/C/man2/shmctl.2:109
8953 #, no-wrap
8954 msgid "B<IPC_STAT>"
8955 msgstr "B<IPC_STAT>"
8956
8957 #. type: Plain text
8958 #: build/C/man2/shmctl.2:118
8959 msgid ""
8960 "Copy information from the kernel data structure associated with I<shmid> "
8961 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
8962 "read permission on the shared memory segment."
8963 msgstr ""
8964 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
8965 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
8966 "読み込み許可を持たなければならない。"
8967
8968 #. type: TP
8969 #: build/C/man2/shmctl.2:118
8970 #, no-wrap
8971 msgid "B<IPC_SET>"
8972 msgstr "B<IPC_SET>"
8973
8974 #. type: Plain text
8975 #: build/C/man2/shmctl.2:136
8976 msgid ""
8977 "Write the values of some members of the I<shmid_ds> structure pointed to by "
8978 "I<buf> to the kernel data structure associated with this shared memory "
8979 "segment, updating also its I<shm_ctime> member.  The following fields can be "
8980 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
8981 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
8982 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
8983 "memory segment, or the caller must be privileged."
8984 msgstr ""
8985 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
8986 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
8987 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
8988 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
8989 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
8990 "と一致するか、呼び出し元が特権を持たなければならない。"
8991
8992 #. type: TP
8993 #: build/C/man2/shmctl.2:136
8994 #, no-wrap
8995 msgid "B<IPC_RMID>"
8996 msgstr "B<IPC_RMID>"
8997
8998 #. type: Plain text
8999 #: build/C/man2/shmctl.2:153
9000 msgid ""
9001 "Mark the segment to be destroyed.  The segment will only actually be "
9002 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9003 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9004 "the owner or creator, or be privileged.  If a segment has been marked for "
9005 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
9006 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
9007 "be set."
9008 msgstr ""
9009 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9010 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9011 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
9012 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
9013 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
9014 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
9015
9016 #. type: Plain text
9017 #: build/C/man2/shmctl.2:156
9018 msgid ""
9019 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9020 "its pages that were faulted in will remain in memory or swap."
9021 msgstr ""
9022 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9023 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9024 "る。"
9025
9026 #. type: Plain text
9027 #: build/C/man2/shmctl.2:161
9028 msgid ""
9029 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9030 "(5)."
9031 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9032
9033 #. type: TP
9034 #: build/C/man2/shmctl.2:161
9035 #, no-wrap
9036 msgid "B<IPC_INFO> (Linux-specific)"
9037 msgstr "B<IPC_INFO> (Linux 固有)"
9038
9039 #. type: Plain text
9040 #: build/C/man2/shmctl.2:174
9041 msgid ""
9042 "Returns information about system-wide shared memory limits and parameters in "
9043 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9044 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9045 "B<_GNU_SOURCE> feature test macro is defined:"
9046 msgstr ""
9047 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9048 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9049 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9050 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9051
9052 #. type: Plain text
9053 #: build/C/man2/shmctl.2:188
9054 #, no-wrap
9055 msgid ""
9056 "struct  shminfo {\n"
9057 "    unsigned long shmmax; /* Maximum segment size */\n"
9058 "    unsigned long shmmin; /* Minimum segment size;\n"
9059 "                             always 1 */\n"
9060 "    unsigned long shmmni; /* Maximum number of segments */\n"
9061 "    unsigned long shmseg; /* Maximum number of segments\n"
9062 "                             that a process can attach;\n"
9063 "                             unused within kernel */\n"
9064 "    unsigned long shmall; /* Maximum number of pages of\n"
9065 "                             shared memory, system-wide */\n"
9066 "};\n"
9067 msgstr ""
9068 "struct  shminfo {\n"
9069 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9070 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9071 "                             常に 1 */\n"
9072 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9073 "    unsigned long shmseg; /* プロセスが付加できる\n"
9074 "                             セグメントの最大数。\n"
9075 "                             カーネル内では未使用 */\n"
9076 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9077 "                             システム全体での値 */\n"
9078 "};\n"
9079
9080 #. type: Plain text
9081 #: build/C/man2/shmctl.2:201
9082 msgid ""
9083 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9084 "files of the same name; see B<proc>(5)  for details."
9085 msgstr ""
9086 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9087 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9088
9089 #. type: TP
9090 #: build/C/man2/shmctl.2:201
9091 #, no-wrap
9092 msgid "B<SHM_INFO> (Linux-specific)"
9093 msgstr "B<SHM_INFO> (Linux 固有)"
9094
9095 #. type: Plain text
9096 #: build/C/man2/shmctl.2:212
9097 msgid ""
9098 "Returns a I<shm_info> structure whose fields contain information about "
9099 "system resources consumed by shared memory.  This structure is defined in "
9100 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9101 msgstr ""
9102 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9103 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9104 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9105
9106 #. type: Plain text
9107 #: build/C/man2/shmctl.2:229
9108 #, no-wrap
9109 msgid ""
9110 "struct shm_info {\n"
9111 "    int           used_ids; /* # of currently existing\n"
9112 "                               segments */\n"
9113 "    unsigned long shm_tot;  /* Total number of shared\n"
9114 "                               memory pages */\n"
9115 "    unsigned long shm_rss;  /* # of resident shared\n"
9116 "                               memory pages */\n"
9117 "    unsigned long shm_swp;  /* # of swapped shared\n"
9118 "                               memory pages */\n"
9119 "    unsigned long swap_attempts;\n"
9120 "                            /* Unused since Linux 2.4 */\n"
9121 "    unsigned long swap_successes;\n"
9122 "                            /* Unused since Linux 2.4 */\n"
9123 "};\n"
9124 msgstr ""
9125 "struct shm_info {\n"
9126 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9127 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9128 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9129 "                               いない) 共有メモリページ数 */\n"
9130 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9131 "                               ページ数 */\n"
9132 "    unsigned long swap_attempts;\n"
9133 "                            /* Linux 2.4 以降では未使用 */\n"
9134 "    unsigned long swap_successes;\n"
9135 "                            /* Linux 2.4 以降では未使用 */\n"
9136 "};\n"
9137
9138 #. type: TP
9139 #: build/C/man2/shmctl.2:231
9140 #, no-wrap
9141 msgid "B<SHM_STAT> (Linux-specific)"
9142 msgstr "B<SHM_STAT> (Linux 固有)"
9143
9144 #. type: Plain text
9145 #: build/C/man2/shmctl.2:242
9146 msgid ""
9147 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9148 "argument is not a segment identifier, but instead an index into the kernel's "
9149 "internal array that maintains information about all shared memory segments "
9150 "on the system."
9151 msgstr ""
9152 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9153 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9154 "管理するカーネルの内部配列へのインデックス である。"
9155
9156 #. type: Plain text
9157 #: build/C/man2/shmctl.2:245
9158 msgid ""
9159 "The caller can prevent or allow swapping of a shared memory segment with the "
9160 "following I<cmd> values:"
9161 msgstr ""
9162 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9163 "ワップされることを防止したり、許可したりできる:"
9164
9165 #. type: TP
9166 #: build/C/man2/shmctl.2:246
9167 #, no-wrap
9168 msgid "B<SHM_LOCK> (Linux-specific)"
9169 msgstr "B<SHM_LOCK> (Linux 固有)"
9170
9171 #. type: Plain text
9172 #: build/C/man2/shmctl.2:258
9173 msgid ""
9174 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9175 "pages that are required to be present after locking is enabled.  If a "
9176 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9177 "I<shm_perm.mode> field in the associated data structure retrieved by "
9178 "B<IPC_STAT> will be set."
9179 msgstr ""
9180 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9181 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9182 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9183 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9184 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9185
9186 #. type: TP
9187 #: build/C/man2/shmctl.2:258
9188 #, no-wrap
9189 msgid "B<SHM_UNLOCK> (Linux-specific)"
9190 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9191
9192 #. type: Plain text
9193 #: build/C/man2/shmctl.2:261
9194 msgid "Unlock the segment, allowing it to be swapped out."
9195 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9196
9197 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9198 #.  be applied to a segment, regardless of ownership of the segment.
9199 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9200 #.  in 2.6.10.  MTK, May 2005
9201 #. type: Plain text
9202 #: build/C/man2/shmctl.2:279
9203 msgid ""
9204 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9205 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9206 "these operations if its effective UID matches the owner or creator UID of "
9207 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9208 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9209 msgstr ""
9210 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9211 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9212 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9213 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9214 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9215 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9216
9217 #. type: Plain text
9218 #: build/C/man2/shmctl.2:297
9219 msgid ""
9220 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9221 "highest used entry in the kernel's internal array recording information "
9222 "about all shared memory segments.  (This information can be used with "
9223 "repeated B<SHM_STAT> operations to obtain information about all shared "
9224 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9225 "the identifier of the shared memory segment whose index was given in "
9226 "I<shmid>.  Other operations return 0 on success."
9227 msgstr ""
9228 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9229 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9230 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9231 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9232 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9233 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9234
9235 #. type: Plain text
9236 #: build/C/man2/shmctl.2:301
9237 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9238 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9239
9240 #. type: Plain text
9241 #: build/C/man2/shmctl.2:310
9242 msgid ""
9243 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9244 "read access for I<shmid>, and the calling process does not have the "
9245 "B<CAP_IPC_OWNER> capability."
9246 msgstr ""
9247 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9248 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9249 "ケーパビリティ (capability) を持っていない。"
9250
9251 #. type: Plain text
9252 #: build/C/man2/shmctl.2:321
9253 msgid ""
9254 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9255 "pointed to by I<buf> isn't accessible."
9256 msgstr ""
9257 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9258 "るアドレスにアクセスできない。"
9259
9260 #. type: TP
9261 #: build/C/man2/shmctl.2:321 build/C/man2/shmop.2:197
9262 #, no-wrap
9263 msgid "B<EIDRM>"
9264 msgstr "B<EIDRM>"
9265
9266 #. type: Plain text
9267 #: build/C/man2/shmctl.2:324 build/C/man2/shmop.2:200
9268 msgid "I<shmid> points to a removed identifier."
9269 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9270
9271 #. type: Plain text
9272 #: build/C/man2/shmctl.2:333
9273 msgid ""
9274 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9275 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9276 "to an array slot that is currently unused."
9277 msgstr ""
9278 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9279 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9280 "配列のスロットを参照していた。"
9281
9282 #. type: Plain text
9283 #: build/C/man2/shmctl.2:344
9284 msgid ""
9285 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9286 "be-locked segment would mean that the total bytes in locked shared memory "
9287 "segments would exceed the limit for the real user ID of the calling "
9288 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9289 "(see B<setrlimit>(2))."
9290 msgstr ""
9291 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9292 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9293 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9294 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9295
9296 #. type: Plain text
9297 #: build/C/man2/shmctl.2:349
9298 msgid ""
9299 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9300 "in the structure pointed to by I<buf>."
9301 msgstr ""
9302 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9303 "には大き過ぎる。"
9304
9305 #. type: Plain text
9306 #: build/C/man2/shmctl.2:361
9307 msgid ""
9308 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9309 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9310 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9311 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9312 msgstr ""
9313 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9314 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9315 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9316
9317 #. type: Plain text
9318 #: build/C/man2/shmctl.2:373
9319 msgid ""
9320 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9321 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9322 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9323 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9324 msgstr ""
9325 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9326 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9327 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9328 "が特権を持たない場合にも、このエラーが起こる。)"
9329
9330 #.  SVr4 documents an additional error condition EMFILE.
9331 #. type: Plain text
9332 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:235
9333 #: build/C/man2/shmop.2:234
9334 msgid "SVr4, POSIX.1-2001."
9335 msgstr "SVr4, POSIX.1-2001."
9336
9337 #.  Like Linux, the FreeBSD man pages still document
9338 #.  the inclusion of these header files.
9339 #. type: Plain text
9340 #: build/C/man2/shmctl.2:391 build/C/man2/shmget.2:251
9341 msgid ""
9342 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9343 "required on Linux or by any version of POSIX.  However, some old "
9344 "implementations required the inclusion of these header files, and the SVID "
9345 "also documented their inclusion.  Applications intended to be portable to "
9346 "such old systems may need to include these header files."
9347 msgstr ""
9348 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9349 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9350 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9351 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9352 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9353 "れない。"
9354
9355 #. type: Plain text
9356 #: build/C/man2/shmctl.2:402
9357 msgid ""
9358 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9359 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9360 "future these may modified or moved to a /proc file system interface."
9361 msgstr ""
9362 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9363 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9364 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9365
9366 #. type: Plain text
9367 #: build/C/man2/shmctl.2:410
9368 msgid ""
9369 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9370 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9371 "feature is not available on other UNIX implementations; portable "
9372 "applications should avoid relying on it."
9373 msgstr ""
9374 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9375 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9376 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9377 "プリケーションではこれに依存しないようにすべきである。"
9378
9379 #. type: Plain text
9380 #: build/C/man2/shmctl.2:423
9381 msgid ""
9382 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9383 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9384 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9385 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9386 msgstr ""
9387 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9388 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9389 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9390 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9391
9392 #. type: Plain text
9393 #: build/C/man2/shmctl.2:430
9394 msgid ""
9395 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9396 "B<svipc>(7)"
9397 msgstr ""
9398 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9399 "B<shm_overview>(7), B<svipc>(7)"
9400
9401 #. type: TH
9402 #: build/C/man2/shmget.2:38
9403 #, no-wrap
9404 msgid "SHMGET"
9405 msgstr "SHMGET"
9406
9407 #. type: Plain text
9408 #: build/C/man2/shmget.2:41
9409 msgid "shmget - allocates a System V shared memory segment"
9410 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9411
9412 #. type: Plain text
9413 #: build/C/man2/shmget.2:48
9414 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9415 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9416
9417 #. type: Plain text
9418 #: build/C/man2/shmget.2:72
9419 msgid ""
9420 "B<shmget>()  returns the identifier of the System V shared memory segment "
9421 "associated with the value of the argument I<key>.  A new shared memory "
9422 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9423 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9424 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9425 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9426 msgstr ""
9427 "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別"
9428 "子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共"
9429 "有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場"
9430 "合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメン"
9431 "トは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大き"
9432 "さとなる。"
9433
9434 #. type: Plain text
9435 #: build/C/man2/shmget.2:91
9436 msgid ""
9437 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9438 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9439 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9440 "| O_EXCL> for B<open>(2).)"
9441 msgstr ""
9442 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9443 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9444 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9445 "O_EXCL> を指定した場合の動作と同じである)。"
9446
9447 #. type: Plain text
9448 #: build/C/man2/shmget.2:95
9449 msgid "The value I<shmflg> is composed of:"
9450 msgstr "I<shmflg> は以下の内容から構成される:"
9451
9452 #. type: TP
9453 #: build/C/man2/shmget.2:95
9454 #, no-wrap
9455 msgid "B<IPC_CREAT>"
9456 msgstr "B<IPC_CREAT>"
9457
9458 #. type: Plain text
9459 #: build/C/man2/shmget.2:102
9460 msgid ""
9461 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9462 "find the segment associated with I<key> and check to see if the user has "
9463 "permission to access the segment."
9464 msgstr ""
9465 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9466 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9467 "可があるかどうかをチェックする。"
9468
9469 #. type: TP
9470 #: build/C/man2/shmget.2:102
9471 #, no-wrap
9472 msgid "B<IPC_EXCL>"
9473 msgstr "B<IPC_EXCL>"
9474
9475 #. type: Plain text
9476 #: build/C/man2/shmget.2:105
9477 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9478 msgstr ""
9479 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9480 "証する。"
9481
9482 #. type: TP
9483 #: build/C/man2/shmget.2:105
9484 #, no-wrap
9485 msgid "I<mode_flags>"
9486 msgstr "I<mode_flags>"
9487
9488 #. type: Plain text
9489 #: build/C/man2/shmget.2:115
9490 msgid ""
9491 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9492 "group, and world.  These bits have the same format, and the same meaning, as "
9493 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9494 "not used by the system."
9495 msgstr ""
9496 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9497 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9498 "ろ、システムは実行 (execute) 許可を参照しない。"
9499
9500 #. type: TP
9501 #: build/C/man2/shmget.2:115
9502 #, no-wrap
9503 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9504 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9505
9506 #. type: Plain text
9507 #: build/C/man2/shmget.2:121
9508 msgid ""
9509 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9510 "I<Documentation/vm/hugetlbpage.txt> for further information."
9511 msgstr ""
9512 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9513 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9514
9515 #. type: TP
9516 #: build/C/man2/shmget.2:121
9517 #, no-wrap
9518 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9519 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9520
9521 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9522 #.  specified.
9523 #. type: Plain text
9524 #: build/C/man2/shmget.2:140
9525 msgid ""
9526 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9527 "Do not reserve swap space for this segment.  When swap space is reserved, "
9528 "one has the guarantee that it is possible to modify the segment.  When swap "
9529 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9530 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9531 "overcommit_memory> in B<proc>(5)."
9532 msgstr ""
9533 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9534 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9535 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9536 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9537 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9538 "ルに関する議論も参照のこと。"
9539
9540 #. type: Plain text
9541 #: build/C/man2/shmget.2:148
9542 msgid ""
9543 "When a new shared memory segment is created, its contents are initialized to "
9544 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9545 "(2)), is initialized as follows:"
9546 msgstr ""
9547 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9548 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9549 "期化される。"
9550
9551 #. type: Plain text
9552 #: build/C/man2/shmget.2:153
9553 msgid ""
9554 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9555 "calling process."
9556 msgstr ""
9557 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9558 "ユーザーID を設定する。"
9559
9560 #. type: Plain text
9561 #: build/C/man2/shmget.2:158
9562 msgid ""
9563 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9564 "the calling process."
9565 msgstr ""
9566 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9567 "定する。"
9568
9569 #. type: Plain text
9570 #: build/C/man2/shmget.2:163
9571 msgid ""
9572 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9573 "significant 9 bit of I<shmflg>."
9574 msgstr ""
9575 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9576
9577 #. type: Plain text
9578 #: build/C/man2/shmget.2:167
9579 msgid "I<shm_segsz> is set to the value of I<size>."
9580 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9581
9582 #. type: Plain text
9583 #: build/C/man2/shmget.2:174
9584 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9585 msgstr ""
9586 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9587
9588 #. type: Plain text
9589 #: build/C/man2/shmget.2:177
9590 msgid "I<shm_ctime> is set to the current time."
9591 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9592
9593 #. type: Plain text
9594 #: build/C/man2/shmget.2:180
9595 msgid ""
9596 "If the shared memory segment already exists, the permissions are verified, "
9597 "and a check is made to see if it is marked for destruction."
9598 msgstr ""
9599 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9600 "(destruction) マークがつけられていないかのチェックが行われる。"
9601
9602 #. type: Plain text
9603 #: build/C/man2/shmget.2:185
9604 msgid ""
9605 "On success, a valid shared memory identifier is returned.  On errir, -1 is "
9606 "returned, and I<errno> is set to indicate the error."
9607 msgstr "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 -1 が返り、 I<error> にエラーを示す値が設定される。"
9608
9609 #. type: Plain text
9610 #: build/C/man2/shmget.2:189
9611 msgid "On failure, I<errno> is set to one of the following:"
9612 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9613
9614 #. type: Plain text
9615 #: build/C/man2/shmget.2:195
9616 msgid ""
9617 "The user does not have permission to access the shared memory segment, and "
9618 "does not have the B<CAP_IPC_OWNER> capability."
9619 msgstr ""
9620 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9621 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9622
9623 #. type: Plain text
9624 #: build/C/man2/shmget.2:199
9625 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9626 msgstr ""
9627 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9628
9629 #. type: Plain text
9630 #: build/C/man2/shmget.2:205
9631 msgid ""
9632 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9633 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9634 "existed, but I<size> is greater than the size of that segment."
9635 msgstr ""
9636 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9637 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9638 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9639 "在するセグメントの サイズよりも大きかった。"
9640
9641 #. type: Plain text
9642 #: build/C/man2/shmget.2:214
9643 msgid ""
9644 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9645 msgstr ""
9646 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9647 "いなかった。"
9648
9649 #. type: Plain text
9650 #: build/C/man2/shmget.2:217
9651 msgid "No memory could be allocated for segment overhead."
9652 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9653
9654 #. type: Plain text
9655 #: build/C/man2/shmget.2:225
9656 msgid ""
9657 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9658 "segment of the requested I<size> would cause the system to exceed the system-"
9659 "wide limit on shared memory (B<SHMALL>)."
9660 msgstr ""
9661 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9662 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9663 "限 (B<SHMALL>)  を超過した。"
9664
9665 #. type: Plain text
9666 #: build/C/man2/shmget.2:232
9667 msgid ""
9668 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9669 "(did not have the B<CAP_IPC_LOCK> capability)."
9670 msgstr ""
9671 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9672 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9673
9674 #. type: Plain text
9675 #: build/C/man2/shmget.2:238
9676 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9677 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9678
9679 #. type: Plain text
9680 #: build/C/man2/shmget.2:261
9681 msgid ""
9682 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9683 "value is used for I<key>, the system call ignores everything but the least "
9684 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9685 "success)."
9686 msgstr ""
9687 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9688 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9689 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9690
9691 #. type: Plain text
9692 #: build/C/man2/shmget.2:265
9693 msgid ""
9694 "The following limits on shared memory segment resources affect the B<shmget>"
9695 "()  call:"
9696 msgstr ""
9697 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9698 "る:"
9699
9700 #. type: TP
9701 #: build/C/man2/shmget.2:265
9702 #, no-wrap
9703 msgid "B<SHMALL>"
9704 msgstr "B<SHMALL>"
9705
9706 #. type: Plain text
9707 #: build/C/man2/shmget.2:270
9708 msgid ""
9709 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9710 "and modified via I</proc/sys/kernel/shmall>)."
9711 msgstr ""
9712 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9713 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9714
9715 #. type: TP
9716 #: build/C/man2/shmget.2:270
9717 #, no-wrap
9718 msgid "B<SHMMAX>"
9719 msgstr "B<SHMMAX>"
9720
9721 #. type: Plain text
9722 #: build/C/man2/shmget.2:275
9723 msgid ""
9724 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9725 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9726 msgstr ""
9727 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9728 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9729
9730 #. type: TP
9731 #: build/C/man2/shmget.2:275
9732 #, no-wrap
9733 msgid "B<SHMMIN>"
9734 msgstr "B<SHMMIN>"
9735
9736 #. type: Plain text
9737 #: build/C/man2/shmget.2:281
9738 msgid ""
9739 "Minimum size in bytes for a shared memory segment: implementation dependent "
9740 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9741 msgstr ""
9742 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9743 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9744
9745 #. type: TP
9746 #: build/C/man2/shmget.2:281
9747 #, no-wrap
9748 msgid "B<SHMMNI>"
9749 msgstr "B<SHMMNI>"
9750
9751 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9752 #.  that we could create one more segment than SHMMNI -- MTK
9753 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9754 #. type: Plain text
9755 #: build/C/man2/shmget.2:290
9756 msgid ""
9757 "System wide maximum number of shared memory segments: implementation "
9758 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9759 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9760 msgstr ""
9761 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9762 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9763 "したり、変更したりできる)。"
9764
9765 #. type: Plain text
9766 #: build/C/man2/shmget.2:294
9767 msgid ""
9768 "The implementation has no specific limits for the per-process maximum number "
9769 "of shared memory segments (B<SHMSEG>)."
9770 msgstr ""
9771 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9772 "上の制限はない。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmget.2:300
9776 msgid ""
9777 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9778 "shared memory segment scheduled for deletion."
9779 msgstr ""
9780 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9781 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9782
9783 #. type: Plain text
9784 #: build/C/man2/shmget.2:306
9785 msgid ""
9786 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9787 "more clearly show its function."
9788 msgstr ""
9789 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9790 "より明確にその機能を表しているだろう。"
9791
9792 #. type: Plain text
9793 #: build/C/man2/shmget.2:314
9794 msgid ""
9795 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9796 "B<shm_overview>(7), B<svipc>(7)"
9797 msgstr ""
9798 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9799 "B<shm_overview>(7), B<svipc>(7)"
9800
9801 #. type: TH
9802 #: build/C/man2/shmop.2:41
9803 #, no-wrap
9804 msgid "SHMOP"
9805 msgstr "SHMOP"
9806
9807 #. type: Plain text
9808 #: build/C/man2/shmop.2:44
9809 msgid "shmat, shmdt - System V shared memory operations"
9810 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
9811
9812 #. type: Plain text
9813 #: build/C/man2/shmop.2:48
9814 #, no-wrap
9815 msgid ""
9816 "B<#include E<lt>sys/types.hE<gt>>\n"
9817 "B<#include E<lt>sys/shm.hE<gt>>\n"
9818 msgstr ""
9819 "B<#include E<lt>sys/types.hE<gt>>\n"
9820 "B<#include E<lt>sys/shm.hE<gt>>\n"
9821
9822 #. type: Plain text
9823 #: build/C/man2/shmop.2:50
9824 #, no-wrap
9825 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9826 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9827
9828 #. type: Plain text
9829 #: build/C/man2/shmop.2:52
9830 #, no-wrap
9831 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9832 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9833
9834 #. type: Plain text
9835 #: build/C/man2/shmop.2:61
9836 msgid ""
9837 "B<shmat>()  attaches the System V shared memory segment identified by "
9838 "I<shmid> to the address space of the calling process.  The attaching address "
9839 "is specified by I<shmaddr> with one of the following criteria:"
9840 msgstr ""
9841 "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared "
9842 "memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付"
9843 "加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9844
9845 #. type: Plain text
9846 #: build/C/man2/shmop.2:67
9847 msgid ""
9848 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9849 "which to attach the segment."
9850 msgstr ""
9851 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9852 "されていない) アドレスを選択する。"
9853
9854 #. type: Plain text
9855 #: build/C/man2/shmop.2:82
9856 msgid ""
9857 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9858 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9859 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9860 "at which the attach occurs."
9861 msgstr ""
9862 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9863 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9864 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9865 "を指している必要がある。"
9866
9867 #. type: Plain text
9868 #: build/C/man2/shmop.2:92
9869 msgid ""
9870 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9871 "reading and the process must have read permission for the segment.  "
9872 "Otherwise the segment is attached for read and write and the process must "
9873 "have read and write permission for the segment.  There is no notion of a "
9874 "write-only shared memory segment."
9875 msgstr ""
9876 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9877 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9878 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9879 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9880 "の共有メモリ・セグメントという概念は存在しない。"
9881
9882 #. type: Plain text
9883 #: build/C/man2/shmop.2:107
9884 msgid ""
9885 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9886 "indicate that the mapping of the segment should replace any existing mapping "
9887 "in the range starting at I<shmaddr> and continuing for the size of the "
9888 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9889 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9890 msgstr ""
9891 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9892 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9893 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9894 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9895 "場合は、 I<shmaddr> が NULL であってはならない。"
9896
9897 #. type: Plain text
9898 #: build/C/man2/shmop.2:114
9899 msgid ""
9900 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9901 "The segment will automatically be detached at process exit.  The same "
9902 "segment may be attached as a read and as a read-write one, and more than "
9903 "once, in the process's address space."
9904 msgstr ""
9905 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9906 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9907 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9908 "複数回付加することもできる。"
9909
9910 #. type: Plain text
9911 #: build/C/man2/shmop.2:122
9912 msgid ""
9913 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9914 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9915 "follows:"
9916 msgstr ""
9917 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9918 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9919
9920 #. type: Plain text
9921 #: build/C/man2/shmop.2:125
9922 msgid "I<shm_atime> is set to the current time."
9923 msgstr "I<shm_atime> には現在の時刻を設定する。"
9924
9925 #. type: Plain text
9926 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9927 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9928 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9929
9930 #. type: Plain text
9931 #: build/C/man2/shmop.2:131
9932 msgid "I<shm_nattch> is incremented by one."
9933 msgstr "I<shm_nattch> を 1 増加させる。"
9934
9935 #. type: Plain text
9936 #: build/C/man2/shmop.2:142
9937 msgid ""
9938 "B<shmdt>()  detaches the shared memory segment located at the address "
9939 "specified by I<shmaddr> from the address space of the calling process.  The "
9940 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9941 "the value returned by the attaching B<shmat>()  call."
9942 msgstr ""
9943 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9944 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9945 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9946 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9947 "ない。"
9948
9949 #. type: Plain text
9950 #: build/C/man2/shmop.2:148
9951 msgid ""
9952 "On a successful B<shmdt>()  call the system updates the members of the "
9953 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9954 msgstr ""
9955 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9956 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9957
9958 #. type: Plain text
9959 #: build/C/man2/shmop.2:151
9960 msgid "I<shm_dtime> is set to the current time."
9961 msgstr "I<shm_dtime> には現在の時刻が設定される。"
9962
9963 #. type: Plain text
9964 #: build/C/man2/shmop.2:159
9965 msgid ""
9966 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
9967 "marked for deletion, the segment is deleted."
9968 msgstr ""
9969 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
9970 "セグメントは削除される。"
9971
9972 #. type: Plain text
9973 #: build/C/man2/shmop.2:163
9974 msgid ""
9975 "After a B<fork>(2)  the child inherits the attached shared memory segments."
9976 msgstr ""
9977 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
9978
9979 #. type: Plain text
9980 #: build/C/man2/shmop.2:167
9981 msgid ""
9982 "After an B<execve>(2)  all attached shared memory segments are detached from "
9983 "the process."
9984 msgstr ""
9985 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
9986 "される。"
9987
9988 #. type: Plain text
9989 #: build/C/man2/shmop.2:171
9990 msgid ""
9991 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
9992 "process."
9993 msgstr ""
9994 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
9995 "離される。"
9996
9997 #. type: Plain text
9998 #: build/C/man2/shmop.2:179
9999 msgid ""
10000 "On success B<shmat>()  returns the address of the attached shared memory "
10001 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10002 "indicate the cause of the error."
10003 msgstr ""
10004 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10005 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10006 "値を設定する。"
10007
10008 #. type: Plain text
10009 #: build/C/man2/shmop.2:185
10010 msgid ""
10011 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10012 "set to indicate the cause of the error."
10013 msgstr ""
10014 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10015 "ラーの原因を示す値を設定する。"
10016
10017 #. type: Plain text
10018 #: build/C/man2/shmop.2:191
10019 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10020 msgstr ""
10021 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10022
10023 #. type: Plain text
10024 #: build/C/man2/shmop.2:197
10025 msgid ""
10026 "The calling process does not have the required permissions for the requested "
10027 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10028 msgstr ""
10029 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10030 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10031
10032 #. type: Plain text
10033 #: build/C/man2/shmop.2:214
10034 msgid ""
10035 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10036 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10037 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10038 msgstr ""
10039 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10040 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10041 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10042 "れているが、 I<shmaddr> が NULL であった。"
10043
10044 #. type: Plain text
10045 #: build/C/man2/shmop.2:217
10046 msgid "Could not allocate memory for the descriptor or for the page tables."
10047 msgstr ""
10048 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10049 "とができない。"
10050
10051 #. type: Plain text
10052 #: build/C/man2/shmop.2:223
10053 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10054 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10055
10056 #.  The following since 2.6.17-rc1:
10057 #. type: Plain text
10058 #: build/C/man2/shmop.2:231
10059 msgid ""
10060 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10061 "not aligned on a page boundary."
10062 msgstr ""
10063 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10064 "I<shmaddr> がページ境界に合っていない。"
10065
10066 #. type: Plain text
10067 #: build/C/man2/shmop.2:250
10068 msgid ""
10069 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10070 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10071 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10072 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10073 msgstr "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> であり、glibc2 のプロトタイプは I<void\\ *> である)。"
10074
10075 #. type: Plain text
10076 #: build/C/man2/shmop.2:262
10077 msgid ""
10078 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10079 "way of attaching a shared memory segment.  Be aware that the shared memory "
10080 "segment attached in this way may be attached at different addresses in "
10081 "different processes.  Therefore, any pointers maintained within the shared "
10082 "memory must be made relative (typically to the starting address of the "
10083 "segment), rather than absolute."
10084 msgstr ""
10085 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10086 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10087 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10088 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10089 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10090 "る。"
10091
10092 #. type: Plain text
10093 #: build/C/man2/shmop.2:267
10094 msgid ""
10095 "On Linux, it is possible to attach a shared memory segment even if it is "
10096 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10097 "behavior and many other implementations do not support it."
10098 msgstr ""
10099 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10100 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10101 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10102
10103 #. type: Plain text
10104 #: build/C/man2/shmop.2:270
10105 msgid "The following system parameter affects B<shmat>():"
10106 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10107
10108 #.  FIXME A good explanation of the rationale for the existence
10109 #.  of SHMLBA would be useful here
10110 #. type: TP
10111 #: build/C/man2/shmop.2:270
10112 #, no-wrap
10113 msgid "B<SHMLBA>"
10114 msgstr "B<SHMLBA>"
10115
10116 #.  FIXME That last sentence isn't true for all Linux
10117 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10118 #.  -- MTK, Nov 04
10119 #. type: Plain text
10120 #: build/C/man2/shmop.2:283
10121 msgid ""
10122 "Segment low boundary address multiple.  Must be page aligned.  For the "
10123 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10124 msgstr ""
10125 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10126 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10127
10128 #. type: Plain text
10129 #: build/C/man2/shmop.2:287
10130 msgid ""
10131 "The implementation places no intrinsic limit on the per-process maximum "
10132 "number of shared memory segments (B<SHMSEG>)."
10133 msgstr ""
10134 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10135 "関する実装依存の制限はない。"
10136
10137 #. type: Plain text
10138 #: build/C/man2/shmop.2:295
10139 msgid ""
10140 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10141 "B<shm_overview>(7), B<svipc>(7)"
10142 msgstr ""
10143 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10144 "B<shm_overview>(7), B<svipc>(7)"
10145
10146 #. type: TH
10147 #: build/C/man2/subpage_prot.2:30
10148 #, no-wrap
10149 msgid "SUBPAGE_PROT"
10150 msgstr "SUBPAGE_PROT"
10151
10152 #. type: TH
10153 #: build/C/man2/subpage_prot.2:30
10154 #, no-wrap
10155 msgid "2012-07-13"
10156 msgstr "2012-07-13"
10157
10158 #. type: Plain text
10159 #: build/C/man2/subpage_prot.2:33
10160 msgid "subpage_prot - define a subpage protection for an address range"
10161 msgstr ""
10162
10163 #. type: Plain text
10164 #: build/C/man2/subpage_prot.2:37
10165 #, no-wrap
10166 msgid ""
10167 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10168 "B<                  uint32_t *>I<map>B<);>\n"
10169 msgstr ""
10170 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10171 "B<                  uint32_t *>I<map>B<);>\n"
10172
10173 #. type: Plain text
10174 #: build/C/man2/subpage_prot.2:41
10175 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10176 msgstr ""
10177 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10178 "を参照。"
10179
10180 #. type: Plain text
10181 #: build/C/man2/subpage_prot.2:47
10182 msgid ""
10183 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10184 "control the access permissions on individual 4kB subpages on systems "
10185 "configured with a page size of 64kB."
10186 msgstr ""
10187
10188 #. type: Plain text
10189 #: build/C/man2/subpage_prot.2:54
10190 msgid ""
10191 "The protection map is applied to the memory pages in the region starting at "
10192 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10193 "aligned to a 64-kB boundary."
10194 msgstr ""
10195
10196 #. type: Plain text
10197 #: build/C/man2/subpage_prot.2:66
10198 msgid ""
10199 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10200 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10201 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10202 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10203 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10204 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10205 msgstr ""
10206
10207 #. type: Plain text
10208 #: build/C/man2/subpage_prot.2:71
10209 msgid ""
10210 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10211 "specified below is returned."
10212 msgstr ""
10213
10214 #. type: Plain text
10215 #: build/C/man2/subpage_prot.2:77
10216 msgid "The buffer referred to by I<map> is not accessible."
10217 msgstr ""
10218
10219 #. type: Plain text
10220 #: build/C/man2/subpage_prot.2:87
10221 msgid ""
10222 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10223 "be aligned to a multiple of the system page size, and they must not refer to "
10224 "a region outside of the address space of the process or to a region that "
10225 "consists of huge pages."
10226 msgstr ""
10227
10228 #. type: Plain text
10229 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10230 msgid "Out of memory."
10231 msgstr "メモリ不足である。"
10232
10233 #. type: Plain text
10234 #: build/C/man2/subpage_prot.2:96
10235 msgid ""
10236 "This system call is provided on the PowerPC architecture since Linux "
10237 "2.6.25.  The system call is provided only if the kernel is configured with "
10238 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10239 msgstr ""
10240
10241 #. type: Plain text
10242 #: build/C/man2/subpage_prot.2:101
10243 msgid ""
10244 "Glibc does not provide a wrapper for this system call; call it using "
10245 "B<syscall>(2)."
10246 msgstr ""
10247
10248 #. type: Plain text
10249 #: build/C/man2/subpage_prot.2:106
10250 msgid ""
10251 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10252 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10253 "field won't allow writes to a page that is otherwise write-protected."
10254 msgstr ""
10255
10256 #. type: SS
10257 #: build/C/man2/subpage_prot.2:106
10258 #, no-wrap
10259 msgid "Rationale"
10260 msgstr ""
10261
10262 #.  In the initial implementation, it was the case that:
10263 #.      In fact the whole process is switched to use 4k hardware pages when the
10264 #.      subpage_prot system call is used, but this could be improved in future
10265 #.      to switch only the affected segments.
10266 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10267 #.  the affected segment, not the whole process.
10268 #. type: Plain text
10269 #: build/C/man2/subpage_prot.2:128
10270 msgid ""
10271 "This system call is provided to assist writing emulators that operate using "
10272 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10273 "uses a smaller page size, the emulator can no longer use the memory-"
10274 "management unit (MMU)  and normal system calls for controlling page "
10275 "protections.  (The emulator could emulate the MMU by checking and possibly "
10276 "remapping the address for each memory access in software, but that is "
10277 "slow.)  The idea is that the emulator supplies an array of protection masks "
10278 "to apply to a specified range of virtual addresses.  These masks are applied "
10279 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10280 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10281 "affected.  Implicit in this is that the regions of the address space that "
10282 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10283 "hardware pages (on machines with hardware 64-kB page support)."
10284 msgstr ""
10285
10286 #. type: Plain text
10287 #: build/C/man2/subpage_prot.2:131
10288 msgid "B<mprotect>(2), B<syscall>(2)"
10289 msgstr "B<mprotect>(2), B<syscall>(2)"
10290
10291 #. type: Plain text
10292 #: build/C/man2/subpage_prot.2:134
10293 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10294 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10295
10296 #. type: TH
10297 #: build/C/man2/sync_file_range.2:30
10298 #, no-wrap
10299 msgid "SYNC_FILE_RANGE"
10300 msgstr "SYNC_FILE_RANGE"
10301
10302 #. type: Plain text
10303 #: build/C/man2/sync_file_range.2:33
10304 msgid "sync_file_range - sync a file segment with disk"
10305 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10306
10307 #. type: Plain text
10308 #: build/C/man2/sync_file_range.2:37
10309 #, no-wrap
10310 msgid ""
10311 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10312 "B<#include E<lt>fcntl.hE<gt>>\n"
10313 msgstr ""
10314 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10315 "B<#include E<lt>fcntl.hE<gt>>\n"
10316
10317 #. type: Plain text
10318 #: build/C/man2/sync_file_range.2:40
10319 #, no-wrap
10320 msgid ""
10321 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10322 "B<                    unsigned int >I<flags>B<);>\n"
10323 msgstr ""
10324 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10325 "B<                    unsigned int >I<flags>B<);>\n"
10326
10327 #. type: Plain text
10328 #: build/C/man2/sync_file_range.2:47
10329 msgid ""
10330 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10331 "referred to by the file descriptor I<fd> with disk."
10332 msgstr ""
10333 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10334 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10335
10336 #. type: Plain text
10337 #: build/C/man2/sync_file_range.2:61
10338 msgid ""
10339 "I<offset> is the starting byte of the file range to be synchronized.  "
10340 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10341 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10342 "are synchronized.  Synchronization is in units of the system page size: "
10343 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10344 "rounded up to a page boundary."
10345 msgstr ""
10346 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10347 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10348 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10349 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10350 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10351
10352 #. type: Plain text
10353 #: build/C/man2/sync_file_range.2:65
10354 msgid "The I<flags> bit-mask argument can include any of the following values:"
10355 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10356
10357 #. type: TP
10358 #: build/C/man2/sync_file_range.2:65
10359 #, no-wrap
10360 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10361 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10362
10363 #. type: Plain text
10364 #: build/C/man2/sync_file_range.2:70
10365 msgid ""
10366 "Wait upon write-out of all pages in the specified range that have already "
10367 "been submitted to the device driver for write-out before performing any "
10368 "write."
10369 msgstr ""
10370 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10371 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10372 "つ。"
10373
10374 #. type: TP
10375 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10376 #, no-wrap
10377 msgid "B<SYNC_FILE_RANGE_WRITE>"
10378 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10379
10380 #. type: Plain text
10381 #: build/C/man2/sync_file_range.2:76
10382 msgid ""
10383 "Initiate write-out of all dirty pages in the specified range which are not "
10384 "presently submitted write-out.  Note that even this may block if you attempt "
10385 "to write more than request queue size."
10386 msgstr ""
10387 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10388 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10389 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10390 "る点に注意すること。"
10391
10392 #. type: TP
10393 #: build/C/man2/sync_file_range.2:76
10394 #, no-wrap
10395 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10396 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10397
10398 #. type: Plain text
10399 #: build/C/man2/sync_file_range.2:80
10400 msgid ""
10401 "Wait upon write-out of all pages in the range after performing any write."
10402 msgstr ""
10403 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10404 "つ。"
10405
10406 #. type: Plain text
10407 #: build/C/man2/sync_file_range.2:84
10408 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10409 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10410
10411 #. type: SS
10412 #: build/C/man2/sync_file_range.2:84
10413 #, no-wrap
10414 msgid "Warning"
10415 msgstr "警告"
10416
10417 #. type: Plain text
10418 #: build/C/man2/sync_file_range.2:100
10419 msgid ""
10420 "This system call is extremely dangerous and should not be used in portable "
10421 "programs.  None of these operations writes out the file's metadata.  "
10422 "Therefore, unless the application is strictly performing overwrites of "
10423 "already-instantiated disk blocks, there are no guarantees that the data will "
10424 "be available after a crash.  There is no user interface to know if a write "
10425 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10426 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10427 "When writing into preallocated space, many file systems also require calls "
10428 "into the block allocator, which this system call does not sync out to disk.  "
10429 "This system call does not flush disk write caches and thus does not provide "
10430 "any data integrity on systems with volatile disk write caches."
10431 msgstr ""
10432 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10433 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10434 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10435 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10436 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10437 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10438 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10439 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10440 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10441 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10442 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10443 "コールではデータの一貫性を確保できないことになる。"
10444
10445 #. type: SS
10446 #: build/C/man2/sync_file_range.2:100
10447 #, no-wrap
10448 msgid "Some details"
10449 msgstr "詳細"
10450
10451 #. type: Plain text
10452 #: build/C/man2/sync_file_range.2:108
10453 msgid ""
10454 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10455 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10456 msgstr ""
10457 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10458 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10459
10460 #. type: Plain text
10461 #: build/C/man2/sync_file_range.2:112
10462 msgid "Useful combinations of the I<flags> bits are:"
10463 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10464
10465 #. type: TP
10466 #: build/C/man2/sync_file_range.2:112
10467 #, no-wrap
10468 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10469 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10470
10471 #. type: Plain text
10472 #: build/C/man2/sync_file_range.2:120
10473 msgid ""
10474 "Ensures that all pages in the specified range which were dirty when "
10475 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10476 "start-write-for-data-integrity operation."
10477 msgstr ""
10478 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10479 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10480 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10481 "ある。"
10482
10483 #. type: Plain text
10484 #: build/C/man2/sync_file_range.2:127
10485 msgid ""
10486 "Start write-out of all dirty pages in the specified range which are not "
10487 "presently under write-out.  This is an asynchronous flush-to-disk "
10488 "operation.  This is not suitable for data integrity operations."
10489 msgstr ""
10490 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10491 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10492 "る。データ完全性確保が必要な操作としては適切ではない。"
10493
10494 #. type: TP
10495 #: build/C/man2/sync_file_range.2:127
10496 #, no-wrap
10497 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10498 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10499
10500 #. type: Plain text
10501 #: build/C/man2/sync_file_range.2:134
10502 msgid ""
10503 "Wait for completion of write-out of all pages in the specified range.  This "
10504 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10505 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10506 "and obtain its result."
10507 msgstr ""
10508 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10509 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10510 "き、この操作の完了を待ち、結果を取得することができる。"
10511
10512 #. type: TP
10513 #: build/C/man2/sync_file_range.2:134
10514 #, no-wrap
10515 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10516 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10517
10518 #. type: Plain text
10519 #: build/C/man2/sync_file_range.2:141
10520 msgid ""
10521 "This is a write-for-data-integrity operation that will ensure that all pages "
10522 "in the specified range which were dirty when B<sync_file_range>()  was "
10523 "called are committed to disk."
10524 msgstr ""
10525 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10526 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10527 "のページが ディスクに格納されることが保証される。"
10528
10529 #. type: Plain text
10530 #: build/C/man2/sync_file_range.2:147
10531 msgid ""
10532 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10533 "I<errno> is set to indicate the error."
10534 msgstr ""
10535 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10536 "I<error> にエラーを示す値を設定する。"
10537
10538 #. type: Plain text
10539 #: build/C/man2/sync_file_range.2:152
10540 msgid "I<fd> is not a valid file descriptor."
10541 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10542
10543 #. type: Plain text
10544 #: build/C/man2/sync_file_range.2:160
10545 msgid ""
10546 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10547 msgstr ""
10548 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10549 "である。"
10550
10551 #. type: Plain text
10552 #: build/C/man2/sync_file_range.2:163
10553 msgid "I/O error."
10554 msgstr "I/O エラー。"
10555
10556 #. type: Plain text
10557 #: build/C/man2/sync_file_range.2:169
10558 msgid "Out of disk space."
10559 msgstr "ディスク領域不足である。"
10560
10561 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10562 #.  (In user space at least) it isn't possible to obtain a file descriptor
10563 #.  for a symbolic link.
10564 #. type: Plain text
10565 #: build/C/man2/sync_file_range.2:177
10566 msgid ""
10567 "I<fd> refers to something other than a regular file, a block device, a "
10568 "directory, or a symbolic link."
10569 msgstr ""
10570 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10571 "以外のものを指している。"
10572
10573 #. type: Plain text
10574 #: build/C/man2/sync_file_range.2:180
10575 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10576 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10577
10578 #. type: Plain text
10579 #: build/C/man2/sync_file_range.2:183
10580 msgid ""
10581 "This system call is Linux-specific, and should be avoided in portable "
10582 "programs."
10583 msgstr ""
10584 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10585 "けるべきである。"
10586
10587 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10588 #. type: Plain text
10589 #: build/C/man2/sync_file_range.2:200
10590 msgid ""
10591 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10592 "in a suitable pair of registers.  On such architectures, the call signature "
10593 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10594 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10595 "(2)  for details.)  Therefore, these architectures define a different system "
10596 "call that orders the arguments suitably:"
10597 msgstr ""
10598 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
10599 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
10600 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
10601 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
10602 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
10603 "き数が適切な順序になった別のシステムコールが定義されている。"
10604
10605 #. type: Plain text
10606 #: build/C/man2/sync_file_range.2:205
10607 #, no-wrap
10608 msgid ""
10609 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10610 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10611 msgstr ""
10612 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10613 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10614
10615 #. type: Plain text
10616 #: build/C/man2/sync_file_range.2:210
10617 msgid ""
10618 "The behavior of this system call is otherwise exactly the same as "
10619 "B<sync_file_range>()."
10620 msgstr ""
10621 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10622 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10623 "glibc では提供されていない。"
10624
10625 #. type: Plain text
10626 #: build/C/man2/sync_file_range.2:221
10627 msgid ""
10628 "A system call with this signature first appeared on the ARM architecture in "
10629 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10630 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10631 "architectures where glibc support is provided, glibc transparently wraps "
10632 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10633 msgstr ""
10634 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10635 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10636 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10637 "システムコールの名前が変更された。\n"
10638 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10639 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10640 "B<sync_file_range2>() を適切に使用するようになっている。"
10641
10642 #. type: Plain text
10643 #: build/C/man2/sync_file_range.2:226
10644 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10645 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10646
10647 #~ msgid "2008-01-24"
10648 #~ msgstr "2008-01-24"
10649
10650 #~ msgid "B<fallocate>()  returns zero on success, and -1 on failure."
10651 #~ msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
10652
10653 #~ msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
10654 #~ msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
10655
10656 #~ msgid "2012-05-31"
10657 #~ msgstr "2012-05-31"
10658
10659 #~ msgid ""
10660 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
10661 #~ msgstr ""
10662 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
10663 #~ "-1 が返される。"
10664
10665 #~ msgid ""
10666 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10667 #~ "pair of registers.  On this architecture, the call signature of "
10668 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10669 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10670 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10671 #~ "suitably:"
10672 #~ msgstr ""
10673 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10674 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10675 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10676 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10677 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10678 #~ "システムコールが定義されている。"
10679
10680 #~ msgid ""
10681 #~ "The behavior of this system call is otherwise exactly the same as "
10682 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10683 #~ "in glibc."
10684 #~ msgstr ""
10685 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10686 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10687 #~ "では提供されていない。"
10688
10689 #~ msgid ""
10690 #~ "The I<mode> is not supported by the file system containing the file "
10691 #~ "referred to by I<fd>."
10692 #~ msgstr ""
10693 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10694 #~ "ない。"
10695
10696 #~ msgid ""
10697 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10698 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10699 #~ msgstr ""
10700 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10701 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10702
10703 #~ msgid ""
10704 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10705 #~ "()  writes its output.  This file must be writable to the user or "
10706 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10707 #~ "truncated."
10708 #~ msgstr ""
10709 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10710 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10711 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10712 #~ "イルの元の内容を上書きする。"
10713
10714 #~ msgid ""
10715 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10716 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10717 #~ msgstr ""
10718 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10719 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10720 #~ "リプトが付属している。"
10721
10722 #~ msgid ""
10723 #~ "This flag allocates and initializes to zero the disk space within the "
10724 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10725 #~ "subsequent writes into this range are guaranteed not to fail because of "
10726 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10727 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10728 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10729 #~ "less than I<offset>+I<len>."
10730 #~ msgstr ""
10731 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10732 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10733 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10734 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10735 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10736 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10737 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10738 #~ "は変更されることはない。"
10739
10740 #~ msgid ""
10741 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10742 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10743 #~ msgstr ""
10744 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10745 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10746
10747 #~ msgid ""
10748 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10749 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10750 #~ "required."
10751 #~ msgstr ""
10752 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10753 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10754 #~ "が必要である。"
10755
10756 #~ msgid ""
10757 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10758 #~ "provided since version 2.2."
10759 #~ msgstr ""
10760 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10761 #~ "glibc バージョン 2.2 以降で行われている。"