OSDN Git Service

2c0c87220bf0e03b76cfc19f730727ee407836d5
[linuxjm/LDP_man-pages.git] / po4a / memory / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-08-15 19:32+0900\n"
10 "PO-Revision-Date: 2013-07-30 01:08+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 #, fuzzy
429 #| msgid ""
430 #| "This page is part of release 3.52 of the Linux I<man-pages> project.  A "
431 #| "description of the project, and information about reporting bugs, can be "
432 #| "found at \\%http://www.kernel.org/doc/man-pages/."
433 msgid ""
434 "This page is part of release 3.53 of the Linux I<man-pages> project.  A "
435 "description of the project, and information about reporting bugs, can be "
436 "found at \\%http://www.kernel.org/doc/man-pages/."
437 msgstr ""
438 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.52 の一部\n"
439 "である。プロジェクトの説明とバグ報告に関する情報は\n"
440 "http://www.kernel.org/doc/man-pages/ に書かれている。"
441
442 #. type: TH
443 #: build/C/man3/alloca.3:43
444 #, no-wrap
445 msgid "ALLOCA"
446 msgstr "ALLOCA"
447
448 #. type: TH
449 #: build/C/man3/alloca.3:43
450 #, no-wrap
451 msgid "2013-05-12"
452 msgstr "2013-05-12"
453
454 #. type: TH
455 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
456 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
457 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
458 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
459 #: build/C/man3/posix_memalign.3:29
460 #, no-wrap
461 msgid "GNU"
462 msgstr "GNU"
463
464 #. type: Plain text
465 #: build/C/man3/alloca.3:46
466 msgid "alloca - allocate memory that is automatically freed"
467 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
468
469 #. type: Plain text
470 #: build/C/man3/alloca.3:48
471 msgid "B<#include E<lt>alloca.hE<gt>>"
472 msgstr "B<#include E<lt>alloca.hE<gt>>"
473
474 #. type: Plain text
475 #: build/C/man3/alloca.3:50
476 msgid "B<void *alloca(size_t >I<size>B<);>"
477 msgstr "B<void *alloca(size_t >I<size>B<);>"
478
479 #. type: Plain text
480 #: build/C/man3/alloca.3:60
481 msgid ""
482 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
483 "frame of the caller.  This temporary space is automatically freed when the "
484 "function that called B<alloca>()  returns to its caller."
485 msgstr ""
486 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
487 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
488 "に自動的に解放される。"
489
490 #. type: Plain text
491 #: build/C/man3/alloca.3:65
492 msgid ""
493 "The B<alloca>()  function returns a pointer to the beginning of the "
494 "allocated space.  If the allocation causes stack overflow, program behavior "
495 "is undefined."
496 msgstr ""
497 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
498 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
499 "い。"
500
501 #. type: Plain text
502 #: build/C/man3/alloca.3:67
503 msgid "This function is not in POSIX.1-2001."
504 msgstr "この関数は POSIX.1-2001 にはない。"
505
506 #. type: Plain text
507 #: build/C/man3/alloca.3:73
508 msgid ""
509 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
510 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
511 "the GNU version."
512 msgstr ""
513 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
514 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
515 "は POSIX.1-2001 にはない。"
516
517 #. type: Plain text
518 #: build/C/man3/alloca.3:88
519 msgid ""
520 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
521 "applications, its use can improve efficiency compared to the use of B<malloc>"
522 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
523 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
524 "Otherwise, its use is discouraged."
525 msgstr ""
526 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
527 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
528 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
529 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
530 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
531
532 #. type: Plain text
533 #: build/C/man3/alloca.3:97
534 msgid ""
535 "Because the space allocated by B<alloca>()  is allocated within the stack "
536 "frame, that space is automatically freed if the function return is jumped "
537 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
538 msgstr ""
539 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
540 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
541 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
542
543 #. type: Plain text
544 #: build/C/man3/alloca.3:102
545 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
546 msgstr ""
547 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
548 "に!"
549
550 #. type: SS
551 #: build/C/man3/alloca.3:102
552 #, no-wrap
553 msgid "Notes on the GNU version"
554 msgstr "GNU 版についての注意"
555
556 #. type: Plain text
557 #: build/C/man3/alloca.3:124
558 msgid ""
559 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
560 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
561 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
562 "included.  Otherwise (without an -ansi or -std=c* option) the glibc version "
563 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
564 "the lines:"
565 msgstr ""
566 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
567 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
568 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
569 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
570 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
571 "インクルードするが、このファイルには以下の行が含まれており、"
572
573 #. type: Plain text
574 #: build/C/man3/alloca.3:129
575 #, no-wrap
576 msgid ""
577 "    #ifdef  __GNUC__\n"
578 "    #define alloca(size)   __builtin_alloca (size)\n"
579 "    #endif\n"
580 msgstr ""
581 "    #ifdef  __GNUC__\n"
582 "    #define alloca(size)   __builtin_alloca (size)\n"
583 "    #endif\n"
584
585 #. type: Plain text
586 #: build/C/man3/alloca.3:132
587 msgid "with messy consequences if one has a private version of this function."
588 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
589
590 #. type: Plain text
591 #: build/C/man3/alloca.3:136
592 msgid ""
593 "The fact that the code is inlined means that it is impossible to take the "
594 "address of this function, or to change its behavior by linking with a "
595 "different library."
596 msgstr ""
597 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
598 "のライブラリをリンクして動作を変更することはできない。"
599
600 #. type: Plain text
601 #: build/C/man3/alloca.3:140
602 msgid ""
603 "The inlined code often consists of a single instruction adjusting the stack "
604 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
605 "error return."
606 msgstr ""
607 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
608 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
609 "よって NULL エラーが返されることはない。"
610
611 #. type: SH
612 #: build/C/man3/alloca.3:140 build/C/man2/cacheflush.2:82
613 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
614 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
615 #: build/C/man2/posix_fadvise.2:186 build/C/man2/shmget.2:300
616 #, no-wrap
617 msgid "BUGS"
618 msgstr "バグ"
619
620 #. type: Plain text
621 #: build/C/man3/alloca.3:145
622 msgid ""
623 "There is no error indication if the stack frame cannot be extended.  "
624 "(However, after a failed allocation, the program is likely to receive a "
625 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
626 msgstr ""
627 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
628 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
629 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
630
631 #. type: Plain text
632 #: build/C/man3/alloca.3:153
633 msgid ""
634 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
635 "a function call, because the stack space reserved by B<alloca>()  would "
636 "appear on the stack in the middle of the space for the function arguments."
637 msgstr ""
638 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
639 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
640 "使われるスタック領域の中に現れてしまうためである。"
641
642 #. type: SH
643 #: build/C/man3/alloca.3:153 build/C/man2/fallocate.2:202
644 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
645 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
646 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
647 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
648 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
649 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
650 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
651 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:167
652 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
653 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:97
654 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:271
655 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:423
656 #: build/C/man2/shmget.2:306 build/C/man2/shmop.2:287
657 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
658 #, no-wrap
659 msgid "SEE ALSO"
660 msgstr "関連項目"
661
662 #. type: Plain text
663 #: build/C/man3/alloca.3:157
664 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
665 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
666
667 #. type: TH
668 #: build/C/man2/cacheflush.2:25
669 #, no-wrap
670 msgid "CACHEFLUSH"
671 msgstr "CACHEFLUSH"
672
673 #. type: TH
674 #: build/C/man2/cacheflush.2:25
675 #, no-wrap
676 msgid "2007-05-26"
677 msgstr "2007-05-26"
678
679 #. type: Plain text
680 #: build/C/man2/cacheflush.2:28
681 msgid "cacheflush - flush contents of instruction and/or data cache"
682 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
683
684 #. type: Plain text
685 #: build/C/man2/cacheflush.2:31
686 #, no-wrap
687 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
688 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
689
690 #. type: Plain text
691 #: build/C/man2/cacheflush.2:33
692 #, no-wrap
693 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
694 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
695
696 #. type: Plain text
697 #: build/C/man2/cacheflush.2:43
698 msgid ""
699 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
700 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
701 "of:"
702 msgstr ""
703 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
704 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
705 "指定する:"
706
707 #. type: TP
708 #: build/C/man2/cacheflush.2:43
709 #, no-wrap
710 msgid "B<ICACHE>"
711 msgstr "B<ICACHE>"
712
713 #. type: Plain text
714 #: build/C/man2/cacheflush.2:46
715 msgid "Flush the instruction cache."
716 msgstr "命令 (instruction) キャッシュをフラッシュする。"
717
718 #. type: TP
719 #: build/C/man2/cacheflush.2:46
720 #, no-wrap
721 msgid "B<DCACHE>"
722 msgstr "B<DCACHE>"
723
724 #. type: Plain text
725 #: build/C/man2/cacheflush.2:49
726 msgid "Write back to memory and invalidate the affected valid cache lines."
727 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
728
729 #. type: TP
730 #: build/C/man2/cacheflush.2:49
731 #, no-wrap
732 msgid "B<BCACHE>"
733 msgstr "B<BCACHE>"
734
735 #. type: Plain text
736 #: build/C/man2/cacheflush.2:53
737 msgid "Same as B<(ICACHE|DCACHE)>."
738 msgstr "B<(ICACHE|DCACHE)> と同じ。"
739
740 #. type: Plain text
741 #: build/C/man2/cacheflush.2:59
742 msgid ""
743 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
744 "detected, I<errno> will indicate the error."
745 msgstr ""
746 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
747 "出された場合は I<errno> にエラーが指示される。"
748
749 #. type: TP
750 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
751 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:310
752 #: build/C/man2/subpage_prot.2:72
753 #, no-wrap
754 msgid "B<EFAULT>"
755 msgstr "B<EFAULT>"
756
757 #. type: Plain text
758 #: build/C/man2/cacheflush.2:67
759 msgid ""
760 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
761 "accessible."
762 msgstr ""
763 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
764 "能ではない。"
765
766 #. type: TP
767 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:131
768 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
769 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
770 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
771 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
772 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
773 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
774 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
775 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
776 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:324
777 #: build/C/man2/shmget.2:199 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
778 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
779 #, no-wrap
780 msgid "B<EINVAL>"
781 msgstr "B<EINVAL>"
782
783 #. type: Plain text
784 #: build/C/man2/cacheflush.2:75
785 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
786 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
787
788 #.  FIXME This system call was only on MIPS back in 1.2 days, but
789 #.  by now it is on a number of other architectures (but not i386).
790 #.  Investigate the details and update this page.
791 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
792 #. type: Plain text
793 #: build/C/man2/cacheflush.2:82
794 msgid ""
795 "This Linux-specific system call is available only on MIPS-based systems.  It "
796 "should not be used in programs intended to be portable."
797 msgstr ""
798 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
799 "植を意図したプログラムで使用すべきではない。"
800
801 #. type: Plain text
802 #: build/C/man2/cacheflush.2:89
803 msgid ""
804 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
805 "Therefore, the whole cache is always flushed."
806 msgstr ""
807 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
808 "のキャッシュがフラッシュされる。"
809
810 #. type: TH
811 #: build/C/man2/fallocate.2:11
812 #, no-wrap
813 msgid "FALLOCATE"
814 msgstr "FALLOCATE"
815
816 #. type: TH
817 #: build/C/man2/fallocate.2:11
818 #, no-wrap
819 msgid "2013-06-10"
820 msgstr "2013-06-10"
821
822 #. type: Plain text
823 #: build/C/man2/fallocate.2:14
824 msgid "fallocate - manipulate file space"
825 msgstr "fallocate - ファイル空間の操作"
826
827 #. type: Plain text
828 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
829 #, no-wrap
830 msgid ""
831 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
832 "B<#include E<lt>fcntl.hE<gt>>\n"
833 msgstr ""
834 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
835 "B<#include E<lt>fcntl.hE<gt>>\n"
836
837 #. type: Plain text
838 #: build/C/man2/fallocate.2:21
839 #, no-wrap
840 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
841 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
842
843 #. type: Plain text
844 #: build/C/man2/fallocate.2:27
845 msgid ""
846 "This is a nonportable, Linux-specific system call.  For the portable, "
847 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
848 "B<posix_fallocate>(3)."
849 msgstr ""
850 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
851 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
852 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
853
854 #. type: Plain text
855 #: build/C/man2/fallocate.2:37
856 msgid ""
857 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
858 "space for the file referred to by I<fd> for the byte range starting at "
859 "I<offset> and continuing for I<len> bytes."
860 msgstr ""
861 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
862 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
863 "域である。"
864
865 #. type: Plain text
866 #: build/C/man2/fallocate.2:42
867 msgid ""
868 "The I<mode> argument determines the operation to be performed on the given "
869 "range.  Details of the supported operations are given in the subsections "
870 "below."
871 msgstr ""
872 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
873 "サポートされている操作の詳細は以下のサブセクションで説明する。"
874
875 #. type: SS
876 #: build/C/man2/fallocate.2:42
877 #, no-wrap
878 msgid "Allocating disk space"
879 msgstr "ディスク領域の割り当て"
880
881 #. type: Plain text
882 #: build/C/man2/fallocate.2:61
883 msgid ""
884 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
885 "and initializes to zero the disk space within the range specified by "
886 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
887 "changed if I<offset>+I<len> is greater than the file size.  This default "
888 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
889 "library function, and is intended as a method of optimally implementing that "
890 "function."
891 msgstr ""
892 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
893 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
894 "う。\n"
895 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
896 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
897 "は、\n"
898 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
899 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
900 "ことを目的としているからである。"
901
902 #. type: Plain text
903 #: build/C/man2/fallocate.2:67
904 msgid ""
905 "After a successful call, subsequent writes into the range specified by "
906 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
907 "space."
908 msgstr ""
909 "呼び出しが成功した場合、\n"
910 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
911 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
912
913 #. type: Plain text
914 #: build/C/man2/fallocate.2:78
915 msgid ""
916 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
917 "the call is similar, but the file size will not be changed even if I<offset>"
918 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
919 "the end of the file in this manner is useful for optimizing append workloads."
920 msgstr ""
921 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
922 "ル\n"
923 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
924 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
925 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
926 "追記を最適化したい場合に役に立つ。"
927
928 #. type: Plain text
929 #: build/C/man2/fallocate.2:82
930 msgid ""
931 "Because allocation is done in block size chunks, B<fallocate>()  may "
932 "allocate a larger range of disk space than was specified."
933 msgstr ""
934 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
935 "り\n"
936 "も大きなディスク領域を割り当てることがある。"
937
938 #. type: SS
939 #: build/C/man2/fallocate.2:82
940 #, no-wrap
941 msgid "Deallocating file space"
942 msgstr "ファイル空間の割り当て解除"
943
944 #. type: Plain text
945 #: build/C/man2/fallocate.2:97
946 msgid ""
947 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
948 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
949 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
950 "range, partial file system blocks are zeroed, and whole file system blocks "
951 "are removed from the file.  After a successful call, subsequent reads from "
952 "this range will return zeroes."
953 msgstr ""
954 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
955 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
956 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
957 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
958 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
959 "を返す。"
960
961 #. type: Plain text
962 #: build/C/man2/fallocate.2:108
963 msgid ""
964 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
965 "I<mode>; in other words, even when punching off the end of the file, the "
966 "file size (as reported by B<stat>(2))  does not change."
967 msgstr ""
968 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
969 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
970 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
971
972 #. type: Plain text
973 #: build/C/man2/fallocate.2:112
974 msgid ""
975 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
976 "doesn't support the operation, an error is returned."
977 msgstr ""
978 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
979 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
980 "る。"
981
982 #. type: Plain text
983 #: build/C/man2/fallocate.2:119
984 msgid ""
985 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
986 "I<errno> is set to indicate the error."
987 msgstr ""
988 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
989 "にエラーを示す値を設定する。"
990
991 #. type: TP
992 #: build/C/man2/fallocate.2:120 build/C/man2/madvise.2:279
993 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
994 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
995 #: build/C/man2/sync_file_range.2:148
996 #, no-wrap
997 msgid "B<EBADF>"
998 msgstr "B<EBADF>"
999
1000 #. type: Plain text
1001 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
1002 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1003 msgstr ""
1004 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1005 "いない。"
1006
1007 #. type: TP
1008 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
1009 #, no-wrap
1010 msgid "B<EFBIG>"
1011 msgstr "B<EFBIG>"
1012
1013 #. type: Plain text
1014 #: build/C/man2/fallocate.2:128
1015 msgid "I<offset>+I<len> exceeds the maximum file size."
1016 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1017
1018 #. type: TP
1019 #: build/C/man2/fallocate.2:128
1020 #, no-wrap
1021 msgid "B<EINTR>"
1022 msgstr "B<EINTR>"
1023
1024 #. type: Plain text
1025 #: build/C/man2/fallocate.2:131
1026 msgid "A signal was caught during execution."
1027 msgstr "実行中にシグナルが捕捉された。"
1028
1029 #. type: Plain text
1030 #: build/C/man2/fallocate.2:143 build/C/man3/posix_fallocate.3:87
1031 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1032 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1033
1034 #. type: TP
1035 #: build/C/man2/fallocate.2:143 build/C/man2/madvise.2:310
1036 #: build/C/man2/sync_file_range.2:160
1037 #, no-wrap
1038 msgid "B<EIO>"
1039 msgstr "B<EIO>"
1040
1041 #. type: Plain text
1042 #: build/C/man2/fallocate.2:146
1043 msgid "An I/O error occurred while reading from or writing to a file system."
1044 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1045
1046 #. type: TP
1047 #: build/C/man2/fallocate.2:146 build/C/man2/mmap.2:452
1048 #: build/C/man3/posix_fallocate.3:87
1049 #, no-wrap
1050 msgid "B<ENODEV>"
1051 msgstr "B<ENODEV>"
1052
1053 #. type: Plain text
1054 #: build/C/man2/fallocate.2:153
1055 msgid ""
1056 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1057 "or FIFO, a different error results.)"
1058 msgstr ""
1059 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1060 "を参照している場合、別のエラーが発生する)。"
1061
1062 #. type: TP
1063 #: build/C/man2/fallocate.2:153 build/C/man3/posix_fallocate.3:91
1064 #: build/C/man2/shmget.2:217 build/C/man2/sync_file_range.2:166
1065 #, no-wrap
1066 msgid "B<ENOSPC>"
1067 msgstr "B<ENOSPC>"
1068
1069 #. type: Plain text
1070 #: build/C/man2/fallocate.2:158 build/C/man3/posix_fallocate.3:96
1071 msgid ""
1072 "There is not enough space left on the device containing the file referred to "
1073 "by I<fd>."
1074 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1075
1076 #. type: Plain text
1077 #: build/C/man2/fallocate.2:162
1078 msgid "This kernel does not implement B<fallocate>()."
1079 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1080
1081 #. type: TP
1082 #: build/C/man2/fallocate.2:162
1083 #, no-wrap
1084 msgid "B<EOPNOTSUPP>"
1085 msgstr "B<EOPNOTSUPP>"
1086
1087 #. type: Plain text
1088 #: build/C/man2/fallocate.2:171
1089 msgid ""
1090 "The file system containing the file referred to by I<fd> does not support "
1091 "this operation; or the I<mode> is not supported by the file system "
1092 "containing the file referred to by I<fd>."
1093 msgstr ""
1094 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1095 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1096 "I<mode> をサポートしていない。"
1097
1098 #. type: TP
1099 #: build/C/man2/fallocate.2:171 build/C/man2/mlock.2:143
1100 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:349
1101 #: build/C/man2/shmget.2:225
1102 #, no-wrap
1103 msgid "B<EPERM>"
1104 msgstr "B<EPERM>"
1105
1106 #. type: Plain text
1107 #: build/C/man2/fallocate.2:187
1108 msgid ""
1109 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1110 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1111 "is marked append-only (see B<chattr>(1))."
1112 msgstr ""
1113 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>"
1114 "(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> が指定されたが、 I<fd> が参照"
1115 "するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1116
1117 #. type: TP
1118 #: build/C/man2/fallocate.2:187 build/C/man2/posix_fadvise.2:97
1119 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1120 #, no-wrap
1121 msgid "B<ESPIPE>"
1122 msgstr "B<ESPIPE>"
1123
1124 #. type: Plain text
1125 #: build/C/man2/fallocate.2:191
1126 msgid "I<fd> refers to a pipe or FIFO."
1127 msgstr "I<fd> がパイプか FIFO を参照している。"
1128
1129 #. type: SH
1130 #: build/C/man2/fallocate.2:191 build/C/man3/malloc_info.3:60
1131 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1132 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1133 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1134 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1135 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1136 #, no-wrap
1137 msgid "VERSIONS"
1138 msgstr "バージョン"
1139
1140 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1141 #. type: Plain text
1142 #: build/C/man2/fallocate.2:199
1143 msgid ""
1144 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1145 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1146 "in glibc headers only since version 2.18."
1147 msgstr ""
1148 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1149 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1150 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1151
1152 #. type: Plain text
1153 #: build/C/man2/fallocate.2:202
1154 msgid "B<fallocate>()  is Linux-specific."
1155 msgstr "B<fallocate>()  は Linux 固有である。"
1156
1157 #. type: Plain text
1158 #: build/C/man2/fallocate.2:207
1159 msgid ""
1160 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1161 msgstr ""
1162 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1163
1164 #. type: TH
1165 #: build/C/man2/madvise.2:35
1166 #, no-wrap
1167 msgid "MADVISE"
1168 msgstr "MADVISE"
1169
1170 #. type: TH
1171 #: build/C/man2/madvise.2:35
1172 #, no-wrap
1173 msgid "2012-04-28"
1174 msgstr "2012-04-28"
1175
1176 #. type: Plain text
1177 #: build/C/man2/madvise.2:38
1178 msgid "madvise - give advice about use of memory"
1179 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1180
1181 #. type: Plain text
1182 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1183 #: build/C/man3/shm_open.3:31
1184 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1185 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1186
1187 #. type: Plain text
1188 #: build/C/man2/madvise.2:42
1189 msgid ""
1190 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1191 msgstr ""
1192 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1193
1194 #. type: Plain text
1195 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1196 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1197 msgid ""
1198 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1199 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1200
1201 #. type: Plain text
1202 #: build/C/man2/madvise.2:50
1203 msgid "B<madvise>(): _BSD_SOURCE"
1204 msgstr "B<madvise>(): _BSD_SOURCE"
1205
1206 #. type: Plain text
1207 #: build/C/man2/madvise.2:68
1208 msgid ""
1209 "The B<madvise>()  system call advises the kernel about how to handle paging "
1210 "input/output in the address range beginning at address I<addr> and with size "
1211 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1212 "to use some mapped or shared memory areas, so that the kernel can choose "
1213 "appropriate read-ahead and caching techniques.  This call does not influence "
1214 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1215 "but may influence its performance.  The kernel is free to ignore the advice."
1216 msgstr ""
1217 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1218 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1219 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1220 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1221 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1222 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1223 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1224
1225 #. type: Plain text
1226 #: build/C/man2/madvise.2:72
1227 msgid "The advice is indicated in the I<advice> argument which can be"
1228 msgstr ""
1229 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1230
1231 #. type: TP
1232 #: build/C/man2/madvise.2:72
1233 #, no-wrap
1234 msgid "B<MADV_NORMAL>"
1235 msgstr "B<MADV_NORMAL>"
1236
1237 #. type: Plain text
1238 #: build/C/man2/madvise.2:76
1239 msgid "No special treatment.  This is the default."
1240 msgstr "特別な扱いは行わない。これがデフォルトである。"
1241
1242 #. type: TP
1243 #: build/C/man2/madvise.2:76
1244 #, no-wrap
1245 msgid "B<MADV_RANDOM>"
1246 msgstr "B<MADV_RANDOM>"
1247
1248 #. type: Plain text
1249 #: build/C/man2/madvise.2:80
1250 msgid ""
1251 "Expect page references in random order.  (Hence, read ahead may be less "
1252 "useful than normally.)"
1253 msgstr ""
1254 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1255 "なさそうだ。)"
1256
1257 #. type: TP
1258 #: build/C/man2/madvise.2:80
1259 #, no-wrap
1260 msgid "B<MADV_SEQUENTIAL>"
1261 msgstr "B<MADV_SEQUENTIAL>"
1262
1263 #. type: Plain text
1264 #: build/C/man2/madvise.2:85
1265 msgid ""
1266 "Expect page references in sequential order.  (Hence, pages in the given "
1267 "range can be aggressively read ahead, and may be freed soon after they are "
1268 "accessed.)"
1269 msgstr ""
1270 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1271 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1272 "して良い。)"
1273
1274 #. type: TP
1275 #: build/C/man2/madvise.2:85
1276 #, no-wrap
1277 msgid "B<MADV_WILLNEED>"
1278 msgstr "B<MADV_WILLNEED>"
1279
1280 #. type: Plain text
1281 #: build/C/man2/madvise.2:89
1282 msgid ""
1283 "Expect access in the near future.  (Hence, it might be a good idea to read "
1284 "some pages ahead.)"
1285 msgstr ""
1286 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1287 "ておくといいだろう。)"
1288
1289 #. type: TP
1290 #: build/C/man2/madvise.2:89
1291 #, no-wrap
1292 msgid "B<MADV_DONTNEED>"
1293 msgstr "B<MADV_DONTNEED>"
1294
1295 #. type: Plain text
1296 #: build/C/man2/madvise.2:100
1297 msgid ""
1298 "Do not expect access in the near future.  (For the time being, the "
1299 "application is finished with the given range, so the kernel can free "
1300 "resources associated with it.)  Subsequent accesses of pages in this range "
1301 "will succeed, but will result either in reloading of the memory contents "
1302 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1303 "pages for mappings without an underlying file."
1304 msgstr ""
1305 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1306 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1307 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1308 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1309 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1310 "なる。"
1311
1312 #. type: TP
1313 #: build/C/man2/madvise.2:100
1314 #, no-wrap
1315 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1316 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1317
1318 #.  2.6.18-rc5
1319 #.  Databases want to use this feature to drop a section of their
1320 #.  bufferpool (shared memory segments) - without writing back to
1321 #.  disk/swap space.  This feature is also useful for supporting
1322 #.  hot-plug memory on UML.
1323 #. type: Plain text
1324 #: build/C/man2/madvise.2:113
1325 msgid ""
1326 "Free up a given range of pages and its associated backing store.  Currently, "
1327 "only shmfs/tmpfs supports this; other file systems return with the error "
1328 "B<ENOSYS>."
1329 msgstr ""
1330 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1331 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1332 "返される。"
1333
1334 #. type: TP
1335 #: build/C/man2/madvise.2:113
1336 #, no-wrap
1337 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1338 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1339
1340 #.  See http://lwn.net/Articles/171941/
1341 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1342 #.  Currently, copy-on-write may change the physical address of
1343 #.  a page even if the user requested that the page is pinned in
1344 #.  memory (either by mlock or by get_user_pages).  This happens
1345 #.  if the process forks meanwhile, and the parent writes to that
1346 #.  page.  As a result, the page is orphaned: in case of
1347 #.  get_user_pages, the application will never see any data hardware
1348 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1349 #.  the parent is not getting the realtime/security benefits of mlock.
1350 #.  In particular, this affects the Infiniband modules which do DMA from
1351 #.  and into user pages all the time.
1352 #.  This patch adds madvise options to control whether memory range is
1353 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1354 #.  from/into these pages.  Could also be useful to an application
1355 #.  wanting to speed up its forks by cutting large areas out of
1356 #.  consideration.
1357 #.  SEE ALSO: http://lwn.net/Articles/171941/
1358 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1359 #. type: Plain text
1360 #: build/C/man2/madvise.2:144
1361 msgid ""
1362 "Do not make the pages in this range available to the child after a B<fork>"
1363 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1364 "physical location of a page(s) if the parent writes to it after a B<fork>"
1365 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1366 "page(s).)"
1367 msgstr ""
1368 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1369 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1370 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1371 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1372 "を行うような場合に 問題を起こすことがある)。"
1373
1374 #. type: TP
1375 #: build/C/man2/madvise.2:144
1376 #, no-wrap
1377 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1378 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1379
1380 #. type: Plain text
1381 #: build/C/man2/madvise.2:150
1382 msgid ""
1383 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1384 "a mapping is inherited across B<fork>(2)."
1385 msgstr ""
1386 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1387 "(2)  の前後でマッピングは継承されるようになる。"
1388
1389 #. type: TP
1390 #: build/C/man2/madvise.2:150
1391 #, no-wrap
1392 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1393 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1394
1395 #. type: Plain text
1396 #: build/C/man2/madvise.2:162
1397 msgid ""
1398 "Poison a page and handle it like a hardware memory corruption.  This "
1399 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1400 "This operation may result in the calling process receiving a B<SIGBUS> and "
1401 "the page being unmapped.  This feature is intended for testing of memory "
1402 "error-handling code; it is available only if the kernel was configured with "
1403 "B<CONFIG_MEMORY_FAILURE>."
1404 msgstr ""
1405
1406 #. type: TP
1407 #: build/C/man2/madvise.2:162
1408 #, no-wrap
1409 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1410 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1411
1412 #. type: Plain text
1413 #: build/C/man2/madvise.2:180
1414 msgid ""
1415 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1416 "memory of each page in the specified range is preserved (i.e., when next "
1417 "accessed, the same content will be visible, but in a new physical page "
1418 "frame), and the original page is offlined (i.e., no longer used, and taken "
1419 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1420 "operation is invisible to (i.e., does not change the semantics of)  the "
1421 "calling process.  This feature is intended for testing of memory error-"
1422 "handling code; it is available only if the kernel was configured with "
1423 "B<CONFIG_MEMORY_FAILURE>."
1424 msgstr ""
1425
1426 #. type: TP
1427 #: build/C/man2/madvise.2:180
1428 #, no-wrap
1429 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1430 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1431
1432 #. type: Plain text
1433 #: build/C/man2/madvise.2:205
1434 msgid ""
1435 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1436 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1437 "memory that have been marked as mergeable, looking for pages with identical "
1438 "content.  These are replaced by a single write-protected page (which is "
1439 "automatically copied if a process later wants to update the content of the "
1440 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1441 "feature is intended for applications that generate many instances of the "
1442 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1443 "of processing power; use with care.  See the Linux kernel source file "
1444 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1445 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1446 "configured with B<CONFIG_KSM>."
1447 msgstr ""
1448
1449 #. type: TP
1450 #: build/C/man2/madvise.2:205
1451 #, no-wrap
1452 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1453 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1454
1455 #. type: Plain text
1456 #: build/C/man2/madvise.2:214
1457 msgid ""
1458 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1459 "address range; KSM unmerges whatever pages it had merged in the address "
1460 "range specified by I<addr> and I<length>."
1461 msgstr ""
1462
1463 #. type: TP
1464 #: build/C/man2/madvise.2:214
1465 #, no-wrap
1466 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1467 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1468
1469 #.  http://lwn.net/Articles/358904/
1470 #.  https://lwn.net/Articles/423584/
1471 #. type: Plain text
1472 #: build/C/man2/madvise.2:243
1473 msgid ""
1474 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1475 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1476 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1477 "the areas marked as huge page candidates to replace them with huge pages.  "
1478 "The kernel will also allocate huge pages directly when the region is "
1479 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1480 "feature is primarily aimed at applications that use large mappings of data "
1481 "and access large regions of that memory at a time (e.g., virtualization "
1482 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1483 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1484 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1485 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1486 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1487 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1488 msgstr ""
1489
1490 #. type: TP
1491 #: build/C/man2/madvise.2:243
1492 #, no-wrap
1493 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1494 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1495
1496 #. type: Plain text
1497 #: build/C/man2/madvise.2:250
1498 msgid ""
1499 "Ensures that memory in the address range specified by I<addr> and I<length> "
1500 "will not be collapsed into huge pages."
1501 msgstr ""
1502
1503 #. type: TP
1504 #: build/C/man2/madvise.2:250
1505 #, no-wrap
1506 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1507 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1508
1509 #. type: Plain text
1510 #: build/C/man2/madvise.2:264
1511 msgid ""
1512 "Exclude from a core dump those pages in the range specified by I<addr> and "
1513 "I<length>.  This is useful in applications that have large areas of memory "
1514 "that are known not to be useful in a core dump.  The effect of "
1515 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1516 "proc/PID/coredump_filter> file (see B<core>(5))."
1517 msgstr ""
1518
1519 #. type: TP
1520 #: build/C/man2/madvise.2:264
1521 #, no-wrap
1522 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1523 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1524
1525 #. type: Plain text
1526 #: build/C/man2/madvise.2:268
1527 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1528 msgstr ""
1529
1530 #. type: Plain text
1531 #: build/C/man2/madvise.2:275
1532 msgid ""
1533 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1534 "is set appropriately."
1535 msgstr ""
1536 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1537 "を適切な値に設定する。"
1538
1539 #. type: TP
1540 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1541 #: build/C/man2/mremap.2:136
1542 #, no-wrap
1543 msgid "B<EAGAIN>"
1544 msgstr "B<EAGAIN>"
1545
1546 #. type: Plain text
1547 #: build/C/man2/madvise.2:279
1548 msgid "A kernel resource was temporarily unavailable."
1549 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1550
1551 #. type: Plain text
1552 #: build/C/man2/madvise.2:282
1553 msgid "The map exists, but the area maps something that isn't a file."
1554 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1555
1556 #. type: Plain text
1557 #: build/C/man2/madvise.2:285
1558 msgid "This error can occur for the following reasons:"
1559 msgstr "このエラーは以下の理由で発生する。"
1560
1561 #. type: IP
1562 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1563 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1564 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1565 #: build/C/man3/mallopt.3:241
1566 #, no-wrap
1567 msgid "*"
1568 msgstr "*"
1569
1570 #.  .I len
1571 #.  is zero,
1572 #. type: Plain text
1573 #: build/C/man2/madvise.2:292
1574 msgid "The value I<len> is negative."
1575 msgstr "I<len> が負の値である。"
1576
1577 #. type: Plain text
1578 #: build/C/man2/madvise.2:295
1579 msgid "I<addr> is not page-aligned."
1580 msgstr "I<addr> がページ境界ではない。"
1581
1582 #. type: Plain text
1583 #: build/C/man2/madvise.2:298
1584 msgid "I<advice> is not a valid value"
1585 msgstr "I<advice> が有効な値でない。"
1586
1587 #. type: Plain text
1588 #: build/C/man2/madvise.2:301
1589 msgid ""
1590 "The application is attempting to release locked or shared pages (with "
1591 "B<MADV_DONTNEED>)."
1592 msgstr ""
1593 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1594 "放\n"
1595 "しようとしている。"
1596
1597 #. type: Plain text
1598 #: build/C/man2/madvise.2:309
1599 msgid ""
1600 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1601 "kernel was not configured with B<CONFIG_KSM>."
1602 msgstr ""
1603 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1604 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1605
1606 #. type: Plain text
1607 #: build/C/man2/madvise.2:316
1608 msgid ""
1609 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1610 "maximum resident set size."
1611 msgstr ""
1612 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1613 "(resident set size) の最大値を越えてしまう。"
1614
1615 #. type: TP
1616 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1617 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1618 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1619 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1620 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1621 #: build/C/man2/shmctl.2:333 build/C/man2/shmget.2:214
1622 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1623 #: build/C/man2/sync_file_range.2:163
1624 #, no-wrap
1625 msgid "B<ENOMEM>"
1626 msgstr "B<ENOMEM>"
1627
1628 #. type: Plain text
1629 #: build/C/man2/madvise.2:321
1630 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1631 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1632
1633 #. type: Plain text
1634 #: build/C/man2/madvise.2:325
1635 msgid ""
1636 "Addresses in the specified range are not currently mapped, or are outside "
1637 "the address space of the process."
1638 msgstr ""
1639 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1640 "空間の内部にない。"
1641
1642 #.  FIXME . Write a posix_madvise(3) page.
1643 #. type: Plain text
1644 #: build/C/man2/madvise.2:337
1645 msgid ""
1646 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1647 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1648 "There is a similar B<posix_fadvise>(2)  for file access."
1649 msgstr ""
1650 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1651 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1652 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1653 "する。"
1654
1655 #. type: Plain text
1656 #: build/C/man2/madvise.2:346
1657 msgid ""
1658 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1659 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1660 msgstr ""
1661 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1662 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1663
1664 #. type: SS
1665 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1666 #: build/C/man2/shmget.2:294
1667 #, no-wrap
1668 msgid "Linux notes"
1669 msgstr "Linux での注意"
1670
1671 #. type: Plain text
1672 #: build/C/man2/madvise.2:355
1673 msgid ""
1674 "The current Linux implementation (2.4.0) views this system call more as a "
1675 "command than as advice and hence may return an error when it cannot do what "
1676 "it usually would do in response to this advice.  (See the ERRORS description "
1677 "above.)  This is nonstandard behavior."
1678 msgstr ""
1679 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1680 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1681 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1682 "とは異なる。"
1683
1684 #.  .SH HISTORY
1685 #.  The
1686 #.  .BR madvise ()
1687 #.  function first appeared in 4.4BSD.
1688 #. type: Plain text
1689 #: build/C/man2/madvise.2:371
1690 msgid ""
1691 "The Linux implementation requires that the address I<addr> be page-aligned, "
1692 "and allows I<length> to be zero.  If there are some parts of the specified "
1693 "address range that are not mapped, the Linux version of B<madvise>()  "
1694 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1695 "the system call, as it should)."
1696 msgstr ""
1697 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1698 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1699 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1700 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1701 "返す)。"
1702
1703 #. type: Plain text
1704 #: build/C/man2/madvise.2:379
1705 msgid ""
1706 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1707 "B<munmap>(2), B<core>(5)"
1708 msgstr ""
1709 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1710 "B<munmap>(2), B<core>(5)"
1711
1712 #. type: TH
1713 #: build/C/man3/mallinfo.3:26
1714 #, no-wrap
1715 msgid "MALLINFO"
1716 msgstr "MALLINFO"
1717
1718 #. type: TH
1719 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1720 #, no-wrap
1721 msgid "2012-05-06"
1722 msgstr "2012-05-06"
1723
1724 #. type: Plain text
1725 #: build/C/man3/mallinfo.3:29
1726 msgid "mallinfo - obtain memory allocation information"
1727 msgstr "mallinfo - メモリ割り当て情報を取得する"
1728
1729 #. type: Plain text
1730 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1731 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1732 #: build/C/man3/mallopt.3:31
1733 msgid "B<#include E<lt>malloc.hE<gt>>"
1734 msgstr "B<#include E<lt>malloc.hE<gt>>"
1735
1736 #. type: Plain text
1737 #: build/C/man3/mallinfo.3:33
1738 msgid "B<struct mallinfo mallinfo(void);>"
1739 msgstr "B<struct mallinfo mallinfo(void);>"
1740
1741 #. type: Plain text
1742 #: build/C/man3/mallinfo.3:41
1743 msgid ""
1744 "The B<mallinfo>()  function returns a copy of a structure containing "
1745 "information about memory allocations performed by B<malloc>(3)  and related "
1746 "functions.  This structure is defined as follows:"
1747 msgstr ""
1748 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1749 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1750 "この構造体は以下のように定義されている。"
1751
1752 #. type: Plain text
1753 #: build/C/man3/mallinfo.3:56
1754 #, no-wrap
1755 msgid ""
1756 "struct mallinfo {\n"
1757 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1758 "    int ordblks;   /* Number of free chunks */\n"
1759 "    int smblks;    /* Number of free fastbin blocks */\n"
1760 "    int hblks;     /* Number of mmapped regions */\n"
1761 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1762 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1763 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1764 "    int uordblks;  /* Total allocated space (bytes) */\n"
1765 "    int fordblks;  /* Total free space (bytes) */\n"
1766 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1767 "};\n"
1768 msgstr ""
1769 "struct mallinfo {\n"
1770 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1771 "    int ordblks;   /* Number of free chunks */\n"
1772 "    int smblks;    /* Number of free fastbin blocks */\n"
1773 "    int hblks;     /* Number of mmapped regions */\n"
1774 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1775 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1776 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1777 "    int uordblks;  /* Total allocated space (bytes) */\n"
1778 "    int fordblks;  /* Total free space (bytes) */\n"
1779 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1780 "};\n"
1781
1782 #. type: Plain text
1783 #: build/C/man3/mallinfo.3:62
1784 msgid ""
1785 "The fields of the I<mallinfo> structure contain the following information:"
1786 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1787
1788 #. type: TP
1789 #: build/C/man3/mallinfo.3:62
1790 #, no-wrap
1791 msgid "I<arena>"
1792 msgstr "I<arena>"
1793
1794 #. type: Plain text
1795 #: build/C/man3/mallinfo.3:68
1796 msgid ""
1797 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1798 "memory allocated on the heap).  This figure includes both in-use blocks and "
1799 "blocks on the free list."
1800 msgstr ""
1801
1802 #. type: TP
1803 #: build/C/man3/mallinfo.3:68
1804 #, no-wrap
1805 msgid "I<ordblks>"
1806 msgstr "I<ordblks>"
1807
1808 #. type: Plain text
1809 #: build/C/man3/mallinfo.3:71
1810 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1811 msgstr ""
1812
1813 #. type: TP
1814 #: build/C/man3/mallinfo.3:71
1815 #, no-wrap
1816 msgid "I<smblks>"
1817 msgstr "I<smblks>"
1818
1819 #. type: Plain text
1820 #: build/C/man3/mallinfo.3:75
1821 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1822 msgstr ""
1823
1824 #. type: TP
1825 #: build/C/man3/mallinfo.3:75
1826 #, no-wrap
1827 msgid "I<hblks>"
1828 msgstr "I<hblks>"
1829
1830 #. type: Plain text
1831 #: build/C/man3/mallinfo.3:83
1832 msgid ""
1833 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1834 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1835 msgstr ""
1836
1837 #. type: TP
1838 #: build/C/man3/mallinfo.3:83
1839 #, no-wrap
1840 msgid "I<hblkhd>"
1841 msgstr "I<hblkhd>"
1842
1843 #. type: Plain text
1844 #: build/C/man3/mallinfo.3:87
1845 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1846 msgstr ""
1847
1848 #. type: TP
1849 #: build/C/man3/mallinfo.3:87
1850 #, no-wrap
1851 msgid "I<usmblks>"
1852 msgstr "I<usmblks>"
1853
1854 #. type: Plain text
1855 #: build/C/man3/mallinfo.3:92
1856 msgid ""
1857 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1858 "of space that was ever allocated.  This field is maintained only in "
1859 "nonthreading environments."
1860 msgstr ""
1861
1862 #. type: TP
1863 #: build/C/man3/mallinfo.3:92
1864 #, no-wrap
1865 msgid "I<fsmblks>"
1866 msgstr "I<fsmblks>"
1867
1868 #. type: Plain text
1869 #: build/C/man3/mallinfo.3:95
1870 msgid "The total number of bytes in fastbin free blocks."
1871 msgstr ""
1872
1873 #. type: TP
1874 #: build/C/man3/mallinfo.3:95
1875 #, no-wrap
1876 msgid "I<uordblks>"
1877 msgstr "I<uordblks>"
1878
1879 #. type: Plain text
1880 #: build/C/man3/mallinfo.3:98
1881 msgid "The total number of bytes used by in-use allocations."
1882 msgstr ""
1883
1884 #. type: TP
1885 #: build/C/man3/mallinfo.3:98
1886 #, no-wrap
1887 msgid "I<fordblks>"
1888 msgstr "I<fordblks>"
1889
1890 #. type: Plain text
1891 #: build/C/man3/mallinfo.3:101
1892 msgid "The total number of bytes in free blocks."
1893 msgstr ""
1894
1895 #. type: TP
1896 #: build/C/man3/mallinfo.3:101
1897 #, no-wrap
1898 msgid "I<keepcost>"
1899 msgstr "I<keepcost>"
1900
1901 #.  .SH VERSIONS
1902 #.  Available already in glibc 2.0, possibly earlier
1903 #. type: Plain text
1904 #: build/C/man3/mallinfo.3:110
1905 msgid ""
1906 "The total amount of releasable free space at the top of the heap.  This is "
1907 "the maximum number of bytes that could ideally (i.e., ignoring page "
1908 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1909 msgstr ""
1910
1911 #. type: Plain text
1912 #: build/C/man3/mallinfo.3:114
1913 msgid ""
1914 "This function is not specified by POSIX or the C standards.  A similar "
1915 "function exists on many System V derivatives, and was specified in the SVID."
1916 msgstr ""
1917
1918 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1919 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1920 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1921 #.  on libc-alpha@sourceware.org
1922 #. type: Plain text
1923 #: build/C/man3/mallinfo.3:126
1924 msgid ""
1925 "B<Information is returned for only the main memory allocation area.> "
1926 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1927 "B<malloc_info>(3)  for alternatives that include information about other "
1928 "arenas."
1929 msgstr ""
1930
1931 #. type: Plain text
1932 #: build/C/man3/mallinfo.3:134
1933 msgid ""
1934 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1935 "because some internal bookkeeping values may be of type I<long>, the "
1936 "reported values may wrap around zero and thus be inaccurate."
1937 msgstr ""
1938
1939 #. type: SH
1940 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1941 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
1942 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1943 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1944 #, no-wrap
1945 msgid "EXAMPLE"
1946 msgstr "例"
1947
1948 #. type: Plain text
1949 #: build/C/man3/mallinfo.3:140
1950 msgid ""
1951 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1952 "statistics before and after allocating and freeing some blocks of memory.  "
1953 "The statistics are displayed on standard output."
1954 msgstr ""
1955
1956 #. type: Plain text
1957 #: build/C/man3/mallinfo.3:144
1958 msgid ""
1959 "The first two command-line arguments specify the number and size of blocks "
1960 "to be allocated with B<malloc>(3)."
1961 msgstr ""
1962
1963 #. type: Plain text
1964 #: build/C/man3/mallinfo.3:158
1965 msgid ""
1966 "The remaining three arguments specify which of the allocated blocks should "
1967 "be freed with B<free>(3).  These three arguments are optional, and specify "
1968 "(in order): the step size to be used in the loop that frees blocks (the "
1969 "default is 1, meaning free all blocks in the range); the ordinal position of "
1970 "the first block to be freed (default 0, meaning the first allocated block); "
1971 "and a number one greater than the ordinal position of the last block to be "
1972 "freed (default is one greater than the maximum block number).  If these "
1973 "three arguments are omitted, then the defaults cause all allocated blocks to "
1974 "be freed."
1975 msgstr ""
1976
1977 #. type: Plain text
1978 #: build/C/man3/mallinfo.3:162
1979 msgid ""
1980 "In the following example run of the program, 1000 allocations of 100 bytes "
1981 "are performed, and then every second allocated block is freed:"
1982 msgstr ""
1983
1984 #. type: Plain text
1985 #: build/C/man3/mallinfo.3:177
1986 #, no-wrap
1987 msgid ""
1988 "$ B<./a.out 1000 100 2>\n"
1989 "============== Before allocating blocks ==============\n"
1990 "Total non-mmapped bytes (arena):       0\n"
1991 "# of free chunks (ordblks):            1\n"
1992 "# of free fastbin blocks (smblks):     0\n"
1993 "# of mapped regions (hblks):           0\n"
1994 "Bytes in mapped regions (hblkhd):      0\n"
1995 "Max. total allocated space (usmblks):  0\n"
1996 "Free bytes held in fastbins (fsmblks): 0\n"
1997 "Total allocated space (uordblks):      0\n"
1998 "Total free space (fordblks):           0\n"
1999 "Topmost releasable block (keepcost):   0\n"
2000 msgstr ""
2001 "$ B<./a.out 1000 100 2>\n"
2002 "============== Before allocating blocks ==============\n"
2003 "Total non-mmapped bytes (arena):       0\n"
2004 "# of free chunks (ordblks):            1\n"
2005 "# of free fastbin blocks (smblks):     0\n"
2006 "# of mapped regions (hblks):           0\n"
2007 "Bytes in mapped regions (hblkhd):      0\n"
2008 "Max. total allocated space (usmblks):  0\n"
2009 "Free bytes held in fastbins (fsmblks): 0\n"
2010 "Total allocated space (uordblks):      0\n"
2011 "Total free space (fordblks):           0\n"
2012 "Topmost releasable block (keepcost):   0\n"
2013
2014 #. type: Plain text
2015 #: build/C/man3/mallinfo.3:189
2016 #, no-wrap
2017 msgid ""
2018 "============== After allocating blocks ==============\n"
2019 "Total non-mmapped bytes (arena):       135168\n"
2020 "# of free chunks (ordblks):            1\n"
2021 "# of free fastbin blocks (smblks):     0\n"
2022 "# of mapped regions (hblks):           0\n"
2023 "Bytes in mapped regions (hblkhd):      0\n"
2024 "Max. total allocated space (usmblks):  0\n"
2025 "Free bytes held in fastbins (fsmblks): 0\n"
2026 "Total allocated space (uordblks):      104000\n"
2027 "Total free space (fordblks):           31168\n"
2028 "Topmost releasable block (keepcost):   31168\n"
2029 msgstr ""
2030 "============== After allocating blocks ==============\n"
2031 "Total non-mmapped bytes (arena):       135168\n"
2032 "# of free chunks (ordblks):            1\n"
2033 "# of free fastbin blocks (smblks):     0\n"
2034 "# of mapped regions (hblks):           0\n"
2035 "Bytes in mapped regions (hblkhd):      0\n"
2036 "Max. total allocated space (usmblks):  0\n"
2037 "Free bytes held in fastbins (fsmblks): 0\n"
2038 "Total allocated space (uordblks):      104000\n"
2039 "Total free space (fordblks):           31168\n"
2040 "Topmost releasable block (keepcost):   31168\n"
2041
2042 #. type: Plain text
2043 #: build/C/man3/mallinfo.3:201
2044 #, no-wrap
2045 msgid ""
2046 "============== After freeing blocks ==============\n"
2047 "Total non-mmapped bytes (arena):       135168\n"
2048 "# of free chunks (ordblks):            501\n"
2049 "# of free fastbin blocks (smblks):     0\n"
2050 "# of mapped regions (hblks):           0\n"
2051 "Bytes in mapped regions (hblkhd):      0\n"
2052 "Max. total allocated space (usmblks):  0\n"
2053 "Free bytes held in fastbins (fsmblks): 0\n"
2054 "Total allocated space (uordblks):      52000\n"
2055 "Total free space (fordblks):           83168\n"
2056 "Topmost releasable block (keepcost):   31168\n"
2057 msgstr ""
2058 "============== After freeing blocks ==============\n"
2059 "Total non-mmapped bytes (arena):       135168\n"
2060 "# of free chunks (ordblks):            501\n"
2061 "# of free fastbin blocks (smblks):     0\n"
2062 "# of mapped regions (hblks):           0\n"
2063 "Bytes in mapped regions (hblkhd):      0\n"
2064 "Max. total allocated space (usmblks):  0\n"
2065 "Free bytes held in fastbins (fsmblks): 0\n"
2066 "Total allocated space (uordblks):      52000\n"
2067 "Total free space (fordblks):           83168\n"
2068 "Topmost releasable block (keepcost):   31168\n"
2069
2070 #. type: SS
2071 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2072 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2073 #: build/C/man2/mprotect.2:165
2074 #, no-wrap
2075 msgid "Program source"
2076 msgstr "プログラムのソース"
2077
2078 #. type: Plain text
2079 #: build/C/man3/mallinfo.3:208
2080 #, no-wrap
2081 msgid ""
2082 "#include E<lt>malloc.hE<gt>\n"
2083 "#include \"tlpi_hdr.h\"\n"
2084 msgstr ""
2085 "#include E<lt>malloc.hE<gt>\n"
2086 "#include \"tlpi_hdr.h\"\n"
2087
2088 #. type: Plain text
2089 #: build/C/man3/mallinfo.3:213
2090 #, no-wrap
2091 msgid ""
2092 "static void\n"
2093 "display_mallinfo(void)\n"
2094 "{\n"
2095 "    struct mallinfo mi;\n"
2096 msgstr ""
2097 "static void\n"
2098 "display_mallinfo(void)\n"
2099 "{\n"
2100 "    struct mallinfo mi;\n"
2101
2102 #. type: Plain text
2103 #: build/C/man3/mallinfo.3:215
2104 #, no-wrap
2105 msgid "    mi = mallinfo();\n"
2106 msgstr "    mi = mallinfo();\n"
2107
2108 #. type: Plain text
2109 #: build/C/man3/mallinfo.3:227
2110 #, no-wrap
2111 msgid ""
2112 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2113 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2114 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2115 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2116 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2117 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2118 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2119 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2120 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2121 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2122 "}\n"
2123 msgstr ""
2124 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2125 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2126 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2127 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2128 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2129 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2130 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2131 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2132 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2133 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2134 "}\n"
2135
2136 #. type: Plain text
2137 #: build/C/man3/mallinfo.3:235
2138 #, no-wrap
2139 msgid ""
2140 "int\n"
2141 "main(int argc, char *argv[])\n"
2142 "{\n"
2143 "#define MAX_ALLOCS 2000000\n"
2144 "    char *alloc[MAX_ALLOCS];\n"
2145 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2146 "    size_t blockSize;\n"
2147 msgstr ""
2148 "int\n"
2149 "main(int argc, char *argv[])\n"
2150 "{\n"
2151 "#define MAX_ALLOCS 2000000\n"
2152 "    char *alloc[MAX_ALLOCS];\n"
2153 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2154 "    size_t blockSize;\n"
2155
2156 #. type: Plain text
2157 #: build/C/man3/mallinfo.3:239
2158 #, no-wrap
2159 msgid ""
2160 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2161 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2162 "                \"[end-free]]]\\en\", argv[0]);\n"
2163 msgstr ""
2164 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2165 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2166 "                \"[end-free]]]\\en\", argv[0]);\n"
2167
2168 #. type: Plain text
2169 #: build/C/man3/mallinfo.3:245
2170 #, no-wrap
2171 msgid ""
2172 "    numBlocks = atoi(argv[1]);\n"
2173 "    blockSize = atoi(argv[2]);\n"
2174 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2175 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2176 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2177 msgstr ""
2178 "    numBlocks = atoi(argv[1]);\n"
2179 "    blockSize = atoi(argv[2]);\n"
2180 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2181 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2182 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2183
2184 #. type: Plain text
2185 #: build/C/man3/mallinfo.3:248
2186 #, no-wrap
2187 msgid ""
2188 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2189 "    display_mallinfo();\n"
2190 msgstr ""
2191 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2192 "    display_mallinfo();\n"
2193
2194 #. type: Plain text
2195 #: build/C/man3/mallinfo.3:252
2196 #, no-wrap
2197 msgid ""
2198 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2199 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2200 "            fatal(\"Too many allocations\");\n"
2201 msgstr ""
2202 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2203 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2204 "            fatal(\"Too many allocations\");\n"
2205
2206 #. type: Plain text
2207 #: build/C/man3/mallinfo.3:257
2208 #, no-wrap
2209 msgid ""
2210 "        alloc[j] = malloc(blockSize);\n"
2211 "        if (alloc[j] == NULL)\n"
2212 "            errExit(\"malloc\");\n"
2213 "    }\n"
2214 msgstr ""
2215 "        alloc[j] = malloc(blockSize);\n"
2216 "        if (alloc[j] == NULL)\n"
2217 "            errExit(\"malloc\");\n"
2218 "    }\n"
2219
2220 #. type: Plain text
2221 #: build/C/man3/mallinfo.3:260
2222 #, no-wrap
2223 msgid ""
2224 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2225 "    display_mallinfo();\n"
2226 msgstr ""
2227 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2228 "    display_mallinfo();\n"
2229
2230 #. type: Plain text
2231 #: build/C/man3/mallinfo.3:263
2232 #, no-wrap
2233 msgid ""
2234 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2235 "        free(alloc[j]);\n"
2236 msgstr ""
2237 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2238 "        free(alloc[j]);\n"
2239
2240 #. type: Plain text
2241 #: build/C/man3/mallinfo.3:266
2242 #, no-wrap
2243 msgid ""
2244 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2245 "    display_mallinfo();\n"
2246 msgstr ""
2247 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2248 "    display_mallinfo();\n"
2249
2250 #. type: Plain text
2251 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2252 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2253 #: build/C/man2/mmap.2:711
2254 #, no-wrap
2255 msgid ""
2256 "    exit(EXIT_SUCCESS);\n"
2257 "}\n"
2258 msgstr ""
2259 "    exit(EXIT_SUCCESS);\n"
2260 "}\n"
2261
2262 #. type: Plain text
2263 #: build/C/man3/mallinfo.3:279
2264 msgid ""
2265 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2266 "B<malloc_trim>(3), B<mallopt>(3)"
2267 msgstr ""
2268 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2269 "B<malloc_trim>(3), B<mallopt>(3)"
2270
2271 #. type: TH
2272 #: build/C/man3/malloc_get_state.3:25
2273 #, no-wrap
2274 msgid "MALLOC_GET_STATE"
2275 msgstr "MALLOC_GET_STATE"
2276
2277 #. type: TH
2278 #: build/C/man3/malloc_get_state.3:25
2279 #, no-wrap
2280 msgid "2012-05-04"
2281 msgstr "2012-05-04"
2282
2283 #. type: Plain text
2284 #: build/C/man3/malloc_get_state.3:28
2285 msgid ""
2286 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2287 "implementation"
2288 msgstr ""
2289
2290 #. type: Plain text
2291 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2292 #, no-wrap
2293 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2294 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2295
2296 #. type: Plain text
2297 #: build/C/man3/malloc_get_state.3:33
2298 #, no-wrap
2299 msgid "B<void* malloc_get_state(void);>\n"
2300 msgstr "B<void* malloc_get_state(void);>\n"
2301
2302 #. type: Plain text
2303 #: build/C/man3/malloc_get_state.3:35
2304 #, no-wrap
2305 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2306 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2307
2308 #. type: Plain text
2309 #: build/C/man3/malloc_get_state.3:53
2310 msgid ""
2311 "The B<malloc_get_state>()  function records the current state of all "
2312 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2313 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2314 "is recorded in a system-dependent opaque data structure dynamically "
2315 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2316 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2317 "this memory.)"
2318 msgstr ""
2319
2320 #. type: Plain text
2321 #: build/C/man3/malloc_get_state.3:61
2322 msgid ""
2323 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2324 "internal bookkeeping variables to the values recorded in the opaque data "
2325 "structure pointed to by I<state>."
2326 msgstr ""
2327
2328 #. type: Plain text
2329 #: build/C/man3/malloc_get_state.3:68
2330 msgid ""
2331 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2332 "opaque data structure.  On error (for example, memory could not be allocated "
2333 "for the data structure), B<malloc_get_state>()  returns NULL."
2334 msgstr ""
2335
2336 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2337 #.  /* Must fail if the major version is too high. */
2338 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2339 #. type: Plain text
2340 #: build/C/man3/malloc_get_state.3:86
2341 msgid ""
2342 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2343 "that I<state> does not point to a correctly formed data structure, "
2344 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2345 "version of the data structure referred to by I<state> is a more recent "
2346 "version than this implementation knows about, B<malloc_set_state>()  returns "
2347 "-2."
2348 msgstr ""
2349
2350 #. type: Plain text
2351 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2352 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2353 msgid "These functions are GNU extensions."
2354 msgstr "これらの関数は GNU による拡張である。"
2355
2356 #. type: Plain text
2357 #: build/C/man3/malloc_get_state.3:94
2358 msgid ""
2359 "These functions are especially useful when using this B<malloc>(3)  "
2360 "implementation as part of a shared library, and the heap contents are saved/"
2361 "restored via some other method.  This technique is used by the GNU Emacs to "
2362 "implement its \"dumping\" function."
2363 msgstr ""
2364
2365 #.  i.e., calls __malloc_check_init()
2366 #.  i.e., malloc checking is not already in use
2367 #.  and the caller requested malloc checking
2368 #. type: Plain text
2369 #: build/C/man3/malloc_get_state.3:111
2370 msgid ""
2371 "Hook function pointers are never saved or restored by these functions, with "
2372 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2373 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2374 "checking hooks if possible; if malloc checking was not in use in the "
2375 "recorded state, but the caller has requested malloc checking, then the hooks "
2376 "are reset to 0."
2377 msgstr ""
2378
2379 #. type: Plain text
2380 #: build/C/man3/malloc_get_state.3:114
2381 msgid "B<malloc>(3), B<mallopt>(3)"
2382 msgstr "B<malloc>(3), B<mallopt>(3)"
2383
2384 #. type: TH
2385 #: build/C/man3/malloc_hook.3:10
2386 #, no-wrap
2387 msgid "MALLOC_HOOK"
2388 msgstr "MALLOC_HOOK"
2389
2390 #. type: TH
2391 #: build/C/man3/malloc_hook.3:10
2392 #, no-wrap
2393 msgid "2010-10-13"
2394 msgstr "2010-10-13"
2395
2396 #. type: Plain text
2397 #: build/C/man3/malloc_hook.3:15
2398 msgid ""
2399 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2400 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2401 msgstr ""
2402 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2403 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2404
2405 #. type: Plain text
2406 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2407 #: build/C/man3/posix_memalign.3:41
2408 #, no-wrap
2409 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2410 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2411
2412 #. type: Plain text
2413 #: build/C/man3/malloc_hook.3:20
2414 #, no-wrap
2415 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2416 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2417
2418 #. type: Plain text
2419 #: build/C/man3/malloc_hook.3:23
2420 #, no-wrap
2421 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2422 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2423
2424 #. type: Plain text
2425 #: build/C/man3/malloc_hook.3:26
2426 #, no-wrap
2427 msgid ""
2428 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2429 "B<                         const void *>I<caller>B<);>\n"
2430 msgstr ""
2431 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2432 "B<                         const void *>I<caller>B<);>\n"
2433
2434 #. type: Plain text
2435 #: build/C/man3/malloc_hook.3:28
2436 #, no-wrap
2437 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2438 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2439
2440 #. type: Plain text
2441 #: build/C/man3/malloc_hook.3:30
2442 #, no-wrap
2443 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2444 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2445
2446 #. type: Plain text
2447 #: build/C/man3/malloc_hook.3:32
2448 #, no-wrap
2449 msgid "B<void (*__after_morecore_hook)(void);>\n"
2450 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2451
2452 #. type: Plain text
2453 #: build/C/man3/malloc_hook.3:43
2454 msgid ""
2455 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2456 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2457 "these hooks to help you debug programs that use dynamic memory allocation, "
2458 "for example."
2459 msgstr ""
2460 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2461 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2462 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2463 "ができる。"
2464
2465 #. type: Plain text
2466 #: build/C/man3/malloc_hook.3:50
2467 msgid ""
2468 "The variable B<__malloc_initialize_hook> points at a function that is called "
2469 "once when the malloc implementation is initialized.  This is a weak "
2470 "variable, so it can be overridden in the application with a definition like "
2471 "the following:"
2472 msgstr ""
2473 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2474 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2475 "ケーション内で 以下のような定義で上書きできる:"
2476
2477 #. type: Plain text
2478 #: build/C/man3/malloc_hook.3:53
2479 #, no-wrap
2480 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2481 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2482
2483 #. type: Plain text
2484 #: build/C/man3/malloc_hook.3:58
2485 msgid ""
2486 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2487 msgstr ""
2488 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2489
2490 #. type: Plain text
2491 #: build/C/man3/malloc_hook.3:74
2492 msgid ""
2493 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2494 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2495 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2496 "except that they have a final argument I<caller> that gives the address of "
2497 "the caller of B<malloc>(3), etc."
2498 msgstr ""
2499 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2500 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2501 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2502 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2503 "出し元 (caller) のアドレスが格納される。"
2504
2505 #. type: Plain text
2506 #: build/C/man3/malloc_hook.3:80
2507 msgid ""
2508 "The variable B<__after_morecore_hook> points at a function that is called "
2509 "each time after B<sbrk>(2)  was asked for more memory."
2510 msgstr ""
2511 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2512 "後で毎回呼び出される関数へのポインタである。"
2513
2514 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2515 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2516 #. type: Plain text
2517 #: build/C/man3/malloc_hook.3:89
2518 msgid ""
2519 "The use of these hook functions is not safe in multithreaded programs, and "
2520 "they are now deprecated.  Programmers should instead preempt calls to the "
2521 "relevant functions by defining and exporting functions such as \"malloc\" "
2522 "and \"free\"."
2523 msgstr ""
2524 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2525 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2526 "公開して、 関連する関数を呼び出すようにすべきである。"
2527
2528 #. type: Plain text
2529 #: build/C/man3/malloc_hook.3:91
2530 msgid "Here is a short example of how to use these variables."
2531 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2532
2533 #. type: Plain text
2534 #: build/C/man3/malloc_hook.3:95
2535 #, no-wrap
2536 msgid ""
2537 "#include E<lt>stdio.hE<gt>\n"
2538 "#include E<lt>malloc.hE<gt>\n"
2539 msgstr ""
2540 "#include E<lt>stdio.hE<gt>\n"
2541 "#include E<lt>malloc.hE<gt>\n"
2542
2543 #. type: Plain text
2544 #: build/C/man3/malloc_hook.3:99
2545 #, no-wrap
2546 msgid ""
2547 "/* Prototypes for our hooks.  */\n"
2548 "static void my_init_hook(void);\n"
2549 "static void *my_malloc_hook(size_t, const void *);\n"
2550 msgstr ""
2551 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2552 "static void my_init_hook(void);\n"
2553 "static void *my_malloc_hook(size_t, const void *);\n"
2554
2555 #. type: Plain text
2556 #: build/C/man3/malloc_hook.3:102
2557 #, no-wrap
2558 msgid ""
2559 "/* Variables to save original hooks. */\n"
2560 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2561 msgstr ""
2562 "/* 元々のフックを保存するための変数 */\n"
2563 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2564
2565 #. type: Plain text
2566 #: build/C/man3/malloc_hook.3:105
2567 #, no-wrap
2568 msgid ""
2569 "/* Override initializing hook from the C library. */\n"
2570 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2571 msgstr ""
2572 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2573 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2574
2575 #. type: Plain text
2576 #: build/C/man3/malloc_hook.3:112
2577 #, no-wrap
2578 msgid ""
2579 "static void\n"
2580 "my_init_hook(void)\n"
2581 "{\n"
2582 "    old_malloc_hook = __malloc_hook;\n"
2583 "    __malloc_hook = my_malloc_hook;\n"
2584 "}\n"
2585 msgstr ""
2586 "static void\n"
2587 "my_init_hook(void)\n"
2588 "{\n"
2589 "    old_malloc_hook = __malloc_hook;\n"
2590 "    __malloc_hook = my_malloc_hook;\n"
2591 "}\n"
2592
2593 #. type: Plain text
2594 #: build/C/man3/malloc_hook.3:117
2595 #, no-wrap
2596 msgid ""
2597 "static void *\n"
2598 "my_malloc_hook(size_t size, const void *caller)\n"
2599 "{\n"
2600 "    void *result;\n"
2601 msgstr ""
2602 "static void *\n"
2603 "my_malloc_hook(size_t size, const void *caller)\n"
2604 "{\n"
2605 "    void *result;\n"
2606
2607 #. type: Plain text
2608 #: build/C/man3/malloc_hook.3:120
2609 #, no-wrap
2610 msgid ""
2611 "    /* Restore all old hooks */\n"
2612 "    __malloc_hook = old_malloc_hook;\n"
2613 msgstr ""
2614 "    /* 元々のフックを全て戻す */\n"
2615 "    __malloc_hook = old_malloc_hook;\n"
2616
2617 #. type: Plain text
2618 #: build/C/man3/malloc_hook.3:123
2619 #, no-wrap
2620 msgid ""
2621 "    /* Call recursively */\n"
2622 "    result = malloc(size);\n"
2623 msgstr ""
2624 "    /* malloc の再帰的呼び出し */\n"
2625 "    result = malloc(size);\n"
2626
2627 #. type: Plain text
2628 #: build/C/man3/malloc_hook.3:126
2629 #, no-wrap
2630 msgid ""
2631 "    /* Save underlying hooks */\n"
2632 "    old_malloc_hook = __malloc_hook;\n"
2633 msgstr ""
2634 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2635 "    old_malloc_hook = __malloc_hook;\n"
2636
2637 #. type: Plain text
2638 #: build/C/man3/malloc_hook.3:130
2639 #, no-wrap
2640 msgid ""
2641 "    /* printf() might call malloc(), so protect it too. */\n"
2642 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2643 "            (unsigned int) size, caller, result);\n"
2644 msgstr ""
2645 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2646 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2647 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2648 "            (unsigned int) size, caller, result);\n"
2649
2650 #. type: Plain text
2651 #: build/C/man3/malloc_hook.3:133
2652 #, no-wrap
2653 msgid ""
2654 "    /* Restore our own hooks */\n"
2655 "    __malloc_hook = my_malloc_hook;\n"
2656 msgstr ""
2657 "    /* ユーザが使おうとするフックを再設定する */\n"
2658 "    __malloc_hook = my_malloc_hook;\n"
2659
2660 #. type: Plain text
2661 #: build/C/man3/malloc_hook.3:136
2662 #, no-wrap
2663 msgid ""
2664 "    return result;\n"
2665 "}\n"
2666 msgstr ""
2667 "    return result;\n"
2668 "}\n"
2669
2670 #. type: Plain text
2671 #: build/C/man3/malloc_hook.3:142
2672 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2673 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2674
2675 #. type: TH
2676 #: build/C/man3/malloc_info.3:25
2677 #, no-wrap
2678 msgid "MALLOC_INFO"
2679 msgstr "MALLOC_INFO"
2680
2681 #. type: TH
2682 #: build/C/man3/malloc_info.3:25 build/C/man2/shmget.2:38
2683 #, no-wrap
2684 msgid "2013-04-19"
2685 msgstr "2013-04-19"
2686
2687 #. type: Plain text
2688 #: build/C/man3/malloc_info.3:28
2689 msgid "malloc_info - export malloc state to a stream"
2690 msgstr "malloc_info - malloc の状態をストリームに出力する"
2691
2692 #. type: Plain text
2693 #: build/C/man3/malloc_info.3:33
2694 #, no-wrap
2695 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2696 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2697
2698 #. type: Plain text
2699 #: build/C/man3/malloc_info.3:44
2700 msgid ""
2701 "The B<malloc_info>()  function exports an XML string that describes the "
2702 "current state of the memory-allocation implementation in the caller.  The "
2703 "string is printed on the file stream I<fp>.  The exported string includes "
2704 "information about all arenas (see B<malloc>(3))."
2705 msgstr ""
2706 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
2707 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
2708 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
2709
2710 #. type: Plain text
2711 #: build/C/man3/malloc_info.3:48
2712 msgid "As currently implemented, I<options> must be zero."
2713 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
2714
2715 #. type: Plain text
2716 #: build/C/man3/malloc_info.3:55
2717 msgid ""
2718 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
2719 "I<errno> set to indicate the cause."
2720 msgstr ""
2721 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
2722 "I<errno> にエラーの原因を示す値を設定する。"
2723
2724 #. type: Plain text
2725 #: build/C/man3/malloc_info.3:60
2726 msgid "I<options> was nonzero."
2727 msgstr "I<options> が 0 でなかった。"
2728
2729 #. type: Plain text
2730 #: build/C/man3/malloc_info.3:63
2731 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2732 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2733
2734 #. type: Plain text
2735 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2736 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2737 msgid "This function is a GNU extension."
2738 msgstr "この関数は GNU による拡張である。"
2739
2740 #. type: Plain text
2741 #: build/C/man3/malloc_info.3:71
2742 msgid ""
2743 "The memory-allocation information is provided as an XML string (rather than "
2744 "a C structure)  because the information may change over time (according to "
2745 "changes in the underlying implementation).  The output XML string includes a "
2746 "version field."
2747 msgstr ""
2748 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
2749 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
2750 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
2751
2752 #. type: Plain text
2753 #: build/C/man3/malloc_info.3:77
2754 msgid ""
2755 "The B<open_memstream>(3)  function can be used to send the output of "
2756 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2757 msgstr ""
2758 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
2759 "なくメモリ内のバッファに直接送ることができる。"
2760
2761 #. type: Plain text
2762 #: build/C/man3/malloc_info.3:84
2763 msgid ""
2764 "The B<malloc_info>()  function is designed to address deficiencies in "
2765 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2766 msgstr ""
2767 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
2768 "るために設定された。"
2769
2770 #. type: Plain text
2771 #: build/C/man3/malloc_info.3:95
2772 msgid ""
2773 "The program below takes up to four command-line arguments, of which the "
2774 "first three are mandatory.  The first argument specifies the number of "
2775 "threads that the program should create.  All of the threads, including the "
2776 "main thread, allocate the number of blocks of memory specified by the second "
2777 "argument.  The third argument controls the size of the blocks to be "
2778 "allocated.  The main thread creates blocks of this size, the second thread "
2779 "created by the program allocates blocks of twice this size, the third thread "
2780 "allocates blocks of three times this size, and so on."
2781 msgstr ""
2782
2783 #. type: Plain text
2784 #: build/C/man3/malloc_info.3:102
2785 msgid ""
2786 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2787 "state.  The first call takes place before any threads are created or memory "
2788 "allocated.  The second call is performed after all threads have allocated "
2789 "memory."
2790 msgstr ""
2791
2792 #. type: Plain text
2793 #: build/C/man3/malloc_info.3:110
2794 msgid ""
2795 "In the following example, the command-line arguments specify the creation of "
2796 "one additional thread, and both the main thread and the additional thread "
2797 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2798 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2799 msgstr ""
2800
2801 #. type: Plain text
2802 #: build/C/man3/malloc_info.3:135
2803 #, no-wrap
2804 msgid ""
2805 "$ B<getconf GNU_LIBC_VERSION>\n"
2806 "glibc 2.13\n"
2807 "$ B<./a.out 1 10000 100>\n"
2808 "============ Before allocating blocks ============\n"
2809 "E<lt>malloc version=\"1\"E<gt>\n"
2810 "E<lt>heap nr=\"0\"E<gt>\n"
2811 "E<lt>sizesE<gt>\n"
2812 "E<lt>/sizesE<gt>\n"
2813 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2814 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2815 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2816 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2817 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2818 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2819 "E<lt>/heapE<gt>\n"
2820 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2821 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2822 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2823 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2824 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2825 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2826 "E<lt>/mallocE<gt>\n"
2827 msgstr ""
2828 "$ B<getconf GNU_LIBC_VERSION>\n"
2829 "glibc 2.13\n"
2830 "$ B<./a.out 1 10000 100>\n"
2831 "============ Before allocating blocks ============\n"
2832 "E<lt>malloc version=\"1\"E<gt>\n"
2833 "E<lt>heap nr=\"0\"E<gt>\n"
2834 "E<lt>sizesE<gt>\n"
2835 "E<lt>/sizesE<gt>\n"
2836 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2837 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2838 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2839 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2840 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2841 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2842 "E<lt>/heapE<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=\"135168\"/E<gt>\n"
2846 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2847 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2848 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2849 "E<lt>/mallocE<gt>\n"
2850
2851 #. type: Plain text
2852 #: build/C/man3/malloc_info.3:165
2853 #, no-wrap
2854 msgid ""
2855 "============ After allocating blocks ============\n"
2856 "E<lt>malloc version=\"1\"E<gt>\n"
2857 "E<lt>heap nr=\"0\"E<gt>\n"
2858 "E<lt>sizesE<gt>\n"
2859 "E<lt>/sizesE<gt>\n"
2860 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2861 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2862 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2863 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2864 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2865 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2866 "E<lt>/heapE<gt>\n"
2867 "E<lt>heap nr=\"1\"E<gt>\n"
2868 "E<lt>sizesE<gt>\n"
2869 "E<lt>/sizesE<gt>\n"
2870 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2871 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2872 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2873 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2874 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2875 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2876 "E<lt>/heapE<gt>\n"
2877 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2878 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2879 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2880 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2881 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2882 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2883 "E<lt>/mallocE<gt>\n"
2884 msgstr ""
2885 "============ After allocating blocks ============\n"
2886 "E<lt>malloc version=\"1\"E<gt>\n"
2887 "E<lt>heap nr=\"0\"E<gt>\n"
2888 "E<lt>sizesE<gt>\n"
2889 "E<lt>/sizesE<gt>\n"
2890 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2891 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2892 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2893 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2894 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2895 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2896 "E<lt>/heapE<gt>\n"
2897 "E<lt>heap nr=\"1\"E<gt>\n"
2898 "E<lt>sizesE<gt>\n"
2899 "E<lt>/sizesE<gt>\n"
2900 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2901 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2902 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2903 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2904 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2905 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2906 "E<lt>/heapE<gt>\n"
2907 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2908 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2909 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2910 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2911 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2912 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2913 "E<lt>/mallocE<gt>\n"
2914
2915 #. type: Plain text
2916 #: build/C/man3/malloc_info.3:175
2917 #, no-wrap
2918 msgid ""
2919 "#include E<lt>unistd.hE<gt>\n"
2920 "#include E<lt>stdlib.hE<gt>\n"
2921 "#include E<lt>pthread.hE<gt>\n"
2922 "#include E<lt>malloc.hE<gt>\n"
2923 "#include E<lt>errno.hE<gt>\n"
2924 msgstr ""
2925 "#include E<lt>unistd.hE<gt>\n"
2926 "#include E<lt>stdlib.hE<gt>\n"
2927 "#include E<lt>pthread.hE<gt>\n"
2928 "#include E<lt>malloc.hE<gt>\n"
2929 "#include E<lt>errno.hE<gt>\n"
2930
2931 #. type: Plain text
2932 #: build/C/man3/malloc_info.3:178
2933 #, no-wrap
2934 msgid ""
2935 "static size_t blockSize;\n"
2936 "static int numThreads, numBlocks;\n"
2937 msgstr ""
2938 "static size_t blockSize;\n"
2939 "static int numThreads, numBlocks;\n"
2940
2941 #. type: Plain text
2942 #: build/C/man3/malloc_info.3:181
2943 #, no-wrap
2944 msgid ""
2945 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2946 "                        } while (0)\n"
2947 msgstr ""
2948 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2949 "                        } while (0)\n"
2950
2951 #. type: Plain text
2952 #: build/C/man3/malloc_info.3:187
2953 #, no-wrap
2954 msgid ""
2955 "static void *\n"
2956 "thread_func(void *arg)\n"
2957 "{\n"
2958 "    int j;\n"
2959 "    int tn = (int) arg;\n"
2960 msgstr ""
2961 "static void *\n"
2962 "thread_func(void *arg)\n"
2963 "{\n"
2964 "    int j;\n"
2965 "    int tn = (int) arg;\n"
2966
2967 #. type: Plain text
2968 #: build/C/man3/malloc_info.3:190
2969 #, no-wrap
2970 msgid ""
2971 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2972 "       the main thread) allocates a different amount of memory */\n"
2973 msgstr ""
2974 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2975 "       the main thread) allocates a different amount of memory */\n"
2976
2977 #. type: Plain text
2978 #: build/C/man3/malloc_info.3:194
2979 #, no-wrap
2980 msgid ""
2981 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2982 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2983 "            errExit(\"malloc-thread\");\n"
2984 msgstr ""
2985 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2986 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2987 "            errExit(\"malloc-thread\");\n"
2988
2989 #. type: Plain text
2990 #: build/C/man3/malloc_info.3:198
2991 #, no-wrap
2992 msgid ""
2993 "    sleep(100);         /* Sleep until main thread terminates */\n"
2994 "    return NULL;\n"
2995 "}\n"
2996 msgstr ""
2997 "    sleep(100);         /* Sleep until main thread terminates */\n"
2998 "    return NULL;\n"
2999 "}\n"
3000
3001 #. type: Plain text
3002 #: build/C/man3/malloc_info.3:204
3003 #, no-wrap
3004 msgid ""
3005 "int\n"
3006 "main(int argc, char *argv[])\n"
3007 "{\n"
3008 "    int j, tn, sleepTime;\n"
3009 "    pthread_t *thr;\n"
3010 msgstr ""
3011 "int\n"
3012 "main(int argc, char *argv[])\n"
3013 "{\n"
3014 "    int j, tn, sleepTime;\n"
3015 "    pthread_t *thr;\n"
3016
3017 #. type: Plain text
3018 #: build/C/man3/malloc_info.3:211
3019 #, no-wrap
3020 msgid ""
3021 "    if (argc E<lt> 4) {\n"
3022 "        fprintf(stderr,\n"
3023 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3024 "                argv[0]);\n"
3025 "        exit(EXIT_FAILURE);\n"
3026 "    }\n"
3027 msgstr ""
3028 "    if (argc E<lt> 4) {\n"
3029 "        fprintf(stderr,\n"
3030 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3031 "                argv[0]);\n"
3032 "        exit(EXIT_FAILURE);\n"
3033 "    }\n"
3034
3035 #. type: Plain text
3036 #: build/C/man3/malloc_info.3:216
3037 #, no-wrap
3038 msgid ""
3039 "    numThreads = atoi(argv[1]);\n"
3040 "    numBlocks = atoi(argv[2]);\n"
3041 "    blockSize = atoi(argv[3]);\n"
3042 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3043 msgstr ""
3044 "    numThreads = atoi(argv[1]);\n"
3045 "    numBlocks = atoi(argv[2]);\n"
3046 "    blockSize = atoi(argv[3]);\n"
3047 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3048
3049 #. type: Plain text
3050 #: build/C/man3/malloc_info.3:220
3051 #, no-wrap
3052 msgid ""
3053 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3054 "    if (thr == NULL)\n"
3055 "        errExit(\"calloc\");\n"
3056 msgstr ""
3057 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3058 "    if (thr == NULL)\n"
3059 "        errExit(\"calloc\");\n"
3060
3061 #. type: Plain text
3062 #: build/C/man3/malloc_info.3:223
3063 #, no-wrap
3064 msgid ""
3065 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3066 "    malloc_info(0, stdout);\n"
3067 msgstr ""
3068 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3069 "    malloc_info(0, stdout);\n"
3070
3071 #. type: Plain text
3072 #: build/C/man3/malloc_info.3:225
3073 #, no-wrap
3074 msgid "    /* Create threads that allocate different amounts of memory */\n"
3075 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3076
3077 #. type: Plain text
3078 #: build/C/man3/malloc_info.3:231
3079 #, no-wrap
3080 msgid ""
3081 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3082 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3083 "                               (void *) tn);\n"
3084 "        if (errno != 0)\n"
3085 "            errExit(\"pthread_create\");\n"
3086 msgstr ""
3087 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3088 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3089 "                               (void *) tn);\n"
3090 "        if (errno != 0)\n"
3091 "            errExit(\"pthread_create\");\n"
3092
3093 #. type: Plain text
3094 #: build/C/man3/malloc_info.3:236
3095 #, no-wrap
3096 msgid ""
3097 "        /* If we add a sleep interval after the start-up of each\n"
3098 "           thread, the threads likely won\\(aqt contend for malloc\n"
3099 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3100 "           allocated (see malloc(3)). */\n"
3101 msgstr ""
3102 "        /* If we add a sleep interval after the start-up of each\n"
3103 "           thread, the threads likely won\\(aqt contend for malloc\n"
3104 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3105 "           allocated (see malloc(3)). */\n"
3106
3107 #. type: Plain text
3108 #: build/C/man3/malloc_info.3:240
3109 #, no-wrap
3110 msgid ""
3111 "        if (sleepTime E<gt> 0)\n"
3112 "            sleep(sleepTime);\n"
3113 "    }\n"
3114 msgstr ""
3115 "        if (sleepTime E<gt> 0)\n"
3116 "            sleep(sleepTime);\n"
3117 "    }\n"
3118
3119 #. type: Plain text
3120 #: build/C/man3/malloc_info.3:242
3121 #, no-wrap
3122 msgid "    /* The main thread also allocates some memory */\n"
3123 msgstr "    /* The main thread also allocates some memory */\n"
3124
3125 #. type: Plain text
3126 #: build/C/man3/malloc_info.3:246
3127 #, no-wrap
3128 msgid ""
3129 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3130 "        if (malloc(blockSize) == NULL)\n"
3131 "            errExit(\"malloc\");\n"
3132 msgstr ""
3133 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3134 "        if (malloc(blockSize) == NULL)\n"
3135 "            errExit(\"malloc\");\n"
3136
3137 #. type: Plain text
3138 #: build/C/man3/malloc_info.3:249
3139 #, no-wrap
3140 msgid ""
3141 "    sleep(2);           /* Give all threads a chance to\n"
3142 "                           complete allocations */\n"
3143 msgstr ""
3144 "    sleep(2);           /* Give all threads a chance to\n"
3145 "                           complete allocations */\n"
3146
3147 #. type: Plain text
3148 #: build/C/man3/malloc_info.3:252
3149 #, no-wrap
3150 msgid ""
3151 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3152 "    malloc_info(0, stdout);\n"
3153 msgstr ""
3154 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3155 "    malloc_info(0, stdout);\n"
3156
3157 #. type: Plain text
3158 #: build/C/man3/malloc_info.3:262
3159 msgid ""
3160 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3161 "B<open_memstream>(3)"
3162 msgstr ""
3163 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3164 "B<open_memstream>(3)"
3165
3166 #. type: TH
3167 #: build/C/man3/malloc_stats.3:26
3168 #, no-wrap
3169 msgid "MALLOC_STATS"
3170 msgstr "MALLOC_STATS"
3171
3172 #. type: Plain text
3173 #: build/C/man3/malloc_stats.3:29
3174 msgid "malloc_stats - print memory allocation statistics"
3175 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3176
3177 #. type: Plain text
3178 #: build/C/man3/malloc_stats.3:33
3179 msgid "B<void malloc_stats(void);>"
3180 msgstr "B<void malloc_stats(void);>"
3181
3182 #.  .SH VERSIONS
3183 #.  Available already in glibc 2.0, possibly earlier
3184 #. type: Plain text
3185 #: build/C/man3/malloc_stats.3:55
3186 msgid ""
3187 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3188 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3189 "(allocation area), this function prints the total amount of memory allocated "
3190 "and the total number of bytes consumed by in-use allocations.  (These two "
3191 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3192 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3193 "statistics for all arenas, and the maximum number of blocks and bytes that "
3194 "were ever simultaneously allocated using B<mmap>(2)."
3195 msgstr ""
3196 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3197 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3198 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3199 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3200 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3201 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3202 "ロック数とバイト数の最大値を表示する。"
3203
3204 #. type: Plain text
3205 #: build/C/man3/malloc_stats.3:61
3206 msgid ""
3207 "More detailed information about memory allocations in the main arena can be "
3208 "obtained using B<mallinfo>(3)."
3209 msgstr ""
3210 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3211 "報を取得できる。"
3212
3213 #. type: Plain text
3214 #: build/C/man3/malloc_stats.3:67
3215 msgid ""
3216 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3217 msgstr ""
3218 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3219
3220 #. type: TH
3221 #: build/C/man3/malloc_trim.3:26
3222 #, no-wrap
3223 msgid "MALLOC_TRIM"
3224 msgstr "MALLOC_TRIM"
3225
3226 #. type: TH
3227 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3228 #, no-wrap
3229 msgid "2012-03-29"
3230 msgstr "2012-03-29"
3231
3232 #. type: Plain text
3233 #: build/C/man3/malloc_trim.3:29
3234 msgid "malloc_trim - release free memory from the top of the heap"
3235 msgstr ""
3236
3237 #. type: Plain text
3238 #: build/C/man3/malloc_trim.3:33
3239 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3240 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3241
3242 #. type: Plain text
3243 #: build/C/man3/malloc_trim.3:40
3244 msgid ""
3245 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3246 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3247 msgstr ""
3248
3249 #. type: Plain text
3250 #: build/C/man3/malloc_trim.3:51
3251 msgid ""
3252 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3253 "the top of the heap.  If this argument is 0, only the minimum amount of "
3254 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3255 "nonzero argument can be used to maintain some trailing space at the top of "
3256 "the heap in order to allow future allocations to be made without having to "
3257 "extend the heap with B<sbrk>(2)."
3258 msgstr ""
3259
3260 #. type: Plain text
3261 #: build/C/man3/malloc_trim.3:56
3262 msgid ""
3263 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3264 "back to the system, or 0 if it was not possible to release any memory."
3265 msgstr ""
3266
3267 #.  .SH VERSIONS
3268 #.  Available already in glibc 2.0, possibly earlier
3269 #. type: Plain text
3270 #: build/C/man3/malloc_trim.3:60
3271 msgid "No errors are defined."
3272 msgstr ""
3273
3274 #. type: Plain text
3275 #: build/C/man3/malloc_trim.3:71
3276 msgid ""
3277 "This function is automatically called by B<free>(3)  in certain "
3278 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3279 "B<mallopt>(3)."
3280 msgstr ""
3281
3282 #. type: Plain text
3283 #: build/C/man3/malloc_trim.3:74
3284 msgid ""
3285 "This function cannot release free memory located at places other than the "
3286 "top of the heap."
3287 msgstr ""
3288
3289 #.  malloc/malloc.c::mTRIm():
3290 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3291 #. type: Plain text
3292 #: build/C/man3/malloc_trim.3:78
3293 msgid "This function releases only memory in the main arena."
3294 msgstr ""
3295
3296 #. type: Plain text
3297 #: build/C/man3/malloc_trim.3:82
3298 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3299 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3300
3301 #. type: TH
3302 #: build/C/man3/malloc_usable_size.3:25
3303 #, no-wrap
3304 msgid "MALLOC_USABLE_SIZE"
3305 msgstr "MALLOC_USABLE_SIZE"
3306
3307 #. type: Plain text
3308 #: build/C/man3/malloc_usable_size.3:28
3309 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3310 msgstr ""
3311
3312 #. type: Plain text
3313 #: build/C/man3/malloc_usable_size.3:32
3314 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3315 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3316
3317 #. type: Plain text
3318 #: build/C/man3/malloc_usable_size.3:40
3319 msgid ""
3320 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3321 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3322 "B<malloc>(3)  or a related function."
3323 msgstr ""
3324
3325 #. type: Plain text
3326 #: build/C/man3/malloc_usable_size.3:48
3327 msgid ""
3328 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3329 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3330 msgstr ""
3331
3332 #. type: Plain text
3333 #: build/C/man3/malloc_usable_size.3:60
3334 msgid ""
3335 "The value returned by B<malloc_usable_size>()  may be greater than the "
3336 "requested size of the allocation because of alignment and minimum size "
3337 "constraints.  Although the excess bytes can be overwritten by the "
3338 "application without ill effects, this is not good programming practice: the "
3339 "number of excess bytes in an allocation depends on the underlying "
3340 "implementation."
3341 msgstr ""
3342
3343 #. type: Plain text
3344 #: build/C/man3/malloc_usable_size.3:62
3345 msgid "The main use of this function is for debugging and introspection."
3346 msgstr ""
3347
3348 #. type: Plain text
3349 #: build/C/man3/malloc_usable_size.3:64
3350 msgid "B<malloc>(3)"
3351 msgstr "B<malloc>(3)"
3352
3353 #. type: TH
3354 #: build/C/man3/mallopt.3:26
3355 #, no-wrap
3356 msgid "MALLOPT"
3357 msgstr "MALLOPT"
3358
3359 #. type: TH
3360 #: build/C/man3/mallopt.3:26
3361 #, no-wrap
3362 msgid "2012-04-30"
3363 msgstr "2012-04-30"
3364
3365 #. type: Plain text
3366 #: build/C/man3/mallopt.3:29
3367 msgid "mallopt - set memory allocation parameters"
3368 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3369
3370 #. type: Plain text
3371 #: build/C/man3/mallopt.3:33
3372 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3373 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3374
3375 #. type: Plain text
3376 #: build/C/man3/mallopt.3:44
3377 msgid ""
3378 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3379 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3380 "specifies the parameter to be modified, and I<value> specifies the new value "
3381 "for that parameter."
3382 msgstr ""
3383 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3384 "制御するパラメータの調整を行う。\n"
3385 "I<param> 引き数で変更するパラメータを指定し、\n"
3386 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3387
3388 #. type: Plain text
3389 #: build/C/man3/mallopt.3:47
3390 msgid "The following values can be specified for I<param>:"
3391 msgstr "I<param> には以下の値を指定することができる。"
3392
3393 #. type: TP
3394 #: build/C/man3/mallopt.3:47
3395 #, no-wrap
3396 msgid "B<M_CHECK_ACTION>"
3397 msgstr "B<M_CHECK_ACTION>"
3398
3399 #. type: Plain text
3400 #: build/C/man3/mallopt.3:53
3401 msgid ""
3402 "Setting this parameter controls how glibc responds when various kinds of "
3403 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3404 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3405 "parameter determine the glibc behavior, as follows:"
3406 msgstr ""
3407
3408 #. type: TP
3409 #: build/C/man3/mallopt.3:54
3410 #, no-wrap
3411 msgid "Bit 0"
3412 msgstr "Bit 0"
3413
3414 #. type: Plain text
3415 #: build/C/man3/mallopt.3:64
3416 msgid ""
3417 "If this bit is set, then print a one-line message on I<stderr> that provides "
3418 "details about the error.  The message starts with the string \"***\\ glibc "
3419 "detected\\ ***\", followed by the program name, the name of the memory-"
3420 "allocation function in which the error was detected, a brief description of "
3421 "the error, and the memory address where the error was detected."
3422 msgstr ""
3423
3424 #. type: TP
3425 #: build/C/man3/mallopt.3:64
3426 #, no-wrap
3427 msgid "Bit 1"
3428 msgstr "Bit 1"
3429
3430 #. type: Plain text
3431 #: build/C/man3/mallopt.3:79
3432 msgid ""
3433 "If this bit is set, then, after printing any error message specified by bit "
3434 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3435 "since 2.4, if bit 0 is also set, then, between printing the error message "
3436 "and aborting, the program also prints a stack trace in the manner of "
3437 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3438 "proc/[pid]/maps> (see B<proc>(5))."
3439 msgstr ""
3440
3441 #. type: TP
3442 #: build/C/man3/mallopt.3:79
3443 #, no-wrap
3444 msgid "Bit 2 (since glibc 2.4)"
3445 msgstr "Bit 2 (glibc 2.4 以降)"
3446
3447 #. type: Plain text
3448 #: build/C/man3/mallopt.3:86
3449 msgid ""
3450 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3451 "the one-line message describing the error is simplified to contain just the "
3452 "name of the function where the error was detected and the brief description "
3453 "of the error."
3454 msgstr ""
3455
3456 #. type: Plain text
3457 #: build/C/man3/mallopt.3:91
3458 msgid "The remaining bits in I<value> are ignored."
3459 msgstr ""
3460
3461 #. type: Plain text
3462 #: build/C/man3/mallopt.3:95
3463 msgid ""
3464 "Combining the above details, the following numeric values are meaningful for "
3465 "B<M_CHECK_ACTION>:"
3466 msgstr ""
3467
3468 #. type: IP
3469 #: build/C/man3/mallopt.3:96
3470 #, no-wrap
3471 msgid "0"
3472 msgstr "0"
3473
3474 #. type: Plain text
3475 #: build/C/man3/mallopt.3:98
3476 msgid "Ignore error conditions; continue execution (with undefined results)."
3477 msgstr ""
3478
3479 #. type: IP
3480 #: build/C/man3/mallopt.3:98
3481 #, no-wrap
3482 msgid "1"
3483 msgstr "1"
3484
3485 #. type: Plain text
3486 #: build/C/man3/mallopt.3:100
3487 msgid "Print a detailed error message and continue execution."
3488 msgstr ""
3489
3490 #. type: IP
3491 #: build/C/man3/mallopt.3:100
3492 #, no-wrap
3493 msgid "2"
3494 msgstr "2"
3495
3496 #. type: Plain text
3497 #: build/C/man3/mallopt.3:102
3498 msgid "Abort the program."
3499 msgstr ""
3500
3501 #. type: IP
3502 #: build/C/man3/mallopt.3:102
3503 #, no-wrap
3504 msgid "3"
3505 msgstr "3"
3506
3507 #. type: Plain text
3508 #: build/C/man3/mallopt.3:105
3509 msgid ""
3510 "Print detailed error message, stack trace, and memory mappings, and abort "
3511 "the program."
3512 msgstr ""
3513
3514 #. type: IP
3515 #: build/C/man3/mallopt.3:105
3516 #, no-wrap
3517 msgid "5"
3518 msgstr "5"
3519
3520 #. type: Plain text
3521 #: build/C/man3/mallopt.3:107
3522 msgid "Print a simple error message and continue execution."
3523 msgstr ""
3524
3525 #. type: IP
3526 #: build/C/man3/mallopt.3:107
3527 #, no-wrap
3528 msgid "7"
3529 msgstr "7"
3530
3531 #. type: Plain text
3532 #: build/C/man3/mallopt.3:110
3533 msgid ""
3534 "Print simple error message, stack trace, and memory mappings, and abort the "
3535 "program."
3536 msgstr ""
3537
3538 #. type: Plain text
3539 #: build/C/man3/mallopt.3:116
3540 msgid ""
3541 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3542 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3543 msgstr ""
3544
3545 #. type: Plain text
3546 #: build/C/man3/mallopt.3:121
3547 msgid ""
3548 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3549 "crash may happen much later, and the true cause of the problem is then very "
3550 "hard to track down."
3551 msgstr ""
3552
3553 #. type: TP
3554 #: build/C/man3/mallopt.3:121
3555 #, no-wrap
3556 msgid "B<M_MMAP_MAX>"
3557 msgstr "B<M_MMAP_MAX>"
3558
3559 #.  The following text adapted from comments in the glibc source:
3560 #. type: Plain text
3561 #: build/C/man3/mallopt.3:131
3562 msgid ""
3563 "This parameter specifies the maximum number of allocation requests that may "
3564 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3565 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3566 "and using more than a few of them may degrade performance."
3567 msgstr ""
3568
3569 #. type: Plain text
3570 #: build/C/man3/mallopt.3:138
3571 msgid ""
3572 "The default value is 65,536, a value which has no special significance and "
3573 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3574 "use of B<mmap>(2)  for servicing large allocation requests."
3575 msgstr ""
3576
3577 #. type: TP
3578 #: build/C/man3/mallopt.3:138
3579 #, no-wrap
3580 msgid "B<M_MMAP_THRESHOLD>"
3581 msgstr "B<M_MMAP_THRESHOLD>"
3582
3583 #. type: Plain text
3584 #: build/C/man3/mallopt.3:147
3585 msgid ""
3586 "For allocations greater than or equal to the limit specified (in bytes) by "
3587 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3588 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3589 "break using B<sbrk>(2)."
3590 msgstr ""
3591
3592 #. type: Plain text
3593 #: build/C/man3/mallopt.3:167
3594 msgid ""
3595 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3596 "allocated memory blocks can always be independently released back to the "
3597 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3598 "the top end.)  On the other hand, there are some disadvantages to the use of "
3599 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3600 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3601 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3602 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3603 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3604 msgstr ""
3605
3606 #. type: Plain text
3607 #: build/C/man3/mallopt.3:174
3608 msgid ""
3609 "The lower limit for this parameter is 0.  The upper limit is "
3610 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3611 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3612 msgstr ""
3613
3614 #. type: Plain text
3615 #: build/C/man3/mallopt.3:192
3616 msgid ""
3617 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3618 "initial value of the threshold is 128*1024, but when blocks larger than the "
3619 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3620 "are freed, the threshold is adjusted upwards to the size of the freed "
3621 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3622 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3623 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3624 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3625 "parameters is set."
3626 msgstr ""
3627
3628 #. type: TP
3629 #: build/C/man3/mallopt.3:192
3630 #, no-wrap
3631 msgid "B<M_MXFAST> (since glibc 2.3)"
3632 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3633
3634 #.  The following text adapted from comments in the glibc sources:
3635 #. type: Plain text
3636 #: build/C/man3/mallopt.3:212
3637 msgid ""
3638 "Set the upper limit for memory allocation requests that are satisfied using "
3639 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3640 "are storage areas that hold deallocated blocks of memory of the same size "
3641 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3642 "the same size can be handled very quickly by allocating from the fastbin, "
3643 "although memory fragmentation and the overall memory footprint of the "
3644 "program can increase.  The default value for this parameter is I<64*sizeof"
3645 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3646 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3647 "the use of fastbins."
3648 msgstr ""
3649
3650 #. type: TP
3651 #: build/C/man3/mallopt.3:212
3652 #, no-wrap
3653 msgid "B<M_PERTURB> (since glibc 2.4)"
3654 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3655
3656 #. type: Plain text
3657 #: build/C/man3/mallopt.3:227
3658 msgid ""
3659 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3660 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3661 "of the value in the least significant byte of I<value>, and when allocated "
3662 "memory is released using B<free>(3), the freed bytes are set to the least "
3663 "significant byte of I<value>.  This can be useful for detecting errors where "
3664 "programs incorrectly rely on allocated memory being initialized to zero, or "
3665 "reuse values in memory that has already been freed."
3666 msgstr ""
3667
3668 #. type: TP
3669 #: build/C/man3/mallopt.3:227
3670 #, no-wrap
3671 msgid "B<M_TOP_PAD>"
3672 msgstr "B<M_TOP_PAD>"
3673
3674 #. type: Plain text
3675 #: build/C/man3/mallopt.3:234
3676 msgid ""
3677 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3678 "(2)  to modify the program break.  (The measurement unit for this parameter "
3679 "is bytes.)  This parameter has an effect in the following circumstances:"
3680 msgstr ""
3681
3682 #. type: Plain text
3683 #: build/C/man3/mallopt.3:241
3684 msgid ""
3685 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3686 "the B<sbrk>(2)  request."
3687 msgstr ""
3688
3689 #. type: Plain text
3690 #: build/C/man3/mallopt.3:247
3691 msgid ""
3692 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3693 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3694 "top of the heap."
3695 msgstr ""
3696
3697 #. type: Plain text
3698 #: build/C/man3/mallopt.3:251
3699 msgid ""
3700 "In either case, the amount of padding is always rounded to a system page "
3701 "boundary."
3702 msgstr ""
3703
3704 #. type: Plain text
3705 #: build/C/man3/mallopt.3:258
3706 msgid ""
3707 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3708 "system calls (when the parameter is set low)  and wasting unused memory at "
3709 "the top of the heap (when the parameter is set high)."
3710 msgstr ""
3711
3712 #.  DEFAULT_TOP_PAD in glibc source
3713 #. type: Plain text
3714 #: build/C/man3/mallopt.3:261
3715 msgid "The default value for this parameter is 128*1024."
3716 msgstr ""
3717
3718 #. type: TP
3719 #: build/C/man3/mallopt.3:261
3720 #, no-wrap
3721 msgid "B<M_TRIM_THRESHOLD>"
3722 msgstr "B<M_TRIM_THRESHOLD>"
3723
3724 #. type: Plain text
3725 #: build/C/man3/mallopt.3:277
3726 msgid ""
3727 "When the amount of contiguous free memory at the top of the heap grows "
3728 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3729 "back to the system.  (This can be useful in programs that continue to "
3730 "execute for a long period after freeing a significant amount of memory.)  "
3731 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3732 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3733 msgstr ""
3734
3735 #. type: Plain text
3736 #: build/C/man3/mallopt.3:282
3737 msgid ""
3738 "The default value for this parameter is 128*1024.  Setting "
3739 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3740 msgstr ""
3741
3742 #
3743 #
3744 #
3745 #.  FIXME Do the arena parameters need to be documented?
3746 #.  .TP
3747 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3748 #.  .TP
3749 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3750 #.  Environment variables
3751 #.      MALLOC_ARENA_MAX_
3752 #.      MALLOC_ARENA_TEST_
3753 #.  http://udrepper.livejournal.com/20948.html describes some details
3754 #.      of the MALLOC_ARENA_* environment variables.
3755 #.  These macros aren't enabled in production releases until 2.15?
3756 #.  (see glibc malloc/Makefile)
3757 #. type: Plain text
3758 #: build/C/man3/mallopt.3:305
3759 msgid ""
3760 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3761 "of system calls (when the parameter is set low)  and wasting unused memory "
3762 "at the top of the heap (when the parameter is set high)."
3763 msgstr ""
3764
3765 #. type: SS
3766 #: build/C/man3/mallopt.3:305
3767 #, no-wrap
3768 msgid "Environment variables"
3769 msgstr "環境変数"
3770
3771 #. type: Plain text
3772 #: build/C/man3/mallopt.3:320
3773 msgid ""
3774 "A number of environment variables can be defined to modify some of the same "
3775 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3776 "advantage that the source code of the program need not be changed.  To be "
3777 "effective, these variables must be defined before the first call to a memory-"
3778 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3779 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3780 "these variables are ignored in set-user-ID and set-group-ID programs."
3781 msgstr ""
3782
3783 #. type: Plain text
3784 #: build/C/man3/mallopt.3:323
3785 msgid ""
3786 "The environment variables are as follows (note the trailing underscore at "
3787 "the end of the name of each variable):"
3788 msgstr ""
3789
3790 #. type: TP
3791 #: build/C/man3/mallopt.3:323
3792 #, no-wrap
3793 msgid "B<MALLOC_CHECK_>"
3794 msgstr "B<MALLOC_CHECK_>"
3795
3796 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3797 #.  when MALLOC_CHECK_ was set.
3798 #. type: Plain text
3799 #: build/C/man3/mallopt.3:340
3800 msgid ""
3801 "This environment variable controls the same parameter as B<mallopt>()  "
3802 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3803 "special implementation of the memory-allocation functions is used.  (This is "
3804 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3805 "performs additional error checking, but is slower than the standard set of "
3806 "memory-allocation functions.  (This implementation does not detect all "
3807 "possible errors; memory leaks can still occur.)"
3808 msgstr ""
3809
3810 #. type: Plain text
3811 #: build/C/man3/mallopt.3:345
3812 msgid ""
3813 "The value assigned to this environment variable should be a single digit, "
3814 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3815 "the initial digit are ignored."
3816 msgstr ""
3817
3818 #. type: Plain text
3819 #: build/C/man3/mallopt.3:354
3820 msgid ""
3821 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3822 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3823 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3824 "also has an effect for set-user-ID and set-group-ID programs."
3825 msgstr ""
3826
3827 #. type: TP
3828 #: build/C/man3/mallopt.3:354
3829 #, no-wrap
3830 msgid "B<MALLOC_MMAP_MAX_>"
3831 msgstr "B<MALLOC_MMAP_MAX_>"
3832
3833 #. type: Plain text
3834 #: build/C/man3/mallopt.3:359
3835 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3836 msgstr ""
3837
3838 #. type: TP
3839 #: build/C/man3/mallopt.3:359
3840 #, no-wrap
3841 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3842 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3843
3844 #. type: Plain text
3845 #: build/C/man3/mallopt.3:364
3846 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3847 msgstr ""
3848
3849 #. type: TP
3850 #: build/C/man3/mallopt.3:364
3851 #, no-wrap
3852 msgid "B<MALLOC_PERTURB_>"
3853 msgstr "B<MALLOC_PERTURB_>"
3854
3855 #. type: Plain text
3856 #: build/C/man3/mallopt.3:369
3857 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3858 msgstr ""
3859
3860 #. type: TP
3861 #: build/C/man3/mallopt.3:369
3862 #, no-wrap
3863 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3864 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3865
3866 #. type: Plain text
3867 #: build/C/man3/mallopt.3:374
3868 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3869 msgstr ""
3870
3871 #. type: TP
3872 #: build/C/man3/mallopt.3:374
3873 #, no-wrap
3874 msgid "B<MALLOC_TOP_PAD_>"
3875 msgstr "B<MALLOC_TOP_PAD_>"
3876
3877 #. type: Plain text
3878 #: build/C/man3/mallopt.3:379
3879 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3880 msgstr ""
3881
3882 #. type: Plain text
3883 #: build/C/man3/mallopt.3:384
3884 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3885 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3886
3887 #.  .SH VERSIONS
3888 #.  Available already in glibc 2.0, possibly earlier
3889 #. type: Plain text
3890 #: build/C/man3/mallopt.3:392
3891 msgid "On error, I<errno> is I<not> set."
3892 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3893
3894 #.  .SH NOTES
3895 #. type: Plain text
3896 #: build/C/man3/mallopt.3:406
3897 msgid ""
3898 "This function is not specified by POSIX or the C standards.  A similar "
3899 "function exists on many System V derivatives, but the range of values for "
3900 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3901 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3902 "implemented in glibc."
3903 msgstr ""
3904
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:410
3907 msgid "Specifying an invalid value for I<param> does not generate an error."
3908 msgstr ""
3909
3910 #.  FIXME This looks buggy:
3911 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3912 #.  malloc requests are rounded up:
3913 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3914 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3915 #. type: Plain text
3916 #: build/C/man3/mallopt.3:418
3917 msgid ""
3918 "A calculation error within the glibc implementation means that a call of the "
3919 "form:"
3920 msgstr ""
3921
3922 #. type: Plain text
3923 #: build/C/man3/mallopt.3:421
3924 #, no-wrap
3925 msgid "    mallopt(M_MXFAST, n)\n"
3926 msgstr "    mallopt(M_MXFAST, n)\n"
3927
3928 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3929 #. type: Plain text
3930 #: build/C/man3/mallopt.3:433
3931 msgid ""
3932 "does not result in fastbins being employed for all allocations of size up to "
3933 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3934 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3935 "integer."
3936 msgstr ""
3937
3938 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3939 #.  do have an effect for set-user-ID programs (but not
3940 #.  set-group-ID programs).
3941 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3942 #. type: Plain text
3943 #: build/C/man3/mallopt.3:445
3944 msgid ""
3945 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3946 "ignored in set-group-ID programs."
3947 msgstr ""
3948
3949 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3950 #. type: Plain text
3951 #: build/C/man3/mallopt.3:466
3952 msgid ""
3953 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3954 "of allocated memory are initialized to the complement of the byte in "
3955 "I<value>, and when that memory is freed, the bytes of the region are "
3956 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3957 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3958 "precisely the block of memory being freed by the call I<free(p)>, the block "
3959 "starting at I<p+sizeof(size_t)> is initialized."
3960 msgstr ""
3961
3962 #. type: Plain text
3963 #: build/C/man3/mallopt.3:475
3964 msgid ""
3965 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3966 "is supplied with an (integer) command-line argument, then that argument is "
3967 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3968 "block of memory, and frees it twice (an error)."
3969 msgstr ""
3970
3971 #. type: Plain text
3972 #: build/C/man3/mallopt.3:479
3973 msgid ""
3974 "The following shell session shows what happens when we run this program "
3975 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3976 msgstr ""
3977
3978 #. type: Plain text
3979 #: build/C/man3/mallopt.3:499
3980 #, no-wrap
3981 msgid ""
3982 "$ B<./a.out>\n"
3983 "main(): returned from first free() call\n"
3984 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3985 "======= Backtrace: =========\n"
3986 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3987 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3988 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3989 "\\&./a.out[0x80485db]\n"
3990 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3991 "\\&./a.out[0x8048471]\n"
3992 "======= Memory map: ========\n"
3993 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3994 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3995 "[some lines omitted]\n"
3996 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3997 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3998 "Aborted (core dumped)\n"
3999 msgstr ""
4000 "$ B<./a.out>\n"
4001 "main(): returned from first free() call\n"
4002 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4003 "======= Backtrace: =========\n"
4004 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4005 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4006 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4007 "\\&./a.out[0x80485db]\n"
4008 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4009 "\\&./a.out[0x8048471]\n"
4010 "======= Memory map: ========\n"
4011 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4012 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4013 "[some lines omitted]\n"
4014 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4015 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4016 "Aborted (core dumped)\n"
4017
4018 #. type: Plain text
4019 #: build/C/man3/mallopt.3:504
4020 msgid ""
4021 "The following runs show the results when employing other values for "
4022 "B<M_CHECK_ACTION>:"
4023 msgstr ""
4024
4025 #. type: Plain text
4026 #: build/C/man3/mallopt.3:517
4027 #, no-wrap
4028 msgid ""
4029 "$ B<./a.out 1>             # Diagnose error and continue\n"
4030 "main(): returned from first free() call\n"
4031 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4032 "main(): returned from second free() call\n"
4033 "$ B<./a.out 2>             # Abort without error message\n"
4034 "main(): returned from first free() call\n"
4035 "Aborted (core dumped)\n"
4036 "$ B<./a.out 0>             # Ignore error and continue\n"
4037 "main(): returned from first free() call\n"
4038 "main(): returned from second free() call\n"
4039 msgstr ""
4040 "$ B<./a.out 1>             # Diagnose error and continue\n"
4041 "main(): returned from first free() call\n"
4042 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4043 "main(): returned from second free() call\n"
4044 "$ B<./a.out 2>             # Abort without error message\n"
4045 "main(): returned from first free() call\n"
4046 "Aborted (core dumped)\n"
4047 "$ B<./a.out 0>             # Ignore error and continue\n"
4048 "main(): returned from first free() call\n"
4049 "main(): returned from second free() call\n"
4050
4051 #. type: Plain text
4052 #: build/C/man3/mallopt.3:523
4053 msgid ""
4054 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4055 "environment variable:"
4056 msgstr ""
4057
4058 #. type: Plain text
4059 #: build/C/man3/mallopt.3:530
4060 #, no-wrap
4061 msgid ""
4062 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4063 "main(): returned from first free() call\n"
4064 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4065 "main(): returned from second free() call\n"
4066 msgstr ""
4067 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4068 "main(): returned from first free() call\n"
4069 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4070 "main(): returned from second free() call\n"
4071
4072 #. type: Plain text
4073 #: build/C/man3/mallopt.3:538
4074 #, no-wrap
4075 msgid ""
4076 "#include E<lt>malloc.hE<gt>\n"
4077 "#include E<lt>stdio.hE<gt>\n"
4078 "#include E<lt>stdlib.hE<gt>\n"
4079 msgstr ""
4080 "#include E<lt>malloc.hE<gt>\n"
4081 "#include E<lt>stdio.hE<gt>\n"
4082 "#include E<lt>stdlib.hE<gt>\n"
4083
4084 #. type: Plain text
4085 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4086 #, no-wrap
4087 msgid ""
4088 "int\n"
4089 "main(int argc, char *argv[])\n"
4090 "{\n"
4091 "    char *p;\n"
4092 msgstr ""
4093 "int\n"
4094 "main(int argc, char *argv[])\n"
4095 "{\n"
4096 "    char *p;\n"
4097
4098 #. type: Plain text
4099 #: build/C/man3/mallopt.3:550
4100 #, no-wrap
4101 msgid ""
4102 "    if (argc E<gt> 1) {\n"
4103 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4104 "            fprintf(stderr, \"mallopt() failed\");\n"
4105 "            exit(EXIT_FAILURE);\n"
4106 "        }\n"
4107 "    }\n"
4108 msgstr ""
4109 "    if (argc E<gt> 1) {\n"
4110 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4111 "            fprintf(stderr, \"mallopt() failed\");\n"
4112 "            exit(EXIT_FAILURE);\n"
4113 "        }\n"
4114 "    }\n"
4115
4116 #. type: Plain text
4117 #: build/C/man3/mallopt.3:556
4118 #, no-wrap
4119 msgid ""
4120 "    p = malloc(1000);\n"
4121 "    if (p == NULL) {\n"
4122 "        fprintf(stderr, \"malloc() failed\");\n"
4123 "        exit(EXIT_FAILURE);\n"
4124 "    }\n"
4125 msgstr ""
4126 "    p = malloc(1000);\n"
4127 "    if (p == NULL) {\n"
4128 "        fprintf(stderr, \"malloc() failed\");\n"
4129 "        exit(EXIT_FAILURE);\n"
4130 "    }\n"
4131
4132 #. type: Plain text
4133 #: build/C/man3/mallopt.3:559
4134 #, no-wrap
4135 msgid ""
4136 "    free(p);\n"
4137 "    printf(\"main(): returned from first free() call\\en\");\n"
4138 msgstr ""
4139 "    free(p);\n"
4140 "    printf(\"main(): returned from first free() call\\en\");\n"
4141
4142 #. type: Plain text
4143 #: build/C/man3/mallopt.3:562
4144 #, no-wrap
4145 msgid ""
4146 "    free(p);\n"
4147 "    printf(\"main(): returned from second free() call\\en\");\n"
4148 msgstr ""
4149 "    free(p);\n"
4150 "    printf(\"main(): returned from second free() call\\en\");\n"
4151
4152 #. type: Plain text
4153 #: build/C/man3/mallopt.3:580
4154 msgid ""
4155 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4156 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4157 "B<mtrace>(3), B<posix_memalign>(3)"
4158 msgstr ""
4159 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4160 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4161 "B<mtrace>(3), B<posix_memalign>(3)"
4162
4163 #. type: TH
4164 #: build/C/man3/mcheck.3:25
4165 #, no-wrap
4166 msgid "MCHECK"
4167 msgstr "MCHECK"
4168
4169 #. type: TH
4170 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4171 #, no-wrap
4172 msgid "2012-04-18"
4173 msgstr "2012-04-18"
4174
4175 #. type: Plain text
4176 #: build/C/man3/mcheck.3:28
4177 msgid ""
4178 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4179 msgstr ""
4180
4181 #. type: Plain text
4182 #: build/C/man3/mcheck.3:31
4183 #, no-wrap
4184 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4185 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4186
4187 #. type: Plain text
4188 #: build/C/man3/mcheck.3:33
4189 #, no-wrap
4190 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4191 msgstr ""
4192
4193 #. type: Plain text
4194 #: build/C/man3/mcheck.3:35
4195 #, no-wrap
4196 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4197 msgstr ""
4198
4199 #. type: Plain text
4200 #: build/C/man3/mcheck.3:37
4201 #, no-wrap
4202 msgid "B<void mcheck_check_all(void);>\n"
4203 msgstr "B<void mcheck_check_all(void);>\n"
4204
4205 #. type: Plain text
4206 #: build/C/man3/mcheck.3:39
4207 #, no-wrap
4208 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4209 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4210
4211 #. type: Plain text
4212 #: build/C/man3/mcheck.3:51
4213 msgid ""
4214 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4215 "(3)  family of memory-allocation functions.  These hooks cause certain "
4216 "consistency checks to be performed on the state of the heap.  The checks can "
4217 "detect application errors such as freeing a block of memory more than once "
4218 "or corrupting the bookkeeping data structures that immediately precede a "
4219 "block of allocated memory."
4220 msgstr ""
4221
4222 #. type: Plain text
4223 #: build/C/man3/mcheck.3:63
4224 msgid ""
4225 "To be effective, the B<mcheck>()  function must be called before the first "
4226 "call to B<malloc>(3)  or a related function.  In cases where this is "
4227 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4228 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4229 "memory-allocation function."
4230 msgstr ""
4231
4232 #. type: Plain text
4233 #: build/C/man3/mcheck.3:71
4234 msgid ""
4235 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4236 "checks on all allocated blocks whenever one of the memory-allocation "
4237 "functions is called.  This can be very slow!"
4238 msgstr ""
4239
4240 #. type: Plain text
4241 #: build/C/man3/mcheck.3:78
4242 msgid ""
4243 "The B<mcheck_check_all>()  function causes an immediate check on all "
4244 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4245 "beforehand."
4246 msgstr ""
4247
4248 #. type: Plain text
4249 #: build/C/man3/mcheck.3:91
4250 msgid ""
4251 "If the system detects an inconsistency in the heap, the caller-supplied "
4252 "function pointed to by I<abortfunc> is invoked with a single argument "
4253 "argument, I<mstatus>, that indicates what type of inconsistency was "
4254 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4255 "message on I<stderr> and calls B<abort>(3)."
4256 msgstr ""
4257
4258 #. type: Plain text
4259 #: build/C/man3/mcheck.3:103
4260 msgid ""
4261 "The B<mprobe>()  function performs a consistency check on the block of "
4262 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4263 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4264 msgstr ""
4265
4266 #. type: Plain text
4267 #: build/C/man3/mcheck.3:111
4268 msgid ""
4269 "The following list describes the values returned by B<mprobe>()  or passed "
4270 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4271 msgstr ""
4272
4273 #. type: TP
4274 #: build/C/man3/mcheck.3:111
4275 #, no-wrap
4276 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4277 msgstr ""
4278
4279 #. type: Plain text
4280 #: build/C/man3/mcheck.3:116
4281 msgid ""
4282 "B<mcheck>()  was not called before the first memory allocation function was "
4283 "called.  Consistency checking is not possible."
4284 msgstr ""
4285
4286 #. type: TP
4287 #: build/C/man3/mcheck.3:116
4288 #, no-wrap
4289 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4290 msgstr ""
4291
4292 #. type: Plain text
4293 #: build/C/man3/mcheck.3:119
4294 msgid "No inconsistency detected."
4295 msgstr ""
4296
4297 #. type: TP
4298 #: build/C/man3/mcheck.3:119
4299 #, no-wrap
4300 msgid "B<MCHECK_HEAD>"
4301 msgstr "B<MCHECK_HEAD>"
4302
4303 #. type: Plain text
4304 #: build/C/man3/mcheck.3:122
4305 msgid "Memory preceding an allocated block was clobbered."
4306 msgstr ""
4307
4308 #. type: TP
4309 #: build/C/man3/mcheck.3:122
4310 #, no-wrap
4311 msgid "B<MCHECK_TAIL>"
4312 msgstr "B<MCHECK_TAIL>"
4313
4314 #. type: Plain text
4315 #: build/C/man3/mcheck.3:125
4316 msgid "Memory following an allocated block was clobbered."
4317 msgstr ""
4318
4319 #. type: TP
4320 #: build/C/man3/mcheck.3:125
4321 #, no-wrap
4322 msgid "B<MCHECK_FREE>"
4323 msgstr "B<MCHECK_FREE>"
4324
4325 #. type: Plain text
4326 #: build/C/man3/mcheck.3:129
4327 msgid "A block of memory was freed twice."
4328 msgstr ""
4329
4330 #. type: Plain text
4331 #: build/C/man3/mcheck.3:134
4332 msgid ""
4333 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4334 msgstr ""
4335
4336 #. type: Plain text
4337 #: build/C/man3/mcheck.3:145
4338 msgid ""
4339 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4340 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4341 "since at least glibc 2.0"
4342 msgstr ""
4343
4344 #.  But is MALLOC_CHECK_ slower?
4345 #. type: Plain text
4346 #: build/C/man3/mcheck.3:159
4347 msgid ""
4348 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4349 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4350 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4351 "application to be relinked."
4352 msgstr ""
4353
4354 #. type: Plain text
4355 #: build/C/man3/mcheck.3:165
4356 msgid ""
4357 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4358 "same block of memory twice.  The following shell session demonstrates what "
4359 "happens when running the program:"
4360 msgstr ""
4361
4362 #. type: Plain text
4363 #: build/C/man3/mcheck.3:170
4364 #, no-wrap
4365 msgid ""
4366 "$B< ./a.out>\n"
4367 "About to free\n"
4368 msgstr ""
4369
4370 #. type: Plain text
4371 #: build/C/man3/mcheck.3:174
4372 #, no-wrap
4373 msgid ""
4374 "About to free a second time\n"
4375 "block freed twice\n"
4376 "Aborted (core dumped)\n"
4377 msgstr ""
4378
4379 #. type: Plain text
4380 #: build/C/man3/mcheck.3:182
4381 #, no-wrap
4382 msgid ""
4383 "#include E<lt>stdlib.hE<gt>\n"
4384 "#include E<lt>stdio.hE<gt>\n"
4385 "#include E<lt>mcheck.hE<gt>\n"
4386 msgstr ""
4387 "#include E<lt>stdlib.hE<gt>\n"
4388 "#include E<lt>stdio.hE<gt>\n"
4389 "#include E<lt>mcheck.hE<gt>\n"
4390
4391 #. type: Plain text
4392 #: build/C/man3/mcheck.3:190
4393 #, no-wrap
4394 msgid ""
4395 "    if (mcheck(NULL) != 0) {\n"
4396 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4397 msgstr ""
4398
4399 #. type: Plain text
4400 #: build/C/man3/mcheck.3:193
4401 #, no-wrap
4402 msgid ""
4403 "        exit(EXIT_FAILURE);\n"
4404 "    }\n"
4405 msgstr ""
4406 "        exit(EXIT_FAILURE);\n"
4407 "    }\n"
4408
4409 #. type: Plain text
4410 #: build/C/man3/mcheck.3:195
4411 #, no-wrap
4412 msgid "    p = malloc(1000);\n"
4413 msgstr "    p = malloc(1000);\n"
4414
4415 #. type: Plain text
4416 #: build/C/man3/mcheck.3:200
4417 #, no-wrap
4418 msgid ""
4419 "    fprintf(stderr, \"About to free\\en\");\n"
4420 "    free(p);\n"
4421 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4422 "    free(p);\n"
4423 msgstr ""
4424
4425 #. type: Plain text
4426 #: build/C/man3/mcheck.3:208
4427 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4428 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4429
4430 #. type: TH
4431 #: build/C/man2/mlock.2:26
4432 #, no-wrap
4433 msgid "MLOCK"
4434 msgstr "MLOCK"
4435
4436 #. type: TH
4437 #: build/C/man2/mlock.2:26
4438 #, no-wrap
4439 msgid "2011-09-14"
4440 msgstr "2011-09-14"
4441
4442 #. type: Plain text
4443 #: build/C/man2/mlock.2:29
4444 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4445 msgstr "mlock - メモリのロックとロック解除を行う"
4446
4447 #. type: Plain text
4448 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4449 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4450 #, no-wrap
4451 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4452 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4453
4454 #. type: Plain text
4455 #: build/C/man2/mlock.2:35
4456 #, no-wrap
4457 msgid ""
4458 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4459 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4460 msgstr ""
4461 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4462 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4463
4464 #. type: Plain text
4465 #: build/C/man2/mlock.2:38
4466 #, no-wrap
4467 msgid ""
4468 "B<int mlockall(int >I<flags>B<);>\n"
4469 "B<int munlockall(void);>\n"
4470 msgstr ""
4471 "B<int mlockall(int >I<flags>B<);>\n"
4472 "B<int munlockall(void);>\n"
4473
4474 #. type: Plain text
4475 #: build/C/man2/mlock.2:54
4476 msgid ""
4477 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4478 "process's virtual address space into RAM, preventing that memory from being "
4479 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4480 "converse operation, respectively unlocking part or all of the calling "
4481 "process's virtual address space, so that pages in the specified virtual "
4482 "address range may once more to be swapped out if required by the kernel "
4483 "memory manager.  Memory locking and unlocking are performed in units of "
4484 "whole pages."
4485 msgstr ""
4486 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4487 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4488 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4489 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4490 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4491 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4492 "る。"
4493
4494 #. type: SS
4495 #: build/C/man2/mlock.2:54
4496 #, no-wrap
4497 msgid "mlock() and munlock()"
4498 msgstr "mlock() と munlock()"
4499
4500 #. type: Plain text
4501 #: build/C/man2/mlock.2:64
4502 msgid ""
4503 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4504 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4505 "address range are guaranteed to be resident in RAM when the call returns "
4506 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4507 msgstr ""
4508 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4509 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4510 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4511 "れるまで RAM に残り続けることが保証される。"
4512
4513 #. type: Plain text
4514 #: build/C/man2/mlock.2:73
4515 msgid ""
4516 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4517 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4518 "of the specified memory range can be moved to external swap space again by "
4519 "the kernel."
4520 msgstr ""
4521 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4522 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4523 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4524
4525 #. type: SS
4526 #: build/C/man2/mlock.2:73
4527 #, no-wrap
4528 msgid "mlockall() and munlockall()"
4529 msgstr "mlockall() と munlockall()"
4530
4531 #. type: Plain text
4532 #: build/C/man2/mlock.2:83
4533 msgid ""
4534 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4535 "process.  This includes the pages of the code, data and stack segment, as "
4536 "well as shared libraries, user space kernel data, shared memory, and memory-"
4537 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4538 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4539 "later unlocked."
4540 msgstr ""
4541 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4542 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4543 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4544 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4545 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4546 "残り続けることが保証される。"
4547
4548 #. type: Plain text
4549 #: build/C/man2/mlock.2:88
4550 msgid ""
4551 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4552 "following constants:"
4553 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4554
4555 #. type: TP
4556 #: build/C/man2/mlock.2:88
4557 #, no-wrap
4558 msgid "B<MCL_CURRENT>"
4559 msgstr "B<MCL_CURRENT>"
4560
4561 #. type: Plain text
4562 #: build/C/man2/mlock.2:92
4563 msgid ""
4564 "Lock all pages which are currently mapped into the address space of the "
4565 "process."
4566 msgstr ""
4567 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4568
4569 #. type: TP
4570 #: build/C/man2/mlock.2:92
4571 #, no-wrap
4572 msgid "B<MCL_FUTURE>"
4573 msgstr "B<MCL_FUTURE>"
4574
4575 #. type: Plain text
4576 #: build/C/man2/mlock.2:99
4577 msgid ""
4578 "Lock all pages which will become mapped into the address space of the "
4579 "process in the future.  These could be for instance new pages required by a "
4580 "growing heap and stack as well as new memory mapped files or shared memory "
4581 "regions."
4582 msgstr ""
4583 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4584 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4585 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4586
4587 #. type: Plain text
4588 #: build/C/man2/mlock.2:112
4589 msgid ""
4590 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4591 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4592 "locked bytes to exceed the permitted maximum (see below).  In the same "
4593 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4594 "expansion and deliver a B<SIGSEGV> signal to the process."
4595 msgstr ""
4596 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4597 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4598 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4599 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4600 "スに送る。"
4601
4602 #. type: Plain text
4603 #: build/C/man2/mlock.2:116
4604 msgid ""
4605 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4606 "calling process."
4607 msgstr ""
4608 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4609 "全てのページをロック解除する。"
4610
4611 #. type: Plain text
4612 #: build/C/man2/mlock.2:122
4613 msgid ""
4614 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4615 "is set appropriately, and no changes are made to any locks in the address "
4616 "space of the process."
4617 msgstr ""
4618 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4619 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4620 "れない。"
4621
4622 #. type: Plain text
4623 #: build/C/man2/mlock.2:131
4624 msgid ""
4625 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4626 "resource limit, but tried to lock more memory than the limit permitted.  "
4627 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4628 msgstr ""
4629 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4630 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4631 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4632
4633 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4634 #.  take into account whether the to-be-locked range overlaps with
4635 #.  already locked pages.  Thus, suppose we allocate
4636 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4637 #.  mlock(), and then lock the *same* page range a second time.
4638 #.  In the case, the second mlock() call will fail, since the check
4639 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4640 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4641 #. type: Plain text
4642 #: build/C/man2/mlock.2:143
4643 msgid ""
4644 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4645 "RAM."
4646 msgstr ""
4647 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4648
4649 #. SVr4 documents an additional EAGAIN error code.
4650 #. type: Plain text
4651 #: build/C/man2/mlock.2:149
4652 msgid ""
4653 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4654 "perform the requested operation."
4655 msgstr ""
4656 "呼び出し側が特権を持っていないが、\n"
4657 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4658
4659 #. type: Plain text
4660 #: build/C/man2/mlock.2:154
4661 msgid "For B<mlock>()  and B<munlock>():"
4662 msgstr "B<mlock>()  と B<munlock>()  用として:"
4663
4664 #. type: Plain text
4665 #: build/C/man2/mlock.2:157
4666 msgid "Some or all of the specified address range could not be locked."
4667 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4668
4669 #. type: Plain text
4670 #: build/C/man2/mlock.2:164
4671 msgid ""
4672 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4673 "addition may have resulted in an overflow)."
4674 msgstr ""
4675 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4676 "(例えば、加算でオーバーフローが発生したなど)。"
4677
4678 #. type: Plain text
4679 #: build/C/man2/mlock.2:169
4680 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4681 msgstr ""
4682 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4683
4684 #. type: Plain text
4685 #: build/C/man2/mlock.2:173
4686 msgid ""
4687 "Some of the specified address range does not correspond to mapped pages in "
4688 "the address space of the process."
4689 msgstr ""
4690 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4691 "い。"
4692
4693 #. type: Plain text
4694 #: build/C/man2/mlock.2:176
4695 msgid "For B<mlockall>():"
4696 msgstr "B<mlockall>()  用として:"
4697
4698 #. type: Plain text
4699 #: build/C/man2/mlock.2:179
4700 msgid "Unknown I<flags> were specified."
4701 msgstr "未知の I<flags> が指定された。"
4702
4703 #. type: Plain text
4704 #: build/C/man2/mlock.2:182
4705 msgid "For B<munlockall>():"
4706 msgstr "B<munlockall>()  用として:"
4707
4708 #. type: Plain text
4709 #: build/C/man2/mlock.2:186
4710 msgid ""
4711 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4712 msgstr ""
4713 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4714
4715 #. type: Plain text
4716 #: build/C/man2/mlock.2:188
4717 msgid "POSIX.1-2001, SVr4."
4718 msgstr "POSIX.1-2001, SVr4."
4719
4720 #. type: SH
4721 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4722 #, no-wrap
4723 msgid "AVAILABILITY"
4724 msgstr "可用性"
4725
4726 #. type: Plain text
4727 #: build/C/man2/mlock.2:200
4728 msgid ""
4729 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4730 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4731 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4732 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4733 msgstr ""
4734 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4735 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4736 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4737 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4738 "び出すことで決定できる。"
4739
4740 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4741 #.  -1: unavailable, 0: ask using sysconf().
4742 #.  glibc defines it to 1.
4743 #. type: Plain text
4744 #: build/C/man2/mlock.2:213
4745 msgid ""
4746 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4747 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4748 "than 0.  (See also B<sysconf>(3).)"
4749 msgstr ""
4750 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4751 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4752 "(B<sysconf>(3)  も参照のこと)。"
4753
4754 #. type: Plain text
4755 #: build/C/man2/mlock.2:231
4756 msgid ""
4757 "Memory locking has two main applications: real-time algorithms and high-"
4758 "security data processing.  Real-time applications require deterministic "
4759 "timing, and, like scheduling, paging is one major cause of unexpected "
4760 "program execution delays.  Real-time applications will usually also switch "
4761 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4762 "security software often handles critical bytes like passwords or secret keys "
4763 "as data structures.  As a result of paging, these secrets could be "
4764 "transferred onto a persistent swap store medium, where they might be "
4765 "accessible to the enemy long after the security software has erased the "
4766 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4767 "laptops and some desktop computers will save a copy of the system's RAM to "
4768 "disk, regardless of memory locks.)"
4769 msgstr ""
4770 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4771 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4772 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4773 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4774 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4775 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4776 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4777 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4778 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4779 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4780 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4781 "存することに注意)。"
4782
4783 #. type: Plain text
4784 #: build/C/man2/mlock.2:244
4785 msgid ""
4786 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4787 "faults should reserve enough locked stack pages before entering the time-"
4788 "critical section, so that no page fault can be caused by function calls.  "
4789 "This can be achieved by calling a function that allocates a sufficiently "
4790 "large automatic variable (an array) and writes to the memory occupied by "
4791 "this array in order to touch these stack pages.  This way, enough pages will "
4792 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4793 "that not even copy-on-write page faults can occur in the critical section."
4794 msgstr ""
4795 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4796 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4797 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4798 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4799 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4800 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4801 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4802 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4803 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4804
4805 #. type: Plain text
4806 #: build/C/man2/mlock.2:250
4807 msgid ""
4808 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4809 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4810 "terminates."
4811 msgstr ""
4812 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4813 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4814 "れる)。"
4815
4816 #. type: Plain text
4817 #: build/C/man2/mlock.2:254
4818 msgid ""
4819 "The memory lock on an address range is automatically removed if the address "
4820 "range is unmapped via B<munmap>(2)."
4821 msgstr ""
4822 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4823 "よってアンマップされた場合は削除される。"
4824
4825 #. type: Plain text
4826 #: build/C/man2/mlock.2:267
4827 msgid ""
4828 "Memory locks do not stack, that is, pages which have been locked several "
4829 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4830 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4831 "Pages which are mapped to several locations or by several processes stay "
4832 "locked into RAM as long as they are locked at least at one location or by at "
4833 "least one process."
4834 msgstr ""
4835 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4836 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4837 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4838 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4839 "のプロセスでロックされている限りは RAM に残り続ける。"
4840
4841 #. type: Plain text
4842 #: build/C/man2/mlock.2:278
4843 msgid ""
4844 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4845 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4846 "implementation to require that I<addr> is page aligned, so portable "
4847 "applications should ensure this."
4848 msgstr ""
4849 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4850 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4851 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4852 "ケーションではきちんと境界に合わせた方が良い。"
4853
4854 #. type: Plain text
4855 #: build/C/man2/mlock.2:291
4856 msgid ""
4857 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4858 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4859 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4860 msgstr ""
4861 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4862 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4863 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4864 "表示される。"
4865
4866 #. type: SS
4867 #: build/C/man2/mlock.2:291
4868 #, no-wrap
4869 msgid "Limits and permissions"
4870 msgstr "制限と権限"
4871
4872 #. type: Plain text
4873 #: build/C/man2/mlock.2:298
4874 msgid ""
4875 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4876 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4877 "defines a limit on how much memory the process may lock."
4878 msgstr ""
4879 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4880 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4881 "できるかの制限を定義する。"
4882
4883 #. type: Plain text
4884 #: build/C/man2/mlock.2:304
4885 msgid ""
4886 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4887 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4888 "instead defines a limit on how much memory an unprivileged process may lock."
4889 msgstr ""
4890 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4891 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4892 "クできるメモリ量の制限を定義する。"
4893
4894 #. type: Plain text
4895 #: build/C/man2/mlock.2:312
4896 msgid ""
4897 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4898 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4899 "was rectified in kernel 2.4.18."
4900 msgstr ""
4901 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4902 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4903 "ネル 2.4.18 で修正された。"
4904
4905 #.  See the following LKML thread:
4906 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4907 #.  "Rationale for RLIMIT_MEMLOCK"
4908 #.  23 Jan 2006
4909 #. type: Plain text
4910 #: build/C/man2/mlock.2:329
4911 msgid ""
4912 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4913 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4914 "example, setting its effective UID to a nonzero value), then subsequent "
4915 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4916 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4917 msgstr ""
4918 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4919 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4920 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4921 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4922 "B<brk>(2))  は失敗する。"
4923
4924 #. type: Plain text
4925 #: build/C/man2/mlock.2:336
4926 msgid ""
4927 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4928 "B<capabilities>(7)"
4929 msgstr ""
4930 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4931 "B<capabilities>(7)"
4932
4933 #. type: TH
4934 #: build/C/man2/mmap.2:40
4935 #, no-wrap
4936 msgid "MMAP"
4937 msgstr "MMAP"
4938
4939 #. type: TH
4940 #: build/C/man2/mmap.2:40
4941 #, no-wrap
4942 msgid "2013-04-17"
4943 msgstr "2013-04-17"
4944
4945 #. type: Plain text
4946 #: build/C/man2/mmap.2:43
4947 msgid "mmap, munmap - map or unmap files or devices into memory"
4948 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4949
4950 #. type: Plain text
4951 #: build/C/man2/mmap.2:51
4952 #, no-wrap
4953 msgid ""
4954 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4955 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4956 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4957 msgstr ""
4958 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4959 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4960 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4961
4962 #. type: Plain text
4963 #: build/C/man2/mmap.2:54
4964 msgid "See NOTES for information on feature test macro requirements."
4965 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
4966
4967 #. type: Plain text
4968 #: build/C/man2/mmap.2:63
4969 msgid ""
4970 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4971 "process.  The starting address for the new mapping is specified in I<addr>.  "
4972 "The I<length> argument specifies the length of the mapping."
4973 msgstr ""
4974 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4975 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4976 "は I<length> 引き数で指定される。"
4977
4978 #.  Before Linux 2.6.24, the address was rounded up to the next page
4979 #.  boundary; since 2.6.24, it is rounded down!
4980 #. type: Plain text
4981 #: build/C/man2/mmap.2:77
4982 msgid ""
4983 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4984 "the mapping; this is the most portable method of creating a new mapping.  If "
4985 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4986 "the mapping; on Linux, the mapping will be created at a nearby page "
4987 "boundary.  The address of the new mapping is returned as the result of the "
4988 "call."
4989 msgstr ""
4990 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4991 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4992 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4993 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4994 "ングのアドレスは、呼び出しの返り値として返される。"
4995
4996 #. type: Plain text
4997 #: build/C/man2/mmap.2:89
4998 msgid ""
4999 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5000 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5001 "offset I<offset> in the file (or other object) referred to by the file "
5002 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5003 "by I<sysconf(_SC_PAGE_SIZE)>."
5004 msgstr ""
5005 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5006 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5007 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5008 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
5009 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5010
5011 #. type: Plain text
5012 #: build/C/man2/mmap.2:97
5013 msgid ""
5014 "The I<prot> argument describes the desired memory protection of the mapping "
5015 "(and must not conflict with the open mode of the file).  It is either "
5016 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5017 msgstr ""
5018 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5019 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5020 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5021
5022 #. type: TP
5023 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5024 #, no-wrap
5025 msgid "B<PROT_EXEC>"
5026 msgstr "B<PROT_EXEC>"
5027
5028 #. type: Plain text
5029 #: build/C/man2/mmap.2:100
5030 msgid "Pages may be executed."
5031 msgstr "ページは実行可能である。"
5032
5033 #. type: TP
5034 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5035 #, no-wrap
5036 msgid "B<PROT_READ>"
5037 msgstr "B<PROT_READ>"
5038
5039 #. type: Plain text
5040 #: build/C/man2/mmap.2:103
5041 msgid "Pages may be read."
5042 msgstr "ページは読み込み可能である。"
5043
5044 #. type: TP
5045 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5046 #, no-wrap
5047 msgid "B<PROT_WRITE>"
5048 msgstr "B<PROT_WRITE>"
5049
5050 #. type: Plain text
5051 #: build/C/man2/mmap.2:106
5052 msgid "Pages may be written."
5053 msgstr "ページに書き込み可能である。"
5054
5055 #. type: TP
5056 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5057 #, no-wrap
5058 msgid "B<PROT_NONE>"
5059 msgstr "B<PROT_NONE>"
5060
5061 #. type: Plain text
5062 #: build/C/man2/mmap.2:109
5063 msgid "Pages may not be accessed."
5064 msgstr "ページにはアクセスできない。"
5065
5066 #. type: Plain text
5067 #: build/C/man2/mmap.2:118
5068 msgid ""
5069 "The I<flags> argument determines whether updates to the mapping are visible "
5070 "to other processes mapping the same region, and whether updates are carried "
5071 "through to the underlying file.  This behavior is determined by including "
5072 "exactly one of the following values in I<flags>:"
5073 msgstr ""
5074 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5075 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5076 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5077 "I<flags> に含めることで指定する。"
5078
5079 #. type: TP
5080 #: build/C/man2/mmap.2:118
5081 #, no-wrap
5082 msgid "B<MAP_SHARED>"
5083 msgstr "B<MAP_SHARED>"
5084
5085 #. type: Plain text
5086 #: build/C/man2/mmap.2:128
5087 msgid ""
5088 "Share this mapping.  Updates to the mapping are visible to other processes "
5089 "that map this file, and are carried through to the underlying file.  The "
5090 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5091 "called."
5092 msgstr ""
5093 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5094 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5095 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5096 "るまで行われないこともある。"
5097
5098 #. type: TP
5099 #: build/C/man2/mmap.2:128
5100 #, no-wrap
5101 msgid "B<MAP_PRIVATE>"
5102 msgstr "B<MAP_PRIVATE>"
5103
5104 #. type: Plain text
5105 #: build/C/man2/mmap.2:137
5106 msgid ""
5107 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5108 "visible to other processes mapping the same file, and are not carried "
5109 "through to the underlying file.  It is unspecified whether changes made to "
5110 "the file after the B<mmap>()  call are visible in the mapped region."
5111 msgstr ""
5112 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5113 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5114 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5115 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5116 "かは規定されていない。"
5117
5118 #. type: Plain text
5119 #: build/C/man2/mmap.2:139
5120 msgid "Both of these flags are described in POSIX.1-2001."
5121 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5122
5123 #. type: Plain text
5124 #: build/C/man2/mmap.2:142
5125 msgid ""
5126 "In addition, zero or more of the following values can be ORed in I<flags>:"
5127 msgstr ""
5128 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5129 "ことができる。"
5130
5131 #. type: TP
5132 #: build/C/man2/mmap.2:142
5133 #, no-wrap
5134 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5135 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5136
5137 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5138 #. type: Plain text
5139 #: build/C/man2/mmap.2:158
5140 msgid ""
5141 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5142 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5143 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5144 "as to improve context-switch performance on some early 64-bit processors.  "
5145 "Modern x86-64 processors no longer have this performance problem, so use of "
5146 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5147 "ignored when B<MAP_FIXED> is set."
5148 msgstr ""
5149 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5150 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5151 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5152 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5153 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5154 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5155 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5156 "グは無視される。"
5157
5158 #. type: TP
5159 #: build/C/man2/mmap.2:158
5160 #, no-wrap
5161 msgid "B<MAP_ANON>"
5162 msgstr "B<MAP_ANON>"
5163
5164 #. type: Plain text
5165 #: build/C/man2/mmap.2:163
5166 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5167 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5168
5169 #. type: TP
5170 #: build/C/man2/mmap.2:163
5171 #, no-wrap
5172 msgid "B<MAP_ANONYMOUS>"
5173 msgstr "B<MAP_ANONYMOUS>"
5174
5175 #. type: Plain text
5176 #: build/C/man2/mmap.2:185
5177 msgid ""
5178 "The mapping is not backed by any file; its contents are initialized to "
5179 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5180 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5181 "is specified, and portable applications should ensure this.  The use of "
5182 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5183 "only since kernel 2.4."
5184 msgstr ""
5185 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5186 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5187 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5188 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5189 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5190 "以降の Linux でのみサポートされている。"
5191
5192 #. type: TP
5193 #: build/C/man2/mmap.2:185
5194 #, no-wrap
5195 msgid "B<MAP_DENYWRITE>"
5196 msgstr "B<MAP_DENYWRITE>"
5197
5198 #.  Introduced in 1.1.36, removed in 1.3.24.
5199 #. type: Plain text
5200 #: build/C/man2/mmap.2:193
5201 msgid ""
5202 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5203 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5204 "denial-of-service attacks.)"
5205 msgstr ""
5206 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5207 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5208 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5209
5210 #. type: TP
5211 #: build/C/man2/mmap.2:193
5212 #, no-wrap
5213 msgid "B<MAP_EXECUTABLE>"
5214 msgstr "B<MAP_EXECUTABLE>"
5215
5216 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5217 #.  (Long ago, it signaled that the underlying file is an executable.
5218 #.  However, that information was not really used anywhere.)
5219 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5220 #.  MAP_DENYWRITE?
5221 #. type: Plain text
5222 #: build/C/man2/mmap.2:201
5223 msgid "This flag is ignored."
5224 msgstr "このフラグは無視される。"
5225
5226 #. type: TP
5227 #: build/C/man2/mmap.2:201
5228 #, no-wrap
5229 msgid "B<MAP_FILE>"
5230 msgstr "B<MAP_FILE>"
5231
5232 #.  On some systems, this was required as the opposite of
5233 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5234 #. type: Plain text
5235 #: build/C/man2/mmap.2:207
5236 msgid "Compatibility flag.  Ignored."
5237 msgstr "互換性のためのフラグ。無視される。"
5238
5239 #. type: TP
5240 #: build/C/man2/mmap.2:207
5241 #, no-wrap
5242 msgid "B<MAP_FIXED>"
5243 msgstr "B<MAP_FIXED>"
5244
5245 #. type: Plain text
5246 #: build/C/man2/mmap.2:225
5247 msgid ""
5248 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5249 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5250 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5251 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5252 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5253 "requiring a fixed address for a mapping is less portable, the use of this "
5254 "option is discouraged."
5255 msgstr ""
5256 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5257 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5258 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5259 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5260 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5261 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5262 "を推奨する。"
5263
5264 #. type: TP
5265 #: build/C/man2/mmap.2:225
5266 #, no-wrap
5267 msgid "B<MAP_GROWSDOWN>"
5268 msgstr "B<MAP_GROWSDOWN>"
5269
5270 #. type: Plain text
5271 #: build/C/man2/mmap.2:230
5272 msgid ""
5273 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5274 "mapping should extend downward in memory."
5275 msgstr ""
5276 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5277 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5278 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5279
5280 #. type: TP
5281 #: build/C/man2/mmap.2:230
5282 #, no-wrap
5283 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5284 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5285
5286 #. type: Plain text
5287 #: build/C/man2/mmap.2:236
5288 msgid ""
5289 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5290 "I<Documentation/vm/hugetlbpage.txt> for further information."
5291 msgstr ""
5292 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5293 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5294
5295 #. type: TP
5296 #: build/C/man2/mmap.2:236
5297 #, no-wrap
5298 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5299 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5300
5301 #.  If set, the mapped pages will not be swapped out.
5302 #. type: Plain text
5303 #: build/C/man2/mmap.2:242
5304 msgid ""
5305 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5306 "(2).  This flag is ignored in older kernels."
5307 msgstr ""
5308 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5309 "前のカーネルでは、このフラグは無視される。"
5310
5311 #. type: TP
5312 #: build/C/man2/mmap.2:242
5313 #, no-wrap
5314 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5315 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5316
5317 #. type: Plain text
5318 #: build/C/man2/mmap.2:257
5319 msgid ""
5320 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5321 "ahead: create page tables entries only for pages that are already present in "
5322 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5323 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5324 "reimplemented."
5325 msgstr ""
5326 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5327 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5328 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5329 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5330 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5331
5332 #. type: TP
5333 #: build/C/man2/mmap.2:257
5334 #, no-wrap
5335 msgid "B<MAP_NORESERVE>"
5336 msgstr "B<MAP_NORESERVE>"
5337
5338 #. type: Plain text
5339 #: build/C/man2/mmap.2:272
5340 msgid ""
5341 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5342 "one has the guarantee that it is possible to modify the mapping.  When swap "
5343 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5344 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5345 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5346 "effect only for private writable mappings."
5347 msgstr ""
5348 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5349 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5350 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5351 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5352 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5353 "イベート・マッピングについてのみ効果があった。"
5354
5355 #. type: TP
5356 #: build/C/man2/mmap.2:272
5357 #, no-wrap
5358 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5359 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5360
5361 #. type: Plain text
5362 #: build/C/man2/mmap.2:279
5363 msgid ""
5364 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5365 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5366 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5367 "only since Linux 2.6.23."
5368 msgstr ""
5369 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5370 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5371 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5372 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5373 "されている。"
5374
5375 #. type: TP
5376 #: build/C/man2/mmap.2:279
5377 #, no-wrap
5378 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5379 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5380
5381 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5382 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5383 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5384 #.  "pthread_create() slow for many threads; also time to revisit 64b
5385 #.   context switch optimization?"
5386 #. type: Plain text
5387 #: build/C/man2/mmap.2:292
5388 msgid ""
5389 "Allocate the mapping at an address suitable for a process or thread stack.  "
5390 "This flag is currently a no-op, but is used in the glibc threading "
5391 "implementation so that if some architectures require special treatment for "
5392 "stack allocations, support can later be transparently implemented for glibc."
5393 msgstr ""
5394 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5395 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5396 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5397 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5398 "る。"
5399
5400 #. type: TP
5401 #: build/C/man2/mmap.2:292
5402 #, no-wrap
5403 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5404 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5405
5406 #. type: Plain text
5407 #: build/C/man2/mmap.2:302
5408 msgid ""
5409 "Don't clear anonymous pages.  This flag is intended to improve performance "
5410 "on embedded devices.  This flag is honored only if the kernel was configured "
5411 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5412 "implications, that option is normally enabled only on embedded devices (i."
5413 "e., devices where one has complete control of the contents of user memory)."
5414 msgstr ""
5415 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5416 "ス\n"
5417 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5418 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5419 "このフラグは効果を持つ。\n"
5420 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5421 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5422
5423 #. type: Plain text
5424 #: build/C/man2/mmap.2:310
5425 msgid ""
5426 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5427 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5428 "B<MAP_ANON>)."
5429 msgstr ""
5430 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5431 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5432 "B<MAP_ANON>)  もサポートされている。"
5433
5434 #. type: Plain text
5435 #: build/C/man2/mmap.2:317
5436 msgid ""
5437 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5438 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5439 msgstr ""
5440 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5441 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5442
5443 #. type: Plain text
5444 #: build/C/man2/mmap.2:323
5445 msgid ""
5446 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5447 "attributes."
5448 msgstr ""
5449 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5450
5451 #. type: Plain text
5452 #: build/C/man2/mmap.2:331
5453 msgid ""
5454 "A file is mapped in multiples of the page size.  For a file that is not a "
5455 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5456 "writes to that region are not written out to the file.  The effect of "
5457 "changing the size of the underlying file of a mapping on the pages that "
5458 "correspond to added or removed regions of the file is unspecified."
5459 msgstr ""
5460 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5461 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5462 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5463 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5464 "マップされたページに対してどのような影響があるかは規定されていない。"
5465
5466 #. type: SS
5467 #: build/C/man2/mmap.2:331
5468 #, no-wrap
5469 msgid "munmap()"
5470 msgstr "munmap()"
5471
5472 #. type: Plain text
5473 #: build/C/man2/mmap.2:341
5474 msgid ""
5475 "The B<munmap>()  system call deletes the mappings for the specified address "
5476 "range, and causes further references to addresses within the range to "
5477 "generate invalid memory references.  The region is also automatically "
5478 "unmapped when the process is terminated.  On the other hand, closing the "
5479 "file descriptor does not unmap the region."
5480 msgstr ""
5481 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5482 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5483 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5484 "はアンマップされない。"
5485
5486 #. type: Plain text
5487 #: build/C/man2/mmap.2:351
5488 msgid ""
5489 "The address I<addr> must be a multiple of the page size.  All pages "
5490 "containing a part of the indicated range are unmapped, and subsequent "
5491 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5492 "the indicated range does not contain any mapped pages."
5493 msgstr ""
5494 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5495 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5496 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5497 "ていない場合でも エラーにならない。"
5498
5499 #. type: SS
5500 #: build/C/man2/mmap.2:351
5501 #, no-wrap
5502 msgid "Timestamps changes for file-backed mappings"
5503 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5504
5505 #. type: Plain text
5506 #: build/C/man2/mmap.2:358
5507 msgid ""
5508 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5509 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5510 "the first reference to a mapped page will update the field if it has not "
5511 "been already."
5512 msgstr ""
5513 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5514 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5515 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5516 "ページへの最初の参照があった 際に更新される。"
5517
5518 #. type: Plain text
5519 #: build/C/man2/mmap.2:375
5520 msgid ""
5521 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5522 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5523 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5524 "one occurs."
5525 msgstr ""
5526 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5527 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5528 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5529 "B<msync>(2)  が呼ばれる前までに更新される。"
5530
5531 #. type: Plain text
5532 #: build/C/man2/mmap.2:392
5533 msgid ""
5534 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5535 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5536 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5537 "and I<errno> is set (probably to B<EINVAL>)."
5538 msgstr ""
5539 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5540 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5541 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5542 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5543
5544 #. type: TP
5545 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5546 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5547 #: build/C/man2/shmctl.2:302 build/C/man2/shmget.2:189
5548 #: build/C/man2/shmop.2:191
5549 #, no-wrap
5550 msgid "B<EACCES>"
5551 msgstr "B<EACCES>"
5552
5553 #. type: Plain text
5554 #: build/C/man2/mmap.2:413
5555 msgid ""
5556 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5557 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5558 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5559 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5560 msgstr ""
5561 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5562 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5563 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5564 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5565 "が、ファイルは追加 (append) 専用である。"
5566
5567 #. type: Plain text
5568 #: build/C/man2/mmap.2:417
5569 msgid ""
5570 "The file has been locked, or too much memory has been locked (see "
5571 "B<setrlimit>(2))."
5572 msgstr ""
5573 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5574 "(B<setrlimit>(2)  を参照)。"
5575
5576 #. type: Plain text
5577 #: build/C/man2/mmap.2:423
5578 msgid ""
5579 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5580 msgstr ""
5581 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5582 "B<MAP_ANONYMOUS> がセットされていない)。"
5583
5584 #. type: Plain text
5585 #: build/C/man2/mmap.2:431
5586 msgid ""
5587 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5588 "not aligned on a page boundary)."
5589 msgstr ""
5590 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5591 "ジ境界にアラインメントされていない)。"
5592
5593 #. type: Plain text
5594 #: build/C/man2/mmap.2:436
5595 msgid "(since Linux 2.6.12)  I<length> was 0."
5596 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5597
5598 #. type: Plain text
5599 #: build/C/man2/mmap.2:444
5600 msgid ""
5601 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5602 "both of these values."
5603 msgstr ""
5604 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5605 "しくは その両方が含まれていた。"
5606
5607 #. type: TP
5608 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:229
5609 #: build/C/man2/shmget.2:205
5610 #, no-wrap
5611 msgid "B<ENFILE>"
5612 msgstr "B<ENFILE>"
5613
5614 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5615 #. type: Plain text
5616 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:209
5617 msgid "The system limit on the total number of open files has been reached."
5618 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5619
5620 #. type: Plain text
5621 #: build/C/man2/mmap.2:456
5622 msgid ""
5623 "The underlying file system of the specified file does not support memory "
5624 "mapping."
5625 msgstr ""
5626 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5627 "していない。"
5628
5629 #. type: Plain text
5630 #: build/C/man2/mmap.2:460
5631 msgid ""
5632 "No memory is available, or the process's maximum number of mappings would "
5633 "have been exceeded."
5634 msgstr ""
5635 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5636
5637 #.  (Since 2.4.25 / 2.6.0.)
5638 #. type: Plain text
5639 #: build/C/man2/mmap.2:469
5640 msgid ""
5641 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5642 "file on a file system that was mounted no-exec."
5643 msgstr ""
5644 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5645 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5646
5647 #. type: TP
5648 #: build/C/man2/mmap.2:469
5649 #, no-wrap
5650 msgid "B<ETXTBSY>"
5651 msgstr "B<ETXTBSY>"
5652
5653 #. type: Plain text
5654 #: build/C/man2/mmap.2:475
5655 msgid ""
5656 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5657 "writing."
5658 msgstr ""
5659 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5660 "き込み用に開かれている。"
5661
5662 #. type: TP
5663 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:344
5664 #, no-wrap
5665 msgid "B<EOVERFLOW>"
5666 msgstr "B<EOVERFLOW>"
5667
5668 #. type: Plain text
5669 #: build/C/man2/mmap.2:487
5670 msgid ""
5671 "On 32-bit architecture together with the large file extension (i.e., using "
5672 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5673 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5674 msgstr ""
5675 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5676 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
5677 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
5678 "しまう) 場合がある。"
5679
5680 #. type: Plain text
5681 #: build/C/man2/mmap.2:489
5682 msgid "Use of a mapped region can result in these signals:"
5683 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5684
5685 #. type: TP
5686 #: build/C/man2/mmap.2:489
5687 #, no-wrap
5688 msgid "B<SIGSEGV>"
5689 msgstr "B<SIGSEGV>"
5690
5691 #. type: Plain text
5692 #: build/C/man2/mmap.2:492
5693 msgid "Attempted write into a region mapped as read-only."
5694 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5695
5696 #. type: TP
5697 #: build/C/man2/mmap.2:492
5698 #, no-wrap
5699 msgid "B<SIGBUS>"
5700 msgstr "B<SIGBUS>"
5701
5702 #. type: Plain text
5703 #: build/C/man2/mmap.2:497
5704 msgid ""
5705 "Attempted access to a portion of the buffer that does not correspond to the "
5706 "file (for example, beyond the end of the file, including the case where "
5707 "another process has truncated the file)."
5708 msgstr ""
5709 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5710 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5711 "にアクセスしようとした。"
5712
5713 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5714 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5715 #. type: Plain text
5716 #: build/C/man2/mmap.2:501
5717 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5718 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5719
5720 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5721 #.  -1: unavailable, 0: ask using sysconf().
5722 #.  glibc defines it to 1.
5723 #. type: Plain text
5724 #: build/C/man2/mmap.2:515
5725 msgid ""
5726 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5727 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5728 "value greater than 0.  (See also B<sysconf>(3).)"
5729 msgstr ""
5730 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5731 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5732 "(B<sysconf>(3)  も参照のこと)。"
5733
5734 #.  Since around glibc 2.1/2.2, depending on the platform.
5735 #. type: Plain text
5736 #: build/C/man2/mmap.2:530
5737 msgid ""
5738 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5739 "function.  Originally, this function invoked a system call of the same "
5740 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5741 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5742 "with a suitably adjusted value for I<offset>."
5743 msgstr ""
5744 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5745 "に\n"
5746 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5747 "た。\n"
5748 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5749 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5750 "B<mmap2>(2) を起動する。"
5751
5752 #. type: Plain text
5753 #: build/C/man2/mmap.2:543
5754 msgid ""
5755 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5756 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5757 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5758 "they intend to execute code in the new mapping."
5759 msgstr ""
5760 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5761 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5762 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5763 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5764 "常に B<PROT_EXEC> をセットすべきである。"
5765
5766 #. type: Plain text
5767 #: build/C/man2/mmap.2:558
5768 msgid ""
5769 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5770 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5771 "address for the mapping; the address is chosen so as not to conflict with "
5772 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5773 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5774 msgstr ""
5775 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5776 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5777 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5778 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5779 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5780
5781 #. type: Plain text
5782 #: build/C/man2/mmap.2:587
5783 msgid ""
5784 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5785 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5786 "requiring that macro specifically would have been more logical, since these "
5787 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5788 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5789 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5790 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5791 "B<MAP_STACK>."
5792 msgstr ""
5793 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
5794 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
5795 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
5796 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
5797 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
5798 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5799 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
5800 "B<MAP_STACK> である。"
5801
5802 #. type: Plain text
5803 #: build/C/man2/mmap.2:592
5804 msgid ""
5805 "On Linux there are no guarantees like those suggested above under "
5806 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5807 "the system runs out of memory."
5808 msgstr ""
5809 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5810 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5811 "終了されるか分からないからである。"
5812
5813 #. type: Plain text
5814 #: build/C/man2/mmap.2:599
5815 msgid ""
5816 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5817 "is specified as B<PROT_NONE>."
5818 msgstr ""
5819 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5820 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5821
5822 #. type: Plain text
5823 #: build/C/man2/mmap.2:614
5824 msgid ""
5825 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5826 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5827 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5828 "fails with the error B<EINVAL> for this case."
5829 msgstr ""
5830 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5831 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5832 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5833 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5834
5835 #. type: Plain text
5836 #: build/C/man2/mmap.2:630
5837 msgid ""
5838 "POSIX specifies that the system shall always zero fill any partial page at "
5839 "the end of the object and that system will never write any modification of "
5840 "the object beyond its end.  On Linux, when you write data to such partial "
5841 "page after the end of the object, the data stays in the page cache even "
5842 "after the file is closed and unmapped and even though the data is never "
5843 "written to the file itself, subsequent mappings may see the modified "
5844 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5845 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5846 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5847 msgstr ""
5848 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
5849 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
5850 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
5851 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
5852 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
5853 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
5854 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
5855 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
5856 "共有メモリインターフェースを使った場合)。"
5857
5858 #. type: Plain text
5859 #: build/C/man2/mmap.2:642
5860 msgid ""
5861 "The following program prints part of the file specified in its first command-"
5862 "line argument to standard output.  The range of bytes to be printed is "
5863 "specified via offset and length values in the second and third command-line "
5864 "arguments.  The program creates a memory mapping of the required pages of "
5865 "the file and then uses B<write>(2)  to output the desired bytes."
5866 msgstr ""
5867 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5868 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5869 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5870 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5871 "を出力する。"
5872
5873 #. type: Plain text
5874 #: build/C/man2/mmap.2:650
5875 #, no-wrap
5876 msgid ""
5877 "#include E<lt>sys/mman.hE<gt>\n"
5878 "#include E<lt>sys/stat.hE<gt>\n"
5879 "#include E<lt>fcntl.hE<gt>\n"
5880 "#include E<lt>stdio.hE<gt>\n"
5881 "#include E<lt>stdlib.hE<gt>\n"
5882 "#include E<lt>unistd.hE<gt>\n"
5883 msgstr ""
5884 "#include E<lt>sys/mman.hE<gt>\n"
5885 "#include E<lt>sys/stat.hE<gt>\n"
5886 "#include E<lt>fcntl.hE<gt>\n"
5887 "#include E<lt>stdio.hE<gt>\n"
5888 "#include E<lt>stdlib.hE<gt>\n"
5889 "#include E<lt>unistd.hE<gt>\n"
5890
5891 #. type: Plain text
5892 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5893 #, no-wrap
5894 msgid ""
5895 "#define handle_error(msg) \\e\n"
5896 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5897 msgstr ""
5898 "#define handle_error(msg) \\e\n"
5899 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5900
5901 #. type: Plain text
5902 #: build/C/man2/mmap.2:663
5903 #, no-wrap
5904 msgid ""
5905 "int\n"
5906 "main(int argc, char *argv[])\n"
5907 "{\n"
5908 "    char *addr;\n"
5909 "    int fd;\n"
5910 "    struct stat sb;\n"
5911 "    off_t offset, pa_offset;\n"
5912 "    size_t length;\n"
5913 "    ssize_t s;\n"
5914 msgstr ""
5915 "int\n"
5916 "main(int argc, char *argv[])\n"
5917 "{\n"
5918 "    char *addr;\n"
5919 "    int fd;\n"
5920 "    struct stat sb;\n"
5921 "    off_t offset, pa_offset;\n"
5922 "    size_t length;\n"
5923 "    ssize_t s;\n"
5924
5925 #. type: Plain text
5926 #: build/C/man2/mmap.2:668
5927 #, no-wrap
5928 msgid ""
5929 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5930 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5931 "        exit(EXIT_FAILURE);\n"
5932 "    }\n"
5933 msgstr ""
5934 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5935 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5936 "        exit(EXIT_FAILURE);\n"
5937 "    }\n"
5938
5939 #. type: Plain text
5940 #: build/C/man2/mmap.2:672
5941 #, no-wrap
5942 msgid ""
5943 "    fd = open(argv[1], O_RDONLY);\n"
5944 "    if (fd == -1)\n"
5945 "        handle_error(\"open\");\n"
5946 msgstr ""
5947 "    fd = open(argv[1], O_RDONLY);\n"
5948 "    if (fd == -1)\n"
5949 "        handle_error(\"open\");\n"
5950
5951 #. type: Plain text
5952 #: build/C/man2/mmap.2:675
5953 #, no-wrap
5954 msgid ""
5955 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5956 "        handle_error(\"fstat\");\n"
5957 msgstr ""
5958 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5959 "        handle_error(\"fstat\");\n"
5960
5961 #. type: Plain text
5962 #: build/C/man2/mmap.2:679
5963 #, no-wrap
5964 msgid ""
5965 "    offset = atoi(argv[2]);\n"
5966 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5967 "        /* offset for mmap() must be page aligned */\n"
5968 msgstr ""
5969 "    offset = atoi(argv[2]);\n"
5970 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5971 "        /* offset for mmap() must be page aligned */\n"
5972
5973 #. type: Plain text
5974 #: build/C/man2/mmap.2:684
5975 #, no-wrap
5976 msgid ""
5977 "    if (offset E<gt>= sb.st_size) {\n"
5978 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5979 "        exit(EXIT_FAILURE);\n"
5980 "    }\n"
5981 msgstr ""
5982 "    if (offset E<gt>= sb.st_size) {\n"
5983 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5984 "        exit(EXIT_FAILURE);\n"
5985 "    }\n"
5986
5987 #. type: Plain text
5988 #: build/C/man2/mmap.2:690
5989 #, no-wrap
5990 msgid ""
5991 "    if (argc == 4) {\n"
5992 "        length = atoi(argv[3]);\n"
5993 "        if (offset + length E<gt> sb.st_size)\n"
5994 "            length = sb.st_size - offset;\n"
5995 "                /* Can\\(aqt display bytes past end of file */\n"
5996 msgstr ""
5997 "    if (argc == 4) {\n"
5998 "        length = atoi(argv[3]);\n"
5999 "        if (offset + length E<gt> sb.st_size)\n"
6000 "            length = sb.st_size - offset;\n"
6001 "                /* Can\\(aqt display bytes past end of file */\n"
6002
6003 #. type: Plain text
6004 #: build/C/man2/mmap.2:694
6005 #, no-wrap
6006 msgid ""
6007 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6008 "        length = sb.st_size - offset;\n"
6009 "    }\n"
6010 msgstr ""
6011 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6012 "        length = sb.st_size - offset;\n"
6013 "    }\n"
6014
6015 #. type: Plain text
6016 #: build/C/man2/mmap.2:699
6017 #, no-wrap
6018 msgid ""
6019 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6020 "                MAP_PRIVATE, fd, pa_offset);\n"
6021 "    if (addr == MAP_FAILED)\n"
6022 "        handle_error(\"mmap\");\n"
6023 msgstr ""
6024 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6025 "                MAP_PRIVATE, fd, pa_offset);\n"
6026 "    if (addr == MAP_FAILED)\n"
6027 "        handle_error(\"mmap\");\n"
6028
6029 #. type: Plain text
6030 #: build/C/man2/mmap.2:704
6031 #, no-wrap
6032 msgid ""
6033 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6034 "    if (s != length) {\n"
6035 "        if (s == -1)\n"
6036 "            handle_error(\"write\");\n"
6037 msgstr ""
6038 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6039 "    if (s != length) {\n"
6040 "        if (s == -1)\n"
6041 "            handle_error(\"write\");\n"
6042
6043 #. type: Plain text
6044 #: build/C/man2/mmap.2:708
6045 #, no-wrap
6046 msgid ""
6047 "        fprintf(stderr, \"partial write\");\n"
6048 "        exit(EXIT_FAILURE);\n"
6049 "    }\n"
6050 msgstr ""
6051 "        fprintf(stderr, \"partial write\");\n"
6052 "        exit(EXIT_FAILURE);\n"
6053 "    }\n"
6054
6055 #. type: Plain text
6056 #: build/C/man2/mmap.2:725
6057 msgid ""
6058 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6059 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6060 "(2), B<shm_open>(3), B<shm_overview>(7)"
6061 msgstr ""
6062 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6063 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6064 "(2), B<shm_open>(3), B<shm_overview>(7)"
6065
6066 #. type: Plain text
6067 #: build/C/man2/mmap.2:732
6068 msgid ""
6069 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6070 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6071 msgstr ""
6072 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6073 "smaps> の説明。"
6074
6075 #. type: Plain text
6076 #: build/C/man2/mmap.2:737 build/C/man2/msync.2:124
6077 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6078 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6079
6080 #. type: TH
6081 #: build/C/man2/mmap2.2:29
6082 #, no-wrap
6083 msgid "MMAP2"
6084 msgstr "MMAP2"
6085
6086 #. type: TH
6087 #: build/C/man2/mmap2.2:29
6088 #, no-wrap
6089 msgid "2012-04-16"
6090 msgstr "2012-04-16"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mmap2.2:32
6094 msgid "mmap2 - map files or devices into memory"
6095 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6096
6097 #. type: Plain text
6098 #: build/C/man2/mmap2.2:38
6099 #, no-wrap
6100 msgid ""
6101 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6102 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6103 msgstr ""
6104 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6105 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6106
6107 #. type: Plain text
6108 #: build/C/man2/mmap2.2:43
6109 msgid ""
6110 "This is probably not the system call you are interested; instead, see B<mmap>"
6111 "(2), which describes the glibc wrapper function that invokes this system "
6112 "call."
6113 msgstr ""
6114 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6115 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6116 "の\n"
6117 "ラッパー関数についての説明がある。"
6118
6119 #. type: Plain text
6120 #: build/C/man2/mmap2.2:54
6121 msgid ""
6122 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6123 "except that the final argument specifies the offset into the file in 4096-"
6124 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6125 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6126 "bytes)."
6127 msgstr ""
6128 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6129 "だ\n"
6130 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6131 "ト\n"
6132 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6133 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6134 "プ\n"
6135 "できるようになる。"
6136
6137 #. type: Plain text
6138 #: build/C/man2/mmap2.2:61
6139 msgid ""
6140 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
6141 "is returned and I<errno> is set appropriately."
6142 msgstr ""
6143 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6144 "合は -1 が返されて、 I<errno> が適切に設定される。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mmap2.2:65
6148 msgid "Problem with getting the data from user space."
6149 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6150
6151 #. type: Plain text
6152 #: build/C/man2/mmap2.2:70
6153 msgid ""
6154 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6155 "4096> is not a multiple of the system page size."
6156 msgstr ""
6157 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6158 "4096> がシステムのページサイズの倍数ではない。"
6159
6160 #. type: Plain text
6161 #: build/C/man2/mmap2.2:74
6162 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6163 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6164
6165 #. type: Plain text
6166 #: build/C/man2/mmap2.2:77
6167 msgid "B<mmap2>()  is available since Linux 2.3.31."
6168 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6169
6170 #. type: Plain text
6171 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6172 msgid "This system call is Linux-specific."
6173 msgstr "このシステムコールは Linux 独自である。"
6174
6175 #. type: Plain text
6176 #: build/C/man2/mmap2.2:85
6177 msgid ""
6178 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6179 "rather than the B<mmap>(2)  system call."
6180 msgstr ""
6181 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6182 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6183
6184 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6185 #.  On cris, it looks like the unit might also be the page size,
6186 #.  which is 8192 bytes. -- mtk, June 2007
6187 #. type: Plain text
6188 #: build/C/man2/mmap2.2:92
6189 msgid ""
6190 "On ia64, the unit for I<offset> is actually the system page size, rather "
6191 "than 4096 bytes."
6192 msgstr ""
6193 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6194 "バイトではない。"
6195
6196 #. type: Plain text
6197 #: build/C/man2/mmap2.2:98
6198 msgid ""
6199 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6200 msgstr ""
6201 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6202
6203 #. type: TH
6204 #: build/C/man2/mprotect.2:38
6205 #, no-wrap
6206 msgid "MPROTECT"
6207 msgstr "MPROTECT"
6208
6209 #. type: TH
6210 #: build/C/man2/mprotect.2:38
6211 #, no-wrap
6212 msgid "2012-08-14"
6213 msgstr "2012-08-14"
6214
6215 #. type: Plain text
6216 #: build/C/man2/mprotect.2:41
6217 msgid "mprotect - set protection on a region of memory"
6218 msgstr "mprotect - メモリ領域の保護を設定する"
6219
6220 #. type: Plain text
6221 #: build/C/man2/mprotect.2:46
6222 #, no-wrap
6223 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6224 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6225
6226 #. type: Plain text
6227 #: build/C/man2/mprotect.2:54
6228 msgid ""
6229 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6230 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6231 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6232 msgstr ""
6233 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6234 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6235 "界に一致していなければならない。"
6236
6237 #. type: Plain text
6238 #: build/C/man2/mprotect.2:59
6239 msgid ""
6240 "If the calling process tries to access memory in a manner that violates the "
6241 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6242 msgstr ""
6243 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6244 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6245
6246 #. type: Plain text
6247 #: build/C/man2/mprotect.2:64
6248 msgid ""
6249 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6250 "following list:"
6251 msgstr ""
6252 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6253 "毎の論理和 (bitwize-or) で指定する:"
6254
6255 #. type: Plain text
6256 #: build/C/man2/mprotect.2:67
6257 msgid "The memory cannot be accessed at all."
6258 msgstr "そのメモリには全くアクセスできない。"
6259
6260 #. type: Plain text
6261 #: build/C/man2/mprotect.2:70
6262 msgid "The memory can be read."
6263 msgstr "そのメモリを読み取ることができる。"
6264
6265 #. type: Plain text
6266 #: build/C/man2/mprotect.2:73
6267 msgid "The memory can be modified."
6268 msgstr "そのメモリを変更できる。"
6269
6270 #.  FIXME
6271 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6272 #. type: Plain text
6273 #: build/C/man2/mprotect.2:78
6274 msgid "The memory can be executed."
6275 msgstr "そのメモリは実行可能である。"
6276
6277 #. type: Plain text
6278 #: build/C/man2/mprotect.2:85
6279 msgid ""
6280 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6281 "I<errno> is set appropriately."
6282 msgstr ""
6283 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6284 "I<errno> が適切に設定される。"
6285
6286 #. type: Plain text
6287 #: build/C/man2/mprotect.2:95
6288 msgid ""
6289 "The memory cannot be given the specified access.  This can happen, for "
6290 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6291 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6292 msgstr ""
6293 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6294 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6295 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6296
6297 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6298 #. type: Plain text
6299 #: build/C/man2/mprotect.2:100
6300 msgid ""
6301 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6302 msgstr ""
6303 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6304
6305 #. type: Plain text
6306 #: build/C/man2/mprotect.2:103
6307 msgid "Internal kernel structures could not be allocated."
6308 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6309
6310 #. type: Plain text
6311 #: build/C/man2/mprotect.2:113
6312 msgid ""
6313 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6314 "address space of the process, or specify one or more pages that are not "
6315 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6316 "for these cases.)"
6317 msgstr ""
6318 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6319 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6320 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6321 "成されていた)。"
6322
6323 #.  SVr4 defines an additional error
6324 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6325 #. type: Plain text
6326 #: build/C/man2/mprotect.2:122
6327 msgid ""
6328 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6329 "unspecified if it is applied to a region of memory that was not obtained via "
6330 "B<mmap>(2)."
6331 msgstr ""
6332 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6333 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6334 "されている。"
6335
6336 #. type: Plain text
6337 #: build/C/man2/mprotect.2:129
6338 msgid ""
6339 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6340 "process's address space (except for the kernel vsyscall area).  In "
6341 "particular it can be used to change existing code mappings to be writable."
6342 msgstr ""
6343 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6344 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6345 "マッピングを書き込み可能にするために使われる。"
6346
6347 #. type: Plain text
6348 #: build/C/man2/mprotect.2:139
6349 msgid ""
6350 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6351 "architecture- and kernel version-dependent.  On some hardware architectures "
6352 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6353 msgstr ""
6354 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6355 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6356 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6357
6358 #. type: Plain text
6359 #: build/C/man2/mprotect.2:148
6360 msgid ""
6361 "POSIX.1-2001 says that an implementation may permit access other than that "
6362 "specified in I<prot>, but at a minimum can allow write access only if "
6363 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6364 "has been set."
6365 msgstr ""
6366 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6367 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6368 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6369 "ない点だけは 満たす必要がある。"
6370
6371 #. type: Plain text
6372 #: build/C/man2/mprotect.2:154
6373 msgid ""
6374 "The program below allocates four pages of memory, makes the third of these "
6375 "pages read-only, and then executes a loop that walks upward through the "
6376 "allocated region modifying bytes."
6377 msgstr ""
6378 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6379 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6380 "かって順番にバイト値を変更するループを実行する。"
6381
6382 #. type: Plain text
6383 #: build/C/man2/mprotect.2:157
6384 msgid ""
6385 "An example of what we might see when running the program is the following:"
6386 msgstr "プログラムを実行した場合の一例を以下に示す。"
6387
6388 #. type: Plain text
6389 #: build/C/man2/mprotect.2:163
6390 #, no-wrap
6391 msgid ""
6392 "$B< ./a.out>\n"
6393 "Start of region:        0x804c000\n"
6394 "Got SIGSEGV at address: 0x804e000\n"
6395 msgstr ""
6396 "$B< ./a.out>\n"
6397 "Start of region:        0x804c000\n"
6398 "Got SIGSEGV at address: 0x804e000\n"
6399
6400 #. type: Plain text
6401 #: build/C/man2/mprotect.2:175
6402 #, no-wrap
6403 msgid ""
6404 "#include E<lt>unistd.hE<gt>\n"
6405 "#include E<lt>signal.hE<gt>\n"
6406 "#include E<lt>stdio.hE<gt>\n"
6407 "#include E<lt>malloc.hE<gt>\n"
6408 "#include E<lt>stdlib.hE<gt>\n"
6409 "#include E<lt>errno.hE<gt>\n"
6410 "#include E<lt>sys/mman.hE<gt>\n"
6411 msgstr ""
6412 "#include E<lt>unistd.hE<gt>\n"
6413 "#include E<lt>signal.hE<gt>\n"
6414 "#include E<lt>stdio.hE<gt>\n"
6415 "#include E<lt>malloc.hE<gt>\n"
6416 "#include E<lt>stdlib.hE<gt>\n"
6417 "#include E<lt>errno.hE<gt>\n"
6418 "#include E<lt>sys/mman.hE<gt>\n"
6419
6420 #. type: Plain text
6421 #: build/C/man2/mprotect.2:180
6422 #, no-wrap
6423 msgid "char *buffer;\n"
6424 msgstr "char *buffer;\n"
6425
6426 #. type: Plain text
6427 #: build/C/man2/mprotect.2:188
6428 #, no-wrap
6429 msgid ""
6430 "static void\n"
6431 "handler(int sig, siginfo_t *si, void *unused)\n"
6432 "{\n"
6433 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6434 "            (long) si-E<gt>si_addr);\n"
6435 "    exit(EXIT_FAILURE);\n"
6436 "}\n"
6437 msgstr ""
6438 "static void\n"
6439 "handler(int sig, siginfo_t *si, void *unused)\n"
6440 "{\n"
6441 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6442 "            (long) si-E<gt>si_addr);\n"
6443 "    exit(EXIT_FAILURE);\n"
6444 "}\n"
6445
6446 #. type: Plain text
6447 #: build/C/man2/mprotect.2:195
6448 #, no-wrap
6449 msgid ""
6450 "int\n"
6451 "main(int argc, char *argv[])\n"
6452 "{\n"
6453 "    char *p;\n"
6454 "    int pagesize;\n"
6455 "    struct sigaction sa;\n"
6456 msgstr ""
6457 "int\n"
6458 "main(void)\n"
6459 "{\n"
6460 "    char *p;\n"
6461 "    int pagesize;\n"
6462 "    struct sigaction sa;\n"
6463
6464 #. type: Plain text
6465 #: build/C/man2/mprotect.2:201
6466 #, no-wrap
6467 msgid ""
6468 "    sa.sa_flags = SA_SIGINFO;\n"
6469 "    sigemptyset(&sa.sa_mask);\n"
6470 "    sa.sa_sigaction = handler;\n"
6471 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6472 "        handle_error(\"sigaction\");\n"
6473 msgstr ""
6474 "    sa.sa_flags = SA_SIGINFO;\n"
6475 "    sigemptyset(&sa.sa_mask);\n"
6476 "    sa.sa_sigaction = handler;\n"
6477 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6478 "        handle_error(\"sigaction\");\n"
6479
6480 #. type: Plain text
6481 #: build/C/man2/mprotect.2:205
6482 #, no-wrap
6483 msgid ""
6484 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6485 "    if (pagesize == -1)\n"
6486 "        handle_error(\"sysconf\");\n"
6487 msgstr ""
6488 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6489 "    if (pagesize == -1)\n"
6490 "        handle_error(\"sysconf\");\n"
6491
6492 #. type: Plain text
6493 #: build/C/man2/mprotect.2:208
6494 #, no-wrap
6495 msgid ""
6496 "    /* Allocate a buffer aligned on a page boundary;\n"
6497 "       initial protection is PROT_READ | PROT_WRITE */\n"
6498 msgstr ""
6499 "    /* Allocate a buffer aligned on a page boundary;\n"
6500 "       initial protection is PROT_READ | PROT_WRITE */\n"
6501
6502 #. type: Plain text
6503 #: build/C/man2/mprotect.2:212
6504 #, no-wrap
6505 msgid ""
6506 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6507 "    if (buffer == NULL)\n"
6508 "        handle_error(\"memalign\");\n"
6509 msgstr ""
6510 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6511 "    if (buffer == NULL)\n"
6512 "        handle_error(\"memalign\");\n"
6513
6514 #. type: Plain text
6515 #: build/C/man2/mprotect.2:214
6516 #, no-wrap
6517 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6518 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6519
6520 #. type: Plain text
6521 #: build/C/man2/mprotect.2:218
6522 #, no-wrap
6523 msgid ""
6524 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6525 "                PROT_READ) == -1)\n"
6526 "        handle_error(\"mprotect\");\n"
6527 msgstr ""
6528 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6529 "                PROT_READ) == -1)\n"
6530 "        handle_error(\"mprotect\");\n"
6531
6532 #. type: Plain text
6533 #: build/C/man2/mprotect.2:221
6534 #, no-wrap
6535 msgid ""
6536 "    for (p = buffer ; ; )\n"
6537 "        *(p++) = \\(aqa\\(aq;\n"
6538 msgstr ""
6539 "    for (p = buffer ; ; )\n"
6540 "        *(p++) = \\(aqa\\(aq;\n"
6541
6542 #. type: Plain text
6543 #: build/C/man2/mprotect.2:225
6544 #, no-wrap
6545 msgid ""
6546 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6547 "    exit(EXIT_SUCCESS);\n"
6548 "}\n"
6549 msgstr ""
6550 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6551 "    exit(EXIT_SUCCESS);\n"
6552 "}\n"
6553
6554 #. type: Plain text
6555 #: build/C/man2/mprotect.2:229
6556 msgid "B<mmap>(2), B<sysconf>(3)"
6557 msgstr "B<mmap>(2), B<sysconf>(3)"
6558
6559 #. type: TH
6560 #: build/C/man2/mremap.2:30
6561 #, no-wrap
6562 msgid "MREMAP"
6563 msgstr "MREMAP"
6564
6565 #. type: TH
6566 #: build/C/man2/mremap.2:30
6567 #, no-wrap
6568 msgid "2010-06-10"
6569 msgstr "2010-06-10"
6570
6571 #. type: Plain text
6572 #: build/C/man2/mremap.2:33
6573 msgid "mremap - remap a virtual memory address"
6574 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6575
6576 #. type: Plain text
6577 #: build/C/man2/mremap.2:36
6578 #, no-wrap
6579 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6580 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6581
6582 #. type: Plain text
6583 #: build/C/man2/mremap.2:41
6584 #, no-wrap
6585 msgid ""
6586 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6587 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6588 msgstr ""
6589 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6590 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6591
6592 #. type: Plain text
6593 #: build/C/man2/mremap.2:47
6594 msgid ""
6595 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6596 "moving it at the same time (controlled by the I<flags> argument and the "
6597 "available virtual address space)."
6598 msgstr ""
6599 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6600 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6601 "る)。"
6602
6603 #. type: Plain text
6604 #: build/C/man2/mremap.2:61
6605 msgid ""
6606 "I<old_address> is the old address of the virtual memory block that you want "
6607 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6608 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6609 "requested size of the virtual memory block after the resize.  An optional "
6610 "fifth argument, I<new_address>, may be provided; see the description of "
6611 "B<MREMAP_FIXED> below."
6612 msgstr ""
6613 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6614 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6615 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6616 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6617 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6618 "明を参照のこと。"
6619
6620 #. type: Plain text
6621 #: build/C/man2/mremap.2:73
6622 msgid ""
6623 "In Linux the memory is divided into pages.  A user process has (one or)  "
6624 "several linear virtual memory segments.  Each virtual memory segment has one "
6625 "or more mappings to real memory pages (in the page table).  Each virtual "
6626 "memory segment has its own protection (access rights), which may cause a "
6627 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6628 "to a read-only segment).  Accessing virtual memory outside of the segments "
6629 "will also cause a segmentation violation."
6630 msgstr ""
6631 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6632 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6633 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6634 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6635 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6636 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6637 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6638 "ン侵害が発生する。"
6639
6640 #. type: Plain text
6641 #: build/C/man2/mremap.2:81
6642 msgid ""
6643 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6644 "mapping between virtual addresses and memory pages.  This can be used to "
6645 "implement a very efficient B<realloc>(3)."
6646 msgstr ""
6647 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6648 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6649 "B<realloc>(3)  を実装するのに使用されている。"
6650
6651 #. type: Plain text
6652 #: build/C/man2/mremap.2:83
6653 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6654 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6655
6656 #. type: TP
6657 #: build/C/man2/mremap.2:83
6658 #, no-wrap
6659 msgid "B<MREMAP_MAYMOVE>"
6660 msgstr "B<MREMAP_MAYMOVE>"
6661
6662 #. type: Plain text
6663 #: build/C/man2/mremap.2:95
6664 msgid ""
6665 "By default, if there is not sufficient space to expand a mapping at its "
6666 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6667 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6668 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6669 "mapping location become invalid (offsets relative to the starting address of "
6670 "the mapping should be employed)."
6671 msgstr ""
6672 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6673 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6674 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6675 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6676 "レスからの相対オフセットは有効のままである)。"
6677
6678 #. type: TP
6679 #: build/C/man2/mremap.2:95
6680 #, no-wrap
6681 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6682 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6683
6684 #. type: Plain text
6685 #: build/C/man2/mremap.2:117
6686 msgid ""
6687 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6688 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
6689 "\\ *new_address>, which specifies a page-aligned address to which the "
6690 "mapping must be moved.  Any previous mapping at the address range specified "
6691 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6692 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6693 msgstr ""
6694 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6695 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
6696 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6697 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6698 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6699 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6700 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6701
6702 #. type: Plain text
6703 #: build/C/man2/mremap.2:127
6704 msgid ""
6705 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6706 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6707 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6708 "locked by the process may change."
6709 msgstr ""
6710 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6711 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6712 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6713 "の量は変化する。"
6714
6715 #. type: Plain text
6716 #: build/C/man2/mremap.2:135
6717 msgid ""
6718 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6719 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6720 "and I<errno> is set appropriately."
6721 msgstr ""
6722 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6723 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6724 "切に設定される。"
6725
6726 #. type: Plain text
6727 #: build/C/man2/mremap.2:142
6728 msgid ""
6729 "The caller tried to expand a memory segment that is locked, but this was not "
6730 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6731 msgstr ""
6732 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6733 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6734
6735 #. type: Plain text
6736 #: build/C/man2/mremap.2:151
6737 msgid ""
6738 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6739 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6740 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6741 "the whole address space requested, but those mappings are of different types."
6742 msgstr ""
6743 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6744 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6745 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6746 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6747 "を受け取るだろう。"
6748
6749 #. type: Plain text
6750 #: build/C/man2/mremap.2:179
6751 msgid ""
6752 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6753 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6754 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6755 "was invalid; or the new address range specified by I<new_address> and "
6756 "I<new_size> overlapped the old address range specified by I<old_address> and "
6757 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6758 "B<MREMAP_MAYMOVE>."
6759 msgstr ""
6760 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6761 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6762 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6763 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6764 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6765 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6766 "されていない。"
6767
6768 #. type: Plain text
6769 #: build/C/man2/mremap.2:185
6770 msgid ""
6771 "The memory area cannot be expanded at the current virtual address, and the "
6772 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6773 "(virtual) memory available."
6774 msgstr ""
6775 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6776 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6777
6778 #.  4.2BSD had a (never actually implemented)
6779 #.  .BR mremap (2)
6780 #.  call with completely different semantics.
6781 #. type: Plain text
6782 #: build/C/man2/mremap.2:191
6783 msgid ""
6784 "This call is Linux-specific, and should not be used in programs intended to "
6785 "be portable."
6786 msgstr ""
6787 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6788 "い。"
6789
6790 #. type: Plain text
6791 #: build/C/man2/mremap.2:199
6792 msgid ""
6793 "Prior to version 2.4, glibc did not expose the definition of "
6794 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6795 "I<new_address> argument."
6796 msgstr ""
6797 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6798 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6799
6800 #. type: Plain text
6801 #: build/C/man2/mremap.2:208
6802 msgid ""
6803 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6804 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6805 msgstr ""
6806 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6807 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6808
6809 #. type: Plain text
6810 #: build/C/man2/mremap.2:214
6811 msgid ""
6812 "Your favorite text book on operating systems for more information on paged "
6813 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6814 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6815 "Maurice J. Bach)"
6816 msgstr ""
6817 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6818 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6819 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6820 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6821
6822 #. type: TH
6823 #: build/C/man2/msync.2:25
6824 #, no-wrap
6825 msgid "MSYNC"
6826 msgstr "MSYNC"
6827
6828 #. type: TH
6829 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6830 #, no-wrap
6831 msgid "2008-04-22"
6832 msgstr "2008-04-22"
6833
6834 #. type: Plain text
6835 #: build/C/man2/msync.2:28
6836 msgid "msync - synchronize a file with a memory map"
6837 msgstr "msync - ファイルをマップしたメモリと同期させる"
6838
6839 #. type: Plain text
6840 #: build/C/man2/msync.2:32
6841 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6842 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6843
6844 #. type: Plain text
6845 #: build/C/man2/msync.2:48
6846 msgid ""
6847 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6848 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6849 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6850 "called.  To be more precise, the part of the file that corresponds to the "
6851 "memory area starting at I<addr> and having length I<length> is updated."
6852 msgstr ""
6853 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6854 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6855 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6856 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6857 "更新される。"
6858
6859 #. type: Plain text
6860 #: build/C/man2/msync.2:68
6861 msgid ""
6862 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6863 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6864 "specifies that an update be scheduled, but the call returns immediately.  "
6865 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6866 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6867 "they can be updated with the fresh values just written)."
6868 msgstr ""
6869 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6870 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6871 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6872 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6873 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6874 "に対する他のマッピングを無効にすることを要求する。"
6875
6876 #. type: Plain text
6877 #: build/C/man2/msync.2:73
6878 msgid ""
6879 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6880 "appropriately."
6881 msgstr ""
6882 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6883 "る。"
6884
6885 #. type: TP
6886 #: build/C/man2/msync.2:74
6887 #, no-wrap
6888 msgid "B<EBUSY>"
6889 msgstr "B<EBUSY>"
6890
6891 #. type: Plain text
6892 #: build/C/man2/msync.2:80
6893 msgid ""
6894 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6895 "specified address range."
6896 msgstr ""
6897 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6898 "存在する。"
6899
6900 #. type: Plain text
6901 #: build/C/man2/msync.2:93
6902 msgid ""
6903 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6904 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6905 "B<MS_ASYNC> are set in I<flags>."
6906 msgstr ""
6907 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6908 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6909 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6910
6911 #. type: Plain text
6912 #: build/C/man2/msync.2:96
6913 msgid "The indicated memory (or part of it) was not mapped."
6914 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6915
6916 #. type: Plain text
6917 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6918 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
6919 msgid "POSIX.1-2001."
6920 msgstr "POSIX.1-2001."
6921
6922 #. type: Plain text
6923 #: build/C/man2/msync.2:105
6924 msgid ""
6925 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6926 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6927 msgstr ""
6928 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6929 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6930
6931 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6932 #.  -1: unavailable, 0: ask using sysconf().
6933 #.  glibc defines them to 1.
6934 #. type: Plain text
6935 #: build/C/man2/msync.2:120
6936 msgid ""
6937 "On POSIX systems on which B<msync>()  is available, both "
6938 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6939 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6940 msgstr ""
6941 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6942 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6943 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6944
6945 #. type: TP
6946 #: build/C/man2/msync.2:122 build/C/man7/shm_overview.7:46
6947 #, no-wrap
6948 msgid "B<mmap>(2)"
6949 msgstr "B<mmap>(2)"
6950
6951 #. type: TH
6952 #: build/C/man3/mtrace.3:25
6953 #, no-wrap
6954 msgid "MTRACE"
6955 msgstr "MTRACE"
6956
6957 #. type: Plain text
6958 #: build/C/man3/mtrace.3:28
6959 msgid "mtrace, muntrace - malloc tracing"
6960 msgstr "mtrace, muntrace - malloc のトレース"
6961
6962 #. type: Plain text
6963 #: build/C/man3/mtrace.3:30
6964 msgid "B<#include E<lt>mcheck.hE<gt>>"
6965 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6966
6967 #. type: Plain text
6968 #: build/C/man3/mtrace.3:32
6969 msgid "B<void mtrace(void);>"
6970 msgstr "B<void mtrace(void);>"
6971
6972 #. type: Plain text
6973 #: build/C/man3/mtrace.3:34
6974 msgid "B<void muntrace(void);>"
6975 msgstr "B<void muntrace(void);>"
6976
6977 #. type: Plain text
6978 #: build/C/man3/mtrace.3:46
6979 msgid ""
6980 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6981 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6982 "hook functions record tracing information about memory allocation and "
6983 "deallocation.  The tracing information can be used to discover memory leaks "
6984 "and attempts to free nonallocated memory in a program."
6985 msgstr ""
6986
6987 #. type: Plain text
6988 #: build/C/man3/mtrace.3:57
6989 msgid ""
6990 "The B<muntrace>()  function disables the hook functions installed by "
6991 "B<mtrace>(), so that tracing information is no longer recorded for the "
6992 "memory-allocation functions.  If no hook functions were successfully "
6993 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6994 msgstr ""
6995
6996 #. type: Plain text
6997 #: build/C/man3/mtrace.3:65
6998 msgid ""
6999 "When B<mtrace>()  is called, it checks the value of the environment variable "
7000 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7001 "tracing information is to be recorded.  If the pathname is successfully "
7002 "opened, it is truncated to zero length."
7003 msgstr ""
7004
7005 #. type: Plain text
7006 #: build/C/man3/mtrace.3:78
7007 msgid ""
7008 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7009 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7010 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7011 "ignored, and B<mtrace>()  has no effect."
7012 msgstr ""
7013
7014 #. type: Plain text
7015 #: build/C/man3/mtrace.3:86
7016 msgid ""
7017 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7018 "program, and B<muntrace>()  is never called."
7019 msgstr ""
7020
7021 #. type: Plain text
7022 #: build/C/man3/mtrace.3:96
7023 msgid ""
7024 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7025 "designed to be human readable.  The GNU C library provides a Perl script, "
7026 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7027 "output.  For best results, the traced program should be compiled with "
7028 "debugging enabled, so that line-number information is recorded in the "
7029 "executable."
7030 msgstr ""
7031
7032 #. type: Plain text
7033 #: build/C/man3/mtrace.3:102
7034 msgid ""
7035 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7036 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7037 msgstr ""
7038
7039 #. type: Plain text
7040 #: build/C/man3/mtrace.3:108
7041 msgid ""
7042 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7043 "the line number references may refer to the previous or following (non-"
7044 "blank)  line of the source code."
7045 msgstr ""
7046
7047 #. type: Plain text
7048 #: build/C/man3/mtrace.3:115
7049 msgid ""
7050 "The shell session below demonstrates the use of the B<mtrace>()  function "
7051 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7052 "different locations.  The demonstration uses the following program:"
7053 msgstr ""
7054
7055 #. type: Plain text
7056 #: build/C/man3/mtrace.3:122
7057 #, no-wrap
7058 msgid ""
7059 "$ B<cat t_mtrace.c>\n"
7060 "#include E<lt>mcheck.hE<gt>\n"
7061 "#include E<lt>stdlib.hE<gt>\n"
7062 "#include E<lt>stdio.hE<gt>\n"
7063 msgstr ""
7064 "$ B<cat t_mtrace.c>\n"
7065 "#include E<lt>mcheck.hE<gt>\n"
7066 "#include E<lt>stdlib.hE<gt>\n"
7067 "#include E<lt>stdio.hE<gt>\n"
7068
7069 #. type: Plain text
7070 #: build/C/man3/mtrace.3:127
7071 #, no-wrap
7072 msgid ""
7073 "int\n"
7074 "main(int argc, char *argv[])\n"
7075 "{\n"
7076 "    int j;\n"
7077 msgstr ""
7078 "int\n"
7079 "main(int argc, char *argv[])\n"
7080 "{\n"
7081 "    int j;\n"
7082
7083 #. type: Plain text
7084 #: build/C/man3/mtrace.3:129
7085 #, no-wrap
7086 msgid "    mtrace();\n"
7087 msgstr "    mtrace();\n"
7088
7089 #. type: Plain text
7090 #: build/C/man3/mtrace.3:132
7091 #, no-wrap
7092 msgid ""
7093 "    for (j = 0; j E<lt> 2; j++)\n"
7094 "        malloc(100);            /* Never freed--a memory leak */\n"
7095 msgstr ""
7096 "    for (j = 0; j E<lt> 2; j++)\n"
7097 "        malloc(100);            /* Never freed--a memory leak */\n"
7098
7099 #. type: Plain text
7100 #: build/C/man3/mtrace.3:136
7101 #, no-wrap
7102 msgid ""
7103 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7104 "    exit(EXIT_SUCCESS);\n"
7105 "}\n"
7106 msgstr ""
7107 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7108 "    exit(EXIT_SUCCESS);\n"
7109 "}\n"
7110
7111 #. type: Plain text
7112 #: build/C/man3/mtrace.3:142
7113 msgid ""
7114 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7115 "memory leaks at two different locations in the program:"
7116 msgstr ""
7117
7118 #. type: Plain text
7119 #: build/C/man3/mtrace.3:155
7120 #, no-wrap
7121 msgid ""
7122 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7123 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7124 "$ B<./t_mtrace>\n"
7125 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7126 "Memory not freed:\n"
7127 "-----------------\n"
7128 "   Address     Size     Caller\n"
7129 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7130 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7131 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7132 msgstr ""
7133 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7134 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7135 "$ B<./t_mtrace>\n"
7136 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7137 "Memory not freed:\n"
7138 "-----------------\n"
7139 "   Address     Size     Caller\n"
7140 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7141 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7142 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7143
7144 #. type: Plain text
7145 #: build/C/man3/mtrace.3:167
7146 msgid ""
7147 "The first two messages about unfreed memory correspond to the two B<malloc>"
7148 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7149 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7150 msgstr ""
7151
7152 #. type: Plain text
7153 #: build/C/man3/mtrace.3:172
7154 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7155 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7156
7157 #. type: TH
7158 #: build/C/man2/posix_fadvise.2:28
7159 #, no-wrap
7160 msgid "POSIX_FADVISE"
7161 msgstr "POSIX_FADVISE"
7162
7163 #. type: TH
7164 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
7165 #: build/C/man2/sync_file_range.2:30
7166 #, no-wrap
7167 msgid "2013-04-01"
7168 msgstr "2013-04-01"
7169
7170 #. type: Plain text
7171 #: build/C/man2/posix_fadvise.2:31
7172 msgid "posix_fadvise - predeclare an access pattern for file data"
7173 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7174
7175 #. type: Plain text
7176 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7177 #, no-wrap
7178 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7179 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7180
7181 #. type: Plain text
7182 #: build/C/man2/posix_fadvise.2:37
7183 #, no-wrap
7184 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7185 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7186
7187 #. type: Plain text
7188 #: build/C/man2/posix_fadvise.2:46
7189 msgid "B<posix_fadvise>():"
7190 msgstr "B<posix_fadvise>():"
7191
7192 #. type: Plain text
7193 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7194 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7195 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7196
7197 #. type: Plain text
7198 #: build/C/man2/posix_fadvise.2:56
7199 msgid ""
7200 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7201 "data in a specific pattern in the future, thus allowing the kernel to "
7202 "perform appropriate optimizations."
7203 msgstr ""
7204 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7205 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7206 "適化を実行することが可能になる。"
7207
7208 #. type: Plain text
7209 #: build/C/man2/posix_fadvise.2:63
7210 msgid ""
7211 "The I<advice> applies to a (not necessarily existent) region starting at "
7212 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7213 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7214 "binding; it merely constitutes an expectation on behalf of the application."
7215 msgstr ""
7216 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7217 "イ\n"
7218 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7219 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7220 "ケー\n"
7221 "ションのために可能性を構成するだけである。"
7222
7223 #. type: Plain text
7224 #: build/C/man2/posix_fadvise.2:65
7225 msgid "Permissible values for I<advice> include:"
7226 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7227
7228 #. type: TP
7229 #: build/C/man2/posix_fadvise.2:65
7230 #, no-wrap
7231 msgid "B<POSIX_FADV_NORMAL>"
7232 msgstr "B<POSIX_FADV_NORMAL>"
7233
7234 #. type: Plain text
7235 #: build/C/man2/posix_fadvise.2:71
7236 msgid ""
7237 "Indicates that the application has no advice to give about its access "
7238 "pattern for the specified data.  If no advice is given for an open file, "
7239 "this is the default assumption."
7240 msgstr ""
7241 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7242 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7243 "合、 これがデフォルトで仮定される。"
7244
7245 #. type: TP
7246 #: build/C/man2/posix_fadvise.2:71
7247 #, no-wrap
7248 msgid "B<POSIX_FADV_SEQUENTIAL>"
7249 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7250
7251 #. type: Plain text
7252 #: build/C/man2/posix_fadvise.2:75
7253 msgid ""
7254 "The application expects to access the specified data sequentially (with "
7255 "lower offsets read before higher ones)."
7256 msgstr ""
7257 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7258 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7259
7260 #. type: TP
7261 #: build/C/man2/posix_fadvise.2:75
7262 #, no-wrap
7263 msgid "B<POSIX_FADV_RANDOM>"
7264 msgstr "B<POSIX_FADV_RANDOM>"
7265
7266 #. type: Plain text
7267 #: build/C/man2/posix_fadvise.2:78
7268 msgid "The specified data will be accessed in random order."
7269 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7270
7271 #. type: TP
7272 #: build/C/man2/posix_fadvise.2:78
7273 #, no-wrap
7274 msgid "B<POSIX_FADV_NOREUSE>"
7275 msgstr "B<POSIX_FADV_NOREUSE>"
7276
7277 #. type: Plain text
7278 #: build/C/man2/posix_fadvise.2:81
7279 msgid "The specified data will be accessed only once."
7280 msgstr "指定されたデータは 1 度しかアクセスされない。"
7281
7282 #. type: TP
7283 #: build/C/man2/posix_fadvise.2:81
7284 #, no-wrap
7285 msgid "B<POSIX_FADV_WILLNEED>"
7286 msgstr "B<POSIX_FADV_WILLNEED>"
7287
7288 #. type: Plain text
7289 #: build/C/man2/posix_fadvise.2:84
7290 msgid "The specified data will be accessed in the near future."
7291 msgstr "指定されたデータは近い将来アクセスされる。"
7292
7293 #. type: TP
7294 #: build/C/man2/posix_fadvise.2:84
7295 #, no-wrap
7296 msgid "B<POSIX_FADV_DONTNEED>"
7297 msgstr "B<POSIX_FADV_DONTNEED>"
7298
7299 #. type: Plain text
7300 #: build/C/man2/posix_fadvise.2:87
7301 msgid "The specified data will not be accessed in the near future."
7302 msgstr "指定されたデータは近い将来アクセスされない。"
7303
7304 #. type: Plain text
7305 #: build/C/man2/posix_fadvise.2:90
7306 msgid "On success, zero is returned.  On error, an error number is returned."
7307 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7308
7309 #. type: Plain text
7310 #: build/C/man2/posix_fadvise.2:94
7311 msgid "The I<fd> argument was not a valid file descriptor."
7312 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7313
7314 #. type: Plain text
7315 #: build/C/man2/posix_fadvise.2:97
7316 msgid "An invalid value was specified for I<advice>."
7317 msgstr "無効な値が I<advice> に指定された。"
7318
7319 #. type: Plain text
7320 #: build/C/man2/posix_fadvise.2:104
7321 msgid ""
7322 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7323 "returns B<EINVAL> in this case.)"
7324 msgstr ""
7325 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7326 "合、Linux は実際には B<EINVAL> を返す)。"
7327
7328 #.  of fadvise64_64()
7329 #. type: Plain text
7330 #: build/C/man2/posix_fadvise.2:112
7331 msgid ""
7332 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7333 "called B<fadvise64>().  Library support has been provided since glibc "
7334 "version 2.2, via the wrapper function B<posix_fadvise>()."
7335 msgstr ""
7336 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7337 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7338 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7339 "ラッパー関数は B<posix_fadvise>() という名前である。"
7340
7341 #. type: Plain text
7342 #: build/C/man2/posix_fadvise.2:121
7343 msgid ""
7344 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7345 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7346 msgstr ""
7347 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7348 "I<off_t> に変更された点に注意すること。"
7349
7350 #. type: Plain text
7351 #: build/C/man2/posix_fadvise.2:127
7352 msgid ""
7353 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7354 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7355 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7356 "the entire file, not just the specified region (but other open file handles "
7357 "to the same file are unaffected)."
7358 msgstr ""
7359 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7360 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7361 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7362 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7363 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7364
7365 #. type: Plain text
7366 #: build/C/man2/posix_fadvise.2:134
7367 msgid ""
7368 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7369 "into the page cache.  The amount of data read may be decreased by the kernel "
7370 "depending on virtual memory load.  (A few megabytes will usually be fully "
7371 "satisfied, and more is rarely useful.)"
7372 msgstr ""
7373 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7374 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7375 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7376 "くてもめったに役に立たない)。"
7377
7378 #. type: Plain text
7379 #: build/C/man2/posix_fadvise.2:138
7380 msgid ""
7381 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7382 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7383 "flag is a no-op."
7384 msgstr ""
7385 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7386 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7387 "フラグは何も行わない。"
7388
7389 #. type: Plain text
7390 #: build/C/man2/posix_fadvise.2:146
7391 msgid ""
7392 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7393 "specified region.  This is useful, for example, while streaming large "
7394 "files.  A program may periodically request the kernel to free cached data "
7395 "that has already been used, so that more useful cached pages are not "
7396 "discarded instead."
7397 msgstr ""
7398 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7399 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7400 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7401 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7402 "されたページが、 代わりに破棄されることはない。"
7403
7404 #. type: Plain text
7405 #: build/C/man2/posix_fadvise.2:154
7406 msgid ""
7407 "Pages that have not yet been written out will be unaffected, so if the "
7408 "application wishes to guarantee that pages will be released, it should call "
7409 "B<fsync>(2)  or B<fdatasync>(2)  first."
7410 msgstr ""
7411 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7412 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7413 "B<fdatasync>(2)  を呼ぶべきである。"
7414
7415 #. type: SS
7416 #: build/C/man2/posix_fadvise.2:154
7417 #, no-wrap
7418 msgid "Architecture-specific variants"
7419 msgstr "アーキテクチャ固有の派生バージョン"
7420
7421 #. type: Plain text
7422 #: build/C/man2/posix_fadvise.2:171
7423 msgid ""
7424 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7425 "of registers (see B<syscall>(2)  for further detail).  On such "
7426 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7427 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7428 "and I<len> arguments.  Therefore, these architectures define a version of "
7429 "the system call that orders the arguments suitably, but otherwise is "
7430 "otherwise exactly the same as B<posix_fadvise>()."
7431 msgstr ""
7432 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7433 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7434 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7435 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7436 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7437 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7438
7439 #. type: Plain text
7440 #: build/C/man2/posix_fadvise.2:173
7441 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7442 msgstr ""
7443 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7444
7445 #. type: Plain text
7446 #: build/C/man2/posix_fadvise.2:178
7447 #, no-wrap
7448 msgid ""
7449 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7450 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7451 msgstr ""
7452 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7453 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7454
7455 #. type: Plain text
7456 #: build/C/man2/posix_fadvise.2:186
7457 msgid ""
7458 "These architecture-specific details are generally hidden from applications "
7459 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7460 "appropriate architecture-specific system call."
7461 msgstr ""
7462 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7463 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7464 "なアーキテクチャ固有のシステムコールが呼び出される。"
7465
7466 #. type: Plain text
7467 #: build/C/man2/posix_fadvise.2:191
7468 msgid ""
7469 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7470 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7471 "through to the end of the file\"."
7472 msgstr ""
7473 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7474 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7475 "いた。"
7476
7477 #.  FIXME . Write a posix_fadvise(3) page.
7478 #. type: Plain text
7479 #: build/C/man2/posix_fadvise.2:197
7480 msgid ""
7481 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7482 "B<posix_madvise>(3)"
7483 msgstr ""
7484 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7485 "B<posix_madvise>(3)"
7486
7487 #. type: TH
7488 #: build/C/man3/posix_fallocate.3:25
7489 #, no-wrap
7490 msgid "POSIX_FALLOCATE"
7491 msgstr "POSIX_FALLOCATE"
7492
7493 #. type: TH
7494 #: build/C/man3/posix_fallocate.3:25 build/C/man2/shmop.2:41
7495 #, no-wrap
7496 msgid "2013-02-12"
7497 msgstr "2013-02-12"
7498
7499 #. type: Plain text
7500 #: build/C/man3/posix_fallocate.3:28
7501 msgid "posix_fallocate - allocate file space"
7502 msgstr "posix_fallocate - ファイルのスペースを確保する"
7503
7504 #. type: Plain text
7505 #: build/C/man3/posix_fallocate.3:33
7506 #, no-wrap
7507 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7508 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7509
7510 #. type: Plain text
7511 #: build/C/man3/posix_fallocate.3:42
7512 msgid "B<posix_fallocate>():"
7513 msgstr "B<posix_fallocate>():"
7514
7515 #. type: Plain text
7516 #: build/C/man3/posix_fallocate.3:61
7517 msgid ""
7518 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7519 "the file referred to by the descriptor I<fd> for the bytes in the range "
7520 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7521 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7522 "range are guaranteed not to fail because of lack of disk space."
7523 msgstr ""
7524 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7525 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7526 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7527 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7528 "失敗しないことが保証される。"
7529
7530 #. type: Plain text
7531 #: build/C/man3/posix_fallocate.3:66
7532 msgid ""
7533 "If the size of the file is less than I<offset>+I<len>, then the file is "
7534 "increased to this size; otherwise the file size is left unchanged."
7535 msgstr ""
7536 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7537 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7538
7539 #. type: Plain text
7540 #: build/C/man3/posix_fallocate.3:72
7541 msgid ""
7542 "B<posix_fallocate>()  returns zero on success, or an error number on "
7543 "failure.  Note that I<errno> is not set."
7544 msgstr ""
7545 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7546 "す。 I<errno> が設定されない点に注意すること。"
7547
7548 #. type: Plain text
7549 #: build/C/man3/posix_fallocate.3:81
7550 msgid "I<offset+len> exceeds the maximum file size."
7551 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7552
7553 #. type: Plain text
7554 #: build/C/man3/posix_fallocate.3:91
7555 msgid "I<fd> does not refer to a regular file."
7556 msgstr "I<fd> が通常のファイルとして参照されていない。"
7557
7558 #. type: Plain text
7559 #: build/C/man3/posix_fallocate.3:100
7560 msgid "I<fd> refers to a pipe."
7561 msgstr "I<fd> がパイプを参照している。"
7562
7563 #. type: Plain text
7564 #: build/C/man3/posix_fallocate.3:103
7565 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7566 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7567
7568 #. type: Plain text
7569 #: build/C/man3/posix_fallocate.3:128
7570 msgid ""
7571 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7572 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7573 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7574 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7575 "zero."
7576 msgstr ""
7577 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7578 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7579 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7580 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7581 "る。"
7582
7583 #. type: Plain text
7584 #: build/C/man3/posix_fallocate.3:133
7585 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7586 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7587
7588 #. type: TH
7589 #: build/C/man3/posix_memalign.3:29
7590 #, no-wrap
7591 msgid "POSIX_MEMALIGN"
7592 msgstr "POSIX_MEMALIGN"
7593
7594 #. type: TH
7595 #: build/C/man3/posix_memalign.3:29
7596 #, no-wrap
7597 msgid "2012-03-23"
7598 msgstr "2012-03-23"
7599
7600 #. type: Plain text
7601 #: build/C/man3/posix_memalign.3:32
7602 msgid ""
7603 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7604 "memory"
7605 msgstr ""
7606 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7607 "されたメモリの割り当てを行う"
7608
7609 #. type: Plain text
7610 #: build/C/man3/posix_memalign.3:39
7611 #, no-wrap
7612 msgid ""
7613 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7614 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7615 "B<void *valloc(size_t >I<size>B<);>\n"
7616 msgstr ""
7617 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7618 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7619 "B<void *valloc(size_t >I<size>B<);>\n"
7620
7621 #. type: Plain text
7622 #: build/C/man3/posix_memalign.3:44
7623 #, no-wrap
7624 msgid ""
7625 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7626 "B<void *pvalloc(size_t >I<size>B<);>\n"
7627 msgstr ""
7628 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7629 "B<void *pvalloc(size_t >I<size>B<);>\n"
7630
7631 #. type: Plain text
7632 #: build/C/man3/posix_memalign.3:54
7633 msgid ""
7634 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7635 "E<gt>=\\ 600"
7636 msgstr ""
7637 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7638 "E<gt>=\\ 600"
7639
7640 #. type: Plain text
7641 #: build/C/man3/posix_memalign.3:57
7642 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7643 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7644
7645 #. type: Plain text
7646 #: build/C/man3/posix_memalign.3:59
7647 msgid "B<valloc>():"
7648 msgstr "B<valloc>():"
7649
7650 #. type: TP
7651 #: build/C/man3/posix_memalign.3:62
7652 #, no-wrap
7653 msgid "Since glibc 2.12:"
7654 msgstr "glibc 2.12 以降:"
7655
7656 #. type: Plain text
7657 #: build/C/man3/posix_memalign.3:69
7658 #, no-wrap
7659 msgid ""
7660 "_BSD_SOURCE ||\n"
7661 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7662 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7663 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7664 msgstr ""
7665 "_BSD_SOURCE ||\n"
7666 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7667 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7668 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7669
7670 #. type: TP
7671 #: build/C/man3/posix_memalign.3:71
7672 #, no-wrap
7673 msgid "Before glibc 2.12:"
7674 msgstr "glibc 2.12 より前:"
7675
7676 #. type: Plain text
7677 #: build/C/man3/posix_memalign.3:75
7678 msgid ""
7679 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7680 "_XOPEN_SOURCE_EXTENDED"
7681 msgstr ""
7682 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7683 "_XOPEN_SOURCE_EXTENDED"
7684
7685 #. type: Plain text
7686 #: build/C/man3/posix_memalign.3:82
7687 msgid ""
7688 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7689 "declaration of B<valloc>(); no feature test macros are required.)"
7690 msgstr ""
7691 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7692 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7693
7694 #.  glibc does this:
7695 #. type: Plain text
7696 #: build/C/man3/posix_memalign.3:103
7697 msgid ""
7698 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7699 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7700 "memory will be a multiple of I<alignment>, which must be a power of two and "
7701 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then B<posix_memalign>"
7702 "()  returns either NULL, or a unique pointer value that can later be "
7703 "successfully passed to B<free>(3)."
7704 msgstr ""
7705 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7706 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7707 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7708 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7709 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7710 "で B<free>(3)  に問題なく渡すことができる。"
7711
7712 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7713 #.  but no standards govern this.
7714 #. type: Plain text
7715 #: build/C/man3/posix_memalign.3:114
7716 msgid ""
7717 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7718 "pointer to the allocated memory.  The memory address will be a multiple of "
7719 "I<alignment>, which must be a power of two."
7720 msgstr ""
7721 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7722 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7723 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7724
7725 #. type: Plain text
7726 #: build/C/man3/posix_memalign.3:123
7727 msgid ""
7728 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7729 "the added restriction that I<size> should be a multiple of I<alignment>."
7730 msgstr ""
7731 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7732 "I<alignment>\n"
7733 "の倍数でなければならないという追加の制限がある点が異なる。"
7734
7735 #. type: Plain text
7736 #: build/C/man3/posix_memalign.3:132
7737 msgid ""
7738 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7739 "pointer to the allocated memory.  The memory address will be a multiple of "
7740 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7741 msgstr ""
7742 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7743 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7744 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7745 "る。"
7746
7747 #. type: Plain text
7748 #: build/C/man3/posix_memalign.3:139
7749 msgid ""
7750 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7751 "the size of the allocation up to the next multiple of the system page size."
7752 msgstr ""
7753 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7754 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7755
7756 #. type: Plain text
7757 #: build/C/man3/posix_memalign.3:141
7758 msgid "For all of these functions, the memory is not zeroed."
7759 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7760
7761 #. type: Plain text
7762 #: build/C/man3/posix_memalign.3:148
7763 msgid ""
7764 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7765 "pointer to the allocated memory, or NULL if the request fails."
7766 msgstr ""
7767 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7768 "た\n"
7769 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7770
7771 #. type: Plain text
7772 #: build/C/man3/posix_memalign.3:155
7773 msgid ""
7774 "B<posix_memalign>()  returns zero on success, or one of the error values "
7775 "listed in the next section on failure.  Note that I<errno> is not set."
7776 msgstr ""
7777 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7778 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7779 "ること。"
7780
7781 #. type: Plain text
7782 #: build/C/man3/posix_memalign.3:162
7783 msgid ""
7784 "The I<alignment> argument was not a power of two, or was not a multiple of "
7785 "I<sizeof(void\\ *)>."
7786 msgstr ""
7787 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
7788 "かった。"
7789
7790 #. type: Plain text
7791 #: build/C/man3/posix_memalign.3:165
7792 msgid "There was insufficient memory to fulfill the allocation request."
7793 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7794
7795 #. type: Plain text
7796 #: build/C/man3/posix_memalign.3:172
7797 msgid ""
7798 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7799 "available in all Linux libc libraries."
7800 msgstr ""
7801 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7802 "すべての Linux libc ライブラリで使用可能である。"
7803
7804 #. type: Plain text
7805 #: build/C/man3/posix_memalign.3:176
7806 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7807 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7808
7809 #. type: Plain text
7810 #: build/C/man3/posix_memalign.3:180
7811 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7812 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7813
7814 #. type: Plain text
7815 #: build/C/man3/posix_memalign.3:187
7816 msgid ""
7817 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7818 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7819 "POSIX.1-2001."
7820 msgstr ""
7821 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7822 "り、\n"
7823 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7824
7825 #. type: Plain text
7826 #: build/C/man3/posix_memalign.3:191
7827 msgid "The function B<pvalloc>()  is a GNU extension."
7828 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7829
7830 #. type: Plain text
7831 #: build/C/man3/posix_memalign.3:195
7832 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7833 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7834
7835 #. type: Plain text
7836 #: build/C/man3/posix_memalign.3:199
7837 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7838 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7839
7840 #. type: Plain text
7841 #: build/C/man3/posix_memalign.3:204
7842 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7843 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7844
7845 #. type: SS
7846 #: build/C/man3/posix_memalign.3:204
7847 #, no-wrap
7848 msgid "Headers"
7849 msgstr "ヘッダ"
7850
7851 #. type: Plain text
7852 #: build/C/man3/posix_memalign.3:208
7853 msgid ""
7854 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7855 "hE<gt>>."
7856 msgstr ""
7857 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7858 "の意見が一致している。"
7859
7860 #. type: Plain text
7861 #: build/C/man3/posix_memalign.3:212
7862 msgid ""
7863 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7864 "of I<E<lt>malloc.hE<gt>>."
7865 msgstr ""
7866 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7867 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7868
7869 #. type: Plain text
7870 #: build/C/man3/posix_memalign.3:219
7871 msgid ""
7872 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7873 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7874 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7875 "above)."
7876 msgstr ""
7877 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7878 "libc4,5\n"
7879 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7880 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7881
7882 #. type: Plain text
7883 #: build/C/man3/posix_memalign.3:228
7884 msgid ""
7885 "On many systems there are alignment restrictions, for example, on buffers "
7886 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7887 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7888 "use B<posix_memalign>()  to satisfy this requirement."
7889 msgstr ""
7890 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7891 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7892 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7893 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7894 "と、この必要条件を満たすことができる。"
7895
7896 #. type: Plain text
7897 #: build/C/man3/posix_memalign.3:237
7898 msgid ""
7899 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7900 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7901 "is correct."
7902 msgstr ""
7903 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7904 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7905 "確認を行わないかもしれない。"
7906
7907 #.  Other systems allow passing the result of
7908 #.  .IR valloc ()
7909 #.  to
7910 #.  .IR free (3),
7911 #.  but not to
7912 #.  .IR realloc (3).
7913 #. type: Plain text
7914 #: build/C/man3/posix_memalign.3:265
7915 msgid ""
7916 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7917 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7918 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
7919 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
7920 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
7921 "implementation allows memory obtained from any of these functions to be "
7922 "reclaimed with B<free>(3)."
7923 msgstr ""
7924 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7925 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7926 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7927 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7928 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7929 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7930 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7931 "B<free>(3) で再利用することができる。"
7932
7933 #. type: Plain text
7934 #: build/C/man3/posix_memalign.3:270
7935 msgid ""
7936 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7937 "these functions are needed only if you require larger alignment values."
7938 msgstr ""
7939 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7940 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7941 "ト\n"
7942 "が必要な場合だけである。"
7943
7944 #. type: Plain text
7945 #: build/C/man3/posix_memalign.3:275
7946 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7947 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7948
7949 #. type: TH
7950 #: build/C/man2/readahead.2:28
7951 #, no-wrap
7952 msgid "READAHEAD"
7953 msgstr "READAHEAD"
7954
7955 #. type: Plain text
7956 #: build/C/man2/readahead.2:31
7957 msgid "readahead - perform file readahead into page cache"
7958 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7959
7960 #. type: Plain text
7961 #: build/C/man2/readahead.2:37
7962 #, no-wrap
7963 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7964 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7965
7966 #. type: Plain text
7967 #: build/C/man2/readahead.2:65
7968 msgid ""
7969 "B<readahead>()  populates the page cache with data from a file so that "
7970 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7971 "argument is a file descriptor identifying the file which is to be read.  The "
7972 "I<offset> argument specifies the starting point from which data is to be "
7973 "read and I<count> specifies the number of bytes to be read.  I/O is "
7974 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7975 "page boundary and bytes are read up to the next page boundary greater than "
7976 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7977 "of the file.  B<readahead>()  blocks until the specified data has been "
7978 "read.  The current file offset of the open file referred to by I<fd> is left "
7979 "unchanged."
7980 msgstr ""
7981 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7982 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7983 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7984 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7985 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7986 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7987 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7988 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7989 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7990 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7991 "更されない。"
7992
7993 #. type: Plain text
7994 #: build/C/man2/readahead.2:71
7995 msgid ""
7996 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7997 "I<errno> set to indicate the cause of the error."
7998 msgstr ""
7999 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8000 "ラーの原因を示す値を設定する。"
8001
8002 #. type: Plain text
8003 #: build/C/man2/readahead.2:76
8004 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8005 msgstr ""
8006 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8007 "ていない。"
8008
8009 #. type: Plain text
8010 #: build/C/man2/readahead.2:82
8011 msgid ""
8012 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8013 msgstr ""
8014 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8015 "ファイルであった。"
8016
8017 #. type: Plain text
8018 #: build/C/man2/readahead.2:87
8019 msgid ""
8020 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8021 "been provided since version 2.3."
8022 msgstr ""
8023 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8024 "は glibc バージョン 2.3 以降で行われている。"
8025
8026 #. type: Plain text
8027 #: build/C/man2/readahead.2:92
8028 msgid ""
8029 "The B<readahead>()  system call is Linux-specific, and its use should be "
8030 "avoided in portable applications."
8031 msgstr ""
8032 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8033 "は 使用を避けるべきである。"
8034
8035 #. type: Plain text
8036 #: build/C/man2/readahead.2:97
8037 msgid ""
8038 "On some 32-bit architectures, the calling signature for this system call "
8039 "differs, for the reasons described in B<syscall>(2)."
8040 msgstr ""
8041 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8042 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8043
8044 #. type: Plain text
8045 #: build/C/man2/readahead.2:103
8046 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8047 msgstr ""
8048 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8049
8050 #. type: TH
8051 #: build/C/man2/remap_file_pages.2:28
8052 #, no-wrap
8053 msgid "REMAP_FILE_PAGES"
8054 msgstr "REMAP_FILE_PAGES"
8055
8056 #. type: Plain text
8057 #: build/C/man2/remap_file_pages.2:31
8058 msgid "remap_file_pages - create a nonlinear file mapping"
8059 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8060
8061 #. type: Plain text
8062 #: build/C/man2/remap_file_pages.2:35
8063 #, no-wrap
8064 msgid ""
8065 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8066 "B<#include E<lt>sys/mman.hE<gt>>\n"
8067 msgstr ""
8068 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8069 "B<#include E<lt>sys/mman.hE<gt>>\n"
8070
8071 #. type: Plain text
8072 #: build/C/man2/remap_file_pages.2:38
8073 #, no-wrap
8074 msgid ""
8075 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8076 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8077 msgstr ""
8078 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8079 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8080
8081 #. type: Plain text
8082 #: build/C/man2/remap_file_pages.2:51
8083 msgid ""
8084 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8085 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8086 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8087 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8088 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8089 "data structures."
8090 msgstr ""
8091 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8092 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8093 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8094 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8095 "域)  データ構造体を追加で作成する必要がないことである。"
8096
8097 #. type: Plain text
8098 #: build/C/man2/remap_file_pages.2:53
8099 msgid "To create a nonlinear mapping we perform the following steps:"
8100 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8101
8102 #. type: TP
8103 #: build/C/man2/remap_file_pages.2:53
8104 #, no-wrap
8105 msgid "1."
8106 msgstr "1."
8107
8108 #. type: Plain text
8109 #: build/C/man2/remap_file_pages.2:61
8110 msgid ""
8111 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8112 "mapping must be created with the B<MAP_SHARED> flag."
8113 msgstr ""
8114 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8115 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8116 "い。"
8117
8118 #. type: TP
8119 #: build/C/man2/remap_file_pages.2:61
8120 #, no-wrap
8121 msgid "2."
8122 msgstr "2."
8123
8124 #. type: Plain text
8125 #: build/C/man2/remap_file_pages.2:69
8126 msgid ""
8127 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8128 "correspondence between the pages of the mapping and the pages of the file.  "
8129 "It is possible to map the same page of a file into multiple locations within "
8130 "the mapped region."
8131 msgstr ""
8132 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8133 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8134 "所に マップすることが可能である。"
8135
8136 #. type: Plain text
8137 #: build/C/man2/remap_file_pages.2:80
8138 msgid ""
8139 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8140 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8141 "system page size; I<size> is the length of the region in bytes."
8142 msgstr ""
8143 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8144 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8145 "る。 I<size> は領域の長さであり、単位はバイトである。"
8146
8147 #. type: Plain text
8148 #: build/C/man2/remap_file_pages.2:98
8149 msgid ""
8150 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8151 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8152 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8153 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8154 "and I<size> will be placed."
8155 msgstr ""
8156 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8157 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8158 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8159 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8160 "レスを、 I<addr> によって指定することである。"
8161
8162 #.  This rounding is weird, and not consistent with the treatment of
8163 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8164 #.  MTK, 14 Sep 2005
8165 #. type: Plain text
8166 #: build/C/man2/remap_file_pages.2:112
8167 msgid ""
8168 "The values specified in I<addr> and I<size> should be multiples of the "
8169 "system page size.  If they are not, then the kernel rounds I<both> values "
8170 "I<down> to the nearest multiple of the page size."
8171 msgstr ""
8172 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8173 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8174 "「切り下げる」。"
8175
8176 #. type: Plain text
8177 #: build/C/man2/remap_file_pages.2:116
8178 msgid "The I<prot> argument must be specified as 0."
8179 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8180
8181 #. type: Plain text
8182 #: build/C/man2/remap_file_pages.2:124
8183 msgid ""
8184 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8185 "other than B<MAP_NONBLOCK> are ignored."
8186 msgstr ""
8187 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8188 "の全てのフラグは無視される。"
8189
8190 #. type: Plain text
8191 #: build/C/man2/remap_file_pages.2:131
8192 msgid ""
8193 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8194 "I<errno> is set appropriately."
8195 msgstr ""
8196 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8197 "れ、 I<errno> が適切に設定される。"
8198
8199 #. type: Plain text
8200 #: build/C/man2/remap_file_pages.2:139
8201 msgid ""
8202 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8203 "flag."
8204 msgstr ""
8205 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8206 "いない。"
8207
8208 #.  And possibly others from vma->vm_ops->populate()
8209 #. type: Plain text
8210 #: build/C/man2/remap_file_pages.2:148
8211 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8212 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8213
8214 #. type: Plain text
8215 #: build/C/man2/remap_file_pages.2:153
8216 msgid ""
8217 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8218 "support was added in version 2.3.3."
8219 msgstr ""
8220 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8221 "サポートは glibc バージョン 2.3.3 で追加された。"
8222
8223 #. type: Plain text
8224 #: build/C/man2/remap_file_pages.2:157
8225 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8226 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8227
8228 #. type: Plain text
8229 #: build/C/man2/remap_file_pages.2:164
8230 msgid ""
8231 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8232 "B<msync>(2)"
8233 msgstr ""
8234 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8235 "B<msync>(2)"
8236
8237 #. type: TH
8238 #: build/C/man3/shm_open.3:26
8239 #, no-wrap
8240 msgid "SHM_OPEN"
8241 msgstr "SHM_OPEN"
8242
8243 #. type: TH
8244 #: build/C/man3/shm_open.3:26
8245 #, no-wrap
8246 msgid "2009-02-25"
8247 msgstr "2009-02-25"
8248
8249 #. type: Plain text
8250 #: build/C/man3/shm_open.3:29
8251 msgid ""
8252 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8253 msgstr ""
8254 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8255 "う"
8256
8257 #. type: Plain text
8258 #: build/C/man3/shm_open.3:33
8259 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8260 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8261
8262 #. type: Plain text
8263 #: build/C/man3/shm_open.3:35
8264 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8265 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8266
8267 #. type: Plain text
8268 #: build/C/man3/shm_open.3:37
8269 msgid ""
8270 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8271 msgstr ""
8272 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8273
8274 #. type: Plain text
8275 #: build/C/man3/shm_open.3:39
8276 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8277 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8278
8279 #. type: Plain text
8280 #: build/C/man3/shm_open.3:41
8281 msgid "Link with I<-lrt>."
8282 msgstr "I<-lrt> でリンクする。"
8283
8284 #. type: Plain text
8285 #: build/C/man3/shm_open.3:53
8286 msgid ""
8287 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8288 "memory object.  A POSIX shared memory object is in effect a handle which can "
8289 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8290 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8291 "removing an object previously created by B<shm_open>()."
8292 msgstr ""
8293 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8294 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8295 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8296 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8297 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8298
8299 #.  glibc allows the initial slash to be omitted, and makes
8300 #.  multiple initial slashes equivalent to a single slash.
8301 #.  This differs from the implementation of POSIX message queues.
8302 #.  glibc allows subdirectory components in the name, in which
8303 #.  case the subdirectory must exist under /dev/shm, and allow the
8304 #.  required permissions if a user wants to create a shared memory
8305 #.  object in that subdirectory.
8306 #. type: Plain text
8307 #: build/C/man3/shm_open.3:74
8308 msgid ""
8309 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8310 "specifies the shared memory object to be created or opened.  For portable "
8311 "use, a shared memory object should be identified by a name of the form I</"
8312 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8313 "255) characters consisting of an initial slash, followed by one or more "
8314 "characters, none of which are slashes."
8315 msgstr ""
8316 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8317 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8318 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8319 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8320 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8321
8322 #. type: Plain text
8323 #: build/C/man3/shm_open.3:81
8324 msgid ""
8325 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8326 "or B<O_RDWR> and any of the other flags listed here:"
8327 msgstr ""
8328 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8329 "述べる他のフラグの論理和をとったもの を指定する。"
8330
8331 #. type: TP
8332 #: build/C/man3/shm_open.3:81
8333 #, no-wrap
8334 msgid "B<O_RDONLY>"
8335 msgstr "B<O_RDONLY>"
8336
8337 #. type: Plain text
8338 #: build/C/man3/shm_open.3:89
8339 msgid ""
8340 "Open the object for read access.  A shared memory object opened in this way "
8341 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8342 msgstr ""
8343 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8344 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8345 "B<mmap>(2)  することができる。"
8346
8347 #. type: TP
8348 #: build/C/man3/shm_open.3:89
8349 #, no-wrap
8350 msgid "B<O_RDWR>"
8351 msgstr "B<O_RDWR>"
8352
8353 #. type: Plain text
8354 #: build/C/man3/shm_open.3:92
8355 msgid "Open the object for read-write access."
8356 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8357
8358 #. type: TP
8359 #: build/C/man3/shm_open.3:92
8360 #, no-wrap
8361 msgid "B<O_CREAT>"
8362 msgstr "B<O_CREAT>"
8363
8364 #.  In truth it is actually the file system IDs on Linux, but these
8365 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8366 #. type: Plain text
8367 #: build/C/man3/shm_open.3:112
8368 msgid ""
8369 "Create the shared memory object if it does not exist.  The user and group "
8370 "ownership of the object are taken from the corresponding effective IDs of "
8371 "the calling process, and the object's permission bits are set according to "
8372 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8373 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8374 "A set of macro constants which can be used to define I<mode> is listed in "
8375 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8376 "including I<E<lt>sys/stat.hE<gt>>.)"
8377 msgstr ""
8378 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8379 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8380 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8381 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8382 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8383 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8384 "hE<gt>> のインクルードにより得られる)。"
8385
8386 #. type: Plain text
8387 #: build/C/man3/shm_open.3:118
8388 msgid ""
8389 "A new shared memory object initially has zero length\\(emthe size of the "
8390 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8391 "shared memory object are automatically initialized to 0."
8392 msgstr ""
8393 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8394 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8395 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8396
8397 #. type: TP
8398 #: build/C/man3/shm_open.3:118
8399 #, no-wrap
8400 msgid "B<O_EXCL>"
8401 msgstr "B<O_EXCL>"
8402
8403 #. type: Plain text
8404 #: build/C/man3/shm_open.3:127
8405 msgid ""
8406 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8407 "I<name> already exists, return an error.  The check for the existence of the "
8408 "object, and its creation if it does not exist, are performed atomically."
8409 msgstr ""
8410 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8411 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8412 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8413 "atomically)。"
8414
8415 #. type: TP
8416 #: build/C/man3/shm_open.3:127
8417 #, no-wrap
8418 msgid "B<O_TRUNC>"
8419 msgstr "B<O_TRUNC>"
8420
8421 #. type: Plain text
8422 #: build/C/man3/shm_open.3:130
8423 msgid "If the shared memory object already exists, truncate it to zero bytes."
8424 msgstr ""
8425 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8426 "切り詰める。"
8427
8428 #. type: Plain text
8429 #: build/C/man3/shm_open.3:133
8430 msgid ""
8431 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8432 "hE<gt>>."
8433 msgstr ""
8434 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8435
8436 #. type: Plain text
8437 #: build/C/man3/shm_open.3:144
8438 msgid ""
8439 "On successful completion B<shm_open>()  returns a new file descriptor "
8440 "referring to the shared memory object.  This file descriptor is guaranteed "
8441 "to be the lowest-numbered file descriptor not previously opened within the "
8442 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8443 "descriptor."
8444 msgstr ""
8445 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8446 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8447 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8448 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8449 "ファイル・ディスクリプタに設定される。"
8450
8451 #. type: Plain text
8452 #: build/C/man3/shm_open.3:153
8453 msgid ""
8454 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8455 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8456 "the file descriptor may be closed without affecting the memory mapping."
8457 msgstr ""
8458 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8459 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8460 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8461 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8462
8463 #. type: Plain text
8464 #: build/C/man3/shm_open.3:171
8465 msgid ""
8466 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8467 "shared memory object name, and, once all processes have unmapped the object, "
8468 "de-allocates and destroys the contents of the associated memory region.  "
8469 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8470 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8471 "case a new, distinct object is created)."
8472 msgstr ""
8473 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8474 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8475 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8476 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8477 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8478 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8479
8480 #. type: Plain text
8481 #: build/C/man3/shm_open.3:180
8482 msgid ""
8483 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8484 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8485 "or -1 on error."
8486 msgstr ""
8487 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8488 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8489 "を、エラーが起こった場合 -1 を返す。"
8490
8491 #. type: Plain text
8492 #: build/C/man3/shm_open.3:187
8493 msgid ""
8494 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8495 "which may appear in I<errno> include the following:"
8496 msgstr ""
8497 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8498 "される値は以下の通りである:"
8499
8500 #. type: Plain text
8501 #: build/C/man3/shm_open.3:192
8502 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8503 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8504
8505 #. type: Plain text
8506 #: build/C/man3/shm_open.3:202
8507 msgid ""
8508 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8509 "B<O_TRUNC> was specified and the caller does not have write permission on "
8510 "the object."
8511 msgstr ""
8512 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8513 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8514 "み権限が なかった。"
8515
8516 #. type: TP
8517 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:195
8518 #, no-wrap
8519 msgid "B<EEXIST>"
8520 msgstr "B<EEXIST>"
8521
8522 #. type: Plain text
8523 #: build/C/man3/shm_open.3:213
8524 msgid ""
8525 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8526 "shared memory object specified by I<name> already exists."
8527 msgstr ""
8528 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8529 "定された共有メモリ・オブジェクトが既に存在した。"
8530
8531 #. type: Plain text
8532 #: build/C/man3/shm_open.3:220
8533 msgid "The I<name> argument to B<shm_open>()  was invalid."
8534 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8535
8536 #. type: TP
8537 #: build/C/man3/shm_open.3:220
8538 #, no-wrap
8539 msgid "B<EMFILE>"
8540 msgstr "B<EMFILE>"
8541
8542 #. type: Plain text
8543 #: build/C/man3/shm_open.3:223
8544 msgid "The process already has the maximum number of files open."
8545 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8546
8547 #. type: TP
8548 #: build/C/man3/shm_open.3:223
8549 #, no-wrap
8550 msgid "B<ENAMETOOLONG>"
8551 msgstr "B<ENAMETOOLONG>"
8552
8553 #. type: Plain text
8554 #: build/C/man3/shm_open.3:229
8555 msgid "The length of I<name> exceeds B<PATH_MAX>."
8556 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8557
8558 #. type: Plain text
8559 #: build/C/man3/shm_open.3:233
8560 msgid ""
8561 "The limit on the total number of files open on the system has been reached."
8562 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8563
8564 #. type: TP
8565 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8566 #: build/C/man2/shmget.2:209
8567 #, no-wrap
8568 msgid "B<ENOENT>"
8569 msgstr "B<ENOENT>"
8570
8571 #. type: Plain text
8572 #: build/C/man3/shm_open.3:242
8573 msgid ""
8574 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8575 "B<O_CREAT> was not specified."
8576 msgstr ""
8577 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8578 "B<O_CREAT> が指定されていなかった。"
8579
8580 #. type: Plain text
8581 #: build/C/man3/shm_open.3:249
8582 msgid ""
8583 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8584 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8585
8586 #. type: Plain text
8587 #: build/C/man3/shm_open.3:251
8588 msgid "These functions are provided in glibc 2.2 and later."
8589 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8590
8591 #. type: Plain text
8592 #: build/C/man3/shm_open.3:257
8593 msgid ""
8594 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8595 "object is set to either the calling process's effective group ID or \"a "
8596 "system default group ID\"."
8597 msgstr ""
8598 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8599 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8600 "ID」 のどちらかに設定される、と書かれている。"
8601
8602 #. type: Plain text
8603 #: build/C/man3/shm_open.3:266
8604 msgid ""
8605 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8606 "unspecified.  On Linux, this will successfully truncate an existing shared "
8607 "memory object\\(emthis may not be so on other UNIX systems."
8608 msgstr ""
8609 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8610 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8611 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8612
8613 #. type: Plain text
8614 #: build/C/man3/shm_open.3:271
8615 msgid ""
8616 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8617 "dedicated file system, which is normally mounted under I</dev/shm>."
8618 msgstr ""
8619 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8620 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8621
8622 #. type: Plain text
8623 #: build/C/man3/shm_open.3:282
8624 msgid ""
8625 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8626 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8627 msgstr ""
8628 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8629 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8630
8631 #. type: TH
8632 #: build/C/man7/shm_overview.7:27
8633 #, no-wrap
8634 msgid "SHM_OVERVIEW"
8635 msgstr "SHM_OVERVIEW"
8636
8637 #. type: TH
8638 #: build/C/man7/shm_overview.7:27
8639 #, no-wrap
8640 msgid "2010-09-10"
8641 msgstr "2010-09-10"
8642
8643 #. type: Plain text
8644 #: build/C/man7/shm_overview.7:30
8645 msgid "shm_overview - overview of POSIX shared memory"
8646 msgstr "shm_overview - POSIX 共有メモリの概要"
8647
8648 #. type: Plain text
8649 #: build/C/man7/shm_overview.7:33
8650 msgid ""
8651 "The POSIX shared memory API allows processes to communicate information by "
8652 "sharing a region of memory."
8653 msgstr ""
8654 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8655 "情報をやり取りすることができる。"
8656
8657 #. type: Plain text
8658 #: build/C/man7/shm_overview.7:35
8659 msgid "The interfaces employed in the API are:"
8660 msgstr "この API では以下のインターフェースが採用されている。"
8661
8662 #. type: TP
8663 #: build/C/man7/shm_overview.7:35
8664 #, no-wrap
8665 msgid "B<shm_open>(3)"
8666 msgstr "B<shm_open>(3)"
8667
8668 #. type: Plain text
8669 #: build/C/man7/shm_overview.7:42
8670 msgid ""
8671 "Create and open a new object, or open an existing object.  This is analogous "
8672 "to B<open>(2).  The call returns a file descriptor for use by the other "
8673 "interfaces listed below."
8674 msgstr ""
8675 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8676 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8677 "る ファイルディスクリプタを返す。"
8678
8679 #. type: TP
8680 #: build/C/man7/shm_overview.7:42
8681 #, no-wrap
8682 msgid "B<ftruncate>(2)"
8683 msgstr "B<ftruncate>(2)"
8684
8685 #. type: Plain text
8686 #: build/C/man7/shm_overview.7:46
8687 msgid ""
8688 "Set the size of the shared memory object.  (A newly created shared memory "
8689 "object has a length of zero.)"
8690 msgstr "共有メモリオブジェクトの大きさを設定する。"
8691
8692 #. type: Plain text
8693 #: build/C/man7/shm_overview.7:50
8694 msgid ""
8695 "Map the shared memory object into the virtual address space of the calling "
8696 "process."
8697 msgstr ""
8698 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8699
8700 #. type: TP
8701 #: build/C/man7/shm_overview.7:50
8702 #, no-wrap
8703 msgid "B<munmap>(2)"
8704 msgstr "B<munmap>(2)"
8705
8706 #. type: Plain text
8707 #: build/C/man7/shm_overview.7:54
8708 msgid ""
8709 "Unmap the shared memory object from the virtual address space of the calling "
8710 "process."
8711 msgstr ""
8712 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8713 "る。"
8714
8715 #. type: TP
8716 #: build/C/man7/shm_overview.7:54
8717 #, no-wrap
8718 msgid "B<shm_unlink>(3)"
8719 msgstr "B<shm_unlink>(3)"
8720
8721 #. type: Plain text
8722 #: build/C/man7/shm_overview.7:57
8723 msgid "Remove a shared memory object name."
8724 msgstr "共有メモリオブジェクト名を削除する。"
8725
8726 #. type: TP
8727 #: build/C/man7/shm_overview.7:57
8728 #, no-wrap
8729 msgid "B<close>(2)"
8730 msgstr "B<close>(2)"
8731
8732 #. type: Plain text
8733 #: build/C/man7/shm_overview.7:62
8734 msgid ""
8735 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8736 "needed."
8737 msgstr ""
8738 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8739 "のファイルディスクリプタをクローズする。"
8740
8741 #. type: TP
8742 #: build/C/man7/shm_overview.7:62
8743 #, no-wrap
8744 msgid "B<fstat>(2)"
8745 msgstr "B<fstat>(2)"
8746
8747 #. type: Plain text
8748 #: build/C/man7/shm_overview.7:76
8749 msgid ""
8750 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8751 "the information returned by this call are the object's size (I<st_size>), "
8752 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8753 msgstr ""
8754 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8755 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8756 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8757
8758 #. type: TP
8759 #: build/C/man7/shm_overview.7:76
8760 #, no-wrap
8761 msgid "B<fchown>(2)"
8762 msgstr "B<fchown>(2)"
8763
8764 #. type: Plain text
8765 #: build/C/man7/shm_overview.7:79
8766 msgid "To change the ownership of a shared memory object."
8767 msgstr "共有メモリオブジェクトの所有権を変更する。"
8768
8769 #. type: TP
8770 #: build/C/man7/shm_overview.7:79
8771 #, no-wrap
8772 msgid "B<fchmod>(2)"
8773 msgstr "B<fchmod>(2)"
8774
8775 #. type: Plain text
8776 #: build/C/man7/shm_overview.7:82
8777 msgid "To change the permissions of a shared memory object."
8778 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8779
8780 #. type: SS
8781 #: build/C/man7/shm_overview.7:82
8782 #, no-wrap
8783 msgid "Versions"
8784 msgstr "Versions"
8785
8786 #. type: Plain text
8787 #: build/C/man7/shm_overview.7:84
8788 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8789 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8790
8791 #. type: SS
8792 #: build/C/man7/shm_overview.7:84
8793 #, no-wrap
8794 msgid "Persistence"
8795 msgstr "持続性"
8796
8797 #. type: Plain text
8798 #: build/C/man7/shm_overview.7:89
8799 msgid ""
8800 "POSIX shared memory objects have kernel persistence: a shared memory object "
8801 "will exist until the system is shut down, or until all processes have "
8802 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8803 msgstr ""
8804 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8805 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8806 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8807
8808 #. type: SS
8809 #: build/C/man7/shm_overview.7:89
8810 #, no-wrap
8811 msgid "Linking"
8812 msgstr "リンク"
8813
8814 #. type: Plain text
8815 #: build/C/man7/shm_overview.7:94
8816 msgid ""
8817 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8818 "to link against the real-time library, I<librt>."
8819 msgstr ""
8820 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8821 "タイムライブラリ I<librt> とリンクしなければならない。"
8822
8823 #. type: SS
8824 #: build/C/man7/shm_overview.7:94
8825 #, no-wrap
8826 msgid "Accessing shared memory objects via the file system"
8827 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8828
8829 #. type: Plain text
8830 #: build/C/man7/shm_overview.7:101
8831 msgid ""
8832 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8833 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8834 "supports the use of access control lists (ACLs)  to control the permissions "
8835 "of objects in the virtual file system."
8836 msgstr ""
8837 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8838 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8839 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8840 "スト (ACL; access control lists) を使うことができる。"
8841
8842 #. type: Plain text
8843 #: build/C/man7/shm_overview.7:106
8844 msgid ""
8845 "Typically, processes must synchronize their access to a shared memory "
8846 "object, using, for example, POSIX semaphores."
8847 msgstr ""
8848 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8849 "使ってプロセス間で同期をとらなければならない。"
8850
8851 #. type: Plain text
8852 #: build/C/man7/shm_overview.7:114
8853 msgid ""
8854 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8855 "memory API.  POSIX shared memory provides a simpler, and better designed "
8856 "interface; on the other hand POSIX shared memory is somewhat less widely "
8857 "available (especially on older systems) than System V shared memory."
8858 msgstr ""
8859 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8860 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8861 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8862 "システムが少ない (特に、古いシステムでは少ない)。"
8863
8864 #. type: Plain text
8865 #: build/C/man7/shm_overview.7:127
8866 msgid ""
8867 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8868 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8869 "B<shm_unlink>(3), B<sem_overview>(7)"
8870 msgstr ""
8871 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8872 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8873 "B<shm_unlink>(3), B<sem_overview>(7)"
8874
8875 #. type: TH
8876 #: build/C/man2/shmctl.2:45
8877 #, no-wrap
8878 msgid "SHMCTL"
8879 msgstr "SHMCTL"
8880
8881 #. type: TH
8882 #: build/C/man2/shmctl.2:45
8883 #, no-wrap
8884 msgid "2013-03-18"
8885 msgstr "2013-03-18"
8886
8887 #. type: Plain text
8888 #: build/C/man2/shmctl.2:48
8889 msgid "shmctl - System V shared memory control"
8890 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
8891
8892 #. type: Plain text
8893 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8894 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8895 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8896
8897 #. type: Plain text
8898 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8899 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8900 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8901
8902 #. type: Plain text
8903 #: build/C/man2/shmctl.2:55
8904 msgid ""
8905 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8906 msgstr ""
8907 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8908
8909 #. type: Plain text
8910 #: build/C/man2/shmctl.2:62
8911 msgid ""
8912 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8913 "System V shared memory segment whose identifier is given in I<shmid>."
8914 msgstr ""
8915 "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対し"
8916 "て I<cmd> で指示した制御命令を実行する。"
8917
8918 #. type: Plain text
8919 #: build/C/man2/shmctl.2:67
8920 msgid ""
8921 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8922 "I<E<lt>sys/shm.hE<gt>> as follows:"
8923 msgstr ""
8924 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8925 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8926
8927 #. type: Plain text
8928 #: build/C/man2/shmctl.2:81
8929 #, no-wrap
8930 msgid ""
8931 "struct shmid_ds {\n"
8932 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8933 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8934 "    time_t          shm_atime;   /* Last attach time */\n"
8935 "    time_t          shm_dtime;   /* Last detach time */\n"
8936 "    time_t          shm_ctime;   /* Last change time */\n"
8937 "    pid_t           shm_cpid;    /* PID of creator */\n"
8938 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8939 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8940 "    ...\n"
8941 "};\n"
8942 msgstr ""
8943 "struct shmid_ds {\n"
8944 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8945 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8946 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8947 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8948 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8949 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8950 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8951 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8952 "    ...\n"
8953 "};\n"
8954
8955 #. type: Plain text
8956 #: build/C/man2/shmctl.2:89
8957 msgid ""
8958 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8959 "settable using B<IPC_SET>):"
8960 msgstr ""
8961 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
8962 "B<IPC_SET> を使って設定可能である):"
8963
8964 #. type: Plain text
8965 #: build/C/man2/shmctl.2:102
8966 #, no-wrap
8967 msgid ""
8968 "struct ipc_perm {\n"
8969 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8970 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8971 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8972 "    uid_t          cuid;     /* Effective UID of creator */\n"
8973 "    gid_t          cgid;     /* Effective GID of creator */\n"
8974 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8975 "                                SHM_LOCKED flags */\n"
8976 "    unsigned short __seq;    /* Sequence number */\n"
8977 "};\n"
8978 msgstr ""
8979 "struct ipc_perm {\n"
8980 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8981 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8982 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8983 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8984 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8985 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8986 "                                SHM_LOCKED フラグ */\n"
8987 "    unsigned short __seq;    /* シーケンス番号 */\n"
8988 "};\n"
8989
8990 #. type: Plain text
8991 #: build/C/man2/shmctl.2:108
8992 msgid "Valid values for I<cmd> are:"
8993 msgstr "I<cmd> として有効な値は以下の通り:"
8994
8995 #. type: TP
8996 #: build/C/man2/shmctl.2:109
8997 #, no-wrap
8998 msgid "B<IPC_STAT>"
8999 msgstr "B<IPC_STAT>"
9000
9001 #. type: Plain text
9002 #: build/C/man2/shmctl.2:118
9003 msgid ""
9004 "Copy information from the kernel data structure associated with I<shmid> "
9005 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9006 "read permission on the shared memory segment."
9007 msgstr ""
9008 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9009 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9010 "読み込み許可を持たなければならない。"
9011
9012 #. type: TP
9013 #: build/C/man2/shmctl.2:118
9014 #, no-wrap
9015 msgid "B<IPC_SET>"
9016 msgstr "B<IPC_SET>"
9017
9018 #. type: Plain text
9019 #: build/C/man2/shmctl.2:136
9020 msgid ""
9021 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9022 "I<buf> to the kernel data structure associated with this shared memory "
9023 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9024 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9025 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9026 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9027 "memory segment, or the caller must be privileged."
9028 msgstr ""
9029 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9030 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9031 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9032 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9033 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9034 "と一致するか、呼び出し元が特権を持たなければならない。"
9035
9036 #. type: TP
9037 #: build/C/man2/shmctl.2:136
9038 #, no-wrap
9039 msgid "B<IPC_RMID>"
9040 msgstr "B<IPC_RMID>"
9041
9042 #. type: Plain text
9043 #: build/C/man2/shmctl.2:153
9044 msgid ""
9045 "Mark the segment to be destroyed.  The segment will only actually be "
9046 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9047 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9048 "the owner or creator, or be privileged.  If a segment has been marked for "
9049 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
9050 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
9051 "be set."
9052 msgstr ""
9053 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9054 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9055 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
9056 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
9057 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
9058 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
9059
9060 #. type: Plain text
9061 #: build/C/man2/shmctl.2:156
9062 msgid ""
9063 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9064 "its pages that were faulted in will remain in memory or swap."
9065 msgstr ""
9066 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9067 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9068 "る。"
9069
9070 #. type: Plain text
9071 #: build/C/man2/shmctl.2:161
9072 msgid ""
9073 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9074 "(5)."
9075 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9076
9077 #. type: TP
9078 #: build/C/man2/shmctl.2:161
9079 #, no-wrap
9080 msgid "B<IPC_INFO> (Linux-specific)"
9081 msgstr "B<IPC_INFO> (Linux 固有)"
9082
9083 #. type: Plain text
9084 #: build/C/man2/shmctl.2:174
9085 msgid ""
9086 "Returns information about system-wide shared memory limits and parameters in "
9087 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9088 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9089 "B<_GNU_SOURCE> feature test macro is defined:"
9090 msgstr ""
9091 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9092 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9093 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9094 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9095
9096 #. type: Plain text
9097 #: build/C/man2/shmctl.2:188
9098 #, no-wrap
9099 msgid ""
9100 "struct  shminfo {\n"
9101 "    unsigned long shmmax; /* Maximum segment size */\n"
9102 "    unsigned long shmmin; /* Minimum segment size;\n"
9103 "                             always 1 */\n"
9104 "    unsigned long shmmni; /* Maximum number of segments */\n"
9105 "    unsigned long shmseg; /* Maximum number of segments\n"
9106 "                             that a process can attach;\n"
9107 "                             unused within kernel */\n"
9108 "    unsigned long shmall; /* Maximum number of pages of\n"
9109 "                             shared memory, system-wide */\n"
9110 "};\n"
9111 msgstr ""
9112 "struct  shminfo {\n"
9113 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9114 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9115 "                             常に 1 */\n"
9116 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9117 "    unsigned long shmseg; /* プロセスが付加できる\n"
9118 "                             セグメントの最大数。\n"
9119 "                             カーネル内では未使用 */\n"
9120 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9121 "                             システム全体での値 */\n"
9122 "};\n"
9123
9124 #. type: Plain text
9125 #: build/C/man2/shmctl.2:201
9126 msgid ""
9127 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9128 "files of the same name; see B<proc>(5)  for details."
9129 msgstr ""
9130 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9131 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9132
9133 #. type: TP
9134 #: build/C/man2/shmctl.2:201
9135 #, no-wrap
9136 msgid "B<SHM_INFO> (Linux-specific)"
9137 msgstr "B<SHM_INFO> (Linux 固有)"
9138
9139 #. type: Plain text
9140 #: build/C/man2/shmctl.2:212
9141 msgid ""
9142 "Returns a I<shm_info> structure whose fields contain information about "
9143 "system resources consumed by shared memory.  This structure is defined in "
9144 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9145 msgstr ""
9146 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9147 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9148 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9149
9150 #. type: Plain text
9151 #: build/C/man2/shmctl.2:229
9152 #, no-wrap
9153 msgid ""
9154 "struct shm_info {\n"
9155 "    int           used_ids; /* # of currently existing\n"
9156 "                               segments */\n"
9157 "    unsigned long shm_tot;  /* Total number of shared\n"
9158 "                               memory pages */\n"
9159 "    unsigned long shm_rss;  /* # of resident shared\n"
9160 "                               memory pages */\n"
9161 "    unsigned long shm_swp;  /* # of swapped shared\n"
9162 "                               memory pages */\n"
9163 "    unsigned long swap_attempts;\n"
9164 "                            /* Unused since Linux 2.4 */\n"
9165 "    unsigned long swap_successes;\n"
9166 "                            /* Unused since Linux 2.4 */\n"
9167 "};\n"
9168 msgstr ""
9169 "struct shm_info {\n"
9170 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9171 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9172 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9173 "                               いない) 共有メモリページ数 */\n"
9174 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9175 "                               ページ数 */\n"
9176 "    unsigned long swap_attempts;\n"
9177 "                            /* Linux 2.4 以降では未使用 */\n"
9178 "    unsigned long swap_successes;\n"
9179 "                            /* Linux 2.4 以降では未使用 */\n"
9180 "};\n"
9181
9182 #. type: TP
9183 #: build/C/man2/shmctl.2:231
9184 #, no-wrap
9185 msgid "B<SHM_STAT> (Linux-specific)"
9186 msgstr "B<SHM_STAT> (Linux 固有)"
9187
9188 #. type: Plain text
9189 #: build/C/man2/shmctl.2:242
9190 msgid ""
9191 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9192 "argument is not a segment identifier, but instead an index into the kernel's "
9193 "internal array that maintains information about all shared memory segments "
9194 "on the system."
9195 msgstr ""
9196 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9197 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9198 "管理するカーネルの内部配列へのインデックス である。"
9199
9200 #. type: Plain text
9201 #: build/C/man2/shmctl.2:245
9202 msgid ""
9203 "The caller can prevent or allow swapping of a shared memory segment with the "
9204 "following I<cmd> values:"
9205 msgstr ""
9206 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9207 "ワップされることを防止したり、許可したりできる:"
9208
9209 #. type: TP
9210 #: build/C/man2/shmctl.2:246
9211 #, no-wrap
9212 msgid "B<SHM_LOCK> (Linux-specific)"
9213 msgstr "B<SHM_LOCK> (Linux 固有)"
9214
9215 #. type: Plain text
9216 #: build/C/man2/shmctl.2:258
9217 msgid ""
9218 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9219 "pages that are required to be present after locking is enabled.  If a "
9220 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9221 "I<shm_perm.mode> field in the associated data structure retrieved by "
9222 "B<IPC_STAT> will be set."
9223 msgstr ""
9224 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9225 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9226 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9227 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9228 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9229
9230 #. type: TP
9231 #: build/C/man2/shmctl.2:258
9232 #, no-wrap
9233 msgid "B<SHM_UNLOCK> (Linux-specific)"
9234 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9235
9236 #. type: Plain text
9237 #: build/C/man2/shmctl.2:261
9238 msgid "Unlock the segment, allowing it to be swapped out."
9239 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9240
9241 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9242 #.  be applied to a segment, regardless of ownership of the segment.
9243 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9244 #.  in 2.6.10.  MTK, May 2005
9245 #. type: Plain text
9246 #: build/C/man2/shmctl.2:279
9247 msgid ""
9248 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9249 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9250 "these operations if its effective UID matches the owner or creator UID of "
9251 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9252 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9253 msgstr ""
9254 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9255 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9256 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9257 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9258 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9259 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9260
9261 #. type: Plain text
9262 #: build/C/man2/shmctl.2:297
9263 msgid ""
9264 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9265 "highest used entry in the kernel's internal array recording information "
9266 "about all shared memory segments.  (This information can be used with "
9267 "repeated B<SHM_STAT> operations to obtain information about all shared "
9268 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9269 "the identifier of the shared memory segment whose index was given in "
9270 "I<shmid>.  Other operations return 0 on success."
9271 msgstr ""
9272 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9273 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9274 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9275 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9276 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9277 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9278
9279 #. type: Plain text
9280 #: build/C/man2/shmctl.2:301
9281 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9282 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9283
9284 #. type: Plain text
9285 #: build/C/man2/shmctl.2:310
9286 msgid ""
9287 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9288 "read access for I<shmid>, and the calling process does not have the "
9289 "B<CAP_IPC_OWNER> capability."
9290 msgstr ""
9291 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9292 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9293 "ケーパビリティ (capability) を持っていない。"
9294
9295 #. type: Plain text
9296 #: build/C/man2/shmctl.2:321
9297 msgid ""
9298 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9299 "pointed to by I<buf> isn't accessible."
9300 msgstr ""
9301 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9302 "るアドレスにアクセスできない。"
9303
9304 #. type: TP
9305 #: build/C/man2/shmctl.2:321 build/C/man2/shmop.2:197
9306 #, no-wrap
9307 msgid "B<EIDRM>"
9308 msgstr "B<EIDRM>"
9309
9310 #. type: Plain text
9311 #: build/C/man2/shmctl.2:324 build/C/man2/shmop.2:200
9312 msgid "I<shmid> points to a removed identifier."
9313 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9314
9315 #. type: Plain text
9316 #: build/C/man2/shmctl.2:333
9317 msgid ""
9318 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9319 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9320 "to an array slot that is currently unused."
9321 msgstr ""
9322 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9323 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9324 "配列のスロットを参照していた。"
9325
9326 #. type: Plain text
9327 #: build/C/man2/shmctl.2:344
9328 msgid ""
9329 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9330 "be-locked segment would mean that the total bytes in locked shared memory "
9331 "segments would exceed the limit for the real user ID of the calling "
9332 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9333 "(see B<setrlimit>(2))."
9334 msgstr ""
9335 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9336 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9337 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9338 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9339
9340 #. type: Plain text
9341 #: build/C/man2/shmctl.2:349
9342 msgid ""
9343 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9344 "in the structure pointed to by I<buf>."
9345 msgstr ""
9346 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9347 "には大き過ぎる。"
9348
9349 #. type: Plain text
9350 #: build/C/man2/shmctl.2:361
9351 msgid ""
9352 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9353 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9354 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9355 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9356 msgstr ""
9357 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9358 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9359 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9360
9361 #. type: Plain text
9362 #: build/C/man2/shmctl.2:373
9363 msgid ""
9364 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9365 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9366 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9367 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9368 msgstr ""
9369 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9370 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9371 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9372 "が特権を持たない場合にも、このエラーが起こる。)"
9373
9374 #.  SVr4 documents an additional error condition EMFILE.
9375 #. type: Plain text
9376 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:235
9377 #: build/C/man2/shmop.2:234
9378 msgid "SVr4, POSIX.1-2001."
9379 msgstr "SVr4, POSIX.1-2001."
9380
9381 #.  Like Linux, the FreeBSD man pages still document
9382 #.  the inclusion of these header files.
9383 #. type: Plain text
9384 #: build/C/man2/shmctl.2:391 build/C/man2/shmget.2:251
9385 msgid ""
9386 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9387 "required on Linux or by any version of POSIX.  However, some old "
9388 "implementations required the inclusion of these header files, and the SVID "
9389 "also documented their inclusion.  Applications intended to be portable to "
9390 "such old systems may need to include these header files."
9391 msgstr ""
9392 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9393 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9394 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9395 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9396 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9397 "れない。"
9398
9399 #. type: Plain text
9400 #: build/C/man2/shmctl.2:402
9401 msgid ""
9402 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9403 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9404 "future these may modified or moved to a /proc file system interface."
9405 msgstr ""
9406 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9407 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9408 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9409
9410 #. type: Plain text
9411 #: build/C/man2/shmctl.2:410
9412 msgid ""
9413 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9414 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9415 "feature is not available on other UNIX implementations; portable "
9416 "applications should avoid relying on it."
9417 msgstr ""
9418 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9419 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9420 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9421 "プリケーションではこれに依存しないようにすべきである。"
9422
9423 #. type: Plain text
9424 #: build/C/man2/shmctl.2:423
9425 msgid ""
9426 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9427 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9428 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9429 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9430 msgstr ""
9431 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9432 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9433 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9434 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9435
9436 #. type: Plain text
9437 #: build/C/man2/shmctl.2:430
9438 msgid ""
9439 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9440 "B<svipc>(7)"
9441 msgstr ""
9442 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9443 "B<shm_overview>(7), B<svipc>(7)"
9444
9445 #. type: TH
9446 #: build/C/man2/shmget.2:38
9447 #, no-wrap
9448 msgid "SHMGET"
9449 msgstr "SHMGET"
9450
9451 #. type: Plain text
9452 #: build/C/man2/shmget.2:41
9453 msgid "shmget - allocates a System V shared memory segment"
9454 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9455
9456 #. type: Plain text
9457 #: build/C/man2/shmget.2:48
9458 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9459 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9460
9461 #. type: Plain text
9462 #: build/C/man2/shmget.2:72
9463 msgid ""
9464 "B<shmget>()  returns the identifier of the System V shared memory segment "
9465 "associated with the value of the argument I<key>.  A new shared memory "
9466 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9467 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9468 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9469 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9470 msgstr ""
9471 "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別"
9472 "子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共"
9473 "有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場"
9474 "合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメン"
9475 "トは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大き"
9476 "さとなる。"
9477
9478 #. type: Plain text
9479 #: build/C/man2/shmget.2:91
9480 msgid ""
9481 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9482 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9483 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9484 "| O_EXCL> for B<open>(2).)"
9485 msgstr ""
9486 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9487 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9488 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9489 "O_EXCL> を指定した場合の動作と同じである)。"
9490
9491 #. type: Plain text
9492 #: build/C/man2/shmget.2:95
9493 msgid "The value I<shmflg> is composed of:"
9494 msgstr "I<shmflg> は以下の内容から構成される:"
9495
9496 #. type: TP
9497 #: build/C/man2/shmget.2:95
9498 #, no-wrap
9499 msgid "B<IPC_CREAT>"
9500 msgstr "B<IPC_CREAT>"
9501
9502 #. type: Plain text
9503 #: build/C/man2/shmget.2:102
9504 msgid ""
9505 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9506 "find the segment associated with I<key> and check to see if the user has "
9507 "permission to access the segment."
9508 msgstr ""
9509 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9510 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9511 "可があるかどうかをチェックする。"
9512
9513 #. type: TP
9514 #: build/C/man2/shmget.2:102
9515 #, no-wrap
9516 msgid "B<IPC_EXCL>"
9517 msgstr "B<IPC_EXCL>"
9518
9519 #. type: Plain text
9520 #: build/C/man2/shmget.2:105
9521 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9522 msgstr ""
9523 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9524 "証する。"
9525
9526 #. type: TP
9527 #: build/C/man2/shmget.2:105
9528 #, no-wrap
9529 msgid "I<mode_flags>"
9530 msgstr "I<mode_flags>"
9531
9532 #. type: Plain text
9533 #: build/C/man2/shmget.2:115
9534 msgid ""
9535 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9536 "group, and world.  These bits have the same format, and the same meaning, as "
9537 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9538 "not used by the system."
9539 msgstr ""
9540 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9541 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9542 "ろ、システムは実行 (execute) 許可を参照しない。"
9543
9544 #. type: TP
9545 #: build/C/man2/shmget.2:115
9546 #, no-wrap
9547 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9548 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9549
9550 #. type: Plain text
9551 #: build/C/man2/shmget.2:121
9552 msgid ""
9553 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9554 "I<Documentation/vm/hugetlbpage.txt> for further information."
9555 msgstr ""
9556 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9557 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9558
9559 #. type: TP
9560 #: build/C/man2/shmget.2:121
9561 #, no-wrap
9562 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9563 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9564
9565 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9566 #.  specified.
9567 #. type: Plain text
9568 #: build/C/man2/shmget.2:140
9569 msgid ""
9570 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9571 "Do not reserve swap space for this segment.  When swap space is reserved, "
9572 "one has the guarantee that it is possible to modify the segment.  When swap "
9573 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9574 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9575 "overcommit_memory> in B<proc>(5)."
9576 msgstr ""
9577 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9578 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9579 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9580 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9581 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9582 "ルに関する議論も参照のこと。"
9583
9584 #. type: Plain text
9585 #: build/C/man2/shmget.2:148
9586 msgid ""
9587 "When a new shared memory segment is created, its contents are initialized to "
9588 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9589 "(2)), is initialized as follows:"
9590 msgstr ""
9591 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9592 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9593 "期化される。"
9594
9595 #. type: Plain text
9596 #: build/C/man2/shmget.2:153
9597 msgid ""
9598 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9599 "calling process."
9600 msgstr ""
9601 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9602 "ユーザーID を設定する。"
9603
9604 #. type: Plain text
9605 #: build/C/man2/shmget.2:158
9606 msgid ""
9607 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9608 "the calling process."
9609 msgstr ""
9610 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9611 "定する。"
9612
9613 #. type: Plain text
9614 #: build/C/man2/shmget.2:163
9615 msgid ""
9616 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9617 "significant 9 bit of I<shmflg>."
9618 msgstr ""
9619 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9620
9621 #. type: Plain text
9622 #: build/C/man2/shmget.2:167
9623 msgid "I<shm_segsz> is set to the value of I<size>."
9624 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9625
9626 #. type: Plain text
9627 #: build/C/man2/shmget.2:174
9628 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9629 msgstr ""
9630 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9631
9632 #. type: Plain text
9633 #: build/C/man2/shmget.2:177
9634 msgid "I<shm_ctime> is set to the current time."
9635 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9636
9637 #. type: Plain text
9638 #: build/C/man2/shmget.2:180
9639 msgid ""
9640 "If the shared memory segment already exists, the permissions are verified, "
9641 "and a check is made to see if it is marked for destruction."
9642 msgstr ""
9643 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9644 "(destruction) マークがつけられていないかのチェックが行われる。"
9645
9646 #. type: Plain text
9647 #: build/C/man2/shmget.2:185
9648 msgid ""
9649 "On success, a valid shared memory identifier is returned.  On errir, -1 is "
9650 "returned, and I<errno> is set to indicate the error."
9651 msgstr ""
9652 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
9653 "-1 が返り、 I<error> にエラーを示す値が設定される。"
9654
9655 #. type: Plain text
9656 #: build/C/man2/shmget.2:189
9657 msgid "On failure, I<errno> is set to one of the following:"
9658 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9659
9660 #. type: Plain text
9661 #: build/C/man2/shmget.2:195
9662 msgid ""
9663 "The user does not have permission to access the shared memory segment, and "
9664 "does not have the B<CAP_IPC_OWNER> capability."
9665 msgstr ""
9666 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9667 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9668
9669 #. type: Plain text
9670 #: build/C/man2/shmget.2:199
9671 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9672 msgstr ""
9673 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9674
9675 #. type: Plain text
9676 #: build/C/man2/shmget.2:205
9677 msgid ""
9678 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9679 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9680 "existed, but I<size> is greater than the size of that segment."
9681 msgstr ""
9682 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9683 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9684 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9685 "在するセグメントの サイズよりも大きかった。"
9686
9687 #. type: Plain text
9688 #: build/C/man2/shmget.2:214
9689 msgid ""
9690 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9691 msgstr ""
9692 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9693 "いなかった。"
9694
9695 #. type: Plain text
9696 #: build/C/man2/shmget.2:217
9697 msgid "No memory could be allocated for segment overhead."
9698 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9699
9700 #. type: Plain text
9701 #: build/C/man2/shmget.2:225
9702 msgid ""
9703 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9704 "segment of the requested I<size> would cause the system to exceed the system-"
9705 "wide limit on shared memory (B<SHMALL>)."
9706 msgstr ""
9707 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9708 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9709 "限 (B<SHMALL>)  を超過した。"
9710
9711 #. type: Plain text
9712 #: build/C/man2/shmget.2:232
9713 msgid ""
9714 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9715 "(did not have the B<CAP_IPC_LOCK> capability)."
9716 msgstr ""
9717 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9718 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9719
9720 #. type: Plain text
9721 #: build/C/man2/shmget.2:238
9722 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9723 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9724
9725 #. type: Plain text
9726 #: build/C/man2/shmget.2:261
9727 msgid ""
9728 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9729 "value is used for I<key>, the system call ignores everything but the least "
9730 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9731 "success)."
9732 msgstr ""
9733 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9734 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9735 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9736
9737 #. type: Plain text
9738 #: build/C/man2/shmget.2:265
9739 msgid ""
9740 "The following limits on shared memory segment resources affect the B<shmget>"
9741 "()  call:"
9742 msgstr ""
9743 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9744 "る:"
9745
9746 #. type: TP
9747 #: build/C/man2/shmget.2:265
9748 #, no-wrap
9749 msgid "B<SHMALL>"
9750 msgstr "B<SHMALL>"
9751
9752 #. type: Plain text
9753 #: build/C/man2/shmget.2:270
9754 msgid ""
9755 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9756 "and modified via I</proc/sys/kernel/shmall>)."
9757 msgstr ""
9758 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9759 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9760
9761 #. type: TP
9762 #: build/C/man2/shmget.2:270
9763 #, no-wrap
9764 msgid "B<SHMMAX>"
9765 msgstr "B<SHMMAX>"
9766
9767 #. type: Plain text
9768 #: build/C/man2/shmget.2:275
9769 msgid ""
9770 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9771 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9772 msgstr ""
9773 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9774 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9775
9776 #. type: TP
9777 #: build/C/man2/shmget.2:275
9778 #, no-wrap
9779 msgid "B<SHMMIN>"
9780 msgstr "B<SHMMIN>"
9781
9782 #. type: Plain text
9783 #: build/C/man2/shmget.2:281
9784 msgid ""
9785 "Minimum size in bytes for a shared memory segment: implementation dependent "
9786 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9787 msgstr ""
9788 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9789 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9790
9791 #. type: TP
9792 #: build/C/man2/shmget.2:281
9793 #, no-wrap
9794 msgid "B<SHMMNI>"
9795 msgstr "B<SHMMNI>"
9796
9797 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9798 #.  that we could create one more segment than SHMMNI -- MTK
9799 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9800 #. type: Plain text
9801 #: build/C/man2/shmget.2:290
9802 msgid ""
9803 "System wide maximum number of shared memory segments: implementation "
9804 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9805 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9806 msgstr ""
9807 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9808 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9809 "したり、変更したりできる)。"
9810
9811 #. type: Plain text
9812 #: build/C/man2/shmget.2:294
9813 msgid ""
9814 "The implementation has no specific limits for the per-process maximum number "
9815 "of shared memory segments (B<SHMSEG>)."
9816 msgstr ""
9817 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9818 "上の制限はない。"
9819
9820 #. type: Plain text
9821 #: build/C/man2/shmget.2:300
9822 msgid ""
9823 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9824 "shared memory segment scheduled for deletion."
9825 msgstr ""
9826 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9827 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9828
9829 #. type: Plain text
9830 #: build/C/man2/shmget.2:306
9831 msgid ""
9832 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9833 "more clearly show its function."
9834 msgstr ""
9835 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9836 "より明確にその機能を表しているだろう。"
9837
9838 #. type: Plain text
9839 #: build/C/man2/shmget.2:314
9840 msgid ""
9841 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9842 "B<shm_overview>(7), B<svipc>(7)"
9843 msgstr ""
9844 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9845 "B<shm_overview>(7), B<svipc>(7)"
9846
9847 #. type: TH
9848 #: build/C/man2/shmop.2:41
9849 #, no-wrap
9850 msgid "SHMOP"
9851 msgstr "SHMOP"
9852
9853 #. type: Plain text
9854 #: build/C/man2/shmop.2:44
9855 msgid "shmat, shmdt - System V shared memory operations"
9856 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
9857
9858 #. type: Plain text
9859 #: build/C/man2/shmop.2:48
9860 #, no-wrap
9861 msgid ""
9862 "B<#include E<lt>sys/types.hE<gt>>\n"
9863 "B<#include E<lt>sys/shm.hE<gt>>\n"
9864 msgstr ""
9865 "B<#include E<lt>sys/types.hE<gt>>\n"
9866 "B<#include E<lt>sys/shm.hE<gt>>\n"
9867
9868 #. type: Plain text
9869 #: build/C/man2/shmop.2:50
9870 #, no-wrap
9871 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9872 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9873
9874 #. type: Plain text
9875 #: build/C/man2/shmop.2:52
9876 #, no-wrap
9877 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9878 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9879
9880 #. type: Plain text
9881 #: build/C/man2/shmop.2:61
9882 msgid ""
9883 "B<shmat>()  attaches the System V shared memory segment identified by "
9884 "I<shmid> to the address space of the calling process.  The attaching address "
9885 "is specified by I<shmaddr> with one of the following criteria:"
9886 msgstr ""
9887 "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared "
9888 "memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付"
9889 "加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9890
9891 #. type: Plain text
9892 #: build/C/man2/shmop.2:67
9893 msgid ""
9894 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9895 "which to attach the segment."
9896 msgstr ""
9897 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9898 "されていない) アドレスを選択する。"
9899
9900 #. type: Plain text
9901 #: build/C/man2/shmop.2:82
9902 msgid ""
9903 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9904 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9905 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9906 "at which the attach occurs."
9907 msgstr ""
9908 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9909 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9910 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9911 "を指している必要がある。"
9912
9913 #. type: Plain text
9914 #: build/C/man2/shmop.2:92
9915 msgid ""
9916 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9917 "reading and the process must have read permission for the segment.  "
9918 "Otherwise the segment is attached for read and write and the process must "
9919 "have read and write permission for the segment.  There is no notion of a "
9920 "write-only shared memory segment."
9921 msgstr ""
9922 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9923 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9924 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9925 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9926 "の共有メモリ・セグメントという概念は存在しない。"
9927
9928 #. type: Plain text
9929 #: build/C/man2/shmop.2:107
9930 msgid ""
9931 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9932 "indicate that the mapping of the segment should replace any existing mapping "
9933 "in the range starting at I<shmaddr> and continuing for the size of the "
9934 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9935 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9936 msgstr ""
9937 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9938 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9939 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9940 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9941 "場合は、 I<shmaddr> が NULL であってはならない。"
9942
9943 #. type: Plain text
9944 #: build/C/man2/shmop.2:114
9945 msgid ""
9946 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9947 "The segment will automatically be detached at process exit.  The same "
9948 "segment may be attached as a read and as a read-write one, and more than "
9949 "once, in the process's address space."
9950 msgstr ""
9951 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9952 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9953 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9954 "複数回付加することもできる。"
9955
9956 #. type: Plain text
9957 #: build/C/man2/shmop.2:122
9958 msgid ""
9959 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9960 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9961 "follows:"
9962 msgstr ""
9963 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9964 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9965
9966 #. type: Plain text
9967 #: build/C/man2/shmop.2:125
9968 msgid "I<shm_atime> is set to the current time."
9969 msgstr "I<shm_atime> には現在の時刻を設定する。"
9970
9971 #. type: Plain text
9972 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9973 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9974 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9975
9976 #. type: Plain text
9977 #: build/C/man2/shmop.2:131
9978 msgid "I<shm_nattch> is incremented by one."
9979 msgstr "I<shm_nattch> を 1 増加させる。"
9980
9981 #. type: Plain text
9982 #: build/C/man2/shmop.2:142
9983 msgid ""
9984 "B<shmdt>()  detaches the shared memory segment located at the address "
9985 "specified by I<shmaddr> from the address space of the calling process.  The "
9986 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9987 "the value returned by the attaching B<shmat>()  call."
9988 msgstr ""
9989 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9990 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9991 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9992 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9993 "ない。"
9994
9995 #. type: Plain text
9996 #: build/C/man2/shmop.2:148
9997 msgid ""
9998 "On a successful B<shmdt>()  call the system updates the members of the "
9999 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10000 msgstr ""
10001 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10002 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10003
10004 #. type: Plain text
10005 #: build/C/man2/shmop.2:151
10006 msgid "I<shm_dtime> is set to the current time."
10007 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10008
10009 #. type: Plain text
10010 #: build/C/man2/shmop.2:159
10011 msgid ""
10012 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10013 "marked for deletion, the segment is deleted."
10014 msgstr ""
10015 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10016 "セグメントは削除される。"
10017
10018 #. type: Plain text
10019 #: build/C/man2/shmop.2:163
10020 msgid ""
10021 "After a B<fork>(2)  the child inherits the attached shared memory segments."
10022 msgstr ""
10023 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10024
10025 #. type: Plain text
10026 #: build/C/man2/shmop.2:167
10027 msgid ""
10028 "After an B<execve>(2)  all attached shared memory segments are detached from "
10029 "the process."
10030 msgstr ""
10031 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10032 "される。"
10033
10034 #. type: Plain text
10035 #: build/C/man2/shmop.2:171
10036 msgid ""
10037 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
10038 "process."
10039 msgstr ""
10040 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10041 "離される。"
10042
10043 #. type: Plain text
10044 #: build/C/man2/shmop.2:179
10045 msgid ""
10046 "On success B<shmat>()  returns the address of the attached shared memory "
10047 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10048 "indicate the cause of the error."
10049 msgstr ""
10050 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10051 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10052 "値を設定する。"
10053
10054 #. type: Plain text
10055 #: build/C/man2/shmop.2:185
10056 msgid ""
10057 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10058 "set to indicate the cause of the error."
10059 msgstr ""
10060 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10061 "ラーの原因を示す値を設定する。"
10062
10063 #. type: Plain text
10064 #: build/C/man2/shmop.2:191
10065 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10066 msgstr ""
10067 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10068
10069 #. type: Plain text
10070 #: build/C/man2/shmop.2:197
10071 msgid ""
10072 "The calling process does not have the required permissions for the requested "
10073 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10074 msgstr ""
10075 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10076 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10077
10078 #. type: Plain text
10079 #: build/C/man2/shmop.2:214
10080 msgid ""
10081 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10082 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10083 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10084 msgstr ""
10085 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10086 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10087 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10088 "れているが、 I<shmaddr> が NULL であった。"
10089
10090 #. type: Plain text
10091 #: build/C/man2/shmop.2:217
10092 msgid "Could not allocate memory for the descriptor or for the page tables."
10093 msgstr ""
10094 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10095 "とができない。"
10096
10097 #. type: Plain text
10098 #: build/C/man2/shmop.2:223
10099 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10100 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10101
10102 #.  The following since 2.6.17-rc1:
10103 #. type: Plain text
10104 #: build/C/man2/shmop.2:231
10105 msgid ""
10106 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10107 "not aligned on a page boundary."
10108 msgstr ""
10109 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10110 "I<shmaddr> がページ境界に合っていない。"
10111
10112 #. type: Plain text
10113 #: build/C/man2/shmop.2:250
10114 msgid ""
10115 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10116 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10117 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10118 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10119 msgstr ""
10120 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10121 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10122 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10123 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10124
10125 #. type: Plain text
10126 #: build/C/man2/shmop.2:262
10127 msgid ""
10128 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10129 "way of attaching a shared memory segment.  Be aware that the shared memory "
10130 "segment attached in this way may be attached at different addresses in "
10131 "different processes.  Therefore, any pointers maintained within the shared "
10132 "memory must be made relative (typically to the starting address of the "
10133 "segment), rather than absolute."
10134 msgstr ""
10135 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10136 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10137 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10138 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10139 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10140 "る。"
10141
10142 #. type: Plain text
10143 #: build/C/man2/shmop.2:267
10144 msgid ""
10145 "On Linux, it is possible to attach a shared memory segment even if it is "
10146 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10147 "behavior and many other implementations do not support it."
10148 msgstr ""
10149 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10150 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10151 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10152
10153 #. type: Plain text
10154 #: build/C/man2/shmop.2:270
10155 msgid "The following system parameter affects B<shmat>():"
10156 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10157
10158 #.  FIXME A good explanation of the rationale for the existence
10159 #.  of SHMLBA would be useful here
10160 #. type: TP
10161 #: build/C/man2/shmop.2:270
10162 #, no-wrap
10163 msgid "B<SHMLBA>"
10164 msgstr "B<SHMLBA>"
10165
10166 #.  FIXME That last sentence isn't true for all Linux
10167 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10168 #.  -- MTK, Nov 04
10169 #. type: Plain text
10170 #: build/C/man2/shmop.2:283
10171 msgid ""
10172 "Segment low boundary address multiple.  Must be page aligned.  For the "
10173 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10174 msgstr ""
10175 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10176 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10177
10178 #. type: Plain text
10179 #: build/C/man2/shmop.2:287
10180 msgid ""
10181 "The implementation places no intrinsic limit on the per-process maximum "
10182 "number of shared memory segments (B<SHMSEG>)."
10183 msgstr ""
10184 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10185 "関する実装依存の制限はない。"
10186
10187 #. type: Plain text
10188 #: build/C/man2/shmop.2:295
10189 msgid ""
10190 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10191 "B<shm_overview>(7), B<svipc>(7)"
10192 msgstr ""
10193 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10194 "B<shm_overview>(7), B<svipc>(7)"
10195
10196 #. type: TH
10197 #: build/C/man2/subpage_prot.2:30
10198 #, no-wrap
10199 msgid "SUBPAGE_PROT"
10200 msgstr "SUBPAGE_PROT"
10201
10202 #. type: TH
10203 #: build/C/man2/subpage_prot.2:30
10204 #, no-wrap
10205 msgid "2012-07-13"
10206 msgstr "2012-07-13"
10207
10208 #. type: Plain text
10209 #: build/C/man2/subpage_prot.2:33
10210 msgid "subpage_prot - define a subpage protection for an address range"
10211 msgstr ""
10212
10213 #. type: Plain text
10214 #: build/C/man2/subpage_prot.2:37
10215 #, no-wrap
10216 msgid ""
10217 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10218 "B<                  uint32_t *>I<map>B<);>\n"
10219 msgstr ""
10220 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10221 "B<                  uint32_t *>I<map>B<);>\n"
10222
10223 #. type: Plain text
10224 #: build/C/man2/subpage_prot.2:41
10225 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10226 msgstr ""
10227 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10228 "を参照。"
10229
10230 #. type: Plain text
10231 #: build/C/man2/subpage_prot.2:47
10232 msgid ""
10233 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10234 "control the access permissions on individual 4kB subpages on systems "
10235 "configured with a page size of 64kB."
10236 msgstr ""
10237
10238 #. type: Plain text
10239 #: build/C/man2/subpage_prot.2:54
10240 msgid ""
10241 "The protection map is applied to the memory pages in the region starting at "
10242 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10243 "aligned to a 64-kB boundary."
10244 msgstr ""
10245
10246 #. type: Plain text
10247 #: build/C/man2/subpage_prot.2:66
10248 msgid ""
10249 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10250 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10251 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10252 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10253 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10254 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10255 msgstr ""
10256
10257 #. type: Plain text
10258 #: build/C/man2/subpage_prot.2:71
10259 msgid ""
10260 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10261 "specified below is returned."
10262 msgstr ""
10263
10264 #. type: Plain text
10265 #: build/C/man2/subpage_prot.2:77
10266 msgid "The buffer referred to by I<map> is not accessible."
10267 msgstr ""
10268
10269 #. type: Plain text
10270 #: build/C/man2/subpage_prot.2:87
10271 msgid ""
10272 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10273 "be aligned to a multiple of the system page size, and they must not refer to "
10274 "a region outside of the address space of the process or to a region that "
10275 "consists of huge pages."
10276 msgstr ""
10277
10278 #. type: Plain text
10279 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10280 msgid "Out of memory."
10281 msgstr "メモリ不足である。"
10282
10283 #. type: Plain text
10284 #: build/C/man2/subpage_prot.2:96
10285 msgid ""
10286 "This system call is provided on the PowerPC architecture since Linux "
10287 "2.6.25.  The system call is provided only if the kernel is configured with "
10288 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10289 msgstr ""
10290
10291 #. type: Plain text
10292 #: build/C/man2/subpage_prot.2:101
10293 msgid ""
10294 "Glibc does not provide a wrapper for this system call; call it using "
10295 "B<syscall>(2)."
10296 msgstr ""
10297
10298 #. type: Plain text
10299 #: build/C/man2/subpage_prot.2:106
10300 msgid ""
10301 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10302 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10303 "field won't allow writes to a page that is otherwise write-protected."
10304 msgstr ""
10305
10306 #. type: SS
10307 #: build/C/man2/subpage_prot.2:106
10308 #, no-wrap
10309 msgid "Rationale"
10310 msgstr ""
10311
10312 #.  In the initial implementation, it was the case that:
10313 #.      In fact the whole process is switched to use 4k hardware pages when the
10314 #.      subpage_prot system call is used, but this could be improved in future
10315 #.      to switch only the affected segments.
10316 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10317 #.  the affected segment, not the whole process.
10318 #. type: Plain text
10319 #: build/C/man2/subpage_prot.2:128
10320 msgid ""
10321 "This system call is provided to assist writing emulators that operate using "
10322 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10323 "uses a smaller page size, the emulator can no longer use the memory-"
10324 "management unit (MMU)  and normal system calls for controlling page "
10325 "protections.  (The emulator could emulate the MMU by checking and possibly "
10326 "remapping the address for each memory access in software, but that is "
10327 "slow.)  The idea is that the emulator supplies an array of protection masks "
10328 "to apply to a specified range of virtual addresses.  These masks are applied "
10329 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10330 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10331 "affected.  Implicit in this is that the regions of the address space that "
10332 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10333 "hardware pages (on machines with hardware 64-kB page support)."
10334 msgstr ""
10335
10336 #. type: Plain text
10337 #: build/C/man2/subpage_prot.2:131
10338 msgid "B<mprotect>(2), B<syscall>(2)"
10339 msgstr "B<mprotect>(2), B<syscall>(2)"
10340
10341 #. type: Plain text
10342 #: build/C/man2/subpage_prot.2:134
10343 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10344 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10345
10346 #. type: TH
10347 #: build/C/man2/sync_file_range.2:30
10348 #, no-wrap
10349 msgid "SYNC_FILE_RANGE"
10350 msgstr "SYNC_FILE_RANGE"
10351
10352 #. type: Plain text
10353 #: build/C/man2/sync_file_range.2:33
10354 msgid "sync_file_range - sync a file segment with disk"
10355 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10356
10357 #. type: Plain text
10358 #: build/C/man2/sync_file_range.2:37
10359 #, no-wrap
10360 msgid ""
10361 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10362 "B<#include E<lt>fcntl.hE<gt>>\n"
10363 msgstr ""
10364 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10365 "B<#include E<lt>fcntl.hE<gt>>\n"
10366
10367 #. type: Plain text
10368 #: build/C/man2/sync_file_range.2:40
10369 #, no-wrap
10370 msgid ""
10371 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10372 "B<                    unsigned int >I<flags>B<);>\n"
10373 msgstr ""
10374 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10375 "B<                    unsigned int >I<flags>B<);>\n"
10376
10377 #. type: Plain text
10378 #: build/C/man2/sync_file_range.2:47
10379 msgid ""
10380 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10381 "referred to by the file descriptor I<fd> with disk."
10382 msgstr ""
10383 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10384 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10385
10386 #. type: Plain text
10387 #: build/C/man2/sync_file_range.2:61
10388 msgid ""
10389 "I<offset> is the starting byte of the file range to be synchronized.  "
10390 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10391 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10392 "are synchronized.  Synchronization is in units of the system page size: "
10393 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10394 "rounded up to a page boundary."
10395 msgstr ""
10396 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10397 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10398 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10399 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10400 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10401
10402 #. type: Plain text
10403 #: build/C/man2/sync_file_range.2:65
10404 msgid "The I<flags> bit-mask argument can include any of the following values:"
10405 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10406
10407 #. type: TP
10408 #: build/C/man2/sync_file_range.2:65
10409 #, no-wrap
10410 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10411 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10412
10413 #. type: Plain text
10414 #: build/C/man2/sync_file_range.2:70
10415 msgid ""
10416 "Wait upon write-out of all pages in the specified range that have already "
10417 "been submitted to the device driver for write-out before performing any "
10418 "write."
10419 msgstr ""
10420 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10421 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10422 "つ。"
10423
10424 #. type: TP
10425 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10426 #, no-wrap
10427 msgid "B<SYNC_FILE_RANGE_WRITE>"
10428 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10429
10430 #. type: Plain text
10431 #: build/C/man2/sync_file_range.2:76
10432 msgid ""
10433 "Initiate write-out of all dirty pages in the specified range which are not "
10434 "presently submitted write-out.  Note that even this may block if you attempt "
10435 "to write more than request queue size."
10436 msgstr ""
10437 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10438 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10439 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10440 "る点に注意すること。"
10441
10442 #. type: TP
10443 #: build/C/man2/sync_file_range.2:76
10444 #, no-wrap
10445 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10446 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10447
10448 #. type: Plain text
10449 #: build/C/man2/sync_file_range.2:80
10450 msgid ""
10451 "Wait upon write-out of all pages in the range after performing any write."
10452 msgstr ""
10453 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10454 "つ。"
10455
10456 #. type: Plain text
10457 #: build/C/man2/sync_file_range.2:84
10458 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10459 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10460
10461 #. type: SS
10462 #: build/C/man2/sync_file_range.2:84
10463 #, no-wrap
10464 msgid "Warning"
10465 msgstr "警告"
10466
10467 #. type: Plain text
10468 #: build/C/man2/sync_file_range.2:100
10469 msgid ""
10470 "This system call is extremely dangerous and should not be used in portable "
10471 "programs.  None of these operations writes out the file's metadata.  "
10472 "Therefore, unless the application is strictly performing overwrites of "
10473 "already-instantiated disk blocks, there are no guarantees that the data will "
10474 "be available after a crash.  There is no user interface to know if a write "
10475 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10476 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10477 "When writing into preallocated space, many file systems also require calls "
10478 "into the block allocator, which this system call does not sync out to disk.  "
10479 "This system call does not flush disk write caches and thus does not provide "
10480 "any data integrity on systems with volatile disk write caches."
10481 msgstr ""
10482 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10483 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10484 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10485 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10486 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10487 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10488 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10489 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10490 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10491 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10492 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10493 "コールではデータの一貫性を確保できないことになる。"
10494
10495 #. type: SS
10496 #: build/C/man2/sync_file_range.2:100
10497 #, no-wrap
10498 msgid "Some details"
10499 msgstr "詳細"
10500
10501 #. type: Plain text
10502 #: build/C/man2/sync_file_range.2:108
10503 msgid ""
10504 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10505 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10506 msgstr ""
10507 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10508 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10509
10510 #. type: Plain text
10511 #: build/C/man2/sync_file_range.2:112
10512 msgid "Useful combinations of the I<flags> bits are:"
10513 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10514
10515 #. type: TP
10516 #: build/C/man2/sync_file_range.2:112
10517 #, no-wrap
10518 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10519 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10520
10521 #. type: Plain text
10522 #: build/C/man2/sync_file_range.2:120
10523 msgid ""
10524 "Ensures that all pages in the specified range which were dirty when "
10525 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10526 "start-write-for-data-integrity operation."
10527 msgstr ""
10528 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10529 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10530 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10531 "ある。"
10532
10533 #. type: Plain text
10534 #: build/C/man2/sync_file_range.2:127
10535 msgid ""
10536 "Start write-out of all dirty pages in the specified range which are not "
10537 "presently under write-out.  This is an asynchronous flush-to-disk "
10538 "operation.  This is not suitable for data integrity operations."
10539 msgstr ""
10540 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10541 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10542 "る。データ完全性確保が必要な操作としては適切ではない。"
10543
10544 #. type: TP
10545 #: build/C/man2/sync_file_range.2:127
10546 #, no-wrap
10547 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10548 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10549
10550 #. type: Plain text
10551 #: build/C/man2/sync_file_range.2:134
10552 msgid ""
10553 "Wait for completion of write-out of all pages in the specified range.  This "
10554 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10555 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10556 "and obtain its result."
10557 msgstr ""
10558 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10559 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10560 "き、この操作の完了を待ち、結果を取得することができる。"
10561
10562 #. type: TP
10563 #: build/C/man2/sync_file_range.2:134
10564 #, no-wrap
10565 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10566 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10567
10568 #. type: Plain text
10569 #: build/C/man2/sync_file_range.2:141
10570 msgid ""
10571 "This is a write-for-data-integrity operation that will ensure that all pages "
10572 "in the specified range which were dirty when B<sync_file_range>()  was "
10573 "called are committed to disk."
10574 msgstr ""
10575 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10576 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10577 "のページが ディスクに格納されることが保証される。"
10578
10579 #. type: Plain text
10580 #: build/C/man2/sync_file_range.2:147
10581 msgid ""
10582 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10583 "I<errno> is set to indicate the error."
10584 msgstr ""
10585 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10586 "I<error> にエラーを示す値を設定する。"
10587
10588 #. type: Plain text
10589 #: build/C/man2/sync_file_range.2:152
10590 msgid "I<fd> is not a valid file descriptor."
10591 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10592
10593 #. type: Plain text
10594 #: build/C/man2/sync_file_range.2:160
10595 msgid ""
10596 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10597 msgstr ""
10598 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10599 "である。"
10600
10601 #. type: Plain text
10602 #: build/C/man2/sync_file_range.2:163
10603 msgid "I/O error."
10604 msgstr "I/O エラー。"
10605
10606 #. type: Plain text
10607 #: build/C/man2/sync_file_range.2:169
10608 msgid "Out of disk space."
10609 msgstr "ディスク領域不足である。"
10610
10611 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10612 #.  (In user space at least) it isn't possible to obtain a file descriptor
10613 #.  for a symbolic link.
10614 #. type: Plain text
10615 #: build/C/man2/sync_file_range.2:177
10616 msgid ""
10617 "I<fd> refers to something other than a regular file, a block device, a "
10618 "directory, or a symbolic link."
10619 msgstr ""
10620 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10621 "以外のものを指している。"
10622
10623 #. type: Plain text
10624 #: build/C/man2/sync_file_range.2:180
10625 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10626 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10627
10628 #. type: Plain text
10629 #: build/C/man2/sync_file_range.2:183
10630 msgid ""
10631 "This system call is Linux-specific, and should be avoided in portable "
10632 "programs."
10633 msgstr ""
10634 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10635 "けるべきである。"
10636
10637 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10638 #. type: Plain text
10639 #: build/C/man2/sync_file_range.2:200
10640 msgid ""
10641 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10642 "in a suitable pair of registers.  On such architectures, the call signature "
10643 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10644 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10645 "(2)  for details.)  Therefore, these architectures define a different system "
10646 "call that orders the arguments suitably:"
10647 msgstr ""
10648 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
10649 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
10650 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
10651 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
10652 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
10653 "き数が適切な順序になった別のシステムコールが定義されている。"
10654
10655 #. type: Plain text
10656 #: build/C/man2/sync_file_range.2:205
10657 #, no-wrap
10658 msgid ""
10659 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10660 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10661 msgstr ""
10662 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10663 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10664
10665 #. type: Plain text
10666 #: build/C/man2/sync_file_range.2:210
10667 msgid ""
10668 "The behavior of this system call is otherwise exactly the same as "
10669 "B<sync_file_range>()."
10670 msgstr ""
10671 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10672 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10673 "glibc では提供されていない。"
10674
10675 #. type: Plain text
10676 #: build/C/man2/sync_file_range.2:221
10677 msgid ""
10678 "A system call with this signature first appeared on the ARM architecture in "
10679 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10680 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10681 "architectures where glibc support is provided, glibc transparently wraps "
10682 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10683 msgstr ""
10684 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10685 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10686 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10687 "システムコールの名前が変更された。\n"
10688 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10689 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10690 "B<sync_file_range2>() を適切に使用するようになっている。"
10691
10692 #. type: Plain text
10693 #: build/C/man2/sync_file_range.2:226
10694 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10695 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10696
10697 #~ msgid "2008-01-24"
10698 #~ msgstr "2008-01-24"
10699
10700 #~ msgid "B<fallocate>()  returns zero on success, and -1 on failure."
10701 #~ msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
10702
10703 #~ msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
10704 #~ msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
10705
10706 #~ msgid "2012-05-31"
10707 #~ msgstr "2012-05-31"
10708
10709 #~ msgid ""
10710 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
10711 #~ msgstr ""
10712 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
10713 #~ "-1 が返される。"
10714
10715 #~ msgid ""
10716 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10717 #~ "pair of registers.  On this architecture, the call signature of "
10718 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10719 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10720 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10721 #~ "suitably:"
10722 #~ msgstr ""
10723 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10724 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10725 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10726 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10727 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10728 #~ "システムコールが定義されている。"
10729
10730 #~ msgid ""
10731 #~ "The behavior of this system call is otherwise exactly the same as "
10732 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10733 #~ "in glibc."
10734 #~ msgstr ""
10735 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10736 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10737 #~ "では提供されていない。"
10738
10739 #~ msgid ""
10740 #~ "The I<mode> is not supported by the file system containing the file "
10741 #~ "referred to by I<fd>."
10742 #~ msgstr ""
10743 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10744 #~ "ない。"
10745
10746 #~ msgid ""
10747 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10748 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10749 #~ msgstr ""
10750 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10751 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10752
10753 #~ msgid ""
10754 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10755 #~ "()  writes its output.  This file must be writable to the user or "
10756 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10757 #~ "truncated."
10758 #~ msgstr ""
10759 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10760 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10761 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10762 #~ "イルの元の内容を上書きする。"
10763
10764 #~ msgid ""
10765 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10766 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10767 #~ msgstr ""
10768 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10769 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10770 #~ "リプトが付属している。"
10771
10772 #~ msgid ""
10773 #~ "This flag allocates and initializes to zero the disk space within the "
10774 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10775 #~ "subsequent writes into this range are guaranteed not to fail because of "
10776 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10777 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10778 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10779 #~ "less than I<offset>+I<len>."
10780 #~ msgstr ""
10781 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10782 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10783 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10784 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10785 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10786 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10787 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10788 #~ "は変更されることはない。"
10789
10790 #~ msgid ""
10791 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10792 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10793 #~ msgstr ""
10794 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10795 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10796
10797 #~ msgid ""
10798 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10799 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10800 #~ "required."
10801 #~ msgstr ""
10802 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10803 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10804 #~ "が必要である。"
10805
10806 #~ msgid ""
10807 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10808 #~ "provided since version 2.2."
10809 #~ msgstr ""
10810 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10811 #~ "glibc バージョン 2.2 以降で行われている。"